aboutsummaryrefslogtreecommitdiff
path: root/gdb/objfiles.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2024-05-16 17:01:47 -0400
committerSimon Marchi <simon.marchi@efficios.com>2024-07-15 14:34:12 -0400
commitb7513ebd18f4d930e8ff806609be1bf75a7b9b9a (patch)
tree6e33996071156ac4cbb849be25cc8f9820cf082d /gdb/objfiles.c
parentda2732476dbd1b8a71510d999b6d18754d7ea58a (diff)
downloadfsf-binutils-gdb-b7513ebd18f4d930e8ff806609be1bf75a7b9b9a.zip
fsf-binutils-gdb-b7513ebd18f4d930e8ff806609be1bf75a7b9b9a.tar.gz
fsf-binutils-gdb-b7513ebd18f4d930e8ff806609be1bf75a7b9b9a.tar.bz2
gdb: pass program space to entry_point_address_query
Make the current program space bubble up one level. Change-Id: Ic3ad0869ca1afe41854f605a6f7eb092fca29ff8 Approved-By: Tom Tromey <tom@tromey.com> Reviewed-By: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r--gdb/objfiles.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index cf1f3ae..b9333b6 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -345,13 +345,12 @@ objfile::objfile (gdb_bfd_ref_ptr bfd_, const char *name, objfile_flags flags_)
set_objfile_per_bfd (this);
}
-/* If there is a valid and known entry point, function fills *ENTRY_P with it
- and returns non-zero; otherwise it returns zero. */
+/* See objfiles.h. */
int
-entry_point_address_query (CORE_ADDR *entry_p)
+entry_point_address_query (program_space *pspace, CORE_ADDR *entry_p)
{
- objfile *objf = current_program_space->symfile_object_file;
+ objfile *objf = pspace->symfile_object_file;
if (objf == NULL || !objf->per_bfd->ei.entry_point_p)
return 0;
@@ -368,7 +367,7 @@ entry_point_address (void)
{
CORE_ADDR retval;
- if (!entry_point_address_query (&retval))
+ if (!entry_point_address_query (current_program_space, &retval))
error (_("Entry point address is not known."));
return retval;