|
|
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.
|
|
|
f56d3db |
|
|
|
f56d3db |
*** ./gdb/solib-svr4.c.dist Fri Oct 22 11:50:31 2004
|
|
|
f56d3db |
--- ./gdb/solib-svr4.c Fri Oct 22 11:53:19 2004
|
|
|
f56d3db |
***************
|
|
|
f56d3db |
*** 86,102 ****
|
|
|
f56d3db |
"_dl_debug_state",
|
|
|
f56d3db |
"rtld_db_dlactivity",
|
|
|
f56d3db |
"_rtld_debug_state",
|
|
|
f56d3db |
-
|
|
|
f56d3db |
- /* On the 64-bit PowerPC, the linker symbol with the same name as
|
|
|
f56d3db |
- the C function points to a function descriptor, not to the entry
|
|
|
f56d3db |
- point. The linker symbol whose name is the C function name
|
|
|
f56d3db |
- prefixed with a '.' points to the function's entry point. So
|
|
|
f56d3db |
- when we look through this table, we ignore symbols that point
|
|
|
f56d3db |
- into the data section (thus skipping the descriptor's symbol),
|
|
|
f56d3db |
- and eventually try this one, giving us the real entry point
|
|
|
f56d3db |
- address. */
|
|
|
f56d3db |
- "._dl_debug_state",
|
|
|
f56d3db |
-
|
|
|
f56d3db |
NULL
|
|
|
f56d3db |
};
|
|
|
f56d3db |
|
|
|
f56d3db |
--- 86,91 ----
|
|
|
f56d3db |
***************
|
|
|
f56d3db |
*** 1284,1301 ****
|
|
|
f56d3db |
/* Now try to set a breakpoint in the dynamic linker. */
|
|
|
f56d3db |
for (bkpt_namep = solib_break_names; *bkpt_namep != NULL; bkpt_namep++)
|
|
|
f56d3db |
{
|
|
|
f56d3db |
! /* On ABI's that use function descriptors, there are usually
|
|
|
f56d3db |
! two linker symbols associated with each C function: one
|
|
|
f56d3db |
! pointing at the actual entry point of the machine code,
|
|
|
f56d3db |
! and one pointing at the function's descriptor. The
|
|
|
f56d3db |
! latter symbol has the same name as the C function.
|
|
|
f56d3db |
!
|
|
|
f56d3db |
! What we're looking for here is the machine code entry
|
|
|
f56d3db |
! point, so we are only interested in symbols in code
|
|
|
f56d3db |
! sections. */
|
|
|
f56d3db |
! sym_addr = bfd_lookup_symbol (tmp_bfd, *bkpt_namep, SEC_CODE);
|
|
|
f56d3db |
if (sym_addr != 0)
|
|
|
f56d3db |
! break;
|
|
|
f56d3db |
}
|
|
|
f56d3db |
|
|
|
f56d3db |
/* We're done with both the temporary bfd and target. Remember,
|
|
|
f56d3db |
--- 1273,1289 ----
|
|
|
f56d3db |
/* Now try to set a breakpoint in the dynamic linker. */
|
|
|
f56d3db |
for (bkpt_namep = solib_break_names; *bkpt_namep != NULL; bkpt_namep++)
|
|
|
f56d3db |
{
|
|
|
f56d3db |
! sym_addr = bfd_lookup_symbol (tmp_bfd, *bkpt_namep, 0);
|
|
|
f56d3db |
if (sym_addr != 0)
|
|
|
f56d3db |
! {
|
|
|
f56d3db |
! /* The symbol might be a descriptor, convert to into the
|
|
|
f56d3db |
! corresponding code address. */
|
|
|
f56d3db |
! sym_addr = gdbarch_convert_from_func_ptr_addr (current_gdbarch,
|
|
|
f56d3db |
! sym_addr,
|
|
|
f56d3db |
! tmp_bfd_target);
|
|
|
f56d3db |
! if (sym_addr != 0)
|
|
|
f56d3db |
! break;
|
|
|
f56d3db |
! }
|
|
|
f56d3db |
}
|
|
|
f56d3db |
|
|
|
f56d3db |
/* We're done with both the temporary bfd and target. Remember,
|