keiths / rpms / gdb

Forked from rpms/gdb 6 days ago
Clone
f56d3db
2004-10-22  Andrew Cagney  <cagney@gnu.org>
f56d3db
 
f56d3db
 	* solib-svr4.c (enable_break): Convert a symbol descriptor into
f56d3db
 	the corresponding function entry point.
f56d3db
 	(solib_break_names): Delete "._dl_debug_state", no longer needed.
eb9d945
eb9d945
2007-10-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
eb9d945
eb9d945
	Port to GDB-6.7.
f56d3db
 	
eb9d945
Index: gdb-6.7/gdb/solib-svr4.c
eb9d945
===================================================================
eb9d945
--- gdb-6.7.orig/gdb/solib-svr4.c	2007-10-09 20:03:30.000000000 +0200
eb9d945
+++ gdb-6.7/gdb/solib-svr4.c	2007-10-12 22:34:03.000000000 +0200
eb9d945
@@ -1089,7 +1089,15 @@ enable_break (void)
eb9d945
 	{
eb9d945
 	  sym_addr = bfd_lookup_symbol (tmp_bfd, *bkpt_namep);
eb9d945
 	  if (sym_addr != 0)
eb9d945
-	    break;
eb9d945
+	    {
eb9d945
+	      /* The symbol might be a descriptor, convert to into the
eb9d945
+		 corresponding code address.  */
eb9d945
+	      sym_addr = gdbarch_convert_from_func_ptr_addr (current_gdbarch,
eb9d945
+							     sym_addr,
eb9d945
+							     tmp_bfd_target);
eb9d945
+	      if (sym_addr != 0)
eb9d945
+		break;
eb9d945
+	    }
eb9d945
 	}
eb9d945
 
eb9d945
       if (sym_addr != 0)