root@debian:/tmp# gdb apache2
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
warning: The current binary is a PIE (Position Independent Executable), which
GDB does NOT currently support. Most debugger features will fail if used
in this session.
Reading symbols from /usr/sbin/apache2...done.
(gdb) b ap_process_request
Breakpoint 1 at 0x50374: file /home/tarside/source/apache2-2.2.16/apache2-2.2.16/modules/http/http_request.c, line 276.
(gdb) b main
Breakpoint 2 at 0x22aee: file /home/tarside/source/apache2-2.2.16/apache2-2.2.16/server/main.c, line 452.
(gdb) set args -X
Starting program: /usr/sbin/apache2 -X
Cannot insert breakpoint 1.
Error accessing memory address 0x50362: Input/output error.
Cannot insert breakpoint 2.
Error accessing memory address 0x22ad9: Input/output error.