How to build debuggable executable on Solaris?

Erik Max Francis max at alcyone.com
Tue Oct 1 20:54:11 EDT 2002


Skip Montanaro wrote:

> When I try to debug it with gdb I get
> 
>     GNU gdb 5.0
	...
>     (no debugging symbols found)...

Hmm.  Try building with -ggdb.

> Dbx seems okay with the executable (it doesn't warn about not finding
> any
> debug symbols), but "stop main" doesn't work as I remembered from ages
> ago:
> 
	...
>     (dbx) stop main
>     dbx: anachronism: Use 'stop change <variable>' or 'stop cond
> <bool-expr>'.
>     Event specifications without keywords will not be accepted in
> future releases
>     dbx: 'main' is a function or procedure, expected variable

This response should have been a strong hint that you were remembering
the wrong command.  Try `break main' instead.

max at cesium:~% gdb
GNU gdb 5.0
	...
This GDB was configured as "sparc-sun-solaris2.8".
(gdb) quit
max at cesium:~% gdb =python
GNU gdb 5.0
Copyright 2000 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 "sparc-sun-solaris2.8"...
(gdb) break main
Breakpoint 1 at 0x1a6b8: file Modules/python.c, line 10.
(gdb) run
Starting program: /usr/local/bin/python 
[New LWP 1]
[New LWP 2]
[New LWP 3]

Breakpoint 1, main (argc=1, argv=0xffbef934) at Modules/python.c:10
10      Modules/python.c: No such file or directory.

It's working, obviously, even though gdb doesn't know where to find the
Python source (which I don't have handy anywhere on this machine).

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ Honesty has nothing to hide
\__/ Joi
    Crank Dot Net / http://www.crank.net/
 Cranks, crackpots, kooks, & loons on the Net.



More information about the Python-list mailing list