├── libgui ├── stamp-h.in ├── Makefile.am ├── library │ ├── gettext.tcl │ ├── gensym.tcl │ ├── lframe.tcl │ ├── mono.tcl │ ├── pkgIndex.tcl │ ├── path.tcl │ ├── def.tcl │ ├── ulset.tcl │ ├── hooks.tcl │ ├── canvas.tcl │ ├── font.tcl │ ├── topbind.tcl │ ├── Makefile.am │ ├── center.tcl │ ├── menu.tcl │ ├── postghost.tcl │ ├── parse_args.tcl │ ├── wingrab.tcl │ ├── list.tcl │ ├── internet.tcl │ ├── bbox.tcl │ ├── looknfeel.tcl │ ├── advice.tcl │ ├── bindings.tcl │ └── wframe.tcl ├── src │ ├── tkTable_version.in │ ├── subcommand.h │ ├── tclshellexe.c │ ├── tkTableCmd.h │ ├── tkWarpPointer.c │ ├── tclwingrab.c │ ├── tclcursor.c │ ├── tclmapi.c │ ├── tclwinmode.c │ ├── tclmain.c │ └── tkTableInitScript.h ├── acconfig.h ├── TODO ├── doc │ └── tkTable_license.terms └── acinclude.m4 ├── gdbtk ├── library │ ├── images │ │ ├── icons.txt │ │ ├── bp.gif │ │ ├── reg.gif │ │ ├── run.gif │ │ ├── src.gif │ │ ├── tp.gif │ │ ├── up.gif │ │ ├── check.gif │ │ ├── down.gif │ │ ├── edit.gif │ │ ├── help.gif │ │ ├── home.gif │ │ ├── less.gif │ │ ├── more.gif │ │ ├── next.gif │ │ ├── nexti.gif │ │ ├── open.gif │ │ ├── stack.gif │ │ ├── step.gif │ │ ├── stepi.gif │ │ ├── stop.gif │ │ ├── tdump.gif │ │ ├── vars.gif │ │ ├── watch.gif │ │ ├── Movie_on.gif │ │ ├── bottom.gif │ │ ├── console.gif │ │ ├── continue.gif │ │ ├── finish.gif │ │ ├── insight.gif │ │ ├── memory.gif │ │ ├── next_hit.gif │ │ ├── prev_hit.gif │ │ ├── rewind.gif │ │ ├── run_expt.gif │ │ ├── Movie_off.gif │ │ ├── gdbtk_icon.gif │ │ ├── next_check.gif │ │ ├── next_frame.gif │ │ ├── next_line.gif │ │ └── watch_movie.gif │ ├── images2 │ │ ├── icons.txt │ │ ├── bp.gif │ │ ├── tp.gif │ │ ├── up.gif │ │ ├── down.gif │ │ ├── edit.gif │ │ ├── help.gif │ │ ├── home.gif │ │ ├── less.gif │ │ ├── more.gif │ │ ├── next.gif │ │ ├── open.gif │ │ ├── reg.gif │ │ ├── run.gif │ │ ├── src.gif │ │ ├── step.gif │ │ ├── stop.gif │ │ ├── vars.gif │ │ ├── bottom.gif │ │ ├── check.gif │ │ ├── console.gif │ │ ├── finish.gif │ │ ├── insight.gif │ │ ├── memory.gif │ │ ├── nexti.gif │ │ ├── rewind.gif │ │ ├── stack.gif │ │ ├── stepi.gif │ │ ├── target.gif │ │ ├── tdump.gif │ │ ├── watch.gif │ │ ├── Movie_off.gif │ │ ├── Movie_on.gif │ │ ├── continue.gif │ │ ├── function.gif │ │ ├── next_hit.gif │ │ ├── next_line.gif │ │ ├── prev_hit.gif │ │ ├── run_expt.gif │ │ ├── gdbtk_icon.gif │ │ ├── next_check.gif │ │ ├── next_frame.gif │ │ └── watch_movie.gif │ ├── help │ │ ├── images │ │ │ ├── reg.png │ │ │ ├── watch.png │ │ │ ├── browser1.png │ │ │ ├── browser2.png │ │ │ ├── mem_menu.gif │ │ │ ├── mem_pref.gif │ │ │ ├── reg_menu.png │ │ │ ├── src_bal.gif │ │ │ ├── src_bpop.gif │ │ │ ├── src_menu.gif │ │ │ ├── src_pop.gif │ │ │ ├── src_stat.gif │ │ │ ├── frame_info.gif │ │ │ ├── insightbwr.png │ │ │ ├── mem_popup.gif │ │ │ ├── src_bp_bal.gif │ │ │ ├── src_thread.gif │ │ │ └── src_toolbar.gif │ │ ├── gbl_pref.html │ │ ├── trace │ │ │ ├── gbl_pref.html │ │ │ ├── src_pref.html │ │ │ ├── reg_pref.html │ │ │ ├── index.toc │ │ │ ├── tdump.html │ │ │ ├── help.html │ │ │ ├── console.html │ │ │ └── stack.html │ │ ├── src_pref.html │ │ ├── help.html │ │ ├── session.html │ │ ├── index.html │ │ ├── thread.html │ │ ├── locals.html │ │ ├── register.html │ │ └── stack.html │ ├── Makefile │ ├── gdbwin.ith │ ├── embeddedwin.ith │ ├── tpwin.itcl │ ├── attachdlg.ith │ ├── ipcpref.ith │ ├── cspref.ith │ ├── process.ith │ ├── srcpref.ith │ ├── ehandler.itb │ ├── stackwin.ith │ ├── download.ith │ ├── ehandler.ith │ ├── tty.tcl │ ├── about.tcl │ ├── globalpref.ith │ ├── editor.tcl │ ├── blockframe.ith │ ├── kod.ith │ ├── bpwin.ith │ ├── toplevelwin.ith │ ├── mempref.ith │ ├── managedwin.ith │ ├── vartree.ith │ ├── browserwin.ith │ ├── memwin.ith │ ├── console.ith │ ├── debugwin.ith │ ├── regwin.ith │ ├── helpviewer.tcl │ └── tdump.tcl ├── plugins │ ├── acinclude.m4 │ ├── rhabout │ │ ├── pkgIndex.tcl │ │ ├── rhabout.tcl.in │ │ ├── Makefile.in │ │ ├── tclIndex │ │ ├── ChangeLog │ │ ├── rhabout.c │ │ └── rhabout.itcl │ ├── intel-pentium │ │ ├── pkgIndex.tcl │ │ ├── Makefile.in │ │ ├── intel-pentium.tcl.in │ │ ├── tclIndex │ │ ├── msrselection.ith │ │ ├── cpuinfo.tcl │ │ └── ChangeLog │ ├── Makefile.am │ ├── ChangeLog │ ├── plugins.tcl │ └── configure.ac ├── gdb.rc ├── gdbtool.ico ├── ChangeLog-2009 ├── Makefile.am ├── insight.desktop ├── configure.ac ├── generic │ ├── gdbtk-main.c │ └── gdbtk-cmds.h └── ChangeLog-2007 ├── .gitmodules ├── Makefile ├── testsuite └── gdb.gdbtk │ ├── simple.c │ ├── cpp_variable.cc │ ├── configure.ac │ ├── list0.c │ ├── list0.h │ ├── cpp_variable.h │ ├── Makefile.in │ ├── browser.exp │ ├── windows.exp │ ├── console.exp │ ├── c_variable.exp │ ├── cpp_variable.exp │ ├── srcwin.exp │ └── stack2.c ├── patches └── binutils-gdb │ ├── 007-Avoid-creating-a-file-handler-for-a-negative-fd.patch │ └── 002-srcrelease.patch └── README /libgui/stamp-h.in: -------------------------------------------------------------------------------- 1 | timestamp 2 | -------------------------------------------------------------------------------- /gdbtk/library/images/icons.txt: -------------------------------------------------------------------------------- 1 | Basic Icon Set 2 | -------------------------------------------------------------------------------- /gdbtk/library/images2/icons.txt: -------------------------------------------------------------------------------- 1 | Windows-style Icon Set 2 | -------------------------------------------------------------------------------- /gdbtk/plugins/acinclude.m4: -------------------------------------------------------------------------------- 1 | "sinclude(../../../config/tcl.m4)" 2 | -------------------------------------------------------------------------------- /gdbtk/gdb.rc: -------------------------------------------------------------------------------- 1 | tk ICON DISCARDABLE "gdbtool.ico" 2 | -------------------------------------------------------------------------------- /gdbtk/gdbtool.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/gdbtool.ico -------------------------------------------------------------------------------- /gdbtk/ChangeLog-2009: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/ChangeLog-2009 -------------------------------------------------------------------------------- /gdbtk/library/images/bp.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/bp.gif -------------------------------------------------------------------------------- /gdbtk/library/images/reg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/reg.gif -------------------------------------------------------------------------------- /gdbtk/library/images/run.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/run.gif -------------------------------------------------------------------------------- /gdbtk/library/images/src.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/src.gif -------------------------------------------------------------------------------- /gdbtk/library/images/tp.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/tp.gif -------------------------------------------------------------------------------- /gdbtk/library/images/up.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/up.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/bp.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/bp.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/tp.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/tp.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/up.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/up.gif -------------------------------------------------------------------------------- /gdbtk/library/images/check.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/check.gif -------------------------------------------------------------------------------- /gdbtk/library/images/down.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/down.gif -------------------------------------------------------------------------------- /gdbtk/library/images/edit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/edit.gif -------------------------------------------------------------------------------- /gdbtk/library/images/help.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/help.gif -------------------------------------------------------------------------------- /gdbtk/library/images/home.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/home.gif -------------------------------------------------------------------------------- /gdbtk/library/images/less.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/less.gif -------------------------------------------------------------------------------- /gdbtk/library/images/more.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/more.gif -------------------------------------------------------------------------------- /gdbtk/library/images/next.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/next.gif -------------------------------------------------------------------------------- /gdbtk/library/images/nexti.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/nexti.gif -------------------------------------------------------------------------------- /gdbtk/library/images/open.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/open.gif -------------------------------------------------------------------------------- /gdbtk/library/images/stack.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/stack.gif -------------------------------------------------------------------------------- /gdbtk/library/images/step.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/step.gif -------------------------------------------------------------------------------- /gdbtk/library/images/stepi.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/stepi.gif -------------------------------------------------------------------------------- /gdbtk/library/images/stop.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/stop.gif -------------------------------------------------------------------------------- /gdbtk/library/images/tdump.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/tdump.gif -------------------------------------------------------------------------------- /gdbtk/library/images/vars.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/vars.gif -------------------------------------------------------------------------------- /gdbtk/library/images/watch.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/watch.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/down.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/down.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/edit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/edit.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/help.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/help.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/home.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/home.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/less.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/less.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/more.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/more.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/next.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/next.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/open.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/open.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/reg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/reg.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/run.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/run.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/src.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/src.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/step.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/step.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/stop.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/stop.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/vars.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/vars.gif -------------------------------------------------------------------------------- /gdbtk/library/help/images/reg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/help/images/reg.png -------------------------------------------------------------------------------- /gdbtk/library/images/Movie_on.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/Movie_on.gif -------------------------------------------------------------------------------- /gdbtk/library/images/bottom.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/bottom.gif -------------------------------------------------------------------------------- /gdbtk/library/images/console.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/console.gif -------------------------------------------------------------------------------- /gdbtk/library/images/continue.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/continue.gif -------------------------------------------------------------------------------- /gdbtk/library/images/finish.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/finish.gif -------------------------------------------------------------------------------- /gdbtk/library/images/insight.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/insight.gif -------------------------------------------------------------------------------- /gdbtk/library/images/memory.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/memory.gif -------------------------------------------------------------------------------- /gdbtk/library/images/next_hit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/next_hit.gif -------------------------------------------------------------------------------- /gdbtk/library/images/prev_hit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/prev_hit.gif -------------------------------------------------------------------------------- /gdbtk/library/images/rewind.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/rewind.gif -------------------------------------------------------------------------------- /gdbtk/library/images/run_expt.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/run_expt.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/bottom.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/bottom.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/check.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/check.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/console.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/console.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/finish.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/finish.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/insight.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/insight.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/memory.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/memory.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/nexti.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/nexti.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/rewind.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/rewind.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/stack.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/stack.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/stepi.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/stepi.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/target.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/target.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/tdump.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/tdump.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/watch.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/watch.gif -------------------------------------------------------------------------------- /gdbtk/plugins/rhabout/pkgIndex.tcl: -------------------------------------------------------------------------------- 1 | package ifneeded RHABOUT 1.0 [list source [file join $dir rhabout.tcl]] 2 | 3 | -------------------------------------------------------------------------------- /gdbtk/library/help/images/watch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/help/images/watch.png -------------------------------------------------------------------------------- /gdbtk/library/images/Movie_off.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/Movie_off.gif -------------------------------------------------------------------------------- /gdbtk/library/images/gdbtk_icon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/gdbtk_icon.gif -------------------------------------------------------------------------------- /gdbtk/library/images/next_check.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/next_check.gif -------------------------------------------------------------------------------- /gdbtk/library/images/next_frame.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/next_frame.gif -------------------------------------------------------------------------------- /gdbtk/library/images/next_line.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/next_line.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/Movie_off.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/Movie_off.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/Movie_on.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/Movie_on.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/continue.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/continue.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/function.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/function.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/next_hit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/next_hit.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/next_line.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/next_line.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/prev_hit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/prev_hit.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/run_expt.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/run_expt.gif -------------------------------------------------------------------------------- /gdbtk/library/help/images/browser1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/help/images/browser1.png -------------------------------------------------------------------------------- /gdbtk/library/help/images/browser2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/help/images/browser2.png -------------------------------------------------------------------------------- /gdbtk/library/help/images/mem_menu.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/help/images/mem_menu.gif -------------------------------------------------------------------------------- /gdbtk/library/help/images/mem_pref.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/help/images/mem_pref.gif -------------------------------------------------------------------------------- /gdbtk/library/help/images/reg_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/help/images/reg_menu.png -------------------------------------------------------------------------------- /gdbtk/library/help/images/src_bal.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/help/images/src_bal.gif -------------------------------------------------------------------------------- /gdbtk/library/help/images/src_bpop.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/help/images/src_bpop.gif -------------------------------------------------------------------------------- /gdbtk/library/help/images/src_menu.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/help/images/src_menu.gif -------------------------------------------------------------------------------- /gdbtk/library/help/images/src_pop.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/help/images/src_pop.gif -------------------------------------------------------------------------------- /gdbtk/library/help/images/src_stat.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/help/images/src_stat.gif -------------------------------------------------------------------------------- /gdbtk/library/images/watch_movie.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images/watch_movie.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/gdbtk_icon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/gdbtk_icon.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/next_check.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/next_check.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/next_frame.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/next_frame.gif -------------------------------------------------------------------------------- /gdbtk/library/images2/watch_movie.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/images2/watch_movie.gif -------------------------------------------------------------------------------- /gdbtk/plugins/intel-pentium/pkgIndex.tcl: -------------------------------------------------------------------------------- 1 | package ifneeded INTELPENTIUM 1.0 [list source [file join $dir intel-pentium.tcl]] 2 | -------------------------------------------------------------------------------- /gdbtk/library/help/images/frame_info.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/help/images/frame_info.gif -------------------------------------------------------------------------------- /gdbtk/library/help/images/insightbwr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/help/images/insightbwr.png -------------------------------------------------------------------------------- /gdbtk/library/help/images/mem_popup.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/help/images/mem_popup.gif -------------------------------------------------------------------------------- /gdbtk/library/help/images/src_bp_bal.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/help/images/src_bp_bal.gif -------------------------------------------------------------------------------- /gdbtk/library/help/images/src_thread.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/help/images/src_thread.gif -------------------------------------------------------------------------------- /gdbtk/library/help/images/src_toolbar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monnerat/insight/HEAD/gdbtk/library/help/images/src_toolbar.gif -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "binutils-gdb"] 2 | path = binutils-gdb 3 | url = git://sourceware.org/git/binutils-gdb.git 4 | branch = master 5 | -------------------------------------------------------------------------------- /gdbtk/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | 3 | AUTOMAKE_OPTIONS = foreign no-dist 4 | SUBDIRS = plugins 5 | -------------------------------------------------------------------------------- /libgui/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in. 2 | 3 | AUTOMAKE_OPTIONS = foreign no-dist 4 | SUBDIRS = library src 5 | -------------------------------------------------------------------------------- /gdbtk/plugins/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | 3 | AUTOMAKE_OPTIONS = foreign no-dist 4 | SUBDIRS = @make_subdirs@ 5 | -------------------------------------------------------------------------------- /gdbtk/plugins/intel-pentium/Makefile.in: -------------------------------------------------------------------------------- 1 | # Plugin definitions 2 | PLUGIN = intel-pentium 3 | PLUGIN_INSTALL_SRCDIR = cpuinfo.tcl \ 4 | msrselection.ith \ 5 | msrselection.itb 6 | 7 | -------------------------------------------------------------------------------- /libgui/library/gettext.tcl: -------------------------------------------------------------------------------- 1 | # gettext.tcl - some stubs 2 | # Copyright (C) 1997 Cygnus Solutions. 3 | # Written by Tom Tromey . 4 | 5 | proc gettext {str} { 6 | return $str 7 | } 8 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | MAKEFILEDIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))) 2 | 3 | notarget: 4 | cd "$(MAKEFILEDIR)/bundle" && $(MAKE) $(MAKECMDGOALS) 5 | 6 | .DEFAULT: 7 | cd "$(MAKEFILEDIR)/bundle" && $(MAKE) $(MAKECMDGOALS) 8 | -------------------------------------------------------------------------------- /gdbtk/plugins/intel-pentium/intel-pentium.tcl.in: -------------------------------------------------------------------------------- 1 | package provide INTELPENTIUM 1.0 2 | set dirname [file dirname [info script]] 3 | lappend auto_path $dirname 4 | #catch {load [file join $dirname intel-pentium@TCL_SHLIB_SUFFIX@]} 5 | -------------------------------------------------------------------------------- /gdbtk/insight.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Encoding=UTF-8 3 | Name=Insight 4 | GenericName=Insight Debugger 5 | Comment=GDB Debugger GUI 6 | Exec=insight 7 | Icon=insight 8 | Terminal=true 9 | Type=Application 10 | Categories=Development;Debugger; 11 | -------------------------------------------------------------------------------- /gdbtk/plugins/rhabout/rhabout.tcl.in: -------------------------------------------------------------------------------- 1 | package provide RHABOUT 1.0 2 | set dirname [file dirname [info script]] 3 | lappend auto_path $dirname 4 | set TCL_DBGX "@TCL_DBGX@" ; # needed for cygwin 5 | catch {load [file join $dirname rhabout@TCL_SHLIB_SUFFIX@]} 6 | -------------------------------------------------------------------------------- /libgui/src/tkTable_version.in: -------------------------------------------------------------------------------- 1 | #if 0 2 | TBL_MAJOR_VERSION = 2 3 | TBL_MINOR_VERSION = 7 4 | TBL_VERSION = $(TBL_MAJOR_VERSION).$(TBL_MINOR_VERSION) 5 | #endif 6 | #define TBL_MAJOR_VERSION 2 7 | #define TBL_MINOR_VERSION 7 8 | #define TBL_VERSION "2.7" 9 | -------------------------------------------------------------------------------- /gdbtk/configure.ac: -------------------------------------------------------------------------------- 1 | AC_INIT(generic/gdbtk.h) 2 | AC_CONFIG_AUX_DIR(../..) 3 | AM_INIT_AUTOMAKE(insight, 1.0) 4 | AM_MAINTAINER_MODE 5 | AC_CANONICAL_HOST 6 | AC_PROG_MAKE_SET 7 | AC_PROG_CC 8 | AC_OBJEXT 9 | AC_EXEEXT 10 | 11 | AC_CONFIG_SUBDIRS(plugins) 12 | AC_OUTPUT(Makefile) 13 | -------------------------------------------------------------------------------- /gdbtk/plugins/rhabout/Makefile.in: -------------------------------------------------------------------------------- 1 | # Plugin definitions 2 | PLUGIN = rhabout 3 | PLUGIN_OBJS = rhabout.$(OBJEXT) 4 | PLUGIN_IMAGE_BASE = 0x65000000 5 | PLUGIN_INSTALL_SRCDIR = rhabout.itcl 6 | # Comment out this to install the example plugin 7 | PLUGIN_INSTALL_TARGET = nothing 8 | 9 | nothing: 10 | -------------------------------------------------------------------------------- /gdbtk/library/Makefile: -------------------------------------------------------------------------------- 1 | 2 | TCL := $(wildcard *.tcl *.itcl *.ith *.itb) 3 | 4 | TCLSH = tclsh 5 | 6 | tclIndex: $(TCL) Makefile 7 | echo "package require Itcl; auto_mkindex `pwd` $(TCL)" | $(TCLSH) 8 | 9 | tags: TAGS 10 | TAGS: $(TCL) 11 | etags --lang=none --regex='/[ \t]*\(proc\|method\|itcl_class\)[ \t]+\([^ \t]+\)/\1/' $(TCL) 12 | -------------------------------------------------------------------------------- /libgui/library/gensym.tcl: -------------------------------------------------------------------------------- 1 | # gensym.tcl - Generate new symbols. 2 | # Copyright (C) 1997 Cygnus Solutions. 3 | # Written by Tom Tromey . 4 | 5 | # Internal counter used to provide new symbol names. 6 | defvar GENSYM_counter 0 7 | 8 | # Return a new "symbol". This proc hopes that nobody else decides to 9 | # use its prefix. 10 | proc gensym {} { 11 | global GENSYM_counter 12 | return __gensym_symbol_[incr GENSYM_counter] 13 | } 14 | -------------------------------------------------------------------------------- /gdbtk/library/help/gbl_pref.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Global Preferences Help 4 | 5 | 6 |

Global Preferences

7 |

Overview

8 |

Not yet done.

9 | 10 |

Global Preferences topics: 11 |

17 | 18 |

stuff

19 | 20 | 21 | -------------------------------------------------------------------------------- /gdbtk/library/help/trace/gbl_pref.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Global Preferences Help 4 | 5 | 6 |

Global Preferences

7 |

Overview

8 |

Not yet done.

9 | 10 |

Global Preferences topics: 11 |

17 | 18 |

stuff

19 | 20 | 21 | -------------------------------------------------------------------------------- /testsuite/gdb.gdbtk/simple.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int 5 | main(int argc, char * argv[]) 6 | { 7 | int i; 8 | char *a; 9 | char *b = "abc"; 10 | long foo; 11 | 12 | a = (char *) malloc (300); 13 | 14 | for (i=0; i < 50; i++) 15 | { 16 | int j = i % 3; 17 | int k = 3 - j; 18 | strncpy (&a[i], &b[k], j); 19 | foo = (long) j * k / i + 2 * k * k * k; 20 | } 21 | return 0; 22 | } 23 | 24 | -------------------------------------------------------------------------------- /gdbtk/plugins/rhabout/tclIndex: -------------------------------------------------------------------------------- 1 | # Tcl autoload index file, version 2.0 2 | # This file is generated by the "auto_mkindex" command 3 | # and sourced to set up indexing information for one or 4 | # more commands. Typically each line is a command that 5 | # sets an element in the auto_index array, where the 6 | # element name is the name of a command and the value is 7 | # a script that loads the command. 8 | 9 | set auto_index(RHAbout) [list source [file join $dir rhabout.itcl]] 10 | -------------------------------------------------------------------------------- /gdbtk/library/help/src_pref.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Source Window Preferences Help 4 | 5 | 6 |

Source Window Preferences

7 |

Overview

8 |

Not yet done.

9 | 10 |

Source Preferences topics: 11 |

17 | 18 |

stuff

19 | 20 | 21 | -------------------------------------------------------------------------------- /gdbtk/library/help/trace/src_pref.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Source Window Preferences Help 4 | 5 | 6 |

Source Window Preferences

7 |

Overview

8 |

Not yet done.

9 | 10 |

Source Preferences topics: 11 |

17 | 18 |

stuff

19 | 20 | 21 | -------------------------------------------------------------------------------- /gdbtk/library/help/trace/reg_pref.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Register Window Preferences Help 4 | 5 | 6 |

Register Window Preferences

7 |

Overview

8 |

Not yet done.

9 | 10 |

Register Window Preferences topics: 11 |

17 | 18 |

stuff

19 | 20 | 21 | -------------------------------------------------------------------------------- /gdbtk/library/help/trace/index.toc: -------------------------------------------------------------------------------- 1 | {Source Window} {source.html} {The Source Window} 2 | {Register Window} {register.html} {The Register Window} 3 | {Memory Window} {memory.html} {The Memory Window} 4 | {Locals Window} {locals.html} {The Locals Window} 5 | {Watch Window} {watch.html} {The Watch Window} 6 | {Tracepoint Window} {tp.html} {The Tracepoint Window} 7 | {Console Window} {console.html} {The Console Window} 8 | {Stack Window} {stack.html} {The Stack Window} 9 | {TDump Window} {tdump.html} {The Tracepoint Dump Window} 10 | {GPL} {license.html} {The GNU Public License} 11 | -------------------------------------------------------------------------------- /libgui/library/lframe.tcl: -------------------------------------------------------------------------------- 1 | # lframe.tcl - Labelled frame widget. 2 | # Copyright (C) 1997-2015 Red Hat, Inc. 3 | # Written by Tom Tromey . 4 | 5 | itcl::class Labelledframe { 6 | inherit Widgetframe 7 | 8 | # The label text. 9 | public variable text {} { 10 | if {[winfo exists [namespace tail $this].label]} then { 11 | [namespace tail $this].label configure -text $text 12 | } 13 | } 14 | 15 | constructor {args} { 16 | eval $this configure $args 17 | label [namespace tail $this].label -text $text -padx 2 18 | _add [namespace tail $this].label 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /testsuite/gdb.gdbtk/cpp_variable.cc: -------------------------------------------------------------------------------- 1 | #include "cpp_variable.h" 2 | 3 | static void do_simple_class_tests (void); 4 | 5 | int 6 | VB::fvb_pub () {return 300 + vb_pub_int;} 7 | 8 | int 9 | VB::vvb_pub () {return 400 + vb_pub_int;} 10 | 11 | int 12 | V::f () {return 600 + v_pub_int;} 13 | 14 | int 15 | V::vv () {return 400 + v_pub_int;} 16 | 17 | int 18 | VC::fvc () {return 300 + vc_pub_int;} 19 | 20 | int 21 | VC::vfvc () {return 100 + vc_pub_int;} 22 | 23 | main () 24 | { 25 | do_simple_class_tests (); 26 | } 27 | 28 | static void 29 | do_simple_class_tests (void) 30 | { 31 | V *v = new V; 32 | V vv; 33 | } 34 | -------------------------------------------------------------------------------- /libgui/library/mono.tcl: -------------------------------------------------------------------------------- 1 | # mono.tcl - Dealing with monochrome. 2 | # Copyright (C) 1997 Cygnus Solutions. 3 | # Written by Tom Tromey . 4 | 5 | # It is safe to run this any number of times, so it is ok to have it 6 | # here. Defined as true if the user wants monochrome display. 7 | pref define global/monochrome 0 8 | 9 | # Return 1 if monochrome, 0 otherwise. This should be used to make 10 | # the application experience more friendly for colorblind users as 11 | # well as those stuck on mono displays. 12 | proc monochrome_p {} { 13 | return [expr {[pref get global/monochrome] || [winfo depth .] == 1}] 14 | } 15 | -------------------------------------------------------------------------------- /testsuite/gdb.gdbtk/configure.ac: -------------------------------------------------------------------------------- 1 | dnl Process this file file with autoconf to produce a configure script. 2 | dnl This file is a shell script fragment that supplies the information 3 | dnl necessary to tailor a template configure script into the configure 4 | dnl script appropriate for this directory. For more information, check 5 | dnl any existing configure script. 6 | 7 | AC_PREREQ(2.5) 8 | AC_INIT(defs) 9 | 10 | CC=${CC-cc} 11 | AC_SUBST(CC) 12 | AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../..) 13 | AC_CANONICAL_SYSTEM 14 | 15 | dnl Check for exe extension set on certain hosts (e.g. Win32) 16 | AC_EXEEXT 17 | 18 | AC_OUTPUT(Makefile) 19 | -------------------------------------------------------------------------------- /libgui/library/pkgIndex.tcl: -------------------------------------------------------------------------------- 1 | # Tcl package index file, version 1.1 2 | # This file is generated by the "pkg_mkIndex" command 3 | # and sourced either when an application starts up or 4 | # by a "package unknown" script. It invokes the 5 | # "package ifneeded" command to set up package-related 6 | # information so that packages will be loaded automatically 7 | # in response to "package require" commands. When this 8 | # script is sourced, the variable $dir must contain the 9 | # full path name of this file's directory. 10 | 11 | package ifneeded combobox 2.3 [list source [file join $dir combobox.tcl]] 12 | package ifneeded debug 1.0 [list source [file join $dir debug.tcl]] 13 | -------------------------------------------------------------------------------- /gdbtk/library/help/trace/tdump.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Trace Dump Window Help 4 | 5 | 6 |

The TDump Window

7 |

Overview

8 |

The Tdump Window displays all of the information contained in the 9 | trace buffer for the current tracepoint. To view the contents of the 10 | trace buffer for a specific tracepoint, use the 11 | Tracing Control Buttons on the Source Window Toolbar 12 | , or jump to the tracepoint using one of the Tfind Dialogs accessible 13 | through the Source Window's Trace Menu. 14 |

15 | 16 | 17 | -------------------------------------------------------------------------------- /libgui/library/path.tcl: -------------------------------------------------------------------------------- 1 | # path.tcl - Path-handling helpers. 2 | # Copyright (C) 1998 Cygnus Solutions. 3 | # Written by Tom Tromey . 4 | 5 | # This proc takes a possibly relative path and expands it to the 6 | # corresponding fully qualified path. Additionally, on Windows the 7 | # result is guaranteed to be in "long" form. 8 | proc canonical_path {path} { 9 | global tcl_platform 10 | 11 | set r [file join [pwd] $path] 12 | if {$tcl_platform(platform) == "windows"} then { 13 | # This will fail if the file does not already exist. 14 | if {! [catch {file attributes $r -longname} long]} then { 15 | set r $long 16 | } 17 | } 18 | 19 | return $r 20 | } 21 | -------------------------------------------------------------------------------- /libgui/library/def.tcl: -------------------------------------------------------------------------------- 1 | # def.tcl - Definining commands. 2 | # Copyright (C) 1997 Cygnus Solutions. 3 | # Written by Tom Tromey . 4 | 5 | # Define a global array. 6 | proc defarray {name {value {}}} { 7 | upvar \#0 $name ary 8 | 9 | if {! [info exists ary]} then { 10 | set ary(_) {} 11 | unset ary(_) 12 | array set ary $value 13 | } 14 | } 15 | 16 | # Define a global variable. 17 | proc defvar {name {value {}}} { 18 | upvar \#0 $name var 19 | if {! [info exists var]} then { 20 | set var $value 21 | } 22 | } 23 | 24 | # Define a "constant". For now this is just a pretty way to declare a 25 | # global variable. 26 | proc defconst {name value} { 27 | upvar \#0 $name var 28 | set var $value 29 | } 30 | -------------------------------------------------------------------------------- /testsuite/gdb.gdbtk/list0.c: -------------------------------------------------------------------------------- 1 | #include "list0.h" 2 | 3 | int main () 4 | { 5 | int x; 6 | #ifdef usestubs 7 | set_debug_traps(); 8 | breakpoint(); 9 | #endif 10 | x = 0; 11 | foo (x++); 12 | foo (x++); 13 | foo (x++); 14 | foo (x++); 15 | foo (x++); 16 | foo (x++); 17 | foo (x++); 18 | foo (x++); 19 | foo (x++); 20 | foo (x++); 21 | foo (x++); 22 | foo (x++); 23 | foo (x++); 24 | foo (x++); 25 | foo (x++); 26 | foo (x++); 27 | foo (x++); 28 | foo (x++); 29 | foo (x++); 30 | foo (x++); 31 | foo (x++); 32 | foo (x++); 33 | foo (x++); 34 | foo (x++); 35 | foo (x++); 36 | return 0; 37 | } 38 | 39 | static void 40 | unused () 41 | { 42 | /* Not used for anything */ 43 | } 44 | -------------------------------------------------------------------------------- /libgui/library/ulset.tcl: -------------------------------------------------------------------------------- 1 | # ulset.tcl - Set labels based on info from gettext. 2 | # Copyright (C) 1997 Cygnus Solutions. 3 | # Written by Tom Tromey . 4 | 5 | # Extract underline and label info from a descriptor string. Any 6 | # underline in the descriptor is extracted, and the next character's 7 | # index is used as the -underline value. There can only be one _ in 8 | # the label. 9 | proc extract_label_info {option label} { 10 | set uList [split $label _] 11 | if {[llength $uList] > 2} then { 12 | error "too many underscores in label \"$label\"" 13 | } 14 | 15 | if {[llength $uList] == 1} then { 16 | set ul -1 17 | } else { 18 | set ul [string length [lindex $uList 0]] 19 | } 20 | 21 | return [list $option [join $uList {}] -underline $ul] 22 | } 23 | -------------------------------------------------------------------------------- /gdbtk/plugins/ChangeLog: -------------------------------------------------------------------------------- 1 | 2009-02-02 Doug Evans 2 | 3 | * aclocal.m4: Regenerate. 4 | * configure: Regenerate. 5 | 6 | 2007-07-26 Maciej W. Rozycki 7 | 8 | * Make-rules (html): Add goal. 9 | 10 | 2006-09-28 Keith Seitz 11 | 12 | * aclocal.m4: Regenerate. 13 | * configure: Regenerate. 14 | * Makefile.in: Regenerate. 15 | 16 | 2005-12-23 Eli Zaretskii 17 | 18 | * aclocal.m4: Update the FSF address. 19 | 20 | 2002-08-14 Keith Seitz 21 | 22 | * acinclude.m4, aclocal.m4, configure, configure.in, 23 | HOW-TO, Makefile.am, Makefile.in, Make-rules, 24 | plugins.tcl: New files adding improved support for plugins. 25 | * rhabout/: Add new sample plugin. 26 | * intel-pentium/: Add new Intel Pentium plugin. 27 | 28 | -------------------------------------------------------------------------------- /patches/binutils-gdb/007-Avoid-creating-a-file-handler-for-a-negative-fd.patch: -------------------------------------------------------------------------------- 1 | From 7d0fb2e749cf9bc616d3161c27f62f3e0f72f235 Mon Sep 17 00:00:00 2001 2 | From: Patrick Monnerat 3 | Date: Wed, 29 Jun 2016 16:25:14 +0200 4 | Subject: [PATCH] Avoid creating a file handler for a negative file descriptor. 5 | 6 | --- 7 | gdb/event-loop.c | 3 +++ 8 | 1 file changed, 3 insertions(+) 9 | 10 | diff --git a/gdb/event-loop.c b/gdb/event-loop.c 11 | index 09d4aac..b93e963 100644 12 | --- a/gdb/event-loop.c 13 | +++ b/gdb/event-loop.c 14 | @@ -447,6 +447,9 @@ add_file_handler (int fd, int mask, handler_func * proc, 15 | #endif 16 | int pollmask; 17 | 18 | + if (fd < 0) 19 | + return; 20 | + 21 | if (!mask) 22 | mask = GDB_READABLE | GDB_EXCEPTION; 23 | 24 | -- 25 | 1.9.3 26 | 27 | -------------------------------------------------------------------------------- /gdbtk/library/gdbwin.ith: -------------------------------------------------------------------------------- 1 | # GDBwin class definition for Insight. 2 | # Copyright (C) 1998, 1999, 2001 Red Hat, Inc. 3 | # 4 | # This program is free software; you can redistribute it and/or modify it 5 | # under the terms of the GNU General Public License (GPL) as published by 6 | # the Free Software Foundation; either version 2 of the License, or (at 7 | # your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | 14 | 15 | itcl::class GDBWin { 16 | inherit GDBEventHandler 17 | 18 | constructor {args} { 19 | debug "$args" 20 | } 21 | 22 | destructor { 23 | debug 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /gdbtk/library/embeddedwin.ith: -------------------------------------------------------------------------------- 1 | # EmbeddedWin class definition for GDBtk. 2 | # Copyright (C) 1998, 1999, 2001 Red Hat 3 | # 4 | # This program is free software; you can redistribute it and/or modify it 5 | # under the terms of the GNU General Public License (GPL) as published by 6 | # the Free Software Foundation; either version 2 of the License, or (at 7 | # your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | 14 | 15 | itcl::class EmbeddedWin { 16 | inherit ManagedWin 17 | 18 | constructor {args} { 19 | debug "$args" 20 | } 21 | 22 | destructor { 23 | debug 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /gdbtk/library/tpwin.itcl: -------------------------------------------------------------------------------- 1 | # Tracepoint window class definition for Insight 2 | # Copyright (C) 2015 Red Hat, Inc. 3 | # 4 | # This program is free software; you can redistribute it and/or modify it 5 | # under the terms of the GNU General Public License (GPL) as published by 6 | # the Free Software Foundation; either version 2 of the License, or (at 7 | # your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | 14 | 15 | itcl::class TpWin { 16 | inherit BpWin 17 | 18 | constructor {args} { BpWin::constructor {*}$args -tracepoints 1 } { 19 | window_name "Tracepoints" "TPs" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /testsuite/gdb.gdbtk/list0.h: -------------------------------------------------------------------------------- 1 | /* An include file that actually causes code to be generated in the including file. This is known to cause problems on some systems. */ 2 | #ifdef PROTOTYPES 3 | extern void bar(int); 4 | static void foo (int x) 5 | #else 6 | static void foo (x) int x; 7 | #endif 8 | { 9 | bar (x++); 10 | bar (x++); 11 | bar (x++); 12 | bar (x++); 13 | bar (x++); 14 | bar (x++); 15 | bar (x++); 16 | bar (x++); 17 | bar (x++); 18 | bar (x++); 19 | bar (x++); 20 | bar (x++); 21 | bar (x++); 22 | bar (x++); 23 | bar (x++); 24 | bar (x++); 25 | bar (x++); 26 | bar (x++); 27 | bar (x++); 28 | bar (x++); 29 | bar (x++); 30 | bar (x++); 31 | bar (x++); 32 | bar (x++); 33 | bar (x++); 34 | bar (x++); 35 | bar (x++); 36 | bar (x++); 37 | } 38 | -------------------------------------------------------------------------------- /libgui/library/hooks.tcl: -------------------------------------------------------------------------------- 1 | # hooks.tcl - Hook functions. 2 | # Copyright (C) 1997, 1999 Cygnus Solutions. 3 | # Written by Tom Tromey . 4 | 5 | proc add_hook {hook command} { 6 | upvar \#0 $hook var 7 | lappend var $command 8 | } 9 | 10 | proc remove_hook {hook command} { 11 | upvar \#0 $hook var 12 | set var [lremove $var $command] 13 | } 14 | 15 | proc define_hook {hook} { 16 | upvar \#0 $hook var 17 | 18 | if {! [info exists var]} then { 19 | set var {} 20 | } 21 | } 22 | 23 | proc run_hooks {hook args} { 24 | upvar \#0 $hook var 25 | set mssg_list {} 26 | foreach thunk $var { 27 | if {[catch {uplevel \#0 $thunk $args} mssg]} { 28 | set errStr "hook=$thunk args=\"$args\" $mssg\n" 29 | lappend mssg_list $errStr 30 | } 31 | } 32 | if {$mssg_list != ""} { 33 | error $mssg_list 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /testsuite/gdb.gdbtk/cpp_variable.h: -------------------------------------------------------------------------------- 1 | struct _foo 2 | { 3 | int a[10]; 4 | char *p; 5 | }; 6 | 7 | class VA 8 | { 9 | public: 10 | int va_pub_int; 11 | char *va_pub_charp; 12 | 13 | private: 14 | int va_priv_int; 15 | char *va_priv_charp; 16 | 17 | protected: 18 | struct _foo bar; 19 | }; 20 | 21 | class VB 22 | { 23 | public: 24 | int vb_pub_int; 25 | 26 | int fvb_pub (); 27 | virtual int vvb_pub (); 28 | 29 | private: 30 | int vb_priv_int; 31 | char *vb_priv_charp; 32 | }; 33 | 34 | class VC 35 | { 36 | public: 37 | int vc_pub_int; 38 | 39 | int fvc (); 40 | virtual int vfvc (); 41 | }; 42 | 43 | class V : public VA, public VB, public VC 44 | { 45 | public: 46 | int f (); 47 | virtual int vv (); 48 | int v_pub_int; 49 | char *v_pub_charp; 50 | 51 | private: 52 | int v_priv_int; 53 | char *v_priv_charp; 54 | }; 55 | -------------------------------------------------------------------------------- /libgui/library/canvas.tcl: -------------------------------------------------------------------------------- 1 | # canvas.tcl - Handy canvas-related commands. 2 | # Copyright (C) 1997 Cygnus Solutions. 3 | # Written by Tom Tromey . 4 | 5 | # Set scroll region on canvas. 6 | proc set_scroll_region {canvas} { 7 | set bbox [$canvas bbox all] 8 | if {[llength $bbox]} then { 9 | set sr [lreplace $bbox 0 1 0 0] 10 | } else { 11 | set sr {0 0 0 0} 12 | } 13 | 14 | # Don't include borders in the scrollregion. 15 | set delta [expr {2 * ([$canvas cget -borderwidth] 16 | + [$canvas cget -highlightthickness])}] 17 | 18 | set ww [winfo width $canvas] 19 | if {[lindex $sr 2] < $ww} then { 20 | set sr [lreplace $sr 2 2 [expr {$ww - $delta}]] 21 | } 22 | 23 | set wh [winfo height $canvas] 24 | if {[lindex $sr 3] < $wh} then { 25 | set sr [lreplace $sr 3 3 [expr {$wh - $delta}]] 26 | } 27 | 28 | $canvas configure -scrollregion $sr 29 | } 30 | -------------------------------------------------------------------------------- /libgui/src/subcommand.h: -------------------------------------------------------------------------------- 1 | /* subcommand.h - Handle commands with subcommands. 2 | Copyright (C) 1997 Cygnus Solutions. 3 | Written by Tom Tromey . */ 4 | 5 | #ifndef SUBCOMMAND_H 6 | #define SUBCOMMAND_H 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | struct ide_subcommand_table 13 | { 14 | const char *method; /* Method name. If NULL, then this is 15 | the last entry in the table. */ 16 | Tcl_CmdProc *func; /* The implementation. */ 17 | int min_args; /* Minimum number of args. */ 18 | int max_args; /* Maximum number of args. -1 means 19 | no maximum. */ 20 | }; 21 | 22 | /* Define a command with subcommands. */ 23 | int ide_create_command_with_subcommands 24 | (Tcl_Interp *interp, const char *name, const struct ide_subcommand_table *table, 25 | ClientData, Tcl_CmdDeleteProc *); 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | 31 | #endif /* SUBCOMMAND_H */ 32 | -------------------------------------------------------------------------------- /libgui/acconfig.h: -------------------------------------------------------------------------------- 1 | /* Name of package. */ 2 | #undef PACKAGE 3 | 4 | /* Version of package. */ 5 | #undef VERSION 6 | 7 | /* Set this if Tk's stdlib.h should be used. */ 8 | #undef NO_STDLIB_H 9 | 10 | /* Define this if declares strncasecmp(). */ 11 | #undef HAVE_STRNCASECMP_DECL 12 | 13 | /* Define this if the IDE is enabled. */ 14 | #define IDE_ENABLED 0 15 | 16 | /* Define this if tcl implements the Linux platform API. */ 17 | #undef TCL_PLATFORM_UNIX 18 | 19 | /* Define this if tcl implements the Windows platform API. */ 20 | #undef TCL_PLATFORM_WIN 21 | 22 | /* Define this if tcl implements the MacOSX platform API. */ 23 | #undef TCL_PLATFORM_MACOSX 24 | 25 | /* Define this if tk implements the Linux platform API. */ 26 | #undef TK_PLATFORM_UNIX 27 | 28 | /* Define this if tk implements the Windows platform API. */ 29 | #undef TK_PLATFORM_WIN 30 | 31 | /* Define this if tk implements the MacOSX platform API. */ 32 | #undef TK_PLATFORM_MACOSX 33 | -------------------------------------------------------------------------------- /testsuite/gdb.gdbtk/Makefile.in: -------------------------------------------------------------------------------- 1 | VPATH = @srcdir@ 2 | srcdir = @srcdir@ 3 | 4 | EXEEXT = @EXEEXT@ 5 | 6 | EXECUTABLES = simple$(EXEEXT) stack$(EXEEXT) c_variable$(EXEEXT) \ 7 | cpp_variable$(EXEEXT) 8 | 9 | # uuencoded format to avoid SCCS/RCS problems with binary files. 10 | CROSS_EXECUTABLES = 11 | 12 | all: 13 | @echo "Nothing to be done for all..." 14 | 15 | info: 16 | install-info: 17 | dvi: 18 | install: 19 | uninstall: force 20 | installcheck: 21 | check: 22 | 23 | clean mostlyclean: 24 | -rm -f *~ *.o a.out xgdb *.x $(CROSS_EXECUTABLES) *.ci *.tmp 25 | -rm -f core core.coremaker coremaker.core corefile $(EXECUTABLES) 26 | -rm -f twice-tmp.c 27 | 28 | distclean maintainer-clean realclean: clean 29 | -rm -f *~ core 30 | -rm -f Makefile config.status config.log 31 | -rm -f arch.inc 32 | -rm -f *-init.exp 33 | -rm -fr *.log summary detail *.plog *.sum *.psum site.* 34 | 35 | Makefile : $(srcdir)/Makefile.in $(srcdir)/configure.ac 36 | $(SHELL) ./config.status --recheck 37 | -------------------------------------------------------------------------------- /gdbtk/library/attachdlg.ith: -------------------------------------------------------------------------------- 1 | # 2 | # attachdlg.ith - itcl declarations for class AttachDlg 3 | # ---------------------------------------------------------------------- 4 | # Implements Attach to process window 5 | # 6 | # ---------------------------------------------------------------------- 7 | # Copyright (C) 1999 Cygnus Solutions 8 | # 9 | itcl::class AttachDlg { 10 | inherit ModalDialog ManagedWin 11 | 12 | public { 13 | method constructor {args} 14 | proc last_button {} {return $last_button} 15 | proc pid {} {return $last_pid} 16 | proc symbol_file {} {return $symbol_file} 17 | } 18 | 19 | protected { 20 | method build_win {args} 21 | method cancel {} 22 | method choose_symbol_file {} 23 | method doit {} 24 | method list_pids {{pattern *}} 25 | method select_pid {} 26 | method clear_pid_selection {} 27 | method filter_pid_selection {} 28 | 29 | variable pid_list 30 | 31 | common last_button 0 32 | common last_pid {} 33 | common symbol_file 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /libgui/library/font.tcl: -------------------------------------------------------------------------------- 1 | # font.tcl - Font handling. 2 | # Copyright (C) 1997 Cygnus Solutions. 3 | # Written by Tom Tromey . 4 | 5 | 6 | # This function is called whenever a font preference changes. We use 7 | # this information to update the appropriate symbolic font. 8 | proc FONT_track_change {symbolic prefname value} { 9 | eval font configure [list $symbolic] $value 10 | } 11 | 12 | # Primary interface to font handling. 13 | # define_font SYMBOLIC_NAME ARGS 14 | # Define a new font, named SYMBOLIC_NAME. ARGS is the default font 15 | # specification; it is a list of options such as those passed to `font 16 | # create'. 17 | proc define_font {symbolic args} { 18 | # We do a little trick with the names here, by inserting `font' in 19 | # the appropriate place in the name. 20 | set split [split $symbolic /] 21 | set name [join [linsert $split 1 font] /] 22 | 23 | pref define $name $args 24 | eval font create [list $symbolic] [pref get $name] 25 | pref add_hook $name [list FONT_track_change $symbolic] 26 | } 27 | -------------------------------------------------------------------------------- /libgui/library/topbind.tcl: -------------------------------------------------------------------------------- 1 | # topbind.tcl - Put a binding on a toplevel. 2 | # Copyright (C) 1997 Cygnus Solutions. 3 | # Written by Tom Tromey . 4 | # 5 | # Put a binding on a toplevel. This needs a separate proc because by 6 | # default the toplevel's name is put into the bindtags list for all 7 | # its descendents. Eg Destroy bindings typically don't want to be run 8 | # more than once. 9 | # 10 | 11 | # FIXME: should catch destroy operations and remove all bindings for 12 | # our tag. 13 | 14 | # Make the binding. Return nothing. 15 | proc bind_for_toplevel_only {toplevel sequence script} { 16 | set tagList [bindtags $toplevel] 17 | set tag _DBind_$toplevel 18 | if {[lsearch -exact $tagList $tag] == -1} then { 19 | # Always put our new binding first in case the other bindings run 20 | # break. 21 | bindtags $toplevel [concat $tag $tagList] 22 | } 23 | 24 | # Use "+" binding in case there are multiple calls to this. FIXME 25 | # should just use gensym. 26 | bind $tag $sequence +$script 27 | 28 | return {} 29 | } 30 | -------------------------------------------------------------------------------- /gdbtk/plugins/plugins.tcl: -------------------------------------------------------------------------------- 1 | # Only load the rhabout plugin if it was installed. 2 | foreach dir $::gdb_plugins { 3 | if {[file exists [file join $dir rhabout]]} { 4 | package require RHABOUT 1.0 5 | $Menu add command Other "About Red Hat" \ 6 | {ManagedWin::open RHAbout} -underline 0 7 | 8 | # To activate the PlugIn sample, uncomment the next line 9 | set plugins_available 1 10 | } 11 | } 12 | 13 | # Only load the Intel Pentium plugin for x86 targets. 14 | if {[string match "i?86-*" $::GDBStartup(target_name)] && ![TargetSelection::native_debugging]} { 15 | package require INTELPENTIUM 1.0 16 | 17 | # Add a new cascading-style menu to plugin menu 18 | $Menu add cascade intel "Intel Pentium" 0 19 | 20 | # Add MSR selection dialog menu item. 21 | $Menu add command None "MSR Selection..." \ 22 | {ManagedWin::open_dlg MsrSelDlg} -underline 0 23 | 24 | # Add CPU info menu item. 25 | $Menu add command None "CPU Information..." \ 26 | display_cpu_info -underline 0 27 | 28 | # Activate the PlugIn. 29 | set plugins_available 1 30 | } 31 | -------------------------------------------------------------------------------- /gdbtk/plugins/rhabout/ChangeLog: -------------------------------------------------------------------------------- 1 | 2013-02-16 Keith Seitz 2 | 3 | * rhabout.c (extra_text): Use Tcl_SetObjResult instead 4 | of setting the interpreter's result directly. 5 | 6 | 2004-12-08 Keith Seitz 7 | 8 | From Ben Elliston (bje@gnu.org): 9 | * rhabout.c (extra_text): Convert to object interface. 10 | (Rhabout_Init): Use Tcl_CreateObjCommand instead of older argc/argv 11 | Tcl_CreateCommand. 12 | 13 | 2003-03-12 Martin M. Hunt 14 | 15 | * rhabout.itcl (RHAbout): Fix call 16 | to open_help. We no longer use HTMLViewer. 17 | 18 | 2002-08-14 Keith Seitz 19 | 20 | Merged from Red Hat internal branch: 21 | 2001-11-30 Keith Seitz 22 | * rhabout.c: Update for building a DLL on cygwin. 23 | (DllMain): New function. 24 | * rhabout.tcl: Moved from ../ and renamed to 25 | rhabout.tcl.in: configure needs to tweak the shared library name. 26 | * rhabout.tcl.in: "New" file. 27 | * Makefile.in: New (template) file. 28 | * Makefile: Remove. 29 | * pkgIndex.tcl: Moved from ../ here. 30 | -------------------------------------------------------------------------------- /gdbtk/library/ipcpref.ith: -------------------------------------------------------------------------------- 1 | # IPC preferences dialog class definition for Insight. 2 | # Copyright (C) 2004, Red Hat Inc. 3 | # 4 | # This program is free software; you can redistribute it and/or modify it 5 | # under the terms of the GNU General Public License (GPL) as published by 6 | # the Free Software Foundation; either version 2 of the License, or (at 7 | # your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | 14 | 15 | itcl::class IPCPref { 16 | inherit ManagedWin ModalDialog 17 | 18 | private { 19 | variable _saved ;# These are the saved values... 20 | variable _new ;# These are the changed values 21 | variable w 22 | method _apply {} 23 | method _build_win {} 24 | method _cancel {} 25 | method _init_var {} 26 | method _save {} 27 | } 28 | 29 | public { 30 | method constructor {args} 31 | method reconfig {} 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /gdbtk/library/help/trace/help.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Help Window Help 4 | 5 | 6 |

The Help Window

7 |

Overview

8 |

This is some nice text which describes the help window, its role 9 | in deugging, and perhaps some of the nifty things people can do with 10 | this window.

11 | 12 |

Help Window topics: 13 |

23 | 24 |

Menus

25 |

File Menu

26 |

Topics Menu

27 | 28 |

Help Display

29 |

Navigating the Help Window

30 |

Definition and Page Links

31 | 32 | 33 | -------------------------------------------------------------------------------- /libgui/TODO: -------------------------------------------------------------------------------- 1 | - should have an intelligent way of mapping color use to color name 2 | likewise fonts 3 | 4 | - ulset.tcl is not very easy to use 5 | should write class to manage menubar 6 | this could integrate ulset functionality and also balloon help 7 | should look at iwidgets 2.2 again to make sure we 8 | aren't gratuitously incompatible 9 | 10 | - add more bitmaps/gifs from S-N 11 | 12 | - use a real gettext, not the dummy one we have now 13 | see if it is possible to use some of the gnu code, for instance 14 | xgettext. 15 | the runtime code must be written by us; probably just use db 16 | 17 | - rewrite the canvas patches as a pure extension 18 | the current situation is terrible 19 | later, use a different layout algorithm. ISI sucks. 20 | See: 21 | A Technique for Drawing Directed Graphs 22 | Emden R Gansner, Eleftherios Koutsofios, Stephen C. North, and 23 | Kiem-Phong Vo 24 | IEEE Transactions on Software Engineering Vol 19, No 3 25 | 26 | - must have sensible way to track toplevel state and save in database 27 | 28 | - a way to make optionmenus which are statically sized to the 29 | correct width 30 | -------------------------------------------------------------------------------- /libgui/library/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in. 2 | 3 | AUTOMAKE_OPTIONS = foreign no-dist 4 | 5 | ## Convenience variables. 6 | TCL = advice.tcl balloon.tcl bbox.tcl bindings.tcl \ 7 | canvas.tcl cframe.tcl center.tcl debug.tcl def.tcl internet.tcl \ 8 | font.tcl gensym.tcl gettext.tcl hooks.tcl lframe.tcl list.tcl \ 9 | looknfeel.tcl menu.tcl mono.tcl multibox.tcl parse_args.tcl path.tcl \ 10 | postghost.tcl prefs.tcl print.tcl sendpr.tcl topbind.tcl toolbar.tcl \ 11 | ulset.tcl wframe.tcl wingrab.tcl ventry.tcl combobox.tcl \ 12 | pane.tcl panedwindow.tcl 13 | 14 | ## This directory is also referenced in paths.c, which see. 15 | guidir = $(datadir)/redhat/gui 16 | gui_DATA = tclIndex pkgIndex.tcl $(TCL) $(PACKAGES) 17 | 18 | 19 | if CROSS_COMPILING 20 | TCLSH = tclsh8.4 21 | else 22 | TCLSH = @TCLSH@ 23 | endif 24 | 25 | if MAINTAINER_MODE 26 | tclIndex: $(TCL) 27 | echo "package require Itcl; auto_mkindex $(LIBGUI_LIBRARY_DIR) $(TCL)" | $(TCLSH) 28 | else 29 | tclIndex: 30 | endif 31 | 32 | ETAGS_ARGS = --lang=none --regex='/[ \t]*\(proc\|method\|itcl_class\)[ \t]+\([^ \t]+\)/\1/' $(TCL) --lang=auto 33 | -------------------------------------------------------------------------------- /patches/binutils-gdb/002-srcrelease.patch: -------------------------------------------------------------------------------- 1 | * Mon Sep 1 2014 Patrick Monnerat 2 | - Reintroduce insight in the release script. 3 | 4 | --- a/src-release.sh 2014-09-01 14:30:28.755141563 +0200 5 | +++ b/src-release.sh 2014-09-01 15:18:34.535809761 +0200 6 | @@ -295,6 +295,16 @@ gdb_release() 7 | gdb_tar_compress $package $tool "$GDB_SUPPORT_DIRS" "$compressors" 8 | } 9 | 10 | +# Insight: gui interface to gdb. 11 | +INSIGHT_SUPPORT_DIRS="${GDB_SUPPORT_DIRS} tcl tk itcl itk iwidgets libgui" 12 | +insight_release() 13 | +{ 14 | + compressors=$1 15 | + package=insight 16 | + tool=gdb 17 | + tar_compress $package $tool "$INSIGHT_SUPPORT_DIRS" "$compressors" 18 | +} 19 | + 20 | # Corresponding to the CVS "sim" module. 21 | SIM_SUPPORT_DIRS="bfd opcodes libiberty include intl gdb/version.in gdb/common/create-version.sh makefile.vms zlib" 22 | sim_release() 23 | @@ -326,6 +336,8 @@ build_release() 24 | gas_release "$compressors";; 25 | gdb) 26 | gdb_release "$compressors";; 27 | + insight) 28 | + insight_release "$compressors";; 29 | sim) 30 | sim_release "$compressors";; 31 | *) 32 | -------------------------------------------------------------------------------- /gdbtk/library/help/help.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Help Window Help 4 | 5 | 6 |

The Help Window

7 |

Overview

8 |

This is some nice text which describes the help window, its role 9 | in deugging, and perhaps some of the nifty things people can do with 10 | this window.

11 | 12 |

Help Window topics: 13 |

    14 |
  • Menus 15 |

    25 | 26 |

    Menus

    27 |

    File Menu

    28 |

    Topics Menu

    29 | 30 |

    Help Display

    31 |

    Navigating the Help Window

    32 |

    Definition and Page Links

    33 | 34 | 35 | -------------------------------------------------------------------------------- /gdbtk/library/help/session.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Sessions 4 | 5 | 6 | 7 |

    Sessions

    8 | 9 | Insight will save your session for you automatically. The ``session'' 10 | is essentially a group of settings which are keyed by the name of the 11 | inferior which you are debugging.

    12 | 13 | Insight will show a list of the five most recent previous sessions on 14 | the File menu. Choosing an item from this list will cause 15 | Insight to load the indicated executable and restore all the settings 16 | saved in the session.

    17 | 18 | The settings stored in a session are: 19 |

      20 |
    • The name of the executable. 21 | 22 |
    • The inferior's command-line arguments. 23 | 24 |
    • The target. 25 | 26 |
    • The path used when searching for source files. 27 | 28 |
    • The current working directory. 29 | 30 |
    • The breakpoints and watchpoints, including conditions, actions, 31 | and the like. 32 |
    33 |

    34 | 35 | More items may be added to this list as the need arises.

    36 | 37 | At present there is no way to disable session saving.

    38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /gdbtk/library/cspref.ith: -------------------------------------------------------------------------------- 1 | # Color Scheme preferences dialog class definition for GDBtk. 2 | # Copyright (C) 2004, Red Hat Inc. 3 | # 4 | # This program is free software; you can redistribute it and/or modify it 5 | # under the terms of the GNU General Public License (GPL) as published by 6 | # the Free Software Foundation; either version 2 of the License, or (at 7 | # your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | 14 | 15 | itcl::class CSPref { 16 | inherit ManagedWin ModalDialog 17 | 18 | private { 19 | variable _saved ;# These are the saved values... 20 | variable _new ;# These are the changed values 21 | variable w 22 | method _apply {} 23 | method _build_win {} 24 | method _cancel {} 25 | method _init_var {} 26 | method _pick {color win num} 27 | method _save {} 28 | method _setcolors {} 29 | } 30 | 31 | public { 32 | method constructor {args} 33 | method reconfig {} 34 | } 35 | } 36 | 37 | -------------------------------------------------------------------------------- /gdbtk/plugins/intel-pentium/tclIndex: -------------------------------------------------------------------------------- 1 | # Tcl autoload index file, version 2.0 2 | # This file is generated by the "auto_mkindex" command 3 | # and sourced to set up indexing information for one or 4 | # more commands. Typically each line is a command that 5 | # sets an element in the auto_index array, where the 6 | # element name is the name of a command and the value is 7 | # a script that loads the command. 8 | 9 | set auto_index(MsrSelDlg) [list source [file join $dir msrselection.ith]] 10 | set auto_index(::MsrSelDlg::constructor) [list source [file join $dir msrselection.itb]] 11 | set auto_index(::MsrSelDlg::build_win) [list source [file join $dir msrselection.itb]] 12 | set auto_index(::MsrSelDlg::doit) [list source [file join $dir msrselection.itb]] 13 | set auto_index(::MsrSelDlg::cancel) [list source [file join $dir msrselection.itb]] 14 | set auto_index(::MsrSelDlg::list_msrs) [list source [file join $dir msrselection.itb]] 15 | set auto_index(::MsrSelDlg::select_msr) [list source [file join $dir msrselection.itb]] 16 | set auto_index(::MsrSelDlg::clear_msr_selection) [list source [file join $dir msrselection.itb]] 17 | set auto_index(display_cpu_info) [list source [file join $dir cpuinfo.tcl]] 18 | -------------------------------------------------------------------------------- /gdbtk/library/process.ith: -------------------------------------------------------------------------------- 1 | # Process window class definition for Insight. 2 | # Copyright (C) 1998, 1999, 2001 Red Hat, Inc. 3 | # 4 | # This program is free software; you can redistribute it and/or modify it 5 | # under the terms of the GNU General Public License (GPL) as published by 6 | # the Free Software Foundation; either version 2 of the License, or (at 7 | # your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | 14 | 15 | itcl::class ProcessWin { 16 | inherit EmbeddedWin GDBWin 17 | 18 | private { 19 | variable id 20 | variable Running 0 21 | variable protect_me 0 22 | 23 | 24 | method build_win {} 25 | method change_context {} 26 | method cursor {glyph} 27 | } 28 | 29 | public { 30 | method reconfig {} 31 | method constructor {args} 32 | method destructor {} 33 | 34 | # 35 | # GDB Events 36 | # 37 | method busy {event} 38 | method idle {event} 39 | method update {event} 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /libgui/library/center.tcl: -------------------------------------------------------------------------------- 1 | # center.tcl - Center a window on the screen or over another window 2 | # Copyright (C) 1997, 1998, 2001 Red Hat, Inc. 3 | # Written by Tom Tromey . 4 | 5 | # Call this after the TOPLEVEL has been filled in, but before it has 6 | # been mapped. This proc will center the toplevel on the screen or 7 | # over another window. 8 | proc center_window {top args} { 9 | parse_args {{over ""}} 10 | 11 | update idletasks 12 | if {$over != ""} { 13 | set cx [expr {int ([winfo rootx $over] + [winfo width $over] / 2)}] 14 | set cy [expr {int ([winfo rooty $over] + [winfo height $over] / 2)}] 15 | set x [expr {$cx - int ([winfo reqwidth $top] / 2)}] 16 | set y [expr {$cy - int ([winfo reqheight $top] / 2)}] 17 | } else { 18 | set x [expr {int (([winfo screenwidth $top] - [winfo reqwidth $top]) / 2)}] 19 | set y [expr {int (([winfo screenheight $top] - [winfo reqheight $top]) / 2)}] 20 | } 21 | wm geometry $top +${x}+${y} 22 | wm positionfrom $top user 23 | 24 | # We run this update here because Tk updates toplevel geometry 25 | # (position) info in an idle handler on Windows, but doesn't force 26 | # the handler to run before mapping the window. 27 | update idletasks 28 | } 29 | -------------------------------------------------------------------------------- /gdbtk/generic/gdbtk-main.c: -------------------------------------------------------------------------------- 1 | /* Main function for gdb with insight. 2 | 3 | Copyright (C) 2002, 2014 Free Software Foundation, Inc. 4 | 5 | This file is part of GDB. 6 | 7 | This program is free software; you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation; either version 2 of the License, or 10 | (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License 18 | along with this program; if not, write to the Free Software 19 | Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 | Boston, MA 02110-1301, USA. */ 21 | 22 | 23 | #include "defs.h" 24 | #include "main.h" 25 | #include 26 | 27 | int 28 | main (int argc, char **argv) 29 | { 30 | struct captured_main_args args; 31 | memset (&args, 0, sizeof args); 32 | args.argc = argc; 33 | args.argv = argv; 34 | args.interpreter_p = "insight"; 35 | return gdb_main (&args); 36 | } 37 | -------------------------------------------------------------------------------- /gdbtk/plugins/intel-pentium/msrselection.ith: -------------------------------------------------------------------------------- 1 | # Implements MSR selection dialog class for Insight. 2 | # Copyright (C) 1999, 2000, 2001 Red Hat, Inc. 3 | # 4 | # Written by Fernando Nasser 5 | # 6 | # This program is free software; you can redistribute it and/or modify it 7 | # under the terms of the GNU General Public License (GPL) as published by 8 | # the Free Software Foundation; either version 2 of the License, or (at 9 | # your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | class MsrSelDlg { 17 | inherit ModalDialog PluginWindow 18 | 19 | public { 20 | method constructor {args} 21 | proc last_button {} {return $last_button} 22 | proc msr {} {return $last_msr} 23 | } 24 | 25 | protected { 26 | method build_win {args} 27 | method cancel {} 28 | method doit {} 29 | method list_msrs {{expr {}}} 30 | method select_msr {} 31 | method clear_msr_selection {} 32 | 33 | variable msr_list 34 | 35 | common last_button 0 36 | common last_msr {} 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /gdbtk/library/srcpref.ith: -------------------------------------------------------------------------------- 1 | # Source preferences dialog class definition for GDBtk. 2 | # Copyright (C) 1998, 1999 Cygnus Solutions 3 | # 4 | # This program is free software; you can redistribute it and/or modify it 5 | # under the terms of the GNU General Public License (GPL) as published by 6 | # the Free Software Foundation; either version 2 of the License, or (at 7 | # your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | 14 | 15 | itcl::class SrcPref { 16 | inherit ManagedWin ModalDialog 17 | 18 | private { 19 | variable _saved ;# These are the saved values... 20 | variable _new ;# These are the changed values 21 | variable _saved_disassembly_flavor 22 | variable _new_disassembly_flavor "" 23 | 24 | method _apply {} 25 | method _build_win {} 26 | method _cancel {} 27 | method _init_var {} 28 | method _pick {color win tag} 29 | method _save {} 30 | method _set_flavor {w new_mode} 31 | method cancel {} 32 | } 33 | 34 | public { 35 | method constructor {args} 36 | } 37 | } 38 | 39 | -------------------------------------------------------------------------------- /gdbtk/plugins/intel-pentium/cpuinfo.tcl: -------------------------------------------------------------------------------- 1 | # Display CPU information. 2 | # Copyright (C) 1999, 2000, 2001 Red Hat, Inc. 3 | # 4 | # Written by Fernando Nasser 5 | # 6 | # This program is free software; you can redistribute it and/or modify it 7 | # under the terms of the GNU General Public License (GPL) as published by 8 | # the Free Software Foundation; either version 2 of the License, or (at 9 | # your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # ------------------------------------------------------------------ 17 | # NAME: proc display_cpu_info 18 | # DESCRIPTION: display what we know about the target CPU 19 | # if the information is available. 20 | # 21 | # ARGUMENTS: None 22 | # RETURNS: Nothing 23 | # 24 | # NOTES: 25 | # ------------------------------------------------------------------ 26 | proc display_cpu_info {} { 27 | global gdb_cpuid_info 28 | if {[catch {gdb_cmd "info cpu"} result]} { 29 | tk_messageBox -message "CPU information not available" 30 | } else { 31 | tk_messageBox -message "$result" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /libgui/library/menu.tcl: -------------------------------------------------------------------------------- 1 | # menu.tcl - Useful proc for dealing with menus. 2 | # Copyright (C) 1997 Cygnus Solutions. 3 | # Written by Tom Tromey . 4 | 5 | # This proc computes the "desired width" of a menu. It can be used to 6 | # determine the minimum width for a toplevel whose -menu option is 7 | # set. 8 | proc compute_menu_width {menu} { 9 | set width 0 10 | set last [$menu index end] 11 | if {$last != "end"} then { 12 | # Start at borderwidth, but also preserve borderwidth on the 13 | # right. 14 | incr width [expr {2 * [$menu cget -borderwidth]}] 15 | 16 | set deffont [$menu cget -font] 17 | set abw [expr {2 * [$menu cget -activeborderwidth]}] 18 | for {set i 0} {$i <= $last} {incr i} { 19 | if {[catch {$menu entrycget $i -font} font]} then { 20 | continue 21 | } 22 | if {$font == ""} then { 23 | set font $deffont 24 | } 25 | incr width [font measure $font [$menu entrycget $i -label]] 26 | incr width $abw 27 | # "10" was chosen by reading tkUnixMenu.c. 28 | incr width 10 29 | # This is arbitrary. Apparently I can't read tkUnixMenu.c well 30 | # enough to understand why the naive calculation above doesn't 31 | # work. 32 | incr width 2 33 | } 34 | # Another hack. 35 | incr width 2 36 | } 37 | 38 | return $width 39 | } 40 | -------------------------------------------------------------------------------- /gdbtk/library/help/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Insight Index 5 | 6 | 7 | 8 | 9 | 10 |

    24 |
    25 |

    For Developers Only

    26 | 29 |
    30 |
    31 | Insight Home Page 32 |



    33 | GNU General Public License 34 | 35 | 36 | -------------------------------------------------------------------------------- /gdbtk/library/ehandler.itb: -------------------------------------------------------------------------------- 1 | # GDBEventHandler class implementation for Insight. 2 | # Copyright (C) 2001 Red Hat, Inc. 3 | # 4 | # This program is free software; you can redistribute it and/or modify it 5 | # under the terms of the GNU General Public License (GPL) as published by 6 | # the Free Software Foundation; either version 2 of the License, or (at 7 | # your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | 14 | # ------------------------------------------------------------ 15 | # PUBLIC PROC: dispatch - Dispatch the given event to all 16 | # event handlers. The name of the handler 17 | # method to call is stored in the event's 18 | # "handler" method. 19 | # ------------------------------------------------------------ 20 | itcl::body GDBEventHandler::dispatch {event} { 21 | 22 | set handler [$event handler] 23 | 24 | # invoke event handlers 25 | foreach w [itcl::find objects -isa GDBEventHandler] { 26 | dbug I "posting event \"$handler\" to \"$w\"" 27 | if {[catch {$w $handler $event}]} { 28 | dbug E "On $handler event, $w errored:\n$::errorInfo" 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /gdbtk/library/stackwin.ith: -------------------------------------------------------------------------------- 1 | # Stack window class definition for GDBtk. 2 | # Copyright (C) 1997-2012 Red Hat, Inc. 3 | # 4 | # This program is free software; you can redistribute it and/or modify it 5 | # under the terms of the GNU General Public License (GPL) as published by 6 | # the Free Software Foundation; either version 2 of the License, or (at 7 | # your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | 14 | 15 | # ---------------------------------------------------------------------- 16 | # Implements stack window for gdb 17 | # ---------------------------------------------------------------------- 18 | 19 | itcl::class StackWin { 20 | inherit EmbeddedWin GDBWin 21 | 22 | private { 23 | variable Running 0 24 | variable protect_me 0 25 | method build_win {} 26 | method cursor {glyph} 27 | method change_frame {} 28 | method no_inferior {} 29 | } 30 | 31 | public { 32 | method reconfig {} 33 | method constructor {args} 34 | method destructor {} 35 | 36 | # 37 | # GDB Events 38 | # 39 | method busy {event} 40 | method idle {event} 41 | method update {event} 42 | } 43 | 44 | } 45 | 46 | -------------------------------------------------------------------------------- /testsuite/gdb.gdbtk/browser.exp: -------------------------------------------------------------------------------- 1 | # Copyright 1998, 1999, 2001, 2004 Red Hat, Inc. 2 | # 3 | # This program is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU General Public License (GPL) as published by 5 | # the Free Software Foundation; either version 2 of the License, or (at 6 | # your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | 13 | load_lib ../gdb.gdbtk/insight-support.exp 14 | 15 | if {[gdbtk_initialize_display]} { 16 | if {$tracelevel} { 17 | strace $tracelevel 18 | } 19 | 20 | # 21 | # test browser window 22 | # 23 | 24 | set testfile "stack" 25 | set binfile ${objdir}/${subdir}/${testfile} 26 | set r [gdb_compile "${srcdir}/${subdir}/stack1.c ${srcdir}/${subdir}/stack2.c" "${binfile}" executable {debug}] 27 | if { $r != "" } { 28 | gdb_suppress_entire_file \ 29 | "Testcase compile failed, so some tests in this file will automatically fail." 30 | } 31 | 32 | # Start with a fresh gdbtk 33 | gdb_exit 34 | set results [gdbtk_start [file join $srcdir $subdir browser.test]] 35 | set results [split $results \n] 36 | 37 | # Analyze results 38 | gdbtk_done $results 39 | } 40 | -------------------------------------------------------------------------------- /testsuite/gdb.gdbtk/windows.exp: -------------------------------------------------------------------------------- 1 | # Copyright 2001, 2004 Red Hat, Inc. 2 | # 3 | # This program is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU General Public License (GPL) as published by 5 | # the Free Software Foundation; either version 2 of the License, or (at 6 | # your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | 13 | load_lib ../gdb.gdbtk/insight-support.exp 14 | 15 | if {[gdbtk_initialize_display]} { 16 | if {$tracelevel} { 17 | strace $tracelevel 18 | } 19 | 20 | # 21 | # Basic window tests (basic as in, "do they open") 22 | # 23 | 24 | set srcfile [file join $srcdir $subdir c_variable.c] 25 | set binfile [file join $objdir $subdir c_variable] 26 | set r [gdb_compile $srcfile $binfile executable {debug}] 27 | if { $r != "" } { 28 | gdb_suppress_entire_file \ 29 | "Testcase compile failed, so some tests in this file will automatically fail." 30 | } 31 | 32 | # Start with a fresh gdbtk 33 | gdb_exit 34 | set results [gdbtk_start [file join $srcdir $subdir windows.test]] 35 | set results [split $results \n] 36 | 37 | # Analyze results 38 | gdbtk_done $results 39 | } 40 | -------------------------------------------------------------------------------- /testsuite/gdb.gdbtk/console.exp: -------------------------------------------------------------------------------- 1 | # Copyright 1998, 1999, 2001, 2004 Red Hat, Inc. 2 | # 3 | # This program is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU General Public License (GPL) as published by 5 | # the Free Software Foundation; either version 2 of the License, or (at 6 | # your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | 13 | load_lib ../gdb.gdbtk/insight-support.exp 14 | 15 | if {[gdbtk_initialize_display]} { 16 | if {$tracelevel} { 17 | strace $tracelevel 18 | } 19 | 20 | # 21 | # test console window 22 | # 23 | 24 | set testfile "simple" 25 | set srcfile ${testfile}.c 26 | set binfile ${objdir}/${subdir}/${testfile} 27 | set r [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] 28 | if { $r != "" } { 29 | gdb_suppress_entire_file \ 30 | "Testcase compile failed, so some tests in this file will automatically fail." 31 | } 32 | 33 | # Start with a fresh gdbtk 34 | gdb_exit 35 | set results [gdbtk_start [file join $srcdir $subdir console.test]] 36 | set results [split $results \n] 37 | 38 | # Analyze results 39 | gdbtk_done $results 40 | } 41 | -------------------------------------------------------------------------------- /testsuite/gdb.gdbtk/c_variable.exp: -------------------------------------------------------------------------------- 1 | # Copyright 1999, 2001, 2004 Red Hat, Inc. 2 | # 3 | # This program is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU General Public License (GPL) as published by 5 | # the Free Software Foundation; either version 2 of the License, or (at 6 | # your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | 13 | load_lib ../gdb.gdbtk/insight-support.exp 14 | 15 | if {[gdbtk_initialize_display]} { 16 | if {$tracelevel} { 17 | strace $tracelevel 18 | } 19 | 20 | # 21 | # test variable API 22 | # 23 | 24 | set testfile "c_variable" 25 | set srcfile ${testfile}.c 26 | set binfile ${objdir}/${subdir}/${testfile} 27 | set r [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] 28 | if { $r != "" } { 29 | gdb_suppress_entire_file \ 30 | "Testcase compile failed, so some tests in this file will automatically fail." 31 | } 32 | 33 | # Start with a fresh gdbtk 34 | gdb_exit 35 | set results [gdbtk_start [file join $srcdir $subdir ${testfile}.test]] 36 | set results [split $results \n] 37 | 38 | # Analyze results 39 | gdbtk_done $results 40 | } 41 | -------------------------------------------------------------------------------- /gdbtk/library/download.ith: -------------------------------------------------------------------------------- 1 | # Download class definition for Insight 2 | # Copyright (C) 1999, 2001 Red Hat, Inc. 3 | # 4 | # This program is free software; you can redistribute it and/or modify it 5 | # under the terms of the GNU General Public License (GPL) as published by 6 | # the Free Software Foundation; either version 2 of the License, or (at 7 | # your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | 14 | 15 | itcl::class Download { 16 | inherit ManagedWin 17 | 18 | protected { 19 | common total_bytes 20 | common section 21 | common bytes 22 | common num_sections 23 | common num_steps 100 24 | 25 | # completed steps in feedback meter (iwidget::feedback is lame) 26 | common completed_steps 27 | 28 | method _ignore_on_save {} { return 1 } 29 | proc dont_remember_size {} { return 1} 30 | } 31 | public { 32 | variable filename 33 | 34 | method constructor {args} 35 | method destructor {} 36 | method update_download { sec num tot } 37 | method done { {msg ""} } 38 | method cancel {} 39 | 40 | proc download_it { } 41 | proc do_download_hooks {} 42 | proc download_hash { section num } 43 | 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /gdbtk/library/ehandler.ith: -------------------------------------------------------------------------------- 1 | # GDBEventHandler class definition for Insight. 2 | # Copyright (C) 2001-2015 Red Hat, Inc. 3 | # 4 | # This program is free software; you can redistribute it and/or modify it 5 | # under the terms of the GNU General Public License (GPL) as published by 6 | # the Free Software Foundation; either version 2 of the License, or (at 7 | # your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | 14 | itcl::class GDBEventHandler { 15 | 16 | constructor {args} {} 17 | destructor {} 18 | 19 | # Dispatching proc. ALL events should be funneled through this 20 | # procedure. 21 | public proc dispatch {event} 22 | 23 | # 24 | # Events 25 | # 26 | 27 | # See gdbevent.ith for descriptions of event 28 | public { 29 | # Breakpoint/tracepoint events 30 | method breakpoint {event} {} 31 | method tracepoint {event} {} 32 | 33 | # Set variable 34 | method set_variable {event} {} 35 | 36 | # Busy event 37 | method busy {event} {} 38 | 39 | # Idle event 40 | method idle {event} {} 41 | 42 | # Update event 43 | method update {event} {} 44 | 45 | # Architecture changed event 46 | method arch_changed {event} {} 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /libgui/library/postghost.tcl: -------------------------------------------------------------------------------- 1 | # postghost.tcl - Ghost a menu item at post time. 2 | # Copyright (C) 1997 Cygnus Solutions. 3 | # Written by Tom Tromey . 4 | 5 | 6 | # Helper proc. 7 | proc GHOST_helper {menu index predicate} { 8 | if {[eval $predicate]} then { 9 | set state normal 10 | } else { 11 | set state disabled 12 | } 13 | $menu entryconfigure $index -state $state 14 | } 15 | 16 | # Add a -postcommand to a menu. This is careful not to stomp other 17 | # postcommands. 18 | proc add_post_command {menu callback} { 19 | set old [$menu cget -postcommand] 20 | # We use a "\n" and not a ";" to separate so that people can put 21 | # comments into their -postcommands without fear. 22 | $menu configure -postcommand "$old\n$callback" 23 | } 24 | 25 | # Run this to make a menu item which ghosts or unghosts depending on a 26 | # predicate that is run at menu-post time. The NO_CACHE option 27 | # prevents the index from being looked up statically; this is useful 28 | # if you want to use an entry name as the index and you have a very 29 | # dynamic menu (ie one where the numeric index of a named item is not 30 | # constant over time). If PREDICATE returns 0 at post time, then the 31 | # item will be ghosted. 32 | proc ghosting_menu_item {menu index predicate {no_cache 0}} { 33 | if {! $no_cache} then { 34 | set index [$menu index $index] 35 | } 36 | 37 | add_post_command $menu [list GHOST_helper $menu $index $predicate] 38 | } 39 | -------------------------------------------------------------------------------- /gdbtk/plugins/intel-pentium/ChangeLog: -------------------------------------------------------------------------------- 1 | 2005-12-23 Eli Zaretskii 2 | 3 | * msrselection.ith: 4 | * msrselection.itb: 5 | * cpuinfo.tcl: Put (C) after Copyright. 6 | 7 | 2002-08-14 Keith Seitz 8 | 9 | Merged from Red Hat internal branch: 10 | 11 | 2001-11-30 Keith Seitz 12 | * Makefile.in: New file. 13 | * intel-pentium.tcl: Renamed to intel-pentium.tcl.in. 14 | * plugins.tcl: This plugin is only available on non-native targets. 15 | Append to ../plugins.tcl and remove. 16 | 17 | 2001-11-28 Ian Roxborough 18 | * cpuinfo.tcl (display_cpu_info): exec the gdb command 19 | "info cpu" to get the extra cpuinformation (CPU ID). 20 | * library/plugins/intel-pentium/msrselection.itb 21 | (MsrSelDlg::build_win): Switch the OK and Cancel buttons 22 | around to improve ease of use. 23 | * plugins.tcl: Use "$::GDBStartup" rather than "$GDBStartup". 24 | Create a sub menu in the plugins menu called "Intel Pentium" 25 | and place the menu items in it. 26 | 27 | 2001-11-21 Ian Roxborough 28 | * msrselection.itb (MsrSelDlg::list_msrs): Use 29 | "set msr-pointer" instead of "set msr". 30 | (MsrSelDlg::doit): Set the msr-pointer before calling 31 | unpost. Display an error message is we can't set the 32 | msr-pointer. 33 | 34 | 2001-11-16 Ian Roxborough 35 | * cpuinfo.tcl: New file. 36 | * intel-pentium.tcl: Ditto. 37 | * cpuinfo.tcl: Ditto. 38 | * msrselection.itb: Ditto. 39 | * msrselection.ith: Ditto. 40 | * pkgIndex.tcl: Ditto. 41 | * plugins.tcl: Ditto. 42 | * tclIndex: Ditto. 43 | 44 | -------------------------------------------------------------------------------- /testsuite/gdb.gdbtk/cpp_variable.exp: -------------------------------------------------------------------------------- 1 | # Copyright 1999, 2001, 2004 Red Hat, Inc. 2 | # 3 | # This program is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU General Public License (GPL) as published by 5 | # the Free Software Foundation; either version 2 of the License, or (at 6 | # your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | 13 | load_lib ../gdb.gdbtk/insight-support.exp 14 | 15 | if {[gdbtk_initialize_display]} { 16 | if {$tracelevel} { 17 | strace $tracelevel 18 | } 19 | 20 | set results {} 21 | if {[skip_cplus_tests]} { 22 | # Target doesn't have c++ support 23 | verbose "No C++ support -- skipping test" 24 | } else { 25 | # 26 | # test variable API 27 | # 28 | 29 | set testfile "cpp_variable" 30 | set srcfile ${testfile}.cc 31 | set binfile ${objdir}/${subdir}/${testfile} 32 | set r [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] 33 | if { $r != "" } { 34 | gdb_suppress_entire_file \ 35 | "Testcase compile failed, so some tests in this file will automatically fail." 36 | } 37 | 38 | # Start with a fresh gdbtk 39 | gdb_exit 40 | set results [gdbtk_start [file join $srcdir $subdir ${testfile}.test]] 41 | set results [split $results \n] 42 | } 43 | 44 | # Analyze results 45 | gdbtk_done $results 46 | } 47 | -------------------------------------------------------------------------------- /gdbtk/library/tty.tcl: -------------------------------------------------------------------------------- 1 | # tty.tcl - xterm as tty for the inferior 2 | # Copyright (C) 1996, 2000 Red Hat, Inc 3 | # Written by Tom Tromey 4 | # 5 | # Interface to the inferior's terminal. This is very rough, and is 6 | # guaranteed to only work on Unix machines (if even there). 7 | # 8 | 9 | namespace eval tty { 10 | namespace export create 11 | 12 | variable _xterm_fd {} 13 | 14 | proc create {} { 15 | variable _xterm_fd 16 | 17 | destroy 18 | 19 | # Tricky: we exec /bin/cat so that the xterm will exit whenever we 20 | # close the write end of the pipe. Note that the stdin 21 | # redirection must come after tty is run; tty looks at its stdin. 22 | set shcmd {/bin/sh -c 'exec 1>&7; tty; exec /bin/cat 0<&6'} 23 | 24 | set fg [option get . foreground Foreground] 25 | if {$fg == ""} then { 26 | set fg black 27 | } 28 | 29 | set bg [. cget -background] 30 | if {$bg == ""} then { 31 | set bg [lindex [. configure -background] 3] 32 | } 33 | 34 | set xterm [list /bin/sh -c "exec xterm -T 'Gdb Child' -n Gdb -bg '$bg' -fg '$fg' -e $shcmd 6<&0 7>&1"] 35 | 36 | # Need both read and write access to xterm process. 37 | set _xterm_fd [open "| $xterm" w+] 38 | set tty [gets $_xterm_fd] 39 | 40 | # On failure we don't try the tty command. 41 | if {$tty != ""} { 42 | gdb_cmd "tty $tty" 43 | } 44 | } 45 | 46 | proc destroy {} { 47 | variable _xterm_fd 48 | 49 | if {$_xterm_fd != ""} then { 50 | # We don't care if this fails. 51 | catch {close $_xterm_fd} 52 | } 53 | set _xterm_fd {} 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /gdbtk/library/about.tcl: -------------------------------------------------------------------------------- 1 | # About window for GDBtk. 2 | # Copyright (C) 1997-2015 Red Hat, Inc. 3 | # 4 | # This program is free software; you can redistribute it and/or modify it 5 | # under the terms of the GNU General Public License (GPL) as published by 6 | # the Free Software Foundation; either version 2 of the License, or (at 7 | # your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | 14 | 15 | # ---------------------------------------------------------------------- 16 | # Implements About window 17 | # ---------------------------------------------------------------------- 18 | 19 | itcl::class About { 20 | inherit ManagedWin ModalDialog 21 | constructor {args} { 22 | global gdb_ImageDir 23 | set f [frame $itk_interior.f] 24 | label $f.image1 -bg #000000 -image \ 25 | [image create photo -file [file join $gdb_ImageDir insight.gif]] 26 | message $f.m -bg #000000 -fg white -text [gdb_cmd {show version}] \ 27 | -aspect 500 -relief flat 28 | pack $f.image1 $f.m $itk_interior.f -fill both -expand yes 29 | pack $itk_interior 30 | bind $f.image1 <1> [code $this unpost] 31 | bind $f.m <1> [code $this unpost] 32 | window_name "About Insight" 33 | } 34 | 35 | # Don't quit if this is the last window. The only way that this can 36 | # happen is if we are the splash screen. 37 | 38 | method quit_if_last {} { 39 | return 0 40 | } 41 | 42 | } 43 | 44 | -------------------------------------------------------------------------------- /gdbtk/library/globalpref.ith: -------------------------------------------------------------------------------- 1 | # Global preference class definition for GDBtk. 2 | # Copyright (C) 1998, 1999 Cygnus Solutions 3 | # 4 | # This program is free software; you can redistribute it and/or modify it 5 | # under the terms of the GNU General Public License (GPL) as published by 6 | # the Free Software Foundation; either version 2 of the License, or (at 7 | # your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | 14 | 15 | itcl::class GlobalPref { 16 | inherit ManagedWin ModalDialog 17 | 18 | private { 19 | variable _new 20 | variable _saved 21 | variable _icondirlist "" 22 | variable _original ;# Original font settings 23 | variable _size ;# Array tracking spinint values 24 | variable _fonts ;# List of all available fonts for editing 25 | common tracing_labels 26 | common inited 0 27 | 28 | method _init {} 29 | method _init_var {} 30 | method _build_win {} 31 | method _make_font_item {f name label font_list} 32 | method _resize_font_item_height {} 33 | method _change_icons {w args} 34 | method _change_font {font stupid implementation} 35 | method _change_size {direction font} 36 | method _ok {} 37 | method _apply {{deleteMe 0}} 38 | method _cancel {} 39 | method cancel {} 40 | method _toggle_tracing {win} 41 | } 42 | 43 | public { 44 | method constructor {args} 45 | method destructor {} 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /gdbtk/library/editor.tcl: -------------------------------------------------------------------------------- 1 | # Editor 2 | # Copyright (C) 2001 Red Hat, Inc. 3 | # 4 | # This program is free software; you can redistribute it and/or modify it 5 | # under the terms of the GNU General Public License (GPL) as published by 6 | # the Free Software Foundation; either version 2 of the License, or (at 7 | # your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | 14 | # ---------------------------------------------------------------------- 15 | # Implements a set of editor commands 16 | # ---------------------------------------------------------------------- 17 | 18 | namespace eval Editor { 19 | namespace export edit 20 | 21 | proc edit {loc_info} { 22 | global external_editor_command 23 | 24 | if {[info exists external_editor_command]} { 25 | if {[catch {uplevel \#0 "$external_editor_command edit $loc_info"} \ 26 | err]} { 27 | tk_dialog .warn-sn "Edit" $err error 0 Ok 28 | } 29 | return 30 | } 31 | 32 | lassign $loc_info baseName fnName fileName lineNum addr pc 33 | 34 | set newCmd [pref get gdb/editor] 35 | if {! [string compare $newCmd ""]} { 36 | tk_dialog .warn "Edit" "No editor command specified" error 0 Ok 37 | } 38 | 39 | # Replace %s with file name and %d with line number. 40 | regsub -all -- %s $newCmd $fileName newCmd 41 | regsub -all -- %d $newCmd $lineNum newCmd 42 | 43 | if {[catch "exec $newCmd &" err]} { 44 | tk_dialog .warn "Edit" $err error 0 Ok 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /libgui/library/parse_args.tcl: -------------------------------------------------------------------------------- 1 | # parse_args.tcl -- procedure for pulling in arguments 2 | 3 | # parse_args takes in a set of arguments with defaults and examines 4 | # the 'args' in the calling procedure to see what the arguments should 5 | # be set to. Sets variables in the calling frame to the right values. 6 | 7 | proc parse_args { argset } { 8 | upvar args args 9 | 10 | foreach argument $argset { 11 | if {[llength $argument] == 1} { 12 | # No default specified, so we assume that we should set 13 | # the value to 1 if the arg is present and 0 if it's not. 14 | # It is assumed that no value is given with the argument. 15 | set result [lsearch -exact $args "-$argument"] 16 | if {$result != -1} then { 17 | uplevel 1 [list set $argument 1] 18 | set args [lreplace $args $result $result] 19 | } else { 20 | uplevel 1 [list set $argument 0] 21 | } 22 | } elseif {[llength $argument] == 2} { 23 | # There are two items in the argument. The second is a 24 | # default value to use if the item is not present. 25 | # Otherwise, the variable is set to whatever is provided 26 | # after the item in the args. 27 | set arg [lindex $argument 0] 28 | set result [lsearch -exact $args "-[lindex $arg 0]"] 29 | if {$result != -1} then { 30 | uplevel 1 [list set $arg [lindex $args [expr $result+1]]] 31 | set args [lreplace $args $result [expr $result+1]] 32 | } else { 33 | uplevel 1 [list set $arg [lindex $argument 1]] 34 | } 35 | } else { 36 | error "Badly formatted argument \"$argument\" in argument set" 37 | } 38 | } 39 | 40 | # The remaining args should be checked to see that they match the 41 | # number of items expected to be passed into the procedure... 42 | } 43 | -------------------------------------------------------------------------------- /libgui/library/wingrab.tcl: -------------------------------------------------------------------------------- 1 | # wingrab.tcl -- grab support for Windows. 2 | # Copyright (C) 1997 Cygnus Solutions. 3 | # Written by Ian Lance Taylor . 4 | 5 | # Disable a list of windows. 6 | 7 | proc WINGRAB_disable { args } { 8 | foreach w $args { 9 | ide_grab_support_disable [wm frame $w] 10 | } 11 | } 12 | 13 | # Disable all top level windows, other than the argument, which are 14 | # children of `.'. Note that if you do this, and then destroy the 15 | # frame of the only enabled window, your application will lose the 16 | # input focus to some other application. Make sure that you reenable 17 | # the windows before calling wm transient or wm withdraw or destroy on 18 | # the only enabled window. 19 | 20 | proc WINGRAB_disable_except { window } { 21 | foreach w [winfo children .] { 22 | if {$w != $window} then { 23 | ide_grab_support_disable [wm frame [winfo toplevel $w]] 24 | } 25 | } 26 | } 27 | 28 | # Enable a list of windows. 29 | 30 | proc WINGRAB_enable { args } { 31 | foreach w $args { 32 | ide_grab_support_enable [wm frame $w] 33 | } 34 | } 35 | 36 | # Enable all top level windows which are children of `.'. 37 | 38 | proc WINGRAB_enable_all {} { 39 | foreach w [winfo children .] { 40 | ide_grab_support_enable [wm frame [winfo toplevel $w]] 41 | } 42 | } 43 | 44 | # The basic routine. All commands are subcommands of this. 45 | 46 | proc ide_grab_support {dispatch args} { 47 | global tcl_platform 48 | 49 | if {[info commands WINGRAB_$dispatch] == ""} then { 50 | error "unrecognized key \"$dispatch\"" 51 | } 52 | 53 | # We only need to do stuff on Windows. 54 | if {$tcl_platform(platform) != "windows"} then { 55 | return 56 | } 57 | 58 | eval WINGRAB_$dispatch $args 59 | } 60 | -------------------------------------------------------------------------------- /gdbtk/library/blockframe.ith: -------------------------------------------------------------------------------- 1 | # Class definitions for blocks and frames for GDBtk. 2 | # Copyright (C) 1997, 1998, 1999 Cygnus Solutions 3 | # 4 | # This program is free software; you can redistribute it and/or modify it 5 | # under the terms of the GNU General Public License (GPL) as published by 6 | # the Free Software Foundation; either version 2 of the License, or (at 7 | # your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | 14 | itcl::class Block { 15 | 16 | public { 17 | method constructor {start end args} 18 | method destructor {} 19 | method variables {} 20 | method update {} 21 | method info {} 22 | } 23 | 24 | private { 25 | # Start and end address for this block 26 | variable _start 27 | variable _end 28 | 29 | # List of variables (new) variables defined in this block 30 | variable _variables 31 | 32 | method _findVariables {} 33 | } 34 | } 35 | 36 | itcl::class Frame { 37 | 38 | public { 39 | method constructor {addr} 40 | method destructor {} 41 | method variables {} 42 | method update {} 43 | method new {} 44 | method old {} 45 | method deleteOld {} 46 | method address {} { return $_addr } 47 | } 48 | 49 | private { 50 | method _createBlocks {blocks} 51 | method _addBlock {block} 52 | method _findBlock {block} 53 | method _findBlockIndex {block} 54 | method _removeBlock {blockObj} 55 | method _oldBlocks {} 56 | 57 | # Our address 58 | variable _addr 59 | 60 | # A list of all blocks 61 | variable _blocks 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /gdbtk/plugins/rhabout/rhabout.c: -------------------------------------------------------------------------------- 1 | /* Sample command procedure library for a plug-in. */ 2 | 3 | /* You have to include the Tcl headers, of course. */ 4 | #include 5 | 6 | /* Define the functions that implement your commands as required by Tcl */ 7 | #if defined(__WIN32__) || defined(_WIN64) 8 | # define EXPORT __declspec(dllexport) 9 | #else 10 | # define EXPORT /* nothing */ 11 | #endif 12 | 13 | int extra_text (ClientData clientData, 14 | Tcl_Interp *interp, 15 | int objc, Tcl_Obj *CONST objv[]); 16 | 17 | /* Here you actually do whatever you want, like calling your target 18 | libraries etc. Here we just return a string. */ 19 | 20 | int 21 | extra_text (ClientData clientData, 22 | Tcl_Interp *interp, 23 | int objc, Tcl_Obj *CONST objv[]) 24 | { 25 | Tcl_SetObjResult (interp, 26 | Tcl_NewStringObj ("\nThis is a sample plug-in\n", -1)); 27 | return TCL_OK; 28 | } 29 | 30 | /* Initialization function required in Tcl libraries. */ 31 | 32 | int EXPORT 33 | Rhabout_Init (Tcl_Interp *interp) 34 | { 35 | /* Register your command as a Tcl command with this interpreter. */ 36 | Tcl_CreateObjCommand (interp, "rhabout_extra_text", extra_text, 37 | (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); 38 | 39 | /* Register this package */ 40 | Tcl_PkgProvide (interp, "RHABOUT", "1.0"); 41 | return TCL_OK; 42 | } 43 | 44 | /* This is REQUIRED for native windows implementations. */ 45 | #ifdef TCL_PLATFORM_WIN 46 | #include 47 | #include 48 | 49 | struct _reent *_impure_ptr; 50 | extern struct _reent *_imp__reent_data; 51 | 52 | BOOL APIENTRY 53 | DllMain (HINSTANCE hInstance, DWORD reason, LPVOID reserved) 54 | { 55 | _impure_ptr = _imp__reent_data; 56 | return TRUE; 57 | } 58 | #endif 59 | -------------------------------------------------------------------------------- /gdbtk/library/kod.ith: -------------------------------------------------------------------------------- 1 | # Kernel Object Display Window definition for Insight. 2 | # Copyright (C) 1999, 2001 Red Hat, Inc. 3 | # 4 | # This program is free software; you can redistribute it and/or modify it 5 | # under the terms of the GNU General Public License (GPL) as published by 6 | # the Free Software Foundation; either version 2 of the License, or (at 7 | # your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | 14 | itcl::class KodWin { 15 | inherit EmbeddedWin GDBWin 16 | 17 | private { 18 | variable bf 19 | variable lf 20 | variable titl 21 | variable BTop 22 | variable BUp 23 | variable BClear 24 | variable BDisplay 25 | variable lb 26 | variable t1 27 | variable t2 28 | variable pl1 29 | variable pl2 30 | variable pane1command "" 31 | variable pane2command "" 32 | variable BPane1 33 | variable BPane2 34 | variable level 0 35 | common LevelCmd 36 | variable BState 37 | variable Running 0 38 | method build_win {} 39 | method display {} 40 | method display_list {} 41 | method display_object {{cmd ""} {obj ""}} 42 | method clear {} 43 | method top {} 44 | method up {} 45 | method cursor {glyph} 46 | method _disable_buttons {} 47 | method _restore_buttons {} 48 | } 49 | 50 | public { 51 | method constructor {args} 52 | method destructor {} 53 | method reconfig {} 54 | 55 | # 56 | # Gdb Events 57 | # 58 | method set_variable {event} 59 | method busy {event} 60 | method idle {event} 61 | method update {event} 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /libgui/library/list.tcl: -------------------------------------------------------------------------------- 1 | # list.tcl - Some handy list procs. 2 | # Copyright (C) 1997 Cygnus Solutions. 3 | # Written by Tom Tromey . 4 | # FIXME: some are from TclX; we should probably just use the C 5 | # implementation that is in S-N. 6 | 7 | proc lvarpush {listVar element {index 0}} { 8 | upvar $listVar var 9 | if {![info exists var]} then { 10 | lappend var $element 11 | } else { 12 | set var [linsert $var $index $element] 13 | } 14 | } 15 | 16 | proc lvarpop {listVar {index 0}} { 17 | upvar $listVar var 18 | set result [lindex $var $index] 19 | # NOTE lreplace can fail if list is empty. 20 | if {! [catch {lreplace $var $index $index} new]} then { 21 | set var $new 22 | } 23 | return $result 24 | } 25 | 26 | # Remove duplicates and sort list. ARGS are arguments to lsort, eg 27 | # --increasing. 28 | proc lrmdups {list args} { 29 | set slist [eval lsort $args [list $list]] 30 | set last [lvarpop slist] 31 | set result [list $last] 32 | foreach item $slist { 33 | if {$item != $last} then { 34 | set last $item 35 | lappend result $item 36 | } 37 | } 38 | return $result 39 | } 40 | 41 | proc lremove {list element} { 42 | set index [lsearch -exact $list $element] 43 | if {$index == -1} then { 44 | return $list 45 | } 46 | return [lreplace $list $index $index] 47 | } 48 | 49 | # replace element with new element 50 | proc lrep {list element new} { 51 | set index [lsearch -exact $list $element] 52 | if {$index == -1} { 53 | return $list 54 | } 55 | return [lreplace $list $index $index $new] 56 | } 57 | 58 | # FIXME: this isn't precisely like the C lvarcat. It is slower. 59 | proc lvarcat {listVar args} { 60 | upvar $listVar var 61 | if {[join $args] != ""} then { 62 | # Yuck! 63 | eval eval lappend var $args 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /libgui/src/tclshellexe.c: -------------------------------------------------------------------------------- 1 | /* tclshellexe.c - Interface to Windows ShellExecute function. 2 | Copyright (C) 1997 Cygnus Solutions. 3 | Written by Tom Tromey ; 4 | Code mostly taken from S-N. */ 5 | 6 | #ifdef _WIN32 7 | 8 | #include 9 | 10 | #include 11 | 12 | #include 13 | #include 14 | 15 | #include "guitcl.h" 16 | 17 | static int 18 | shell_execute_command (ClientData clientData, Tcl_Interp *interp, 19 | int argc, CONST84 char *argv[]) 20 | { 21 | CONST84 char *operation; 22 | CONST84 char *file; 23 | CONST84 char *param; 24 | CONST84 char *dir; 25 | int ret; 26 | 27 | if (argc < 3 || argc > 5) 28 | { 29 | Tcl_AppendResult(interp, "wrong # args: should be \"", 30 | argv[0], " operation file ?parameters? ?directory?\"", NULL); 31 | 32 | return TCL_ERROR; 33 | } 34 | operation = argv[1]; /* Mandatory */ 35 | if (!*operation) 36 | operation = NULL; 37 | 38 | file = argv[2]; /* Mandatory */ 39 | 40 | if (argc > 3) 41 | { 42 | param = argv[3]; 43 | if (!*param) 44 | param = NULL; 45 | } 46 | else 47 | param = NULL; 48 | 49 | if (argc > 4) 50 | { 51 | dir = argv[4]; 52 | if (!*dir) 53 | dir = NULL; 54 | } 55 | else 56 | dir = NULL; 57 | 58 | ret = (int)(ssize_t)ShellExecuteA(NULL, operation, file, param, dir, SW_SHOWNORMAL); 59 | if (ret <= 32) 60 | { 61 | Tcl_AppendResult(interp, strerror(ret), NULL); 62 | return TCL_ERROR; 63 | } 64 | return TCL_OK; 65 | } 66 | 67 | int 68 | ide_create_shell_execute_command (Tcl_Interp *interp) 69 | { 70 | if (Tcl_CreateCommand (interp, "ide_shell_execute", shell_execute_command, 71 | NULL, NULL) == NULL) 72 | return TCL_ERROR; 73 | return TCL_OK; 74 | } 75 | 76 | #endif /* _WIN32 */ 77 | -------------------------------------------------------------------------------- /gdbtk/library/bpwin.ith: -------------------------------------------------------------------------------- 1 | # Breakpoint window class definition for Insight 2 | # Copyright (C) 1997, 1998, 1999, 2001 Red Hat, Inc. 3 | # 4 | # This program is free software; you can redistribute it and/or modify it 5 | # under the terms of the GNU General Public License (GPL) as published by 6 | # the Free Software Foundation; either version 2 of the License, or (at 7 | # your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | 14 | 15 | itcl::class BpWin { 16 | inherit EmbeddedWin GDBWin 17 | 18 | public { 19 | variable tracepoints 0 20 | 21 | method constructor {args} 22 | method destructor {} 23 | method bp_select {r} 24 | method bp_able { i } 25 | method bp_remove { i } 26 | method bp_restore {} 27 | method bp_store {} 28 | method bp_type { i } 29 | method bp_all { command } 30 | method get_actions {bpnum} 31 | method toggle_threads {} 32 | method reconfig {} 33 | method goto_bp {r} 34 | 35 | # GDB Events 36 | method breakpoint {event} 37 | method tracepoint {event} 38 | } 39 | 40 | private { 41 | variable twin 42 | variable next_row 0 43 | variable index_to_bpnum 44 | variable Index_to_bptype 45 | variable temp 46 | variable mbar 1 47 | variable selected 0 48 | variable bg1 49 | variable Menu 50 | variable show_threads ;#cached copy of [pref get gdb/bp/show_threads] 51 | 52 | method build_win {} 53 | method bp_add {bp_event {tracepoint 0}} 54 | method bp_modify {bp_event {tracepoint 0}} 55 | method bp_delete {bp_event} 56 | method _select_and_popup {bp X Y} 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /gdbtk/library/help/thread.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Thread Window Help 4 | 5 | 6 | 7 |
    8 |

    The Thread Window

    9 |
    10 | 11 | 12 |
    The Thread Window displays a list of threads and/or processes. The exact 13 | contents are OS-specific. 14 | 15 | 20 | 21 |

    Thread Display

    22 | The Thread Display consists of a listbox which displays information on 23 | threads and/or processes that are part of the executable being debugged. 24 | The first column is the GDB thread number, which is used internally by GDB 25 | to track the thread. The rest of the columns are OS-dependent. The output is identical 26 | to the output of the console command "info threads". 27 |
    28 | 29 |

    Changing the Current Thread

    30 | The source window can only display the current location and source for one thread 31 | at a time. That thread is called the "current thread". 32 | To change the current thread, simply click the left mouse button on the desired 33 | line and the 34 | debugger will switch contexts, updating all windows. The current thread will 35 | be highlighted. 36 |
    37 | 38 |

    Setting Breakpoints on Thread(s)

    39 | Normally if you set a breakpoint on a line or function, every thread that hits 40 | that location will stop execution and return to the debugger. To set a breakpoint 41 | or a specific thread or threads, you need to use the source window. See 42 | Set Breakpoint on Threads 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /libgui/src/tkTableCmd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tkTableCmd.h -- 3 | * 4 | * This is the header file for the module that implements 5 | * command structure lookups. 6 | * 7 | * Copyright (c) 1997-2016 Jeffrey Hobbs 8 | * 9 | * See the file "license.terms" for information on usage and redistribution 10 | * of this file, and for a DISCLAIMER OF ALL WARRANTIES. 11 | * 12 | */ 13 | 14 | #ifndef _CMD_H_ 15 | #define _CMD_H_ 16 | 17 | #include 18 | #include 19 | #include 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | /* structure for use in parsing table commands/values */ 26 | typedef struct { 27 | char *name; /* name of the command/value */ 28 | int value; /* >0 because 0 represents an error */ 29 | } Cmd_Struct; 30 | 31 | extern char * Cmd_GetName _ANSI_ARGS_((const Cmd_Struct *cmds, int val)); 32 | extern int Cmd_GetValue _ANSI_ARGS_((const Cmd_Struct *cmds, 33 | const char *arg)); 34 | extern void Cmd_GetError _ANSI_ARGS_((Tcl_Interp *interp, 35 | const Cmd_Struct *cmds, 36 | const char *arg)); 37 | extern int Cmd_Parse _ANSI_ARGS_((Tcl_Interp *interp, Cmd_Struct *cmds, 38 | const char *arg)); 39 | extern int Cmd_OptionSet _ANSI_ARGS_((ClientData clientData, 40 | Tcl_Interp *interp, 41 | Tk_Window unused, char *value, 42 | char *widgRec, int offset)); 43 | extern char * Cmd_OptionGet _ANSI_ARGS_((ClientData clientData, 44 | Tk_Window unused, char *widgRec, 45 | int offset, 46 | Tcl_FreeProc **freeProcPtr)); 47 | extern int Cmd_BitSet _ANSI_ARGS_((ClientData clientData, 48 | Tcl_Interp *interp, 49 | Tk_Window unused, char *value, 50 | char *widgRec, int offset)); 51 | extern char * Cmd_BitGet _ANSI_ARGS_((ClientData clientData, 52 | Tk_Window unused, char *widgRec, 53 | int offset, 54 | Tcl_FreeProc **freeProcPtr)); 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* _CMD_H_ */ 61 | -------------------------------------------------------------------------------- /libgui/library/internet.tcl: -------------------------------------------------------------------------------- 1 | # 2 | # internet.tcl - tcl interface to various internet functions 3 | # 4 | # Copyright (C) 1998 Cygnus Solutions 5 | # 6 | 7 | # ------------------------------------------------------------------ 8 | # send_mail - send email 9 | # ------------------------------------------------------------------ 10 | 11 | proc send_mail {to subject body} { 12 | global tcl_platform 13 | 14 | switch -- $tcl_platform(platform) { 15 | windows { 16 | ide_mapi simple-send $to $subject $body 17 | } 18 | unix { 19 | exec echo $body | mail -s $subject $to & 20 | } 21 | default { 22 | error "platform \"$tcl_platform(platform)\" not supported" 23 | } 24 | } 25 | } 26 | 27 | # ------------------------------------------------------------------ 28 | # open_url - open a URL in a browser 29 | # Netscape must be available for Unix. 30 | # ------------------------------------------------------------------ 31 | 32 | proc open_url {url} { 33 | global tcl_platform 34 | switch -- $tcl_platform(platform) { 35 | windows { 36 | ide_shell_execute open $url 37 | # FIXME. can we detect errors? 38 | } 39 | unix { 40 | if {[catch "exec netscape -remote [list openURL($url,new-window)]" result]} { 41 | if {[string match {*not running on display*} $result]} { 42 | # Netscape is not running. Try to start it. 43 | if {[catch "exec netscape [list $url] &" result]} { 44 | tk_dialog .warn "Netscape Error" "$result" error 0 Ok 45 | return 0 46 | } 47 | } elseif {[string match {couldn't execute *} $result]} { 48 | tk_dialog .warn "Netscape Error" "Cannot locate \"netscape\" on your system.\nIt must be installed and in your path." error 0 Ok 49 | return 0 50 | } else { 51 | tk_dialog .warn "Netscape Error" "$result" error 0 Ok 52 | return 0 53 | } 54 | } 55 | } 56 | default { 57 | error "platform \"$tcl_platform(platform)\" not supported" 58 | return 0 59 | } 60 | } 61 | return 1 62 | } 63 | 64 | 65 | -------------------------------------------------------------------------------- /gdbtk/library/toplevelwin.ith: -------------------------------------------------------------------------------- 1 | # TopLevelWin class definition for GDBtk. 2 | # Copyright (C) 1998, 1999 Cygnus Solutions 3 | # 4 | # This program is free software; you can redistribute it and/or modify it 5 | # under the terms of the GNU General Public License (GPL) as published by 6 | # the Free Software Foundation; either version 2 of the License, or (at 7 | # your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | 14 | 15 | itcl::class TopLevelWin { 16 | inherit ManagedWin 17 | 18 | private variable frame "" 19 | 20 | constructor {args} { 21 | debug $itk_interior 22 | 23 | # create a container frame 24 | conFrame $itk_interior.container 25 | pack $itk_interior.container -fill both -expand 1 26 | 27 | # set up bindings for group iconification/deiconification 28 | # NOT IMPLEMENTED YET 29 | #set top [winfo toplevel [namespace tail $this]] 30 | #bind_for_toplevel_only $top { 31 | # manage_iconify iconify 32 | #} 33 | #bind_for_toplevel_only $top { 34 | # manage_iconify deiconify 35 | #} 36 | incr numTopWins 37 | } 38 | 39 | public method conFrame {win} { 40 | set frame [cyg::panedwindow $win -height 5i] 41 | return $frame.con 42 | } 43 | 44 | public method conAdd {child args} { 45 | parse_args {{resizable 1}} 46 | $frame add $child -margin 0 -resizable $resizable 47 | return [$frame childsite $child].con 48 | } 49 | 50 | public method sizeWinByChild {child} { 51 | if {[catch {$frame childsite $child} childWin]} { 52 | debug "Could not find child $child" 53 | return 54 | } 55 | set width [winfo reqwidth $childWin] 56 | $frame configure -width $width 57 | 58 | } 59 | 60 | destructor { 61 | debug 62 | incr numTopWins -1 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /gdbtk/library/mempref.ith: -------------------------------------------------------------------------------- 1 | # Memory display preferences window class definition for GDBtk. 2 | # Copyright (C) 1998, 1999 Cygnus Solutions 3 | # 4 | # This program is free software; you can redistribute it and/or modify it 5 | # under the terms of the GNU General Public License (GPL) as published by 6 | # the Free Software Foundation; either version 2 of the License, or (at 7 | # your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | 14 | 15 | itcl::class MemPref { 16 | inherit ModalDialog ManagedWin 17 | 18 | public { 19 | variable win 20 | variable size 21 | variable format 22 | variable numbytes 23 | variable bpr 24 | variable ascii 25 | variable ascii_char 26 | variable color 27 | 28 | method constructor {args} 29 | method destructor {} 30 | method busy {} 31 | method idle {} 32 | method cancel {} 33 | method set_bytes_per_row {w value} 34 | method check_numbytes {var index mode} 35 | method toggle_size_control {} 36 | method apply {} 37 | method enable_format {} 38 | method disable_format {} 39 | method pick {lab} 40 | method reconfig {} 41 | } 42 | 43 | private { 44 | # The next seven variables are all used in the radio-buttons 45 | # and checkbuttons of the display. 46 | variable gsize 47 | variable gformat 48 | variable gnumbytes 49 | variable gbpr 50 | variable gbprlist 51 | variable gascii 52 | variable gascii_char 53 | variable gvar 54 | 55 | variable Widgets 56 | variable WidgetState 57 | variable format_disabled 0 58 | variable old_numbytes 59 | variable normal_background 60 | method build_win {} 61 | method ok {} 62 | } 63 | 64 | protected { 65 | common float_size "" 66 | common double_size "" 67 | common default_numbytes 128 68 | } 69 | 70 | } 71 | -------------------------------------------------------------------------------- /libgui/library/bbox.tcl: -------------------------------------------------------------------------------- 1 | # bbox.tcl - Function for handling button box. 2 | # Copyright (C) 1997 Cygnus Solutions. 3 | # Written by Tom Tromey . 4 | 5 | # Pass this proc a frame whose children are all buttons. It will put 6 | # the children into the frame so that they look right on the current 7 | # platform. On Windows this means that they are all the same width 8 | # and have a uniform separation. (And currently on Unix it means this 9 | # same thing, though that might change.) 10 | proc standard_button_box {frame {horizontal 1}} { 11 | # This is half the separation we want between the buttons. This 12 | # number comes from the Windows UI "standards" manual. 13 | set half_gap 2 14 | 15 | set width 0 16 | foreach button [winfo children $frame] { 17 | set bw [winfo reqwidth $button] 18 | if {$bw > $width} then { 19 | set width $bw 20 | } 21 | } 22 | 23 | incr width $half_gap 24 | incr width $half_gap 25 | 26 | if {$horizontal} then { 27 | set i 1 28 | } else { 29 | set i 0 30 | } 31 | foreach button [winfo children $frame] { 32 | if {$horizontal} then { 33 | # We set the size via the grid, and not -width on the button. 34 | # Why? Because in Tk -width has different units depending on the 35 | # contents of the button. And worse, the font units don't really 36 | # make sense when dealing with a proportional font. 37 | grid $button -row 0 -column $i -sticky ew \ 38 | -padx $half_gap -pady $half_gap 39 | grid columnconfigure $frame $i -weight 0 -minsize $width 40 | } else { 41 | grid $button -column 0 -row $i -sticky new \ 42 | -padx $half_gap -pady $half_gap 43 | grid rowconfigure $frame $i -weight 0 44 | } 45 | incr i 46 | } 47 | 48 | if {$horizontal} then { 49 | # Make the empty column 0 suck up all the space. 50 | grid columnconfigure $frame 0 -weight 1 51 | } else { 52 | grid columnconfigure $frame 0 -minsize $width 53 | # Make the last row suck up all the space. 54 | incr i -1 55 | grid rowconfigure $frame $i -weight 1 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /libgui/src/tkWarpPointer.c: -------------------------------------------------------------------------------- 1 | 2 | /* ----------------------------------------------------------------------------- 3 | * NAME: 4 | * WarpPointer 5 | * 6 | * SYNOPSIS: int WarpPointer (clientData, interp, objc, objv) 7 | * Implements tcl function: 8 | * warp_pointer win x y 9 | * 10 | * DESC: 11 | * Forces the pointer to a specific location. There is probably 12 | * no good reason to use this except in the testsuite! 13 | * 14 | * ARGS: 15 | * win (objv[1]) - tk window name that coordinates are relative to. 16 | * Use "." for absolute coordinates 17 | * 18 | * x (obvj[2]) - X coordinate 19 | * y (objv[3]) - Y coordinate 20 | * RETURNS: 21 | * 22 | * 23 | * NOTES: 24 | * 25 | * 26 | * ---------------------------------------------------------------------------*/ 27 | #ifdef _WIN32 28 | #include 29 | #include 30 | #endif 31 | 32 | #include "tk.h" 33 | 34 | int 35 | WarpPointer (clientData, interp, objc, objv) 36 | ClientData clientData; 37 | Tcl_Interp *interp; 38 | int objc; 39 | Tcl_Obj *CONST objv[]; 40 | { 41 | Tk_Window tkwin; 42 | int x, y; 43 | 44 | if (objc != 4) { 45 | Tcl_WrongNumArgs(interp, 1, objv, "widgetId x y"); 46 | return TCL_ERROR; 47 | } 48 | 49 | if ((Tcl_GetIntFromObj (interp, objv[2], &x) == TCL_ERROR) || 50 | (Tcl_GetIntFromObj (interp, objv[3], &y) == TCL_ERROR)) 51 | return TCL_ERROR; 52 | 53 | tkwin = Tk_NameToWindow(interp, Tcl_GetStringFromObj(objv[1], NULL), \ 54 | Tk_MainWindow (interp)); 55 | if (tkwin == NULL) 56 | return TCL_ERROR; 57 | 58 | { 59 | #ifdef _WIN32 60 | int wx, wy; 61 | Tk_GetRootCoords (tkwin, &wx, &wy); 62 | SetCursorPos (wx + x, wy + y); 63 | #else 64 | Window win = Tk_WindowId(tkwin); 65 | XWarpPointer(Tk_Display(tkwin), None, win, 0, 0, 0, 0, x, y); 66 | #endif 67 | } 68 | 69 | return TCL_OK; 70 | } 71 | 72 | int 73 | cyg_create_warp_pointer_command (Tcl_Interp *interp) 74 | { 75 | if (!Tcl_CreateObjCommand (interp, "warp_pointer", WarpPointer, NULL, NULL)) 76 | return TCL_ERROR; 77 | return TCL_OK; 78 | } 79 | -------------------------------------------------------------------------------- /libgui/src/tclwingrab.c: -------------------------------------------------------------------------------- 1 | /* tclwingrab.c -- Tcl routines to enable and disable windows on Windows. 2 | Copyright (C) 1997 Cygnus Solutions. 3 | Written by Ian Lance Taylor . 4 | 5 | This file contains routines to enable and disable windows on 6 | Windows. This is used to support grabs on Windows in Tk 8.0. 7 | 8 | The routines in this file are expected to be invoked from 9 | ide_grab_support, which is defined in libide/library/wingrab.tcl. 10 | They are not expected to be invoked directly, so they are not 11 | really documented. */ 12 | 13 | #include "config.h" 14 | 15 | #ifdef TK_PLATFORM_WIN 16 | 17 | #include 18 | 19 | #include 20 | #include 21 | 22 | #include "guitcl.h" 23 | 24 | /* FIXME: We need to dig into the Tk window implementation internals 25 | to convert a Tk window to an HWND. */ 26 | 27 | #include 28 | 29 | /* Enable or disable a window. If the clientdata argument is NULL, we 30 | disable the window. Otherwise we enable the window. This is just 31 | a quick hack; if we ever need to do something else, we can use a 32 | more serious method to distinguish the commands. */ 33 | 34 | static int 35 | wingrab_command (ClientData cd, Tcl_Interp *interp, int objc, 36 | Tcl_Obj *const *objv) 37 | { 38 | long l; 39 | HWND hwnd; 40 | 41 | /* Note that here we understand the return value of wm frame. */ 42 | 43 | if (Tcl_GetLongFromObj (interp, objv[1], &l) != TCL_OK) 44 | return TCL_ERROR; 45 | 46 | hwnd = (HWND) l; 47 | EnableWindow (hwnd, cd != NULL); 48 | 49 | return TCL_OK; 50 | } 51 | 52 | /* Create the ide_grab_support_disable and ide_grab_support_enable 53 | commands. */ 54 | 55 | int 56 | ide_create_win_grab_command (Tcl_Interp *interp) 57 | { 58 | if (Tcl_CreateObjCommand (interp, "ide_grab_support_disable", 59 | wingrab_command, NULL, NULL) == NULL 60 | || Tcl_CreateObjCommand (interp, "ide_grab_support_enable", 61 | wingrab_command, (ClientData) 1, NULL) == NULL) 62 | return TCL_ERROR; 63 | return TCL_OK; 64 | } 65 | 66 | #endif /* TK_PLATFORM_WIN */ 67 | -------------------------------------------------------------------------------- /libgui/doc/tkTable_license.terms: -------------------------------------------------------------------------------- 1 | * COPYRIGHT AND LICENSE TERMS * 2 | 3 | (This file blatantly stolen from Tcl/Tk license and adapted - thus assume 4 | it falls under similar license terms). 5 | 6 | This software is copyrighted by Jeffrey Hobbs . The 7 | following terms apply to all files associated with the software unless 8 | explicitly disclaimed in individual files. 9 | 10 | The authors hereby grant permission to use, copy, modify, distribute, and 11 | license this software and its documentation for any purpose, provided that 12 | existing copyright notices are retained in all copies and that this notice 13 | is included verbatim in any distributions. No written agreement, license, 14 | or royalty fee is required for any of the authorized uses. 15 | 16 | IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR 17 | DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT 18 | OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF, 19 | EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 20 | 21 | THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, 22 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, 23 | FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS 24 | PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO 25 | OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR 26 | MODIFICATIONS. 27 | 28 | RESTRICTED RIGHTS: Use, duplication or disclosure by the U.S. government 29 | is subject to the restrictions as set forth in subparagraph (c) (1) (ii) 30 | of the Rights in Technical Data and Computer Software Clause as DFARS 31 | 252.227-7013 and FAR 52.227-19. 32 | 33 | SPECIAL NOTES: 34 | 35 | This software also falls under the bourbon_ware clause: 36 | 37 | Should you find this software useful in your daily work, you should 38 | feel obliged to take the author out for a drink if the opportunity 39 | presents itself. The user may feel exempt from this clause if they 40 | are under 21 or think the author has already partaken of too many 41 | drinks. 42 | -------------------------------------------------------------------------------- /libgui/src/tclcursor.c: -------------------------------------------------------------------------------- 1 | /* tclcursor.c - Tcl function to compute the size of a cursor. 2 | Copyright (C) 1997 Cygnus Solutions. 3 | Written by Tom Tromey . */ 4 | 5 | /* Interestingly, there is no way to get the size of a cursor in X. 6 | We would have to change Tk to keep track of this information if we 7 | cared about it. Luckily, we only care for Windows. */ 8 | 9 | /* This makes a Tcl command with two subcommands: 10 | 11 | ide_cursor size - Return size of cursor as list {WIDTH HEIGHT} 12 | 13 | ide_cursor position - Return position of cursor as list {X Y} 14 | 15 | */ 16 | 17 | #ifdef _WIN32 18 | 19 | #include 20 | 21 | #include 22 | #include 23 | 24 | #include "guitcl.h" 25 | #include "subcommand.h" 26 | 27 | static int 28 | get_cursor_size (ClientData cd, Tcl_Interp *interp, int argc, CONST84 char *argv[]) 29 | { 30 | char buf[30]; 31 | 32 | sprintf (buf, "%d", GetSystemMetrics (SM_CXCURSOR)); 33 | Tcl_AppendElement (interp, buf); 34 | sprintf (buf, "%d", GetSystemMetrics (SM_CYCURSOR)); 35 | Tcl_AppendElement (interp, buf); 36 | 37 | return TCL_OK; 38 | } 39 | 40 | static int 41 | get_cursor_position (ClientData cd, Tcl_Interp *interp, int argc, CONST84 char *argv[]) 42 | { 43 | POINT where; 44 | char buf[30]; 45 | 46 | if (! GetCursorPos (&where)) 47 | { 48 | Tcl_AppendResult (interp, argv[0], ": couldn't get cursor position", 49 | (char *) NULL); 50 | return TCL_ERROR; 51 | } 52 | 53 | sprintf (buf, "%ld", where.x); 54 | Tcl_AppendElement (interp, buf); 55 | sprintf (buf, "%ld", where.y); 56 | Tcl_AppendElement (interp, buf); 57 | 58 | return TCL_OK; 59 | } 60 | 61 | static const struct ide_subcommand_table cursor_commands[] = 62 | { 63 | { "size", get_cursor_size, 2, 2 }, 64 | { "position", get_cursor_position, 2, 2 }, 65 | { NULL, NULL, 0, 0 } 66 | }; 67 | 68 | int 69 | ide_create_cursor_command (Tcl_Interp *interp) 70 | { 71 | return ide_create_command_with_subcommands (interp, "ide_cursor", 72 | cursor_commands, 73 | (ClientData) NULL, 74 | NULL); 75 | } 76 | 77 | #endif /* _WIN32 */ 78 | -------------------------------------------------------------------------------- /gdbtk/library/managedwin.ith: -------------------------------------------------------------------------------- 1 | # Managed window class definition for GDBtk. 2 | # Copyright (C) 1998, 1999, 2000, 2001 Red Hat, Inc. 3 | # 4 | # This program is free software; you can redistribute it and/or modify it 5 | # under the terms of the GNU General Public License (GPL) as published by 6 | # the Free Software Foundation; either version 2 of the License, or (at 7 | # your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | 14 | 15 | itcl::class ManagedWin { 16 | inherit itk::Widget 17 | 18 | public { 19 | method constructor {args} 20 | method destructor {} 21 | 22 | method reconfig {} {} 23 | method destroy_toplevel {} 24 | method quit_if_last {} {return 1} 25 | method pickle {} 26 | method reveal {} 27 | method window_name {wname {iname ""}} 28 | proc window_instance {ins} 29 | 30 | proc find {win} 31 | proc open {class args} 32 | proc open_dlg {class args} 33 | proc init {} 34 | proc restart {} 35 | proc startup {} 36 | proc shutdown {} 37 | 38 | common win_instance "" 39 | } 40 | 41 | protected { 42 | # The Tk's toplevel window for this ManagedWin 43 | variable _top 44 | 45 | # Variable which holds the geometry of this window 46 | variable _geometry {} 47 | 48 | # this is the counter of TopLevelWins open 49 | # when it hits 0, exit. 50 | common numTopWins 0 51 | 52 | common _screenwidth 53 | common _screenheight 54 | 55 | method _freeze_me {} 56 | method _thaw_me {} 57 | 58 | # Should this window be reopened when we startup? 59 | method _ignore_on_save {} { return 0 } 60 | 61 | # Should this window's size be remembered? 62 | proc dont_remember_size {} { return 0 } 63 | } 64 | 65 | private { 66 | proc _create {class args} 67 | proc _open {class args} 68 | proc _make_icon_window {name {file "gdbtk_icon"}} 69 | variable _wname {} 70 | variable _iname {} 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /libgui/src/tclmapi.c: -------------------------------------------------------------------------------- 1 | /* tclmapi.c - Tcl interface to MAPI. 2 | Copyright (C) 1997 Cygnus Solutions 3 | Written by Tom Tromey . */ 4 | 5 | #ifdef _WIN32 6 | 7 | #include 8 | #include 9 | 10 | #include 11 | #include 12 | 13 | #include "guitcl.h" 14 | #include "subcommand.h" 15 | 16 | /* Usage for the mapi command: 17 | mapi simple-send TO-ADDRESS SUBJECT TEXT. 18 | 19 | This command has been deliberately kept very simple; it only does 20 | what we need. However it can be extended by adding new subcommands 21 | if necessary. */ 22 | 23 | static int 24 | mapi_command (ClientData cd, Tcl_Interp *interp, int argc, char *argv[]) 25 | { 26 | MapiMessage message; 27 | MapiRecipDesc to; 28 | ULONG result; 29 | 30 | message.ulReserved = 0; 31 | message.lpszSubject = argv[3]; 32 | message.lpszNoteText = argv[4]; 33 | message.lpszMessageType = NULL; 34 | message.lpszDateReceived = NULL; 35 | message.lpszConversationID = NULL; 36 | message.flFlags = 0; 37 | message.lpOriginator = NULL; 38 | message.nRecipCount = 1; 39 | message.lpRecips = &to; 40 | message.nFileCount = 0; 41 | message.lpFiles = NULL; 42 | 43 | to.ulReserved = 0; 44 | to.ulRecipClass = MAPI_TO; 45 | to.lpszName = ""; 46 | /* FIXME: smtp:address? */ 47 | to.lpszAddress = argv[2]; 48 | to.ulEIDSize = 0; 49 | to.lpEntryID = NULL; 50 | 51 | result = MAPISendMail (0, 0, &message, MAPI_LOGON_UI, 0); 52 | if (result != SUCCESS_SUCCESS) 53 | { 54 | /* We could decode the error here. */ 55 | char buf[20]; 56 | 57 | sprintf (buf, "0x%lx", result); 58 | Tcl_AppendResult (interp, argv[0], ": failed with status ", 59 | buf, (char *) NULL); 60 | return TCL_ERROR; 61 | } 62 | 63 | return TCL_OK; 64 | } 65 | 66 | static const struct ide_subcommand_table mapi_table[] = 67 | { 68 | { "simple-send", mapi_command, 5, 5 }, 69 | { NULL, NULL, 0, 0 } 70 | }; 71 | 72 | int 73 | ide_create_mapi_command (Tcl_Interp *interp) 74 | { 75 | return ide_create_command_with_subcommands (interp, "ide_mapi", 76 | mapi_table, NULL, NULL); 77 | } 78 | 79 | #endif /* _WIN32 */ 80 | -------------------------------------------------------------------------------- /libgui/src/tclwinmode.c: -------------------------------------------------------------------------------- 1 | /* tclwinmode.c - Tcl access to SetErrorMode function. 2 | Copyright (C) 1998 Cygnus Solutions. 3 | Written by Tom Tromey . */ 4 | 5 | #include 6 | #include "guitcl.h" 7 | 8 | #ifdef __CYGWIN32__ 9 | 10 | #include 11 | 12 | struct pair 13 | { 14 | const char *name; 15 | UINT value; 16 | }; 17 | 18 | static struct pair values[] = 19 | { 20 | { "failcriticalerrors", SEM_FAILCRITICALERRORS }, 21 | { "noalignmentfaultexcept", SEM_NOALIGNMENTFAULTEXCEPT }, 22 | { "nogpfaulterrorbox", SEM_NOGPFAULTERRORBOX }, 23 | { "noopenfileerrorbox", SEM_NOOPENFILEERRORBOX }, 24 | { NULL, 0 } 25 | }; 26 | 27 | #endif 28 | 29 | static int 30 | seterrormode_command (ClientData cd, Tcl_Interp *interp, 31 | int argc, CONST84 char *argv[]) 32 | { 33 | #ifdef __CYGWIN32__ 34 | int len, i; 35 | char **list; 36 | UINT val = 0; 37 | 38 | if (argc != 2) 39 | { 40 | Tcl_AppendResult (interp, "wrong # args: should be \"", 41 | argv[0], " modelist\"", (char *) NULL); 42 | return TCL_ERROR; 43 | } 44 | 45 | if (Tcl_SplitList (interp, argv[1], &len, &list) != TCL_OK) 46 | return TCL_ERROR; 47 | 48 | for (i = 0; i < len; ++i) 49 | { 50 | int j, found = 0; 51 | for (j = 0; values[j].name; ++j) 52 | { 53 | if (! strcmp (values[j].name, list[i])) 54 | { 55 | found = 1; 56 | val |= values[j].value; 57 | break; 58 | } 59 | } 60 | if (! found) 61 | { 62 | Tcl_AppendResult (interp, "unrecognized key \"", list[i], 63 | "\"", (char *) NULL); 64 | ckfree ((char *) list); 65 | return TCL_ERROR; 66 | } 67 | } 68 | ckfree ((char *) list); 69 | 70 | val = SetErrorMode (val); 71 | 72 | for (i = 0; values[i].name; ++i) 73 | { 74 | if (val & values[i].value) 75 | Tcl_AppendElement (interp, values[i].name); 76 | } 77 | #endif /* __CYGWIN32__ */ 78 | 79 | return TCL_OK; 80 | } 81 | 82 | int 83 | ide_create_set_error_mode_command (Tcl_Interp *interp) 84 | { 85 | if (Tcl_CreateCommand (interp, "ide_set_error_mode", 86 | seterrormode_command, NULL, NULL) == NULL) 87 | return TCL_ERROR; 88 | return TCL_OK; 89 | } 90 | -------------------------------------------------------------------------------- /gdbtk/library/vartree.ith: -------------------------------------------------------------------------------- 1 | # Variable tree class definition for Insight. 2 | # Copyright (C) 2002 Red Hat, Inc. 3 | # 4 | # This program is free software; you can redistribute it and/or modify it 5 | # under the terms of the GNU General Public License (GPL) as published by 6 | # the Free Software Foundation; either version 2 of the License, or (at 7 | # your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | 14 | itcl::class VarTree { 15 | inherit itk::Widget 16 | 17 | public variable type "watch" 18 | 19 | private { 20 | # list of root variables in tree 21 | variable rootlist {} 22 | 23 | # mapping of varobj to canvas items 24 | variable var_to_items 25 | variable item_to_var 26 | 27 | variable c ;#the canvas 28 | variable pop ;#popup menu 29 | variable _y 0 30 | variable selection 31 | variable selidx 32 | variable closed 33 | 34 | variable popup_temp 35 | 36 | # when editing, these contain the entry widget and edited varobj 37 | variable entry "" 38 | variable entryobj 39 | variable entrywin 40 | } 41 | 42 | common maskdata 43 | common data 44 | common openbm 45 | common closedbm 46 | common initialized 0 47 | common colors 48 | 49 | private { 50 | method _init_data {} 51 | method build {} 52 | method buildlayer {tlist n} 53 | method drawselection {} 54 | method clicked {w x y open} 55 | method setselection {var} 56 | method closed {name} 57 | method open {name} 58 | method close {name} 59 | method edit {j} 60 | method unedit {j} 61 | method changeValue {j} 62 | method update_var {var ena check} 63 | method _but3 {x y X Y} 64 | method _change_format {var} 65 | method _do_default_menu {X Y} 66 | method _sort {} 67 | method _compare {a b} 68 | } 69 | 70 | public { 71 | method constructor {args} 72 | method destructor {} 73 | method add {varobj} 74 | method remove {varobj} 75 | method update {{check 0}} 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /gdbtk/ChangeLog-2007: -------------------------------------------------------------------------------- 1 | 2007-07-02 Markus Deuling 2 | 3 | * gdbtk/generic/gdbtk-stack.c (get_frame_name): Remove dead code 4 | (PC_LOAD_SEGMENT). 5 | 6 | 2007-06-27 Keith Seitz 7 | 8 | * generic/gdbtk-register.c (Gdbtk_Register_Init): Remove 9 | calls to deprecated_register_gdbarch_swap. 10 | Add "gdb_reg_arch_changed" command. 11 | * library/regwin.itb (arch_changed): Call gdb_reg_arch_changed. 12 | 13 | 2007-06-21 Maciej W. Rozycki 14 | 15 | * generic/gdbtk-cmds.c (gdbtk_load_asm): Update the call to 16 | gdb_print_insn(). 17 | 18 | 2007-06-09 Keith Seitz 19 | 20 | * generic/gdbtk-register.c get_register): Replace REGISTER_NAME 21 | with gdbarch_register_name. 22 | (get_register_name): Ditto. 23 | (map_arg_registers): Ditto. 24 | 25 | 2007-06-04 Keith Seitz 26 | 27 | * generic/gdbtk-cmds.c (hex2bin): Use gdbarch_byte_order instead 28 | of TARGET_BYTE_ORDER. 29 | * generic/gdbtk-register.c (get_register): Likewise. 30 | (map_arg_registers): Use gdbarch_num_regs and gdbarch_num_pseduo_regs 31 | instead of NUM_REGS and NUM_PSEUDO_REGS. 32 | (setup_architecture_data): Likewise. 33 | (gdb_regformat): Likewise. 34 | (gdb_reggroup): Likewise. 35 | 36 | 2007-05-22 Chris Dearman 37 | 38 | * generic/gdbtk-stack.c (get_frame_name): Remove spurious 39 | newlines from dummy/sigtramp frame names. 40 | 41 | 2007-04-27 Maciej W. Rozycki 42 | 43 | * generic/gdbtk-wrapper.c (GDB_varobj_update): New function. 44 | (wrap_varobj_update): Likewise. 45 | * generic/gdbtk-wrapper.h (GDB_varobj_update): New declaration. 46 | * generic/gdbtk-varobj.c (variable_update): Call 47 | GDB_varobj_update() rather than varobj_update() directly. Take 48 | the new semantics of the latter into account. 49 | * generic/gdbtk-cmds.c: Include "varobj.h". 50 | * generic/gdbtk-stack.c: Likewise. 51 | 52 | 2007-03-13 Kevin Buettner 53 | 54 | * generic/gdbtk-cmds.c (gdb_loc): Eliminate use of 55 | `deprecated_selected_frame'. 56 | * generic/gdbtk-register.c (register_changed_p): Likewise. 57 | * generic/gdbtk-stack.c (gdb_block_vars, gdb_get_blocks) 58 | (gdb_get_vars_command, gdb_selected_block, gdb_selected_frame): 59 | Likewise. 60 | 61 | -------------------------------------------------------------------------------- /gdbtk/library/help/trace/console.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Console Window Help 4 | 5 | 6 |

    The Console Window

    7 |

    Overview

    8 |

    The Console Window is perhaps the most powerful tool in the debugger. It 9 | provides functionality equivalent to almost all of the debugger's secondary 10 | windows, macro definitions, and other more advanced features.

    11 | 12 |

    Console Window topics: 13 |

    19 | 20 |

    Console Display

    21 | The Console Display is simply a scrolled window in which the debugger prompt 22 | appears. By default, the prompt is set to "(gdb) ", but it may be changed via a 23 | command line option. 24 | 25 |

    To execute commands in the console window, simply enter 26 | the command in the display. If the debugger is busy, the message "Error: The 27 | debugger is busy." appears informing the user that the command was not accepted.

    28 | 29 |

    Whenever a command is executed, the debugger's windows will update to display 30 | any new state information. Any output from the command is also echoed to the Console 31 | Window for ease of use. If an error occurs, an error message is printed to the Console 32 | Window. All error messages appear in the Console Window using a red colored typeface. 33 |

    34 | 35 |

    The Console Window responds to special character commands just as a shell window 36 | does: it has a history mechanism which allows the user to scan previously used commands 37 | by pressing the up and down arrow keys on the keyboard, jumping to the beginning or 38 | end of a line by entering Ctrl-A or Ctrl-E, erasing a line by pressing Ctrl-K, and 39 | more. Users familiar with GNU Emacs will recognize these keys as commonly used 40 | keystrokes from that editor.

    41 | 42 |

    Getting Help

    43 | The Console Window has its own online help system. To access the help system, enter 44 | "help" at the prompt and follow the on-screen instructions. For more help, please 45 | consult the GDB User's Guide. 46 | 47 | 48 | -------------------------------------------------------------------------------- /testsuite/gdb.gdbtk/srcwin.exp: -------------------------------------------------------------------------------- 1 | # Copyright 1999, 2001 Red Hat, Inc. 2 | # 3 | # This program is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU General Public License (GPL) as published by 5 | # the Free Software Foundation; either version 2 of the License, or (at 6 | # your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | 13 | load_lib ../gdb.gdbtk/insight-support.exp 14 | 15 | if {[gdbtk_initialize_display]} { 16 | if {$tracelevel} { 17 | strace $tracelevel 18 | } 19 | 20 | # 21 | # test source window 22 | # 23 | 24 | set testfile "list" 25 | set s1 "$srcdir/$subdir/list0.c" 26 | set sources "$s1 $srcdir/$subdir/list1.c" 27 | set binfile $objdir/$subdir/$testfile 28 | if {[file exists $s1.save]} { 29 | catch {file delete $s1} 30 | file rename $s1.save $s1 31 | } 32 | set r [gdb_compile $sources "$binfile" executable debug] 33 | if { $r != "" } { 34 | gdb_suppress_entire_file \ 35 | "Testcase compile failed, so some tests in this file will automatically fail." 36 | } 37 | 38 | # Start with a fresh gdbtk 39 | gdb_exit 40 | set results [gdbtk_start [file join $srcdir $subdir srcwin.test]] 41 | set results [split $results \n] 42 | set all_results $results 43 | 44 | # move file with "main" out of the way 45 | file rename $s1 $s1.save 46 | 47 | # run slightly different set of tests 48 | gdb_exit 49 | set results [gdbtk_start [file join $srcdir $subdir srcwin2.test]] 50 | set results [split $results \n] 51 | set all_results [concat $all_results $results] 52 | 53 | # restore file 54 | file rename $s1.save $s1 55 | 56 | set r [gdb_compile $sources "$binfile" executable ""] 57 | if { $r != "" } { 58 | gdb_suppress_entire_file \ 59 | "Testcase compile failed, so some tests in this file will automatically fail." 60 | } 61 | # run slightly different set of tests 62 | gdb_exit 63 | set results [gdbtk_start [file join $srcdir $subdir srcwin3.test]] 64 | set results [split $results \n] 65 | set all_results [concat $all_results $results] 66 | 67 | # Analyze results 68 | gdbtk_done $all_results 69 | } 70 | -------------------------------------------------------------------------------- /gdbtk/library/help/locals.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Local Variables Help 4 | 5 | 6 |

    The Local Variables Window

    7 |

    Overview

    8 |

    The Local Variables Window displays all local variables in scope. It may be used to 9 | visualize and edit local variables. To open the Local Variables window, click on 10 | small house icon on the toolbar, or select "Local Variables" under the View 11 | pulldown menu.

    12 | 13 |

    Locals Display

    14 | 15 |

    Pointers, structures, and classes appear in the display with small expansion 16 | box before their names. To dereference pointers or 17 | view the members of classes or structures, click 18 | the closed expansion box (which appears as a small plus sign, "+") to "expand" 19 | the listing. The expansion box changes to a minus sign, "-", indicating that the 20 | display is now open. Pointers, structures and classes may be expanded recursively 21 | to allow multiple pointer dereferences and embedded structure viewing.

    22 | 23 |

    The Locals Display updates after every execution of the program and highlights 24 | in green those variables whose values have changed.

    25 | 26 |

    The Locals Window will, by default, display all pointers in hexadecimal and all 27 | other variables in decimal. To change the display format for a variable, select 28 | the Format option from the popup-menu.

    29 | 30 |

    Editing a Variable

    31 |

    To edit a variable, either double-click the left mouse button on the value of the variable in 32 | the display or select the Edit option from the pop-up menu. To abort editing a variable's value, 33 | simply press the escape key on the keyboard. The variable's original value is restored.

    34 | 35 |

    Local Variable Pop-up Menu

    36 |

    The pop-up menu provides quick access to the functions of the Local Variables Window. 37 | To use the pop-up menu, click the right mouse button while over a variable.

    38 |
    39 |
    Format
    Change the display format of the variable.
    40 |
    Edit
    Edit the variable's value.
    41 |
    Delete
    Remove the variable from the display.
    42 |
    Dump Memory
    Open a Memory Window with the variable's value as an aaddress.
    43 |
    Help
    Open this help page.
    44 |
    Close
    Close the Local Variables Window.
    45 |
    46 | 47 | 48 | -------------------------------------------------------------------------------- /gdbtk/library/help/register.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Register Window Help 4 | 5 | 6 |

    The Register Window

    7 |

    The Register Window lists registers and their contents for 8 | the selected stack frame. It permits viewing the contents of registers 9 | in different formats, editing register values, and some display 10 | customizations.

    11 | 12 | register window 13 | 14 |

    In the image above, you can see all the registers on the left and their values on the right. 15 | At the top is an option menu to allow you to choose what group of registers to display. 16 | The groups names are preset according to the architecture being debugged. The default is "all". 17 | Registers highlighted in green have recently changed. 18 |

    19 |

    The Register Window will update the register contents in the display 20 | to match the stack frame currently being viewed in the 21 | Source Window and Stack Window.

    22 |

    Each time the program stops, the register window will automatically update. 23 | Registers that have changed since the last stop will be displayed in green.

    24 | 25 | 26 | 27 |

    The Register Pop-up Menu

    28 | register popup menu 29 |

    30 | To activate the pop-up menu, click the right mouse button over a register. 31 | This will allow you change the way the register is displayed, or to remove 32 | it from the display. Or you can add the register to the watch window. 33 | For integer registers, you can also open a memory window at the 34 | location pointed to by the register.

    35 | 36 |

    Editing a Register

    37 |

    38 | To edit a register, simply click on it with the left mouse button. Type 39 | in the new value and hit enter. You can enter a decimal, hex, or float number and 40 | the type will be converted if possible. You may also enter an expression to be evaluated. 41 | For example, to set $r3 to the same as $r4, edit $r3 and enter "$r4" as the value. In the same 42 | way, you can set $pc to "main". 43 | The value of the register is set to the current value of the expression; it will not be reevaluated 44 | if the expression's value later changes. 45 |

    46 |

    Press the escape key on the keyboard to cancel your edit.

    47 | 48 | 49 | -------------------------------------------------------------------------------- /gdbtk/library/help/stack.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Stack Window Help 4 | 5 | 6 | 7 |
    8 |

    The Stack Window

    9 |
    10 | 11 | 12 |
    The Stack Window allows users to view the call stack and jump between 13 | levels of the stack. 14 | 15 | 20 | 21 |

    Stack Display

    22 | The Stack Display consists of a listbox which displays levels of the call stack 23 | on per line. Each line contains the level number (useful when using the 24 | Console Window) and a description of the function executing 25 | in that level. Typically, the function name and either the address of the function 26 | or the file and line number where the function is defined are displayed. The 27 | Stack Window may also be used to jump between levels of the stack. 28 |
    29 | 30 |

    Navigating the Stack Window

    31 | Navigation of the Stack Window is accomplished by clicking on the desired level 32 | with the left mouse button. The Source Window 33 | Display updates to show the selected frame. All other secondary windows, 34 | Registers, Watch, and 35 | Locals update their displays for the selected frame. 36 |
    37 | 38 |

    Changing Stack Levels

    39 | To switch frames, simply click the left mouse button on the desired frame and the 40 | debugger will switch contexts, updating all windows. The selected frame is highlighted 41 | (in gold, by default). 42 | 43 |

    As an alternative, changing stack levels may be accomplished via the 44 | Frame Control Buttons on the Source Window's 45 | Toolbar. These buttons may be used to change frames one level at a time (either 46 | immediately up or immediately down) or to jump to the bottom-most stack frame. 47 | See Source Frame Control Buttons for more 48 | information.

    49 | 50 | 51 | -------------------------------------------------------------------------------- /libgui/library/looknfeel.tcl: -------------------------------------------------------------------------------- 1 | # looknfeel.tcl - Standard look and feel decisions. 2 | # Copyright (C) 1997-2012 Red Hat, Inc. 3 | # Written by Tom Tromey . 4 | 5 | # Run this once just after Tk is initialized. It will do whatever 6 | # setup is required to make the application conform to our look and 7 | # feel. 8 | proc standard_look_and_feel {} { 9 | global tcl_platform 10 | 11 | # FIXME: this is really gross: we know how tk_dialog chooses its 12 | # -wraplength, and we make it bigger. Instead we should make our 13 | # own dialog function. 14 | option add *Dialog.msg.wrapLength 0 startupFile 15 | 16 | # We don't ever want tearoffs. 17 | option add *Menu.tearOff 0 startupFile 18 | 19 | # The default font should be used by default. 20 | # The bold font is like the default font, but is bold; use it for 21 | # emphasis. 22 | # The fixed font is guaranteed not to be proportional. 23 | # The status font should be used in status bars and tooltips. 24 | if {$tcl_platform(platform) == "windows"} then { 25 | define_font global/default -family "Tahoma" -size 10 26 | # FIXME: this isn't actually a bold font... 27 | define_font global/bold -family windows-caption 28 | define_font global/fixed -family "Lucida Console" -size 9 29 | define_font global/status -family "Tahoma" -size 10 30 | # FIXME: we'd like this font to update automatically as well. But 31 | # for now we can't. 32 | array set actual [font actual windows-message] 33 | set actual(-slant) italic 34 | eval define_font global/italic [array get actual] 35 | 36 | # The menu font used to be set via the "windows-menu" 37 | # font family, however this seems to have been deprecated 38 | # for Tcl/Tk version 8.3, so we hard code it instead. 39 | define_font global/menu -family {MS Sans Serif} -size 8 40 | } else { 41 | set size 12 42 | define_font global/default -family courier -size $size 43 | define_font global/bold -family courier -size $size -weight bold 44 | define_font global/fixed -family courier -size $size 45 | define_font global/status -family helvetica -size [expr $size - 1] 46 | define_font global/italic -family courier -size $size -slant italic 47 | define_font global/menu -family helvetica -size $size 48 | } 49 | 50 | # Make sure this font is actually used by default. 51 | option add *Font global/default 52 | option add *Menu.Font global/menu 53 | } 54 | -------------------------------------------------------------------------------- /gdbtk/library/browserwin.ith: -------------------------------------------------------------------------------- 1 | # Browser window class definition for Insight. 2 | # Copyright (C) 1998, 1999, 2003 Red Hat, Inc. 3 | # 4 | # This program is free software; you can redistribute it and/or modify it 5 | # under the terms of the GNU General Public License (GPL) as published by 6 | # the Free Software Foundation; either version 2 of the License, or (at 7 | # your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | 14 | itcl::class BrowserWin { 15 | inherit EmbeddedWin 16 | 17 | public { 18 | method constructor {args} 19 | method destructor {} 20 | method mode {w {mode ""} {go 1}} 21 | method search {} 22 | method test_get {var} 23 | method do_all_bp {onp} 24 | 25 | } 26 | 27 | private { 28 | method _build_win {} 29 | method _file_hide_h {} 30 | method _fill_file_box {} 31 | method _fill_funcs_combo {name} 32 | method _fill_source {f {funcp 1} {filename ""}} 33 | method _filter_trace_proc {v1 v2 mode} 34 | method _filter_trace_after {} 35 | method _goto_func {w {val ""}} 36 | method _process_file_selection {y} 37 | method _process_func_selection {y} 38 | method _search_src {direction} 39 | method _select {highlight} 40 | method _set_filter_mode {w mode} 41 | method _toggle_bp {y} 42 | method _build_filter_frame {parent} 43 | method _build_file_frame {parent} 44 | method _build_function_frame {parent} 45 | method _build_view_frame {parent} 46 | method _switch_layout 47 | 48 | variable cur_filter_mode 49 | variable Current; 50 | variable labelUpdateCode "" 51 | variable index_to_file 52 | variable _mangled_func 53 | variable filter_trace_after "" 54 | variable _layout 55 | 56 | common componentToRow 57 | array set componentToRow { 58 | filter 0 59 | browser 1 60 | view 2 61 | view_hidden 3 62 | } 63 | 64 | common filter_modes [list "starts with" \ 65 | "contains" \ 66 | "ends with" \ 67 | "matches regexp"] 68 | common filter_regexp 69 | array set filter_regexp { 70 | "starts with" ^%s 71 | "contains" %s 72 | "ends with" %s$ 73 | "matches regexp" %s 74 | } 75 | } 76 | } 77 | 78 | -------------------------------------------------------------------------------- /gdbtk/library/memwin.ith: -------------------------------------------------------------------------------- 1 | # Memory display window class definition for Insight. 2 | # Copyright (C) 1998, 1999, 2001, 2002 Red Hat, Inc. 3 | # 4 | # This program is free software; you can redistribute it and/or modify it 5 | # under the terms of the GNU General Public License (GPL) as published by 6 | # the Free Software Foundation; either version 2 of the License, or (at 7 | # your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | 14 | 15 | itcl::class MemWin { 16 | inherit EmbeddedWin GDBWin 17 | 18 | private { 19 | variable saved_addr "" 20 | variable bad_expr 0 21 | variable current_addr "" 22 | variable dont_size 0 23 | variable mbar 1 24 | variable bg 25 | variable top 26 | variable nb 128 27 | variable prefs_win "" 28 | variable Running 0 29 | variable Numrows 0 30 | variable Numcols 0 31 | variable saved_value 32 | variable maxlen 33 | variable maxalen 34 | variable rheight "" 35 | variable new_entry 0 36 | 37 | method build_win {} 38 | method init_addr_exp {} 39 | method cursor {glyph} 40 | method _update_address {make_busy} 41 | } 42 | 43 | public { 44 | variable addr_exp "" 45 | variable size 4 46 | variable format x 47 | variable bytes_per_row 16 48 | variable numbytes 0 49 | variable ascii 1 50 | variable ascii_char "." 51 | variable color green 52 | } 53 | 54 | protected common type 55 | 56 | public { 57 | method constructor {args} 58 | method destructor {} 59 | method paste {x y} 60 | method validate {val} 61 | method create_prefs {} 62 | method changed_cell {from to} 63 | method edit {cell} 64 | method toggle_enabled {} 65 | method newsize {height} 66 | method update_address_cb {} 67 | method update_address {addr_exp} 68 | method BadExpr {errTxt} 69 | method incr_addr {num} 70 | method update_addr 71 | method hidemb {} 72 | method reconfig {} 73 | method do_popup {x y} 74 | method goto {addr} 75 | method memMoveCell {w x y} 76 | method error_dialog {msg {modality task} {type ok}} 77 | 78 | # 79 | # GDB Events 80 | # 81 | method busy {event} 82 | method idle {event} 83 | method update {event} 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /gdbtk/generic/gdbtk-cmds.h: -------------------------------------------------------------------------------- 1 | /* Tcl/Tk command interface for Insight 2 | Copyright (C) 2001 Free Software Foundation, Inc. 3 | 4 | This file is part of GDB. 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 | Boston, MA 02110-1301, USA. */ 20 | 21 | #if !defined(GDBTK_CMDS_H) 22 | #define GDBTK_CMDS_H 1 23 | 24 | /* This structure filled in gdbtk_call_wrapper and passed to 25 | the wrapped call function. 26 | It stores the command pointer and arguments 27 | run in the wrapper function. */ 28 | struct wrapped_call_args 29 | { 30 | Tcl_Interp *interp; 31 | Tcl_ObjCmdProc *func; 32 | int objc; 33 | Tcl_Obj *CONST * objv; 34 | int val; 35 | }; 36 | 37 | /* A generic call-wrapper to catch longjmps when calling C commands from 38 | tcl. ALL tcl commands should be wrapped in this call. */ 39 | extern int gdbtk_call_wrapper (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]); 40 | 41 | /* Returns the source (demangled) name for a function at PC. Returns empty string 42 | if not found. Memory is owned by gdb. Do not free it. */ 43 | extern const char *pc_function_name (CORE_ADDR pc); 44 | 45 | /* Convenience function to sprintf something(s) into a new element in 46 | a Tcl list object. */ 47 | extern void sprintf_append_element_to_obj (Tcl_Obj * objp, char *format, ...); 48 | 49 | /* printf-like function to return error messages */ 50 | extern void gdbtk_set_result (Tcl_Interp *interp, const char *fmt,...); 51 | 52 | /* Module init routines: Each module of commands should be declared here. */ 53 | extern int Gdbtk_Breakpoint_Init (Tcl_Interp *interp); 54 | extern int Gdbtk_Stack_Init (Tcl_Interp *interp); 55 | extern int Gdbtk_Register_Init (Tcl_Interp *interp); 56 | 57 | /* replacement for removed gdb function */ 58 | const char *symtab_to_filename (struct symtab *s); 59 | 60 | #endif /* GDBTK_CMDS_H */ 61 | -------------------------------------------------------------------------------- /gdbtk/library/help/trace/stack.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Stack Window Help 4 | 5 | 6 |

    The Stack Window

    7 |

    Overview

    8 |

    The Stack Window allows users to view the call stack and jump between 9 | levels of the stack. To use the Stack Window in tracepoint mode, the 10 | stack pointer must be collected. See 11 | Adding an Action in the Tracepoint 12 | Dialog for more information on collecting registers.

    13 | 14 |

    Stack Window topics: 15 |

    21 | 22 |

    Stack Display

    23 | The Stack Display consists of a listbox which displays levels of the call stack 24 | one per line. Each line contains the level number (useful when using the Console Window) and a description of the function executing 26 | in that level. Typically, the function name and either the address of the function 27 | or the file and line number where the function is defined are displayed. The 28 | Stack Window may also be used to jump between levels of the stack. 29 |
    30 | 31 |

    Navigating the Stack Window

    32 | Navigation of the Stack Window is accomplished by clicking on the desired level 33 | with the left mouse button. The Source Window 34 | Display updates to show the selected frame. All other secondary windows, 35 | Registers, Watch, and 36 | Locals update their displays for the selected frame. 37 |
    38 | 39 |

    Changing Stack Levels

    40 | To switch frames, simply click the left mouse button on the desired frame and the 41 | debugger will switch contexts, updating all windows. The selected frame is highlighted 42 | (in gold, by default). 43 | 44 |

    As an alternative, changing stack levels may be accomplished via the 45 | Frame Control Buttons on the Source Window's 46 | Toolbar. These buttons may be used to change frames one level at a time (either 47 | immediately up or immediately down) or to jump to the bottom-most stack frame. 48 | See Source Frame Control Buttons for more 49 | information.

    50 | 51 | 52 | -------------------------------------------------------------------------------- /gdbtk/library/console.ith: -------------------------------------------------------------------------------- 1 | # Console window class definition for GDBtk. 2 | # Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. 3 | # 4 | # This program is free software; you can redistribute it and/or modify it 5 | # under the terms of the GNU General Public License (GPL) as published by 6 | # the Free Software Foundation; either version 2 of the License, or (at 7 | # your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | 14 | 15 | # ---------------------------------------------------------------------- 16 | # Implements a console display widget using primitive widgets as the building 17 | # blocks. 18 | # ---------------------------------------------------------------------- 19 | 20 | itcl::class Console { 21 | inherit EmbeddedWin GDBEventHandler 22 | 23 | public { 24 | #Approximate maximum number of lines allowed in widget 25 | variable throttle 2000 26 | 27 | method constructor {args} 28 | method destructor {} 29 | method insert {line {tag ""}} 30 | method invoke {{controld 0}} 31 | method _insertion {args} 32 | method activate {{prompt {}}} 33 | method test {args} 34 | method gets {} 35 | 36 | # 37 | # GDB Events 38 | # 39 | method busy {event} 40 | method idle {event} 41 | } 42 | 43 | private { 44 | variable _twin 45 | variable _invoking 0 46 | variable _needNL 1 47 | variable _history {} 48 | variable _histElement -1 49 | variable _partialCommand "" 50 | variable _saved_insertion "" 51 | variable _running 0 52 | variable _saw_tab 0 53 | variable _pendingHistElement -1 54 | variable _input_mode 0 55 | variable _input_result "" 56 | variable _input_error 0 57 | 58 | method _build_win {} 59 | method _cancel {} 60 | method _complete {} 61 | method _delete {{left 0}} 62 | method _find_completion {cmd completions} 63 | method _find_lcp {slist} 64 | method _first {} 65 | method _last {} 66 | method _next {} 67 | method _operate_and_get_next {} 68 | method _paste {{check_primary 1}} 69 | method _previous {} 70 | method _reset_tab {} 71 | method _search_history {} 72 | method _rsearch_history {} 73 | method _setprompt {{prompt {}}} 74 | method _set_wrap {wrap} 75 | method _update_option {name value} 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /libgui/acinclude.m4: -------------------------------------------------------------------------------- 1 | sinclude(../config/tcl.m4) 2 | 3 | dnl Find the location of the private Tcl headers 4 | dnl This is TCL_INCLUDE_SPEC/tcl-private/generic or TCL_SRC_DIR/generic. 5 | dnl As a side effect, determine the TCL platform. 6 | dnl 7 | dnl Note: you must use first use SC_LOAD_TCLCONFIG! 8 | AC_DEFUN([CY_AC_TCL_PRIVATE_HEADERS], [ 9 | AC_MSG_CHECKING([for Tcl private headers]) 10 | private_dir="" 11 | for dir in "${TCL_INCLUDE_SPEC}/tcl-private" "${TCL_SRC_DIR}"; do 12 | dir=`echo "${dir}/generic" | sed -e s/-I//` 13 | if test -f "${dir}/tclInt.h"; then 14 | private_dir="${dir}" 15 | break 16 | fi 17 | done 18 | 19 | if test x"${private_dir}" = x; then 20 | AC_ERROR(could not find private Tcl headers) 21 | else 22 | TCL_PRIVATE_INCLUDE="-I${private_dir}" 23 | AC_MSG_RESULT(${private_dir}) 24 | TCL_PLATFORM=unknown 25 | dir="`dirname \"${private_dir}\"`" 26 | for platform in Unix Win MacOSX; do 27 | # FIXME: actually, MacOSX is not detected. How to do it ? 28 | pf="`echo \"${platform}\" | tr 'A-Z' 'a-z'`" 29 | if test -f "${dir}/generic/tcl${platform}Port.h"; then 30 | TCL_PLATFORM="${pf}" 31 | break 32 | elif test -f "${dir}/${pf}/tcl${platform}Port.h"; then 33 | TCL_PLATFORM="${pf}" 34 | TCL_PRIVATE_INCLUDE="${TCL_PRIVATE_INCLUDE} -I${dir}/${pf}" 35 | break 36 | fi 37 | done 38 | fi 39 | ]) 40 | 41 | dnl Find the location of the private Tk headers 42 | dnl This is TK_INCLUDE_SPEC/tk-private/generic or TK_SRC_DIR/generic. 43 | dnl 44 | dnl Note: you must first use SC_LOAD_TKCONFIG 45 | AC_DEFUN([CY_AC_TK_PRIVATE_HEADERS], [ 46 | AC_MSG_CHECKING([for Tk private headers]) 47 | private_dir="" 48 | for dir in "${TK_INCLUDE_SPEC}/tk-private" "${TK_SRC_DIR}"; do 49 | dir=`echo "${dir}/generic" | sed -e s/-I//` 50 | if test -f "${dir}/tkInt.h"; then 51 | private_dir="${dir}" 52 | break 53 | fi 54 | done 55 | 56 | if test x"${private_dir}" = x; then 57 | AC_ERROR(could not find Tk private headers) 58 | else 59 | TK_PRIVATE_INCLUDE="-I${private_dir}" 60 | AC_MSG_RESULT(${private_dir}) 61 | TK_PLATFORM=unknown 62 | dir="`dirname \"${private_dir}\"`" 63 | for platform in Unix Win MacOSX; do 64 | pf="`echo \"${platform}\" | tr 'A-Z' 'a-z'`" 65 | if test -f "${dir}/generic/tk${platform}Port.h"; then 66 | TK_PLATFORM="${pf}" 67 | break 68 | elif test -f "${dir}/${pf}/tk${platform}Port.h"; then 69 | TK_PLATFORM="${pf}" 70 | TK_PRIVATE_INCLUDE="${TK_PRIVATE_INCLUDE} -I${dir}/${pf}" 71 | break 72 | fi 73 | done 74 | fi 75 | ]) 76 | -------------------------------------------------------------------------------- /testsuite/gdb.gdbtk/stack2.c: -------------------------------------------------------------------------------- 1 | /* Functions defined in this file */ 2 | void extern_func1_1 (int, char *, unsigned long); 3 | void extern_func1_2 (int, char *, unsigned long); 4 | void extern_func1_3 (int, char *, unsigned long); 5 | void extern_func1_4 (int, char *, unsigned long); 6 | void extern_func1_5 (int, char *, unsigned long); 7 | void extern_func1_6 (int, char *, unsigned long); 8 | void extern_func1_7 (int, char *, unsigned long); 9 | void extern_func1_8 (int, char *, unsigned long); 10 | void extern_func1_9 (int, char *, unsigned long); 11 | void extern_func1_10 (int, char *, unsigned long); 12 | void extern_func1_11 (int, char *, unsigned long); 13 | void extern_func1_12 (int, char *, unsigned long); 14 | void extern_func1_13 (int, char *, unsigned long); 15 | void extern_func1_14 (int, char *, unsigned long); 16 | void extern_func1_15 (int, char *, unsigned long); 17 | 18 | void 19 | extern_func1_1 (int a, char *b, unsigned long c) 20 | { 21 | extern_func1_2 (a, b, c); 22 | } 23 | 24 | void 25 | extern_func1_2 (int a, char *b, unsigned long c) 26 | { 27 | extern_func1_3 (a, b, c); 28 | } 29 | 30 | void 31 | extern_func1_3 (int a, char *b, unsigned long c) 32 | { 33 | extern_func1_4 (a, b, c); 34 | } 35 | 36 | void 37 | extern_func1_4 (int a, char *b, unsigned long c) 38 | { 39 | extern_func1_5 (a, b, c); 40 | } 41 | 42 | void 43 | extern_func1_5 (int a, char *b, unsigned long c) 44 | { 45 | extern_func1_6 (a, b, c); 46 | } 47 | 48 | void 49 | extern_func1_6 (int a, char *b, unsigned long c) 50 | { 51 | extern_func1_7 (a, b, c); 52 | } 53 | 54 | void 55 | extern_func1_7 (int a, char *b, unsigned long c) 56 | { 57 | extern_func1_8 (a, b, c); 58 | } 59 | 60 | void 61 | extern_func1_8 (int a, char *b, unsigned long c) 62 | { 63 | extern_func1_9 (a, b, c); 64 | } 65 | 66 | void 67 | extern_func1_9 (int a, char *b, unsigned long c) 68 | { 69 | extern_func1_10 (a, b, c); 70 | } 71 | 72 | void 73 | extern_func1_10 (int a, char *b, unsigned long c) 74 | { 75 | extern_func1_11 (a, b, c); 76 | } 77 | 78 | void 79 | extern_func1_11 (int a, char *b, unsigned long c) 80 | { 81 | extern_func1_12 (a, b, c); 82 | } 83 | 84 | void 85 | extern_func1_12 (int a, char *b, unsigned long c) 86 | { 87 | extern_func1_13 (a, b, c); 88 | } 89 | 90 | void 91 | extern_func1_13 (int a, char *b, unsigned long c) 92 | { 93 | extern_func1_14 (a, b, c); 94 | } 95 | 96 | void 97 | extern_func1_14 (int a, char *b, unsigned long c) 98 | { 99 | extern_func1_15 (a, b, c); 100 | } 101 | 102 | void 103 | extern_func1_15 (int a, char *b, unsigned long c) 104 | { 105 | /* THE END */ 106 | return; 107 | } 108 | -------------------------------------------------------------------------------- /libgui/library/advice.tcl: -------------------------------------------------------------------------------- 1 | # advice.tcl - Generic advice package. 2 | # Copyright (C) 1998 Cygnus Solutions. 3 | # Written by Tom Tromey . 4 | 5 | # Please note that I adapted this from some code I wrote elsewhere, 6 | # for non-Cygnus reasons. Don't complain to me if you see something 7 | # like it somewhere else. 8 | 9 | 10 | # Internal state. 11 | defarray ADVICE_state 12 | 13 | # This is a helper proc that does all the actual work. 14 | proc ADVICE_do {command argList} { 15 | global ADVICE_state 16 | 17 | # Run before advice. 18 | if {[info exists ADVICE_state(before,$command)]} { 19 | foreach item $ADVICE_state(before,$command) { 20 | # We purposely let errors in advice go uncaught. 21 | uplevel $item $argList 22 | } 23 | } 24 | 25 | # Run the command itself. 26 | set code [catch \ 27 | [list uplevel \#0 $ADVICE_state(original,$command) $argList] \ 28 | result] 29 | 30 | # Run the after advice. 31 | if {[info exists ADVICE_state(after,$command)]} { 32 | foreach item $ADVICE_state(after,$command) { 33 | # We purposely let errors in advice go uncaught. 34 | uplevel $item [list $code $result] $argList 35 | } 36 | } 37 | 38 | # Return just as the original command would. 39 | return -code $code $result 40 | } 41 | 42 | # Put some advice on a proc or command. 43 | # WHEN says when to run the advice - `before' or `after' the 44 | # advisee is run. 45 | # WHAT is the name of the proc or command to advise. 46 | # ADVISOR is the advice. It is passed the arguments to the advisee 47 | # call as its arguments. In addition, `after' advisors are 48 | # passed the return code and return value of the proc as their 49 | # first and second arguments. 50 | proc advise {when what advisor} { 51 | global ADVICE_state 52 | 53 | if {! [info exists ADVICE_state(original,$what)]} { 54 | set newName [gensym] 55 | rename $what $newName 56 | set ADVICE_state(original,$what) $newName 57 | 58 | # Create a new proc which just runs our internal command with the 59 | # correct arguments. 60 | uplevel \#0 [list proc $what args \ 61 | [format {ADVICE_do %s $args} $what]] 62 | } 63 | 64 | lappend ADVICE_state($when,$what) $advisor 65 | } 66 | 67 | # Remove some previously-set advice. Note that we could undo the 68 | # `rename' when the last advisor is removed. This adds complexity, 69 | # though, and there isn't much reason to. 70 | proc unadvise {when what advisor} { 71 | global ADVICE_state 72 | 73 | if {[info exists ADVICE_state($when,$what)]} { 74 | set newList {} 75 | foreach item $ADVICE_state($when,$what) { 76 | if {[string compare $advisor $item]} { 77 | lappend newList $item 78 | } 79 | } 80 | set ADVICE_state($when,$what) $newList 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /libgui/src/tclmain.c: -------------------------------------------------------------------------------- 1 | /* tclmain.c - a simple main() for IDE programs that use Tk. 2 | Copyright (C) 1997, 1998 Cygnus Solutions. 3 | Written by Tom Tromey . */ 4 | 5 | #include 6 | 7 | #include 8 | #include 9 | 10 | #include 11 | 12 | #ifdef HAVE_STDLIB_H 13 | #include 14 | #endif 15 | 16 | #ifdef _WIN32 17 | #include 18 | #include 19 | #endif 20 | 21 | #include "guitcl.h" 22 | 23 | #ifndef EXIT_SUCCESS 24 | #define EXIT_SUCCESS 0 25 | #endif 26 | 27 | #ifndef EXIT_FAILURE 28 | #define EXIT_FAILURE 1 29 | #endif 30 | 31 | /* This is like Tk_Main, except that the resulting program doesn't try 32 | to act like a script interpreter. It never reads commands from 33 | stdin. */ 34 | void 35 | ide_main (int argc, char *argv[], Tcl_AppInitProc *appInitProc) 36 | { 37 | Tcl_Interp *interp; 38 | char *args; 39 | char buf[20]; 40 | 41 | Tcl_FindExecutable (argv[0]); 42 | interp = Tcl_CreateInterp (); 43 | 44 | #ifdef TCL_MEM_DEBUG 45 | Tcl_InitMemory (interp); 46 | #endif 47 | 48 | args = Tcl_Merge (argc - 1, argv + 1); 49 | Tcl_SetVar (interp, "argv", args, TCL_GLOBAL_ONLY); 50 | ckfree (args); 51 | 52 | sprintf (buf, "%d", argc-1); 53 | Tcl_SetVar (interp, "argc", buf, TCL_GLOBAL_ONLY); 54 | Tcl_SetVar (interp, "argv0", argv[0], TCL_GLOBAL_ONLY); 55 | 56 | /* We set this to "1" so that the console window will work. */ 57 | Tcl_SetVar (interp, "tcl_interactive", "1", TCL_GLOBAL_ONLY); 58 | 59 | #if IDE_ENABLED 60 | Tcl_SetVar (interp, "IDE_ENABLED", "1", TCL_GLOBAL_ONLY); 61 | #else 62 | Tcl_SetVar (interp, "IDE_ENABLED", "0", TCL_GLOBAL_ONLY); 63 | #endif 64 | 65 | if ((*appInitProc) (interp) != TCL_OK) 66 | { 67 | Tcl_Channel err_channel; 68 | char *msg; 69 | 70 | /* Guarantee that errorInfo is set properly. */ 71 | Tcl_AddErrorInfo (interp, ""); 72 | msg = Tcl_GetVar (interp, "errorInfo", TCL_GLOBAL_ONLY); 73 | 74 | /* On Windows, we are probably running as a windows app, and 75 | stderr is the bit bucket, so we call a win32 function to 76 | display the error. */ 77 | 78 | #ifdef _WIN32 79 | MessageBox (NULL, msg, NULL, MB_OK | MB_ICONERROR | MB_TASKMODAL); 80 | #else 81 | err_channel = Tcl_GetStdChannel (TCL_STDERR); 82 | if (err_channel) 83 | { 84 | 85 | Tcl_Write (err_channel, msg, -1); 86 | Tcl_Write (err_channel, "\n", 1); 87 | } 88 | #endif 89 | 90 | Tcl_DeleteInterp (interp); 91 | Tcl_Exit (EXIT_FAILURE); 92 | } 93 | 94 | Tcl_ResetResult (interp); 95 | 96 | /* Now just go until the user decides to shut down. */ 97 | Tk_MainLoop (); 98 | Tcl_DeleteInterp (interp); 99 | Tcl_Exit (EXIT_SUCCESS); 100 | } 101 | -------------------------------------------------------------------------------- /gdbtk/plugins/configure.ac: -------------------------------------------------------------------------------- 1 | AC_INIT(Make-rules) 2 | AC_CONFIG_AUX_DIR(../../..) 3 | AM_INIT_AUTOMAKE(insight, 1.0) 4 | AM_MAINTAINER_MODE 5 | AC_PROG_MAKE_SET 6 | AC_CANONICAL_HOST 7 | AC_PROG_CC 8 | AC_OBJEXT 9 | AC_EXEEXT 10 | 11 | # Find Tcl, Tk, etc 12 | SC_PATH_TCLCONFIG 13 | SC_LOAD_TCLCONFIG 14 | SC_PATH_TKCONFIG 15 | SC_LOAD_TKCONFIG 16 | 17 | # Special in-tree hackery 18 | here=`pwd` 19 | cd ${srcdir}/../../.. 20 | topdir=`pwd` 21 | cd ${here} 22 | 23 | if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then 24 | TCL_INCLUDES="-I${TCL_SRC_DIR}/generic" 25 | TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}" 26 | else 27 | TCL_INCLUDES="${TCL_INCLUDE_SPEC}" 28 | TCL_LIBRARY="${TCL_LIB_SPEC}" 29 | fi 30 | 31 | AC_SUBST(TCL_DBGX) 32 | AC_SUBST(TCL_SHLIB_CFLAGS) 33 | AC_SUBST(TCL_SHLIB_LD) 34 | AC_SUBST(TCL_SHLIB_SUFFIX) 35 | AC_SUBST(TCL_INCLUDES) 36 | AC_SUBST(TCL_LIBRARY) 37 | 38 | # Make sure TCL_SHLIB_SUFFIX is set 39 | if test x$TCL_SHLIB_SUFFIX = x ; then 40 | case "${host}" in 41 | *cygwin*) TCL_SHLIB_SUFFIX=".dll" ;; 42 | *) TCL_SHILB_SUFFIX=".so" ;; 43 | esac 44 | fi 45 | AC_SUBST(TCL_SHLIB_SUFFIX) 46 | 47 | # Since we're not using autoconf > 2.1x, we cannot use AC_CONFIG_FILES. 48 | make_subdirs="" 49 | 50 | # See if -mwin32 works for cygwin 51 | case "${host}" in 52 | *cygwin*) 53 | ocflags=${CFLAGS} 54 | CFLAGS="${CFLAGS} -mwin32" 55 | AC_TRY_COMPILE(,,,CFLAGS="${ocflags}") 56 | ;; 57 | *) ;; 58 | esac 59 | 60 | # note toplevel plugin build directory 61 | plugin_builddir=`pwd` 62 | 63 | # 64 | # Plugins 65 | # 66 | 67 | # Supported hosts 68 | 69 | # Only supported/tested on linux, solaris, cygwin 70 | supported=yes 71 | case "${host}" in 72 | *cygwin*) ;; 73 | *solaris*) ;; 74 | *linux*) ;; 75 | *) supported=no ;; 76 | esac 77 | 78 | # Host-specific configury 79 | case "${host}" in 80 | *cygwin*) 81 | AC_CHECK_TOOL(NM, nm, nm) 82 | AC_CHECK_TOOL(AS, as, as) 83 | AC_CHECK_TOOL(LD, ld, ld) 84 | AC_MSG_CHECKING("for libcygwin.a") 85 | LIBCYGWIN_A=`$CC -print-file-name=libcygwin.a` 86 | AC_MSG_RESULT($LIBCYGWIN_A) 87 | AC_SUBST(LIBCYGWIN_A) 88 | AC_CHECK_TOOL(DLLTOOL, dlltool) 89 | ;; 90 | esac 91 | 92 | # Plugins supported by this configuration 93 | if test x${supported} = xyes; then 94 | plugins="rhabout" 95 | case "${target}" in 96 | *cygwin*) ;; 97 | *linux*) ;; 98 | *i?86*) 99 | plugins="${plugins} intel-pentium" 100 | ;; 101 | esac 102 | 103 | for i in $plugins ; do 104 | make_subdirs="${make_subdirs} $i" 105 | done 106 | fi 107 | 108 | AC_SUBST(make_subdirs) 109 | AC_SUBST(plugin_builddir) 110 | 111 | AC_OUTPUT(Makefile rhabout/Makefile:rhabout/Makefile.in:Make-rules rhabout/rhabout.tcl intel-pentium/Makefile:intel-pentium/Makefile.in:Make-rules intel-pentium/intel-pentium.tcl) 112 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | IMPORTANT NOTE: 2 | 3 | The insight graphical debugger is now back to its legitimate location at 4 | https://sourceware.org/git/?p=insight.git. 5 | The current github repository will NOT be updated anymore and will be removed 6 | soon. 7 | Please update your git location to git://sourceware.org/git/insight.git. 8 | 9 | YOU HAVE BEEN WARNED !!! 10 | 11 | 12 | insight: the gdb tcl/tk graphic interface 13 | ----------------------------------------- 14 | 15 | The GUI part of insight is now maintained outside the gdb tree. Bundles are 16 | therefore needed to get the whole code embedded. They are implemented as: 17 | 18 | - bfd, opcodes, texinfo, readline, libiberty, include, sim, cpu, intl and 19 | libdecnumber are now bundles of binutils-gdb. 20 | 21 | - libgui does not appear in any other repository and thus is now part of 22 | insight. 23 | 24 | - binutils-gdb is included as a git submodule. 25 | 26 | - tcl, tk, itcl, itk and iwidgets must be provided externally. 27 | 28 | 29 | Cloning: 30 | After a simple clone, the submodule has to be initialized and downloaded. This 31 | is done as: 32 | git clone 33 | cd insight.git 34 | git submodule init 35 | git submodule update 36 | 37 | Alternatively, initial cloning can be performed as: 38 | git clone --recursive 39 | 40 | Updating: 41 | For automatic submodule pulls upon main module pull, set 42 | 43 | git config fetch.recurseSubmodules true 44 | 45 | else use 46 | 47 | git submodule foreach --recursive git pull 48 | 49 | when submodule pulls are required. 50 | If upgrade of submodules is needed, finish update by 51 | 52 | git submodule update --remote 53 | 54 | 55 | Building: 56 | - Prepare the configuration scripts with: 57 | autoconf 58 | 59 | - Configure the package with the needed options. In example: 60 | ./configure --prefix=/usr/. \ 61 | --libdir=/usr/lib64 \ 62 | --disable-binutils \ 63 | --disable-elfcpp \ 64 | --disable-gas \ 65 | --disable-gold \ 66 | --disable-gprof \ 67 | --disable-ld \ 68 | --disable-rpath \ 69 | --disable-zlib \ 70 | --enable-sim \ 71 | --with-gdb-datadir=/usr/share/insight \ 72 | --with-jit-reader-dir=/usr/lib64/insight \ 73 | --with-separate-debug-dir='/usr/lib/debug' \ 74 | --with-expat \ 75 | --with-python \ 76 | --without-libunwind 77 | 78 | The configure script builds the "bundle" directory where the rest of 79 | the build will be performed. 80 | 81 | - run make: the top Makefile is only a stub recursively making in the 82 | "bundle" directory. 83 | 84 | 85 | To produce a source release tarball: 86 | - Start from a FRESH recursive clone. Work in its top directory. 87 | - autoconf 88 | - configure 89 | - (cd bundle; ./src-release.sh [-b|-g|-x] insight) 90 | -b, -g and -x compress the tarball with bzip2, gzip and xz respectively. 91 | Tarball is left in file bundle/insight-VE.RS.ION.DATE.tar[.suffix] 92 | -------------------------------------------------------------------------------- /libgui/library/bindings.tcl: -------------------------------------------------------------------------------- 1 | # bindings.tcl - Procs to handle bindings. 2 | # Copyright (C) 1997 Cygnus Solutions. 3 | # Written by Tom Tromey . 4 | 5 | # Reorder the bindtags so that the tag appears before the widget. 6 | # Tries to preserve other relative orderings as much as possible. In 7 | # particular, nothing changes if the widget is already after the tag. 8 | proc bind_widget_after_tag {w tag} { 9 | set seen_tag 0 10 | set seen_widget 0 11 | set new_list {} 12 | foreach tag [bindtags $w] { 13 | if {$tag == $tag} then { 14 | lappend new_list $tag 15 | if {$seen_widget} then { 16 | lappend new_list $w 17 | } 18 | set seen_tag 1 19 | } elseif {$tag == $w} then { 20 | if {$seen_tag} then { 21 | lappend new_list $tag 22 | } 23 | set seen_widget 1 24 | } else { 25 | lappend new_list $tag 26 | } 27 | } 28 | 29 | if {! $seen_widget} then { 30 | lappend new_list $w 31 | } 32 | 33 | bindtags $w $new_list 34 | } 35 | 36 | # Reorder the bindtags so that the class appears before the widget. 37 | # Tries to preserve other relative orderings as much as possible. In 38 | # particular, nothing changes if the widget is already after the 39 | # class. 40 | proc bind_widget_after_class {w} { 41 | bind_widget_after_tag $w [winfo class $w] 42 | } 43 | 44 | # Make the specified binding for KEY and empty bindings for common 45 | # modifiers for KEY. This can be used to ensure that a binding won't 46 | # also be triggered by (eg) Alt-KEY. This proc also makes the binding 47 | # case-insensitive. KEY is either the name of a key, or a key with a 48 | # single modifier. 49 | proc bind_plain_key {w key binding} { 50 | set l [split $key -] 51 | if {[llength $l] == 1} then { 52 | set mod {} 53 | set part $key 54 | } else { 55 | set mod "[lindex $l 0]-" 56 | set part [lindex $l 1] 57 | } 58 | 59 | set modifiers {Meta- Alt- Control-} 60 | 61 | set part_list [list $part] 62 | # If we just have a single letter, then we can't look for 63 | # Shift-PART; we must use the uppercase equivalent. 64 | if {[string length $part] == 1} then { 65 | # This is nasty: if we bind Control-L, we won't see the events we 66 | # want. Instead we have to bind Shift-Control-L. Actually, we 67 | # must also bind Control-L so that we'll see the event if the Caps 68 | # Lock key is down. 69 | if {$mod != ""} then { 70 | lappend part_list "Shift-[string toupper $part]" 71 | } 72 | lappend part_list [string toupper $part] 73 | } else { 74 | lappend modifiers Shift- 75 | } 76 | 77 | foreach part $part_list { 78 | # Bind the key itself (with modifier if required). 79 | bind $w <${mod}${part}> $binding 80 | 81 | # Ignore any modifiers other than the one we like. 82 | foreach onemod $modifiers { 83 | if {$onemod != $mod} then { 84 | bind $w <${onemod}${part}> {;} 85 | } 86 | } 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /gdbtk/library/debugwin.ith: -------------------------------------------------------------------------------- 1 | # Debug window class definition for GDBtk. 2 | # Copyright (C) 1998, 1999 Cygnus Solutions 3 | # 4 | # This program is free software; you can redistribute it and/or modify it 5 | # under the terms of the GNU General Public License (GPL) as published by 6 | # the Free Software Foundation; either version 2 of the License, or (at 7 | # your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | 14 | 15 | # ----------------------------------------------------------------------------- 16 | # NAME: 17 | # class DebugWin 18 | # 19 | # DESC: 20 | # This class implements a debug output window to display internal 21 | # debugging information. It can handle debugging messages, tracing, 22 | # and eventually profiling. 23 | # 24 | # NOTES: 25 | # This window is for developers. 26 | # 27 | # ----------------------------------------------------------------------------- 28 | itcl::class DebugWin { 29 | inherit ManagedWin 30 | 31 | private { 32 | variable _t 33 | variable _colors { 34 | {I green} 35 | {W yellow} 36 | {E orange} 37 | {X red} 38 | } 39 | variable _bigstr " " 40 | method build_win {} 41 | method _source_all {} 42 | method _clear {} 43 | method _mark_old {} 44 | method _save_contents {} 45 | method reconfig {} 46 | } 47 | 48 | protected { 49 | method _ignore_on_save {} { return 1 } 50 | } 51 | 52 | public { 53 | method constructor {args} 54 | method destructor {} 55 | method puts {level cls func msg} 56 | method put_trace {enter level func ar} 57 | method loadlog {} 58 | } 59 | } 60 | 61 | # ----------------------------------------------------------------------------- 62 | # NAME: 63 | # class DebugWinDOpts 64 | # 65 | # DESC: 66 | # This class implements a debug options dialog for the DebugWin. 67 | # Currently this consists os a selection dialog to choose which 68 | # messages to print. Eventually it could also include a filter 69 | # for different priorities and color selections. 70 | # 71 | # NOTES: 72 | # This window is for developers. 73 | # 74 | # ----------------------------------------------------------------------------- 75 | itcl::class DebugWinDOpts { 76 | inherit ManagedWin 77 | 78 | public { 79 | method constructor {args} {} 80 | method destructor {} 81 | } 82 | 83 | protected { 84 | method _ignore_on_save { return 1 } 85 | } 86 | 87 | private { 88 | variable _classes 89 | method build_win {} 90 | method _all {} 91 | method _apply {done} 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /gdbtk/plugins/rhabout/rhabout.itcl: -------------------------------------------------------------------------------- 1 | class RHAbout { 2 | inherit PluginWindow 3 | constructor {args} { 4 | global gdb_ImageDir 5 | 6 | # What about a menu? 7 | $menubar add menubutton file "File" 0 8 | $menubar add command None "Close" \ 9 | [code $this destroy_toplevel] \ 10 | -underline 1 11 | $menubar add menubutton help "Help" 0 12 | $menubar add command Other "Help Topics" \ 13 | {open_help index.html} \ 14 | -underline 0 15 | $menubar add separator 16 | $menubar add command Other "About GDB..." \ 17 | {ManagedWin::open About -transient} \ 18 | -underline 0 19 | 20 | # The menu only shows up if you do this: 21 | $menubar show 22 | 23 | # Do you want a toolbar? 24 | $toolbar add button con Other {ManagedWin::open Console} \ 25 | "Console (Ctrl+N)" -image console_img 26 | 27 | # The toolbar will only show up if you do this: 28 | $toolbar show 29 | 30 | # Now, fill the childsite with some graphics and text 31 | 32 | # Remember to use the childsite, do not pack in the widget hull 33 | set f [childsite] 34 | 35 | # Put in some graphics 36 | label $f.image1 -bg white -image \ 37 | [image create photo -file [file join $gdb_ImageDir insight.gif]] 38 | 39 | # Here we call an interface function provided by GDBTCL 40 | set text [gdb_cmd {show version}] 41 | 42 | # Here we call a command procedure that we created, if it exists 43 | catch {append text [rhabout_extra_text]} 44 | 45 | # Now add the text 46 | message $f.m -bg white -fg black -text $text -aspect 500 -relief flat 47 | 48 | # Add a status bar so we can show some dynamic information 49 | set _status [label $f.stat -relief sunken -bd 3 \ 50 | -font global/status -height 1] 51 | 52 | # pack everything 53 | pack $f.image1 $f.m -fill both -expand yes 54 | pack $f.stat -expand 1 -fill both 55 | pack $itk_interior 56 | 57 | # Give our sample window a name 58 | window_name "About Red Hat Insight Plug-In" 59 | } 60 | 61 | # You can overload the base class busy method, but make sure 62 | # to call it as well or the menu and button status will not be updated 63 | # (unless this is what you want) 64 | public method busy {event} { 65 | debug 66 | # Call the baseclass version 67 | PluginWindow::busy $event 68 | 69 | # Display something in the status area 70 | $_status configure -text "Running..." 71 | } 72 | 73 | # You can overload the base class idle method, but make sure 74 | # to call it as well or the menu and button status will not be updated 75 | # (unless this is what you want) 76 | private method idle {} { 77 | debug 78 | # First call the baseclass version 79 | PluginWindow::idle 80 | 81 | # Display something in the status area 82 | $_status configure -text "Stopped." 83 | } 84 | 85 | # Path to the status area 86 | private variable _status 87 | } 88 | -------------------------------------------------------------------------------- /libgui/src/tkTableInitScript.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tkTableInitScript.h -- 3 | * 4 | * This file contains common init script for tkTable 5 | * 6 | * Copyright (c) 1998-2016 Jeffrey Hobbs 7 | * 8 | * See the file "license.terms" for information on usage and redistribution 9 | * of this file, and for a DISCLAIMER OF ALL WARRANTIES. 10 | */ 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | /* 17 | * The following string is the startup script executed when the table is 18 | * loaded. It looks on disk in several different directories for a script 19 | * "TBL_RUNTIME" (as defined in Makefile) that is compatible with this 20 | * version of tkTable. The sourced script has all key bindings defined. 21 | */ 22 | 23 | static char tkTableInitScript[] = "if {[info proc tkTableInit]==\"\"} {\n\ 24 | proc tkTableInit {} {\n\ 25 | global tk_library tcl_pkgPath errorInfo env\n\ 26 | rename tkTableInit {}\n\ 27 | set errors {}\n\ 28 | if {![info exists env(TK_TABLE_LIBRARY_FILE)]} {\n\ 29 | set env(TK_TABLE_LIBRARY_FILE) " TBL_RUNTIME "\n\ 30 | }\n\ 31 | if {[info exists env(TK_TABLE_LIBRARY)]} {\n\ 32 | lappend dirs $env(TK_TABLE_LIBRARY)\n\ 33 | }\n\ 34 | lappend dirs " TBL_RUNTIME_DIR "\n\ 35 | if {[info exists tcl_pkgPath]} {\n\ 36 | foreach i $tcl_pkgPath {\n\ 37 | lappend dirs [file join $i Tktable" TBL_VERSION "] \\\n\ 38 | [file join $i Tktable] $i\n\ 39 | }\n\ 40 | }\n\ 41 | lappend dirs $tk_library [pwd]\n\ 42 | foreach i $dirs {\n\ 43 | set try [file join $i $env(TK_TABLE_LIBRARY_FILE)]\n\ 44 | if {[file exists $try]} {\n\ 45 | if {![catch {uplevel #0 [list source $try]} msg]} {\n\ 46 | set env(TK_TABLE_LIBRARY) $i\n\ 47 | return\n\ 48 | } else {\n\ 49 | append errors \"$try: $msg\n$errorInfo\n\"\n\ 50 | }\n\ 51 | }\n\ 52 | }\n" 53 | #ifdef NO_EMBEDDED_RUNTIME 54 | " set msg \"Can't find a $env(TK_TABLE_LIBRARY_FILE) in the following directories: \n\"\n\ 55 | append msg \" $dirs\n\n$errors\n\n\"\n\ 56 | append msg \"This probably means that TkTable wasn't installed properly.\"\n\ 57 | return -code error $msg\n" 58 | #else 59 | " set env(TK_TABLE_LIBRARY) EMBEDDED_RUNTIME\n" 60 | # ifdef MAC_TCL 61 | " source -rsrc tkTable" 62 | # else 63 | " uplevel #0 {" 64 | # include "tkTable.tcl.h" 65 | " }" 66 | # endif 67 | #endif 68 | " }\n\ 69 | }\n\ 70 | tkTableInit"; 71 | 72 | /* 73 | * The init script can't make certain calls in a safe interpreter, 74 | * so we always have to use the embedded runtime for it 75 | */ 76 | static char tkTableSafeInitScript[] = "if {[info proc tkTableInit]==\"\"} {\n\ 77 | proc tkTableInit {} {\n\ 78 | set env(TK_TABLE_LIBRARY) EMBEDDED_RUNTIME\n" 79 | #ifdef NO_EMBEDDED_RUNTIME 80 | " append msg \"tkTable requires embedded runtime to be compiled for\"\n\ 81 | append msg \" use in safe interpreters\"\n\ 82 | return -code error $msg\n" 83 | #endif 84 | # ifdef MAC_TCL 85 | " source -rsrc tkTable" 86 | # else 87 | " uplevel #0 {" 88 | # include "tkTable.tcl.h" 89 | " }" 90 | # endif 91 | " }\n\ 92 | }\n\ 93 | tkTableInit"; 94 | 95 | 96 | #ifdef __cplusplus 97 | } 98 | #endif 99 | -------------------------------------------------------------------------------- /libgui/library/wframe.tcl: -------------------------------------------------------------------------------- 1 | # wframe.tcl - Frame with a widget on its border. 2 | # Copyright (C) 1997,2008 Red Hat, Inc. 3 | # Written by Tom Tromey . 4 | 5 | itcl::class Widgetframe { 6 | # Where to put the widget. For now, we don't support many anchors. 7 | # Augment as you like. 8 | public variable anchor nw { 9 | if {$anchor != "nw" && $anchor != "n"} then { 10 | error "anchors nw and n are the only ones supported" 11 | } 12 | _layout 13 | } 14 | 15 | # The name of the widget to put on the frame. This is set by some 16 | # subclass calling the _add method. Private variable. 17 | protected variable _widget {} 18 | 19 | constructor {} { 20 | # The standard widget-making trick. 21 | set class [$this info class] 22 | set hull [namespace tail $this] 23 | set old_name $this 24 | ::rename $this $this-tmp- 25 | ::frame $hull -class $class -relief flat -borderwidth 0 26 | ::rename $hull $old_name-win- 27 | ::rename $this $old_name 28 | 29 | frame [namespace tail $this].iframe -relief groove -borderwidth 2 30 | grid [namespace tail $this].iframe -row 1 -sticky news 31 | grid rowconfigure [namespace tail $this] 1 -weight 1 32 | grid columnconfigure [namespace tail $this] 0 -weight 1 33 | 34 | # Make an internal frame so that user stuff isn't obscured. Note 35 | # that we can't use the placer, because it doesn't set the 36 | # geometry of the parent. 37 | frame [namespace tail $this].iframe.frame -borderwidth 4 -relief flat 38 | grid [namespace tail $this].iframe.frame -row 1 -sticky news 39 | grid rowconfigure [namespace tail $this].iframe 1 -weight 1 40 | grid columnconfigure [namespace tail $this].iframe 0 -weight 1 41 | 42 | bind [namespace tail $this].iframe \ 43 | [itcl::code itcl::delete object $this] 44 | } 45 | 46 | destructor { 47 | catch {destroy $this} 48 | } 49 | 50 | # Return name of internal frame. 51 | method get_frame {} { 52 | return [namespace tail $this].iframe.frame 53 | } 54 | 55 | # Name a certain widget to be put on the frame. This should be 56 | # called by some subclass after making the widget. Protected 57 | # method. 58 | method _add {widget} { 59 | set _widget $widget 60 | set height [expr {int ([winfo reqheight $_widget] / 2)}] 61 | grid rowconfigure [namespace tail $this] 0 -minsize $height -weight 0 62 | grid rowconfigure [namespace tail $this].iframe 0 -minsize $height -weight 0 63 | _layout 64 | } 65 | 66 | # Re-layout according to the anchor. Private method. 67 | method _layout {} { 68 | if {$_widget == "" || ! [winfo exists $_widget]} then { 69 | return 70 | } 71 | 72 | switch -- $anchor { 73 | n { 74 | # Put the label over the border, in the center. 75 | place $_widget -in [namespace tail $this].iframe -relx 0.5 -rely 0 -y -2 \ 76 | -anchor center 77 | } 78 | nw { 79 | # Put the label over the border, at the top left. 80 | place $_widget -in [namespace tail $this].iframe -relx 0 -x 6 -rely 0 -y -2 \ 81 | -anchor w 82 | } 83 | default { 84 | error "unsupported anchor \"$anchor\"" 85 | } 86 | } 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /gdbtk/library/regwin.ith: -------------------------------------------------------------------------------- 1 | # Register display window class definition for Insight. 2 | # Copyright (C) 1998, 1999, 2001 Red Hat, Inc. 3 | # 4 | # Written by Keith Seitz (keiths@redhat.com) 5 | # based on work by Martin Hunt (hunt@redhat.com) 6 | # 7 | # This program is free software; you can redistribute it and/or modify it 8 | # under the terms of the GNU General Public License (GPL) as published by 9 | # the Free Software Foundation; either version 2 of the License, or (at 10 | # your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | 17 | 18 | itcl::class RegWin { 19 | inherit EmbeddedWin GDBWin 20 | 21 | private { 22 | variable _change_list {} 23 | variable _menuitems 24 | 25 | # Display data for the table 26 | variable _data 27 | 28 | # Mapping of table cell index to register number 29 | variable _register 30 | 31 | # the register group that is displayed 32 | variable _group "all" 33 | 34 | # Mapping of register number to table cell index. "hidden" if 35 | # the register was "removed" from the display. 36 | variable _cell 37 | 38 | # Is REGNUM editable? 39 | variable _editable 40 | 41 | # List of possible display types for the registers (indexed by regnum) 42 | variable _types 43 | # The display type to use for each register (indexed by regnum) 44 | variable _type 45 | # The display format to use for each register (indexed by regnum) 46 | variable _format 47 | 48 | # The list of registers we're displaying 49 | variable _reg_display_list {} 50 | 51 | # Size of columns 52 | variable _col_size 53 | variable _max_label_width 54 | 55 | # Dimensions 56 | variable _rows 57 | variable _cols 58 | 59 | # Fencepost 60 | variable _running 0 61 | 62 | 63 | # Table layout/display methods 64 | method _build_win {} 65 | method _layout_table {} 66 | method _load_prefs {} 67 | method _size_cell_column {cell down} 68 | method _size_column {col down} 69 | 70 | # Table event handlers and related methods 71 | method _accept_edit {} 72 | method _add_to_watch {rn} 73 | method _but3 {x y X Y} 74 | method _delete_from_display {rn} 75 | method _display_all {} 76 | method _edit {x y} 77 | method _move {direction} 78 | method _open_memory {rn} 79 | method _select_group {} 80 | method _select_cell {cell} 81 | method _unedit {} 82 | 83 | # Register operations 84 | method _get_value {rn} 85 | method _change_format {rn {t {}}} 86 | method _update_register {rn} 87 | } 88 | 89 | public { 90 | method constructor {args} 91 | method destructor {} 92 | 93 | # 94 | # Gdb Events 95 | # 96 | method busy {event} 97 | method idle {event} 98 | method set_variable {event} 99 | method update {event} 100 | method arch_changed {event} 101 | method reconfig {} 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /gdbtk/library/helpviewer.tcl: -------------------------------------------------------------------------------- 1 | # Open a viewer for HTML help info 2 | # Copyright (C) 2002, 2008, Red Hat, Inc. 3 | # 4 | # This program is free software; you can redistribute it and/or modify it 5 | # under the terms of the GNU General Public License (GPL) as published by 6 | # the Free Software Foundation; either version 2 of the License, or (at 7 | # your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | 14 | # ------------------------------------------------------------------------------ 15 | # NAME: public proc open_help 16 | # SYNOPSIS: open_help file 17 | # DESC: Opens html help file using an appropriate 18 | # browser. 19 | # ------------------------------------------------------------------------------ 20 | 21 | proc open_help {hfile} { 22 | debug $hfile 23 | # create full pathname link 24 | set link file://[file join $::GDBTK_LIBRARY help $hfile] 25 | 26 | # windows is easy 27 | if {$::gdbtk_platform(platform) == "windows"} { 28 | ide_shell_execute open $link 29 | return 30 | } 31 | 32 | # 33 | # for Unix, we never know what is installed 34 | # 35 | 36 | # set list of viewer apps to try 37 | switch [pref get gdb/compat] { 38 | "KDE" { 39 | set apps {htmlview khelpcenter firefox opera mozilla} 40 | } 41 | "GNOME" { 42 | set apps {htmlview firefox opera mozilla gnome-help khelpcenter} 43 | } 44 | default { 45 | set apps {htmlview firefox opera mozilla gnome-help khelpcenter netscape} 46 | } 47 | } 48 | 49 | # If the user has previously entered a browser name, append it 50 | # to the list. Should it go first or last? 51 | set bname [pref get gdb/help/browsername] 52 | if {$bname != ""} { 53 | lappend apps $bname 54 | } 55 | 56 | # now loop through list checking each application 57 | foreach app $apps { 58 | debug "app=$app" 59 | if {[catch "exec $app $link &" result]} { 60 | debug "$app failed: $result" 61 | } else { 62 | return 63 | } 64 | } 65 | 66 | # if we reached here, nothing worked, so prompt for a name 67 | set text "No help browser was found on your system.\n\ 68 | Please enter the name of an HTML viewer application." 69 | while {[set app [prompt_helpname $text]] != "0"} { 70 | if {$app != ""} { 71 | if {[catch "exec $app $link &" result]} { 72 | dbug W "$app failed: $result" 73 | set text "Could not run application $app.\n\ 74 | Please enter the name of an HTML viewer application." 75 | } else { 76 | pref set gdb/help/browsername $app 77 | return 78 | } 79 | } 80 | } 81 | } 82 | 83 | # displays an entry dialog and asks for the name of an application 84 | # returns 0 on cancel 85 | # name on success 86 | proc prompt_helpname {text} { 87 | iwidgets::promptdialog .pd -title "Browser Query" -modality application \ 88 | -labeltext $text 89 | if {[.pd activate]} { 90 | set app [string trim [.pd get]] 91 | destroy .pd 92 | return $app 93 | } 94 | destroy .pd 95 | debug "cancelled" 96 | return 0 97 | } 98 | 99 | -------------------------------------------------------------------------------- /gdbtk/library/tdump.tcl: -------------------------------------------------------------------------------- 1 | # Trace dump window for Insight 2 | # Copyright (C) 1998, 1999, 2001, 2002, 2004, 2008 Red Hat, Inc. 3 | # 4 | # This program is free software; you can redistribute it and/or modify it 5 | # under the terms of the GNU General Public License (GPL) as published by 6 | # the Free Software Foundation; either version 2 of the License, or (at 7 | # your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | 14 | 15 | # ---------------------------------------------------------------------- 16 | # Implements Tdump window for gdb 17 | # 18 | # PUBLIC ATTRIBUTES: 19 | # 20 | # 21 | # METHODS: 22 | # 23 | # reconfig ....... called when preferences change 24 | # 25 | # 26 | # X11 OPTION DATABASE ATTRIBUTES 27 | # 28 | # 29 | # ---------------------------------------------------------------------- 30 | 31 | itcl::class TdumpWin { 32 | inherit ManagedWin GDBWin 33 | 34 | # ------------------------------------------------------------------ 35 | # CONSTRUCTOR - create new tdump window 36 | # ------------------------------------------------------------------ 37 | constructor {args} { 38 | window_name "Trace Dump" 39 | build_win 40 | eval itk_initialize $args 41 | } 42 | 43 | 44 | # ------------------------------------------------------------------ 45 | # METHOD: build_win - build the main tdump window 46 | # ------------------------------------------------------------------ 47 | method build_win {} { 48 | itk_component add stext { 49 | iwidgets::scrolledtext $itk_interior.stext -hscrollmode dynamic \ 50 | -vscrollmode dynamic -textfont global/fixed \ 51 | -background $::Colors(bg) 52 | } {} 53 | [$itk_component(stext) component text] configure \ 54 | -background $::Colors(bg) 55 | pack $itk_component(stext) -side left -expand yes -fill both 56 | update dummy 57 | } 58 | 59 | 60 | # ------------------------------------------------------------------ 61 | # METHOD: update - update widget when PC changes 62 | # ------------------------------------------------------------------ 63 | method update {event} { 64 | #debug "tdump: update" 65 | gdbtk_busy 66 | set tframe_num [gdb_get_trace_frame_num] 67 | 68 | if { $tframe_num!=-1 } { 69 | debug "doing tdump" 70 | $itk_component(stext) delete 1.0 end 71 | 72 | if {[catch {gdb_cmd "tdump $tframe_num" 0} tdump_output]} { 73 | tk_messageBox -title "Error" -message $tdump_output -icon error \ 74 | -type ok 75 | } else { 76 | #debug "tdum output is $tdump_output" 77 | 78 | $itk_component(stext) insert end $tdump_output 79 | $itk_component(stext) see insert 80 | } 81 | } 82 | gdbtk_idle 83 | } 84 | 85 | # ------------------------------------------------------------------ 86 | # METHOD: reconfig - used when preferences change 87 | # ------------------------------------------------------------------ 88 | method reconfig {} { 89 | if {[winfo exists $itk_interior.stext]} { destroy $itk_interior.stext } 90 | build_win 91 | } 92 | } 93 | 94 | --------------------------------------------------------------------------------