From: Jean-Marc Saffroy <saffroy@gmail.com>
To: gdb-patches@sourceware.org
Subject: [patch] realloc bug in add_symbol_file_command
Date: Fri, 06 Oct 2006 14:18:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.64.0610061604200.9250@erda.mds> (raw)
Hello,
In gdb 6.5 I had systematic crashes with add-symbol-file: my kernel
modules have many sections... :) The patch below lets me load many modules
now.
Cheers,
--
saffroy@gmail.com
Index: gdb-6.5/gdb/symfile.c
===================================================================
--- gdb-6.5.orig/gdb/symfile.c 2006-10-06 15:56:41.000000000 +0200
+++ gdb-6.5/gdb/symfile.c 2006-10-06 15:57:52.000000000 +0200
@@ -1852,7 +1852,7 @@
to load the program. */
sect_opts[section_index].name = ".text";
sect_opts[section_index].value = arg;
- if (++section_index > num_sect_opts)
+ if (++section_index == num_sect_opts)
{
num_sect_opts *= 2;
sect_opts = ((struct sect_opt *)
@@ -1888,7 +1888,7 @@
{
sect_opts[section_index].value = arg;
expecting_sec_addr = 0;
- if (++section_index > num_sect_opts)
+ if (++section_index == num_sect_opts)
{
num_sect_opts *= 2;
sect_opts = ((struct sect_opt *)
next reply other threads:[~2006-10-06 14:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-06 14:18 Jean-Marc Saffroy [this message]
2006-10-06 21:27 ` Michael Snyder
2006-10-06 21:59 ` Jean-Marc Saffroy
2006-10-06 23:39 ` Michael Snyder
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=Pine.LNX.4.64.0610061604200.9250@erda.mds \
--to=saffroy@gmail.com \
--cc=gdb-patches@sourceware.org \
/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