From a2236a08440996fe2adb5f9b61926db9a9e8c8c3 Mon Sep 17 00:00:00 2001 From: Hannes Domani Date: Tue, 28 Jan 2020 18:24:31 +0100 Subject: [PATCH] Fix library segment-address for 64bit values The address was written as a long value, but long is always a 32bit value on Windows, which lead to truncated addresses. The solution was to use paddress instead. gdb/gdbserver/ChangeLog: 2020-01-28 Hannes Domani * server.c (handle_qxfer_libraries): Write segment-address with paddress. --- gdb/gdbserver/ChangeLog | 5 +++++ gdb/gdbserver/server.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index aeb9cb6c778..a97e4082020 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,8 @@ +2020-01-28 Hannes Domani + + * server.c (handle_qxfer_libraries): Write segment-address with + paddress. + 2020-01-24 Hannes Domani * Makefile.in (install-strip): New target. diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c index 17e79a6ea01..3fc026f78eb 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 - (" \n", - dll.name.c_str (), (long) dll.base_addr); + (" \n", + dll.name.c_str (), paddress (dll.base_addr)); document += "\n"; -- 2.30.2