* Is 'cc' broken or am I??
@ 1996-11-22 5:00 Christopher Keller
1996-11-23 5:00 ` Stephen Stuart
1996-12-02 5:00 ` Volker Hejny
0 siblings, 2 replies; 3+ messages in thread
From: Christopher Keller @ 1996-11-22 5:00 UTC (permalink / raw)
Has anyone tried the '-g' option on the cc compiler and found the little
problem with path names to the source code? Apparently, if your final
executable resides in a different location then the source, gdb is
unable to bring up the source code during debugging sessions. However,
if you include the absolute path to the source code when compiling---
"cc -o foo /home/ckeller/foo.c" instead of
"cc -o foo foo.c"
Then everything works fine and gdb can correctly find the source, no
matter where the
executable. I refuse to change thirty or so different makefiles to hack
it together.
I find it hard to believe there is this big of a flaw in the Digital
Unix C compiler, but you never know. Have I missed some kind of flag??
Eventually, I plan to use gcc, but right now I am trying to
enjoy using the taso and xtaso flags with the regular c compiler.
Thanks.
--
Christopher Keller Software Engineer
ckeller@fived.c3i.saic.com "5D -- Comming to a theatre near
you!"
Science Applications International Corporation (SAIC - Annapolis, MD)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Is 'cc' broken or am I??
1996-11-22 5:00 Is 'cc' broken or am I?? Christopher Keller
@ 1996-11-23 5:00 ` Stephen Stuart
1996-12-02 5:00 ` Volker Hejny
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Stuart @ 1996-11-23 5:00 UTC (permalink / raw)
Christopher Keller (ckeller@fived.c3i.saic.com) wrote:
: Apparently, if your final
: executable resides in a different location then the source, gdb is
: unable to bring up the source code during debugging sessions.
: [...] Have I missed some kind of flag??
gdb has a -d flag ("man gdb") to specify additional source code
directories on the command line; within gdb, the "directory" command
("help files" will tell you all the commands useful for dealing with
files) manipulates the list of directories that are searched for
source code.
: Eventually, I plan to use gcc, but right now I am trying to
: enjoy using the taso and xtaso flags with the regular c compiler.
Don't forget to do the:
#pragma pointer_size save
#pragma pointer_size long
#include <stdio.h>
#pragma pointer_size restore
around system-supplied header files. Reading Craig Neth's advice on
"the perils of 32-bit mode" is advised: use AltaVista to search the
news for:
+pragma +xtaso
if you can't find the article on your server.
Stephen
--
- -----
Stephen Stuart stuart@pa.dec.com
Network Systems Laboratory
Digital Equipment Corporation
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Is 'cc' broken or am I??
1996-11-22 5:00 Is 'cc' broken or am I?? Christopher Keller
1996-11-23 5:00 ` Stephen Stuart
@ 1996-12-02 5:00 ` Volker Hejny
1 sibling, 0 replies; 3+ messages in thread
From: Volker Hejny @ 1996-12-02 5:00 UTC (permalink / raw)
On Fri, 22 Nov 1996 15:01:13 -0500, Christopher Keller wrote:
>Has anyone tried the '-g' option on the cc compiler and found the little
>problem with path names to the source code? Apparently, if your final
>executable resides in a different location then the source, gdb is
>unable to bring up the source code during debugging sessions. However,
>if you include the absolute path to the source code when compiling---
>
>"cc -o foo /home/ckeller/foo.c" instead of
>
>"cc -o foo foo.c"
>
>Then everything works fine and gdb can correctly find the source, no
>matter where the executable.
If you want to read the sources in gdb use the 'directory' command
to tell the debugger where the sources are. You heard about such
things like manuals ?
Why do you this is a bug ? IMHO this is exactly the way cc should
behave. I didn't make the experience that gcc handles this different ...
--
==============================================================================
Volker Hejny, II. Phys.Institut, Univ. Giessen | Tel.: 0641 - 702 2783
Heinrich-Buff-Ring 16, D-35392 Giessen | Sekretariat II. Physik:
EMail: Volker.Hejny@exp2.physik.uni-giessen.de | Tel.: 0641 - 702 2761
WWW: http://piggy.physik.uni-giessen.de/~hejny | Fax : 0641 - 74390
==============================================================================
IMPORTANT: The telephone numbers are only valid until 20.12.1996 <- NEW DATE!!
New numbers: Phone: 0641-99-33223 Sek.: 0641-99-33261 Fax.: changes later
==============================================================================
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1996-12-02 5:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-11-22 5:00 Is 'cc' broken or am I?? Christopher Keller
1996-11-23 5:00 ` Stephen Stuart
1996-12-02 5:00 ` Volker Hejny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox