* [Bug symtab/28094] Support executable with only line debug section
2021-07-15 14:26 [Bug symtab/28094] New: Support executable with only line debug section vries at gcc dot gnu.org
@ 2021-07-15 14:30 ` vries at gcc dot gnu.org
2021-07-15 14:33 ` [Bug symtab/28094] Support executable with only line debug section(s) vries at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2021-07-15 14:30 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28094
--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
I also found that gold has some option (
https://sourceware.org/legacy-ml/binutils/2008-05/msg00232.html ):
...
$ gcc -fuse-ld=gold -Wl,--strip-debug-non-line hello.c -g
...
which gives better results:
...
$ gdb -q a.out -ex start
Reading symbols from a.out...
Temporary breakpoint 1 at 0x4005cf: file hello.c, line 7.
Starting program: /home/vries/a.out
Temporary breakpoint 1, main () at hello.c:7
7 void *p = malloc (10);
(gdb)
...
We could use a test-case with strip-debug-non-line.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug symtab/28094] Support executable with only line debug section(s)
2021-07-15 14:26 [Bug symtab/28094] New: Support executable with only line debug section vries at gcc dot gnu.org
2021-07-15 14:30 ` [Bug symtab/28094] " vries at gcc dot gnu.org
@ 2021-07-15 14:33 ` vries at gcc dot gnu.org
2021-07-15 14:34 ` vries at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2021-07-15 14:33 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28094
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Support executable with |Support executable with
|only line debug section |only line debug section(s)
--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
Update $summary. For dwarf 5, we have .debug_line and .debug_line_str.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug symtab/28094] Support executable with only line debug section(s)
2021-07-15 14:26 [Bug symtab/28094] New: Support executable with only line debug section vries at gcc dot gnu.org
2021-07-15 14:30 ` [Bug symtab/28094] " vries at gcc dot gnu.org
2021-07-15 14:33 ` [Bug symtab/28094] Support executable with only line debug section(s) vries at gcc dot gnu.org
@ 2021-07-15 14:34 ` vries at gcc dot gnu.org
2021-07-15 14:56 ` vries at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2021-07-15 14:34 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28094
--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #1)
> I also found that gold has some option (
> https://sourceware.org/legacy-ml/binutils/2008-05/msg00232.html ):
FWIW, this is a patch for lld to add the same option, which describes the
functionality a bit more verbosely: https://reviews.llvm.org/D46628?id=206198
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug symtab/28094] Support executable with only line debug section(s)
2021-07-15 14:26 [Bug symtab/28094] New: Support executable with only line debug section vries at gcc dot gnu.org
` (2 preceding siblings ...)
2021-07-15 14:34 ` vries at gcc dot gnu.org
@ 2021-07-15 14:56 ` vries at gcc dot gnu.org
2021-07-15 15:09 ` vries at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2021-07-15 14:56 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28094
--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
I've also tried strip-debug-non-line in combination with dwarf-5, but even with
gold build from trunk:
...
$ PATH=~/binutils/install/bin:$PATH gcc -fuse-ld=gold
-Wl,--strip-debug-non-line hello.c -g -gdwarf-5
/home/vries/binutils/install/bin/ld.gold: warning: Invalid DIE in debug info;
failed to reduce debug info
/home/vries/binutils/install/bin/ld.gold: internal error in finalize_data_size,
at /home/vries/binutils/src/gold/output.h:355
collect2: error: ld returned 1 exit status
...
It looks like the option didn't get its dwarf-5 update yet.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug symtab/28094] Support executable with only line debug section(s)
2021-07-15 14:26 [Bug symtab/28094] New: Support executable with only line debug section vries at gcc dot gnu.org
` (3 preceding siblings ...)
2021-07-15 14:56 ` vries at gcc dot gnu.org
@ 2021-07-15 15:09 ` vries at gcc dot gnu.org
2021-07-15 15:28 ` pedro at palves dot net
2021-07-16 11:51 ` vries at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2021-07-15 15:09 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28094
--- Comment #5 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #4)
> I've also tried strip-debug-non-line in combination with dwarf-5, but even
> with gold build from trunk:
> ...
> $ PATH=~/binutils/install/bin:$PATH gcc -fuse-ld=gold
> -Wl,--strip-debug-non-line hello.c -g -gdwarf-5
> /home/vries/binutils/install/bin/ld.gold: warning: Invalid DIE in debug
> info; failed to reduce debug info
> /home/vries/binutils/install/bin/ld.gold: internal error in
> finalize_data_size, at /home/vries/binutils/src/gold/output.h:355
> collect2: error: ld returned 1 exit status
> ...
>
> It looks like the option didn't get its dwarf-5 update yet.
Filed PR28095 - "--strip-debug-non-line doesn't work with dwarf-5"
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug symtab/28094] Support executable with only line debug section(s)
2021-07-15 14:26 [Bug symtab/28094] New: Support executable with only line debug section vries at gcc dot gnu.org
` (4 preceding siblings ...)
2021-07-15 15:09 ` vries at gcc dot gnu.org
@ 2021-07-15 15:28 ` pedro at palves dot net
2021-07-16 11:51 ` vries at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: pedro at palves dot net @ 2021-07-15 15:28 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28094
Pedro Alves <pedro at palves dot net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pedro at palves dot net
--- Comment #6 from Pedro Alves <pedro at palves dot net> ---
Also, Clang has "-gline-tables-only". I think the "--strip-debug-non-line" lld
patch was never merged because it was considered legacy, as in, it's better to
not emit the debug info in the first place, with "-gline-tables-only".
I'm not aware of a an equivalent option in GCC.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug symtab/28094] Support executable with only line debug section(s)
2021-07-15 14:26 [Bug symtab/28094] New: Support executable with only line debug section vries at gcc dot gnu.org
` (5 preceding siblings ...)
2021-07-15 15:28 ` pedro at palves dot net
@ 2021-07-16 11:51 ` vries at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2021-07-16 11:51 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28094
--- Comment #7 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Pedro Alves from comment #6)
> Also, Clang has "-gline-tables-only". I think the "--strip-debug-non-line"
> lld patch was never merged because it was considered legacy, as in, it's
> better to not emit the debug info in the first place, with
> "-gline-tables-only".
>
Ack, interesting, thanks.
> I'm not aware of a an equivalent option in GCC.
Filed gcc PR https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101470 .
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread