Kaynağa Gözat

[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.
Isaku Yamahata 6 yıl önce
ebeveyn
işleme
77904ffeb0
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      Pal/src/host/Linux-SGX/db_rtld.c

+ 2 - 2
Pal/src/host/Linux-SGX/db_rtld.c

@@ -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);