From Bugzilla Helper: User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.2-2 i686) Description of problem: In simple "hello world" test program, hello.c, compiled to executable hello. Runs fine. Can run with gdb also. Try to set breakpoint on line 62; here's what happens: (gdb) break 62 No line 62 in file "init.c" So try (gdb) break hello.c:62 No source file named hello.c. But hello.c is in the same directory (which is in the path). What is init.c anyway? Gdb ain't too useful without breakpoints... How reproducible: Always Steps to Reproduce: 1. Start gdb on any executable that's been compiled with -g 2. Try to set a breakpoint in the source file with break ## or break file:## Actual Results: As described above; tries to break in a file called "init.c" by default, which doesn't seem to exist; if you specify a file it says the file is not found, even if it is in the path. Expected Results: Should have set the breakpoint. Additional info: (My machine's name is entropy. Wrote a simple "hello world" demo program in C that *does* have a line 62 I want to break at, and does include main(). I've used gdb many times on previous versions w/o trouble--this is weird. I first noticed the problem when trying to debug a more complicated program--thought I'd done something wrong. Eventually I tried it on another program I'd written and got the same result. I seem to get the same result with every program... they all run fine but I cannot set breakpoints. So I made this demonstration). entropy$ > rpm --verify gdb entropy$ > rpm -q gdb gdb-5.0rh-5 entropy$ > rpm --verify gcc entropy$ > rpm -q gcc gcc-2.96-81 entropy$ > gcc -Wall -g -o hello hello.c entropy$ > hello Hello World entropy$ > gdb hello [...gdb startup text omitted...] (gdb) break 62 No line 62 in file "init.c". (gdb) break hello.c:62 No source file named hello.c. (gdb) run Starting program: /home/mrubel/progs/sandbox/gtk/hello Hello World Program exited normally (gdb) quit
OOPS! -- WITHDRAWN -- My mistake-- wasn't actually compiling with -g, due to a bug in my makefiles. This part of gdb works fine. Next time I'll check more carefully. Sorry!