Fix library segment-address for 64bit values
authorHannes Domani <ssbssa@yahoo.de>
Tue, 28 Jan 2020 17:24:31 +0000 (18:24 +0100)
committerHannes Domani <ssbssa@yahoo.de>
Tue, 28 Jan 2020 19:10:55 +0000 (20:10 +0100)
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.

gdb/gdbserver/ChangeLog
gdb/gdbserver/server.c

index a06e7a68b3b4cba2accbb5e2510ea8ed2282001b..a15950ca0b1897d82748685cf82d6cf51d6a878c 100644 (file)
@@ -1,3 +1,8 @@
+2020-01-28  Hannes Domani  <ssbssa@yahoo.de>
+
+       * server.c (handle_qxfer_libraries): Write segment-address with
+       paddress.
+
 2020-01-01  Joel Brobecker  <brobecker@adacore.com>
 
        * server.c (gdbserver_version): Change copyright year to 2020.
index 1bd9faf20d5b3bd775a0cdc1fcb490ec4112bb99..dec41f8eebe41e5f43eb9cabd6346036f8edb50c 100644 (file)
@@ -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";
 
This page took 0.034403 seconds and 4 git commands to generate.