summaryrefslogtreecommitdiff
path: root/gdb/exec.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2013-07-22 20:51:10 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2013-07-22 20:51:10 +0000
commitcdf3101ddfebd0ed897ed47369507871ffd6f79a (patch)
tree2d9434fec4bc9952aaa5582ce61d9d63c5409833 /gdb/exec.c
parent9e7ce349fddc2284e3851a2d0674c92d6164bdac (diff)
downloadgdb-cdf3101ddfebd0ed897ed47369507871ffd6f79a.tar.gz
2013-07-22 Doug Evans <dje@google.com>
gdb/ * exec.h (remove_target_sections): Delete arg abfd. * exec.c (remove_target_sections): Delete arg abfd. (exec_close): Update call to remove_target_sections. * solib.c (update_solib_list): Ditto. (reload_shared_libraries_1): Ditto. (clear_solib): Ditto, and unconditionally call remove_target_sections.
Diffstat (limited to 'gdb/exec.c')
-rw-r--r--gdb/exec.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/gdb/exec.c b/gdb/exec.c
index 5b256ef01f1..14ff6d7b8c6 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -101,7 +101,7 @@ exec_close (void)
exec_bfd = NULL;
exec_bfd_mtime = 0;
- remove_target_sections (&exec_bfd, abfd);
+ remove_target_sections (&exec_bfd);
}
}
@@ -339,7 +339,7 @@ add_to_section_table (bfd *abfd, struct bfd_section *asect,
if (!(aflag & SEC_ALLOC))
return;
- (*table_pp)->key = NULL;
+ (*table_pp)->owner = NULL;
(*table_pp)->the_bfd_section = asect;
(*table_pp)->addr = bfd_section_vma (abfd, asect);
(*table_pp)->endaddr = (*table_pp)->addr + bfd_section_size (abfd, asect);
@@ -397,7 +397,7 @@ build_section_table (struct bfd *some_bfd, struct target_section **start,
current set of target sections. */
void
-add_target_sections (void *key,
+add_target_sections (void *owner,
struct target_section *sections,
struct target_section *sections_end)
{
@@ -414,7 +414,7 @@ add_target_sections (void *key,
for (i = 0; i < count; ++i)
{
table->sections[space + i] = sections[i];
- table->sections[space + i].key = key;
+ table->sections[space + i].owner = owner;
}
/* If these are the first file sections we can provide memory
@@ -427,17 +427,20 @@ add_target_sections (void *key,
}
}
-/* Remove all target sections taken from ABFD. */
+/* Remove all target sections owned by OWNER.
+ OWNER must be the same value passed to add_target_sections. */
void
-remove_target_sections (void *key, bfd *abfd)
+remove_target_sections (void *owner)
{
struct target_section *src, *dest;
struct target_section_table *table = current_target_sections;
+ gdb_assert (owner != NULL);
+
dest = table->sections;
for (src = table->sections; src < table->sections_end; src++)
- if (src->key != key || src->the_bfd_section->owner != abfd)
+ if (src->owner != owner)
{
/* Keep this section. */
if (dest < src)