* [PATCH] fix symbol reading for separate debug info
@ 2003-06-26 21:18 Elena Zannoni
2003-06-27 8:01 ` Nick Clifton
2003-06-27 13:36 ` Elena Zannoni
0 siblings, 2 replies; 3+ messages in thread
From: Elena Zannoni @ 2003-06-26 21:18 UTC (permalink / raw)
To: gdb-patches, nickc
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)
{
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fix symbol reading for separate debug info
2003-06-26 21:18 [PATCH] fix symbol reading for separate debug info Elena Zannoni
@ 2003-06-27 8:01 ` Nick Clifton
2003-06-27 13:36 ` Elena Zannoni
1 sibling, 0 replies; 3+ messages in thread
From: Nick Clifton @ 2003-06-27 8:01 UTC (permalink / raw)
To: gdb-patches
Hi Guys,
> Elena Zannoni <ezannoni@redhat.com> writes:
> 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.
Yup - I have just checked it in.
Cheers
Nick
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fix symbol reading for separate debug info
2003-06-26 21:18 [PATCH] fix symbol reading for separate debug info Elena Zannoni
2003-06-27 8:01 ` Nick Clifton
@ 2003-06-27 13:36 ` Elena Zannoni
1 sibling, 0 replies; 3+ messages in thread
From: Elena Zannoni @ 2003-06-27 13:36 UTC (permalink / raw)
To: gdb-patches; +Cc: nickc
committed to gdb6 branch and trunk.
elena
Elena Zannoni writes:
>
> 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)
> {
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-06-27 13:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-26 21:18 [PATCH] fix symbol reading for separate debug info Elena Zannoni
2003-06-27 8:01 ` Nick Clifton
2003-06-27 13:36 ` Elena Zannoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox