From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4828D3858CDA; Mon, 27 Mar 2023 10:46:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4828D3858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1679914006; bh=Eb/ieo5+oNPIsXGvFgRUDyE7KsHfCXYT7nOockIAVnY=; h=From:To:Subject:Date:From; b=CRbmlUdU2lq0v0/mYQjdjavy7CFQRdqGv+TB62kxMudpExR9Y/ftCZFFei6ChKJ+R SHmaS59SrclNHCXTuqt/OmcXVGXfUGKVh+YoFHKO2o8hSAizi0WD8HdAFYZYa5Dec+ WyBxe6/5ffLSQWASf4GDscVXjmzXHm62I7h5UkD8= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug symtab/30276] New: [gdb/symtab] function name is _Dmain instead of "D main" Date: Mon, 27 Mar 2023 10:46:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: symtab X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30276 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=20 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=20 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 ... --=20 You are receiving this mail because: You are on the CC list for the bug.=