Skip to content

sgx-gdb does not work with sgx_create_enclave_from_buffer_ex #482

Open
@sethmoo

Description

@sethmoo

If an enclave is loaded with sgx_create_enclave_from_buffer_ex, then the sgx-gdb doesn't work. We get a Python exception every time the gdb extension script is called:
Python Exception <class 'gdb.error'> No symbol table is loaded. Use the "file" command.:

It appears that retrieve_enclave_info assumes the enclave was loaded by file:

enclave_path = struct.unpack_from(fmt, name_str)[0].decode(encoding='UTF-8')

If an enclave is loaded from a buffer the debug_enclave_info_t object won't have lpFileName populated. Thus, the debugger extensions cannot load the symbols, and gdb gets quite sad.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions