This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Find out if GUI active in .gdbinit
- From: Achim Bursian <bursian at bigfoot dot de>
- To: insight at sources dot redhat dot com, gdb at sources dot redhat dot com
- Date: Fri, 17 Jan 2003 23:34:21 +0100
- Subject: Find out if GUI active in .gdbinit
- Newsgroups: gnu.gdb.bug
- Organization: ---
Hello,
how can I find out if the GUI (Insight) is running while executing
.gdbinit. I want to take different steps when -nw is given (especially
issue some tk commands if Insight is active).
And secondly, how can I source a gdb commandfile only if it exists?
Something like
if file exists $HOME/second.gdb
source $HOME/second.gdb
endif
What is the way to do this in gdb (within .gdbinit)?
Thanks for help. (If possible, CC: to my mailaddress)
Achim