]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: pass program space to entry_point_address_query
authorSimon Marchi <simon.marchi@polymtl.ca>
Thu, 16 May 2024 21:01:47 +0000 (17:01 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Mon, 15 Jul 2024 18:34:12 +0000 (14:34 -0400)
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>
gdb/frame.c
gdb/objfiles.c
gdb/objfiles.h
gdb/solib-frv.c

index 43efac07d95ad150b080d97bace6124cc1619e2a..e6ab54797a8eca70f24d0a7c41b192bc06cf5508 100644 (file)
@@ -2628,7 +2628,7 @@ inside_entry_func (const frame_info_ptr &this_frame)
 {
   CORE_ADDR entry_point;
 
-  if (!entry_point_address_query (&entry_point))
+  if (!entry_point_address_query (current_program_space, &entry_point))
     return false;
 
   return get_frame_func (this_frame) == entry_point;
index cf1f3ae0653d491e5146e65e7859974776bd2638..b9333b6c9f46f4de651cff8fb5b8e05d0106665b 100644 (file)
@@ -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;
index 6a4724a4be591fdf5ceb645411a881079a493276..45a06ec6a9ecae0d6fcc295c3c67bd5114745908 100644 (file)
@@ -912,7 +912,11 @@ obj_section::set_offset (CORE_ADDR offset)
 
 /* Declarations for functions defined in objfiles.c */
 
-extern int entry_point_address_query (CORE_ADDR *entry_p);
+/* If there is a valid and known entry point in PSPACE, fill *ENTRY_P with it
+   and return non-zero.  */
+
+extern int entry_point_address_query (program_space *pspace,
+                                     CORE_ADDR *entry_p);
 
 extern CORE_ADDR entry_point_address (void);
 
index 39508fab4c8310c96332e06cec2910e3baa08bd2..79052db86f829373bfe1b25a1987e1dbe9751cc0 100644 (file)
@@ -687,7 +687,7 @@ enable_break (void)
       return 0;
     }
 
-  if (!entry_point_address_query (&entry_point))
+  if (!entry_point_address_query (current_program_space, &entry_point))
     {
       solib_debug_printf ("Symbol file has no entry point.");
       return 0;