* [PATCH] binutils: dwarf.c handle DWARF5 DW_LLE_start_end and DW_LLE_start_length.
@ 2020-09-29 10:14 Mark Wielaard
2020-09-29 11:44 ` Nick Clifton
2020-09-29 15:23 ` Nick Clifton
0 siblings, 2 replies; 3+ messages in thread
From: Mark Wielaard @ 2020-09-29 10:14 UTC (permalink / raw)
To: binutils; +Cc: Mark Wielaard
display_loclists_list only handled DW_LLE_offset_pair as bounded
location description. Also handle DW_LLE_start_end and DW_LLE_start_lenght.
These don't use the base_address.
binutils/ChangeLog:
* dwarf.c (display_loclists_list): Handle DW_LLE_start_end and
DW_LLE_start_length. Only add base_address for DW_LLE_offset_pair.
---
binutils/ChangeLog | 5 +++++
binutils/dwarf.c | 23 +++++++++++++++++++----
2 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 59750dd1a2..4838c80d31 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+2020-09-29 Mark Wielaard <mark@klomp.org>
+
+ * dwarf.c (display_loclists_list): Handle DW_LLE_start_end and
+ DW_LLE_start_length. Only add base_address for DW_LLE_offset_pair.
+
2020-09-25 Alan Modra <amodra@gmail.com>
* elfcomm.c (byte_put_little_endian, byte_put_big_endian): Support
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index 5f32e957a0..e152b20438 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -6055,7 +6055,9 @@ display_loclists_list (struct dwarf_section *section,
SAFE_BYTE_GET_AND_INC (llet, start, 1, section_end);
- if (vstart && llet == DW_LLE_offset_pair)
+ if (vstart && (llet == DW_LLE_offset_pair
+ || llet == DW_LLE_start_end
+ || llet == DW_LLE_start_length))
{
off = offset + (vstart - *start_ptr);
@@ -6076,7 +6078,18 @@ display_loclists_list (struct dwarf_section *section,
break;
case DW_LLE_offset_pair:
READ_ULEB (begin, start, section_end);
+ begin += base_address;
READ_ULEB (end, start, section_end);
+ end += base_address;
+ break;
+ case DW_LLE_start_end:
+ SAFE_BYTE_GET_AND_INC (begin, start, pointer_size, section_end);
+ SAFE_BYTE_GET_AND_INC (end, start, pointer_size, section_end);
+ break;
+ case DW_LLE_start_length:
+ SAFE_BYTE_GET_AND_INC (begin, start, pointer_size, section_end);
+ READ_ULEB (end, start, section_end);
+ end += begin;
break;
case DW_LLE_base_address:
SAFE_BYTE_GET_AND_INC (base_address, start, pointer_size,
@@ -6103,7 +6116,9 @@ display_loclists_list (struct dwarf_section *section,
}
if (llet == DW_LLE_end_of_list)
break;
- if (llet != DW_LLE_offset_pair)
+ if (llet != DW_LLE_offset_pair
+ && llet != DW_LLE_start_end
+ && llet != DW_LLE_start_length)
continue;
if (start + 2 > section_end)
@@ -6115,8 +6130,8 @@ display_loclists_list (struct dwarf_section *section,
READ_ULEB (length, start, section_end);
- print_dwarf_vma (begin + base_address, pointer_size);
- print_dwarf_vma (end + base_address, pointer_size);
+ print_dwarf_vma (begin, pointer_size);
+ print_dwarf_vma (end, pointer_size);
putchar ('(');
need_frame_base = decode_location_expression (start,
--
2.20.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] binutils: dwarf.c handle DWARF5 DW_LLE_start_end and DW_LLE_start_length.
2020-09-29 10:14 [PATCH] binutils: dwarf.c handle DWARF5 DW_LLE_start_end and DW_LLE_start_length Mark Wielaard
@ 2020-09-29 11:44 ` Nick Clifton
2020-09-29 15:23 ` Nick Clifton
1 sibling, 0 replies; 3+ messages in thread
From: Nick Clifton @ 2020-09-29 11:44 UTC (permalink / raw)
To: Mark Wielaard, binutils
Hi Mark,
> > binutils/ChangeLog:
>
> * dwarf.c (display_loclists_list): Handle DW_LLE_start_end and
> DW_LLE_start_length. Only add base_address for DW_LLE_offset_pair.
Approved - please apply.
Cheers
Nick
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] binutils: dwarf.c handle DWARF5 DW_LLE_start_end and DW_LLE_start_length.
2020-09-29 10:14 [PATCH] binutils: dwarf.c handle DWARF5 DW_LLE_start_end and DW_LLE_start_length Mark Wielaard
2020-09-29 11:44 ` Nick Clifton
@ 2020-09-29 15:23 ` Nick Clifton
1 sibling, 0 replies; 3+ messages in thread
From: Nick Clifton @ 2020-09-29 15:23 UTC (permalink / raw)
To: Mark Wielaard, binutils
Hi Mark,
> binutils/ChangeLog:
>
> * dwarf.c (display_loclists_list): Handle DW_LLE_start_end and
> DW_LLE_start_length. Only add base_address for DW_LLE_offset_pair.
Approved - please apply.
Cheers
Nick
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-29 15:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-29 10:14 [PATCH] binutils: dwarf.c handle DWARF5 DW_LLE_start_end and DW_LLE_start_length Mark Wielaard
2020-09-29 11:44 ` Nick Clifton
2020-09-29 15:23 ` Nick Clifton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).