summaryrefslogtreecommitdiffstats
path: root/contrib/gdb
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1997-03-22 04:44:51 +0000
committerbde <bde@FreeBSD.org>1997-03-22 04:44:51 +0000
commit5610d80b6231f85421e587a175ddd4d4b0c735c5 (patch)
treefba4d89e5d79959cd2a2b9b34d22b63fac1f9b79 /contrib/gdb
parentbd6347d78d8bc0690951bb37df7601bc1b705753 (diff)
downloadFreeBSD-src-5610d80b6231f85421e587a175ddd4d4b0c735c5.zip
FreeBSD-src-5610d80b6231f85421e587a175ddd4d4b0c735c5.tar.gz
Quick fix for section limits not being relocated. This has always been
broken for gdb -k, but the section limits weren't used much in previous versions of gdb in FreeBSD. Now they are used for backtracing when full symbols aren't available, and in some other new cases. This should be fixed properly by someone who knows bfd. This should be fixed in 2.2.
Diffstat (limited to 'contrib/gdb')
-rw-r--r--contrib/gdb/gdb/objfiles.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/gdb/gdb/objfiles.c b/contrib/gdb/gdb/objfiles.c
index 97b05dc..e70ddbe 100644
--- a/contrib/gdb/gdb/objfiles.c
+++ b/contrib/gdb/gdb/objfiles.c
@@ -83,6 +83,12 @@ add_to_objfile_sections (abfd, asect, objfile_p_char)
section.objfile = objfile;
section.the_bfd_section = asect;
section.addr = bfd_section_vma (abfd, asect);
+#ifdef __FreeBSD__
+ /* XXX perhaps this should be in bfd_section_vma (), but it wouldn't
+ even compile there, since a bfd pointer isn't actually passed in
+ all invocations of bfd_section_vma (). */
+ section.addr += bfd_get_start_address (abfd);
+#endif
section.endaddr = section.addr + bfd_section_size (abfd, asect);
obstack_grow (&objfile->psymbol_obstack, (char *) &section, sizeof(section));
objfile->sections_end = (struct obj_section *) (((unsigned long) objfile->sections_end) + 1);
OpenPOWER on IntegriCloud