This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Fix library segment-address for 64bit values
- From: "Hannes Domani via gdb-patches" <gdb-patches at sourceware dot org>
- To: gdb-patches at sourceware dot org
- Date: Tue, 28 Jan 2020 18:37:35 +0100
- Subject: [PATCH] Fix library segment-address for 64bit values
- References: <20200128173735.3584-1-ssbssa.ref@yahoo.de>
- Reply-to: Hannes Domani <ssbssa at yahoo dot de>
The address was written as a long value, but long is always a 32bit value
on Windows.
The solution was to use paddress instead.
gdb/gdbserver/ChangeLog:
2020-01-28 Hannes Domani <ssbssa@yahoo.de>
* server.c (handle_qxfer_libraries): Write segment-address with
paddress.
---
gdb/gdbserver/server.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index 17e79a6ea0..3fc026f78e 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -1548,8 +1548,8 @@ handle_qxfer_libraries (const char *annex,
for (const dll_info &dll : all_dlls)
document += string_printf
- (" <library name=\"%s\"><segment address=\"0x%lx\"/></library>\n",
- dll.name.c_str (), (long) dll.base_addr);
+ (" <library name=\"%s\"><segment address=\"0x%s\"/></library>\n",
+ dll.name.c_str (), paddress (dll.base_addr));
document += "</library-list>\n";
--
2.25.0