New issue
Advanced search Search tips
Starred by 2 users

Issue metadata

Status: Fixed
Closed: Oct 2017
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug

issue 636111

Sign in to add a comment

Issue 763580: char strings only show first character in debugger

Reported by, Sep 8 2017 Project Member

Issue description

Chrome 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.


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)

Comment 1 by, Sep 8 2017

Blocking: 636111
Less important than the other ones, but maybe easy

Comment 2 by, 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() {
int main() {
  Foo o;

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.

Comment 3 by, Sep 13 2017

Status: Assigned (was: Untriaged)
Fixed in LLVM r313203.

Comment 4 by, Oct 20 2017

This is fixed, right?

Comment 5 by, Oct 23 2017

Status: Fixed (was: Assigned)
Yes. (I verified the example from #2 works in VS.)

Sign in to add a comment