unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Question on debugging emacs with gdb
@ 2005-02-27 20:27 Joakim Verona
  2005-02-27 22:29 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Joakim Verona @ 2005-02-27 20:27 UTC (permalink / raw)



Hello,

I'm trying to gather data for a bug report on random segfaults I have
with emacs. 

I run emacs under gdb as explained in etc/DEBUG.

Now I enter gdb whenever I press c-g, which is unexpected and
inconvenient. 

Is there some other way to handle this? 

To clarify further: winding up in gdb each time I press c-g is
inconvenient, because I use c-g to break out of operations pretty
often, during my normal emacs usage. I would rather use "kill" to
enter gdb, and have c-g behave as normal. 

-- 
Joakim Verona
www.verona.se

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

* Re: Question on debugging emacs with gdb
  2005-02-27 20:27 Question on debugging emacs with gdb Joakim Verona
@ 2005-02-27 22:29 ` Eli Zaretskii
  2005-02-27 22:57   ` Joakim Verona
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2005-02-27 22:29 UTC (permalink / raw)
  Cc: emacs-devel

> From: Joakim Verona <joakim@verona.se>
> Date: Sun, 27 Feb 2005 21:27:15 +0100
> 
> Now I enter gdb whenever I press c-g, which is unexpected and
> inconvenient. 
> 
> Is there some other way to handle this? 

Start GDB from the Emacs's src directory.  There's a .gdbinit file
there that takes care of this problem.  (The etc/DEBUG file actually
tells you that as its first advice.)

If this somehow doesn't DTRT, please post the details (your OS,
version of GDB, etc.).

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

* Re: Question on debugging emacs with gdb
  2005-02-27 22:29 ` Eli Zaretskii
@ 2005-02-27 22:57   ` Joakim Verona
  2005-02-28  1:32     ` Nick Roberts
  0 siblings, 1 reply; 4+ messages in thread
From: Joakim Verona @ 2005-02-27 22:57 UTC (permalink / raw)
  Cc: emacs-devel

"Eli Zaretskii" <eliz@gnu.org> writes:

>
> Start GDB from the Emacs's src directory.  There's a .gdbinit file
> there that takes care of this problem.  (The etc/DEBUG file actually
> tells you that as its first advice.)


As far as I can determine, my gdb instance is running with this
.gdbinit.

Heres gdb:s startup message:

GNU gdb Red Hat Linux (6.0post-0.20040223.19rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i386-redhat-linux-gnu".
.gdbinit:22: Error in sourced command file:
No symbol table is loaded.  Use the "file" command.


Then I do:

attach PID

all from different screen windows in a screen session running under ssh.

> If this somehow doesn't DTRT, please post the details (your OS,
> version of GDB, etc.).

Ok, heres some stats:

In GNU Emacs 22.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.4.14)
 of 2005-02-27 on naru.home
configured using `configure '--with-gtk' '--with-x' '--with-xpm' '--with-jpeg' '--with-tiff' '--with-gif' '--with-png' 'CFLAGS=-g''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8
  default-enable-multibyte-characters: t

Major mode: Message

Minor modes in effect:
  mml-mode: t
  auto-compression-mode: t
  display-time-mode: t
  show-paren-mode: t
  erc-truncate-mode: t
  erc-log-mode: t
  erc-bbdb-mode: t
  erc-autoaway-mode: t
  erc-autojoin-mode: t
  erc-button-mode: t
  erc-ring-mode: t
  erc-pcomplete-mode: t
  erc-track-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-netsplit-mode: t
  erc-smiley-mode: t
  ecb-minor-mode: t
  which-function-mode: t
  encoded-kbd-mode: t
  menu-bar-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t


[joakim@naru java]$ rpm -qi gdb
Name        : gdb                          Relocations: (not relocatable)
Version     : 6.0post                           Vendor: Red Hat, Inc.
Release     : 0.20040223.19                 Build Date: Mon 03 May 2004 09:45:07 PM CEST
Install Date: Sat 04 Dec 2004 12:57:51 AM CET      Build Host: tweety.build.redhat.com
Group       : Development/Debuggers         Source RPM: gdb-6.0post-0.20040223.19.src.rpm
Size        : 5182318                          License: GPL
Signature   : DSA/SHA1, Fri 07 May 2004 03:18:22 AM CEST, Key ID b44269d04f2a6fd2
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL         : http://sources.redhat.com/gdb/
Summary     : A GNU source-level debugger for C, C++ and other languages.
Description :
GDB, the GNU debugger, allows you to debug programs written in C, C++,
and other languages, by executing them in a controlled fashion and
printing their data.


-- 
Joakim Verona
www.verona.se

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

* Re: Question on debugging emacs with gdb
  2005-02-27 22:57   ` Joakim Verona
@ 2005-02-28  1:32     ` Nick Roberts
  0 siblings, 0 replies; 4+ messages in thread
From: Nick Roberts @ 2005-02-28  1:32 UTC (permalink / raw)
  Cc: Eli Zaretskii, emacs-devel

 > > Start GDB from the Emacs's src directory.  There's a .gdbinit file
 > > there that takes care of this problem.  (The etc/DEBUG file actually
 > > tells you that as its first advice.)
 > 
 > 
 > As far as I can determine, my gdb instance is running with this
 > .gdbinit.
 > 
 > Heres gdb:s startup message:
 > 
 > GNU gdb Red Hat Linux (6.0post-0.20040223.19rh)
 > Copyright 2004 Free Software Foundation, Inc.
 > GDB is free software, covered by the GNU General Public License, and
 > you are
 > welcome to change it and/or distribute copies of it under certain
 > conditions.
 > Type "show copying" to see the conditions.
 > There is absolutely no warranty for GDB.  Type "show warranty" for
 > details.
 > This GDB was configured as "i386-redhat-linux-gnu".

 > .gdbinit:22: Error in sourced command file:
   ^^^^^^^^^^^^^^^^^^
 > No symbol table is loaded.  Use the "file" command.
   ^^^^^^^^^^^^^^^^^^^^^^^^^

Start GDB with 'gdb emacs' not just 'gdb'. Then there should be no error,
GDB will read the rest of .gdbinit and C-g will be handled properly.

Nick


 > Then I do:
 > 
 > attach PID
 > 
 > all from different screen windows in a screen session running under ssh.

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

end of thread, other threads:[~2005-02-28  1:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-27 20:27 Question on debugging emacs with gdb Joakim Verona
2005-02-27 22:29 ` Eli Zaretskii
2005-02-27 22:57   ` Joakim Verona
2005-02-28  1:32     ` Nick Roberts

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).