Bug 1104 – CodeView: char is marked 0x20 (T_UCHAR) instead of 0x10 (T_CHAR)

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2007-04-06T08:32:17Z
Last change time
2019-08-22T08:38:15Z
Keywords
DebugInfo, pull
Assigned to
Rainer Schuetze
Creator
Jascha Wetzel

Comments

Comment #0 by jascha — 2007-04-06T08:32:17Z
char is marked in CV data as type 0x20 T_UCHAR - should be 0x10 T_CHAR
Comment #1 by jascha — 2007-04-06T08:38:43Z
better: mark char as 0x70 T_RCHAR (real char) byte is 0x10 T_CHAR ubyte is 0x20 T_UCHAR therefore char shouldn't be any of these two
Comment #2 by jascha — 2007-04-19T11:34:10Z
this problem extends to wchar and dchar with the corresponding 16 and 32bit CV types
Comment #3 by bugzilla — 2007-06-30T00:39:14Z
I can use T_WCHAR (x71) for wchar, but what do I use for dchar?
Comment #4 by jascha — 2007-06-30T10:22:45Z
i'd suggest a static array of 2 T_WCHARs. alternatively, 0x78 seems to be undefined...
Comment #5 by bugzilla — 2007-07-01T14:11:56Z
T_RCHAR and T_WCHAR are now done, but not the dchar one.
Comment #6 by r.sagitario — 2019-07-12T12:56:58Z
https://github.com/microsoft/microsoft-pdb/blob/master/include/cvinfo.h now shows T_CHAR16 = 0x007a, // 16-bit unicode char T_CHAR32 = 0x007b, // 32-bit unicode char
Comment #7 by andrei — 2019-08-20T14:49:47Z
@Rainer is this a D2 issue as well? If so how can we address it?
Comment #8 by r.sagitario — 2019-08-20T21:38:00Z
(In reply to Andrei Alexandrescu from comment #7) > @Rainer is this a D2 issue as well? If so how can we address it? Yes, wchar looks ok, dchar is emitted as an uint, i.e. the character is not displayed in the debugger. VS2019's C++ compiler emits T_CHAR32 for a char32_t variable and displays it correctly, using that with dmd works, too (after a small patch to mago, it shows it as wchar right now). I guess it should be ok to switch to T_CHAR32, ignoring ancient debuggers that might not support it.
Comment #9 by andrei — 2019-08-20T22:36:00Z
@Rainers thanks! I will assign this to you in the interim, feel free to reassign or better yet it would be great to look into it.
Comment #10 by dlang-bot — 2019-08-21T06:34:27Z
@rainers created dlang/dmd pull request #10327 "fix issue 1104 - CodeView: dchar shown as uint in the debugger" fixing this issue: - fix issue 1104 - CodeView: dchar shown as uint in the debugger https://github.com/dlang/dmd/pull/10327
Comment #11 by dlang-bot — 2019-08-21T09:25:59Z
dlang/dmd pull request #10327 "fix issue 1104 - CodeView: dchar shown as uint in the debugger" was merged into master: - d60e03f200df71b17bdd213802208fbcd88e5cb0 by Rainer Schuetze: fix issue 1104 - CodeView: dchar shown as uint in the debugger https://github.com/dlang/dmd/pull/10327
Comment #12 by razvan.nitu1305 — 2019-08-22T08:38:15Z
*** Issue 1430 has been marked as a duplicate of this issue. ***