Bug 10469

Summary: Regression: hook-continue no longer gets called by exec-continue
Product: gdb Reporter: Andreas Fritiofson <andreas.fritiofson>
Component: miAssignee: Not yet assigned to anyone <unassigned>
Status: UNCONFIRMED ---    
Severity: normal CC: gdb-prs
Priority: P2    
Version: 6.8   
Target Milestone: 6.8   
Host: i686-mingw32 Target: arm-none-eabi
Build: Last reconfirmed:

Description Andreas Fritiofson 2009-07-31 12:15:43 UTC
I have a few hooks in my .gdbinit to take care of target specific tweaks when
stopping/resuming. In particular, interrupts should be disabled when stepping,
but not when running:

define hook-stop
mon cortex_m3 maskisr on
end
define hook-continue
mon cortex_m3 maskisr off
end
define hook-until
mon cortex_m3 maskisr off
end

This worked great in gdb 6.7, even when gdb was controlled via the MI interface
(from eclipse). In 6.8 however, the continue hook has stopped working over the
MI interface. It still works from the CLI and other hooks, such as the above
hook-until, works even over MI ("run-to-line" correctly unmasks interupts in
eclipse, but "resume" doesn't).

I suspect the culprit is changing mi_cmd_exec_continue() (mi/mi-main.c) from
being a wrapper around "continue" to using libgdb. (
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/mi/mi-main.c.diff?r1=1.125&r2=1.126&cvsroot=src
)

Other commands such as exec-next are still wrappers and their hooks work, but
they have FIXME notices to switch to libgdb, so I fear they won't in the future.