unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: John Murray <john@gardenway.org>
Cc: emacs-devel@gnu.org
Subject: Re: gdb does not stop on breakpoint in emacs, but does stop in commandline mode
Date: Thu, 28 Dec 2017 19:43:54 +0200	[thread overview]
Message-ID: <83zi62g339.fsf@gnu.org> (raw)
In-Reply-To: <CAHiO-hf00PCG61jb9bv3B_33BTH5XN4Q_B0ypUfSshi4R_qCAA@mail.gmail.com> (message from John Murray on Thu, 28 Dec 2017 07:58:45 -0700)

> From: John Murray <john@gardenway.org>
> Date: Thu, 28 Dec 2017 07:58:45 -0700
> 
> I set a breakpoint in a shared library in gdb on emacs run the program and the breakpoint is ignored.
> 
> If I follow the same procedures in gdb from the command line, gdb stops at the breakpoint.
> 
> emacs version:  25.3.1
> gdb version:  7.2-75.e16
> gdb-mi.el loaded
> 
> More detail:
> 
> I start gdb in emacs using the command:
> 
> gdb -i=mi /path to executable/executable
> 
> > break main
> > run
> > info func .*ProcessCommand.*
> ...
> [address of desired function]
> 
> > break *[address of the desired funciton]
> > continue
> 
> Using this sequence inside emacs, gdb ignores the breakpoint.
> Using this sequence using gdb from the command line, the code stops at the breakpoint.
> 
> I note that the function is in a shared library.

I couldn't reproduce this with GDB 7.8.1 and the current emacs-26
branch of the Emacs Git repository: your recipe works for me both
inside and outside Emacs.  Not sure that the newer versions are the
reason, though.  However, GDB 7.2 is quite old, so maybe try to
upgrade that first.

(For the record, I tried debugging Emacs, and set a breakpoint at
inflateEnd, which is a zlib function.  Then I invoked
zlib-decompress-region to trigger the breakpoint.)



      reply	other threads:[~2017-12-28 17:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-28 14:58 gdb does not stop on breakpoint in emacs, but does stop in commandline mode John Murray
2017-12-28 17:43 ` Eli Zaretskii [this message]

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=83zi62g339.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=john@gardenway.org \
    /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 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).