diff options
| author | 2018-08-05 15:55:57 -0400 | |
|---|---|---|
| committer | 2018-08-05 15:56:01 -0400 | |
| commit | ca96f8db4e13e857be2f90e147c663e1277fb0e6 (patch) | |
| tree | 9be1cb67a5a33ca24b0bd4a660690a874cb95acd /src/core/gdbstub/gdbstub.cpp | |
| parent | Merge pull request #928 from MerryMage/dynarmic (diff) | |
| download | yuzu-ca96f8db4e13e857be2f90e147c663e1277fb0e6.tar.gz yuzu-ca96f8db4e13e857be2f90e147c663e1277fb0e6.tar.xz yuzu-ca96f8db4e13e857be2f90e147c663e1277fb0e6.zip | |
gdbstub: Replace PAddr alias with VAddr
In all cases, a virtual address is being passed in, not a physical one.
Diffstat (limited to 'src/core/gdbstub/gdbstub.cpp')
| -rw-r--r-- | src/core/gdbstub/gdbstub.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/core/gdbstub/gdbstub.cpp b/src/core/gdbstub/gdbstub.cpp index 75f6b8235..ac53ba752 100644 --- a/src/core/gdbstub/gdbstub.cpp +++ b/src/core/gdbstub/gdbstub.cpp | |||
| @@ -171,7 +171,7 @@ WSADATA InitData; | |||
| 171 | 171 | ||
| 172 | struct Breakpoint { | 172 | struct Breakpoint { |
| 173 | bool active; | 173 | bool active; |
| 174 | PAddr addr; | 174 | VAddr addr; |
| 175 | u64 len; | 175 | u64 len; |
| 176 | }; | 176 | }; |
| 177 | 177 | ||
| @@ -181,13 +181,13 @@ static std::map<u64, Breakpoint> breakpoints_write; | |||
| 181 | 181 | ||
| 182 | struct Module { | 182 | struct Module { |
| 183 | std::string name; | 183 | std::string name; |
| 184 | PAddr beg; | 184 | VAddr beg; |
| 185 | PAddr end; | 185 | VAddr end; |
| 186 | }; | 186 | }; |
| 187 | 187 | ||
| 188 | static std::vector<Module> modules; | 188 | static std::vector<Module> modules; |
| 189 | 189 | ||
| 190 | void RegisterModule(std::string name, PAddr beg, PAddr end, bool add_elf_ext) { | 190 | void RegisterModule(std::string name, VAddr beg, VAddr end, bool add_elf_ext) { |
| 191 | Module module; | 191 | Module module; |
| 192 | if (add_elf_ext) { | 192 | if (add_elf_ext) { |
| 193 | Common::SplitPath(name, nullptr, &module.name, nullptr); | 193 | Common::SplitPath(name, nullptr, &module.name, nullptr); |
| @@ -441,7 +441,7 @@ static std::map<u64, Breakpoint>& GetBreakpointList(BreakpointType type) { | |||
| 441 | * @param type Type of breakpoint. | 441 | * @param type Type of breakpoint. |
| 442 | * @param addr Address of breakpoint. | 442 | * @param addr Address of breakpoint. |
| 443 | */ | 443 | */ |
| 444 | static void RemoveBreakpoint(BreakpointType type, PAddr addr) { | 444 | static void RemoveBreakpoint(BreakpointType type, VAddr addr) { |
| 445 | std::map<u64, Breakpoint>& p = GetBreakpointList(type); | 445 | std::map<u64, Breakpoint>& p = GetBreakpointList(type); |
| 446 | 446 | ||
| 447 | auto bp = p.find(static_cast<u64>(addr)); | 447 | auto bp = p.find(static_cast<u64>(addr)); |
| @@ -452,7 +452,7 @@ static void RemoveBreakpoint(BreakpointType type, PAddr addr) { | |||
| 452 | } | 452 | } |
| 453 | } | 453 | } |
| 454 | 454 | ||
| 455 | BreakpointAddress GetNextBreakpointFromAddress(PAddr addr, BreakpointType type) { | 455 | BreakpointAddress GetNextBreakpointFromAddress(VAddr addr, BreakpointType type) { |
| 456 | std::map<u64, Breakpoint>& p = GetBreakpointList(type); | 456 | std::map<u64, Breakpoint>& p = GetBreakpointList(type); |
| 457 | auto next_breakpoint = p.lower_bound(static_cast<u64>(addr)); | 457 | auto next_breakpoint = p.lower_bound(static_cast<u64>(addr)); |
| 458 | BreakpointAddress breakpoint; | 458 | BreakpointAddress breakpoint; |
| @@ -468,7 +468,7 @@ BreakpointAddress GetNextBreakpointFromAddress(PAddr addr, BreakpointType type) | |||
| 468 | return breakpoint; | 468 | return breakpoint; |
| 469 | } | 469 | } |
| 470 | 470 | ||
| 471 | bool CheckBreakpoint(PAddr addr, BreakpointType type) { | 471 | bool CheckBreakpoint(VAddr addr, BreakpointType type) { |
| 472 | if (!IsConnected()) { | 472 | if (!IsConnected()) { |
| 473 | return false; | 473 | return false; |
| 474 | } | 474 | } |
| @@ -975,7 +975,7 @@ static void Continue() { | |||
| 975 | * @param addr Address of breakpoint. | 975 | * @param addr Address of breakpoint. |
| 976 | * @param len Length of breakpoint. | 976 | * @param len Length of breakpoint. |
| 977 | */ | 977 | */ |
| 978 | static bool CommitBreakpoint(BreakpointType type, PAddr addr, u64 len) { | 978 | static bool CommitBreakpoint(BreakpointType type, VAddr addr, u64 len) { |
| 979 | std::map<u64, Breakpoint>& p = GetBreakpointList(type); | 979 | std::map<u64, Breakpoint>& p = GetBreakpointList(type); |
| 980 | 980 | ||
| 981 | Breakpoint breakpoint; | 981 | Breakpoint breakpoint; |
| @@ -1015,7 +1015,7 @@ static void AddBreakpoint() { | |||
| 1015 | 1015 | ||
| 1016 | auto start_offset = command_buffer + 3; | 1016 | auto start_offset = command_buffer + 3; |
| 1017 | auto addr_pos = std::find(start_offset, command_buffer + command_length, ','); | 1017 | auto addr_pos = std::find(start_offset, command_buffer + command_length, ','); |
| 1018 | PAddr addr = HexToLong(start_offset, static_cast<u64>(addr_pos - start_offset)); | 1018 | VAddr addr = HexToLong(start_offset, static_cast<u64>(addr_pos - start_offset)); |
| 1019 | 1019 | ||
| 1020 | start_offset = addr_pos + 1; | 1020 | start_offset = addr_pos + 1; |
| 1021 | u64 len = | 1021 | u64 len = |
| @@ -1064,7 +1064,7 @@ static void RemoveBreakpoint() { | |||
| 1064 | 1064 | ||
| 1065 | auto start_offset = command_buffer + 3; | 1065 | auto start_offset = command_buffer + 3; |
| 1066 | auto addr_pos = std::find(start_offset, command_buffer + command_length, ','); | 1066 | auto addr_pos = std::find(start_offset, command_buffer + command_length, ','); |
| 1067 | PAddr addr = HexToLong(start_offset, static_cast<u64>(addr_pos - start_offset)); | 1067 | VAddr addr = HexToLong(start_offset, static_cast<u64>(addr_pos - start_offset)); |
| 1068 | 1068 | ||
| 1069 | if (type == BreakpointType::Access) { | 1069 | if (type == BreakpointType::Access) { |
| 1070 | // Access is made up of Read and Write types, so add both breakpoints | 1070 | // Access is made up of Read and Write types, so add both breakpoints |