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: [RFA] Don't reset watchpoint block on solib load.


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.  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...


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