- Enable your user to run gdb as root without beeing asked for any password:
sudo visudo
Add the following line after all other rules:<youruser> ALL=(root) NOPASSWD:/usr/bin/gdb
- Create or modify a debug configuration in eclipse to run gdb as root
e.g. in Run > Debug Configurations > C/C++ Application > YourProject Debug:
change Debugger > Main > GDB debugger fromgdb
tosudo gdb