Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: yakumoklesk on June 30, 2009, 10:55:28 pm

Title: [SOLVED]Debugging a executable always in the same address space (linux)?
Post by: yakumoklesk on June 30, 2009, 10:55:28 pm
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.
Title: Re: Debugging a executable always in the same address space (linux)?
Post by: yakumoklesk on July 01, 2009, 03:05:14 pm
I have tried to put

set disable-randomization on

on the debuggers initialization commands, but still does not work.
Title: Re: Debugging a executable always in the same address space (linux)?
Post by: yakumoklesk on July 01, 2009, 03:33:43 pm
Finally I used the shell command

Code
sudo sysctl -w kernel.randomize_va_space=0

The initial value was 2, obtained with the command

Code
sudo sysctl -q kernel.randomize_va_space

Remember to revert the initial value, for security.