From: Andreas Schwab <schwab@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH] gdb: Support DW_LLE_start_end
Date: Mon, 21 Jun 2021 11:50:03 +0200 [thread overview]
Message-ID: <mvmpmwfeed0.fsf@suse.de> (raw)
Without that it is impossible to debug on riscv64.
gdb/
PR symtab/27999
* dwarf2/loc.c (decode_debug_loclists_addresses): Support
DW_LLE_start_end.
---
gdb/dwarf2/loc.c | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/gdb/dwarf2/loc.c b/gdb/dwarf2/loc.c
index b7e30e3cb4a..d57cdc165ba 100644
--- a/gdb/dwarf2/loc.c
+++ b/gdb/dwarf2/loc.c
@@ -255,9 +255,27 @@ decode_debug_loclists_addresses (dwarf2_per_cu_data *per_cu,
*new_ptr = loc_ptr;
return DEBUG_LOC_OFFSET_PAIR;
+ case DW_LLE_start_end:
+ if (loc_ptr + 2 * addr_size > buf_end)
+ return DEBUG_LOC_BUFFER_OVERFLOW;
+
+ if (signed_addr_p)
+ *low = extract_signed_integer (loc_ptr, addr_size, byte_order);
+ else
+ *low = extract_unsigned_integer (loc_ptr, addr_size, byte_order);
+
+ loc_ptr += addr_size;
+ if (signed_addr_p)
+ *high = extract_signed_integer (loc_ptr, addr_size, byte_order);
+ else
+ *high = extract_unsigned_integer (loc_ptr, addr_size, byte_order);
+
+ loc_ptr += addr_size;
+ *new_ptr = loc_ptr;
+ return DEBUG_LOC_START_END;
+
/* Following cases are not supported yet. */
case DW_LLE_startx_endx:
- case DW_LLE_start_end:
case DW_LLE_default_location:
default:
return DEBUG_LOC_INVALID_ENTRY;
--
2.31.1
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
next reply other threads:[~2021-06-21 9:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-21 9:50 Andreas Schwab [this message]
2021-06-21 17:02 ` Simon Marchi
2021-06-22 12:24 ` Andreas Schwab
2021-06-22 13:36 ` Simon Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=mvmpmwfeed0.fsf@suse.de \
--to=schwab@suse.de \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).