diff options
author | Joel Brobecker <brobecker@gnat.com> | 2009-09-09 17:59:18 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2009-09-09 17:59:18 +0000 |
commit | 397dbc8b2baed9b1e46841eca63f1d05c7ac32e4 (patch) | |
tree | 38199bea081b44f609a99936f0fad06b58c23145 | |
parent | 5172aecbd2b65e71aedbd21c46253ca6a20227aa (diff) | |
download | gdb-397dbc8b2baed9b1e46841eca63f1d05c7ac32e4.zip gdb-397dbc8b2baed9b1e46841eca63f1d05c7ac32e4.tar.gz gdb-397dbc8b2baed9b1e46841eca63f1d05c7ac32e4.tar.bz2 |
Fix a build failure on AIX.
* rs6000-nat.c (vmap_exec): Rewrite using target_get_section_table
instead of relying on the to_sections/to_section_end target_ops
field, since the latter have been removed in a previous patch.
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/rs6000-nat.c | 27 |
2 files changed, 20 insertions, 14 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 82d6704..61552e5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2009-09-08 Joel Brobecker <brobecker@adacore.com> + + Fix a build failure on AIX. + * rs6000-nat.c (vmap_exec): Rewrite using target_get_section_table + instead of relying on the to_sections/to_section_end target_ops + field, since the latter have been removed in a previous patch. + 2009-09-08 Thiago Jung Bauermann <thiago.bauermann@gmail.com> * Makefile.in (py-cmd.o): Renamed from python-cmd.o. Updated diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c index a1d15bc..7fa7c41 100644 --- a/gdb/rs6000-nat.c +++ b/gdb/rs6000-nat.c @@ -935,33 +935,32 @@ vmap_exec (void) { static bfd *execbfd; int i; + struct target_section_table *table = target_get_section_table (&exec_ops); if (execbfd == exec_bfd) return; execbfd = exec_bfd; - if (!vmap || !exec_ops.to_sections) - error (_("vmap_exec: vmap or exec_ops.to_sections == 0.")); + if (!vmap || !table->sections) + error (_("vmap_exec: vmap or table->sections == 0.")); - for (i = 0; &exec_ops.to_sections[i] < exec_ops.to_sections_end; i++) + for (i = 0; &table->sections[i] < table->sections_end; i++) { - if (strcmp (".text", exec_ops.to_sections[i].the_bfd_section->name) == 0) + if (strcmp (".text", table->sections[i].the_bfd_section->name) == 0) { - exec_ops.to_sections[i].addr += vmap->tstart - vmap->tvma; - exec_ops.to_sections[i].endaddr += vmap->tstart - vmap->tvma; + table->sections[i].addr += vmap->tstart - vmap->tvma; + table->sections[i].endaddr += vmap->tstart - vmap->tvma; } - else if (strcmp (".data", - exec_ops.to_sections[i].the_bfd_section->name) == 0) + else if (strcmp (".data", table->sections[i].the_bfd_section->name) == 0) { - exec_ops.to_sections[i].addr += vmap->dstart - vmap->dvma; - exec_ops.to_sections[i].endaddr += vmap->dstart - vmap->dvma; + table->sections[i].addr += vmap->dstart - vmap->dvma; + table->sections[i].endaddr += vmap->dstart - vmap->dvma; } - else if (strcmp (".bss", - exec_ops.to_sections[i].the_bfd_section->name) == 0) + else if (strcmp (".bss", table->sections[i].the_bfd_section->name) == 0) { - exec_ops.to_sections[i].addr += vmap->dstart - vmap->dvma; - exec_ops.to_sections[i].endaddr += vmap->dstart - vmap->dvma; + table->sections[i].addr += vmap->dstart - vmap->dvma; + table->sections[i].endaddr += vmap->dstart - vmap->dvma; } } } |