xemacs doesn't show source code when debugging using MinGW gdb

xemacs doesn't show source code when debugging using MinGW gdb

Post by Linh Pha » Wed, 07 May 2008 03:29:36


I'm having a problem runing MinGW gdb in xemacs in that gdb doesn't show
source code when debugging in xemacs. After start, I do a step but the
xemacs editor shows two windows: top for commands of a debugger and bottom,
which is empty. I am using MinGW gdb 6.8 distributed on the MinGW website


Below is an output of the MinGW gdb:

Current directory is e:/cg/osg/buildosg/bin/
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-mingw32"...
(gdb) b main
Breakpoint 1 at 0x407dd9: file osgdistortion.cpp, line 661.
(gdb) r
Starting program: e:\cg\osg\buildosg\bin/osgdistortiond.exe
[New thread 1660.0x1634]

Breakpoint 1, main (argc=1, argv=0x3db140) at osgdistortion.cpp:661

Below is the output of:

M-x describe-installation

uname -a: CYGWIN_NT-5.0 TSUNAMI 1.3.20(0.73/3/2) 2003-02-08 12:10 i686
unknown unknown Cygwin

./configure '--with-dragndrop' '--with-postgresql=no' '--with-x=no'
'--bindir=/usr/local/bin/i686-pc-cygwin' '--with-site-lisp=yes'
'--with-ipv6-cname=no' '--with-netinstall'

XEmacs 21.4.13 "Rational FORTRAN" configured for `i686-pc-cygwin'.

Compilation / Installation:
Source code location: /development/xemacs/xemacs-21.4-release
Installation prefix: /usr/local
Operating system description file: `s/cygwin32.h'
Machine description file: `m/intel386.h'
gcc -I/usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../include/noX
-I/usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../include/noX -g -O3 -Wall
-Wno-switch -Winline -Wmissing-prototypes -Wsign-compare -Wshadow -Wpointer-arith
Relocating allocator for buffers: no
GNU version of malloc: yes

Window System:
Compiling in support for the Microsoft window system.
Using MS-Windows menubars.
Using MS-Windows scrollbars.
Using MS-Windows dialog boxes.
Using MS-Windows native widgets.
Compiling in support for Drag'n'Drop (EXPERIMENTAL).
- Drag'n'Drop prototype: msw.

Compiling in support for ncurses.

Compiling in support for GIF images (builtin).
Compiling in support for XPM images.
Compiling in support for PNG images.
Compiling in support for JPEG images.
Compiling in support for TIFF images.
Compiling in support for X-Face message headers.

Compiling in support for sound (native).

Compiling in support for GNU DBM.

Compiling in support for file coding.

Compiling in support for POP mail retrieval.

Other Features:
Inhibiting IPv6 canonicalization at startup.
Compiling in support for dynamic shared object modules.

Thank you,


I had to switch to the MinGW gdb since the Cygwin gdb couldn't debug
this program I'm running but the MinGW gdb could. The cygwin gdb gave
this error and exit:
Program received signal SIGTRAP, Trace/breakpoint trap.
0x7c901231 in ntdll!DbgUiConnectToDbg () from C:\WINDOWS\system32\ntdll.dll
(gdb) warning: HEAP[osglightd.exe]

1. C-level debugging of BLT using MinGW gdb

2. Debugging with gdb: pystack macro for gdb to show python stack trace


I have an application with several threads that sometimes just freezes.

I installed the debug symbols for python interpreter, and the gdb
macros, as instructed on the wiki
so I can debug with gdb.

gdb loads many files with python debugging simbols, and it is loading
the macros file ~/.gdbinit, but still the macros for working with python
are not working. The pystack command just freezes the de *** until I
press ^C, and other macros complain about undefined symbols. I would
like to see the python stack trace so I know where my application
freezes. All I could see from the gdb native stack trace (with bt) was
that my 3 threads were waiting to acquire a lock, but I could not figure
out where and my program logic should not allow this to happen.

Can I get the python stack trace working under gdb ?

Synaptic Package Manager on my Ubuntu netbook shows packages
python2.6 (2.6.2-0ubuntu1)
python2.6-dbg (2.6.2-0ubuntu1)
as installed, and I extracted the Misc/gdbinit file from
Python-2.6.2.tar.bz2 source archive from python.org. I have gdb 6.8-debian.
So I suppose everything should be right ...

Thank you,
Timothy Madden

3. Does gdb show C++ source code?

4. Unable to debug Template codes using GDB

5. How to debug the child code using GDB?

6. gdb with Xemacs : how to step into code of standard c libraries ?

7. gdb 6.3, debugging a program that vforked: no stdin/out of gdb

8. iexplorer shows source code instead source code's output, i.e., the actual page

9. GDB - no debugging symbols found (GDB Vs GCC?)

10. debugging fortran code with gdb

11. How to debug DLL source code while using dll in C++ win 32 client

12. Can't debug using source code

13. GDB: How to debug code at a different address than it was linked to

14. Help: How to debug a particular process of MPI codes with the gdb tool?

15. How to debug DLL source code while using dll in C++ win 32 cli