struct regcache *regcache)
{
*real_pc = funaddr;
- *bp_addr = entry_point_address (current_program_space);
+ *bp_addr = current_program_space->entry_point_address ();
return sp;
}
CORE_ADDR addr;
int bp_len;
- addr = entry_point_address (current_program_space);
+ addr = current_program_space->entry_point_address ();
/* Inferior calls also use the entry point as a breakpoint location.
We don't want displaced stepping to interfere with those
{
CORE_ADDR entry_point;
- if (!entry_point_address_query (current_program_space, &entry_point))
+ if (!current_program_space->entry_point_address_query (&entry_point))
return false;
return get_frame_func (this_frame) == entry_point;
CORE_ADDR dummy_addr;
real_pc = funaddr;
- dummy_addr = entry_point_address (current_program_space);
+ dummy_addr = current_program_space->entry_point_address ();
/* A call dummy always consists of just a single breakpoint, so
its address is the same as the address of the dummy.
set_objfile_per_bfd (this);
}
-/* See objfiles.h. */
-
-int
-entry_point_address_query (program_space *pspace, CORE_ADDR *entry_p)
-{
- objfile *objf = pspace->symfile_object_file;
- if (objf == NULL || !objf->per_bfd->ei.entry_point_p)
- return 0;
-
- int idx = objf->per_bfd->ei.the_bfd_section_index;
- *entry_p = objf->per_bfd->ei.entry_point + objf->section_offsets[idx];
-
- return 1;
-}
-
-/* See objfiles.h. */
-
-CORE_ADDR
-entry_point_address (program_space *pspace)
-{
- CORE_ADDR retval;
-
- if (!entry_point_address_query (pspace, &retval))
- error (_("Entry point address is not known."));
-
- return retval;
-}
-
separate_debug_iterator &
separate_debug_iterator::operator++ ()
{
/* Declarations for functions defined in objfiles.c */
-/* 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);
-
-/* Get the entry point address in PSPACE. Call error if it is not known. */
-
-extern CORE_ADDR entry_point_address (program_space *pspace);
-
extern void build_objfile_section_table (struct objfile *);
extern void free_objfile_separate_debug (struct objfile *);
return find_inferior_for_program_space (this) == nullptr;
}
+/* See progspace.h. */
+
+int
+program_space::entry_point_address_query (CORE_ADDR *entry_p) const
+{
+ objfile *objf = symfile_object_file;
+ if (objf == NULL || !objf->per_bfd->ei.entry_point_p)
+ return 0;
+
+ int idx = objf->per_bfd->ei.the_bfd_section_index;
+ *entry_p = objf->per_bfd->ei.entry_point + objf->section_offsets[idx];
+
+ return 1;
+}
+
+/* See progspace.h. */
+
+CORE_ADDR
+program_space::entry_point_address () const
+{
+ CORE_ADDR retval;
+
+ if (!entry_point_address_query (&retval))
+ error (_("Entry point address is not known."));
+
+ return retval;
+}
+
/* Prints the list of program spaces and their details on UIOUT. If
REQUESTED is not -1, it's the ID of the pspace that should be
printed. Otherwise, all spaces are printed. */
return m_target_sections;
}
+ /* If there is a valid and known entry point in this program space,
+ fill *ENTRY_P with it and return non-zero. */
+ int entry_point_address_query (CORE_ADDR *entry_p) const;
+
+ /* Get the entry point address in this program space. Call error if
+ it is not known. */
+ CORE_ADDR entry_point_address () const;
+
/* Unique ID number. */
int num = 0;
return 0;
}
- if (!entry_point_address_query (current_program_space, &entry_point))
+ if (!current_program_space->entry_point_address_query (&entry_point))
{
solib_debug_printf ("Symbol file has no entry point.");
return 0;