+2020-10-29 Tom Tromey <tom@tromey.com>
+
+ * progspace.h (current_target_sections): Remove macro.
+ * solib-svr4.c (scan_dyntag): Update.
+ * solib-dsbt.c (scan_dyntag): Update.
+ * exec.c (exec_target::close): Update.
+ (add_target_sections, add_target_sections_of_objfile)
+ (remove_target_sections, exec_target::get_section_table)
+ (exec_target::files_info, set_section_command)
+ (exec_set_section_address, exec_target::has_memory)
+ (exec_target::has_memory): Update.
+
2020-10-29 Tom Tromey <tom@tromey.com>
* source-cache.c (source_cache::get_plain_source_lines): Use
for (struct program_space *ss : program_spaces)
{
set_current_program_space (ss);
- current_target_sections->clear ();
+ ss->target_sections.clear ();
ss->exec_close ();
}
}
add_target_sections (void *owner,
const target_section_table §ions)
{
- target_section_table *table = current_target_sections;
+ target_section_table *table = ¤t_program_space->target_sections;
if (!sections.empty ())
{
void
add_target_sections_of_objfile (struct objfile *objfile)
{
- target_section_table *table = current_target_sections;
+ target_section_table *table = ¤t_program_space->target_sections;
struct obj_section *osect;
gdb_assert (objfile != nullptr);
void
remove_target_sections (void *owner)
{
- target_section_table *table = current_target_sections;
+ target_section_table *table = ¤t_program_space->target_sections;
gdb_assert (owner != NULL);
target_section_table *
exec_target::get_section_table ()
{
- return current_target_sections;
+ return ¤t_program_space->target_sections;
}
enum target_xfer_status
exec_target::files_info ()
{
if (exec_bfd)
- print_section_info (current_target_sections, exec_bfd);
+ print_section_info (¤t_program_space->target_sections, exec_bfd);
else
puts_filtered (_("\t<no file loaded>\n"));
}
/* Parse out new virtual address. */
secaddr = parse_and_eval_address (args);
- for (target_section &p : *current_target_sections)
+ for (target_section &p : current_program_space->target_sections)
{
if (!strncmp (secname, bfd_section_name (p.the_bfd_section), seclen)
&& bfd_section_name (p.the_bfd_section)[seclen] == '\0')
void
exec_set_section_address (const char *filename, int index, CORE_ADDR address)
{
- for (target_section &p : *current_target_sections)
+ for (target_section &p : current_program_space->target_sections)
{
if (filename_cmp (filename,
bfd_get_filename (p.the_bfd_section->owner)) == 0
{
/* We can provide memory if we have any file/target sections to read
from. */
- return !current_target_sections->empty ();
+ return !current_program_space->target_sections.empty ();
}
gdb::unique_xmalloc_ptr<char>