unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* gdb
@ 2010-04-06 22:08 Sean Sieger
  2010-04-07  3:17 ` gdb Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Sean Sieger @ 2010-04-06 22:08 UTC (permalink / raw)
  To: help-gnu-emacs

In etc/DEBUG, it says, ``It is a good idea to run Emacs under GDB
... *all the time*.''

It appears that I ought to reconfigure, this time with --no-opt and
-fnocrossjumping; that I'll then start starting Emacs in src/ (which
means I don't really need to make install?) and, finally, um, I won't be
using the shortcut to start GDB & Emacs (or can the command be entered
there to do so?).

I've been bouncing around documentation (FAQ, GDB & Emacs info,
emacswiki ... the archives, anyway) and don't really see an example of
how one `runs Emacs under GDB all the time.'






^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: gdb
  2010-04-06 22:08 gdb Sean Sieger
@ 2010-04-07  3:17 ` Eli Zaretskii
  2010-04-07  3:24   ` gdb belnac
  2010-04-07  9:32   ` gdb Sean Sieger
  0 siblings, 2 replies; 5+ messages in thread
From: Eli Zaretskii @ 2010-04-07  3:17 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Sean Sieger <sean.sieger@gmail.com>
> Date: Tue, 06 Apr 2010 18:08:55 -0400
> 
> In etc/DEBUG, it says, ``It is a good idea to run Emacs under GDB
> ... *all the time*.''

It is.

> It appears that I ought to reconfigure, this time with --no-opt and
> -fnocrossjumping

Yes, that's unfortunate, because latest versions of GCC (3.x and
later) produce binaries that are very hard to debug in the optimized
build.

> that I'll then start starting Emacs in src/ (which
> means I don't really need to make install?)

Not true.  You need to start GDB in the src/ directory.  Then you can
say "run /path/to/emacs/emacs.exe".

> and, finally, um, I won't be
> using the shortcut to start GDB & Emacs (or can the command be entered
> there to do so?).

You can have the shortcut run a batch file that would invoke GDB and
run Emacs inside it.  You can have a .gdbinit file that does some of
that.  And there are many other options.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: gdb
  2010-04-07  3:17 ` gdb Eli Zaretskii
@ 2010-04-07  3:24   ` belnac
  2010-04-07  5:27     ` gdb Eli Zaretskii
  2010-04-07  9:32   ` gdb Sean Sieger
  1 sibling, 1 reply; 5+ messages in thread
From: belnac @ 2010-04-07  3:24 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

On Wed, 2010-04-07 at 06:17 +0300, Eli Zaretskii wrote:
> > From: Sean Sieger <sean.sieger@gmail.com>
> > Date: Tue, 06 Apr 2010 18:08:55 -0400
> > 
> > In etc/DEBUG, it says, ``It is a good idea to run Emacs under GDB
> > ... *all the time*.''
> 
> It is.

I've been following this particular thread with much interest and would
like to take the opportunity to ask the experts why it is a good idea to
run Emacs under GDB?






^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: gdb
  2010-04-07  3:24   ` gdb belnac
@ 2010-04-07  5:27     ` Eli Zaretskii
  0 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2010-04-07  5:27 UTC (permalink / raw)
  To: help-gnu-emacs

> From: belnac <belnac1@googlemail.com>
> Cc: help-gnu-emacs@gnu.org
> Date: Wed, 07 Apr 2010 03:24:16 +0000
> 
> I've been following this particular thread with much interest and would
> like to take the opportunity to ask the experts why it is a good idea to
> run Emacs under GDB?

etc/DEBUG explains that:

    ** It is a good idea to run Emacs under GDB (or some other suitable
    debugger) *all the time*.  Then, when Emacs crashes, you will be able
    to debug the live process, not just a core dump.  (This is especially
    important on systems which don't support core files, and instead print
    just the registers and some stack addresses.)

(MS-Windows is one system that does not support core files, btw.)




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: gdb
  2010-04-07  3:17 ` gdb Eli Zaretskii
  2010-04-07  3:24   ` gdb belnac
@ 2010-04-07  9:32   ` Sean Sieger
  1 sibling, 0 replies; 5+ messages in thread
From: Sean Sieger @ 2010-04-07  9:32 UTC (permalink / raw)
  To: help-gnu-emacs

Eli Zaretskii <eliz@gnu.org> writes:

    > From: Sean Sieger <sean.sieger@gmail.com>
    > Date: Tue, 06 Apr 2010 18:08:55 -0400
    > 
    > In etc/DEBUG, it says, ``It is a good idea to run Emacs under GDB
    > ... *all the time*.''

    It is.

    > It appears that I ought to reconfigure, this time with --no-opt and
    > -fnocrossjumping

    Yes, that's unfortunate, because latest versions of GCC (3.x and
    later) produce binaries that are very hard to debug in the optimized
    build.

    > that I'll then start starting Emacs in src/ (which
    > means I don't really need to make install?)

    Not true.  You need to start GDB in the src/ directory.  Then you can
    say "run /path/to/emacs/emacs.exe".

    > and, finally, um, I won't be
    > using the shortcut to start GDB & Emacs (or can the command be entered
    > there to do so?).

    You can have the shortcut run a batch file that would invoke GDB and
    run Emacs inside it.  You can have a .gdbinit file that does some of
    that.  And there are many other options.

Thanks for your time, Eli; I'll work on it today.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-04-07  9:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-06 22:08 gdb Sean Sieger
2010-04-07  3:17 ` gdb Eli Zaretskii
2010-04-07  3:24   ` gdb belnac
2010-04-07  5:27     ` gdb Eli Zaretskii
2010-04-07  9:32   ` gdb Sean Sieger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).