From: Paul Pluzhnikov <ppluzhnikov@google.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: tromey@redhat.com, Pedro Alves <pedro@codesourcery.com>,
gdb-patches@sourceware.org
Subject: Re: [patch] Fix a crash when displaying variables from shared library.
Date: Fri, 20 Mar 2009 20:53:00 -0000 [thread overview]
Message-ID: <8ac60eac0903201332k255f608ey1e963d9804845949@mail.gmail.com> (raw)
In-Reply-To: <20090320195412.GF12530@adacore.com>
On Fri, Mar 20, 2009 at 12:54 PM, Joel Brobecker <brobecker@adacore.com> wrote:
>> 2009-03-11 Paul Pluzhnikov <ppluzhnikov@google.com>
>>
>> * breakpoint.c (disable_breakpoints_in_shlibs): Use
>> solib_contains_address_p instead of searching.
>
> Unfortunately, we can't apply this patch just yet, because of:
>
>> -#ifdef PC_SOLIB
>> - char *so_name = PC_SOLIB (loc->address);
>> -#else
But I think we can. After the patch, we don't care about so_name, except
to print the warning, and we have it readily available in solib->so_name.
> Also, I have a couple of questions:
>
>> - && !loc->shlib_disabled
>> + && !loc->shlib_disabled
>
> I can't figure out what the change was in this case. The lines
> look completely identical. I suspect a change in white-spaces,
> but I couldn't see any.
There is a white-space diff, and a bogus one at that:
"cat -T gdb-rename-solib-20090309.txt" shows:
-^I&& !loc->shlib_disabled
+ ^I&& !loc->shlib_disabled
Sorry about that.
>> - && !loc->shlib_disabled)
>> + && !loc->shlib_disabled
>> + && (b->type == bp_breakpoint || b->type == bp_hardware_breakpoint)
>> + && solib_contains_address_p (solib, loc->address))
>
> I am wondering why you are checking the breakpoint type in addition
> to the location type.
Because if I don't, then a warning is issued when b->type == bp_shlib_event
and ld-linux-x86-64.so.2 is unloaded.
> In particular, I'm trying to figure out whether
> it's possible to have a b->type that's not a breakpoint if loc->type
> is a breakpoint.
Yes, for b->type == bp_shlib_event.
> Also, we weren't making that check before, so what
> did you see that made it you do it now?
That is exactly what I am trying to say: the current code works (as in,
does not issue a warning) "by accident": we remove ld-linux... from the
so_list_head, *then* run observer notification. Observer searches the list
for "so" containing the bp_shlib_event, and doesn't find it (we just removed
it from there!) and so remains silent. Reverse these lines in clear_solib:
observer_notify_solib_unloaded (so);
so_list_head = so->next;
and current code will start issuing the warning as well.
--
Paul Pluzhnikov
next prev parent reply other threads:[~2009-03-20 20:32 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-05 3:03 Paul Pluzhnikov
2009-02-06 21:38 ` Tom Tromey
2009-02-07 2:37 ` Paul Pluzhnikov
2009-02-11 1:46 ` Tom Tromey
2009-02-19 1:00 ` Paul Pluzhnikov
2009-02-19 7:52 ` Paul Pluzhnikov
2009-02-23 1:47 ` Joel Brobecker
2009-02-23 18:36 ` Paul Pluzhnikov
2009-03-03 2:31 ` Paul Pluzhnikov
2009-03-04 0:51 ` Tom Tromey
2009-03-04 19:26 ` Paul Pluzhnikov
2009-03-05 20:04 ` Joel Brobecker
2009-03-05 23:46 ` Paul Pluzhnikov
2009-03-06 3:06 ` Paul Pluzhnikov
2009-03-06 3:18 ` Paul Pluzhnikov
2009-03-06 17:48 ` Joel Brobecker
2009-03-06 18:31 ` Paul Pluzhnikov
2009-03-06 18:47 ` Joel Brobecker
2009-03-06 18:52 ` Paul Pluzhnikov
2009-03-06 22:06 ` Paul Pluzhnikov
2009-03-09 18:33 ` Joel Brobecker
2009-03-10 2:05 ` Paul Pluzhnikov
2009-03-10 14:31 ` Daniel Jacobowitz
2009-03-12 2:45 ` Paul Pluzhnikov
2009-03-20 20:32 ` Joel Brobecker
2009-03-20 20:53 ` Paul Pluzhnikov [this message]
2009-03-23 17:31 ` Joel Brobecker
2009-03-18 2:50 ` Pedro Alves
2009-03-18 3:24 ` [patch] Fix a crash when displaying variables from shared ?library Joel Brobecker
2009-03-18 4:06 ` Paul Pluzhnikov
2009-03-18 4:19 ` Pedro Alves
2009-03-18 6:54 ` Paul Pluzhnikov
2009-03-18 17:32 ` Pedro Alves
2009-02-06 21:53 ` [patch] Fix a crash when displaying variables from shared library Pedro Alves
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=8ac60eac0903201332k255f608ey1e963d9804845949@mail.gmail.com \
--to=ppluzhnikov@google.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=pedro@codesourcery.com \
--cc=tromey@redhat.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