[Top][All Lists]

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

Re: Crashes on w32 and debugging

From: Lennart Borgman (gmail)
Subject: Re: Crashes on w32 and debugging
Date: Fri, 29 Feb 2008 01:30:25 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20071031 Thunderbird/ Mnenhy/

Jason Rumney wrote:
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).

Thanks Jason, but I need a little clarification. After configure I suppose I should do only "make bootstrap", but not "make install", or?

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

I just started testing this, but with just "run". The crashes are intermittent so I have to just use it for a while.

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.

Should not these instructions go into nt/INSTALL or somewhere else?

reply via email to

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