[Top][All Lists]

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

Re: Help getting backtrace in gdb

From: Kaushal Modi
Subject: Re: Help getting backtrace in gdb
Date: Tue, 27 Jun 2017 22:01:37 +0000

On Tue, Jun 27, 2017 at 5:11 PM Noam Postavsky <address@hidden> wrote:
On Mon, Jun 26, 2017 at 2:33 PM, Kaushal Modi <address@hidden> wrote:

It looks like maybe the stack got corrupted so much that gdb can't
find it? (i.e., just bad luck on your part)

Probably, or probably something is not right with Fsignal. See below.
> (If interested, this is what causes the crash on emacs -Q:
> http://lists.gnu.org/archive/html/emacs-orgmode/2017-06/msg00508.html )
> The difference in behavior I see is that the breakpoint on Fsignal is not
> working.

I don't think you called Fsignal though?

My assumption was that Fsignal would get called before the seg fault.
To be clear, the signal
referred to by Fsignal is not related to "signal SIGSEGV", in case
that's what you were thinking.

You can try evaluating (signal 'wrong-number-of-arguments '(x y)) to
see if your Fsignal breakpoint is working.

Nope, it does not work..
I get the backtrace in the gdb-launched emacs but no breakpoint in the gdb.

The gdb shows just this:

GNU gdb (GDB) Red Hat Enterprise Linux (7.2-75.el6)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
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 "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
Reading symbols from /home/kmodi/downloads/git/emacs/src/emacs...done.
SIGINT is used by the debugger.
Are you sure you want to change it? (y or n) [answered Y; input not from terminal]
DISPLAY = :1.0
TERM = screen-256color
Breakpoint 1 at 0x55c7aa: file emacs.c, line 364.
Temporary breakpoint 2 at 0x58044b: file sysdep.c, line 1022.
(gdb) break Fsignal
Breakpoint 3 at 0x60555d: file eval.c, line 1508.
(gdb) r -Q
Starting program: /home/kmodi/downloads/git/emacs/src/emacs -Q

(emacs:6024): GLib-GIO-CRITICAL **: g_settings_schema_source_lookup: assertion 'source != NULL' failed

Should I be concerned about this part:

SIGINT is used by the debugger.
Are you sure you want to change it? (y or n) [answered Y; input not from terminal]

.. because I do not know that answers that y/n question.. it happens automatically.

> Has something changed about configure (some new flag that I need to add?) to
> enable debug in gdb?

Nothing should have changed, as far as I know, and those options look
fine (though I wonder what the -fgnu89-inline flag is for).
You can try adding --enable-checking=yes which can help catch errors
earlier (hopefully before your stack gets too corrupted).

Thanks for pointing that out! I added that switch many years ago probably because emacs did not get built without that on RHEL 5.x. Today I am on RHEL 6.6, and I don't seem to need that any more.

Kaushal Modi

reply via email to

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