[PATCH] Fix range lists issues (dwarf-5)
Kumar N, Bhuvanendra
Bhuvanendra.KumarN@amd.com
Thu Jun 30 12:50:22 GMT 2022
[Public]
Hi,
I went thru your latest changes and they are fine and handle the cases I was trying to push, i.e.
1. proper and correct rangelist offset address dump against DW_AT_ranges
2. in case of multiple CU's, emitting rangelist header for each CU
I was trying to use range_lists array(for DW_FORM_rnglistx) just like loc_offsets(for DW_FORM_loclistx), but fetching it from fetch_indexed_value() is the right thing while printing its value for DW_FORM_rnglistx case, because we would have read DW_AT_rnglists_base already irrespective of DW_AT_rnglists_base comes after or before DW_AT_ranges. All the code changes are fine.
I have 2 minor things to say,
1. in the cases where we fetch values from fetch_indexed_addr(), should we use "addr_index" or "index" itself is fine? because we are fetching it from .debug_addr and emitting. I meant for DW_FORM_loclistx and DW_FORM_rnglistx using index is fine, for else part should we use addr_index or index?
Before fix: <24> DW_AT_low_pc : (addr_index: 0x0): 201e40
After fix: <24> DW_AT_low_pc : (index: 0x0): 201e40
2. in the new function(display_debug_rnglists) added, newline character printing is missing
$ git diff
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index b6746a21274..ec6c3ea9900 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -8203,6 +8203,7 @@ display_debug_rnglists (struct dwarf_section *section)
putchar ('\n');
}
+ putchar ('\n');
return 1;
}
-----Original Message-----
From: Nick Clifton <nickc@redhat.com>
Sent: Wednesday, June 29, 2022 4:48 PM
To: Kumar N, Bhuvanendra <Bhuvanendra.KumarN@amd.com>; binutils@sourceware.org
Cc: George, Jini Susan <JiniSusan.George@amd.com>; Natarajan, Kavitha <Kavitha.Natarajan@amd.com>
Subject: Re: [PATCH] Fix range lists issues (dwarf-5)
[CAUTION: External Email]
Hi Kumar,
> As part of few dwarf-5 fixes planned to be sent one by one, I am requesting review for the next patch in this series. Patch is inlined below, also attached here.
Sorry - my own changes in this space overlap yours. Would you mind refactoring your patch and then resubmitting it ?
Cheers
Nick
More information about the Binutils
mailing list