Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Source files as symlinks for 5.2.1
@ 2002-11-12 15:23 Albert Chin
  2002-11-12 15:59 ` Albert Chin
  0 siblings, 1 reply; 2+ messages in thread
From: Albert Chin @ 2002-11-12 15:23 UTC (permalink / raw)
  To: gdb; +Cc: peter.torngaard

On Redhat Linux 7.1 with GDB 5.2.1:
  $ mkdir /tmp/a /tmp/b
  $ cd /tmp/a
  $ ln -s ../b/sample.c link.c
  $ ls -ld link.c
  ... link.c -> ../b/sample.c
  $ gcc -g link.c
  $ gdb a.out
  (gdb) list
  (gdb) info source
  Current source file is link.c
  Compilation directory is /tmp/a/
  Located in /tmp/b/sample.c
  Contains 6 lines.
  Source language is c.
  Compiled with stabs debugging format.

Why isn't the source file '/tmp/a/link.c'?

-- 
albert chin (china@thewrittenword.com)


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

* Re: Source files as symlinks for 5.2.1
  2002-11-12 15:23 Source files as symlinks for 5.2.1 Albert Chin
@ 2002-11-12 15:59 ` Albert Chin
  0 siblings, 0 replies; 2+ messages in thread
From: Albert Chin @ 2002-11-12 15:59 UTC (permalink / raw)
  To: gdb; +Cc: peter.torngaard

On Tue, Nov 12, 2002 at 05:23:03PM -0600, Albert Chin wrote:
> On Redhat Linux 7.1 with GDB 5.2.1:
>   $ mkdir /tmp/a /tmp/b
>   $ cd /tmp/a
>   $ ln -s ../b/sample.c link.c
>   $ ls -ld link.c
>   ... link.c -> ../b/sample.c
>   $ gcc -g link.c
>   $ gdb a.out
>   (gdb) list
>   (gdb) info source
>   Current source file is link.c
>   Compilation directory is /tmp/a/
>   Located in /tmp/b/sample.c
>   Contains 6 lines.
>   Source language is c.
>   Compiled with stabs debugging format.
> 
> Why isn't the source file '/tmp/a/link.c'?

And:
  (gdb) set annotate 1
  (gdb) info line
  ...
  Line ...
     and ends at ...
  /tmp/b/sample.c:...

DDD is reading the output of 'info line' at annotation level 1 and
using sample.c as the filename to set the breakpoint for. As 'link.c'
is loaded instead, 'set breakpoint sample.c:[line #]' this fails.
Oddly enough the HP wdb debugger doesn't read the link.

-- 
albert chin (china@thewrittenword.com)


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

end of thread, other threads:[~2002-11-12 23:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-12 15:23 Source files as symlinks for 5.2.1 Albert Chin
2002-11-12 15:59 ` Albert Chin

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