Bug 18140 - duplicate DW_TAG_label's in dwarf cause ICE
Summary: duplicate DW_TAG_label's in dwarf cause ICE
Status: RESOLVED DUPLICATE of bug 26544
Alias: None
Product: gdb
Classification: Unclassified
Component: breakpoints (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-18 16:50 UTC by aldyh
Modified: 2020-08-27 11:54 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description aldyh 2015-03-18 16:50:52 UTC
This is incorrect dwarf that I mistakenly generated in GCC's debug-early project.  I am generating two DW_TAG_label's for the same source label, and of of them doesn't have line information.

reynosa:/build/dearly/gcc$ cat a.c
int
main ()
{
here:
  return 0;
}

Faulty dwarf is:

 <2><4e>: Abbrev Number: 3 (DW_TAG_label)
    <4f>   DW_AT_name        : (indirect string, offset: 0x0): here     
    <53>   DW_AT_decl_file   : 1        
    <54>   DW_AT_decl_line   : 4        
 <2><55>: Abbrev Number: 4 (DW_TAG_label)
    <56>   DW_AT_name        : (indirect string, offset: 0x0): here     
    <5a>   DW_AT_decl_file   : 1        
    <5b>   DW_AT_decl_line   : 4        
    <5c>   DW_AT_low_pc      : 0x4004ca 

End result:

(gdb) b main
Breakpoint 1 at 0x4004ca: file a.c, line 5.
(gdb) r
Starting program: /home/build/dearly/gcc/a.out

Breakpoint 1, main () at a.c:5
5         return 0;
(gdb) b here
/source/binutils-gdb/gdb/linespec.c:2459: internal-error: decode_line_full: Assertion `result.nelts == 1 || canonical->pre_expanded' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n)
Comment 1 Tom de Vries 2020-08-27 11:54:50 UTC
Duplicate.

*** This bug has been marked as a duplicate of bug 26544 ***