From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#63084: 30.0.50; gud: set breakpoint while program is running Date: Wed, 26 Apr 2023 12:44:29 +0300 Message-ID: <83wn1zt1tu.fsf@gnu.org> References: <874jp3n52b.fsf@home.mail-host-address-is-not-set> <838refuqa8.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1966"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63084@debbugs.gnu.org To: TatriX Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 26 11:45:49 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1prbid-0000KQ-C5 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 26 Apr 2023 11:45:47 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1prbiQ-0005ef-Sd; Wed, 26 Apr 2023 05:45:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1prbhu-0005Z0-TS for bug-gnu-emacs@gnu.org; Wed, 26 Apr 2023 05:45:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1prbhu-0001Jy-BR for bug-gnu-emacs@gnu.org; Wed, 26 Apr 2023 05:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1prbht-00004q-LO for bug-gnu-emacs@gnu.org; Wed, 26 Apr 2023 05:45:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Apr 2023 09:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63084 X-GNU-PR-Package: emacs Original-Received: via spool by 63084-submit@debbugs.gnu.org id=B63084.168250227832719 (code B ref 63084); Wed, 26 Apr 2023 09:45:01 +0000 Original-Received: (at 63084) by debbugs.gnu.org; 26 Apr 2023 09:44:38 +0000 Original-Received: from localhost ([127.0.0.1]:54296 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prbhW-0008Vf-Ho for submit@debbugs.gnu.org; Wed, 26 Apr 2023 05:44:38 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:38370) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prbhS-0008VN-FE for 63084@debbugs.gnu.org; Wed, 26 Apr 2023 05:44:37 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1prbhM-0001Fh-Tp; Wed, 26 Apr 2023 05:44:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=CP/e9eewSM4oQI2w1wTQ5UZJogk7ujLyLc5n6u090/E=; b=rq2UvI+ZmW7Y HBlFHS/DkojQEQKRS+DWrUBvMjsroDJCbA359nFB9AwHMRDBZHldpUaRI8cCjdJ8a24SlOMNz0Oux CNtsBgyitZDsfriQknXtjxrcjCq5X3M45OUsByG6y2HLbYbFAjGrPJx08oCjzBw6VkXbbPBdM5KAu SD+uR//2+d8QKPgiVQLZm0UzUCfI1DFRkMRjKxWrgucMKnboFnzngLmqw7eEK7ZQtElLscZurMoac H6Iymty26JqzGCWCxIGv/SFqHHoNZx3pUHKgXER8bwBBOdI1tJVTSOycZtV0J8VG6Zvbw8u+vN2Z0 tVwWnZ+OjmkOwaG7nnshUg==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1prbgu-0000GC-8t; Wed, 26 Apr 2023 05:44:27 -0400 In-Reply-To: (message from TatriX on Wed, 26 Apr 2023 10:48:53 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:260658 Archived-At: > From: TatriX > Date: Wed, 26 Apr 2023 10:48:53 +0200 > Cc: 63084@debbugs.gnu.org > > Oh, sorry. I tried on a different machine, and realized one have to use "run&". > > So, here's what I did: > > $ cat main.c > #include > #include > > int main(void) { > for (int i = 0; ; i++) { > printf("%d\n", i); > sleep(1); > } > } > > $ gcc -g -o break main.c > $ emacs -Q main.c > M-x gdb RET > # in *gud-break*, NOTE it's "run&" > (gdb) run& > # in main.c > (goto-line 6) > (gud-break 1) ; or C-x C-a C-b > # nothing happens > M-: (gud-call "break 6") RET > # breakpoint is set and process execution is paused on hitting that breakpoint What is the value of gdb-running and of gdb-non-stop after you "run&" the program?