* repeat command on return after issuing guile command @ 2017-04-29 3:50 David Boles 2017-04-30 19:04 ` Eli Zaretskii 0 siblings, 1 reply; 4+ messages in thread From: David Boles @ 2017-04-29 3:50 UTC (permalink / raw) To: gdb I have recently been learning to use the guile mechanism for extending gdb’s capabilities - very powerful. One thing that I have noticed is that after a “guile (…)” command is issued, the normal behavior of gdb re-performing the last command executed if you just hit enter is disabled. This applies to even native gdb commands like “next” or “step” - which is quite painful. I have observed this with versions 7.10.x and 7.12.1. Any insights would be appreciated. Thx, - db ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: repeat command on return after issuing guile command 2017-04-29 3:50 repeat command on return after issuing guile command David Boles @ 2017-04-30 19:04 ` Eli Zaretskii 2017-05-01 11:20 ` Matt Rice 0 siblings, 1 reply; 4+ messages in thread From: Eli Zaretskii @ 2017-04-30 19:04 UTC (permalink / raw) To: David Boles; +Cc: gdb > From: David Boles <boles@ieee.org> > Date: Fri, 28 Apr 2017 22:50:18 -0500 > > I have recently been learning to use the guile mechanism for extending gdbâs capabilities - very powerful. One thing that I have noticed is that after a âguile (â¦)â command is issued, the normal behavior of gdb re-performing the last command executed if you just hit enter is disabled. This applies to even native gdb commands like ânextâ or âstepâ - which is quite painful. > > I have observed this with versions 7.10.x and 7.12.1. I cannot reproduce this with GDB 7.12 built with Guile 2.0.X. I tried this: (gdb) apropos file ... long list of commands ... (gdb) <press RET> ... the same long list of commands ... (gdb) guile (display (+ 20 3)) (newline) 23 (gdb) apropos file ... long list of commands ... (gdb) <press RET> ... the same long list of commands ... So it seems to work as expected for me. Can you show a recipe that exhibits the problem on your system? ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: repeat command on return after issuing guile command 2017-04-30 19:04 ` Eli Zaretskii @ 2017-05-01 11:20 ` Matt Rice 2017-05-01 16:37 ` David Boles 0 siblings, 1 reply; 4+ messages in thread From: Matt Rice @ 2017-05-01 11:20 UTC (permalink / raw) To: Eli Zaretskii; +Cc: David Boles, GDB On Sun, Apr 30, 2017 at 12:03 PM, Eli Zaretskii <eliz@gnu.org> wrote: >> From: David Boles <boles@ieee.org> >> Date: Fri, 28 Apr 2017 22:50:18 -0500 >> >> I have recently been learning to use the guile mechanism for extending gdb’s capabilities - very powerful. One thing that I have noticed is that after a “guile (…)” command is issued, the normal behavior of gdb re-performing the last command executed if you just hit enter is disabled. This applies to even native gdb commands like “next” or “step” - which is quite painful. >> >> I have observed this with versions 7.10.x and 7.12.1. > > I cannot reproduce this with GDB 7.12 built with Guile 2.0.X. I tried > this: > > (gdb) apropos file > ... long list of commands ... > (gdb) <press RET> > ... the same long list of commands ... > (gdb) guile (display (+ 20 3)) (newline) > 23 > (gdb) apropos file > ... long list of commands ... > (gdb) <press RET> > ... the same long list of commands ... > > So it seems to work as expected for me. Can you show a recipe that > exhibits the problem on your system? One thing that I can think of is if the guile script being executed causes the program to continue, which then hits a breakpoint which has "commands" associated with it, the call to prevent_dont_repeat in breakpoint.c (bpstat_do_actions_1), could have some clobbering effect messes with the repeat. I cannot seem reproduce such behavior though using the following foo.gdb: set breakpoint pending on break foo commands 1 print "foo" end guile (use-modules (gdb)) guile (execute "start") guile (execute "cont") $ echo "void foo() {}; int main() { while (1) foo(); return 0; }" | gcc -g -x c - && gdb -quiet ./a.out -ex 'source foo.gdb' Reading symbols from ./a.out...done. Breakpoint 1 at 0x4004aa: file <stdin>, line 1. Breakpoint 1, foo () at <stdin>:1 1 in <stdin> $1 = "foo" (gdb) guile (execute "cont") Breakpoint 1, foo () at <stdin>:1 1 in <stdin> $2 = "foo" (gdb) Breakpoint 1, foo () at <stdin>:1 1 in <stdin> $3 = "foo" (gdb) ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: repeat command on return after issuing guile command 2017-05-01 11:20 ` Matt Rice @ 2017-05-01 16:37 ` David Boles 0 siblings, 0 replies; 4+ messages in thread From: David Boles @ 2017-05-01 16:37 UTC (permalink / raw) To: Matt Rice, Eli Zaretskii; +Cc: GDB My apologies - I never run gdb outside of Emacs and made the assumption that an interaction between the gdb-mi.el code, guile, and command repeating wasn't plausible. The problem indeed does not occur with gdb itself, only when run from within emacs. I will go and investigate things from the Emacs side of things and try to develop a patch for this behavior. Thanks for setting me straight. - db On Mon, May 1, 2017, at 06:20 AM, Matt Rice wrote: > On Sun, Apr 30, 2017 at 12:03 PM, Eli Zaretskii <eliz@gnu.org> wrote: > >> From: David Boles <boles@ieee.org> > >> Date: Fri, 28 Apr 2017 22:50:18 -0500 > >> > >> I have recently been learning to use the guile mechanism for extending gdb’s capabilities - very powerful. One thing that I have noticed is that after a “guile (…)” command is issued, the normal behavior of gdb re-performing the last command executed if you just hit enter is disabled. This applies to even native gdb commands like “next” or “step” - which is quite painful. > >> > >> I have observed this with versions 7.10.x and 7.12.1. > > > > I cannot reproduce this with GDB 7.12 built with Guile 2.0.X. I tried > > this: > > > > (gdb) apropos file > > ... long list of commands ... > > (gdb) <press RET> > > ... the same long list of commands ... > > (gdb) guile (display (+ 20 3)) (newline) > > 23 > > (gdb) apropos file > > ... long list of commands ... > > (gdb) <press RET> > > ... the same long list of commands ... > > > > So it seems to work as expected for me. Can you show a recipe that > > exhibits the problem on your system? > > One thing that I can think of is if the guile script being executed > causes the program to continue, > which then hits a breakpoint which has "commands" associated with it, > the call to prevent_dont_repeat in > breakpoint.c (bpstat_do_actions_1), could have some clobbering effect > messes with the repeat. > > I cannot seem reproduce such behavior though > > using the following foo.gdb: > set breakpoint pending on > break foo > commands 1 > print "foo" > end > guile (use-modules (gdb)) > guile (execute "start") > guile (execute "cont") > > $ echo "void foo() {}; int main() { while (1) foo(); return 0; }" | > gcc -g -x c - && gdb -quiet ./a.out -ex 'source foo.gdb' > Reading symbols from ./a.out...done. > Breakpoint 1 at 0x4004aa: file <stdin>, line 1. > Breakpoint 1, foo () at <stdin>:1 > 1 in <stdin> > $1 = "foo" > (gdb) guile (execute "cont") > Breakpoint 1, foo () at <stdin>:1 > 1 in <stdin> > $2 = "foo" > (gdb) > Breakpoint 1, foo () at <stdin>:1 > 1 in <stdin> > $3 = "foo" > (gdb) ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-05-01 16:37 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-04-29 3:50 repeat command on return after issuing guile command David Boles 2017-04-30 19:04 ` Eli Zaretskii 2017-05-01 11:20 ` Matt Rice 2017-05-01 16:37 ` David Boles
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox