* [hpux/committed] Fix segfault in SOM section handling
@ 2005-12-08 13:41 Randolph Chung
2005-12-08 19:50 ` Joel Brobecker
0 siblings, 1 reply; 3+ messages in thread
From: Randolph Chung @ 2005-12-08 13:41 UTC (permalink / raw)
To: gdb-patches
[-- 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;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [hpux/committed] Fix segfault in SOM section handling
2005-12-08 13:41 [hpux/committed] Fix segfault in SOM section handling Randolph Chung
@ 2005-12-08 19:50 ` Joel Brobecker
2005-12-08 20:38 ` Randolph Chung
0 siblings, 1 reply; 3+ messages in thread
From: Joel Brobecker @ 2005-12-08 19:50 UTC (permalink / raw)
To: Randolph Chung; +Cc: gdb-patches
Hi Randolph,
On Thu, Dec 08, 2005 at 08:19:24AM +0800, Randolph Chung wrote:
> 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.
I also propose that this patch be applied to the branch. What do you
think?
Thanks,
--
Joel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [hpux/committed] Fix segfault in SOM section handling
2005-12-08 19:50 ` Joel Brobecker
@ 2005-12-08 20:38 ` Randolph Chung
0 siblings, 0 replies; 3+ messages in thread
From: Randolph Chung @ 2005-12-08 20:38 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches
> I also propose that this patch be applied to the branch. What do you
> think?
Sure, it really helps to debug gdb when you can load gdb inside gdb
itself :-)
randolph
--
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-12-08 10:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-08 13:41 [hpux/committed] Fix segfault in SOM section handling Randolph Chung
2005-12-08 19:50 ` Joel Brobecker
2005-12-08 20:38 ` Randolph Chung
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox