summaryrefslogtreecommitdiffstats
path: root/src/core/gdbstub (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Revert "core: Fix clang build"bunnei2020-10-212-39/+10
|
* core: Fix clang buildLioncash2020-10-182-10/+39
| | | | | | | 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 errorsLioncash2020-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.Fernando Sahmkow2020-06-271-1/+0
|
* Merge pull request #3699 from FearlessTobi/port-5185bunnei2020-04-221-4/+3
|\ | | | | Port citra-emu/citra#5185: "gdbstub: Fix some gdbstub jankiness"
| * gdbstub: Fix some gdbstub jankinessMerryMage2020-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.bunnei2020-04-171-2/+2
|/
* gdbstub: small logic bug fix with defer_startGauvain "GovanifY" Roussel-Tarbouriech2020-03-171-2/+4
|
* gdbstub: Ensure gdbstub doesn't drop packets crucial to initializationGauvain "GovanifY" Roussel-Tarbouriech2020-03-172-1/+15
|
* core: Implement separate A32/A64 ARM interfaces.bunnei2020-03-031-7/+7
|
* Core: Refactor CpuCoreManager to CpuManager and Cpu to Core Manager.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 classLioncash2019-11-271-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 classLioncash2019-11-271-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 classLioncash2019-11-271-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 errorsLioncash2019-11-121-1/+2
|
* Correct compiling errors and addapt to the new interface.Fernando Sahmkow2019-10-151-19/+13
|
* core: Remove Core::CurrentProcess()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 let watchpoints break into GDB. (#4651)Dimitri A2019-03-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 memoryDimitri ALBORA2019-02-061-4/+10
|
* kernel/thread: Make thread_id a 64-bit valueLioncash2018-12-191-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()Lioncash2018-11-271-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: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_ptrsLioncash2018-10-151-3/+3
|
* kernel/thread: Make all instance variables privateLioncash2018-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 privateLioncash2018-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 structLioncash2018-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 constantsLioncash2018-09-251-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 BKPTJarek Syrylak2018-09-201-1/+1
|
* arm_interface: Remove ARM11-isms from the CPU interfaceLioncash2018-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::"fearlessTobi2018-09-151-7/+7
|
* GDBStub works with both Unicorn and Dynarmic now (#941)Hedges2018-08-071-0/+10
| | | | | | * GDBStub works with both Unicorn and Dynarmic now * Tidy up
* gdbstub: Use type alias for breakpoint mapsLioncash2018-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 namespaceLioncash2018-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 VAddrLioncash2018-08-052-14/+14
| | | | In all cases, a virtual address is being passed in, not a physical one.
* kernel: Move object class to its own source filesLioncash2018-08-021-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 comparisonsLioncash2018-07-191-7/+7
| | | | Ensures both operands in comparisons are the same signedness.
* More improvements to GDBStub (#653)Hedges2018-07-132-47/+155
| | | | | | | | | | | * 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 formatJames Rowe2018-07-031-9/+8
|
* Rename logging macro back to LOG_*James Rowe2018-07-031-28/+28
|
* GDB Stub Improvements (#508)Hedges2018-06-062-26/+153
| | | | | | | | | | * GDB Stub should work now. * Applied clang-format. * Replaced htonll with swap64. * Tidy up.
* core: Implement multicore support.bunnei2018-05-111-12/+12
|
* core/gdbstub: Move logging macros to new fmt-compatible onesLioncash2018-04-261-38/+37
|
* Clean Warnings (?)N00byKing2018-03-191-1/+1
|
* gdbstub: Silence formatting specifier warningsLioncash2018-02-141-6/+9
|
* gdbstub: Update registers and sizes for aarch64Rozlette2018-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.
* Format: Run the new clang format on everythingJames Rowe2018-01-211-1/+1
|
* Fixes some cast warnings, partial port of citra #3064 (#106)River City Ransomware2018-01-201-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 #3318River City Ransomware2018-01-171-1/+1
| | | Core::System().GetInstance().IsPoweredOn() -> Core::System::GetInstance().IsPoweredOn()
* arm: Remove SkyEye/Dyncom code that is ARMv6-only.bunnei2018-01-031-6/+3
|
* Merge remote-tracking branch 'upstream/master' into nxbunnei2017-10-101-10/+14
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # src/core/CMakeLists.txt # src/core/arm/dynarmic/arm_dynarmic.cpp # src/core/arm/dyncom/arm_dyncom.cpp # src/core/hle/kernel/process.cpp # src/core/hle/kernel/thread.cpp # src/core/hle/kernel/thread.h # src/core/hle/kernel/vm_manager.cpp # src/core/loader/3dsx.cpp # src/core/loader/elf.cpp # src/core/loader/ncch.cpp # src/core/memory.cpp # src/core/memory.h # src/core/memory_setup.h
| * Memory: Remove all GetPointer usages from the GDB stub.Subv2017-10-041-8/+12
| |
| * Fixed type conversion ambiguityHuw Pascoe2017-09-301-2/+2
| |
* | arm: Use 64-bit addressing in a bunch of places.bunnei2017-09-301-2/+2
|/
* Doxygen: Amend minor issues (#2593)Mat M2017-02-271-0/+1
| | | | | | | | | Corrects a few issues with regards to Doxygen documentation, for example: - Incorrect parameter referencing. - Missing @param tags. - Typos in @param tags. and a few minor other issues.
* Fix some warnings (#2399)Jonathan Hao2017-01-041-5/+0
|
* core: Replace "AppCore" nomenclature with just "CPU".bunnei2016-12-221-20/+19
|
* Address clang-format issues.bunnei2016-12-221-2/+2
|
* core: Consolidate core and system state, remove system module & cleanups.bunnei2016-12-221-19/+20
|
* gdbstub: const correctness changesLioncash2016-12-161-9/+8
| | | | Also uses size_t as the length indicator type, as is common with buffers.
* gdbstub: Remove global variable from public interfaceLioncash2016-12-152-12/+19
| | | | | | | | | Currently, this is only ever queried, so adding a function to check if the server is enabled is more sensible. If directly modifying this externally is ever desirable, it should be done by adding a function to the interface, rather than exposing implementation details directly.
* gdbstub: Remove unused includeJannik Vogel2016-12-051-1/+0
|
* Support mingw cross-compileJannik Vogel2016-12-051-1/+2
|
* Add mingw compile supportJames Rowe2016-11-141-1/+1
|
* Small fix to let IDA see target.xmlmailwl2016-10-281-1/+1
|
* Remove special rules for Windows.h and library includesYuri Kunde Schlesner2016-09-211-1/+1
|
* Remove empty newlines in #include blocks.Emmanuel Gil Peyrot2016-09-211-1/+0
| | | | | | | This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
* Sources: Run clang-format on everything.Emmanuel Gil Peyrot2016-09-182-52/+63
|
* gdbstub: E0 should be E00shinyquagsire232016-06-081-1/+1
|
* gdbstub: Silence missing prototype warningsLioncash2016-05-101-3/+3
|
* fixup simple type conversions where possibleAlexander Laties2016-05-071-10/+10
|
* gdbstub: Don't check if unsigned int is > 0Sam Spilsbury2016-04-231-2/+2
|
* Adopted WinterMute's gdbstub changespolaris-2016-04-061-23/+85
| | | | | This fixes the comments left on the PR (whitespace, SO_REUSEADDR, comment changes).
* Fix missing headerLittleWhite2016-03-201-0/+2
|
* Fix read and write register blocks in gdbstubpolaris-2015-11-221-26/+31
| | | | Previously, the padding wasn't correctly accounted for which caused the gdbstub to read and write everything after R15 (starting with the dummy FPA registers) incorrectly, which caused CPSR to not be handled correctly. Everything appears to be working as expected with this change.
* Fix bug with reading addresses and lengthspolaris-2015-11-041-45/+55
|
* Change headerspolaris-2015-10-291-2/+2
|
* Add some headers so TravisCI will hopefully workpolaris-2015-10-221-0/+2
|
* Use CHAR_BIT instead of 8polaris-2015-10-221-11/+11
|
* Handle changes pointed out in comments on PRpolaris-2015-10-221-61/+34
|
* Add a register variable to loopspolaris-2015-10-211-6/+9
|
* Update register read loops to go with last commitpolaris-2015-10-211-6/+7
|
* Pad responses to gdb for VFP registerspolaris-2015-10-211-0/+3
|
* Try to add support for VFP registerspolaris-2015-10-211-4/+21
|
* Fix buffer overflow commentspolaris-2015-10-211-2/+3
|
* Remove unnecessary new lines, changed Deinit to Shutdownpolaris-2015-10-122-6/+6
|
* Use BreakpointAddress struct instead of passing address directlypolaris-2015-10-042-5/+15
|
* Implement gdbstubpolaris-2015-10-042-0/+1029