Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Vladimir Prus <vladimir@codesourcery.com>
To: Jim Blandy <jimb@codesourcery.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] Don't reset watchpoint block on solib load.
Date: Thu, 29 Nov 2007 18:45:00 -0000	[thread overview]
Message-ID: <200711292145.17396.vladimir@codesourcery.com> (raw)
In-Reply-To: <m3prxskiat.fsf@codesourcery.com>

On Thursday 29 November 2007 21:39:22 you wrote:
> 
> Vladimir Prus <vladimir at codesourcery.com> writes:
> > On Wednesday 28 November 2007 02:00:15 Jim Blandy wrote:
> >
> >> We also call breakpoint_re_set_one when we've unloaded a shared
> >> library.  
> >
> > Can you point me at a codepath that would cause breakpoint_re_set_one
> > to be called when a shared library is *unloaded*? I've poked at
> > this for a while, and can't see it.
> 
> I beg your pardon.  It does not.  

Excellent, at least I did not miss anything.

> This is a pretty serious bug.  A 
> dlclose will call free_objfile:
> 
> handle_inferior_event
> -> solib_add
>    -> update_solib_list
>       -> free_objfile
> 
> but it takes no steps to clear references to the freed shared
> library's symbols.  I had assumed that it must be calling
> clear_symtab_users.  We need to call clear_symtab_users whenever any
> objfile is freed.
> 
> Now, where to do this...

The precedent now is varobj_invalidate, called from clear_symbtab_users.
The other precedent is preserve_values, called from free_objfile.

I actually have a patch in works, that would make free_objfile call a function
in breakpoints.c that will handle breakpoint referring to the unloaded solib.
But I'd rather not mix this thing into an already big and scary patch ;-)

- Volodya





      reply	other threads:[~2007-11-29 18:45 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-20 17:14 Vladimir Prus
2007-11-27 23:00 ` Jim Blandy
2007-11-28 15:59   ` Vladimir Prus
2007-11-28 16:23     ` Vladimir Prus
2007-11-28 19:46     ` Jim Blandy
2007-11-28 20:04       ` Vladimir Prus
2007-11-28 22:37         ` Jim Blandy
2007-11-29  6:09           ` Vladimir Prus
2007-11-28 22:50         ` Jim Blandy
2007-11-28 22:18     ` Jim Blandy
2007-11-29  4:24       ` Eli Zaretskii
2007-11-29  7:04         ` Vladimir Prus
2007-11-29 18:54           ` Jim Blandy
2007-11-29 19:03             ` Variable identification (Was: [RFA] Don't reset watchpoint block on solib load.) Vladimir Prus
2007-11-30  1:22               ` Michael Snyder
2007-11-30  5:52                 ` Vladimir Prus
2007-11-30 20:53                 ` Eli Zaretskii
2007-12-01  1:39                 ` Variable identification Jim Blandy
2007-12-01  1:47                   ` Michael Snyder
2008-01-16  1:29     ` [RFA] Don't reset watchpoint block on solib load Jim Blandy
2008-01-23  9:58       ` Vladimir Prus
2008-01-29 15:23         ` Daniel Jacobowitz
2007-11-29  6:55   ` Vladimir Prus
2007-11-29 18:40     ` Jim Blandy
2007-11-29 18:45       ` Vladimir Prus [this message]

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=200711292145.17396.vladimir@codesourcery.com \
    --to=vladimir@codesourcery.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jimb@codesourcery.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