From: Kevin Buettner <kevinb@cygnus.com>
To: Richard Henderson <rth@redhat.com>
Cc: Daniel Berlin <dberlin@redhat.com>, gdb@sources.redhat.com
Subject: Re: [crash] Section index is uninitialized
Date: Fri, 01 Dec 2000 00:51:00 -0000 [thread overview]
Message-ID: <1001201085134.ZM28276@ocotillo.lan> (raw)
In-Reply-To: <20001130232605.A7627@redhat.com>
On Nov 30, 11:26pm, Richard Henderson wrote:
> On Thu, Nov 30, 2000 at 10:40:52PM -0700, Kevin Buettner wrote:
> > The call to fixup_symbol_section() (which is one line before the line
> > indicated above) should be setting section to the section associated
> > with the minimal symbol. I think we need to find out why
> > fixup_symbol_section() is failing to do this.
>
> Turns out to be more convoluted than that. fixup_symbol_section
> is setting the section to that of the minimal symbol. It's just
> that that is -1 as well.
>
> More pointers? Or, if you like, ~rth/gdb-killer in Sunnyvale.
Try the following patch...
* elfread.c (record_minimal_symbol_and_info): Don't guess
at the section index to use; just use bfd's index.
Index: elfread.c
===================================================================
RCS file: /cvs/src/src/gdb/elfread.c,v
retrieving revision 1.11
diff -u -p -r1.11 elfread.c
--- elfread.c 2000/08/07 15:02:48 1.11
+++ elfread.c 2000/12/01 08:45:34
@@ -171,32 +171,13 @@ record_minimal_symbol_and_info (char *na
enum minimal_symbol_type ms_type, char *info, /* FIXME, is this really char *? */
asection *bfd_section, struct objfile *objfile)
{
- int section;
-
- /* Guess the section from the type. This is likely to be wrong in
- some cases. */
- switch (ms_type)
- {
- case mst_text:
- case mst_file_text:
- section = bfd_section->index;
#ifdef SMASH_TEXT_ADDRESS
- SMASH_TEXT_ADDRESS (address);
+ if (ms_type == mst_text || ms_type == mst_file_text)
+ SMASH_TEXT_ADDRESS (address);
#endif
- break;
- case mst_data:
- case mst_file_data:
- case mst_bss:
- case mst_file_bss:
- section = bfd_section->index;
- break;
- default:
- section = -1;
- break;
- }
return prim_record_minimal_symbol_and_info
- (name, address, ms_type, info, section, bfd_section, objfile);
+ (name, address, ms_type, info, bfd_section->index, bfd_section, objfile);
}
/*
next prev parent reply other threads:[~2000-12-01 0:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-30 17:41 Richard Henderson
2000-11-30 20:36 ` Daniel Berlin
2000-11-30 21:41 ` Kevin Buettner
2000-11-30 23:26 ` Richard Henderson
2000-12-01 0:51 ` Kevin Buettner [this message]
2000-12-01 1:35 ` Richard Henderson
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=1001201085134.ZM28276@ocotillo.lan \
--to=kevinb@cygnus.com \
--cc=dberlin@redhat.com \
--cc=gdb@sources.redhat.com \
--cc=rth@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).