This is the mail archive of the insight@sourceware.cygnus.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Insight: suggestions.


Brendan,

 > 
 > I thought it would be handy to have the gdb commands displayed on the
 > console when a GUI command is given.  This could be an option in the
 > preferences.  I find this an easy way to learn the GDB commands.  It
 > "teaches" you the GDB commands that are relevant to you at the time.

We could do this in some cases, but often we use a Tcl function to
drive gdb from the GUI rather than a gdb command.  So it might be
more confusing than helpful; sometimes you would see gdb commands, and
sometimes either nothing, or some method invocation on an Itcl object
which never resolves down to a gdb command...

However, if you want to try hacking at this yourself a bit, there are
only two routes into gdb commands from the GUI, which are the Tcl
commands gdb_cmd and gdb_immediate.  They are defined in the file
gdbtk-cmds.c.  You could do something like (in Tcl)

rename gdb_cmd gdb_cmd_orig
proc gdb_cmd {args} {
    debug "RAN GDB COMMAND: $args"
    eval gdb_cmd_orig $args
}

Put this near the end of main.tcl, and it will output the commands
into the super-secret GDBTk debug window.  To see this window, just
set the environment variable GDBTK_DEBUG to 2, and it will pop up and
show you more than you wanted to know about the man behind the
curtain.

I leave it as an exercise to the reader to get this text into the
console window instead...

 > 
 > Is there an I/O window ?
 > I think I prefer the terms "command window" for the window with the GDB
 > prompt, and "console window" for terminal I/O.
 > 

This is on our to do list.  

Right now, the situation is a little confused.  For native targets,
I/O goes to the terminal from which you launched GDB.  In this case,
it would actually be more convenient to have GDBTk launch an XTerm,
and connect stdin and stdout of the inferior to the XTerm.  For remote
targets, the I/O goes to the console window.  This should really go to
a separate I/O window as well, though you wouldn't need something as
fancy as an XTerm in this case.

In the long run, I would like to do natives by launching an
undecorated XTerm, so I could reparent it into a Tk window, so that
both the Native and Remote cases could have the same decorations.

Jim

-- 
++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++
Jim Ingham                                              jingham@cygnus.com
Cygnus Solutions Inc.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]