[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crashes on w32 and debugging

From: Jason Rumney
Subject: Re: Crashes on w32 and debugging
Date: Thu, 28 Feb 2008 08:57:25 +0000
User-agent: Thunderbird (Windows/20080213)

Lennart Borgman (gmail) wrote:
I looked in the documentation for how to start Emacs under gdb, but I can't find anything about it in nt/INSTALL.

1. Rebuild emacs after configure --no-opt (with optimisations on, stepping through the code doesn't always act as you expect it, and some variables cannot be inspected). 2. cd ${emacs}/src (where ${emacs} is your checkout directory). This serves two purposes - it makes it easy for gdb to find the emacs sources, and it also loads the .gdbinit in that directory, which defines some useful functions for looking at Lisp variables and backtraces.

3. gdb oo/i386/emacs.exe

4. Set any breakpoints using "break function_name" or "break file.c:linenumber"

5. run -Q

6. After the breakpoint is hit, step over functions with "next"/"n", or step in with "step"/"s". Inspect C variables with "print VARIABLE", if it is a lisp variable, "pr" immediately after the print will print its lisp value. "bt" will get a backtrace, including the Lisp backtrace as well as C.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]