bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/28593] New: DW_AT_specification is not parsed correctly.


From: markus.klein at sma dot de
Subject: [Bug binutils/28593] New: DW_AT_specification is not parsed correctly.
Date: Sat, 13 Nov 2021 23:23:20 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=28593

            Bug ID: 28593
           Summary: DW_AT_specification is not parsed correctly.
           Product: binutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: markus.klein at sma dot de
  Target Milestone: ---

Created attachment 13785
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13785&action=edit
ELF file for reproduction. Start objdump with the following parameters  objdump
-d -S CLANG_STL_Test.elf > CLANG_STL_Test.dasm

If an ELF file with a DW_AT_specification Tag in the DWARF section is opened,
objdump is returning the error: “DWARF error: could not find variable
specification at offset xxx”

This is reproducible with code containing a structure with a static member
which is compiled with clang. Gcc does not use the DW_AT_specification in the
debug information, therefore it is not reproducible here.

I attached an ELF file for reproduction, together with the source code. Start
objdump with the following parameters

objdump -d -S CLANG_STL_Test.elf > CLANG_STL_Test.dasm



Code:

#include <stdint.h>


struct MyStruct
{
  static uint32_t MyStatic;

  uint32_t MyNonStatic;
};

uint32_t MyStruct::MyStatic = 12;

int main(void)
{
  MyStruct myS;
  myS.MyStatic++;

  return 0;
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]