List command question

Andrew Cagney
Wed May 19 14:22:00 GMT 2004

> I get no line number known for main...
> manjo@nefertiti:~/tests> gdb64 hellow1
> GNU gdb 6.1
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you
> are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for
> details.
> This GDB was configured as "ppc64-suse-linux"...Using host libthread_db
> library "/lib64/tls/".
> (gdb) list
> 1       ../sysdeps/powerpc/powerpc64/elf/start.S: No such file or
> directory.
>         in ../sysdeps/powerpc/powerpc64/elf/start.S
> (gdb) list main
> No line number known for main.
> (gdb)

GDB has the concept of a current source-and-line (SAL).  When GDB starts 
it initializes it to something.  Looking at the behavior you've 
illustrated, it tries in order: main's SAL; entry-point's SAL; ???

I guess the question is, should GDB set SAL to main when main doesn't 
have any line number information?

Note here that this will end up interacting with the ``start'' mechanism 
that Joel is playing with - its a mechanism for doing run-to ``main''. 
So this will be a language dependent concept.


More information about the Gdb mailing list