mirror of
https://github.com/javalsai/lidm.git
synced 2025-07-01 21:45:02 +02:00
dev: add debug utils folder
This commit is contained in:
parent
6c6769b2b3
commit
59acddf652
3
debug/README.md
Normal file
3
debug/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
# Debug
|
||||
|
||||
This folder contains debug utils like gdb scripts. They are not guaranteed to work but can ease some tasks when debugging.
|
59
debug/debug.gdb
Normal file
59
debug/debug.gdb
Normal file
@ -0,0 +1,59 @@
|
||||
# this just meant to run in another term, is probably better to attach to another already running window
|
||||
set inferior-tty /dev/pts/7
|
||||
set pagination off
|
||||
|
||||
break *(read_press + 62)
|
||||
define fake_read
|
||||
set *((char*) $rsi) = $al
|
||||
set $rax = 1
|
||||
jump *(read_press + 67)
|
||||
end
|
||||
|
||||
break *(read_press + 108)
|
||||
define fake_magic_cont
|
||||
set $eax = 1
|
||||
jump *(read_press + 113)
|
||||
end
|
||||
define fake_magic_end
|
||||
set $eax = 0
|
||||
jump *(read_press + 113)
|
||||
end
|
||||
|
||||
run
|
||||
set $al = 0x1b
|
||||
fake_read
|
||||
fake_magic_cont
|
||||
set $al = '['
|
||||
fake_read
|
||||
fake_magic_cont
|
||||
set $al = 'D'
|
||||
fake_read
|
||||
fake_magic_end
|
||||
|
||||
set $al = 'p'
|
||||
fake_read
|
||||
fake_magic_end
|
||||
|
||||
set $al = 'a'
|
||||
fake_read
|
||||
fake_magic_end
|
||||
|
||||
set $al = 's'
|
||||
fake_read
|
||||
fake_magic_end
|
||||
|
||||
set $al = 's'
|
||||
fake_read
|
||||
fake_magic_end
|
||||
|
||||
set $al = 'w'
|
||||
fake_read
|
||||
fake_magic_end
|
||||
|
||||
set $al = 'd'
|
||||
fake_read
|
||||
fake_magic_end
|
||||
|
||||
set $al = '\n'
|
||||
fake_read
|
||||
fake_magic_end
|
Loading…
x
Reference in New Issue
Block a user