diff options
author | Yao Qi <yao@codesourcery.com> | 2012-11-27 08:11:59 +0000 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2012-11-27 08:11:59 +0000 |
commit | 8c2b9656fa3178519c007ed4c1a2a3da6b61bcaa (patch) | |
tree | 2babdacb1bb99e1ca27bc9590cee581e1033a5d5 /gdb/solib-svr4.c | |
parent | 5edf51feeade2be8b6ab6d49507a6023a6d9a176 (diff) | |
download | gdb-8c2b9656fa3178519c007ed4c1a2a3da6b61bcaa.zip gdb-8c2b9656fa3178519c007ed4c1a2a3da6b61bcaa.tar.gz gdb-8c2b9656fa3178519c007ed4c1a2a3da6b61bcaa.tar.bz2 |
gdb/
2012-11-27 Daniel Jacobowitz <dan@codesourcery.com>
Kazu Hirata <kazu@codesourcery.com>
Yao Qi <yao@codesourcery.com>
* objfiles.c (init_entry_point_info): Call
gdbarch_convert_from_func_ptr_addr and
gdbarch_addr_bits_remove here ...
(entry_point_address_query): ... instead of here.
* solib-svr4.c (exec_entry_point): Call
gdbarch_addr_bits_remove.
* symfile.c (generic_load): Call gdbarch_addr_bits_remove on
the entry address.
Diffstat (limited to 'gdb/solib-svr4.c')
-rw-r--r-- | gdb/solib-svr4.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c index 37cc654..02e45a3 100644 --- a/gdb/solib-svr4.c +++ b/gdb/solib-svr4.c @@ -1388,6 +1388,8 @@ svr4_in_dynsym_resolve_code (CORE_ADDR pc) static CORE_ADDR exec_entry_point (struct bfd *abfd, struct target_ops *targ) { + CORE_ADDR addr; + /* KevinB wrote ... for most targets, the address returned by bfd_get_start_address() is the entry point for the start function. But, for some targets, bfd_get_start_address() returns @@ -1396,9 +1398,10 @@ exec_entry_point (struct bfd *abfd, struct target_ops *targ) gdbarch_convert_from_func_ptr_addr(). The method gdbarch_convert_from_func_ptr_addr() is the merely the identify function for targets which don't use function descriptors. */ - return gdbarch_convert_from_func_ptr_addr (target_gdbarch (), + addr = gdbarch_convert_from_func_ptr_addr (target_gdbarch (), bfd_get_start_address (abfd), targ); + return gdbarch_addr_bits_remove (target_gdbarch (), addr); } /* Helper function for gdb_bfd_lookup_symbol. */ |