aboutsummaryrefslogtreecommitdiff
path: root/src/core/gdbstub/gdbstub.cpp
AgeCommit message (Collapse)Author
2018-12-18kernel/thread: Make thread_id a 64-bit valueLioncash
The kernel uses a 64-bit value for the thread ID, so we shouldn't be using a 32-bit value.
2018-11-26gdbstub: Silence value truncation warning within FpuWrite()Lioncash
Previously this would cause an implicit truncation warning about assigning a u64 value to a u32 value without an explicit cast.
2018-11-13GDBStub improvements:Hedges
- Add FPU support - Fix access to TLS Fix clang-format.
2018-10-15core_cpu: Make Cpu scheduler instances unique_ptrs instead of shared_ptrsLioncash
2018-10-04kernel/thread: Make all instance variables privateLioncash
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.
2018-09-30kernel/process: Make data member variables privateLioncash
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.
2018-09-30arm_interface: Add missing fpsr/tpidr members to the ThreadContext structLioncash
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.
2018-09-24memory: Dehardcode the use of fixed memory range constantsLioncash
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.
2018-09-20Correct endianness of BKPTJarek Syrylak
2018-09-18arm_interface: Remove ARM11-isms from the CPU interfaceLioncash
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.
2018-09-15Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi
2018-08-06GDBStub works with both Unicorn and Dynarmic now (#941)Hedges
* GDBStub works with both Unicorn and Dynarmic now * Tidy up
2018-08-05gdbstub: Use type alias for breakpoint mapsLioncash
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.
2018-08-05gdbstub: Move all file-static variables into the GDBStub namespaceLioncash
Keeps everything under the same namespace. While we're at it, enclose them all within an inner anonymous namespace.
2018-08-05gdbstub: Replace PAddr alias with VAddrLioncash
In all cases, a virtual address is being passed in, not a physical one.
2018-08-01kernel: Move object class to its own source filesLioncash
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.
2018-07-19gdbstub: Get rid of a few signed/unsigned comparisonsLioncash
Ensures both operands in comparisons are the same signedness.
2018-07-12More improvements to GDBStub (#653)Hedges
* 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
2018-07-02Update clang formatJames Rowe
2018-07-02Rename logging macro back to LOG_*James Rowe
2018-06-06GDB Stub Improvements (#508)Hedges
* GDB Stub should work now. * Applied clang-format. * Replaced htonll with swap64. * Tidy up.
2018-05-10core: Implement multicore support.bunnei
2018-04-26core/gdbstub: Move logging macros to new fmt-compatible onesLioncash
2018-03-19Clean Warnings (?)N00byKing
2018-02-14gdbstub: Silence formatting specifier warningsLioncash
2018-01-21gdbstub: Update registers and sizes for aarch64Rozlette
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.
2018-01-19Fixes some cast warnings, partial port of citra #3064 (#106)River City Ransomware
* Fixes some cast warnings, partially fixes citra #3064 * Converted casts to uint32_t to u32 * Ran clang-format
2018-01-17Fix gdbstub typo, fixes Citra #3318River City Ransomware
Core::System().GetInstance().IsPoweredOn() -> Core::System::GetInstance().IsPoweredOn()
2018-01-02arm: Remove SkyEye/Dyncom code that is ARMv6-only.bunnei
2017-10-04Memory: Remove all GetPointer usages from the GDB stub.Subv
2017-09-30Fixed type conversion ambiguityHuw Pascoe
2017-02-26Doxygen: Amend minor issues (#2593)Mat M
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.
2017-01-04Fix some warnings (#2399)Jonathan Hao
2016-12-22core: Replace "AppCore" nomenclature with just "CPU".bunnei
2016-12-21Address clang-format issues.bunnei
2016-12-21core: Consolidate core and system state, remove system module & cleanups.bunnei
2016-12-16gdbstub: const correctness changesLioncash
Also uses size_t as the length indicator type, as is common with buffers.
2016-12-15gdbstub: Remove global variable from public interfaceLioncash
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.
2016-12-05gdbstub: Remove unused includeJannik Vogel
2016-12-05Support mingw cross-compileJannik Vogel
2016-11-13Add mingw compile supportJames Rowe
2016-10-28Small fix to let IDA see target.xmlmailwl
2016-09-21Remove special rules for Windows.h and library includesYuri Kunde Schlesner
2016-09-18Sources: Run clang-format on everything.Emmanuel Gil Peyrot
2016-06-08gdbstub: E0 should be E00shinyquagsire23
2016-05-10gdbstub: Silence missing prototype warningsLioncash
2016-05-07fixup simple type conversions where possibleAlexander Laties
2016-04-23gdbstub: Don't check if unsigned int is > 0Sam Spilsbury
2016-04-06Adopted WinterMute's gdbstub changespolaris-
This fixes the comments left on the PR (whitespace, SO_REUSEADDR, comment changes).
2015-11-22Fix read and write register blocks in gdbstubpolaris-
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.