User forums > Using Code::Blocks
[SOLVED]Debugging a executable always in the same address space (linux)?
(1/1)
yakumoklesk:
Is there a way to instruct code::blocks, via parameters or project configuration, to make able debug the same executable in the same address space in order to getting always the same allocation memory addresses for objects?
I don't know if this is possible, or if there is a way to tell gdb to do this, but it would be great for help in my debugging.
Thanks.
yakumoklesk:
I have tried to put
set disable-randomization on
on the debuggers initialization commands, but still does not work.
yakumoklesk:
Finally I used the shell command
--- Code: ---sudo sysctl -w kernel.randomize_va_space=0
--- End code ---
The initial value was 2, obtained with the command
--- Code: ---sudo sysctl -q kernel.randomize_va_space
--- End code ---
Remember to revert the initial value, for security.
Navigation
[0] Message Index
Go to full version