This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] create_internal_breakpoint: Apply gdbarch_skip_entrypoint.


Doug Evans worte:

> This is important because the toolchain will optimize intra-module calls
> to skip the first two instructions that set up the TOC register.
> And since gdb currently doesn't to "entry point skipping" for internal
> breakpoints things work (in particular shlib event breakpoints).

Huh.  Yes, that's clearly a bug.

> This patch fixes things by applying entry point skipping to
> internal breakpoints.  Is this the best place to apply entry point
> skipping for internal breakpoints?

I think this is fine.  (The alternative would be push it up into the
callers, which would have the advantage that you could do it only
for those callers that get the address from a symbol, and not those
that e.g. get it from a probe.  However, since gdbarch_skip_entrypoint
is safe even if the address is not equal to a symbol address, it's
probably preferable to just do the skipping in one place.)

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]