[Top][All Lists]

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

Re: Executing Emacs commands when a gdb breakpoint is hit

From: otadmor .
Subject: Re: Executing Emacs commands when a gdb breakpoint is hit
Date: Wed, 22 Jan 2020 21:55:29 +0200

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 <address@hidden> wrote:
> > From: Skip Montanaro <address@hidden>
> > Date: Wed, 22 Jan 2020 07:48:17 -0600
> > Cc: Help GNU Emacs <address@hidden>
> >
> > 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.

Ofir Tadmor

ICQ: 77685691
Mail: address@hidden

reply via email to

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