summaryrefslogtreecommitdiff
path: root/src/core/gdbstub/gdbstub.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* core: Eliminate remaining usages of the global system instanceGravatar Lioncash2020-11-271-1397/+0
| | | | | | Removes all remaining usages of the global system instance. After this, migration can begin to migrate to being constructed and managed entirely by the various frontends.
* Revert "core: Fix clang build"Gravatar bunnei2020-10-201-38/+9
|
* core: Fix clang buildGravatar Lioncash2020-10-171-9/+38
| | | | | | | Recent changes to the build system that made more warnings be flagged as errors caused building via clang to break. Fixes #4795
* core/CMakeLists: Make some warnings errorsGravatar Lioncash2020-10-131-15/+15
| | | | | | | | | Makes our error coverage a little more consistent across the board by applying it to Linux side of things as well. This also makes it more consistent with the warning settings in other libraries in the project. This also updates httplib to 0.7.9, as there are several warning cleanups made that allow us to enable several warnings as errors.
* General: Cleanup legacy code.Gravatar Fernando Sahmkow2020-06-271-1/+0
|
* Merge pull request #3699 from FearlessTobi/port-5185Gravatar bunnei2020-04-211-4/+3
|\ | | | | Port citra-emu/citra#5185: "gdbstub: Fix some gdbstub jankiness"
| * gdbstub: Fix some gdbstub jankinessGravatar MerryMage2020-04-171-4/+3
| | | | | | | | | | | | 1. Ensure that register information available to gdbstub is most up-to-date. 2. There's no reason to check for current_thread == thread when emitting a trap. Doing this results in random hangs whenever a step happens upon a thread switch.
* | core: gdbstub: Updates for new VMM.Gravatar bunnei2020-04-171-2/+2
|/
* gdbstub: small logic bug fix with defer_startGravatar Gauvain "GovanifY" Roussel-Tarbouriech2020-03-171-2/+4
|
* gdbstub: Ensure gdbstub doesn't drop packets crucial to initializationGravatar Gauvain "GovanifY" Roussel-Tarbouriech2020-03-171-1/+8
|
* core: Implement separate A32/A64 ARM interfaces.Gravatar bunnei2020-03-021-7/+7
|
* Core: Refactor CpuCoreManager to CpuManager and Cpu to Core Manager.Gravatar Fernando Sahmkow2020-01-261-1/+1
| | | | This commit instends on better naming the new purpose of this classes.
* core/memory: Migrate over Write{8, 16, 32, 64, Block} to the Memory classGravatar Lioncash2019-11-261-7/+9
| | | | | | | | | The Write functions are used slightly less than the Read functions, which make these a bit nicer to move over. The only adjustments we really need to make here are to Dynarmic's exclusive monitor instance. We need to keep a reference to the currently active memory instance to perform exclusive read/write operations.
* core/memory: Migrate over Read{8, 16, 32, 64, Block} to the Memory classGravatar Lioncash2019-11-261-3/+5
| | | | | | | | | | | | | | With all of the trivial parts of the memory interface moved over, we can get right into moving over the bits that are used. Note that this does require the use of GetInstance from the global system instance to be used within hle_ipc.cpp and the gdbstub. This is fine for the time being, as they both already rely on the global system instance in other functions. These will be removed in a change directed at both of these respectively. For now, it's sufficient, as it still accomplishes the goal of de-globalizing the memory code.
* core/memory: Migrate over address checking functions to the new Memory classGravatar Lioncash2019-11-261-8/+10
| | | | | | | | | A fairly straightforward migration. These member functions can just be mostly moved verbatim with minor changes. We already have the necessary plumbing in places that they're used. IsKernelVirtualAddress() can remain a non-member function, since it doesn't rely on class state in any form.
* gdbstub: Resolve sign conversion errorsGravatar Lioncash2019-11-121-1/+2
|
* Correct compiling errors and addapt to the new interface.Gravatar Fernando Sahmkow2019-10-151-19/+13
|
* core: Remove Core::CurrentProcess()Gravatar Lioncash2019-10-061-1/+2
| | | | | | This only encourages the use of the global system instance (which will be phased out long-term). Instead, we use the direct system function call directly to remove the appealing but discouraged short-hand.
* gdbstub: Fix some bugs in IsMemoryBreak() and ServeBreak. Add workaround to ↵Gravatar Dimitri A2019-03-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | let watchpoints break into GDB. (#4651) * gdbstub: fix IsMemoryBreak() returning false while connected to client As a result, the only existing codepath for a memory watchpoint hit to break into GDB (InterpeterMainLoop, GDB_BP_CHECK, ARMul_State::RecordBreak) is finally taken, which exposes incorrect logic* in both RecordBreak and ServeBreak. * a blank BreakpointAddress structure is passed, which sets r15 (PC) to NULL * gdbstub: DynCom: default-initialize two members/vars used in conditionals * gdbstub: DynCom: don't record memory watchpoint hits via RecordBreak() For now, instead check for GDBStub::IsMemoryBreak() in InterpreterMainLoop and ServeBreak. Fixes PC being set to a stale/unhit breakpoint address (often zero) when a memory watchpoint (rwatch, watch, awatch) is handled in ServeBreak() and generates a GDB trap. Reasons for removing a call to RecordBreak() for memory watchpoints: * The``breakpoint_data`` we pass is typed Execute or None. It describes the predicted next code breakpoint hit relative to PC; * GDBStub::IsMemoryBreak() returns true if a recent Read/Write operation hit a watchpoint. It doesn't specify which in return, nor does it trace it anywhere. Thus, the only data we could give RecordBreak() is a placeholder BreakpointAddress at offset NULL and type Access. I found the idea silly, compared to simply relying on GDBStub::IsMemoryBreak(). There is currently no measure in the code that remembers the addresses (and types) of any watchpoints that were hit by an instruction, in order to send them to GDB as "extended stop information." I'm considering an implementation for this. * gdbstub: Change an ASSERT to DEBUG_ASSERT I have never seen the (Reg[15] == last_bkpt.address) assert fail in practice, even after several weeks of (locally) developping various branches around GDB. Only leave it inside Debug builds.
* gdbstub: only let Execute breakpoints write/restore BKPT opcodes into target ↵Gravatar Dimitri ALBORA2019-02-061-4/+10
| | | | memory
* kernel/thread: Make thread_id a 64-bit valueGravatar Lioncash2018-12-181-2/+2
| | | | | The kernel uses a 64-bit value for the thread ID, so we shouldn't be using a 32-bit value.
* gdbstub: Silence value truncation warning within FpuWrite()Gravatar Lioncash2018-11-261-1/+1
| | | | | Previously this would cause an implicit truncation warning about assigning a u64 value to a u32 value without an explicit cast.
* GDBStub improvements:Gravatar Hedges2018-11-131-37/+86
| | | | | | - Add FPU support - Fix access to TLS Fix clang-format.
* core_cpu: Make Cpu scheduler instances unique_ptrs instead of shared_ptrsGravatar Lioncash2018-10-151-3/+3
|
* kernel/thread: Make all instance variables privateGravatar Lioncash2018-10-041-17/+27
| | | | | | | | | | | | | | | | | | | | Many of the member variables of the thread class aren't even used outside of the class itself, so there's no need to make those variables public. This change follows in the steps of the previous changes that made other kernel types' members private. The main motivation behind this is that the Thread class will likely change in the future as emulation becomes more accurate, and letting random bits of the emulator access data members of the Thread class directly makes it a pain to shuffle around and/or modify internals. Having all data members public like this also makes it difficult to reason about certain bits of behavior without first verifying what parts of the core actually use them. Everything being public also generally follows the tendency for changes to be introduced in completely different translation units that would otherwise be better introduced as an addition to the Thread class' public interface.
* kernel/process: Make data member variables privateGravatar Lioncash2018-09-301-2/+2
| | | | | | | Makes the public interface consistent in terms of how accesses are done on a process object. It also makes it slightly nicer to reason about the logic of the process class, as we don't want to expose everything to external code.
* arm_interface: Add missing fpsr/tpidr members to the ThreadContext structGravatar Lioncash2018-09-301-1/+1
| | | | | | | | | Internally within the kernel, it also includes a member variable for the floating-point status register, and TPIDR, so we should do the same here to match it. While we're at it, also fix up the size of the struct and add a static assertion to ensure it always stays the correct size.
* memory: Dehardcode the use of fixed memory range constantsGravatar Lioncash2018-09-241-5/+10
| | | | | | | | The locations of these can actually vary depending on the address space layout, so we shouldn't be using these when determining where to map memory or be using them as offsets for calculations. This keeps all the memory ranges flexible and malleable based off of the virtual memory manager instance state.
* Correct endianness of BKPTGravatar Jarek Syrylak2018-09-201-1/+1
|
* arm_interface: Remove ARM11-isms from the CPU interfaceGravatar Lioncash2018-09-181-25/+25
| | | | | | | | | This modifies the CPU interface to more accurately match an AArch64-supporting CPU as opposed to an ARM11 one. Two of the methods don't even make sense to keep around for this interface, as Adv Simd is used, rather than the VFP in the primary execution state. This is essentially a modernization change that should have occurred from the get-go.
* Port #4182 from Citra: "Prefix all size_t with std::"Gravatar fearlessTobi2018-09-151-7/+7
|
* GDBStub works with both Unicorn and Dynarmic now (#941)Gravatar Hedges2018-08-061-0/+10
| | | | | | * GDBStub works with both Unicorn and Dynarmic now * Tidy up
* gdbstub: Use type alias for breakpoint mapsGravatar Lioncash2018-08-051-37/+42
| | | | | | | | Rather than having to type out the full std::map type signature, we can just use a straightforward alias. While we're at it, rename GetBreakpointList to GetBreakpointMap, which makes the name more accurate. We can also get rid of unnecessary u64 static_casts, since VAddr is an alias for a u64.
* gdbstub: Move all file-static variables into the GDBStub namespaceGravatar Lioncash2018-08-051-35/+36
| | | | | Keeps everything under the same namespace. While we're at it, enclose them all within an inner anonymous namespace.
* gdbstub: Replace PAddr alias with VAddrGravatar Lioncash2018-08-051-10/+10
| | | | In all cases, a virtual address is being passed in, not a physical one.
* kernel: Move object class to its own source filesGravatar Lioncash2018-08-011-1/+0
| | | | | | General moving to keep kernel object types separate from the direct kernel code. Also essentially a preliminary cleanup before eliminating global kernel state in the kernel code.
* gdbstub: Get rid of a few signed/unsigned comparisonsGravatar Lioncash2018-07-191-7/+7
| | | | Ensures both operands in comparisons are the same signedness.
* More improvements to GDBStub (#653)Gravatar Hedges2018-07-121-45/+149
| | | | | | | | | | | * More improvements to GDBStub - Debugging of threads should work correctly with source and assembly level stepping and modifying registers and memory, meaning threads and callstacks are fully clickable in VS. - List of modules is available to the client, with assumption that .nro and .nso are backed up by an .elf with symbols, while deconstructed ROMs keep N names. - Initial support for floating point registers. * Tidy up as requested in PR feedback * Tidy up as requested in PR feedback
* Update clang formatGravatar James Rowe2018-07-021-9/+8
|
* Rename logging macro back to LOG_*Gravatar James Rowe2018-07-021-28/+28
|
* GDB Stub Improvements (#508)Gravatar Hedges2018-06-061-26/+144
| | | | | | | | | | * GDB Stub should work now. * Applied clang-format. * Replaced htonll with swap64. * Tidy up.
* core: Implement multicore support.Gravatar bunnei2018-05-101-12/+12
|
* core/gdbstub: Move logging macros to new fmt-compatible onesGravatar Lioncash2018-04-261-38/+37
|
* Clean Warnings (?)Gravatar N00byKing2018-03-191-1/+1
|
* gdbstub: Silence formatting specifier warningsGravatar Lioncash2018-02-141-6/+9
|
* gdbstub: Update registers and sizes for aarch64Gravatar Rozlette2018-01-211-113/+155
| | | | | | | | | | | | | | | | | This gets gdbstub working at least to the point where clients can communicate with it. What works: - Reading/writing GPRegs - Reading/writing memory - Interrupting the emulated program and continuing What does NOT work: - Breakpoints. Sizes have been updated to u64, but support will need to be added in the interpreter for them to work. - VRegs. Mostly because my gdb was having issues with 128-bit regs for some reason. However, the current u128 representation is a bit awkward to use and should probably be updated first.
* Fixes some cast warnings, partial port of citra #3064 (#106)Gravatar River City Ransomware2018-01-191-13/+14
| | | | | | | | * Fixes some cast warnings, partially fixes citra #3064 * Converted casts to uint32_t to u32 * Ran clang-format
* Fix gdbstub typo, fixes Citra #3318Gravatar River City Ransomware2018-01-171-1/+1
| | | Core::System().GetInstance().IsPoweredOn() -> Core::System::GetInstance().IsPoweredOn()
* arm: Remove SkyEye/Dyncom code that is ARMv6-only.Gravatar bunnei2018-01-021-6/+3
|
* Memory: Remove all GetPointer usages from the GDB stub.Gravatar Subv2017-10-041-8/+12
|