This is the mail archive of the gdb-patches@sources.redhat.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] |
Other format: | [Raw text] |
Hello,
For PPC64 every function has two minimal symbols vis:
.__nptl_create_event: the start address __nptl_create_event: the descriptor
This patch modifies ps_pglobal_lookup so that it always returns the function's start address. Doing this ensures that libthread_db and GDB's thread code are "on the same page" when it comes to the true address of the thread-create and thread-death breakpoints.
The alternative would be to modify libthread_db so that it knew that PPC64 symbol were special but I suspect that it doesn't want to know about such underlying details.
ok for mainline?
------------------------------------------------------------------------
2003-11-25 Andrew Cagney <cagney@redhat.com>
* proc-service.c (ps_pglobal_lookup): Convert function descriptors into code addresses using gdbarch_convert_from_func_ptr_addr.
Index: ./gdb/proc-service.c
===================================================================
RCS file: /cvs/src/src/gdb/proc-service.c,v
retrieving revision 1.7
diff -u -r1.7 proc-service.c
--- ./gdb/proc-service.c 24 Feb 2002 22:31:19 -0000 1.7
+++ ./gdb/proc-service.c 25 Nov 2003 20:59:49 -0000
@@ -181,7 +181,13 @@
if (ms == NULL)
return PS_NOSYM;
- *sym_addr = SYMBOL_VALUE_ADDRESS (ms);
+ /* Get the addres, make certain that any descriptors are converted
+ into corresponding code addresses. (For PPC64, the symbol
+ "__nptl_create_event" points at a function descriptor while this
+ code needs the corresponding function's start address.) */
+ *sym_addr = gdbarch_convert_from_func_ptr_addr (current_gdbarch,
+ SYMBOL_VALUE_ADDRESS (ms),
+ ¤t_target);
return PS_OK;
}
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |