intel / intel/confidential-computing.sgx
Unable to debug in hardware mode
- Dominant language
- C++
- Stars
- 1.5k
- Forks
- 565
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I am trying to debug libsgx_urts, however sgx-gdb is unable to find the symbols. Here are my build instructions:
``` make clean -j20 && make psw DEBUG=1 -j20 && make deb_psw_pkg DEBUG=1 -j20 && make deb_local_repo -j20 && apt update
apt-get remove libsgx-launch* libsgx-urts* libsgx-epid* libsgx-quote-ex* libsgx-dcap-ql* && apt-get install libsgx-launch-dbgsym libsgx-urts-dbgsym libsgx-epid-dbgsym libsgx-quote-ex-dbgsym libsgx-dcap-ql-dbgsym
```
I have checked my gdb and it does look for the files in "/usr/lib/dbg" and dpk -L does show the .debug file.
``` /usr/lib/debug/.build-id/14/4d4abb30e140eb8889caaf1a3a2878fd29e35c.debug ```
However, as you can see in the backtrace the debug symbols are still missing:
```
#0 ioctl () at ../sysdeps/unix/syscall-template.S:78
#1 0x00007ffff7f840f4 in enclave_create () from /usr/lib/x86_64-linux-gnu/libsgx_enclave_common.so.1
#2 0x00007ffff7f981a7 in EnclaveCreatorHW::create_enclave(_secs_t*, unsigned long*, void**, bool) () from /usr/lib/x86_64-linux-gnu/libsgx_urts.so
#3 0x00007ffff7f91626 in CLoader::build_secs(_attributes_t*, unsigned char (*) [64], unsigned short, _sgx_misc_attribute_t*) () from /usr/lib/x86_64-linux-gnu/libsgx_urts.so
#4 0x00007ffff7f91efc in CLoader::build_image(SGXLaunchToken*, _attributes_t*, unsigned char (*) [64], unsigned short, _le_prd_css_file_t*, _sgx_misc_attribute_t*) ()
from /usr/lib/x86_64-linux-gnu/libsgx_urts.so
#5 0x00007ffff7f92ba6 in CLoader::load_enclave(SGXLaunchToken*, int, _metadata_t const*, unsigned char (*) [64], unsigned short, _le_prd_css_file_t*, _sgx_misc_attribute_t*) ()
from /usr/lib/x86_64-linux-gnu/libsgx_urts.so
#6 0x00007ffff7f92c27 in CLoader::load_enclave_ex(SGXLaunchToken*, bool, _metadata_t const*, unsigned char (*) [64], unsigned short, _le_prd_css_file_t*, _sgx_misc_attribute_t*) ()
from /usr/lib/x86_64-linux-gnu/libsgx_urts.so
#7 0x00007ffff7f96dcf in _create_enclave_from_buffer_ex(bool, unsigned char*, unsigned long, _se_file_t&, _le_prd_css_file_t*, unsigned long*, _sgx_misc_attribute_t*, unsigned int, void const**) ()
from /usr/lib/x86_64-linux-gnu/libsgx_urts.so
#8 0x00007ffff7f97708 in _create_enclave_ex(bool, int, _se_file_t&, _le_prd_css_file_t*, unsigned char (*) [1024], int*, unsigned long*, _sgx_misc_attribute_t*, unsigned int, void const**) ()
from /usr/lib/x86_64-linux-gnu/libsgx_urts.so
#9 0x00007ffff7f9781c in __sgx_create_enclave_ex.part.18 () from /usr/lib/x86_64-linux-gnu/libsgx_urts.so
#10 0x00007ffff7f9793d in sgx_create_enclave () from /usr/lib/x86_64-linux-gnu/libsgx_urts.so
#11 0x0000555555557202 in initialize_enclave () at App/App.cpp:169
#12 0x0000555555557256 in main (argc=1, argv=0x7fffffffdb58) at App/App.cpp:198
```
Any leads what might be going wrong here? I am using sdk 2.9
Contributor guide
Assessment
This issue has not been assessed yet.