[PATCH] D135583: [LLVM] Use DWARFv4 bitfields when tuning for GDB
David Spickett via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 10 07:36:46 PDT 2022
DavidSpickett created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
DavidSpickett requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
GDB implemented data_bit_offset in https://sourceware.org/bugzilla/show_bug.cgi?id=12616
which has been present since at least GDB 9.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D135583
Files:
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/test/DebugInfo/X86/bitfields-dwarf4.ll
llvm/test/DebugInfo/X86/packed_bitfields.ll
Index: llvm/test/DebugInfo/X86/packed_bitfields.ll
===================================================================
--- llvm/test/DebugInfo/X86/packed_bitfields.ll
+++ llvm/test/DebugInfo/X86/packed_bitfields.ll
@@ -1,7 +1,5 @@
; RUN: llc -dwarf-version=2 -mtriple x86_64-apple-macosx -O0 -filetype=obj -o %t_2_le.o %s
; RUN: llvm-dwarfdump -v -debug-info %t_2_le.o | FileCheck %s
-; RUN: llc -dwarf-version=4 -debugger-tune=gdb -mtriple x86_64-apple-macosx -O0 -filetype=obj -o %t_4_le.o %s
-; RUN: llvm-dwarfdump -v -debug-info %t_4_le.o | FileCheck %s
; Produced at -O0 from:
; struct {
Index: llvm/test/DebugInfo/X86/bitfields-dwarf4.ll
===================================================================
--- llvm/test/DebugInfo/X86/bitfields-dwarf4.ll
+++ llvm/test/DebugInfo/X86/bitfields-dwarf4.ll
@@ -1,8 +1,5 @@
; RUN: llc -mtriple x86_64-apple-macosx -O0 -filetype=obj -o - %s \
; RUN: | llvm-dwarfdump -v -debug-info - | FileCheck %s
-; RUN: llc -mtriple x86_64-gnu-linux -O0 -filetype=obj -o - %s \
-; RUN: | llvm-dwarfdump -v -debug-info - | FileCheck %s --check-prefix=LINUX
-; LINUX-NOT: DW_AT_data_bit_offset
;
; Generated from:
; #include <stdint.h>
Index: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
===================================================================
--- llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -429,7 +429,7 @@
UseGNUTLSOpcode = tuneForGDB() || DwarfVersion < 3;
// GDB does not fully support the DWARF 4 representation for bitfields.
- UseDWARF2Bitfields = (DwarfVersion < 4) || tuneForGDB();
+ UseDWARF2Bitfields = (DwarfVersion < 4) ;//|| tuneForGDB();
// The DWARF v5 string offsets table has - possibly shared - contributions
// from each compile and type unit each preceded by a header. The string
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135583.466498.patch
Type: text/x-patch
Size: 1826 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221010/e351b9f4/attachment.bin>
More information about the llvm-commits
mailing list