public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* Re: Any Clues about this problem? Close but...
@ 2000-07-07 22:52 Dave Arnold
  2000-07-08 14:28 ` Chris Faylor
  0 siblings, 1 reply; 2+ messages in thread
From: Dave Arnold @ 2000-07-07 22:52 UTC (permalink / raw)
  To: insight; +Cc: insight

-----Original Message-----
From: Chris Faylor <cgf@cygnus.com>
To: Dave Arnold <avr_fan@mailandnews.com>
Cc: insight@sourceware.cygnus.com <insight@sourceware.cygnus.com>
Date: Friday, July 07, 2000 10:15 PM
Subject: Re: Any Clues about this problem?


>On Fri, Jul 07, 2000 at 10:17:54PM -0700, Dave Arnold wrote:
>>Anyone have a clue why I can't list the source for the program I'm
debuggin
>>using insight?
>>
>>(gdb) list
>>1         /cygnus/netrel/src/cygwin-1.1.2/winsup/cygwin/libccrt0.cc: No
such
>>file or directory.
>>
>>This path is strange, I don't think it exists anywhere under my cygwin
root.
>
>The path is coming from the cygwin DLL.  You don't want that.  That is the
location
>of the 'libccrt0.cc' file on my machine from when I make a cygwin net
release.
>
>Try 'list main'.
>
>Are you *sure* you're both compiling and linking with the '-g' option?
When
>I type just 'list' I get my 'main'.


That is a good question because after taking a close look I discovered a big
mistake on my part. I commented out the -g variable definition in the top of
the makefile.

CC = gcc
# CFLAGS  = -g
load:   load5.o btlib.o
 $(CC) $(CFLAGS) load5.o btlib.o -o load

However I recompiled with -g for sure and still
I got this output:

(gdb) list
1 frame.c: No such file or directory.

(gdb) list main
Error: No line number known for main.

(gdb)

>cgf

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

* Re: Any Clues about this problem? Close but...
  2000-07-07 22:52 Any Clues about this problem? Close but Dave Arnold
@ 2000-07-08 14:28 ` Chris Faylor
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Faylor @ 2000-07-08 14:28 UTC (permalink / raw)
  To: Dave Arnold; +Cc: insight

On Fri, Jul 07, 2000 at 11:00:30PM -0700, Dave Arnold wrote:
>>cgf wrote:
>>Try 'list main'.
>>
>>Are you *sure* you're both compiling and linking with the '-g' option?
>>When I type just 'list' I get my 'main'.
>
>That is a good question because after taking a close look I discovered
>a big mistake on my part.  I commented out the -g variable definition
>in the top of the makefile.
>
>CC = gcc
># CFLAGS = -g
>load: load5.o btlib.o
>	$(CC) $(CFLAGS) load5.o btlib.o -o load
>
>However I recompiled with -g for sure and still I got this output:
>
>(gdb) list 1
>frame.c: No such file or directory.

??? I don't see a 'frame.c' above.

However, if gdb is unable to find a file that means that you are either
not cd'ed to the directory that holds the file or you have not used
the gdb 'directory' command:

(gdb) help directory
Add directory DIR to beginning of search path for source files.
Forget cached info on source file locations and line positions.
DIR can also be $cwd for the current working directory, or $cdir for the
directory in which the source file was compiled into object code.
With no argument, reset the search path to $cdir:$cwd, the default.

>(gdb) list main
>Error: No line number known for main.

I.e., the file containing your main() has not been compiled with -g.

>(gdb)

It *still* sounds like not all of your objects are being compiled with
-g.

Is it possible that you have both a 'load' file and a 'load.exe'?  You
know that you have to use 'load.exe', right?  It is safest to add
a .exe whenever you are generating an executable, so the above makefile
should look like this:

CC = gcc
CFLAGS = -g
load.exe: load5.o btlib.o
	$(CC) $(CFLAGS) load5.o btlib.o -o load.exe

cgf

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

end of thread, other threads:[~2000-07-08 14:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-07 22:52 Any Clues about this problem? Close but Dave Arnold
2000-07-08 14:28 ` Chris Faylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).