From: Sergio Durigan Junior <sergiodj@redhat.com>
To: Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
Cc: "Tiago Stürmer Daitx" <tdaitx@linux.vnet.ibm.com>,
"GDB Development" <gdb@sourceware.org>
Subject: Re: Get longjmp target check in breakpoint.c - is it necessary?
Date: Thu, 31 Oct 2013 14:46:00 -0000 [thread overview]
Message-ID: <m3wqktwlaj.fsf@redhat.com> (raw)
In-Reply-To: <52725AB4.5080002@linux.vnet.ibm.com> (Edjunior Barbosa Machado's message of "Thu, 31 Oct 2013 11:27:16 -0200")
On Thursday, October 31 2013, Edjunior Barbosa Machado wrote:
> Hi Tiago,
Hey :-)
> 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)?
Edjunior is right, Tiago. This is a bug, actually. This check should
be moved to the place Edjunior mentioned. Could you post a patch to fix
that?
Thanks a lot for looking into this :-).
--
Sergio
next prev parent reply other threads:[~2013-10-31 14:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-31 2:36 Tiago Stürmer Daitx
2013-10-31 13:27 ` Edjunior Barbosa Machado
2013-10-31 14:46 ` Sergio Durigan Junior [this message]
2013-10-31 14:46 ` Tiago Stürmer Daitx
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3wqktwlaj.fsf@redhat.com \
--to=sergiodj@redhat.com \
--cc=emachado@linux.vnet.ibm.com \
--cc=gdb@sourceware.org \
--cc=tdaitx@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox