This is the mail archive of the gdb-patches@sourceware.cygnus.com 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]

Re: A revised patch for dlclose


On Wed, Mar 08, 2000 at 01:58:42AM +0100, Mark Kettenis wrote:
>    Date: Tue, 7 Mar 2000 12:08:00 -0800
>    From: "H . J . Lu" <hjl@valinux.com>
> 
>    Here is a revised patch for dlclose. If you take a look at the
>    dynamic linker in glibc 2.1 or above, you will find that it informs
>    gdb about loading/unloading a shared library via an internal debug
>    function, _dl_debug_state (). gdb already handles the loading in
>    handle_inferior_event () with BPSTAT_WHAT_CHECK_SHLIBS and
>    BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK. However, we need also
>    check the unloading event. solib_verify () will be called only when the
>    dynamic linker calls _dl_debug_state (). It shouldn't introduce any
>    overhead. I believe it is on the right track although it may be further
>    optimized.
> 
> HJ, please stop wasting your time pushing this patch.  The patch has
> several bad points, that you cannot fix without considerable changes
> to the way solib.c handles and caches the link map.

I just pointed out gdb needed to check the unloaded DSOs when handling
the BPSTAT_WHAT_CHECK_SHLIBS and BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK
events. It is a serious bug to me and it should be fixed in 5.0. I
don't care how it is fixed.


H.J.

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