GNU bug report logs -
#63084
30.0.50; gud: set breakpoint while program is running
Previous Next
Reported by: tatrics <at> gmail.com
Date: Wed, 26 Apr 2023 03:56:03 UTC
Severity: normal
Merged with 64186
Found in version 30.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
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 <stdio.h>
#include <unistd.h>
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
Hope that's more clear now!
On Wed, Apr 26, 2023 at 8:10 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
> > From: tatrics <at> 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.
>
[Message part 2 (text/html, inline)]
This bug report was last modified 1 year and 316 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.