https://github.com/augusto2112 updated
https://github.com/llvm/llvm-project/pull/69741
>From 997da625fda1efebde43ec965c23c1a8ef9c0132 Mon Sep 17 00:00:00 2001
From: Augusto Noronha
Date: Fri, 10 Nov 2023 10:40:05 -0800
Subject: [PATCH] Emit DIE's size in bits when size is not a multiple of 8
@@ -2866,8 +2879,12 @@ void DWARFASTParserClang::ParseSingleMember(
// Get the parent byte size so we can verify any members will fit
const uint64_t parent_byte_size =
parent_die.GetAttributeValueAsUnsigned(DW_AT_byte_size, UINT64_MAX);
- const uint64_t
@@ -2210,9 +2216,16 @@ bool DWARFASTParserClang::CompleteRecordType(const
DWARFDIE ,
!layout_info.vbase_offsets.empty()) {
if (type)
layout_info.bit_size = type->GetByteSize(nullptr).value_or(0) * 8;
-if (layout_info.bit_size == 0)
-
@@ -2210,9 +2216,16 @@ bool DWARFASTParserClang::CompleteRecordType(const
DWARFDIE ,
!layout_info.vbase_offsets.empty()) {
if (type)
layout_info.bit_size = type->GetByteSize(nullptr).value_or(0) * 8;
-if (layout_info.bit_size == 0)
-
@@ -298,6 +298,12 @@ ParsedDWARFTypeAttributes::ParsedDWARFTypeAttributes(const
DWARFDIE ) {
byte_size = form_value.Unsigned();
break;
+case DW_AT_bit_size:
+ // Convert the bit size to byte size, and round it up to the minimum
about
+ // of bytes
@@ -298,6 +298,12 @@ ParsedDWARFTypeAttributes::ParsedDWARFTypeAttributes(const
DWARFDIE ) {
byte_size = form_value.Unsigned();
break;
+case DW_AT_bit_size:
+ // Convert the bit size to byte size, and round it up to the minimum
about
+ // of bytes
@@ -2866,8 +2879,12 @@ void DWARFASTParserClang::ParseSingleMember(
// Get the parent byte size so we can verify any members will fit
const uint64_t parent_byte_size =
parent_die.GetAttributeValueAsUnsigned(DW_AT_byte_size, UINT64_MAX);
- const uint64_t
augusto2112 wrote:
@dwblaikie I talked with Adrian, his idea is to emit the size in bits whenever
it does not cleanly fit in a byte. His point (and I agree) is that there may be
tools that can use this bit size, and if we always round up when emitting the
DWARF we will lose this information,
https://github.com/augusto2112 edited
https://github.com/llvm/llvm-project/pull/69741
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/augusto2112 updated
https://github.com/llvm/llvm-project/pull/69741
>From b34b8f1786a6fb274710c5e4318bad83b04b0480 Mon Sep 17 00:00:00 2001
From: Augusto Noronha
Date: Fri, 20 Oct 2023 10:18:03 -0700
Subject: [PATCH] Fix size in bytes of type DIEs when size in bits is not a
10 matches
Mail list logo