Bug 62851 - file paths in debuger broken
Summary: file paths in debuger broken
Status: RESOLVED NOT A BUG
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: git master
Platform: RedHat Enterprise Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KDevelop Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-18 00:17 UTC by Jon Smirl
Modified: 2003-10-17 04:25 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Smirl 2003-08-18 00:17:09 UTC
Version:           CVS (using KDE KDE 3.1)
Installed from:    RedHat RPMs

This used to work last week so something has changed...

In Project Options/Run Options
Select () run from Build directory.
Now browse for a main program.
In my case the main program is located at
../../../../../progs/miniglx/sample_server
I select this an nothing display. If I start the debugger I get a path not found.

So I enter ../../../../../progs/miniglx/sample_server manually.
This works but nothing is displayed in Main Program.

Now in the debugger I am trying to set breakpoints.
miniglx.c is located at /home/newtree/temp/src/miniglx/miniglx.c

Now I start my program and the breakpoints are not being set with the correct filepath.
miniglx.c is at ../../../../miniglx/miniglx.c not miniglx.c
 gdb /home/newtree/temp/src/mesa/drivers/dri/r128/../../../../../progs/miniglx/sample_server -fullname -nx -quiet
(gdb) set edit off 
(gdb) set confirm off 
(gdb) 
(gdb) 
(gdb) set print static-members off 
(gdb) tty /dev/pts/4 
(gdb) set width 0 
(gdb) set height 0 
(gdb) set stop-on 1 
(gdb) handle SIG32 pass nostop noprint 
(gdb) handle SIG43 pass nostop noprint 
(gdb) set print asm-demangle on 
(gdb) cd /home/newtree/temp/src/mesa/drivers/dri/r128 
(gdb) break miniglx.c:940 
No source file named miniglx.c.

(gdb) run 
[New Thread 1077032096 (LWP 7309)]
Stopped due to shared library event
(gdb) break miniglx.c:940 
No source file named miniglx.c.

(gdb) continue 
[Switching to Thread 1077032096 (LWP 7309)]
Stopped due to shared library event
(gdb) break miniglx.c:940 
No source file named miniglx.c.

(gdb) continue 
Stopped due to shared library event
(gdb) break miniglx.c:940 
No source file named miniglx.c.

(gdb) continue 

Program exited with code 0177.
Comment 1 Jon Smirl 2003-08-18 00:49:48 UTC
I noticed in the Application window this: 
/home/newtree/temp/progs/miniglx/sample_server: relocation error:
/home/newtree/temp/progs/miniglx/sample_server: undefined symbol
__miniglx_Start_Server

But when I run sample_sever from the command line it works without problem.

I think I am starting to get a handle on what the problem is. I need to change
to run it from where the executable is located. The program is linked using a
relative path to the shared objects.  -Wl,-rpath,$(TOP)/lib

I tried this and it work.

Leave the bug open since the path is still not being displayed in Project
Options/Run Options/Main Program
Comment 2 Amilcar do Carmo Lucas 2003-08-18 10:20:56 UTC
> "The path is still not being displayed in Project Options/Run Options/Main 
Program 
 
This is most probably because your path is outside of the build directory 
tree. 
Try do do a soft-link in your build directory pointing to the location you 
want. Give that as input to the Options/Main Program and it should work and 
display fine. 
The problem is related with the "relativePath()" function on lib/urlUtil this 
sugestion is a way to bypass the problem 
Comment 3 Thiago Macieira 2003-10-17 04:25:10 UTC
As Amilcar said, the problem is your installation, since you're getting Relocation errors. It is not a KDevelop bug or even a compilation error.