Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GDB stub #1583

Merged
merged 28 commits into from
Oct 22, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
2f67161
gdbstub beginnings
PoroCYon Dec 5, 2022
4a9456c
gdbstub: finish gdb impl things, next up is integration with melonDS
PoroCYon Dec 5, 2022
300bc37
holy fuck the gdbstub works
PoroCYon Dec 6, 2022
7059dee
gdb breakpoints work, but there's a mysterious crash on continue
PoroCYon Dec 8, 2022
358dfb1
fix memory corruption that sometimes happened, and make resetting the…
PoroCYon Dec 8, 2022
448848d
remove some gdb debug printing
PoroCYon Dec 8, 2022
857f574
fix things in gdbstub
PoroCYon Dec 13, 2022
f35a807
separate option for enabling gdbstub
PoroCYon Dec 13, 2022
160ee42
add mode-dependent CPU registers
PoroCYon Jul 8, 2023
e17cda7
C++ize the GDBstub code
PoroCYon Jul 9, 2023
e2b9e9a
add gdbstub config in emu settings dialog
PoroCYon Jul 9, 2023
c41bad1
make sure gdb is disabled when jit is enabled
PoroCYon Jul 9, 2023
071e588
Remove unnecessary compiler flags, mark ARMJIT assembly code as no-ex…
PoroCYon Jul 9, 2023
24cc71d
add option to wait for debugger attach on startup
PoroCYon Jul 9, 2023
0eebcdf
only insert GNU stack notes on linux
PoroCYon Jul 9, 2023
c71d47b
disable gdbstub enable checkbox when jit is enabled
PoroCYon Jul 9, 2023
c489593
fix non-linux incompatibilities
PoroCYon Jul 9, 2023
3ddb384
enable gdbstub by default
PoroCYon Jul 9, 2023
242c035
fix issues with gdbstub settings disable stuff
PoroCYon Jul 9, 2023
0503b19
format stuff
PoroCYon Jul 15, 2023
a94d924
update gdb test code
PoroCYon Jul 16, 2023
60cd6c1
Fix segfault when calling StubCallbacks->GetCPU()
PoroCYon Jul 18, 2023
34218ef
fix packet size not being sent correctly
PoroCYon Jul 20, 2023
30bb773
fix select(2) calls (i should read docs more properly)
PoroCYon Jul 24, 2023
223043c
fix GDB command sequencing/parsing issue (hopefully)
PoroCYon Aug 20, 2023
73d2c5f
[GDB] implement no-ack mode
PoroCYon Aug 21, 2023
fae3642
fix sending ack on handshake
PoroCYon Aug 21, 2023
7305cb3
get lldb to work
PoroCYon Aug 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
separate option for enabling gdbstub
  • Loading branch information
PoroCYon committed Jul 16, 2023
commit f35a8074fba32670c800930d12628ae0160c7c0a
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,16 @@ if (CCACHE)
set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE})
endif()

option(ENABLE_GDBSTUB "Enable GDB stub" OFF)
if (ENABLE_GDBSTUB)
add_definitions(-DGDBSTUB_ENABLED)
endif()

if (NOT WIN32)
add_compile_options(-fno-pic)
add_link_options(-no-pie)
endif()

option(BUILD_QT_SDL "Build Qt/SDL frontend" ON)

add_subdirectory(src)
Expand Down
1 change: 0 additions & 1 deletion src/ARM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ using Platform::Log;
using Platform::LogLevel;

#ifdef GDBSTUB_ENABLED

#define GDB_CHECK_A() do{\
PoroCYon marked this conversation as resolved.
Show resolved Hide resolved
if (!is_single_step && !break_req) { /* check if eg. break signal is incoming etc. */ \
enum gdbstub_state st = gdbstub_enter(stub, false); \
Expand Down
2 changes: 1 addition & 1 deletion src/ARMInterpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ using Platform::Log;
using Platform::LogLevel;

#ifdef GDBSTUB_ENABLED
#include "debug/hypervisor.h"
#include "debug/gdbstub.h"
#endif

namespace ARMInterpreter
Expand Down
15 changes: 0 additions & 15 deletions src/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,6 @@
#ifndef TYPES_H
#define TYPES_H

<<<<<<< HEAD
=======
#ifdef __cplusplus
#define TYPES_TESTVAR __cplusplus
#define TYPES_TESTVAL 201103L
#else
#define TYPES_TESTVAR __STDC_VERSION__
#define TYPES_TESTVAL 201112L
#endif

#if TYPES_TESTVAR >= TYPES_TESTVAL

// use the C++11/C11 defines because they're most likely more correct

>>>>>>> e045f0d (holy fuck the gdbstub works)
#include <stdint.h>

typedef uint8_t u8;
Expand Down