Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gdb, no core files, cannot start a debug session
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
pierre_
n00b
n00b


Joined: 28 Apr 2003
Posts: 3

PostPosted: Mon Apr 28, 2003 10:46 pm    Post subject: gdb, no core files, cannot start a debug session Reply with quote

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
View user's profile Send private message
snkmoorthy
Guru
Guru


Joined: 19 Nov 2002
Posts: 376

PostPosted: Tue Apr 29, 2003 12:27 am    Post subject: Reply with quote

I'm not totally sure about this but:

1. do you have -fomit-frame-pointer in you CFLAGS?
Back to top
View user's profile Send private message
pierre_
n00b
n00b


Joined: 28 Apr 2003
Posts: 3

PostPosted: Tue Apr 29, 2003 12:48 am    Post subject: Reply with quote

> 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
View user's profile Send private message
snkmoorthy
Guru
Guru


Joined: 19 Nov 2002
Posts: 376

PostPosted: Tue Apr 29, 2003 1:58 am    Post subject: Reply with quote

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
View user's profile Send private message
iamarug
Apprentice
Apprentice


Joined: 09 Feb 2003
Posts: 220

PostPosted: Tue Apr 29, 2003 3:49 am    Post subject: Reply with quote

Also, I think portage usually strips the binary after merge. That is why the debug use flag is needed.
Back to top
View user's profile Send private message
pierre_
n00b
n00b


Joined: 28 Apr 2003
Posts: 3

PostPosted: Tue Apr 29, 2003 10:00 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum