aboutsummaryrefslogtreecommitdiff
path: root/gdb/hppa-tdep.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1994-11-08 05:31:33 +0000
committerJeff Law <law@redhat.com>1994-11-08 05:31:33 +0000
commitbfaef242b573a6018151f9a8f899fcadcea22203 (patch)
treefce7c3e503bc4e968f3c7995f8ee2af50a244875 /gdb/hppa-tdep.c
parent45329a2cbd7ae061d2824cfd1d66356e36278ec6 (diff)
downloadgdb-bfaef242b573a6018151f9a8f899fcadcea22203.zip
gdb-bfaef242b573a6018151f9a8f899fcadcea22203.tar.gz
gdb-bfaef242b573a6018151f9a8f899fcadcea22203.tar.bz2
* Enable backtracing from inside a SOM shared library back into
user code. * hppa-tdep.c (internalize_unwinds): Accept and use new "text_offset" argument for dynamic relocation of region_{start,end} fields in the unwind descriptor. (read_unwind_info): Pass text_offset to internalize unwinds.
Diffstat (limited to 'gdb/hppa-tdep.c')
-rw-r--r--gdb/hppa-tdep.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 97bb9c8..dcc03b2 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -82,7 +82,7 @@ static void read_unwind_info PARAMS ((struct objfile *));
static void internalize_unwinds PARAMS ((struct objfile *,
struct unwind_table_entry *,
asection *, unsigned int,
- unsigned int));
+ unsigned int, CORE_ADDR));
/* Routines to extract various sized constants out of hppa
@@ -282,11 +282,12 @@ compare_unwind_entries (a, b)
}
static void
-internalize_unwinds (objfile, table, section, entries, size)
+internalize_unwinds (objfile, table, section, entries, size, text_offset)
struct objfile *objfile;
struct unwind_table_entry *table;
asection *section;
unsigned int entries, size;
+ CORE_ADDR text_offset;
{
/* We will read the unwind entries into temporary memory, then
fill in the actual unwind table. */
@@ -304,8 +305,10 @@ internalize_unwinds (objfile, table, section, entries, size)
{
table[i].region_start = bfd_get_32 (objfile->obfd,
(bfd_byte *)buf);
+ table[i].region_start += text_offset;
buf += 4;
table[i].region_end = bfd_get_32 (objfile->obfd, (bfd_byte *)buf);
+ table[i].region_end += text_offset;
buf += 4;
tmp = bfd_get_32 (objfile->obfd, (bfd_byte *)buf);
buf += 4;
@@ -355,8 +358,10 @@ read_unwind_info (objfile)
unsigned unwind_size, elf_unwind_size, stub_unwind_size, total_size;
unsigned index, unwind_entries, elf_unwind_entries;
unsigned stub_entries, total_entries;
+ CORE_ADDR text_offset;
struct obj_unwind_info *ui;
+ text_offset = ANOFFSET (objfile->section_offsets, 0);
ui = obstack_alloc (&objfile->psymbol_obstack,
sizeof (struct obj_unwind_info));
@@ -415,10 +420,10 @@ read_unwind_info (objfile)
/* Internalize the standard unwind entries. */
index = 0;
internalize_unwinds (objfile, &ui->table[index], unwind_sec,
- unwind_entries, unwind_size);
+ unwind_entries, unwind_size, text_offset);
index += unwind_entries;
internalize_unwinds (objfile, &ui->table[index], elf_unwind_sec,
- elf_unwind_entries, elf_unwind_size);
+ elf_unwind_entries, elf_unwind_size, text_offset);
index += elf_unwind_entries;
/* Now internalize the stub unwind entries. */