what have i done wrong (or didn't do) that gdb
is not working properly for me?
root@6be3d60ab7c6:/# cat minimal.c int main() { int i = 1337; return 0; } root@6be3d60ab7c6:/# gcc -g minimal.c -o minimal root@6be3d60ab7c6:/# gdb minimal GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1 . . . Reading symbols from minimal...done. (gdb) break main Breakpoint 1 at 0x4004f1: file minimal.c, line 3. (gdb) run Starting program: /minimal warning: Error disabling address space randomization: Operation not permitted During startup program exited normally. (gdb) (gdb) print i No symbol "i" in current context.
Enabling ASLR By default, ASLR is disabled. To enable ASLR, either IPL the system using a DIAGxx member that specifies the ASLR option or issue the SET DIAG=xx command after IPL. If you enable ASLR after IPL, only those jobs that are subsequently started and that are not exempt from ASLR will have ASLR enabled.
Address space layout randomization (ASLR) is a memory-protection process for operating systems (OSes) that guards against buffer-overflow attacks by randomizing the location where system executables are loaded into memory.
If you're using Docker, you probably need the --security-opt seccomp=unconfined
option (as well as enabling ptrace):
docker run --cap-add=SYS_PTRACE --security-opt seccomp=unconfined
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With