This is the mail archive of the gdb@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: Get longjmp target check in breakpoint.c - is it necessary?


Hi Tiago,

On 10/31/2013 12:36 AM, Tiago StÃrmer Daitx wrote:
> We have in gdb/breakpoint.c the following condition checking:
> 
>  3222       if (!gdbarch_get_longjmp_target_p (gdbarch))Â
>  3223 Â       continue;Â
> 
> Which is forcing me to implement an (unnecessary?) arch specific
> get_longjmp_target while having a longjmp user probe in glibc should be
> enough. Removing that if/continue statement showed no regressions - it
> actually fixed 3 longjmp failures (assuming proper support in glibc for
> a longjmp probe is in place). 

If I understood correctly, there are different longjmps symbols search
strategies on this create_longjmp_master_breakpoint() function: the
recent libc probe search and the per-objfile cache lookup.

It seems this 'if' works like an optimization to avoid searching for
symbols if the arch didn't provide support for get_longjmp_target().
However, <arch>_get_longjmp_target() function became unnecessary in
targets that provide libc probe support, as you noticed with the
addition of probes on ppc64 glibc.

What if you try to move this 'if' to a bit below in the function (right
before "for (i = 0; i < NUM_LONGJMP_NAMES; i++)" loop)?

Thanks and regards,
-- 
Edjunior


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