From: Jim Blandy <jimb@zwingli.cygnus.com>
To: Fernando Nasser <fnasser@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: RFA: [dwarf2read.c] Avoid using section index if not yet set
Date: Fri, 11 May 2001 13:38:00 -0000 [thread overview]
Message-ID: <npu22rpqmb.fsf@zwingli.cygnus.com> (raw)
In-Reply-To: <3AFB90A7.D8F37C43@redhat.com>
This patch is not approved.
At the moment, GDB isn't really designed to read debug info from .o
files. I have no objection to enhancing GDB to provide this support,
but it's ridiculous to try to do it by running GDB, looking to see
where it crashes, and adding `if' statements to keep that code from
being executed.
The author of the patch needs to provide a complete story explaining
how loading .o files will work. In particular, I want to know how
they will provide values for undefined symbols referenced in the .o
file. The absence of a coherent answer to that question is the
underlying cause of the crash this patch attempts to plaster over.
> * dwarf2read.c (new_symbol): Do not attempt to use the section
> index of a symbol if it is not yet set.
>
> Index: dwarf2read.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/dwarf2read.c,v
> retrieving revision 1.24
> diff -c -p -r1.24 dwarf2read.c
> *** dwarf2read.c 2001/04/30 10:30:27 1.24
> --- dwarf2read.c 2001/05/10 23:06:28
> *************** new_symbol (struct die_info *die, struct
> *** 4195,4203 ****
> if (SYMBOL_VALUE_ADDRESS (sym))
> {
> fixup_symbol_section (sym, objfile);
> ! SYMBOL_VALUE_ADDRESS (sym) +=
> ! ANOFFSET (objfile->section_offsets,
> ! SYMBOL_SECTION (sym));
> SYMBOL_CLASS (sym) = LOC_STATIC;
> }
> else
> --- 4195,4204 ----
> if (SYMBOL_VALUE_ADDRESS (sym))
> {
> fixup_symbol_section (sym, objfile);
> ! if (SYMBOL_SECTION (sym) != -1)
> ! SYMBOL_VALUE_ADDRESS (sym) +=
> ! ANOFFSET (objfile->section_offsets,
> ! SYMBOL_SECTION (sym));
> SYMBOL_CLASS (sym) = LOC_STATIC;
> }
> else
next prev parent reply other threads:[~2001-05-11 13:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3AFB90A7.D8F37C43@redhat.com>
2001-05-11 1:10 ` Kevin Buettner
2001-05-11 13:38 ` Jim Blandy [this message]
2001-05-11 13:58 ` Fernando Nasser
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=npu22rpqmb.fsf@zwingli.cygnus.com \
--to=jimb@zwingli.cygnus.com \
--cc=fnasser@redhat.com \
--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