thermosphere: remove breakpoint/watchpoint reg dump functions

This commit is contained in:
TuxSH 2019-08-07 23:51:25 +02:00
parent 83c6e2f0e7
commit f8266775f6
4 changed files with 2 additions and 59 deletions

View file

@ -16,7 +16,7 @@
#include <string.h> #include <string.h>
#include "breakpoints.h" #include "breakpoints.h"
#include "breakpoints_watchpoints_save_restore.h" #include "breakpoints_watchpoints_load.h"
#include "utils.h" #include "utils.h"
#include "sysreg.h" #include "sysreg.h"
#include "arm.h" #include "arm.h"

View file

@ -18,7 +18,4 @@
#include "breakpoints_watchpoints_common.h" #include "breakpoints_watchpoints_common.h"
void loadBreakpointRegs(const DebugRegisterPair *regs, size_t num); void loadBreakpointRegs(const DebugRegisterPair *regs, size_t num);
void saveBreakpointRegs(DebugRegisterPair *regs, size_t num);
void loadWatchpointRegs(const DebugRegisterPair *regs, size_t num); void loadWatchpointRegs(const DebugRegisterPair *regs, size_t num);
void saveWatchpointRegs(DebugRegisterPair *regs, size_t num);

View file

@ -39,33 +39,6 @@ loadBreakpointRegs:
isb isb
ret ret
// Precondition: x1 <= 16
.section .text.storeBreakpointRegs, "ax", %progbits
.type storeBreakpointRegs, %function
.global storBreakpointRegs
storeBreakpointRegs:
// x1 = number
dsb sy
isb
adr x16, 1f
add x0, x0, #(16 * 8)
mov x4, #(16 * 12)
sub x4, x4, x1,lsl #3
sub x4, x4, x1,lsl #2
add x16, x16, x4
br x16
1:
.irp count, 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0
mrs x2, dbgbcr\count\()_el1
mrs x3, dbgbvr\count\()_el1
stp x2, x3, [x0, #-0x10]!
.endr
ret
// Precondition: x1 <= 16 // Precondition: x1 <= 16
.section .text.loadWatchpointRegs, "ax", %progbits .section .text.loadWatchpointRegs, "ax", %progbits
.type loadWatchpointRegs, %function .type loadWatchpointRegs, %function
@ -89,30 +62,3 @@ loadWatchpointRegs:
dsb sy dsb sy
isb isb
ret ret
// Precondition: x1 <= 16
.section .text.storeWatchpointRegs, "ax", %progbits
.type storeWatchpointRegs, %function
.global storWatchpointRegs
storeWatchpointRegs:
// x1 = number
dsb sy
isb
adr x16, 1f
add x0, x0, #(16 * 8)
mov x4, #(16 * 12)
sub x4, x4, x1,lsl #3
sub x4, x4, x1,lsl #2
add x16, x16, x4
br x16
1:
.irp count, 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0
mrs x2, dbgwcr\count\()_el1
mrs x3, dbgwvr\count\()_el1
stp x2, x3, [x0, #-0x10]!
.endr
ret

View file

@ -16,7 +16,7 @@
#include <string.h> #include <string.h>
#include "watchpoints.h" #include "watchpoints.h"
#include "breakpoints_watchpoints_save_restore.h" #include "breakpoints_watchpoints_load.h"
#include "utils.h" #include "utils.h"
#include "sysreg.h" #include "sysreg.h"
#include "arm.h" #include "arm.h"