public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug symtab/30276] New: [gdb/symtab] function name is _Dmain instead of "D main"
@ 2023-03-27 10:46 vries at gcc dot gnu.org
  2023-03-27 10:51 ` [Bug symtab/30276] " vries at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2023-03-27 10:46 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30276

            Bug ID: 30276
           Summary: [gdb/symtab] function name is _Dmain instead of "D
                    main"
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: symtab
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

Consider the test-case src/gdb/testsuite/gdb.dlang/simple.d, compiled with the
dmd compiler and debug info:
...
$ dmd src/gdb/testsuite/gdb.dlang/simple.d -g
...

When doing start, we stop at "_Dmain ()":
...
$ gdb -q -batch simple -ex start 
Temporary breakpoint 1 at 0x43844e: file src/gdb/testsuite/gdb.dlang/simple.d,
line 17.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Temporary breakpoint 1, _Dmain () at src/gdb/testsuite/gdb.dlang/simple.d:17
17      }
...

In contrast, without debug info we have instead "D main ()":
...
$ gdb -q -batch simple -ex start 
Temporary breakpoint 1 at 0x438448
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Temporary breakpoint 1, 0x0000000000438448 in D main ()
...

It seems that gdb could know the name, given that the debug info contains:
...
 <1><10a>: Abbrev Number: 3 (DW_TAG_subprogram)
    <10b>   DW_AT_name        : D main
    <112>   DW_AT_MIPS_linkage_name: _Dmain
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

end of thread, other threads:[~2024-04-02 20:08 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-27 10:46 [Bug symtab/30276] New: [gdb/symtab] function name is _Dmain instead of "D main" vries at gcc dot gnu.org
2023-03-27 10:51 ` [Bug symtab/30276] " vries at gcc dot gnu.org
2023-03-27 11:29 ` vries at gcc dot gnu.org
2023-03-27 11:30 ` vries at gcc dot gnu.org
2023-03-27 11:37 ` vries at gcc dot gnu.org
2023-03-27 11:53 ` vries at gcc dot gnu.org
2023-03-27 15:05 ` tromey at sourceware dot org
2024-03-30 20:07 ` tromey at sourceware dot org
2024-03-30 20:09 ` tromey at sourceware dot org
2024-03-30 20:10 ` tromey at sourceware dot org
2024-04-02 20:06 ` cvs-commit at gcc dot gnu.org
2024-04-02 20:08 ` tromey at sourceware dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).