* gnu-v3-abi.c (gnuv3_skip_trampoline): Handle thunk
minimal symbols pointing to function descriptors.
This commit is contained in:
parent
f993f39ec9
commit
a513d1e8c0
|
@ -1,3 +1,8 @@
|
||||||
|
2013-06-05 Luis Machado <lgustavo@codesourcery.com>
|
||||||
|
|
||||||
|
* gnu-v3-abi.c (gnuv3_skip_trampoline): Handle thunk
|
||||||
|
minimal symbols pointing to function descriptors.
|
||||||
|
|
||||||
2013-06-05 Tom Tromey <tromey@redhat.com>
|
2013-06-05 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* python/py-utils.c (gdb_pymodule_addobject): Cast away const.
|
* python/py-utils.c (gdb_pymodule_addobject): Cast away const.
|
||||||
|
|
|
@ -1207,7 +1207,7 @@ gnuv3_get_type_from_type_info (struct value *type_info_ptr)
|
||||||
static CORE_ADDR
|
static CORE_ADDR
|
||||||
gnuv3_skip_trampoline (struct frame_info *frame, CORE_ADDR stop_pc)
|
gnuv3_skip_trampoline (struct frame_info *frame, CORE_ADDR stop_pc)
|
||||||
{
|
{
|
||||||
CORE_ADDR real_stop_pc, method_stop_pc;
|
CORE_ADDR real_stop_pc, method_stop_pc, func_addr;
|
||||||
struct gdbarch *gdbarch = get_frame_arch (frame);
|
struct gdbarch *gdbarch = get_frame_arch (frame);
|
||||||
struct minimal_symbol *thunk_sym, *fn_sym;
|
struct minimal_symbol *thunk_sym, *fn_sym;
|
||||||
struct obj_section *section;
|
struct obj_section *section;
|
||||||
|
@ -1236,6 +1236,16 @@ gnuv3_skip_trampoline (struct frame_info *frame, CORE_ADDR stop_pc)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
method_stop_pc = SYMBOL_VALUE_ADDRESS (fn_sym);
|
method_stop_pc = SYMBOL_VALUE_ADDRESS (fn_sym);
|
||||||
|
|
||||||
|
/* Some targets have minimal symbols pointing to function descriptors
|
||||||
|
(powerpc 64 for example). Make sure to retrieve the address
|
||||||
|
of the real function from the function descriptor before passing on
|
||||||
|
the address to other layers of GDB. */
|
||||||
|
func_addr = gdbarch_convert_from_func_ptr_addr (gdbarch, method_stop_pc,
|
||||||
|
¤t_target);
|
||||||
|
if (func_addr != 0)
|
||||||
|
method_stop_pc = func_addr;
|
||||||
|
|
||||||
real_stop_pc = gdbarch_skip_trampoline_code
|
real_stop_pc = gdbarch_skip_trampoline_code
|
||||||
(gdbarch, frame, method_stop_pc);
|
(gdbarch, frame, method_stop_pc);
|
||||||
if (real_stop_pc == 0)
|
if (real_stop_pc == 0)
|
||||||
|
|
Loading…
Reference in New Issue