From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: TatriX Newsgroups: gmane.emacs.bugs Subject: bug#63084: 30.0.50; gud: set breakpoint while program is running Date: Wed, 26 Apr 2023 10:48:53 +0200 Message-ID: References: <874jp3n52b.fsf@home.mail-host-address-is-not-set> <838refuqa8.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000006240b105fa394f98" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6003"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63084@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 26 10:50:32 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 1prar9-0001Kv-HH for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 26 Apr 2023 10:50:31 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1praqk-0007z0-2k; Wed, 26 Apr 2023 04:50:06 -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 1praqi-0007uW-7R for bug-gnu-emacs@gnu.org; Wed, 26 Apr 2023 04:50:04 -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 1praqh-0007lg-Fm for bug-gnu-emacs@gnu.org; Wed, 26 Apr 2023 04:50:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1praqg-0006xv-7u for bug-gnu-emacs@gnu.org; Wed, 26 Apr 2023 04:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: TatriX Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Apr 2023 08:50:02 +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.168249894526690 (code B ref 63084); Wed, 26 Apr 2023 08:50:02 +0000 Original-Received: (at 63084) by debbugs.gnu.org; 26 Apr 2023 08:49:05 +0000 Original-Received: from localhost ([127.0.0.1]:54206 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prapl-0006wQ-Ba for submit@debbugs.gnu.org; Wed, 26 Apr 2023 04:49:05 -0400 Original-Received: from mail-pj1-f43.google.com ([209.85.216.43]:58369) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1praph-0006vu-I7 for 63084@debbugs.gnu.org; Wed, 26 Apr 2023 04:49:03 -0400 Original-Received: by mail-pj1-f43.google.com with SMTP id 98e67ed59e1d1-24781e23c27so6120988a91.0 for <63084@debbugs.gnu.org>; Wed, 26 Apr 2023 01:49:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682498935; x=1685090935; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=wnXhw6np7vhipbTAAUjbAxX638gup7Wrhf8Fddl1N0I=; b=BUZ+UfcKWMC8RDu34yb5jkp4NgvepPIQdgpFS7bCyL+BPWc+EvSwFqPlX/2j+dkPca ldljWC5G9RBtwUmFtuQVNo+eDlmkfgAWfrG6TcxHX33Ho9tKn6d9ByYx/04PRqEogfaO UCQ1mnyJ/X3ocAg5LLZFVt/WD2Lgl6dC8K5KpbH2E4wcVFpmZKkZgxAMKSnJI85dbIaT MUhtJc3eHXS/NnSk0nORdLUZEsxyqPs7mqo9WI5cSXOik4PMEtP2UEWZykBrJwGg1FiE vHmWe1hHzfCGo6cQMmtMzbcXJJe2mZepBxc4v6V6lAzw5QYbTQMqdz+wIz27K3D8X2ep d2lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682498935; x=1685090935; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wnXhw6np7vhipbTAAUjbAxX638gup7Wrhf8Fddl1N0I=; b=eET4ya1NtiuvRa5arg0cNCYad5Sz5QpzmHOTMjcYkUBRln+rrGqT5qliKdDk/pTiof gzvLDCIk/7Tfh6THh/94yqObCvcW0JLiTfENvBQUtvbe0Fsbk33JuTA2tDLFGe07vKJC RNAID744Q/pn9sikuwypK1+VXz07nZc/i0UjOhBrvOwel73wCyGqY1yrtdmj8zPY7Bj3 BZowUntkn2O03H772a/iCY0LOndbpBjiVowQkH/YlvCclt8JFdZazNzHSJt+XrcVXZFH h4lkuHdTUuG1ETDzHkBqGO9EnmP9Ms4t0ureh9UqXRNClAfapjHeLjNnV7qfKLCUbfSN Ul/w== X-Gm-Message-State: AAQBX9cP6s8/I7Ex4R5TWwzZcPRBgBc5NZz4tPgdjYvV69cDu8WS1eO9 ees2uQEfAAGcaSx0LgJA9nV0ClVjd81m7UMMbvGOAaItEcM= X-Google-Smtp-Source: AKy350ZaRJDulO06pNcFZpSNzzjfFhM3tJrXcg3WJB1F8Pqrnrsg91oyqulySNPpDCus2XP8rXBBfaDiIBFNiwTbXSg= X-Received: by 2002:a17:90a:688e:b0:22b:b832:d32 with SMTP id a14-20020a17090a688e00b0022bb8320d32mr18882331pjd.9.1682498935471; Wed, 26 Apr 2023 01:48:55 -0700 (PDT) In-Reply-To: <838refuqa8.fsf@gnu.org> 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:260653 Archived-At: --0000000000006240b105fa394f98 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 =3D 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 Hope that's more clear now! On Wed, Apr 26, 2023 at 8:10=E2=80=AFAM Eli Zaretskii wrote: > > From: tatrics@gmail.com > > Date: Tue, 25 Apr 2023 21:18:52 +0200 > > > > When I try to set a breakpoint with > > "C-x C-a C-b" or (gud-break 1) > > it doesn't seem to work. > > I cannot reproduce this: "C-x C-a C-b" does work for me. Please > describe the recipe for reproducing the problem completely, starting > from "emacs -Q" and including all the commands you need to type/invoke > to reproduce the issue. > > Thanks. > --0000000000006240b105fa394f98 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Oh, sorry. I tried on a different machine, and realiz= ed one have to use "run&".

So, here&= #39;s what I did:

$ cat main.c
=C2=A0 =C2= =A0 #include <stdio.h>
=C2=A0 =C2=A0 #include <unistd.h>
=
=C2=A0 =C2=A0 int main(void) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 for (int = i =3D 0; ; i++) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 printf("= ;%d\n", i);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sleep(1);
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 }
=C2=A0 =C2=A0 }

$ gcc -g= -o break main.c
$ emacs -Q main.c
M-x gdb RET<= br>
# in *gud-break*, NOTE it's "run&"
(gdb) run&
# in main.c
(goto-line 6)<= /div>
(gud-break 1) ; or C-x C-a C-b
# nothing happens
M-: (gud-call "break 6") RET
# breakpoi= nt is set and process execution is paused on hitting that breakpoint
Hope that's more clear now!

On Wed, Apr 26, 2023= at 8:10=E2=80=AFAM Eli Zaretskii <eliz@= gnu.org> wrote:
> From: ta= trics@gmail.com
> Date: Tue, 25 Apr 2023 21:18:52 +0200
>
> When I try to set a breakpoint with
>=C2=A0 =C2=A0 =C2=A0"C-x C-a C-b" or (gud-break 1)
> it doesn't seem to work.

I cannot reproduce this: "C-x C-a C-b" does work for me.=C2=A0 Pl= ease
describe the recipe for reproducing the problem completely, starting
from "emacs -Q" and including all the commands you need to type/i= nvoke
to reproduce the issue.

Thanks.
--0000000000006240b105fa394f98--