Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* gdb changes the path
@ 2007-09-07  9:21 Pawel K
  2007-09-07 11:49 ` Daniel Jacobowitz
  0 siblings, 1 reply; 4+ messages in thread
From: Pawel K @ 2007-09-07  9:21 UTC (permalink / raw)
  To: gdb

Hello
Why gdb changes path while it works ?
My small project consists of 2 files:
/project/main.cpp
/project/include/functions.h 

main.cpp includes functions.h

main.cpp has been compiled as follows:
g++ -O0 -g ...

Now is the case:

(gdb) bre functions.h:100
Breakpoint ... file /projekt/include/functions.h:100

(gdb) bre main.cpp:200
Breakpoint ... file main.cpp

(gdb) bre functions.h:100
Breakpoint ... file include/functions.h:100

1. Why gdb changes the internal path after setting up
the breakpoint at main.cpp ?

2. How to force gdb to use the relative path as in
breakpoint nr 3 above ?

I use:
gdb 6.6
g++ 4.1.2

Thank You for help


       
____________________________________________________________________________________
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gdb changes the path
  2007-09-07  9:21 gdb changes the path Pawel K
@ 2007-09-07 11:49 ` Daniel Jacobowitz
  2007-09-07 12:35   ` Pawel K
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Jacobowitz @ 2007-09-07 11:49 UTC (permalink / raw)
  To: Pawel K; +Cc: gdb

On Fri, Sep 07, 2007 at 02:14:45AM -0700, Pawel K wrote:
> 2. How to force gdb to use the relative path as in
> breakpoint nr 3 above ?

Why?  It's a different name for the same file, and GDB knows its full
name.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gdb changes the path
  2007-09-07 11:49 ` Daniel Jacobowitz
@ 2007-09-07 12:35   ` Pawel K
  2007-09-07 13:37     ` Daniel Jacobowitz
  0 siblings, 1 reply; 4+ messages in thread
From: Pawel K @ 2007-09-07 12:35 UTC (permalink / raw)
  To: gdb

--- Daniel Jacobowitz <drow@false.org> wrote:
> On Fri, Sep 07, 2007 at 02:14:45AM -0700, Pawel K
> wrote:
> > 2. How to force gdb to use the relative path as in
> > breakpoint nr 3 above ?
> 
> Why?  It's a different name for the same file, and
> GDB knows its full
> name.

Since when I specify the breakpoint like:
(gdb) bre functions.h:100

I cannot "list" the source lines.
I can "list" the source line when I specify the
breakpoint like in step 3 or like as follows:
(gdb) bre include/functions.h:100

I also found that when I specify the breakpoint like
in step 3 or like
(gdb) include/functions.h:100

the gdb breaks execution in the next function.
Both functions are defined inside the the same class.

So now I have 2 problems:
1. I cannot list the source code in case of absolute
path.
2. Gdb stops execution in the next function.

As I wrote in my previous e-mail. I compile it as
follows:
g++ -O0 -g ...

Do You have any idea what can be wrong ?

thank You for help


       
____________________________________________________________________________________
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gdb changes the path
  2007-09-07 12:35   ` Pawel K
@ 2007-09-07 13:37     ` Daniel Jacobowitz
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2007-09-07 13:37 UTC (permalink / raw)
  To: Pawel K; +Cc: gdb

On Fri, Sep 07, 2007 at 05:32:01AM -0700, Pawel K wrote:
> --- Daniel Jacobowitz <drow@false.org> wrote:
> > On Fri, Sep 07, 2007 at 02:14:45AM -0700, Pawel K
> > wrote:
> > > 2. How to force gdb to use the relative path as in
> > > breakpoint nr 3 above ?
> > 
> > Why?  It's a different name for the same file, and
> > GDB knows its full
> > name.
> 
> Since when I specify the breakpoint like:
> (gdb) bre functions.h:100
> 
> I cannot "list" the source lines.

You may want to try a GDB 6.7 snapshot.  I hope this has been
improved.

> Do You have any idea what can be wrong ?

No, sorry.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-09-07 12:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-07  9:21 gdb changes the path Pawel K
2007-09-07 11:49 ` Daniel Jacobowitz
2007-09-07 12:35   ` Pawel K
2007-09-07 13:37     ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox