diff options
author | Daniel Jacobowitz <drow@false.org> | 2009-07-28 16:39:06 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2009-07-28 16:39:06 +0000 |
commit | 3612b1927e247d33aab56de742e16f110f148711 (patch) | |
tree | fc046cc74e65e51ae57bcef2cbb2a8140a4edae8 /gdb/objfiles.c | |
parent | d551e57bf793cc95d833626ff467e84f0bfab146 (diff) | |
download | gdb-3612b1927e247d33aab56de742e16f110f148711.zip gdb-3612b1927e247d33aab56de742e16f110f148711.tar.gz gdb-3612b1927e247d33aab56de742e16f110f148711.tar.bz2 |
* arch-utils.c (displaced_step_at_entry_point): Do not call
gdbarch_convert_from_func_ptr_addr.
* cris-tdep.c: Remove outdated comment.
* infcall.c (call_function_by_hand): Do not call
gdbarch_convert_from_func_ptr_addr after entry_point_address.
* objfiles.c (entry_point_address): Call both
gdbarch_convert_from_func_ptr_addr and
gdbarch_addr_bits_remove.
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r-- | gdb/objfiles.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c index 4662e1b..c983b11 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -279,7 +279,26 @@ init_entry_point_info (struct objfile *objfile) CORE_ADDR entry_point_address (void) { - return symfile_objfile ? symfile_objfile->ei.entry_point : 0; + struct gdbarch *gdbarch; + CORE_ADDR entry_point; + + if (symfile_objfile == NULL) + return 0; + + gdbarch = get_objfile_arch (symfile_objfile); + + entry_point = symfile_objfile->ei.entry_point; + + /* Make certain that the address points at real code, and not a + function descriptor. */ + entry_point = gdbarch_convert_from_func_ptr_addr (gdbarch, entry_point, + ¤t_target); + + /* Remove any ISA markers, so that this matches entries in the + symbol table. */ + entry_point = gdbarch_addr_bits_remove (gdbarch, entry_point); + + return entry_point; } /* Create the terminating entry of OBJFILE's minimal symbol table. |