char strings only show first character in debugger |
|||
Issue descriptionChrome Version: 63.0.3209.2 OS: Windows As noted in issue 761633 , some char strings are not fully expanding in the debugger when debugging a clang build. Example: MSVS (63.0.3209.0) =00007ff8`d10e7bc0 kNotPresent : [0] "internal-not-yet-present" =00007ff8`d10e7ba8 kPDFExtensionPluginName : [0] "Chrome PDF Viewer" =00007ff8`d0bd6330 kPDFInternalPluginName : [0] "Chrome PDF Plugin" =00007ff8`d0bd60d8 kPDFPluginPath : [0] "internal-pdf-viewer" =00007ff8`cdec0000 kRemotingViewerPluginPath : [0] "MZ???" clang (63.0.3209.2) =000007fe`d3de7540 kNotPresent : [1] "i" =000007fe`d3de7560 kPDFExtensionPluginName : [1] "C" =000007fe`d3de7580 kPDFInternalPluginName : [1] "C" =000007fe`d3de75a0 kPDFPluginPath : [1] "i" =000007fe`d0480000 kRemotingViewerPluginPath : [1] "M" maybe clang is typing these wrong for windbg? original cdb output files (Google access only) https://drive.google.com/drive/folders/0BzKr4yVrnrZNM3BZODhReDR4d3c?usp=sharing
,
Sep 11 2017
Small reproducer:
extern "C" int puts(const char *);
struct Foo {
static const char str[];
void doit();
};
const char Foo::str[] = "asdf";
void Foo::doit() {
puts(Foo::str);
}
int main() {
Foo o;
o.doit();
}
LLVM gets confused because it thinks that Foo::str is a VLA, so it says sizeof(Foo::str) = sizeof(char), which is the same as saying it has one element.
We're supposed to have two types for Foo::str: one for the forward declaration, and one for the definition (with five elements). The forward declaration should have a zero size, and the definition should be sized.
This should be pretty simple.
,
Sep 13 2017
,
Oct 20 2017
This is fixed, right?
,
Oct 23 2017
Yes. (I verified the example from #2 works in VS.) |
|||
►
Sign in to add a comment |
|||
Comment 1 by thakis@chromium.org
, Sep 8 2017Cc: r...@chromium.org