[patch] Fix breakpoints in unloaded shared libraries

Jan Kratochvil jan.kratochvil@redhat.com
Tue Dec 22 19:45:00 GMT 2009

On Tue, 22 Dec 2009 19:49:44 +0100, Tom Tromey wrote:
> >>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
> Jan> breakpoints after:
> Jan> 	warning: Temporarily disabling breakpoints for ...
> Jan> are currently not handled correctly and GDB does even crash (with
> Jan> -lmcheck).
> Jan> 2009-10-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
> Jan> gdb/
> Jan> 	* breakpoint.c (bpstat_stop_status): Check BL->SHLIB_DISABLED.
> Jan> 	(print_breakpoint_location): New comment.  Check LOC->SHLIB_DISABLED.
> Jan> 	Check LOC validity before printing it.  Use LOC instead of B->LOC.
> Jan> 	Swap the if conditionals order.
> This is ok.  Thanks.

The original mail had also the second part:

# 2009-10-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
# gdb/testsuite/
#         * gdb.base/unload.c (main): Change the UNLOADSHR parameter to 1.
#         Replace the printf call of Y by provided "y-set-1" label.  New block
#         for the second shared library.
#         * gdb.base/unload.exp: Compile also the second library, call
#         gdb_load_shlibs also for it.  Use now gdb_breakpoint.
#         (single pending breakpoint info): Rename to ...
#         (pending breakpoint info before run): ... this extended test.
#         (libfile2, libname2, libsrcfile2, libsrc2)
#         (lib_sl2): New variables.
#         (exec_opts): Set also SHLIB_NAME2.
#         (pending breakpoint info on first run at shrfunc1)
#         (pending breakpoint info on second run at shrfunc1)
#         (pending breakpoint info on second run at shrfunc2)
#         (print y from libfile, print y from libfile2): New tests.
#         * gdb.base/unloadshr.c (shrfunc1): Change the returned value.
#         * gdb.base/unloadshr2.c: New.

Do I understand it correctly your approval is for the gdb/ part while the
gdb/testsuite/ part is still left pending for review some other day?

Thanks for the review,

More information about the Gdb-patches mailing list