all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "otadmor ." <otadmor@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Executing Emacs commands when a gdb breakpoint is hit
Date: Wed, 22 Jan 2020 21:55:29 +0200	[thread overview]
Message-ID: <CAJd1wGKSKNn7w56RRhHsHyLnAo6JE8C1QWiJ-1TkeR9UV-jnTA@mail.gmail.com> (raw)
In-Reply-To: <831rrrv2vq.fsf@gnu.org>

I would like to suggest a bit different approach.
I have a code allowing auto-completions from external programs running
inside a comint buffer.
It uses epc server running in emacs (elisp) and python-epc client. It
allows me to complete, for example, gdb commands for the gdb running
inside the comint buffer. The same code can call other server methods
to notify a gdb stop event.
The python code is loaded automatically into gdb using ~/.gdbinit, and
the elisp code is stored in ~/.emacs.d.
The completion code supports auto-complete, company and
complete-at-point frontends and support python and frida backends.
It seems easy to add the support for gdb stop events and I actually
planned on doing it in the future when I will have time, I just dont
have the time :-)

On Wed, Jan 22, 2020 at 7:05 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Skip Montanaro <skip.montanaro@gmail.com>
> > Date: Wed, 22 Jan 2020 07:48:17 -0600
> > Cc: Help GNU Emacs <help-gnu-emacs@gnu.org>
> >
> > Now, is it possible to trigger an Emacs Lisp function of some sort when a GDB
> > breakpoint is hit? I see the gdb-stopped-functions variable. This simple function seems to execute when my
> > compiler_set_lineno breakpoint is hit:
> >
> > (defun stopped (reason)
> >   (message "%s" reason))
> >
> > (setq gdb-stopped-functions '(stopped))
>
> So you already have the answer to that question: gdb-stopped-functions.
>
> > I tried sticking in a short sleep, but that didn't help. Is there a way to force the *gud-python* to be ready for
> > user input before calling get-gdb-value?
>
> I don't think I understand what you are trying to do and what are the
> difficulties, sorry.
>


-- 
Gretz,
Ofir Tadmor

ICQ: 77685691
Mail: otadmor@gmail.com



  reply	other threads:[~2020-01-22 19:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-21 18:02 Executing Emacs commands when a gdb breakpoint is hit Skip Montanaro
2020-01-21 18:39 ` Eli Zaretskii
2020-01-22 13:48   ` Skip Montanaro
2020-01-22 17:04     ` Eli Zaretskii
2020-01-22 19:55       ` otadmor . [this message]
2020-01-22 21:07       ` Skip Montanaro
2020-01-23 14:45         ` Eli Zaretskii
2020-01-23 21:00           ` Skip Montanaro
2020-01-24  8:01             ` Eli Zaretskii
2020-04-07 20:21               ` otadmor .

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=CAJd1wGKSKNn7w56RRhHsHyLnAo6JE8C1QWiJ-1TkeR9UV-jnTA@mail.gmail.com \
    --to=otadmor@gmail.com \
    --cc=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.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 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.