[Pal/Linux-SGX] Fix incorrect "0x%p" format string for ocall_load_debug()

Previously, setup_pal_map() instructed GDB to load symbols for the PAL
shared library using incorrectly formatted string with "0x%p". This led
to addresses of the form "0x0xdeadbeef" which could not be parsed by
GDB. This commit fixes this via "%p" and thus enables SGX-GDB again.
This commit is contained in:
Isaku Yamahata
2019-08-07 16:22:00 -07:00
committed by Dmitrii Kuvaiskii
parent 161ea54354
commit 77904ffeb0
+2 -2
View File
@@ -158,8 +158,8 @@ void setup_pal_map (struct link_map * pal_map)
char buffer[BUFFER_LENGTH];
snprintf(buffer, BUFFER_LENGTH,
"add-symbol-file %s 0x%p -readnow -s .rodata 0x%p "
"-s .dynamic 0x%p -s .data 0x%p -s .bss 0x%p",
"add-symbol-file %s %p -readnow -s .rodata %p "
"-s .dynamic %p -s .data %p -s .bss %p",
pal_map->l_name,
&section_text, &section_rodata, &section_dynamic,
&section_data, &section_bss);