diff options
author | Hannes Domani <ssbssa@yahoo.de> | 2020-01-28 18:24:31 +0100 |
---|---|---|
committer | Hannes Domani <ssbssa@yahoo.de> | 2020-01-28 20:01:02 +0100 |
commit | a2236a08440996fe2adb5f9b61926db9a9e8c8c3 (patch) | |
tree | 54e734f99e3a84889baf06f0fc46fe7aff323848 /gdb/gdbserver | |
parent | 55be8fd0d23c128effffe5784332a6ab92978cf1 (diff) | |
download | gdb-a2236a08440996fe2adb5f9b61926db9a9e8c8c3.zip gdb-a2236a08440996fe2adb5f9b61926db9a9e8c8c3.tar.gz gdb-a2236a08440996fe2adb5f9b61926db9a9e8c8c3.tar.bz2 |
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 <ssbssa@yahoo.de>
* server.c (handle_qxfer_libraries): Write segment-address with
paddress.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/gdbserver/server.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index aeb9cb6..a97e408 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,8 @@ +2020-01-28 Hannes Domani <ssbssa@yahoo.de> + + * server.c (handle_qxfer_libraries): Write segment-address with + paddress. + 2020-01-24 Hannes Domani <ssbssa@yahoo.de> * Makefile.in (install-strip): New target. diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c index 17e79a6..3fc026f 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"; |