All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] use generic DWARF_DEBUG
@ 2006-05-10  6:36 Atsushi Nemoto
  2006-05-10  7:19 ` Thiemo Seufer
  2006-05-10 14:57 ` Ralf Baechle
  0 siblings, 2 replies; 8+ messages in thread
From: Atsushi Nemoto @ 2006-05-10  6:36 UTC (permalink / raw)
  To: linux-mips; +Cc: ralf

When debugging a kernel compiled by gcc 4.1 with gdb 6.4, gdb could
not show filename, linenumber, etc.  It seems fixed if I used generic
DWARF_DEBUG macro.  Although gcc 3.x seems work without this change,
it would be better to use the generic macro unless there were
something MIPS specific.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>

diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
index 14fa00e..73f7aca 100644
--- a/arch/mips/kernel/vmlinux.lds.S
+++ b/arch/mips/kernel/vmlinux.lds.S
@@ -155,16 +155,9 @@ #endif
      converted to the new style linker.  */
   .stab 0 : { *(.stab) }
   .stabstr 0 : { *(.stabstr) }
-  /* DWARF debug sections.
-     Symbols in the .debug DWARF section are relative to the beginning of the
-     section so we begin .debug at 0.  It's not clear yet what needs to happen
-     for the others.   */
-  .debug          0 : { *(.debug) }
-  .debug_srcinfo  0 : { *(.debug_srcinfo) }
-  .debug_aranges  0 : { *(.debug_aranges) }
-  .debug_pubnames 0 : { *(.debug_pubnames) }
-  .debug_sfnames  0 : { *(.debug_sfnames) }
-  .line           0 : { *(.line) }
+
+  DWARF_DEBUG
+
   /* These must appear regardless of  .  */
   .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
   .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] use generic DWARF_DEBUG
  2006-05-10  6:36 [PATCH] use generic DWARF_DEBUG Atsushi Nemoto
@ 2006-05-10  7:19 ` Thiemo Seufer
  2006-05-10  7:56   ` Atsushi Nemoto
  2006-05-10 12:50   ` Daniel Jacobowitz
  2006-05-10 14:57 ` Ralf Baechle
  1 sibling, 2 replies; 8+ messages in thread
From: Thiemo Seufer @ 2006-05-10  7:19 UTC (permalink / raw)
  To: Atsushi Nemoto; +Cc: linux-mips, ralf

Atsushi Nemoto wrote:
> When debugging a kernel compiled by gcc 4.1 with gdb 6.4, gdb could
> not show filename, linenumber, etc.  It seems fixed if I used generic
> DWARF_DEBUG macro.  Although gcc 3.x seems work without this change,
> it would be better to use the generic macro unless there were
> something MIPS specific.

There was something MIPS specific for n64 (DWARF64) uuntil very
recently. GCC HEAD switched n64 Linux to DWARF32 some days ago.


Thiemo

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] use generic DWARF_DEBUG
  2006-05-10  7:19 ` Thiemo Seufer
@ 2006-05-10  7:56   ` Atsushi Nemoto
  2006-05-10 11:24     ` Thiemo Seufer
  2006-05-10 12:50   ` Daniel Jacobowitz
  1 sibling, 1 reply; 8+ messages in thread
From: Atsushi Nemoto @ 2006-05-10  7:56 UTC (permalink / raw)
  To: ths; +Cc: linux-mips, ralf

On Wed, 10 May 2006 08:19:37 +0100, Thiemo Seufer <ths@networkno.de> wrote:
> There was something MIPS specific for n64 (DWARF64) uuntil very
> recently. GCC HEAD switched n64 Linux to DWARF32 some days ago.

The MIPS specifis issue for n64 is covered by current vmlinux.lds.S ?
If no, the patch would have no bad side-effects.

Also, I suppose we can use STABS_DEBUG too, but not sure.  Current
MIPS vmlinux.lds.S have this line:

  .comment : { *(.comment) }

and it seems conflicts with a .comment line in STABS_DEBUG.  Can we
use generic STABS_DEBUG and drop the .comment line in mips
vmlinux.lds.S ?

---
Atsushi Nemoto

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] use generic DWARF_DEBUG
  2006-05-10  7:56   ` Atsushi Nemoto
@ 2006-05-10 11:24     ` Thiemo Seufer
  2006-05-10 15:41       ` Atsushi Nemoto
  0 siblings, 1 reply; 8+ messages in thread
From: Thiemo Seufer @ 2006-05-10 11:24 UTC (permalink / raw)
  To: Atsushi Nemoto; +Cc: linux-mips, ralf

Atsushi Nemoto wrote:
> On Wed, 10 May 2006 08:19:37 +0100, Thiemo Seufer <ths@networkno.de> wrote:
> > There was something MIPS specific for n64 (DWARF64) uuntil very
> > recently. GCC HEAD switched n64 Linux to DWARF32 some days ago.
> 
> The MIPS specifis issue for n64 is covered by current vmlinux.lds.S ?
> If no, the patch would have no bad side-effects.

Well, I don't know since I don't use gdb on the kernel. I just wanted
to give a heads-up there was a change, your patch might even be a fix
for n64 kernels compiled with latest gcc. :-)

> Also, I suppose we can use STABS_DEBUG too, but not sure.  Current
> MIPS vmlinux.lds.S have this line:
> 
>   .comment : { *(.comment) }
> 
> and it seems conflicts with a .comment line in STABS_DEBUG.  Can we
> use generic STABS_DEBUG and drop the .comment line in mips
> vmlinux.lds.S ?

Isn't stabs in general deprecated by now?


Thiemo

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] use generic DWARF_DEBUG
  2006-05-10  7:19 ` Thiemo Seufer
  2006-05-10  7:56   ` Atsushi Nemoto
@ 2006-05-10 12:50   ` Daniel Jacobowitz
  2006-05-10 14:08     ` Ralf Baechle
  1 sibling, 1 reply; 8+ messages in thread
From: Daniel Jacobowitz @ 2006-05-10 12:50 UTC (permalink / raw)
  To: Thiemo Seufer; +Cc: Atsushi Nemoto, linux-mips, ralf

On Wed, May 10, 2006 at 08:19:37AM +0100, Thiemo Seufer wrote:
> Atsushi Nemoto wrote:
> > When debugging a kernel compiled by gcc 4.1 with gdb 6.4, gdb could
> > not show filename, linenumber, etc.  It seems fixed if I used generic
> > DWARF_DEBUG macro.  Although gcc 3.x seems work without this change,
> > it would be better to use the generic macro unless there were
> > something MIPS specific.
> 
> There was something MIPS specific for n64 (DWARF64) uuntil very
> recently. GCC HEAD switched n64 Linux to DWARF32 some days ago.

Shouldn't affect this.  What Atsushi is deleting are sections for DWARF
_1_, not DWARF _2_; that's ancient history.  I don't know why they need
to be listed at all, though; I've never had a problem, and orphan
placement ought to take care of it.

-- 
Daniel Jacobowitz
CodeSourcery

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] use generic DWARF_DEBUG
  2006-05-10 12:50   ` Daniel Jacobowitz
@ 2006-05-10 14:08     ` Ralf Baechle
  0 siblings, 0 replies; 8+ messages in thread
From: Ralf Baechle @ 2006-05-10 14:08 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: Thiemo Seufer, Atsushi Nemoto, linux-mips

On Wed, May 10, 2006 at 08:50:42AM -0400, Daniel Jacobowitz wrote:

> Shouldn't affect this.  What Atsushi is deleting are sections for DWARF
> _1_, not DWARF _2_; that's ancient history.  I don't know why they need
> to be listed at all, though; I've never had a problem, and orphan
> placement ought to take care of it.

I think this goes back to this file being derived from one of the
binutils generated ld scripts.

  Ralf

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] use generic DWARF_DEBUG
  2006-05-10  6:36 [PATCH] use generic DWARF_DEBUG Atsushi Nemoto
  2006-05-10  7:19 ` Thiemo Seufer
@ 2006-05-10 14:57 ` Ralf Baechle
  1 sibling, 0 replies; 8+ messages in thread
From: Ralf Baechle @ 2006-05-10 14:57 UTC (permalink / raw)
  To: Atsushi Nemoto; +Cc: linux-mips

On Wed, May 10, 2006 at 03:36:04PM +0900, Atsushi Nemoto wrote:

> When debugging a kernel compiled by gcc 4.1 with gdb 6.4, gdb could
> not show filename, linenumber, etc.  It seems fixed if I used generic
> DWARF_DEBUG macro.  Although gcc 3.x seems work without this change,
> it would be better to use the generic macro unless there were
> something MIPS specific.

Okay, applied.

Thanks!

  Ralf

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] use generic DWARF_DEBUG
  2006-05-10 11:24     ` Thiemo Seufer
@ 2006-05-10 15:41       ` Atsushi Nemoto
  0 siblings, 0 replies; 8+ messages in thread
From: Atsushi Nemoto @ 2006-05-10 15:41 UTC (permalink / raw)
  To: ths; +Cc: linux-mips, ralf

On Wed, 10 May 2006 12:24:23 +0100, Thiemo Seufer <ths@networkno.de> wrote:
> > Also, I suppose we can use STABS_DEBUG too, but not sure.  Current
> > MIPS vmlinux.lds.S have this line:
> > 
> >   .comment : { *(.comment) }
> > 
> > and it seems conflicts with a .comment line in STABS_DEBUG.  Can we
> > use generic STABS_DEBUG and drop the .comment line in mips
> > vmlinux.lds.S ?
> 
> Isn't stabs in general deprecated by now?

I think so, but someone might think it's still useful since its size
is much smaller. (less than half or so)

Anyway, how about this patch?


[PATCH] use generic STABS_DEBUG macro.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>

diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
index 73f7aca..b84d1f9 100644
--- a/arch/mips/kernel/vmlinux.lds.S
+++ b/arch/mips/kernel/vmlinux.lds.S
@@ -151,16 +151,13 @@ SECTIONS
 
   /* This is the MIPS specific mdebug section.  */
   .mdebug : { *(.mdebug) }
-  /* These are needed for ELF backends which have not yet been
-     converted to the new style linker.  */
-  .stab 0 : { *(.stab) }
-  .stabstr 0 : { *(.stabstr) }
+
+  STABS_DEBUG
 
   DWARF_DEBUG
 
   /* These must appear regardless of  .  */
   .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
   .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
-  .comment : { *(.comment) }
   .note : { *(.note) }
 }

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-05-10 15:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-10  6:36 [PATCH] use generic DWARF_DEBUG Atsushi Nemoto
2006-05-10  7:19 ` Thiemo Seufer
2006-05-10  7:56   ` Atsushi Nemoto
2006-05-10 11:24     ` Thiemo Seufer
2006-05-10 15:41       ` Atsushi Nemoto
2006-05-10 12:50   ` Daniel Jacobowitz
2006-05-10 14:08     ` Ralf Baechle
2006-05-10 14:57 ` Ralf Baechle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.