View previous topic :: View next topic |
Author |
Message |
pierre_ n00b
Joined: 28 Apr 2003 Posts: 3
|
Posted: Mon Apr 28, 2003 10:46 pm Post subject: gdb, no core files, cannot start a debug session |
|
|
Hello,
On a fresh installed rc4, I try to use gdb with apache and a a dev version of php (the debug part).
gdb /usr/sbin/apache
#gdb run -X
<snip>no symbol</snip>
..once the segfault...
ptrace: Operation not permitted.
and that's all, I use CFLAGS '-ggdb'.
Withouth this CFLAGS the error was Cannot get register, operition not permitted.
I did not set any special security rules (i.e. grsecurity in the kernel options).
I really dunno where to look to fix that,
any idea?
pierre |
|
Back to top |
|
|
snkmoorthy Guru
Joined: 19 Nov 2002 Posts: 376
|
Posted: Tue Apr 29, 2003 12:27 am Post subject: |
|
|
I'm not totally sure about this but:
1. do you have -fomit-frame-pointer in you CFLAGS? |
|
Back to top |
|
|
pierre_ n00b
Joined: 28 Apr 2003 Posts: 3
|
Posted: Tue Apr 29, 2003 12:48 am Post subject: |
|
|
> 1. do you have -fomit-frame-pointer in you CFLAGS?[/quote]
No, I don't. I even overide default CFLAGS before, using only '-ggdb'.
Have I to comment the CFLAGS in make.conf while building something?
My main goal is to be able to debug php and mod_php and some console tools.
pierre |
|
Back to top |
|
|
snkmoorthy Guru
Joined: 19 Nov 2002 Posts: 376
|
Posted: Tue Apr 29, 2003 1:58 am Post subject: |
|
|
Code: | debug Tells configure and the makefiles to build for debugging. Effects vary acrosss packages, but generally it will at least add -g to CFLAGS. Remember to set FEATURES+=nostrip too. |
well this is what the USE flag says about generating debug infomation. |
|
Back to top |
|
|
iamarug Apprentice
Joined: 09 Feb 2003 Posts: 220
|
Posted: Tue Apr 29, 2003 3:49 am Post subject: |
|
|
Also, I think portage usually strips the binary after merge. That is why the debug use flag is needed. |
|
Back to top |
|
|
pierre_ n00b
Joined: 28 Apr 2003 Posts: 3
|
Posted: Tue Apr 29, 2003 10:00 am Post subject: |
|
|
iamarug wrote: | Also, I think portage usually strips the binary after merge. That is why the debug use flag is needed. |
Same final problem, I got the same message:
Starting program: /usr/local/apache/bin/httpd -X
Couldn't get registers: Operation not permitted.
Come from (after a segfault):
# gdb /usr/sbin/apache
gdb# run -X
Note that the debug symbols are not present.
I hopefully can debug with gentoo soon
pierre |
|
Back to top |
|
|
|