all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kaushal Modi <kaushal.modi@gmail.com>
To: Noam Postavsky <npostavs@users.sourceforge.net>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: Help getting backtrace in gdb
Date: Tue, 27 Jun 2017 22:01:37 +0000	[thread overview]
Message-ID: <CAFyQvY1BZWOaqJTSmFifSAZbYTvDjE5_Z_AoXauvLvRHxKqD=g@mail.gmail.com> (raw)
In-Reply-To: <CAM-tV-9uAcRFXdXB2ODRxJk-tw5OzofRQ4_dFd6W2aJfrOWk0Q@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3025 bytes --]

On Tue, Jun 27, 2017 at 5:11 PM Noam Postavsky <
npostavs@users.sourceforge.net> wrote:

> On Mon, Jun 26, 2017 at 2:33 PM, Kaushal Modi <kaushal.modi@gmail.com>
> 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.
>

OK.


> 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:
<http://www.gnu.org/software/gdb/bugs/>...
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

[-- Attachment #2: Type: text/html, Size: 4804 bytes --]

  reply	other threads:[~2017-06-27 22:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-26 18:33 Help getting backtrace in gdb Kaushal Modi
2017-06-27 21:11 ` Noam Postavsky
2017-06-27 22:01   ` Kaushal Modi [this message]
2017-06-27 23:27     ` Noam Postavsky
2017-06-27 23:50       ` Davis Herring
2017-06-28  0:05         ` Noam Postavsky
2017-10-03 21:09       ` Kaushal Modi
2017-10-04  5:38         ` Eli Zaretskii
2017-10-04 10:53           ` Kaushal Modi
2017-10-04 11:08             ` Eli Zaretskii
2017-10-06 17:35               ` Kaushal Modi
2017-10-06 17:42                 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFyQvY1BZWOaqJTSmFifSAZbYTvDjE5_Z_AoXauvLvRHxKqD=g@mail.gmail.com' \
    --to=kaushal.modi@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=npostavs@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.