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]

ELF shared library breakpoints


The bug-gdb archive contains at least two bug reports about
breakpoints in shared libraries (one for Linux and one for Solaris).
The reported problem is that if you set a breakpoint in a program when
you're running it, and then rerun the program, it complains about not
being able to set the breakpoint in the shared library because the
memory is inaccessable.  Well, the same problem occurs on the Hurd.

It looks as if the following patch solves the problem.  It is
basically the thing as the Irix 5 (irix5-nat.c) and OSF (osfsolib.c)
ports do.

Mark


1999-05-20  Mark Kettenis  <kettenis@gnu.org>

	* solib.c (clear_solib): Call `disable_breakpoints_in_shlibs'.


Index: gdb/gdb/solib.c
===================================================================
RCS file: /var/cvsroot/gdb/gdb/solib.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 solib.c
--- solib.c	1999/04/26 18:45:16	1.1.1.2
+++ solib.c	1999/05/19 22:01:47
@@ -1311,6 +1311,8 @@
   struct so_list *next;
   char *bfd_filename;
 
+  disable_breakpoints_in_shlibs (1);
+
   while (so_list_head)
     {
       if (so_list_head -> sections)

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