mirror of
https://github.com/wiiu-env/gdbstub_plugin.git
synced 2024-11-14 00:05:06 +01:00
Fix stack overflow when stack trace is too large
This commit is contained in:
parent
bbf63715e9
commit
190a55e032
@ -792,9 +792,9 @@ void Debugger::mainLoop(Client *client) {
|
||||
ExceptionState *state = exceptions.find(thread);
|
||||
if (state) {
|
||||
uint32_t sp = state->context.gpr[1];
|
||||
uint32_t trace[32];
|
||||
uint32_t trace[100];
|
||||
int index = 0;
|
||||
while (checkDataRead(sp, 4)) {
|
||||
while (checkDataRead(sp, 4) && index < 100) {
|
||||
sp = *(uint32_t *)sp;
|
||||
if (!checkDataRead(sp, 4)) break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user