• Advertisement

Archived

This topic is now archived and is closed to further replies.

gdb hates me

This topic is 5055 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was checking out my landscape engine with valgrind (it works with nvidia drivers! WOOT!) and apparently it found an invalid memory access and threw a segfault. It wouldn''t tell me where it happened (well, it did, but I need more info) so I decided to check it out with gdb. Except now whenever I run gdb and try to "run" the program, I get this error:
Starting program: *name of program*
Cannot exec : No such file or directory.
 
Program exited with code 0177.
You can''t do that without a process to debug. 
What''s that mean? What''s going on?

Share this post


Link to post
Share on other sites
Advertisement
are you sure you were in the directory of the executable (shouldn''t hurt, but could help), and jsut ran

gdb name_of_executable

?

Share this post


Link to post
Share on other sites
Yep, I'm in the right directory and everything.

It seems like gdb gives that error for any program I try to debug, not just my landscape engine.

Edit: I can also try to use gdb through Anjuta and Anjuta gives message boxes with similar messages.

Edit #2: It works when I login as root, but not as a regular user.

[edited by - BradDaBug on April 12, 2004 6:00:38 PM]

Share this post


Link to post
Share on other sites
Yes, used -g.

It''s wierd, but I completely shut down X and logged back in and it worked. I hope this doesn''t mean I can''t use Valgrind and gdb together without pain and torture.

Share this post


Link to post
Share on other sites
whoah. At the same time? Of course not. only one process can ptrace-attach to another process.

Share this post


Link to post
Share on other sites
I don''t mean at the same time, I mean using Valgrind to test it, then exiting Valgrind, then running gdb on the same executable. That''s not a problem, is it?

Share this post


Link to post
Share on other sites
The plot thickens!

It seems like it doesn''t have ANYTHING to do with Valgrind. This morning I booted my computer, started Linux, and decided to pick up where I left off last night and cranked up gdb. Uh oh! The problem has returned! I completely shut down and restarted X and it''s been working ever since.

Now I have no idea what''s up with it. Could xdm be doing something?

Share this post


Link to post
Share on other sites
aha. *smacks forehead*

I should have been more specific.

did you run it by typing

gdb ./prog

?

or just

gdb prog

Share this post


Link to post
Share on other sites
it could possibly be a bug in gdb. why don''t you upgrade to the latest version of gdb (6.0) and hope it sorts itself out? can''t hurt to try...

Share this post


Link to post
Share on other sites
I would suspect X and drivers for this one. Restarting X to fix it is very odd.

Share this post


Link to post
Share on other sites
This has nothing to do with the subject, but for a second I just saw it say "god hates me"

I think it has to do with how the brain percepts text. The b looks sort of like a d; and there is a d right next to it. IIRC, Cambridge or some university researched this not long ago.

Just thought I should mention it.

Share this post


Link to post
Share on other sites
quote:
Original post by aftermath
This has nothing to do with the subject, but for a second I just saw it say "god hates me"

I think it has to do with how the brain percepts text. The b looks sort of like a d; and there is a d right next to it. IIRC, Cambridge or some university researched this not long ago.

Just thought I should mention it.


I would post it, but damn its hard to google for something that is purposely misspelt.

Share this post


Link to post
Share on other sites
It could just be when the "d" is next to the "b" the two vertical parts line up so that "db" looks like "ob" and then since the mind didn''t see the "d" the first time it sticks it in there after the "o" in place of the "b" and it becomes "od".

Share this post


Link to post
Share on other sites
I don''t know if you''re using testing or not, but gdb 6.1 just merged into testing.

Share this post


Link to post
Share on other sites

  • Advertisement