From: Elena Zannoni <ezannoni@redhat.com>
To: gdb-patches@sources.redhat.com, nickc@redhat.com
Subject: [PATCH] fix symbol reading for separate debug info
Date: Thu, 26 Jun 2003 21:18:00 -0000 [thread overview]
Message-ID: <16123.25811.278735.90386@localhost.redhat.com> (raw)
This fixes the problem reported by Nick in:
http://sources.redhat.com/ml/gdb-patches/2003-06/msg00409.html
The binutils support for the separate debug info file can now be used. I
think Nick has a couple of fixes for objcopy to check in.
Ah, to generate the separate debug files I did:
/home/ezannoni/uberbaum/installed/bin/strip --strip-debug /home/ezannoni/gdb-sources/tomago/gdb/testsuite/gdb.base/break -o /home/ezannoni/gdb-sources/tomago/gdb/testsuite/gdb.base/break.stripped
/home/ezannoni/uberbaum/installed/bin/strip --only-keep-debug /home/ezannoni/gdb-sources/tomago/gdb/testsuite/gdb.base/break -o /home/ezannoni/sepdebug-binutils/home/ezannoni/gdb-sources/tomago/gdb/testsuite/gdb.base/break.debug
/home/ezannoni/uberbaum/installed/bin/objcopy --add-gnu-debuglink=/home/ezannoni/sepdebug-binutils/home/ezannoni/gdb-sources/tomago/gdb/testsuite/gdb.base/break.debug /home/ezannoni/gdb-sources/tomago/gdb/testsuite/gdb.base/break.stripped /home/ezannoni/gdb-sources/tomago/gdb/testsuite/gdb.base/break
elena
2003-06-26 Elena Zannoni <ezannoni@redhat.com>
* symfile.c (syms_from_objfile): Move variables to inner block.
Move the checks for the non-mainline case a bit earlier to avoid
doing some useless computations.
Index: symfile.c
===================================================================
RCS file: /cvs/uberbaum/gdb/symfile.c,v
retrieving revision 1.100
diff -u -p -r1.100 symfile.c
--- symfile.c 22 Jun 2003 18:32:49 -0000 1.100
+++ symfile.c 26 Jun 2003 20:43:20 -0000
@@ -566,12 +566,8 @@ syms_from_objfile (struct objfile *objfi
int mainline,
int verbo)
{
- asection *lower_sect;
- asection *sect;
- CORE_ADDR lower_offset;
struct section_addr_info *local_addr = NULL;
struct cleanup *old_chain;
- int i;
gdb_assert (! (addrs && offsets));
@@ -626,8 +622,13 @@ syms_from_objfile (struct objfile *objfi
We no longer warn if the lowest section is not a text segment (as
happens for the PA64 port. */
- if (!mainline)
+ if (!mainline && addrs && addrs->other[0].name)
{
+ asection *lower_sect;
+ asection *sect;
+ CORE_ADDR lower_offset;
+ int i;
+
/* Find lowest loadable section to be used as starting point for
continguous sections. FIXME!! won't work without call to find
.text first, but this assumes text is lowest section. */
@@ -659,9 +660,7 @@ syms_from_objfile (struct objfile *objfi
(the loadable section directly below it in memory).
this_offset = lower_offset = lower_addr - lower_orig_addr */
- /* Calculate offsets for sections. */
- if (addrs)
- for (i=0 ; i < addrs->num_sections && addrs->other[i].name; i++)
+ for (i = 0; i < addrs->num_sections && addrs->other[i].name; i++)
{
if (addrs->other[i].addr != 0)
{
next reply other threads:[~2003-06-26 21:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-26 21:18 Elena Zannoni [this message]
2003-06-27 8:01 ` Nick Clifton
2003-06-27 13:36 ` Elena Zannoni
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=16123.25811.278735.90386@localhost.redhat.com \
--to=ezannoni@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=nickc@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