eden/src/core
Duncan Ogilvie 1590e7c061
[core] GDB improvements (#3848)
The commands to reproduce the issues are in the commit messages. I tested on Super Mario Odyssey using [nx2elf](https://github.com/shuffle2/nx2elf) converted binaries and gdb-multiarch:

```
(gdb) monitor info
Process:     0x51 (Application)
Program Id:  0x0100000000010000
Layout:
  Alias: 0x1103400000 - 0x21033fffff
  Heap:  0x2103400000 - 0x23033fffff
  Aslr:  0x0008000000 - 0x7fffffffff
  Stack: 0x1083400000 - 0x11033fffff
Modules:
  0x0080b3d000 - 0x0080b40fff nnrtld
  0x0080b41000 - 0x0081ff1fff RedStar.nss
  0x0081ff2000 - 0x008270efff multimedia
  0x008270f000 - 0x00833e2fff nnSdk
(gdb) monitor mappings
Mappings:
  0x0000000000 - 0x0080b3cfff     Free ----- [0, 0]
  0x0080b3d000 - 0x0080b3efff r-x Code ----- [0, 0]
  0x0080b3f000 - 0x0080b3ffff r-- Code ----- [0, 0]
  0x0080b40000 - 0x0080b40fff rw- CodeData ----- [0, 0]
  0x0080b41000 - 0x008156bfff r-x Code ----- [0, 0]
  0x008156c000 - 0x0081cdafff r-- Code ----- [0, 0]
  0x0081cdb000 - 0x0081ff1fff rw- CodeData ----- [0, 0]
  0x0081ff2000 - 0x0082365fff r-x Code ----- [0, 0]
  0x0082366000 - 0x00825c0fff r-- Code ----- [0, 0]
  0x00825c1000 - 0x008270efff rw- CodeData ----- [0, 0]
  0x008270f000 - 0x0082c3cfff r-x Code ----- [0, 0]
  0x0082c3d000 - 0x00832bffff r-- Code ----- [0, 0]
  0x00832c0000 - 0x00833e2fff rw- CodeData ----- [0, 0]
  0x00833e3000 - 0x0083403fff     Free ----- [0, 0]
  0x0083404000 - 0x0083404fff rw- ThreadLocal ----- [0, 0]
  0x0083405000 - 0x1083403fff     Free ----- [0, 0]
  0x1083404000 - 0x1083503fff rw- Stack ----- [0, 0]
  0x1083504000 - 0x7fffffffff     Free ----- [0, 0]
(gdb) set sysroot
(gdb) set solib-search-path /Users/duncan/Downloads/smo-program
Reading symbols from /Users/duncan/Downloads/smo-program/rtld.elf...
(No debugging symbols found in /Users/duncan/Downloads/smo-program/rtld.elf)
Reading symbols from /Users/duncan/Downloads/smo-program/main.elf...
(No debugging symbols found in /Users/duncan/Downloads/smo-program/main.elf)
Reading symbols from /Users/duncan/Downloads/smo-program/subsdk0.elf...
(No debugging symbols found in /Users/duncan/Downloads/smo-program/subsdk0.elf)
Reading symbols from /Users/duncan/Downloads/smo-program/sdk.elf...
(No debugging symbols found in /Users/duncan/Downloads/smo-program/sdk.elf)
(gdb) info shared
From                To                  Syms Read   Shared Object Library
0x0000000080b3d000  0x0000000080b41000  Yes (*)     /Users/duncan/Downloads/smo-program/rtld.elf
0x0000000080b41000  0x0000000081ff2000  Yes (*)     /Users/duncan/Downloads/smo-program/main.elf
0x0000000081ff2000  0x000000008270f000  Yes (*)     /Users/duncan/Downloads/smo-program/subsdk0.elf
0x000000008270f000  0x00000000833e3000  Yes (*)     /Users/duncan/Downloads/smo-program/sdk.elf
(*): Shared library is missing debugging information.
(gdb) info functions nnMain
All functions matching regular expression "nnMain":

Non-debugging symbols:
0x0000000081024250  nnMain
0x0000000082c2de40  nnMain@plt
(gdb) b *nnMain
Breakpoint 1 at 0x81024250
(gdb) c
Continuing.

Breakpoint 1, 0x0000000081024250 in nnMain () from /Users/duncan/Downloads/smo-program/main.elf
(gdb) x/10i $pc
=> 0x81024250 <nnMain>:	stp	x22, x21, [sp, #-48]!
   0x81024254 <nnMain+4>:	stp	x20, x19, [sp, #16]
   0x81024258 <nnMain+8>:	stp	x29, x30, [sp, #32]
   0x8102425c <nnMain+12>:	add	x29, sp, #0x20
   0x81024260 <nnMain+16>:	bl	0x81569aa0
   0x81024264 <nnMain+20>:	mov	w19, w0
   0x81024268 <nnMain+24>:	bl	0x81569ab0
   0x8102426c <nnMain+28>:	mov	x20, x0
   0x81024270 <nnMain+32>:	mov	w0, w19
   0x81024274 <nnMain+36>:	mov	x1, x20
```

Symlinked like this:

```
ls -l /Users/duncan/Downloads/smo-program
total 687472
-rw-r--r--@ 1 duncan  staff   20385356 Apr  9 18:12 main.elf
lrwxr-xr-x@ 1 duncan  staff         11 Apr  9 15:26 multimedia -> subsdk0.elf
lrwxr-xr-x@ 1 duncan  staff          8 Apr  9 15:28 nnrtld -> rtld.elf
lrwxr-xr-x@ 1 duncan  staff          7 Apr  9 15:26 nnSdk -> sdk.elf
lrwxr-xr-x@ 1 duncan  staff          8 Apr  9 15:26 RedStar.nss -> main.elf
-rw-r--r--@ 1 duncan  staff      12440 Apr  9 18:12 rtld.elf
-rw-r--r--@ 1 duncan  staff   12662960 Apr  9 18:12 sdk.elf
-rw-r--r--@ 1 duncan  staff    6294336 Apr  9 18:12 subsdk0.elf
```

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3848
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Reviewed-by: crueter <crueter@eden-emu.dev>
2026-04-27 03:39:34 +02:00
..
arm [dynarmic] Remove Ignore Global Monitor from CPU Accuracy Auto (#3846) 2026-04-21 05:03:43 +02:00
crypto [common/logging] Simplify logging logic and fix issues when logging before system is created (#3688) 2026-03-12 18:29:15 +01:00
debugger [core] GDB improvements (#3848) 2026-04-27 03:39:34 +02:00
file_sys [common] unify std::random_device (#3801) 2026-03-31 20:12:41 +02:00
frontend [common/logging] Simplify logging logic and fix issues when logging before system is created (#3688) 2026-03-12 18:29:15 +01:00
hle [core] GDB improvements (#3848) 2026-04-27 03:39:34 +02:00
internal_network [common/logging] Simplify logging logic and fix issues when logging before system is created (#3688) 2026-03-12 18:29:15 +01:00
loader [common] unify std::random_device (#3801) 2026-03-31 20:12:41 +02:00
memory [file_sys, cheats] fix cheat_xxx.txt not being able to be disabled from Qt frontend (#3223) 2025-12-31 17:10:36 +01:00
tools [core] Fix renderdoc API garbage (#3816) 2026-04-01 21:02:20 +02:00
CMakeLists.txt [cmake, deps] conjure common/httplib.h and remove global def for httplib macros (#3800) 2026-04-06 19:13:09 +02:00
constants.cpp [core] Use a eden profile picture instead of the default grey one. (#3350) 2026-01-20 18:32:08 +01:00
constants.h [core] Use a eden profile picture instead of the default grey one. (#3350) 2026-01-20 18:32:08 +01:00
core.cpp [common/logging] Simplify logging logic and fix issues when logging before system is created (#3688) 2026-03-12 18:29:15 +01:00
core.h [vfs] remove usage of 'dynamic_cast', use ankerl::map for files (#3594) 2026-02-21 18:38:32 +01:00
core_timing.cpp [windows] Return x86 microsleep for Windows (#3563) 2026-02-17 06:15:45 +01:00
core_timing.h [common, core] remove uneeded memory indirection overhead at startup (#3306) 2026-01-16 23:39:16 +01:00
cpu_manager.cpp [android, core] pin core threads to logical CPUs 0-3 (#3121) 2026-02-01 01:54:59 +01:00
cpu_manager.h Fix typos in src/core (#12625) 2024-01-08 13:31:48 -06:00
device_memory.cpp core: Define HAS_NCE macro 2023-11-25 00:47:36 -05:00
device_memory.h Core: Initial implementation of device memory mapping 2024-01-18 21:12:30 -05:00
device_memory_manager.h [core] coalesce tracking entries for GPU (#3677) 2026-03-08 22:45:38 +01:00
device_memory_manager.inc [core] coalesce tracking entries for GPU (#3677) 2026-03-08 22:45:38 +01:00
game_settings.cpp [common/logging] Simplify logging logic and fix issues when logging before system is created (#3688) 2026-03-12 18:29:15 +01:00
game_settings.h [core] Add overridable game setting functionality (#2963) 2025-12-17 03:59:27 +01:00
gpu_dirty_memory_manager.h Core: Eliminate core/memory dependancies. 2024-01-18 21:12:30 -05:00
guest_memory.h Solves warning about GuestMemory having internal linkage. 2025-04-04 03:40:47 +02:00
hardware_properties.h [dynarmic] jit fix branch v2 (#203) 2025-08-27 06:49:50 +02:00
launch_timestamp_cache.cpp [common/logging] Simplify logging logic and fix issues when logging before system is created (#3688) 2026-03-12 18:29:15 +01:00
launch_timestamp_cache.h [tests] fix compile+linking issues with PlayTime (#3345) 2026-01-19 16:27:18 +01:00
memory.cpp [core] remove parallel thread remnants that keep calling sysconf() everytime a memory object is created (#3804) 2026-03-31 20:12:16 +02:00
memory.h Revert "[core/memory] Remove defered heap allocation on Linux." (#2974) 2025-11-09 22:42:09 +01:00
perf_stats.cpp [frontend] Slow and Turbo modes (#3525) 2026-02-12 01:31:55 +01:00
perf_stats.h
reporter.cpp [core] Fix buiding with fmt 10 (#2524) 2025-09-19 17:02:53 +02:00
reporter.h [prepo] Add support for missing PlayReport commands (#3674) 2026-03-06 15:02:59 +01:00