3 Commits
Author SHA1 Message Date
Paweł Marczewski 09c6307631 [Pal] Clean up GDB configuration
- Extract parts that are common for all hosts
- Remove some outdated/unnecessary options, we should now be
  closer to default configuration
- Disable libthread_db loading (does not work and crashes GDB 9.2)
- Disable pagination when loading debug maps
2021-02-01 22:37:53 +01:00
Paweł Marczewski e395e0133e [Pal,LibOS] Fix GDB integration in case of removing maps
- The GDB command for removing a symbol file takes text address
  (or any address inside the mapped memory area), not load offset.
  (which might be before the area). Because of that, removing a
  map in GDB did not actually work, and displayed a warning.
- The remove_r_debug() function in LibOS did not actually remove
  the map from list in LibOS. As a result, LibOS attempted to
  report the removal to PAL more than once, causing a harmless but
  annoying warning message.
2021-01-19 21:41:16 +01:00
Paweł Marczewski 5ef9bdc861 [Pal] Unify debug maps
- Use the same mechanism (debug_map) in Pal/Linux and Pal/Linux-SGX.
  Previously, Pal/Linux emulated the _r_debug structure, normally
  maintained by ld.so, but that cannot be done in SGX outer PAL,
  because it's loaded by ld.so already.
- Maintain the debug maps outside of SGX enclave. This allows
  initializing them before enclave start, and potentially makes
  them easier to use.
- Initialize PAL debug map before enclave start. Previously, this
  was done from inside the enclave, so you couldn't set a
  breakpoint too early (e.g. in pal_linux_main).
- Store only load address, without list of sections. This is to
  avoid parsing the list of sections just to report them to the
  debugger. Unfortunately, the GDB version that we support still
  needs these sections, but we can retrieve them in GDB plugin.
- Move Python GDB code related to debug maps to a common file.
2021-01-18 03:49:18 +01:00