Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Starred by 2 users
Status: Assigned
Owner:
Cc:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug

Blocking:
issue 636111



Sign in to add a comment
char strings only show first character in debugger
Project Member Reported by wfh@chromium.org, Sep 8 Back to list
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.

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
 
Blocking: 636111
Cc: r...@chromium.org
Less important than the other ones, but maybe easy
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.
Owner: r...@chromium.org
Status: Assigned
Fixed in LLVM r313203.
Sign in to add a comment