From: Randolph Chung <randolph@tausq.org>
To: gdb-patches@sources.redhat.com
Subject: [hpux/committed] Fix segfault in SOM section handling
Date: Thu, 08 Dec 2005 13:41:00 -0000 [thread overview]
Message-ID: <43977C0C.8060301@tausq.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 239 bytes --]
On 32-bit hpux we were not properly reading symfiles and iterating over
sections that don't exist. This caused segfaults when, for example, we
try to debug gdb with itself. Fixed with the attached patch. committed
as obvious.
randolph
[-- Attachment #2: som.diff --]
[-- Type: text/x-patch, Size: 881 bytes --]
2005-12-08 Randolph Chung <tausq@debian.org>
* somread.c (som_symfile_offsets): Iterate through number of sections
in addrs instead of objfile.
Index: somread.c
===================================================================
RCS file: /cvs/src/src/gdb/somread.c,v
retrieving revision 1.27
diff -u -p -r1.27 somread.c
--- somread.c 11 Feb 2005 04:06:05 -0000 1.27
+++ somread.c 8 Dec 2005 00:10:21 -0000
@@ -442,7 +440,7 @@ som_symfile_offsets (struct objfile *obj
/* Note: Here is OK to compare with ".text" because this is the
name that gdb itself gives to that section, not the SOM
name. */
- for (i = 0; i < objfile->num_sections && addrs->other[i].name; i++)
+ for (i = 0; i < addrs->num_sections && addrs->other[i].name; i++)
if (strcmp (addrs->other[i].name, ".text") == 0)
break;
text_addr = addrs->other[i].addr;
next reply other threads:[~2005-12-08 0:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-08 13:41 Randolph Chung [this message]
2005-12-08 19:50 ` Joel Brobecker
2005-12-08 20:38 ` Randolph Chung
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43977C0C.8060301@tausq.org \
--to=randolph@tausq.org \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox