Hi,

I can generate a debugging version of LessTif with -O0 and -g.
Is it then alright to move the LessTif files to the PREFIX
directory with the "make install" and use LessTif as such for
debugging?

I've done that, plus configured+make Grace for debugging.

Clearing out the text in the Results-window, gives a SIGSEGV.
Here is the gdb session:

$ gdb ./xmgrace
GNU gdb 19991004
[...]
This GDB was configured as "i386-redhat-linux"...
(gdb) break exit
Breakpoint 1 at 0x804d3ac
(gdb) run -sync
Starting program: /home/software/GRACE/grace/src/./xmgrace -sync
Breakpoint 1 at 0x4041b112: file exit.c, line 40.
[...here I cleared the Results-window...]
Program received signal SIGSEGV, Segmentation fault.
0x4025b688 in HandleActions () from /usr/X11R6/lib/libXt.so.6
(gdb) where
#0  0x4025b688 in HandleActions () from /usr/X11R6/lib/libXt.so.6
#1  0x4025bbd6 in HandleSimpleState () from /usr/X11R6/lib/libXt.so.6
#2  0x4025c111 in _XtTranslateEvent () from /usr/X11R6/lib/libXt.so.6
#3  0x402374e7 in XtDispatchEventToWidget () from
/usr/X11R6/lib/libXt.so.6
#4  0x40237cf5 in DispatchEvent () from /usr/X11R6/lib/libXt.so.6
#5  0x40237fb6 in _XtDefaultDispatcher () from /usr/X11R6/lib/libXt.so.6
#6  0x40238363 in XtDispatchEvent () from /usr/X11R6/lib/libXt.so.6
#7  0x40238859 in XtAppMainLoop () from /usr/X11R6/lib/libXt.so.6
#8  0x80f2024 in startup_gui () at xmgrace.c:1126
#9  0x804f8a5 in main (argc=1, argv=0xbffffb04) at main.c:758
(gdb) quit
The program is running.  Exit anyway? (y or n) y
$

What does this mean? Does LessTif make a mistake here, or is
it Grace?

Regards,

Rob.

Alexander Mai wrote:
> some remarks debugging (parts may be in the LessTif docs already,
> e.g. bugs.html, but I'll add missing stuff):
> 
>  - build/install a debugging version of lesstif (see configure flags)
>  - build application with debugging support (i.e. in any case with -g
>    (if gcc is being used) and disable optimization (-O0))
>  - start in a debugger (gdb)
>  - set breakpoint on exit() (if looking for X protocol errors)
>  - run in synchronous mode (run -sync)
>  - reproduce bug
>  - produce a stacktrace (bt)
> 
> So far it should be straightforward and easily be adopted even to
> "nonGNU" environments.

Reply via email to