This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
multi-arch and CALL_DUMMY_BREAKPOINT_OFFSET
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: gdb at sources dot redhat dot com
- Cc: Richard dot Earnshaw at arm dot com
- Date: Fri, 08 Feb 2002 11:34:49 +0000
- Subject: multi-arch and CALL_DUMMY_BREAKPOINT_OFFSET
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
I guess I'm going to find several things like this...
Well it appears that in a multi-arch gdb (even at level 1),
CALL_DUMMY_BREAKPOINT_OFFSET can only be a constant for any particular
architecture. This is a problem, because on the ARM it is currently a
function that returns one of two values depending on whether the
call-dummy stub has to be ARM code or Thumb code. Note that both types of
code can exist within a single application and it is not always safe to
assume that every function is interworking safe.
I guess I could re-write the whole of the call-dummy stuff so that
appropriate breakpoints are built in, but that is certainly going to be
non-trivial.
Any suggestions? Can I diddle with the gdbarch setting dynamically -- eg
by calling gdbarch_set_call_dummy_breakpoint_offset() from within
arm_fix_call_dummy()? It's quite gross, but it might work.
Long term it would probably be better to rewrite the call-dummy handling
to remove the covert variable that is used to communicate between the
various call-dummy stubs, but I'd rather not do that now.
R.