From: Jeff Law Date: Tue, 8 Nov 1994 05:31:33 +0000 (+0000) Subject: * Enable backtracing from inside a SOM shared library back into X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bfaef242b573a6018151f9a8f899fcadcea22203;p=binutils-gdb.git * 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4369c529477..579776a4518 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,12 @@ +Mon Nov 7 22:25:21 1994 Jeff Law (law@snake.cs.utah.edu) + + * 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. + Mon Nov 7 14:34:42 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * m3-nat.c: Remove comments about arbitrary limit in diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index 97bb9c8db02..dcc03b234ef 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. */