Views: 6,492,398 Homepage | Main | Rules/FAQ | Memberlist | Active users | Last posts | Calendar | Stats | Online users | Search 02-29-24 09:45 PM
Guest:

0 users reading Remote debugging - GDB | 1 bot

Main - Development - Remote debugging - GDB Hide post layouts | New reply


Mighy Max
Posted on 07-16-21 10:15 AM Link | #4045
Heya,

I am currently working on a gdb server to be build into melonDS in a separate branch.
It is basically a RSPServer class that can be attached to an ARM core and right now is instanced twice - once for each core. It has a bit of a performance hit (I'd say about -10%) so I intend it to only be useable in a special configured build.
It's already connecting to gdb and can a least read-access both cores.


But for what I searched, there is no non-hacky way to control or read the emulation state, or is there?
There is an EmuThread in main.cpp that ontrols the emulation/execution state, but that is not exported in any way.

Is there any idea as to how an API allowing getting the emulation state and controlling it should look like? Or how that emuThread should be de-tangled from main?



A small peek:
[image]

Generic aka RSDuck
Posted on 07-16-21 01:58 PM Link | #4048
Posted by Mighy Max
But for what I searched, there is no non-hacky way to control or read the emulation state, or is there?
There is an EmuThread in main.cpp that ontrols the emulation/execution state, but that is not exported in any way.

Is there any idea as to how an API allowing getting the emulation state and controlling it should look like? Or how that emuThread should be de-tangled from main?


that's great news!

I wouldn't implement it on the frontend side though. Instead I would implement it in the core so it would run on the emulator thread. You can access the current CPU state by including ARM.h, then they're acessible in the NDS namespace.

____________________
Take me to your heart / never let me go!

"clearly you need to mow more lawns and buy a better pc" - Hydr8gon

PoroCYon
Posted on 11-30-22 07:40 PM Link | #5679
Hi, do you have any update on this? I just wanted to start on implementing a gdbstub myself, but if you have something working already, I could probably save myself the trouble.

PoroCYon
Posted on 12-13-22 05:55 PM Link | #5694
FYI, I ended up writing my own. Feedback would be nice.


Main - Development - Remote debugging - GDB Hide post layouts | New reply

Page rendered in 0.020 seconds. (2048KB of memory used)
MySQL - queries: 29, rows: 84/84, time: 0.014 seconds.
[powered by Acmlm] Acmlmboard 2.064 (2018-07-20)
© 2005-2008 Acmlm, Xkeeper, blackhole89 et al.