mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-12-16 13:36:59 +00:00
GDBStub: Support watchpoints on linux (#1030)
* GDBStub: Support watchpoints on linux * GDBStub: Use `TCP_NODELAY`
This commit is contained in:
parent
bab1616565
commit
4405116324
6 changed files with 371 additions and 197 deletions
|
|
@ -6,6 +6,9 @@
|
|||
#include "util/helpers/StringHelpers.h"
|
||||
#include "ExceptionHandler.h"
|
||||
|
||||
#include "Cafe/HW/Espresso/Debugger/GDBStub.h"
|
||||
#include "Cafe/HW/Espresso/Debugger/GDBBreakpoints.h"
|
||||
|
||||
#if BOOST_OS_LINUX
|
||||
#include "ELFSymbolTable.h"
|
||||
#endif
|
||||
|
|
@ -61,6 +64,16 @@ void DemangleAndPrintBacktrace(char** backtrace, size_t size)
|
|||
// handle signals that would dump core, print stacktrace and then dump depending on config
|
||||
void handlerDumpingSignal(int sig, siginfo_t *info, void *context)
|
||||
{
|
||||
#if defined(ARCH_X86_64) && BOOST_OS_LINUX
|
||||
// Check for hardware breakpoints
|
||||
if (info->si_signo == SIGTRAP && info->si_code == TRAP_HWBKPT)
|
||||
{
|
||||
uint64 dr6 = _ReadDR6();
|
||||
g_gdbstub->HandleAccessException(dr6);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if(!CrashLog_Create())
|
||||
return; // give up if crashlog was already created
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue