aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2008-08-21 13:19:18 +0000
committerPedro Alves <palves@redhat.com>2008-08-21 13:19:18 +0000
commitaded6f54f0cb9d9b44d72d06af7b940cdeb1876b (patch)
tree153a15e75764db0005c7b5b325abd0415ed889e5 /gdb
parent2b60860a4c823c5de508a6af53fcfd1c57c31cba (diff)
downloadgdb-aded6f54f0cb9d9b44d72d06af7b940cdeb1876b.zip
gdb-aded6f54f0cb9d9b44d72d06af7b940cdeb1876b.tar.gz
gdb-aded6f54f0cb9d9b44d72d06af7b940cdeb1876b.tar.bz2
* arm-tdep.c (arm_pc_is_thumb): Use obj_section_addr.
* hppa-hpux-tdep.c (hppa_hpux_find_dummy_bpaddr): Likewise. * hppa-linux-tdep.c (hppa_linux_find_global_pointer): Use obj_section_addr and obj_section_endaddr. * hppa-tdep.c (hppa64_convert_code_addr_to_fptr): Likewise. * hppabsd-tdep.c (hppabsd_find_global_pointer): Likewise. * ia64-tdep.c (ia64_find_global_pointer): Likewise. (find_extant_func_descr): Likewise. * solib-frv.c (frv_relocate_main_executable): Use obj_section_addr. * xstormy16-tdep.c (xstormy16_find_jmp_table_entry): Use obj_section_addr and obj_section_endaddr.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog15
-rw-r--r--gdb/arm-tdep.c3
-rw-r--r--gdb/hppa-hpux-tdep.c4
-rw-r--r--gdb/hppa-linux-tdep.c8
-rw-r--r--gdb/hppa-tdep.c10
-rw-r--r--gdb/hppabsd-tdep.c5
-rw-r--r--gdb/ia64-tdep.c16
-rw-r--r--gdb/solib-frv.c2
-rw-r--r--gdb/xstormy16-tdep.c9
9 files changed, 50 insertions, 22 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e76a369..b462641 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,18 @@
+2008-08-21 Pedro Alves <pedro@codesourcery.com>
+
+ * arm-tdep.c (arm_pc_is_thumb): Use obj_section_addr.
+ * hppa-hpux-tdep.c (hppa_hpux_find_dummy_bpaddr): Likewise.
+ * hppa-linux-tdep.c (hppa_linux_find_global_pointer): Use
+ obj_section_addr and obj_section_endaddr.
+ * hppa-tdep.c (hppa64_convert_code_addr_to_fptr): Likewise.
+ * hppabsd-tdep.c (hppabsd_find_global_pointer): Likewise.
+ * ia64-tdep.c (ia64_find_global_pointer): Likewise.
+ (find_extant_func_descr): Likewise.
+ * solib-frv.c (frv_relocate_main_executable): Use
+ obj_section_addr.
+ * xstormy16-tdep.c (xstormy16_find_jmp_table_entry): Use
+ obj_section_addr and obj_section_endaddr.
+
2008-08-21 Paul N. Hilfinger <hilfinger@adacore.com>
* NEWS: Amplify last entry on boolean types in Ada.
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 66add04..ba18f9a 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -303,7 +303,8 @@ arm_pc_is_thumb (CORE_ADDR memaddr)
{
struct arm_per_objfile *data;
VEC(arm_mapping_symbol_s) *map;
- struct arm_mapping_symbol map_key = { memaddr - sec->addr, 0 };
+ struct arm_mapping_symbol map_key = { memaddr - obj_section_addr (sec),
+ 0 };
unsigned int idx;
data = objfile_data (sec->objfile, arm_objfile_data_key);
diff --git a/gdb/hppa-hpux-tdep.c b/gdb/hppa-hpux-tdep.c
index 93d237c..1e5d1fb 100644
--- a/gdb/hppa-hpux-tdep.c
+++ b/gdb/hppa-hpux-tdep.c
@@ -1068,9 +1068,9 @@ hppa_hpux_find_dummy_bpaddr (CORE_ADDR addr)
{
/* First try the lowest address in the section; we can use it as long
as it is "regular" code (i.e. not a stub) */
- u = find_unwind_entry (sec->addr);
+ u = find_unwind_entry (obj_section_addr (sec));
if (!u || u->stub_unwind.stub_type == 0)
- return sec->addr;
+ return obj_section_addr (sec);
/* Otherwise, we need to find a symbol for a regular function. We
do this by walking the list of msymbols in the objfile. The symbol
diff --git a/gdb/hppa-linux-tdep.c b/gdb/hppa-linux-tdep.c
index ef6b65f..a5dc536 100644
--- a/gdb/hppa-linux-tdep.c
+++ b/gdb/hppa-linux-tdep.c
@@ -365,10 +365,12 @@ hppa_linux_find_global_pointer (struct gdbarch *gdbarch, struct value *function)
if (osect < faddr_sect->objfile->sections_end)
{
- CORE_ADDR addr;
+ CORE_ADDR addr, endaddr;
- addr = osect->addr;
- while (addr < osect->endaddr)
+ addr = obj_section_addr (osect);
+ endaddr = obj_section_endaddr (osect);
+
+ while (addr < endaddr)
{
int status;
LONGEST tag;
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index ace04a3..11ef093 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -912,15 +912,17 @@ hppa64_convert_code_addr_to_fptr (CORE_ADDR code)
ALL_OBJFILE_OSECTIONS (sec->objfile, opd)
{
if (strcmp (opd->the_bfd_section->name, ".opd") == 0)
- break;
+ break;
}
if (opd < sec->objfile->sections_end)
{
CORE_ADDR addr;
- for (addr = opd->addr; addr < opd->endaddr; addr += 2 * 8)
- {
+ for (addr = obj_section_addr (opd);
+ addr < obj_section_endaddr (opd);
+ addr += 2 * 8)
+ {
ULONGEST opdaddr;
char tmp[8];
@@ -928,7 +930,7 @@ hppa64_convert_code_addr_to_fptr (CORE_ADDR code)
break;
opdaddr = extract_unsigned_integer (tmp, sizeof (tmp));
- if (opdaddr == code)
+ if (opdaddr == code)
return addr - 16;
}
}
diff --git a/gdb/hppabsd-tdep.c b/gdb/hppabsd-tdep.c
index c1d175b..d4b0e57 100644
--- a/gdb/hppabsd-tdep.c
+++ b/gdb/hppabsd-tdep.c
@@ -61,9 +61,10 @@ hppabsd_find_global_pointer (struct gdbarch *gdbarch, struct value *function)
if (sec < faddr_sec->objfile->sections_end)
{
- CORE_ADDR addr = sec->addr;
+ CORE_ADDR addr = obj_section_addr (sec);
+ CORE_ADDR endaddr = obj_section_endaddr (sec);
- while (addr < sec->endaddr)
+ while (addr < endaddr)
{
gdb_byte buf[4];
LONGEST tag;
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index 991cb06..186833a 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -3095,10 +3095,12 @@ ia64_find_global_pointer (CORE_ADDR faddr)
if (osect < faddr_sect->objfile->sections_end)
{
- CORE_ADDR addr;
+ CORE_ADDR addr, endaddr;
- addr = osect->addr;
- while (addr < osect->endaddr)
+ addr = obj_section_addr (osect);
+ endaddr = obj_section_endaddr (osect);
+
+ while (addr < endaddr)
{
int status;
LONGEST tag;
@@ -3156,10 +3158,12 @@ find_extant_func_descr (CORE_ADDR faddr)
if (osect < faddr_sect->objfile->sections_end)
{
- CORE_ADDR addr;
+ CORE_ADDR addr, endaddr;
+
+ addr = obj_section_addr (osect);
+ endaddr = obj_section_endaddr (osect);
- addr = osect->addr;
- while (addr < osect->endaddr)
+ while (addr < endaddr)
{
int status;
LONGEST faddr2;
diff --git a/gdb/solib-frv.c b/gdb/solib-frv.c
index 3c844be..463722a 100644
--- a/gdb/solib-frv.c
+++ b/gdb/solib-frv.c
@@ -908,7 +908,7 @@ frv_relocate_main_executable (void)
osect_idx = osect->the_bfd_section->index;
/* Current address of section. */
- addr = osect->addr;
+ addr = obj_section_addr (osect);
/* Offset from where this section started. */
offset = ANOFFSET (symfile_objfile->section_offsets, osect_idx);
/* Original address prior to any past relocations. */
diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c
index eac5efd..5fcceb7 100644
--- a/gdb/xstormy16-tdep.c
+++ b/gdb/xstormy16-tdep.c
@@ -550,9 +550,12 @@ xstormy16_find_jmp_table_entry (CORE_ADDR faddr)
if (osect < faddr_sect->objfile->sections_end)
{
- CORE_ADDR addr;
- for (addr = osect->addr;
- addr < osect->endaddr; addr += 2 * xstormy16_inst_size)
+ CORE_ADDR addr, endaddr;
+
+ addr = obj_section_addr (osect);
+ endaddr = obj_section_endaddr (osect);
+
+ for (; addr < endaddr; addr += 2 * xstormy16_inst_size)
{
LONGEST inst, inst2, faddr2;
char buf[2 * xstormy16_inst_size];