* target.h (struct target_section): Delete member bfd.

All users updated to use the_bfd_section->owner instead.
	* exec.c (add_to_section_table): Assert bfd is expected value.
	Remove initialization of target_section.bfd.
	(remove_target_sections): Update.
	(section_table_available_memory): Update.
	(section_table_xfer_memory_partial): Update.
	(print_section_info): Update.
	(exec_set_section_address): Update.
	* record-full.c (record_full_core_xfer_partial): Update.
	* solib-svr4.c (svr4_relocate_section_addresses): Update.
	* solib-target.c (solib_target_relocate_section_addresses): Update.
	* symfile.c (build_section_addr_info_from_section_table): Update.
	* target.c (memory_xfer_live_readonly_partial): Update.
	(memory_xfer_partial_1): Update.
This commit is contained in:
Doug Evans
2013-07-16 20:41:55 +00:00
parent 4229ca0ea6
commit 2b2848e211
8 changed files with 67 additions and 39 deletions

View File

@@ -229,15 +229,15 @@ build_section_addr_info_from_section_table (const struct target_section *start,
for (stp = start, oidx = 0; stp != end; stp++)
{
if (bfd_get_section_flags (stp->bfd,
stp->the_bfd_section) & (SEC_ALLOC | SEC_LOAD)
struct bfd_section *asect = stp->the_bfd_section;
bfd *abfd = asect->owner;
if (bfd_get_section_flags (abfd, asect) & (SEC_ALLOC | SEC_LOAD)
&& oidx < end - start)
{
sap->other[oidx].addr = stp->addr;
sap->other[oidx].name
= xstrdup (bfd_section_name (stp->bfd, stp->the_bfd_section));
sap->other[oidx].sectindex
= gdb_bfd_section_index (stp->bfd, stp->the_bfd_section);
sap->other[oidx].name = xstrdup (bfd_section_name (abfd, asect));
sap->other[oidx].sectindex = gdb_bfd_section_index (abfd, asect);
oidx++;
}
}