Skip to content

Commit

Permalink
remove extra elevates from sym_set_db_probe - adds assumption that th…
Browse files Browse the repository at this point in the history
…is is only called while elevated - but necessary to avoid extra syscalls and printouts while shortcutting
  • Loading branch information
e-arlo-be committed Apr 6, 2023
1 parent 333c9ea commit 01ba206
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/L2/sym_probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,10 @@ unsigned char sym_set_db_probe(uint64_t addr, uint64_t reg, uint64_t db_flag){
if((reg >= DB_REGS) || ((db_flag != DB_LOCAL) && (db_flag != DB_GLOBAL)))
exit(-1);

sym_elevate();
unsigned char ret = *(unsigned char *) addr;
sym_lower();

dr7.val = 0;

sym_elevate();
switch(reg) {
case 0:
// place addr into DR0
Expand Down Expand Up @@ -293,7 +290,6 @@ unsigned char sym_set_db_probe(uint64_t addr, uint64_t reg, uint64_t db_flag){
}
SET_DR(7, dr7);

sym_lower();

return ret;
}
Expand Down

0 comments on commit 01ba206

Please sign in to comment.