public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* init.c:  No such file or directory.
@ 2003-06-09 19:34 Benjamin P Myers
  2003-06-09 19:42 ` Daniel Jacobowitz
  0 siblings, 1 reply; 5+ messages in thread
From: Benjamin P Myers @ 2003-06-09 19:34 UTC (permalink / raw)
  To: gdb

I'm using Absoft's ProFortran f77 compiler on SuSE.  I was able to use gdb on 
SuSE-7.2 prior to my reinstall of SuSE-8.1, but now I get this error:

> f77 -g hello.f
<snip>
> gdb ./a.out
GNU gdb 5.2.1 <snip>
This GDB was configured as "i586-suse-linux"...
(gdb) list
1       init.c: No such file or directory.
        in init.c
(gdb)

According to the docs, Absoft's f77 writes out in 'dwarf' format, so I tried a 
'hello world' with gcc:

> gcc -gdwarf hello.c
> gdb ./a.out  <snip>
(gdb) list
1       init.c: No such file or directory.
        in init.c
(gdb)

So I download and build gdb-5.3:

> cp gdb-5.3/gdb/gdb ~/bin
> gcc -gdwarf hello.c
> ~/bin/gdb ./a.out
GNU gdb 5.3
<snip>
This GDB was configured as "i686-pc-linux-gnu"...
(gdb) list
1       init.c: No such file or directory.
        in init.c
(gdb)

> gcc --version
gcc (GCC) 3.2

> ld -v
GNU ld version 2.12.90.0.15 20020717 (SuSE)

> ls /lib/ld-*.so
/lib/ld-2.2.5.so

I have also tried gcc-2.95.3 with the same result.  The gdb mailing list 
archives suggest that gdb can't find the source file and that I do a 'dir .' 
in gdb before i 'list', but i got the same error.

Anyone have any suggestions?

Thanks for your help.
-ben



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

* Re: init.c:  No such file or directory.
  2003-06-09 19:34 init.c: No such file or directory Benjamin P Myers
@ 2003-06-09 19:42 ` Daniel Jacobowitz
  2003-06-09 20:09   ` Benjamin P Myers
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2003-06-09 19:42 UTC (permalink / raw)
  To: Benjamin P Myers; +Cc: gdb

On Mon, Jun 09, 2003 at 02:34:16PM -0500, Benjamin P Myers wrote:
> I'm using Absoft's ProFortran f77 compiler on SuSE.  I was able to use gdb on 
> SuSE-7.2 prior to my reinstall of SuSE-8.1, but now I get this error:
> 
> > f77 -g hello.f
> <snip>
> > gdb ./a.out
> GNU gdb 5.2.1 <snip>
> This GDB was configured as "i586-suse-linux"...
> (gdb) list
> 1       init.c: No such file or directory.
>         in init.c
> (gdb)
> 
> According to the docs, Absoft's f77 writes out in 'dwarf' format, so I tried a 
> 'hello world' with gcc:
> 
> > gcc -gdwarf hello.c
> > gdb ./a.out  <snip>
> (gdb) list
> 1       init.c: No such file or directory.
>         in init.c
> (gdb)
> 
> So I download and build gdb-5.3:
> 
> > cp gdb-5.3/gdb/gdb ~/bin
> > gcc -gdwarf hello.c
> > ~/bin/gdb ./a.out
> GNU gdb 5.3
> <snip>
> This GDB was configured as "i686-pc-linux-gnu"...
> (gdb) list
> 1       init.c: No such file or directory.
>         in init.c
> (gdb)
> 
> > gcc --version
> gcc (GCC) 3.2
> 
> > ld -v
> GNU ld version 2.12.90.0.15 20020717 (SuSE)
> 
> > ls /lib/ld-*.so
> /lib/ld-2.2.5.so
> 
> I have also tried gcc-2.95.3 with the same result.  The gdb mailing list 
> archives suggest that gdb can't find the source file and that I do a 'dir .' 
> in gdb before i 'list', but i got the same error.
> 
> Anyone have any suggestions?

Is it a problem?  Can you list your program's entry point and set
breakpoints?

That suggests that the init.c is coming from gcc/glibc, and has debug
information.  It's not associated with your application.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

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

* Re: init.c:  No such file or directory.
  2003-06-09 19:42 ` Daniel Jacobowitz
@ 2003-06-09 20:09   ` Benjamin P Myers
  2003-06-09 20:17     ` Daniel Jacobowitz
  0 siblings, 1 reply; 5+ messages in thread
From: Benjamin P Myers @ 2003-06-09 20:09 UTC (permalink / raw)
  To: gdb

On Monday 09 June 2003 14:41, Daniel Jacobowitz wrote:
> Is it a problem?  Can you list your program's entry point and set
> breakpoints?
>
> That suggests that the init.c is coming from gcc/glibc, and has debug
> information.  It's not associated with your application.

It is a problem more for the other people I work with than I, because they 
debug quite a bit more fortran code (and like to use ddd, which this seems to 
break).

I think this is what you mean, right?

> gcc -gdwarf hello.c
> ~/bin/gdb ./a.out
GNU gdb 5.3
<snip>
(gdb) list hello.c:main
No source file named hello.c.
(gdb) break hello.c:6
No source file named hello.c.
(gdb)

vs.

> gcc -g hello.c
> ~/bin/gdb ./a.out
<snip>
(gdb) list hello.c:main
1       #include <stdio.h>
2
3       int
4       main ()
5       {
6         printf("Hello, World\n");
7       }
(gdb) break hello.c:6
Breakpoint 1 at 0x804834c: file hello.c, line 6.
(gdb)

Not much luck.  /lib/libc.so.6 is not stripped.  Are you suggesting I do so?

Thanks for your help.
-Ben



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

* Re: init.c:  No such file or directory.
  2003-06-09 20:09   ` Benjamin P Myers
@ 2003-06-09 20:17     ` Daniel Jacobowitz
  2003-06-09 20:41       ` Benjamin P Myers
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2003-06-09 20:17 UTC (permalink / raw)
  To: Benjamin P Myers; +Cc: gdb

On Mon, Jun 09, 2003 at 03:08:59PM -0500, Benjamin P Myers wrote:
> On Monday 09 June 2003 14:41, Daniel Jacobowitz wrote:
> > Is it a problem?  Can you list your program's entry point and set
> > breakpoints?
> >
> > That suggests that the init.c is coming from gcc/glibc, and has debug
> > information.  It's not associated with your application.
> 
> It is a problem more for the other people I work with than I, because they 
> debug quite a bit more fortran code (and like to use ddd, which this seems to 
> break).
> 
> I think this is what you mean, right?
> 
> > gcc -gdwarf hello.c
> > ~/bin/gdb ./a.out
> GNU gdb 5.3
> <snip>
> (gdb) list hello.c:main
> No source file named hello.c.
> (gdb) break hello.c:6
> No source file named hello.c.
> (gdb)

Then I don't know what's wrong.  MUST you use DWARF?  Is DWARF-2 an
option?

I seem to be saying this a lot lately.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

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

* Re: init.c:  No such file or directory.
  2003-06-09 20:17     ` Daniel Jacobowitz
@ 2003-06-09 20:41       ` Benjamin P Myers
  0 siblings, 0 replies; 5+ messages in thread
From: Benjamin P Myers @ 2003-06-09 20:41 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb

On Monday 09 June 2003 15:17, Daniel Jacobowitz wrote:
> Then I don't know what's wrong.  MUST you use DWARF?  Is DWARF-2 an
> option?
>
> I seem to be saying this a lot lately.

Heh, I installed the glibc source:

15:38:06 dative@padmanabha:~ 0 > gcc -gdwarf hello.c
15:38:18 dative@padmanabha:~ 0 > ~/bin/gdb ./a.out
GNU gdb 5.3
<snip>
(gdb) list
1       /* Special startup support.
2          Copyright (C) 1997, 1998 Free Software Foundation, Inc.
3          This file is part of the GNU C Library.
4
5          The GNU C Library is free software; you can redistribute it and/or
6          modify it under the terms of the GNU Lesser General Public
7          License as published by the Free Software Foundation; either
8          version 2.1 of the License, or (at your option) any later version.
9
10         The GNU C Library is distributed in the hope that it will be 
useful,
(gdb)

Unfortunately it does look like I do have to use DWARF.  I tried a few other 
options and none of them would work with the Absoft compiler, and nothing in 
the docs that say anything other than 'dwarf'.  So.  Heh.  I dunno.

Thanks for your help.
-ben

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

end of thread, other threads:[~2003-06-09 20:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-09 19:34 init.c: No such file or directory Benjamin P Myers
2003-06-09 19:42 ` Daniel Jacobowitz
2003-06-09 20:09   ` Benjamin P Myers
2003-06-09 20:17     ` Daniel Jacobowitz
2003-06-09 20:41       ` Benjamin P Myers

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).