* [PATCH] debug_str_offsets header version and padding are 2 bytes, not 4 bytes
@ 2024-05-15 22:02 Mark Wielaard
2024-05-20 11:29 ` Mark Wielaard
0 siblings, 1 reply; 2+ messages in thread
From: Mark Wielaard @ 2024-05-15 22:02 UTC (permalink / raw)
To: debugedit; +Cc: Mark Wielaard
Reading too much bytes for the header made debugedit skip the first
actual string offsets table entry.
Signed-off-by: Mark Wielaard <mark@klomp.org>
---
tools/debugedit.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/debugedit.c b/tools/debugedit.c
index 1a46c13dee47..cbfe70970743 100644
--- a/tools/debugedit.c
+++ b/tools/debugedit.c
@@ -2724,10 +2724,10 @@ update_str_offsets (DSO *dso)
if (unit_length == 0xffffffff || endp - ptr < unit_length)
break;
unsigned char *endidxp = ptr + unit_length;
- uint32_t version = read_32 (ptr);
+ uint32_t version = read_16 (ptr);
if (version != 5)
break;
- uint32_t padding = read_32 (ptr);
+ uint32_t padding = read_16 (ptr);
if (padding != 0)
break;
--
2.39.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] debug_str_offsets header version and padding are 2 bytes, not 4 bytes
2024-05-15 22:02 [PATCH] debug_str_offsets header version and padding are 2 bytes, not 4 bytes Mark Wielaard
@ 2024-05-20 11:29 ` Mark Wielaard
0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2024-05-20 11:29 UTC (permalink / raw)
To: debugedit
Hi,
On Thu, May 16, 2024 at 12:02:08AM +0200, Mark Wielaard wrote:
> Reading too much bytes for the header made debugedit skip the first
> actual string offsets table entry.
Pushed to main. This solved the main issue with clang -gdwarf-5
generated .debug_str_offsets. Last remaining issue is the handling
.debug_macro with strx forms.
Cheers,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-05-20 11:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-15 22:02 [PATCH] debug_str_offsets header version and padding are 2 bytes, not 4 bytes Mark Wielaard
2024-05-20 11:29 ` Mark Wielaard
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).