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.
This commit is contained in:
Hannes Domani
2020-01-28 18:24:31 +01:00
parent 55be8fd0d2
commit a2236a0844
2 changed files with 7 additions and 2 deletions

View 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-24 Hannes Domani <ssbssa@yahoo.de> 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
* Makefile.in (install-strip): New target. * Makefile.in (install-strip): New target.

View File

@ -1548,8 +1548,8 @@ handle_qxfer_libraries (const char *annex,
for (const dll_info &dll : all_dlls) for (const dll_info &dll : all_dlls)
document += string_printf document += string_printf
(" <library name=\"%s\"><segment address=\"0x%lx\"/></library>\n", (" <library name=\"%s\"><segment address=\"0x%s\"/></library>\n",
dll.name.c_str (), (long) dll.base_addr); dll.name.c_str (), paddress (dll.base_addr));
document += "</library-list>\n"; document += "</library-list>\n";