emacs-devel
[Top][All Lists]
Advanced

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

Re: Gdb in emacs 24


From: Tom Tromey
Subject: Re: Gdb in emacs 24
Date: Wed, 19 Oct 2011 07:38:42 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux)

>>>>> "Lluís" == Lluís  <address@hidden> writes:

Lluís> * interpreter-exec mi <command>

Lluís>   Execute each command under the MI interpreter, even if the user
Lluís>   did not actually set it up in the cmdline.

Lluís>   Even if not optimal, the cost of setting the interpreter on a
Lluís>   per-command basis (as opposed to setting the current
Lluís>   interpreter for all future commands) should not have a
Lluís>   noticeable impact on performance.

I think the drawback is that you don't get MI notifications for commands
entered by the user.

What I mean by notifications is, e.g., if the user types "break main",
the current gdb will inform the MI consumer:

    &"break main\n"
    ~"Breakpoint 1 at 0x485fb3: file ../../archer/gdb/gdb.c, line 30.\n"
    
=breakpoint-created,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000000000485fb3",func="main",file="../../archer/gdb/gdb.c",fullname="/home/tromey/gnu/archer/archer/gdb/gdb.c",line="30",times="0",original-location="main"}
    ^done

Lluís> * What to do if the user ever passed "-i=tui" in the gdb cmdline
Lluís> (which seems to make MI unusable even through
Lluís> "interpreter-exec").

Yeah, that will just fail.  There's no reason to use the TUI and Emacs
at the same time, it doesn't make sense.  Maybe we could disable the TUI
if $EMACS is set.

Lluís> * Should user-issued commands in the gdb buffer use the mi or console
Lluís>   interpreter?

Lluís>   If it were mi, no problems, apply same approach as above. If it
Lluís>   were the console interpeter (append "-i=console" when starting
Lluís>   gdb; see above), there would still be a need for the
Lluís>   "interpreter-exec" command.

I think you'd have to use interpreter-exec to get the notification
behavior.

So, maybe this can all be done with no changes on the gdb side.  Worth a
try.

Tom



reply via email to

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