Author Topic: [SOLVED]Debugging a executable always in the same address space (linux)?  (Read 4078 times)

Offline yakumoklesk

  • Multiple posting newcomer
  • *
  • Posts: 34
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.
« Last Edit: July 01, 2009, 03:34:13 pm by yakumoklesk »

Offline yakumoklesk

  • Multiple posting newcomer
  • *
  • Posts: 34
Re: Debugging a executable always in the same address space (linux)?
« Reply #1 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.

Offline yakumoklesk

  • Multiple posting newcomer
  • *
  • Posts: 34
Re: Debugging a executable always in the same address space (linux)?
« Reply #2 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.