4 ms·
syscall is only available if gdb is able to resolve libc. So for example this won’t work to stop a process running in a container, since gdb won’t be able to se
by moyix 2y ago
syscall is only available if gdb is able to resolve libc. So for example this won’t work to stop a process running in a container, since gdb won’t be able to see the libc in the container’s filesystem. I did make my own variant using gdb, though, nicely explained here: https://thomasw.dev/post/killbutmakeitlooklikeanaccident/ https://thomasw.dev/post/killbutmakeitlooklikeanaccident/
- senkora 2y agoNice! Even better.
- gdgghhhhh 2y agoSince you are writing to the location where rip is pointing to, you need to rewind to the beginning of the page first. Otherwise the program will crash if you're unlucky and rip is currently exactly at the end of an executable mapping. Low chance, but still...