Bug 24426 – ddemangle.exe appears to not demangle any mangled symbols

Status
NEW
Severity
normal
Priority
P1
Component
tools
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2024-03-01T05:13:22Z
Last change time
2024-03-01T05:27:40Z
Assigned to
No Owner
Creator
Carl Sturtivant

Comments

Comment #0 by sturtivant — 2024-03-01T05:13:22Z
ddemangle.exe supplied with DMD64 Windows does not appear to do what it says it should do. e.g. ``` >echo ?complicated@@YAHH@Z ?complicated@@YAHH@Z >echo ?complicated@@YAHH@Z | ddemangle ?complicated@@YAHH@Z >undname ?complicated@@YAHH@Z Microsoft (R) C++ Name Undecorator Copyright (C) Microsoft Corporation. All rights reserved. Undecoration of :- "?complicated@@YAHH@Z" is :- "int __cdecl complicated(int)" ``` Even with file input, ddemangle appears to do nothing but echo the input. (Input file simply echoed.) ``` >ddemangle libx.nm libx.dll: U libx_NULL_THUNK_DATA 0000000000000000 i .idata$2 0000000000000000 i .idata$4 0000000000000000 i .idata$5 0000000000000000 i .idata$6 0000000001017b8e a @comp.id 0000000000000000 I __IMPORT_DESCRIPTOR_libx U __NULL_IMPORT_DESCRIPTOR libx.dll: 0000000001017b8e a @comp.id 0000000000000000 I __NULL_IMPORT_DESCRIPTOR libx.dll: 0000000000000000 I libx_NULL_THUNK_DATA 0000000001017b8e a @comp.id libx.dll: 0000000000000000 I .idata$4 0000000000000000 I .idata$5 0000000000000000 T .text 0000000000000000 T ?complicated@@YAHH@Z 0000000000000000 I __imp_?complicated@@YAHH@Z U __IMPORT_DESCRIPTOR_libx ```
Comment #1 by sturtivant — 2024-03-01T05:27:40Z
I misunderstood, and thought ddemangle.exe would demangle names from the compatible C/C++ compiler, msvc in this case. But it only demangles D's mangled names.