Bug 1732593

Summary: clang++ -g does not emit debugging info for some types
Product: [Fedora] Fedora Reporter: baconeater789
Component: clangAssignee: Tom Stellard <tstellar>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 30CC: airlied, jan.kratochvil, sbergman, sguelton, siddharth.kde, tstellar
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-12-18 18:29:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description baconeater789 2019-07-23 20:06:34 UTC
Description of problem:

"clang++ -g main.cc" does not emit debugging information for certain types such as std::string.

Version-Release number of selected component (if applicable):

clang-8.0.0-1.fc30.x86_64

How reproducible:

Always

Steps to Reproduce:
1. std::string my_string{"foo"}
2. Set a breakpoint in lldb past the string declaration
3. In LLDB: "frame var --raw my_string"

Actual results:

(std::string) my_string = {}

Expected results:

(std::string) my_string = {
  _M_dataplus = {
    _M_p = 0x00007fffffffd618
  }
  _M_string_length = 3
   = {
    _M_local_buf = {
      [0] = 'f'
      [1] = 'o'
      [2] = 'o'
      [3] = '\0'
      [4] = '\0'
      [5] = '\0'
      [6] = '\0'
      [7] = '\0'
      [8] = '\x10'
      [9] = '\xd7'
      [10] = '\xff'
      [11] = '\xff'
      [12] = '\xff'
      [13] = '\x7f'
      [14] = '\0'
      [15] = '\0'
    }
    _M_allocated_capacity = 7303014
  }
}


Additional info:

Debug information is produced as expected on Ubuntu 19.04 with "clang++ -g main.cc".

Debug information is included if built with "clang++ -g -fno-limit-debug-info main.cc".  I believe "-g" should include debug information though.

Comment 1 Jan Kratochvil 2019-12-18 18:29:28 UTC
It is being worked on - missing DWZ support in LLDB.  It is already tracked by Bug 1740927.

*** This bug has been marked as a duplicate of bug 1740927 ***