summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2006-04-24 22:00:27 +0000
committerDaniel Jacobowitz <dan@debian.org>2006-04-24 22:00:27 +0000
commitedc469a5506b2f0858aa4366d84f5c04e4eeeebe (patch)
treecf5d1c0b957710b8b9976bff1e8484b7c4a839b4
parent7be84cf3293f63b314237035e7df76caa8022769 (diff)
downloadgdb-cvs/readline_5_1-import-branch.tar.gz
-rw-r--r--compile142
-rw-r--r--gdb/gdbtk/ChangeLog35
-rw-r--r--gdb/gdbtk/ChangeLog-20011719
-rw-r--r--gdb/gdbtk/ChangeLog-2002878
-rw-r--r--gdb/gdbtk/ChangeLog-2003431
-rw-r--r--gdb/gdbtk/ChangeLog-2004209
-rw-r--r--gdb/gdbtk/ChangeLog-2005214
-rw-r--r--gdb/gdbtk/Makefile.am4
-rw-r--r--gdb/gdbtk/Makefile.in391
-rw-r--r--gdb/gdbtk/README285
-rw-r--r--gdb/gdbtk/TODO113
-rw-r--r--gdb/gdbtk/aclocal.m4943
-rwxr-xr-xgdb/gdbtk/configure3706
-rw-r--r--gdb/gdbtk/configure.ac12
-rw-r--r--gdb/gdbtk/gdb.rc1
-rw-r--r--gdb/gdbtk/gdbtool.icobin4710 -> 0 bytes
-rw-r--r--gdb/gdbtk/generic/ChangeLog-19971196
-rw-r--r--gdb/gdbtk/generic/ChangeLog-1998837
-rw-r--r--gdb/gdbtk/generic/ChangeLog-19992624
-rw-r--r--gdb/gdbtk/generic/ChangeLog-2000211
-rw-r--r--gdb/gdbtk/generic/gdbtk-bp.c995
-rw-r--r--gdb/gdbtk/generic/gdbtk-cmds.c3023
-rw-r--r--gdb/gdbtk/generic/gdbtk-cmds.h60
-rw-r--r--gdb/gdbtk/generic/gdbtk-hooks.c836
-rw-r--r--gdb/gdbtk/generic/gdbtk-interp.c181
-rw-r--r--gdb/gdbtk/generic/gdbtk-main.c37
-rw-r--r--gdb/gdbtk/generic/gdbtk-register.c567
-rw-r--r--gdb/gdbtk/generic/gdbtk-stack.c623
-rw-r--r--gdb/gdbtk/generic/gdbtk-varobj.c612
-rw-r--r--gdb/gdbtk/generic/gdbtk-wrapper.c723
-rw-r--r--gdb/gdbtk/generic/gdbtk-wrapper.h84
-rw-r--r--gdb/gdbtk/generic/gdbtk.c767
-rw-r--r--gdb/gdbtk/generic/gdbtk.h190
-rw-r--r--gdb/gdbtk/library/ChangeLog-19971487
-rw-r--r--gdb/gdbtk/library/ChangeLog-19983486
-rw-r--r--gdb/gdbtk/library/ChangeLog-19991083
-rw-r--r--gdb/gdbtk/library/ChangeLog-2000409
-rw-r--r--gdb/gdbtk/library/Makefile11
-rw-r--r--gdb/gdbtk/library/about.tcl43
-rw-r--r--gdb/gdbtk/library/actiondlg.tcl810
-rw-r--r--gdb/gdbtk/library/attachdlg.itb232
-rw-r--r--gdb/gdbtk/library/attachdlg.ith35
-rw-r--r--gdb/gdbtk/library/blockframe.itb227
-rw-r--r--gdb/gdbtk/library/blockframe.ith63
-rw-r--r--gdb/gdbtk/library/bpwin.itb728
-rw-r--r--gdb/gdbtk/library/bpwin.ith59
-rw-r--r--gdb/gdbtk/library/browserwin.itb731
-rw-r--r--gdb/gdbtk/library/browserwin.ith77
-rw-r--r--gdb/gdbtk/library/console.itb747
-rw-r--r--gdb/gdbtk/library/console.ith77
-rw-r--r--gdb/gdbtk/library/cspref.itb152
-rw-r--r--gdb/gdbtk/library/cspref.ith36
-rw-r--r--gdb/gdbtk/library/debugwin.itb483
-rw-r--r--gdb/gdbtk/library/debugwin.ith93
-rw-r--r--gdb/gdbtk/library/download.itb304
-rw-r--r--gdb/gdbtk/library/download.ith45
-rw-r--r--gdb/gdbtk/library/editor.tcl47
-rw-r--r--gdb/gdbtk/library/ehandler.itb31
-rw-r--r--gdb/gdbtk/library/ehandler.ith48
-rw-r--r--gdb/gdbtk/library/embeddedwin.ith25
-rw-r--r--gdb/gdbtk/library/gdbevent.itb205
-rw-r--r--gdb/gdbtk/library/gdbevent.ith220
-rw-r--r--gdb/gdbtk/library/gdbmenubar.itcl332
-rw-r--r--gdb/gdbtk/library/gdbtoolbar.itcl396
-rw-r--r--gdb/gdbtk/library/gdbwin.ith25
-rw-r--r--gdb/gdbtk/library/globalpref.itb481
-rw-r--r--gdb/gdbtk/library/globalpref.ith47
-rw-r--r--gdb/gdbtk/library/help/breakpoint.html107
-rw-r--r--gdb/gdbtk/library/help/browser.html77
-rw-r--r--gdb/gdbtk/library/help/console.html74
-rw-r--r--gdb/gdbtk/library/help/debug.html133
-rw-r--r--gdb/gdbtk/library/help/gbl_pref.html20
-rw-r--r--gdb/gdbtk/library/help/help.html34
-rw-r--r--gdb/gdbtk/library/help/images/browser1.pngbin11253 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/help/images/browser2.pngbin13764 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/help/images/frame_info.gifbin1196 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/help/images/insightbwr.pngbin1556 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/help/images/mem_menu.gifbin854 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/help/images/mem_popup.gifbin1264 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/help/images/mem_pref.gifbin5380 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/help/images/reg.pngbin12541 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/help/images/reg_menu.pngbin14377 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/help/images/src_bal.gifbin1267 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/help/images/src_bp_bal.gifbin2928 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/help/images/src_bpop.gifbin1099 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/help/images/src_menu.gifbin392 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/help/images/src_pop.gifbin1060 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/help/images/src_stat.gifbin1156 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/help/images/src_thread.gifbin3589 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/help/images/src_toolbar.gifbin3288 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/help/images/watch.pngbin14695 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/help/index.html35
-rw-r--r--gdb/gdbtk/library/help/license.html305
-rw-r--r--gdb/gdbtk/library/help/locals.html47
-rw-r--r--gdb/gdbtk/library/help/memory.html240
-rw-r--r--gdb/gdbtk/library/help/register.html48
-rw-r--r--gdb/gdbtk/library/help/session.html40
-rw-r--r--gdb/gdbtk/library/help/source.html424
-rw-r--r--gdb/gdbtk/library/help/src_pref.html20
-rw-r--r--gdb/gdbtk/library/help/stack.html50
-rw-r--r--gdb/gdbtk/library/help/target.html110
-rw-r--r--gdb/gdbtk/library/help/thread.html46
-rw-r--r--gdb/gdbtk/library/help/trace/console.html47
-rw-r--r--gdb/gdbtk/library/help/trace/gbl_pref.html20
-rw-r--r--gdb/gdbtk/library/help/trace/help.html32
-rw-r--r--gdb/gdbtk/library/help/trace/index.toc10
-rw-r--r--gdb/gdbtk/library/help/trace/license.html305
-rw-r--r--gdb/gdbtk/library/help/trace/locals.html83
-rw-r--r--gdb/gdbtk/library/help/trace/memory.html142
-rw-r--r--gdb/gdbtk/library/help/trace/reg_pref.html20
-rw-r--r--gdb/gdbtk/library/help/trace/register.html105
-rw-r--r--gdb/gdbtk/library/help/trace/source.html371
-rw-r--r--gdb/gdbtk/library/help/trace/src_pref.html20
-rw-r--r--gdb/gdbtk/library/help/trace/stack.html51
-rw-r--r--gdb/gdbtk/library/help/trace/target.html68
-rw-r--r--gdb/gdbtk/library/help/trace/tdump.html16
-rw-r--r--gdb/gdbtk/library/help/trace/tp.html111
-rw-r--r--gdb/gdbtk/library/help/trace/tracedlg.html134
-rw-r--r--gdb/gdbtk/library/help/trace/watch.html118
-rw-r--r--gdb/gdbtk/library/help/watch.html86
-rw-r--r--gdb/gdbtk/library/helpviewer.tcl98
-rw-r--r--gdb/gdbtk/library/images/Movie_off.gifbin326 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/Movie_on.gifbin359 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/bottom.gifbin84 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/bp.gifbin144 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/check.gifbin73 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/console.gifbin189 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/continue.gifbin108 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/down.gifbin80 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/edit.gifbin379 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/finish.gifbin89 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/gdbtk_icon.gifbin333 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/help.gifbin117 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/home.gifbin388 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/icons.txt1
-rw-r--r--gdb/gdbtk/library/images/insight.gifbin7573 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/less.gifbin115 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/memory.gifbin178 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/more.gifbin116 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/next.gifbin79 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/next_check.gifbin242 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/next_frame.gifbin217 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/next_hit.gifbin223 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/next_line.gifbin244 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/nexti.gifbin97 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/open.gifbin110 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/prev_hit.gifbin220 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/reg.gifbin121 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/rewind.gifbin217 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/run.gifbin105 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/run_expt.gifbin435 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/src.gifbin297 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/stack.gifbin174 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/step.gifbin89 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/stepi.gifbin104 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/stop.gifbin129 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/tdump.gifbin311 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/tp.gifbin228 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/up.gifbin79 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/vars.gifbin110 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/watch.gifbin185 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images/watch_movie.gifbin1106 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/Movie_off.gifbin326 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/Movie_on.gifbin359 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/bottom.gifbin178 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/bp.gifbin144 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/check.gifbin73 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/console.gifbin189 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/continue.gifbin131 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/down.gifbin175 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/edit.gifbin131 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/finish.gifbin145 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/function.gifbin137 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/gdbtk_icon.gifbin333 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/help.gifbin139 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/home.gifbin388 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/icons.txt1
-rw-r--r--gdb/gdbtk/library/images2/insight.gifbin7573 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/less.gifbin115 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/memory.gifbin178 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/more.gifbin116 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/next.gifbin144 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/next_check.gifbin242 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/next_frame.gifbin217 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/next_hit.gifbin223 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/next_line.gifbin244 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/nexti.gifbin154 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/open.gifbin110 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/prev_hit.gifbin220 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/reg.gifbin137 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/rewind.gifbin217 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/run.gifbin159 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/run_expt.gifbin435 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/src.gifbin269 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/stack.gifbin174 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/step.gifbin145 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/stepi.gifbin153 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/stop.gifbin168 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/target.gifbin205 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/tdump.gifbin311 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/tp.gifbin228 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/up.gifbin175 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/vars.gifbin110 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/watch.gifbin185 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/images2/watch_movie.gifbin1106 -> 0 bytes
-rw-r--r--gdb/gdbtk/library/interface.tcl1829
-rwxr-xr-xgdb/gdbtk/library/ipc.tcl135
-rw-r--r--gdb/gdbtk/library/ipcpref.itb135
-rw-r--r--gdb/gdbtk/library/ipcpref.ith33
-rw-r--r--gdb/gdbtk/library/kod.itb474
-rw-r--r--gdb/gdbtk/library/kod.ith63
-rw-r--r--gdb/gdbtk/library/locals.tcl179
-rw-r--r--gdb/gdbtk/library/main.tcl191
-rw-r--r--gdb/gdbtk/library/managedwin.itb419
-rw-r--r--gdb/gdbtk/library/managedwin.ith72
-rw-r--r--gdb/gdbtk/library/mempref.itb424
-rw-r--r--gdb/gdbtk/library/mempref.ith70
-rw-r--r--gdb/gdbtk/library/memwin.itb776
-rw-r--r--gdb/gdbtk/library/memwin.ith85
-rw-r--r--gdb/gdbtk/library/modal.tcl105
-rw-r--r--gdb/gdbtk/library/pluginwin.itcl185
-rw-r--r--gdb/gdbtk/library/prefs.tcl763
-rw-r--r--gdb/gdbtk/library/process.itb162
-rw-r--r--gdb/gdbtk/library/process.ith41
-rw-r--r--gdb/gdbtk/library/regwin.itb1050
-rw-r--r--gdb/gdbtk/library/regwin.ith103
-rw-r--r--gdb/gdbtk/library/session.tcl336
-rw-r--r--gdb/gdbtk/library/srcbar.itcl1246
-rw-r--r--gdb/gdbtk/library/srcpref.itb278
-rw-r--r--gdb/gdbtk/library/srcpref.ith38
-rw-r--r--gdb/gdbtk/library/srctextwin.itb2971
-rw-r--r--gdb/gdbtk/library/srctextwin.ith163
-rw-r--r--gdb/gdbtk/library/srcwin.itb1051
-rw-r--r--gdb/gdbtk/library/srcwin.ith106
-rw-r--r--gdb/gdbtk/library/stackwin.itb159
-rw-r--r--gdb/gdbtk/library/stackwin.ith46
-rw-r--r--gdb/gdbtk/library/targetselection.itb1087
-rw-r--r--gdb/gdbtk/library/targetselection.ith100
-rw-r--r--gdb/gdbtk/library/tclIndex639
-rw-r--r--gdb/gdbtk/library/tdump.tcl95
-rw-r--r--gdb/gdbtk/library/tfind_args.tcl139
-rw-r--r--gdb/gdbtk/library/toplevelwin.ith64
-rw-r--r--gdb/gdbtk/library/tracedlg.tcl800
-rw-r--r--gdb/gdbtk/library/tty.tcl55
-rw-r--r--gdb/gdbtk/library/util.tcl331
-rw-r--r--gdb/gdbtk/library/vartree.itb431
-rw-r--r--gdb/gdbtk/library/vartree.ith77
-rw-r--r--gdb/gdbtk/library/warning.tcl102
-rw-r--r--gdb/gdbtk/library/watch.tcl214
-rw-r--r--gdb/gdbtk/plugins/ChangeLog12
-rw-r--r--gdb/gdbtk/plugins/HOW-TO414
-rw-r--r--gdb/gdbtk/plugins/Make-rules165
-rw-r--r--gdb/gdbtk/plugins/Makefile.am4
-rw-r--r--gdb/gdbtk/plugins/Makefile.in447
-rw-r--r--gdb/gdbtk/plugins/acinclude.m41
-rw-r--r--gdb/gdbtk/plugins/aclocal.m4944
-rwxr-xr-xgdb/gdbtk/plugins/configure5082
-rw-r--r--gdb/gdbtk/plugins/configure.ac93
-rw-r--r--gdb/gdbtk/plugins/intel-pentium/ChangeLog43
-rw-r--r--gdb/gdbtk/plugins/intel-pentium/Makefile.in6
-rw-r--r--gdb/gdbtk/plugins/intel-pentium/cpuinfo.tcl33
-rw-r--r--gdb/gdbtk/plugins/intel-pentium/intel-pentium.tcl.in4
-rw-r--r--gdb/gdbtk/plugins/intel-pentium/msrselection.itb192
-rw-r--r--gdb/gdbtk/plugins/intel-pentium/msrselection.ith38
-rw-r--r--gdb/gdbtk/plugins/intel-pentium/pkgIndex.tcl1
-rw-r--r--gdb/gdbtk/plugins/intel-pentium/tclIndex17
-rw-r--r--gdb/gdbtk/plugins/plugins.tcl30
-rw-r--r--gdb/gdbtk/plugins/rhabout/ChangeLog24
-rw-r--r--gdb/gdbtk/plugins/rhabout/Makefile.in9
-rw-r--r--gdb/gdbtk/plugins/rhabout/pkgIndex.tcl2
-rw-r--r--gdb/gdbtk/plugins/rhabout/rhabout.c57
-rw-r--r--gdb/gdbtk/plugins/rhabout/rhabout.itcl87
-rw-r--r--gdb/gdbtk/plugins/rhabout/rhabout.tcl.in5
-rw-r--r--gdb/gdbtk/plugins/rhabout/tclIndex9
-rw-r--r--gdb/testsuite/gdb.gdbtk/ChangeLog329
-rw-r--r--gdb/testsuite/gdb.gdbtk/Makefile.in36
-rw-r--r--gdb/testsuite/gdb.gdbtk/README421
-rw-r--r--gdb/testsuite/gdb.gdbtk/browser.exp41
-rw-r--r--gdb/testsuite/gdb.gdbtk/browser.test686
-rw-r--r--gdb/testsuite/gdb.gdbtk/c_variable.c296
-rw-r--r--gdb/testsuite/gdb.gdbtk/c_variable.exp42
-rw-r--r--gdb/testsuite/gdb.gdbtk/c_variable.test2071
-rw-r--r--gdb/testsuite/gdb.gdbtk/configure2248
-rw-r--r--gdb/testsuite/gdb.gdbtk/configure.ac18
-rw-r--r--gdb/testsuite/gdb.gdbtk/console.exp42
-rw-r--r--gdb/testsuite/gdb.gdbtk/console.test491
-rw-r--r--gdb/testsuite/gdb.gdbtk/cpp_variable.cc33
-rw-r--r--gdb/testsuite/gdb.gdbtk/cpp_variable.exp48
-rw-r--r--gdb/testsuite/gdb.gdbtk/cpp_variable.h54
-rw-r--r--gdb/testsuite/gdb.gdbtk/cpp_variable.test594
-rw-r--r--gdb/testsuite/gdb.gdbtk/defs306
-rw-r--r--gdb/testsuite/gdb.gdbtk/insight-support.exp319
-rw-r--r--gdb/testsuite/gdb.gdbtk/list0.c43
-rw-r--r--gdb/testsuite/gdb.gdbtk/list0.h37
-rw-r--r--gdb/testsuite/gdb.gdbtk/list1.c39
-rw-r--r--gdb/testsuite/gdb.gdbtk/simple.c20
-rw-r--r--gdb/testsuite/gdb.gdbtk/srcwin.exp71
-rw-r--r--gdb/testsuite/gdb.gdbtk/srcwin.test1192
-rw-r--r--gdb/testsuite/gdb.gdbtk/srcwin2.test899
-rw-r--r--gdb/testsuite/gdb.gdbtk/srcwin3.test789
-rw-r--r--gdb/testsuite/gdb.gdbtk/stack1.c231
-rw-r--r--gdb/testsuite/gdb.gdbtk/stack2.c107
-rw-r--r--gdb/testsuite/gdb.gdbtk/windows.exp41
-rw-r--r--gdb/testsuite/gdb.gdbtk/windows.test131
-rw-r--r--intl/ChangeLog1115
-rw-r--r--intl/Makefile.in218
-rw-r--r--intl/acconfig.h14
-rw-r--r--intl/aclocal.m4387
-rw-r--r--intl/bindtextdom.c203
-rw-r--r--intl/cat-compat.c262
-rw-r--r--intl/config.in128
-rwxr-xr-xintl/configure2950
-rw-r--r--intl/configure.in10
-rw-r--r--intl/dcgettext.c624
-rw-r--r--intl/dgettext.c59
-rw-r--r--intl/explodename.c188
-rw-r--r--intl/finddomain.c216
-rw-r--r--intl/gettext.c70
-rw-r--r--intl/gettext.h105
-rw-r--r--intl/gettextP.h89
-rw-r--r--intl/hash-string.h59
-rw-r--r--intl/intl-compat.c76
-rw-r--r--intl/intlh.inst.in111
-rw-r--r--intl/l10nflist.c411
-rw-r--r--intl/libgettext.h182
-rw-r--r--intl/libintl.glibc120
-rw-r--r--intl/linux-msg.sed100
-rw-r--r--intl/loadinfo.h76
-rw-r--r--intl/loadmsgcat.c222
-rw-r--r--intl/localealias.c424
-rw-r--r--intl/po2tbl.sed.in102
-rw-r--r--intl/textdomain.c108
-rw-r--r--intl/xopen-msg.sed104
-rw-r--r--readline/CHANGELOG221
-rw-r--r--readline/CHANGES309
-rw-r--r--readline/ChangeLog.gdb4
-rw-r--r--readline/INSTALL16
-rw-r--r--readline/MANIFEST38
-rw-r--r--readline/Makefile.in50
-rw-r--r--readline/README16
-rw-r--r--readline/acconfig.h56
-rw-r--r--readline/aclocal.m42311
-rw-r--r--readline/bind.c303
-rw-r--r--readline/callback.c122
-rw-r--r--readline/chardefs.h8
-rw-r--r--readline/complete.c338
-rw-r--r--readline/config.h.bot22
-rw-r--r--readline/config.h.in43
-rwxr-xr-xreadline/configure1499
-rw-r--r--readline/configure.in124
-rw-r--r--readline/display.c497
-rw-r--r--readline/doc/ChangeLog.gdb4
-rw-r--r--readline/doc/Makefile.in76
-rw-r--r--readline/doc/hist.texinfo110
-rw-r--r--readline/doc/history.329
-rw-r--r--readline/doc/history.pdfbin166940 -> 0 bytes
-rw-r--r--readline/doc/hstech.texinfo550
-rw-r--r--readline/doc/hsuser.texinfo437
-rw-r--r--readline/doc/inc-hist.texinfo79
-rw-r--r--readline/doc/manvers.texinfo10
-rw-r--r--readline/doc/readline.346
-rw-r--r--readline/doc/readline.pdfbin311657 -> 0 bytes
-rw-r--r--readline/doc/rlman.texinfo108
-rw-r--r--readline/doc/rltech.texinfo2165
-rw-r--r--readline/doc/rluser.texinfo1796
-rw-r--r--readline/doc/rluserman.pdfbin172521 -> 0 bytes
-rw-r--r--readline/doc/rluserman.texinfo94
-rwxr-xr-xreadline/doc/texi2dvi192
-rw-r--r--readline/emacs_keymap.c6
-rw-r--r--readline/examples/ChangeLog.gdb4
-rw-r--r--readline/examples/Makefile.in36
-rw-r--r--readline/examples/histexamp.c118
-rw-r--r--readline/examples/rl.c9
-rw-r--r--readline/examples/rlcat.c6
-rw-r--r--readline/examples/rlfe.c1042
-rw-r--r--readline/examples/rltest.c6
-rw-r--r--readline/examples/rlversion.c6
-rw-r--r--readline/funmap.c2
-rw-r--r--readline/histexpand.c358
-rw-r--r--readline/histfile.c133
-rw-r--r--readline/history.c110
-rw-r--r--readline/history.h24
-rw-r--r--readline/histsearch.c6
-rw-r--r--readline/input.c56
-rw-r--r--readline/isearch.c770
-rw-r--r--readline/keymaps.c13
-rw-r--r--readline/kill.c41
-rw-r--r--readline/macro.c9
-rw-r--r--readline/mbutil.c60
-rw-r--r--readline/misc.c271
-rw-r--r--readline/nls.c37
-rw-r--r--readline/parens.c4
-rw-r--r--readline/posixdir.h10
-rw-r--r--readline/readline.c405
-rw-r--r--readline/readline.h116
-rw-r--r--readline/rldefs.h14
-rw-r--r--readline/rlmbutil.h49
-rw-r--r--readline/rlprivate.h142
-rw-r--r--readline/rlstdc.h2
-rw-r--r--readline/rltty.c199
-rw-r--r--readline/rltty.h32
-rw-r--r--readline/rltypedefs.h8
-rw-r--r--readline/savestring.c3
-rw-r--r--readline/search.c301
-rw-r--r--readline/shell.c39
-rw-r--r--readline/shlib/Makefile.in41
-rw-r--r--readline/signals.c51
-rwxr-xr-xreadline/support/shlib-install65
-rwxr-xr-xreadline/support/shobj-conf96
-rw-r--r--readline/terminal.c102
-rw-r--r--readline/text.c335
-rw-r--r--readline/tilde.c52
-rw-r--r--readline/tilde.h3
-rw-r--r--readline/undo.c5
-rw-r--r--readline/util.c23
-rw-r--r--readline/vi_keymap.c2
-rw-r--r--readline/vi_mode.c463
-rw-r--r--sim/sh64/ChangeLog392
-rw-r--r--sim/sh64/Makefile.in153
-rw-r--r--sim/sh64/arch.c47
-rw-r--r--sim/sh64/arch.h44
-rw-r--r--sim/sh64/config.in177
-rwxr-xr-xsim/sh64/configure9007
-rw-r--r--sim/sh64/configure.ac19
-rw-r--r--sim/sh64/cpu.c533
-rw-r--r--sim/sh64/cpu.h302
-rw-r--r--sim/sh64/cpuall.h70
-rw-r--r--sim/sh64/decode-compact.c2640
-rw-r--r--sim/sh64/decode-compact.h128
-rw-r--r--sim/sh64/decode-media.c2109
-rw-r--r--sim/sh64/decode-media.h122
-rw-r--r--sim/sh64/decode.h16
-rw-r--r--sim/sh64/defs-compact.h424
-rw-r--r--sim/sh64/defs-media.h926
-rw-r--r--sim/sh64/eng-compact.h34
-rw-r--r--sim/sh64/eng-media.h34
-rw-r--r--sim/sh64/eng.h24
-rw-r--r--sim/sh64/mloop-compact.c635
-rw-r--r--sim/sh64/mloop-media.c624
-rw-r--r--sim/sh64/sem-compact-switch.c4941
-rw-r--r--sim/sh64/sem-compact.c5290
-rw-r--r--sim/sh64/sem-media-switch.c5558
-rw-r--r--sim/sh64/sem-media.c5965
-rw-r--r--sim/sh64/sh-desc.c3287
-rw-r--r--sim/sh64/sh-desc.h249
-rw-r--r--sim/sh64/sh-opc.h216
-rw-r--r--sim/sh64/sh64-sim.h89
-rw-r--r--sim/sh64/sh64.c1030
-rw-r--r--sim/sh64/sim-if.c236
-rw-r--r--sim/sh64/sim-main.h75
-rw-r--r--sim/sh64/tconfig.in45
-rw-r--r--sim/testsuite/sim/sh64/ChangeLog21
-rw-r--r--sim/testsuite/sim/sh64/compact.exp19
-rw-r--r--sim/testsuite/sim/sh64/compact/ChangeLog26
-rw-r--r--sim/testsuite/sim/sh64/compact/add.cgs55
-rw-r--r--sim/testsuite/sim/sh64/compact/addc.cgs90
-rw-r--r--sim/testsuite/sim/sh64/compact/addi.cgs46
-rw-r--r--sim/testsuite/sim/sh64/compact/addv.cgs48
-rw-r--r--sim/testsuite/sim/sh64/compact/and.cgs33
-rw-r--r--sim/testsuite/sim/sh64/compact/andb.cgs24
-rw-r--r--sim/testsuite/sim/sh64/compact/andi.cgs43
-rw-r--r--sim/testsuite/sim/sh64/compact/bf.cgs24
-rw-r--r--sim/testsuite/sim/sh64/compact/bfs.cgs28
-rw-r--r--sim/testsuite/sim/sh64/compact/bra.cgs23
-rw-r--r--sim/testsuite/sim/sh64/compact/braf.cgs24
-rw-r--r--sim/testsuite/sim/sh64/compact/brk.cgs18
-rw-r--r--sim/testsuite/sim/sh64/compact/bsr.cgs21
-rw-r--r--sim/testsuite/sim/sh64/compact/bsrf.cgs22
-rw-r--r--sim/testsuite/sim/sh64/compact/bt.cgs24
-rw-r--r--sim/testsuite/sim/sh64/compact/bts.cgs28
-rw-r--r--sim/testsuite/sim/sh64/compact/clrmac.cgs13
-rw-r--r--sim/testsuite/sim/sh64/compact/clrs.cgs14
-rw-r--r--sim/testsuite/sim/sh64/compact/clrt.cgs16
-rw-r--r--sim/testsuite/sim/sh64/compact/cmpeq.cgs52
-rw-r--r--sim/testsuite/sim/sh64/compact/cmpeqi.cgs39
-rw-r--r--sim/testsuite/sim/sh64/compact/cmpge.cgs69
-rw-r--r--sim/testsuite/sim/sh64/compact/cmpgt.cgs69
-rw-r--r--sim/testsuite/sim/sh64/compact/cmphi.cgs68
-rw-r--r--sim/testsuite/sim/sh64/compact/cmphs.cgs59
-rw-r--r--sim/testsuite/sim/sh64/compact/cmppl.cgs37
-rw-r--r--sim/testsuite/sim/sh64/compact/cmppz.cgs37
-rw-r--r--sim/testsuite/sim/sh64/compact/cmpstr.cgs148
-rw-r--r--sim/testsuite/sim/sh64/compact/div0s.cgs52
-rw-r--r--sim/testsuite/sim/sh64/compact/div0u.cgs21
-rw-r--r--sim/testsuite/sim/sh64/compact/div1.cgs52
-rw-r--r--sim/testsuite/sim/sh64/compact/dmulsl.cgs115
-rw-r--r--sim/testsuite/sim/sh64/compact/dmulul.cgs53
-rw-r--r--sim/testsuite/sim/sh64/compact/dt.cgs42
-rw-r--r--sim/testsuite/sim/sh64/compact/extsb.cgs29
-rw-r--r--sim/testsuite/sim/sh64/compact/extsw.cgs32
-rw-r--r--sim/testsuite/sim/sh64/compact/extub.cgs31
-rw-r--r--sim/testsuite/sim/sh64/compact/extuw.cgs31
-rw-r--r--sim/testsuite/sim/sh64/compact/fabs.cgs88
-rw-r--r--sim/testsuite/sim/sh64/compact/fadd.cgs31
-rw-r--r--sim/testsuite/sim/sh64/compact/fcmpeq.cgs88
-rw-r--r--sim/testsuite/sim/sh64/compact/fcmpgt.cgs95
-rw-r--r--sim/testsuite/sim/sh64/compact/fcnvds.cgs13
-rw-r--r--sim/testsuite/sim/sh64/compact/fcnvsd.cgs27
-rw-r--r--sim/testsuite/sim/sh64/compact/fdiv.cgs83
-rw-r--r--sim/testsuite/sim/sh64/compact/fipr.cgs44
-rw-r--r--sim/testsuite/sim/sh64/compact/fldi0.cgs17
-rw-r--r--sim/testsuite/sim/sh64/compact/fldi1.cgs17
-rw-r--r--sim/testsuite/sim/sh64/compact/flds.cgs26
-rw-r--r--sim/testsuite/sim/sh64/compact/float.cgs80
-rw-r--r--sim/testsuite/sim/sh64/compact/fmac.cgs78
-rw-r--r--sim/testsuite/sim/sh64/compact/fmov.cgs273
-rw-r--r--sim/testsuite/sim/sh64/compact/fmul.cgs121
-rw-r--r--sim/testsuite/sim/sh64/compact/fneg.cgs83
-rw-r--r--sim/testsuite/sim/sh64/compact/frchg.cgs13
-rw-r--r--sim/testsuite/sim/sh64/compact/fschg.cgs13
-rw-r--r--sim/testsuite/sim/sh64/compact/fsqrt.cgs93
-rw-r--r--sim/testsuite/sim/sh64/compact/fsts.cgs11
-rw-r--r--sim/testsuite/sim/sh64/compact/fsub.cgs120
-rw-r--r--sim/testsuite/sim/sh64/compact/ftrc.cgs132
-rw-r--r--sim/testsuite/sim/sh64/compact/ftrv.cgs74
-rw-r--r--sim/testsuite/sim/sh64/compact/jmp.cgs29
-rw-r--r--sim/testsuite/sim/sh64/compact/jsr.cgs29
-rw-r--r--sim/testsuite/sim/sh64/compact/ldc-gbr.cgs22
-rw-r--r--sim/testsuite/sim/sh64/compact/ldcl-gbr.cgs28
-rw-r--r--sim/testsuite/sim/sh64/compact/lds-fpscr.cgs22
-rw-r--r--sim/testsuite/sim/sh64/compact/lds-fpul.cgs17
-rw-r--r--sim/testsuite/sim/sh64/compact/lds-mach.cgs23
-rw-r--r--sim/testsuite/sim/sh64/compact/lds-macl.cgs23
-rw-r--r--sim/testsuite/sim/sh64/compact/lds-pr.cgs23
-rw-r--r--sim/testsuite/sim/sh64/compact/ldsl-fpscr.cgs43
-rw-r--r--sim/testsuite/sim/sh64/compact/ldsl-fpul.cgs27
-rw-r--r--sim/testsuite/sim/sh64/compact/ldsl-mach.cgs26
-rw-r--r--sim/testsuite/sim/sh64/compact/ldsl-macl.cgs26
-rw-r--r--sim/testsuite/sim/sh64/compact/ldsl-pr.cgs28
-rw-r--r--sim/testsuite/sim/sh64/compact/macl.cgs76
-rw-r--r--sim/testsuite/sim/sh64/compact/macw.cgs70
-rw-r--r--sim/testsuite/sim/sh64/compact/mov.cgs40
-rw-r--r--sim/testsuite/sim/sh64/compact/mova.cgs29
-rw-r--r--sim/testsuite/sim/sh64/compact/movb1.cgs27
-rw-r--r--sim/testsuite/sim/sh64/compact/movb10.cgs25
-rw-r--r--sim/testsuite/sim/sh64/compact/movb2.cgs34
-rw-r--r--sim/testsuite/sim/sh64/compact/movb3.cgs30
-rw-r--r--sim/testsuite/sim/sh64/compact/movb4.cgs28
-rw-r--r--sim/testsuite/sim/sh64/compact/movb5.cgs25
-rw-r--r--sim/testsuite/sim/sh64/compact/movb6.cgs26
-rw-r--r--sim/testsuite/sim/sh64/compact/movb7.cgs35
-rw-r--r--sim/testsuite/sim/sh64/compact/movb8.cgs27
-rw-r--r--sim/testsuite/sim/sh64/compact/movb9.cgs27
-rw-r--r--sim/testsuite/sim/sh64/compact/movcal.cgs28
-rw-r--r--sim/testsuite/sim/sh64/compact/movi.cgs39
-rw-r--r--sim/testsuite/sim/sh64/compact/movl1.cgs31
-rw-r--r--sim/testsuite/sim/sh64/compact/movl10.cgs34
-rw-r--r--sim/testsuite/sim/sh64/compact/movl11.cgs32
-rw-r--r--sim/testsuite/sim/sh64/compact/movl2.cgs43
-rw-r--r--sim/testsuite/sim/sh64/compact/movl3.cgs36
-rw-r--r--sim/testsuite/sim/sh64/compact/movl4.cgs38
-rw-r--r--sim/testsuite/sim/sh64/compact/movl5.cgs37
-rw-r--r--sim/testsuite/sim/sh64/compact/movl6.cgs25
-rw-r--r--sim/testsuite/sim/sh64/compact/movl7.cgs37
-rw-r--r--sim/testsuite/sim/sh64/compact/movl8.cgs24
-rw-r--r--sim/testsuite/sim/sh64/compact/movl9.cgs24
-rw-r--r--sim/testsuite/sim/sh64/compact/movt.cgs28
-rw-r--r--sim/testsuite/sim/sh64/compact/movw1.cgs29
-rw-r--r--sim/testsuite/sim/sh64/compact/movw10.cgs32
-rw-r--r--sim/testsuite/sim/sh64/compact/movw11.cgs35
-rw-r--r--sim/testsuite/sim/sh64/compact/movw2.cgs36
-rw-r--r--sim/testsuite/sim/sh64/compact/movw3.cgs31
-rw-r--r--sim/testsuite/sim/sh64/compact/movw4.cgs31
-rw-r--r--sim/testsuite/sim/sh64/compact/movw5.cgs32
-rw-r--r--sim/testsuite/sim/sh64/compact/movw6.cgs30
-rw-r--r--sim/testsuite/sim/sh64/compact/movw7.cgs36
-rw-r--r--sim/testsuite/sim/sh64/compact/movw8.cgs31
-rw-r--r--sim/testsuite/sim/sh64/compact/movw9.cgs33
-rw-r--r--sim/testsuite/sim/sh64/compact/mull.cgs64
-rw-r--r--sim/testsuite/sim/sh64/compact/mulsw.cgs91
-rw-r--r--sim/testsuite/sim/sh64/compact/muluw.cgs96
-rw-r--r--sim/testsuite/sim/sh64/compact/neg.cgs55
-rw-r--r--sim/testsuite/sim/sh64/compact/negc.cgs66
-rw-r--r--sim/testsuite/sim/sh64/compact/nop.cgs13
-rw-r--r--sim/testsuite/sim/sh64/compact/not.cgs47
-rw-r--r--sim/testsuite/sim/sh64/compact/ocbi.cgs14
-rw-r--r--sim/testsuite/sim/sh64/compact/ocbp.cgs15
-rw-r--r--sim/testsuite/sim/sh64/compact/ocbwb.cgs15
-rw-r--r--sim/testsuite/sim/sh64/compact/or.cgs43
-rw-r--r--sim/testsuite/sim/sh64/compact/orb.cgs24
-rw-r--r--sim/testsuite/sim/sh64/compact/ori.cgs40
-rw-r--r--sim/testsuite/sim/sh64/compact/pref.cgs15
-rw-r--r--sim/testsuite/sim/sh64/compact/rotcl.cgs121
-rw-r--r--sim/testsuite/sim/sh64/compact/rotcr.cgs103
-rw-r--r--sim/testsuite/sim/sh64/compact/rotl.cgs62
-rw-r--r--sim/testsuite/sim/sh64/compact/rotr.cgs55
-rw-r--r--sim/testsuite/sim/sh64/compact/rts.cgs24
-rw-r--r--sim/testsuite/sim/sh64/compact/sets.cgs13
-rw-r--r--sim/testsuite/sim/sh64/compact/sett.cgs16
-rw-r--r--sim/testsuite/sim/sh64/compact/shad.cgs58
-rw-r--r--sim/testsuite/sim/sh64/compact/shal.cgs57
-rw-r--r--sim/testsuite/sim/sh64/compact/shar.cgs40
-rw-r--r--sim/testsuite/sim/sh64/compact/shld.cgs48
-rw-r--r--sim/testsuite/sim/sh64/compact/shll.cgs57
-rw-r--r--sim/testsuite/sim/sh64/compact/shll16.cgs44
-rw-r--r--sim/testsuite/sim/sh64/compact/shll2.cgs40
-rw-r--r--sim/testsuite/sim/sh64/compact/shll8.cgs38
-rw-r--r--sim/testsuite/sim/sh64/compact/shlr.cgs33
-rw-r--r--sim/testsuite/sim/sh64/compact/shlr16.cgs14
-rw-r--r--sim/testsuite/sim/sh64/compact/shlr2.cgs14
-rw-r--r--sim/testsuite/sim/sh64/compact/shlr8.cgs14
-rw-r--r--sim/testsuite/sim/sh64/compact/stc-gbr.cgs21
-rw-r--r--sim/testsuite/sim/sh64/compact/stcl-gbr.cgs27
-rw-r--r--sim/testsuite/sim/sh64/compact/sts-fpscr.cgs23
-rw-r--r--sim/testsuite/sim/sh64/compact/sts-fpul.cgs14
-rw-r--r--sim/testsuite/sim/sh64/compact/sts-mach.cgs22
-rw-r--r--sim/testsuite/sim/sh64/compact/sts-macl.cgs21
-rw-r--r--sim/testsuite/sim/sh64/compact/sts-pr.cgs22
-rw-r--r--sim/testsuite/sim/sh64/compact/stsl-fpscr.cgs28
-rw-r--r--sim/testsuite/sim/sh64/compact/stsl-fpul.cgs27
-rw-r--r--sim/testsuite/sim/sh64/compact/stsl-mach.cgs42
-rw-r--r--sim/testsuite/sim/sh64/compact/stsl-macl.cgs42
-rw-r--r--sim/testsuite/sim/sh64/compact/stsl-pr.cgs42
-rw-r--r--sim/testsuite/sim/sh64/compact/sub.cgs68
-rw-r--r--sim/testsuite/sim/sh64/compact/subc.cgs109
-rw-r--r--sim/testsuite/sim/sh64/compact/subv.cgs55
-rw-r--r--sim/testsuite/sim/sh64/compact/swapb.cgs44
-rw-r--r--sim/testsuite/sim/sh64/compact/swapw.cgs43
-rw-r--r--sim/testsuite/sim/sh64/compact/tasb.cgs26
-rw-r--r--sim/testsuite/sim/sh64/compact/testutils.inc49
-rw-r--r--sim/testsuite/sim/sh64/compact/trapa.cgs13
-rw-r--r--sim/testsuite/sim/sh64/compact/tst.cgs62
-rw-r--r--sim/testsuite/sim/sh64/compact/tstb.cgs30
-rw-r--r--sim/testsuite/sim/sh64/compact/tsti.cgs32
-rw-r--r--sim/testsuite/sim/sh64/compact/xor.cgs70
-rw-r--r--sim/testsuite/sim/sh64/compact/xorb.cgs24
-rw-r--r--sim/testsuite/sim/sh64/compact/xori.cgs50
-rw-r--r--sim/testsuite/sim/sh64/compact/xtrct.cgs46
-rw-r--r--sim/testsuite/sim/sh64/interwork.exp20
-rw-r--r--sim/testsuite/sim/sh64/media.exp19
-rw-r--r--sim/testsuite/sim/sh64/media/ChangeLog102
-rw-r--r--sim/testsuite/sim/sh64/media/add.cgs47
-rw-r--r--sim/testsuite/sim/sh64/media/addi.cgs37
-rw-r--r--sim/testsuite/sim/sh64/media/addil.cgs49
-rw-r--r--sim/testsuite/sim/sh64/media/addl.cgs61
-rw-r--r--sim/testsuite/sim/sh64/media/addzl.cgs39
-rw-r--r--sim/testsuite/sim/sh64/media/alloco.cgs10
-rw-r--r--sim/testsuite/sim/sh64/media/and.cgs68
-rw-r--r--sim/testsuite/sim/sh64/media/andc.cgs50
-rw-r--r--sim/testsuite/sim/sh64/media/andi.cgs46
-rw-r--r--sim/testsuite/sim/sh64/media/beq.cgs52
-rw-r--r--sim/testsuite/sim/sh64/media/beqi.cgs40
-rw-r--r--sim/testsuite/sim/sh64/media/bge.cgs40
-rw-r--r--sim/testsuite/sim/sh64/media/bgeu.cgs47
-rw-r--r--sim/testsuite/sim/sh64/media/bgt.cgs32
-rw-r--r--sim/testsuite/sim/sh64/media/bgtu.cgs36
-rw-r--r--sim/testsuite/sim/sh64/media/blink.cgs17
-rw-r--r--sim/testsuite/sim/sh64/media/bne.cgs23
-rw-r--r--sim/testsuite/sim/sh64/media/bnei.cgs23
-rw-r--r--sim/testsuite/sim/sh64/media/brk.cgs11
-rw-r--r--sim/testsuite/sim/sh64/media/byterev.cgs67
-rw-r--r--sim/testsuite/sim/sh64/media/cmpeq.cgs42
-rw-r--r--sim/testsuite/sim/sh64/media/cmpgt.cgs43
-rw-r--r--sim/testsuite/sim/sh64/media/cmpgtu.cgs43
-rw-r--r--sim/testsuite/sim/sh64/media/cmveq.cgs32
-rw-r--r--sim/testsuite/sim/sh64/media/cmvne.cgs32
-rw-r--r--sim/testsuite/sim/sh64/media/fabsd.cgs39
-rw-r--r--sim/testsuite/sim/sh64/media/fabss.cgs39
-rw-r--r--sim/testsuite/sim/sh64/media/faddd.cgs33
-rw-r--r--sim/testsuite/sim/sh64/media/fadds.cgs34
-rw-r--r--sim/testsuite/sim/sh64/media/fcmpeqd.cgs36
-rw-r--r--sim/testsuite/sim/sh64/media/fcmpeqs.cgs36
-rw-r--r--sim/testsuite/sim/sh64/media/fcmpged.cgs46
-rw-r--r--sim/testsuite/sim/sh64/media/fcmpges.cgs46
-rw-r--r--sim/testsuite/sim/sh64/media/fcmpgtd.cgs36
-rw-r--r--sim/testsuite/sim/sh64/media/fcmpgts.cgs36
-rw-r--r--sim/testsuite/sim/sh64/media/fcmpund.cgs26
-rw-r--r--sim/testsuite/sim/sh64/media/fcmpuns.cgs26
-rw-r--r--sim/testsuite/sim/sh64/media/fcnvds.cgs27
-rw-r--r--sim/testsuite/sim/sh64/media/fcnvsd.cgs27
-rw-r--r--sim/testsuite/sim/sh64/media/fdivd.cgs39
-rw-r--r--sim/testsuite/sim/sh64/media/fdivs.cgs39
-rw-r--r--sim/testsuite/sim/sh64/media/fgetscr.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/fiprs.cgs42
-rw-r--r--sim/testsuite/sim/sh64/media/fldd.cgs13
-rw-r--r--sim/testsuite/sim/sh64/media/fldp.cgs16
-rw-r--r--sim/testsuite/sim/sh64/media/flds.cgs13
-rw-r--r--sim/testsuite/sim/sh64/media/fldxd.cgs16
-rw-r--r--sim/testsuite/sim/sh64/media/fldxp.cgs22
-rw-r--r--sim/testsuite/sim/sh64/media/fldxs.cgs16
-rw-r--r--sim/testsuite/sim/sh64/media/floatld.cgs12
-rw-r--r--sim/testsuite/sim/sh64/media/floatls.cgs12
-rw-r--r--sim/testsuite/sim/sh64/media/floatqd.cgs12
-rw-r--r--sim/testsuite/sim/sh64/media/floatqs.cgs12
-rw-r--r--sim/testsuite/sim/sh64/media/fmacs.cgs39
-rw-r--r--sim/testsuite/sim/sh64/media/fmovd.cgs24
-rw-r--r--sim/testsuite/sim/sh64/media/fmovdq.cgs23
-rw-r--r--sim/testsuite/sim/sh64/media/fmovls.cgs26
-rw-r--r--sim/testsuite/sim/sh64/media/fmovqd.cgs22
-rw-r--r--sim/testsuite/sim/sh64/media/fmovs.cgs24
-rw-r--r--sim/testsuite/sim/sh64/media/fmovsl.cgs21
-rw-r--r--sim/testsuite/sim/sh64/media/fmuld.cgs30
-rw-r--r--sim/testsuite/sim/sh64/media/fmuls.cgs31
-rw-r--r--sim/testsuite/sim/sh64/media/fnegd.cgs35
-rw-r--r--sim/testsuite/sim/sh64/media/fnegs.cgs35
-rw-r--r--sim/testsuite/sim/sh64/media/fputscr.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/fsqrtd.cgs27
-rw-r--r--sim/testsuite/sim/sh64/media/fsqrts.cgs27
-rw-r--r--sim/testsuite/sim/sh64/media/fstd.cgs34
-rw-r--r--sim/testsuite/sim/sh64/media/fstp.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/fsts.cgs34
-rw-r--r--sim/testsuite/sim/sh64/media/fstxd.cgs31
-rw-r--r--sim/testsuite/sim/sh64/media/fstxp.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/fstxs.cgs30
-rw-r--r--sim/testsuite/sim/sh64/media/fsubd.cgs36
-rw-r--r--sim/testsuite/sim/sh64/media/fsubs.cgs36
-rw-r--r--sim/testsuite/sim/sh64/media/ftrcdl.cgs26
-rw-r--r--sim/testsuite/sim/sh64/media/ftrcdq.cgs24
-rw-r--r--sim/testsuite/sim/sh64/media/ftrcsl.cgs26
-rw-r--r--sim/testsuite/sim/sh64/media/ftrcsq.cgs25
-rw-r--r--sim/testsuite/sim/sh64/media/ftrvs.cgs67
-rw-r--r--sim/testsuite/sim/sh64/media/getcfg.cgs10
-rw-r--r--sim/testsuite/sim/sh64/media/getcon.cgs29
-rw-r--r--sim/testsuite/sim/sh64/media/gettr.cgs48
-rw-r--r--sim/testsuite/sim/sh64/media/icbi.cgs10
-rw-r--r--sim/testsuite/sim/sh64/media/ldb.cgs21
-rw-r--r--sim/testsuite/sim/sh64/media/ldhil.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/ldhiq.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/ldl.cgs21
-rw-r--r--sim/testsuite/sim/sh64/media/ldlol.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/ldloq.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/ldq.cgs21
-rw-r--r--sim/testsuite/sim/sh64/media/ldub.cgs22
-rw-r--r--sim/testsuite/sim/sh64/media/lduw.cgs22
-rw-r--r--sim/testsuite/sim/sh64/media/ldw.cgs21
-rw-r--r--sim/testsuite/sim/sh64/media/ldxb.cgs28
-rw-r--r--sim/testsuite/sim/sh64/media/ldxl.cgs28
-rw-r--r--sim/testsuite/sim/sh64/media/ldxq.cgs28
-rw-r--r--sim/testsuite/sim/sh64/media/ldxub.cgs28
-rw-r--r--sim/testsuite/sim/sh64/media/ldxuw.cgs29
-rw-r--r--sim/testsuite/sim/sh64/media/ldxw.cgs29
-rw-r--r--sim/testsuite/sim/sh64/media/mabsl.cgs39
-rw-r--r--sim/testsuite/sim/sh64/media/mabsw.cgs38
-rw-r--r--sim/testsuite/sim/sh64/media/maddl.cgs29
-rw-r--r--sim/testsuite/sim/sh64/media/maddsl.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/maddsub.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/maddsw.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/maddw.cgs29
-rw-r--r--sim/testsuite/sim/sh64/media/mcmpeqb.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mcmpeql.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mcmpeqw.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mcmpgtl.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mcmpgtub.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mcmpgtw.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mcmv.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mcnvslw.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mcnvswb.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mcnvswub.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mextr1.cgs67
-rw-r--r--sim/testsuite/sim/sh64/media/mextr2.cgs67
-rw-r--r--sim/testsuite/sim/sh64/media/mextr3.cgs67
-rw-r--r--sim/testsuite/sim/sh64/media/mextr4.cgs67
-rw-r--r--sim/testsuite/sim/sh64/media/mextr5.cgs67
-rw-r--r--sim/testsuite/sim/sh64/media/mextr6.cgs67
-rw-r--r--sim/testsuite/sim/sh64/media/mextr7.cgs67
-rw-r--r--sim/testsuite/sim/sh64/media/mmacfxwl.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mmacnfx-wl.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mmulfxl.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mmulfxrpw.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mmulfxw.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mmulhiwl.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mmull.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mmullowl.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mmulsumwq.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mmulw.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/movi.cgs29
-rw-r--r--sim/testsuite/sim/sh64/media/mpermw.cgs51
-rw-r--r--sim/testsuite/sim/sh64/media/msadubq.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mshaldsl.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mshaldsw.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mshardl.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mshardsq.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mshardw.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mshfhib.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mshfhil.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mshfhiw.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mshflob.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mshflol.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mshflow.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mshlldl.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mshlldw.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mshlrdl.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mshlrdw.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/msubl.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/msubsl.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/msubsub.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/msubsw.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/msubw.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mulsl.cgs54
-rw-r--r--sim/testsuite/sim/sh64/media/mulul.cgs54
-rw-r--r--sim/testsuite/sim/sh64/media/nop.cgs10
-rw-r--r--sim/testsuite/sim/sh64/media/nsb.cgs66
-rw-r--r--sim/testsuite/sim/sh64/media/ocbi.cgs10
-rw-r--r--sim/testsuite/sim/sh64/media/ocbp.cgs10
-rw-r--r--sim/testsuite/sim/sh64/media/ocbwb.cgs10
-rw-r--r--sim/testsuite/sim/sh64/media/or.cgs44
-rw-r--r--sim/testsuite/sim/sh64/media/ori.cgs41
-rw-r--r--sim/testsuite/sim/sh64/media/prefi.cgs10
-rw-r--r--sim/testsuite/sim/sh64/media/pta.cgs26
-rw-r--r--sim/testsuite/sim/sh64/media/ptabs.cgs25
-rw-r--r--sim/testsuite/sim/sh64/media/ptb.cgs29
-rw-r--r--sim/testsuite/sim/sh64/media/ptrel.cgs22
-rw-r--r--sim/testsuite/sim/sh64/media/putcfg.cgs10
-rw-r--r--sim/testsuite/sim/sh64/media/putcon.cgs30
-rw-r--r--sim/testsuite/sim/sh64/media/rte.cgs11
-rw-r--r--sim/testsuite/sim/sh64/media/shard.cgs30
-rw-r--r--sim/testsuite/sim/sh64/media/shardl.cgs45
-rw-r--r--sim/testsuite/sim/sh64/media/shari.cgs28
-rw-r--r--sim/testsuite/sim/sh64/media/sharil.cgs45
-rw-r--r--sim/testsuite/sim/sh64/media/shlld.cgs36
-rw-r--r--sim/testsuite/sim/sh64/media/shlldl.cgs34
-rw-r--r--sim/testsuite/sim/sh64/media/shlli.cgs30
-rw-r--r--sim/testsuite/sim/sh64/media/shllil.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/shlrd.cgs30
-rw-r--r--sim/testsuite/sim/sh64/media/shlrdl.cgs37
-rw-r--r--sim/testsuite/sim/sh64/media/shlri.cgs28
-rw-r--r--sim/testsuite/sim/sh64/media/shlril.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/shori.cgs35
-rw-r--r--sim/testsuite/sim/sh64/media/sleep.cgs10
-rw-r--r--sim/testsuite/sim/sh64/media/stb.cgs26
-rw-r--r--sim/testsuite/sim/sh64/media/sthil.cgs55
-rw-r--r--sim/testsuite/sim/sh64/media/sthiq.cgs79
-rw-r--r--sim/testsuite/sim/sh64/media/stl.cgs26
-rw-r--r--sim/testsuite/sim/sh64/media/stlol.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/stloq.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/stq.cgs26
-rw-r--r--sim/testsuite/sim/sh64/media/stw.cgs26
-rw-r--r--sim/testsuite/sim/sh64/media/stxb.cgs29
-rw-r--r--sim/testsuite/sim/sh64/media/stxl.cgs29
-rw-r--r--sim/testsuite/sim/sh64/media/stxq.cgs29
-rw-r--r--sim/testsuite/sim/sh64/media/stxw.cgs29
-rw-r--r--sim/testsuite/sim/sh64/media/sub.cgs42
-rw-r--r--sim/testsuite/sim/sh64/media/subl.cgs38
-rw-r--r--sim/testsuite/sim/sh64/media/swapq.cgs36
-rw-r--r--sim/testsuite/sim/sh64/media/synci.cgs10
-rw-r--r--sim/testsuite/sim/sh64/media/synco.cgs10
-rw-r--r--sim/testsuite/sim/sh64/media/testutils.inc51
-rw-r--r--sim/testsuite/sim/sh64/media/trapa.cgs11
-rw-r--r--sim/testsuite/sim/sh64/media/xor.cgs54
-rw-r--r--sim/testsuite/sim/sh64/media/xori.cgs48
-rw-r--r--sim/testsuite/sim/sh64/misc/fr-dr.s22
841 files changed, 8826 insertions, 152990 deletions
diff --git a/compile b/compile
deleted file mode 100644
index 1b1d2321695..00000000000
--- a/compile
+++ /dev/null
@@ -1,142 +0,0 @@
-#! /bin/sh
-# Wrapper for compilers which do not understand `-c -o'.
-
-scriptversion=2005-05-14.22
-
-# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
-# Written by Tom Tromey <tromey@cygnus.com>.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-case $1 in
- '')
- echo "$0: No command. Try \`$0 --help' for more information." 1>&2
- exit 1;
- ;;
- -h | --h*)
- cat <<\EOF
-Usage: compile [--help] [--version] PROGRAM [ARGS]
-
-Wrapper for compilers which do not understand `-c -o'.
-Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
-arguments, and rename the output as expected.
-
-If you are trying to build a whole package this is not the
-right script to run: please start by reading the file `INSTALL'.
-
-Report bugs to <bug-automake@gnu.org>.
-EOF
- exit $?
- ;;
- -v | --v*)
- echo "compile $scriptversion"
- exit $?
- ;;
-esac
-
-ofile=
-cfile=
-eat=
-
-for arg
-do
- if test -n "$eat"; then
- eat=
- else
- case $1 in
- -o)
- # configure might choose to run compile as `compile cc -o foo foo.c'.
- # So we strip `-o arg' only if arg is an object.
- eat=1
- case $2 in
- *.o | *.obj)
- ofile=$2
- ;;
- *)
- set x "$@" -o "$2"
- shift
- ;;
- esac
- ;;
- *.c)
- cfile=$1
- set x "$@" "$1"
- shift
- ;;
- *)
- set x "$@" "$1"
- shift
- ;;
- esac
- fi
- shift
-done
-
-if test -z "$ofile" || test -z "$cfile"; then
- # If no `-o' option was seen then we might have been invoked from a
- # pattern rule where we don't need one. That is ok -- this is a
- # normal compilation that the losing compiler can handle. If no
- # `.c' file was seen then we are probably linking. That is also
- # ok.
- exec "$@"
-fi
-
-# Name of file we expect compiler to create.
-cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
-
-# Create the lock directory.
-# Note: use `[/.-]' here to ensure that we don't use the same name
-# that we are using for the .o file. Also, base the name on the expected
-# object file name, since that is what matters with a parallel build.
-lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
-while true; do
- if mkdir "$lockdir" >/dev/null 2>&1; then
- break
- fi
- sleep 1
-done
-# FIXME: race condition here if user kills between mkdir and trap.
-trap "rmdir '$lockdir'; exit 1" 1 2 15
-
-# Run the compile.
-"$@"
-ret=$?
-
-if test -f "$cofile"; then
- mv "$cofile" "$ofile"
-elif test -f "${cofile}bj"; then
- mv "${cofile}bj" "$ofile"
-fi
-
-rmdir "$lockdir"
-exit $ret
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/gdb/gdbtk/ChangeLog b/gdb/gdbtk/ChangeLog
deleted file mode 100644
index 9447644e1a3..00000000000
--- a/gdb/gdbtk/ChangeLog
+++ /dev/null
@@ -1,35 +0,0 @@
-2006-03-29 Brian Dessent <brian@dessent.net>
-
- * generic/gdbtk-cmds.c: Include sys/cygwin.h if __CYGWIN__ defined.
- (gdb_path_conv): Call cygwin_conv_to_full_win32_path instead.
-
-2006-01-23 Keith Seitz <keiths@redhat.com>
-
- From Andrew Stubbs <andrew.stubbs@st.com>:
- * library/help/source.html: Add entries for the missing menu commands.
-
-2006-01-23 Keith Seitz <keiths@redhat.com>
-
- From Andrew Stubbs <andrew.stubbs@st.com>:
- * library/mempref.itb (MemPref::constructor): Allow the Byte Per Row
- combo box to accept arbitrary values.
- (MemPref::set_bytes_per_row): Validate the new value; reject invalid
- entries and round up to a multiple of the word size.
- (MemPref::apply): Read the value from the text box even if the user
- has not pressed return.
- (MemPref::enable_format): Ensure the bytes per row value is still valid.
- (MemPref::disable_format): Likewise.
- * library/mempref.ith (MemPref): Add $gbprlist.
- * library/help/memory.html: Update.
-
-2006-01-23 Keith Seitz <keiths@redhat.com>
-
- From Andrew Stubbs <andrew.stubbs@st.com>:
- * library/helpviewer.tcl (open_help): Add firefox and opera to the
- browser list used to display help.
-
-2006-01-23 Keith Seitz <keiths@redhat.comt>
-
- * ChangeLog: Cleared and saved to ...
- * ChagneLog-2005: ... here.
-
diff --git a/gdb/gdbtk/ChangeLog-2001 b/gdb/gdbtk/ChangeLog-2001
deleted file mode 100644
index b543b911d71..00000000000
--- a/gdb/gdbtk/ChangeLog-2001
+++ /dev/null
@@ -1,1719 +0,0 @@
-2001-12-21 Tom Tromey <tromey@redhat.com>
-
- * generic/gdbtk-cmds.h (full_lookup_symtab): Don't declare.
- * generic/gdbtk-cmds.c (gdb_find_file_command): Use
- lookup_symtab.
- (gdb_listfuncs): Likewise.
- (gdb_loadfile): Likewise.
- (full_lookup_symtab): Removed.
- * generic/gdbtk-bp.c (gdb_find_bp_at_line): Use lookup_symtab.
- (gdb_set_bp): Likewise.
-
-2001-12-21 Keith Seitz <keiths@redhat.com>
-
- * library/bpwin.ith (_select_and_popup): New private method.
- * library/bpwin.itb (bp_select): Don't bind to Button-3.
- (build_win): Bind Button-3 to _select_and_popup.
- (_select_and_popup): New private method.
-
-2001-12-18 Keith Seitz <keiths@redhat.com>
-
- * library/memwin.itb (incr_addr): Fix typo.
-
-2001-12-16 Andrew Cagney <ac131313@redhat.com>
-
- * generic/gdbtk-cmds.c (hex2bin): Replace LITTLE_ENDIAN with
- BFD_ENDIAN_LITTLE.
-
-2001-12-10 Ian Roxborough <irox@redhat.com>
-
- * library/interface.tcl (set_target_name): Call "pref getd"
- instead of "pref get" to avoid undefined preference error
- message for default-hostname.
-
-2001-12-07 Keith Seitz <keiths@redhat.com>
-
- * library/managedwin.itb (shutdown): Don't save geometry for
- plugins, either.
-
-2001-12-05 Keith Seitz <keiths@redhat.com>
-
- * library/console.itb (busy): Set the cursor to the watch.
- (idle): Reset cursor to normal.
-
-2001-11-30 Martin M. Hunt <hunt@redhat.com>
-
- * library/interface.tcl (gdbtk_eval): Remove
- undocumented debug function.
-
-2001-11-21 Tom Tromey <tromey@redhat.com>
-
- * library/interface.tcl (gdbtk_tcl_preloop): Override session's
- command-line arguments if required.
-
-2001-11-20 Keith Seitz <keiths@redhat.com>
-
- * generic/gdbtk.c (gdbtk_init): If DISPLAY is not set on Unix,
- clear the init_ui_hook so that gdb will properly initialize
- the cli.
-
-2001-11-08 Martin M. Hunt <hunt@redhat.com>
- * generic/gdbtk-cmds.c (gdb_eval): Add an optional
- format argument.
- (hex2bin): Swap bytes around if target is little endian.
- Fix loop count.
- (gdb_incr_addr): New function to do address arithmetic.
- Needed because some addresses are 64-bits and tcl can't
- deal with them, except as strings.
-
- * library/memwin.itb (MemWin::build_win): Add a label
- to indicate the target endianess.
- (MemWin::edit): Use gdb_incr_addr.
- (MemWin::busy): The constructor calls gdbtk_busy which
- calls this before the window has finished drawing, so
- don't disable items that don't exist yet.
- (MemWin::update_address): Set a flag, bad_expr, if the
- expression does not evaluate. Call gdb_eval with 'x' flag
- to force the result to be hex.
- (MemWin::BadExpr): Set bad_expr.
- (MemWin::incr_addr): Use gdb_incr_addr.
- (MemWin::update_addr): Return is bad_expr is set. Use
- gdb_incr_addr.
- (MemWin::goto): Call update_address.
- * library/memwin.itb: Declare private variable bad_expr.
-
- * library/util.tcl (gdbtk_endian): New procedure. Returns
- BIG or LITTLE to indicate target endianess.
-
-2001-11-08 Martin M. Hunt <hunt@redhat.com>
- * library/managedwin.itb (ManagedWin::shutdown): Fix
- typo in class name DebugWinDOpts.
-
- * library/debugwin.itb: Add MemWin to _classes.
-
-2001-11-05 Martin M. Hunt <hunt@redhat.com>
- * generic/gdbtk-cmds.h (gdbtk_set_result): Declare.
- A printf-like function to return error messages.
- * generic/gdbtk-cmds.c (gdbtk_set_result): New
- function.
- (gdb_cmd): Use gdbtk_set_result.
- (gdb_immediate_command): Ditto.
- (gdb_load_info): Ditto.
- (gdb_find_file_command): Ditto.
- (gdb_listfuncs): Ditto.
- (gdb_load_disassembly): Ditto.
- (gdb_loc): Ditto.
- (gdb_set_mem): Ditto.
- (gdb_get_mem): Ditto.
- (gdb_loadfile): Ditto.
- * generic/gdbtk-varobj.c (variable_format): Ditto.
- (variable_value): Ditto.
- * generic/gdbtk-stack.c (gdb_get_vars_command): Ditto.
- * generic/gdbtk-bp.c (gdb_get_breakpoint_info): Ditto.
- (gdb_set_bp): Ditto.
- (gdb_set_bp_addr): Ditto.
- (gdb_get_tracepoint_info): Ditto.
-
-2001-11-05 Martin M. Hunt <hunt@redhat.com>
-
- * library/stackwin.itb (StcakWin::reconfig): Destroy sbox
- if it exists.
-
- * library/process.itb (ProcessWin::reconfig): Destroy sbox
- if it exists. This fixes reconfig failures on Windows. Also
- destroy slbox.
-
- * library/bpwin.itb (BpWin::reconfig): Destroy sbox if
- it exists.This fixes reconfig failures on Windows. Also
- destroy sf
-
- * library/tdump.tcl (TdumpWin::reconfig): Delete sbox
- and stext then rebuild window.
-
-2001-11-05 Martin M. Hunt <hunt@redhat.com>
-
- * library/debugwin.itb (DebugWin::build_win):
- Initialize gdbtk_de(ERRORS_ONLY) and gdbtk_de(filter_var)
- (DebugWin::puts): Rewrite filter to handle new options.
- (DebugWinDOpts::build_win): Update list of classes. Change
- filter dialog so we can not display only errors and warnings
- or choose between displaying ALL classes except those selected
- or only selected classes. Fix "OK" button to apply
- changes before closing dialog.
- DebugWinOpts::_apply): Now takes an agrument that
- indicates if dialog should exit after applying filter.
-
- * library/debugwin.ith (_apply): Now takes an arg.
-
- * library/main.tcl: If GDBTK_DEBUGFILE is not set,
- use "insight.log" as the default. If GDBTK_DEBUG is set
- and nonzero, start logging debug messages to
- GDBTK_DEBUGFILE immediately. Never open the debug window
- automatically.
-
- * library/managedwin.itb (ManagedWin::shutdown): Don't
- save debug window options dialog on active list
-
- * library/srcwin.itb: Remove troublesome debug line.
-
-2001-11-05 Martin M. Hunt <hunt@redhat.com>
- * library/globalpref.itb (GlobalPref::_init_var):
- New method to initialize _saved and _new arrays.
- (GlobalPref::constructor): Call _init_var.
- (GlobalPref::_buildwin): Use _new array for prefs
- variables. Font optimizations. Remove troublesome
- fonts and sort the list.
- (GlobalPref::toggle_tracing_mode): Removed. Some
- functionality moved to _apply and _cancel.
- (GlobalPref::_apply): Set prefs with values from the
- _new array.
- (SrcPref::_cancel): Reset prefs with values from _saved.
- * library/globalpref.ith: Changed private variables
- and methods to start with underscore.
- (tracing_cb): Removed.
- (_init): Changed from proc to method.
-
-2001-11-01 Keith Seitz <keiths@redhat.com>
-
- * library/memwin.itb (update_addr): Evaluate the address
- to be sent to gdb_get_mem to prevent passing error strings
- to string_to_coreaddr in gdb_get_mem.
-
-2001-10-29 Martin M. Hunt <hunt@redhat.com>
-
- * library/debugwin.itb: Don't increment number of
- TopLevelWins.
-
- * library/managedwin.itb: Don't save DebugWins to
- active list.
-
-2001-10-29 Martin M. Hunt <hunt@redhat.com>
-
- * generic/gdbtk-bp.c (gdb_set_bp_addr): When setting
- the bp addr_string, use the string the function was called
- with instead of using sprintf to write a new one. This
- avoids a problem with truncating 64-bit addresses.
-
- * library/srcbar.itcl (SrcBar::create_buttons) Don't
- set width of address label.
- (SrcBar::address) When the address changes, recompute
- width of address label. If it is more than 10, force it
- to 18, otherwise use 10.
-
-2001-10-29 Martin M. Hunt <hunt@redhat.com>
-
- * generic/gdbtk-bp.c (gdb_find_bp_at_addr): Use
- string_to_core_addr to read address so 64 bits will work.
- (gdb_set_bp): Set error message with Tcl_SetObjResult()
- so it will be displayed.
- (gdb_set_bp_addr):Use string_to_core_addr to read address.
- Set error message with Tcl_SetObjResult().
-
- * generic/gdbtk-cmds.c (gdb_get_mem): :Use string_to_core_addr
- to read address. Set error message with Tcl_SetObjResult() or
- Tcl_WrongNumArgs.
-
-2001-10-27 Tom Tromey <tromey@redhat.com>
-
- * tclIndex: Updated.
- * library/main.tcl: Add session_notice_file_change to
- file_changed_hook.
- * library/session.tcl (session_load): Only load the executable.
- (session_notice_file_change): New proc.
- (SESSION_exe_name): New proc.
- (session_save): Use it.
- (session_notice_file_change): Likewise.
- * library/interface.tcl (gdbtk_tcl_exec_file_display): Don't call
- session_save.
- (gdbtk_tcl_preloop): Don't set executable name or try to find
- main. Notice a new session if required.
-
-2001-10-18 Martin M. Hunt <hunt@redhat.com>
-
- * library/srcpref.itb (SrcPref::contructor): Move array
- initialization to _init_var.
- (SrcPref::_init_var): New method to initialize _saved and
- _new arrays.
- (SrcPref::buildwin): Rename to _buildwin. Have widgets use
- _new instead of [pref varname ...]. Set initial value of
- tab size spinint.
- (SrcPref::_apply): Set prefs with values from the _new array.
- (SrcPref::_cancel): Reset disassembly flavor and don't call
- _save because nothing is saved unless OK is selected.
- (SrcPref::set_flavor): Rename to _set_flavor.
- (SrcPref::_pick): Just set _new, not prefs.
-
- * library/srcpref.ith: Add private variable _new and
- private method cancel. Rename others with leading underscore.
-
-2001-10-16 Andrew Cagney <ac131313@redhat.com>
-
- From 2001-08-29 John Moore <jmoore@redhat.com>:
- * gdbtk/generic/gdbtk-cmds.c (gdb_disassemble): Replaced
- parse_and_eval_address() with string_to_core_addr().
- (gdb_load_disassembly): Same.
- (gdb_set_mem): Ditto.
- * gdbtk/generic/gdbtk-stack.c (gdb_block_vars): Ditto.
- * gdbtk/generic/gdbtk-varobj.c (variable_create): Same.
-
-2001-10-17 Tom Tromey <tromey@cygnus.com>
-
- * console.itb (Console::_build_win): Handle bindings which
- are ";". Also, completely override underlying Text binding.
-
-2001-10-12 Tom Tromey <tromey@redhat.com>
-
- * library/console.itb (Console::_build_win): Bind Control-m and
- Control-j.
-
-2001-10-12 Daniel Jacobowitz <drow@mvista.com>
-
- * generic/gdbtk-cmds.c (gdb_listfuncs): Use ALL_BLOCK_SYMBOLS.
- * generic/gdbtk-stack.c (gdb_block_vars): Likewise.
- (gdb_get_blocks): Likewise.
- (gdb_get_vars_command): Likewise.
-
-2001-10-10 Ian Roxborough <irox@redhat.com>
-
- * library/gdbtoolbar.itcl (GDBToolBar::add): Add option
- for "custom" type.
- (GDBToolBar::toolbar_add_custom): new method.
-
-2001-10-06 Tom Tromey <tromey@redhat.com>
-
- * library/session.tcl (SESSION_recreate_bps): Use
- gdb_run_readline_command_no_output to recreate breakpoints.
- * library/interface.tcl (gdb_run_readline_command): Set
- readlineShowUser element of gdbtk_state.
- (gdb_run_readline_command_no_output): New proc.
- (initialize_gdbtk): Initialize readlineShowUser element.
- (gdbtk_tcl_readline_begin): Use readlineShowUser element.
- (gdbtk_tcl_readline): Likewise.
-
-2001-10-05 Keith Seitz <keiths@redhat.com>
-
- * generic/gdbtk-bp.c (get_breakpoint_commands): New function.
- (gdb_get_breakpoint_info): Use gdb_breakpoint_commands to
- assemble breakpoint commands information.
-
-2001-10-02 Tom Tromey <tromey@redhat.com>
-
- * library/tclIndex: Updated.
- * library/prefs.tcl (pref_set_defaults): Define gdb/editor
- preference.
- * library/srcpref.itb (SrcPref::constructor): Save gdb/editor
- preference.
- (SrcPref::build_win): Added external editor control.
- * library/srctextwin.itb (SrcTextWin::do_source_popup): Always
- enable external editor. Use `code' instead of `list'.
- * library/srcwin.itb (SrcWin::edit): Use Editor::edit.
- * library/editor.tcl: New file.
- * generic/gdbtk.c (enable_external_editor): Removed.
- (external_editor_command): Default to NULL.
- (gdbtk_init): Don't set enable_external_editor. Free external
- editor command when finished with it.
-
-2001-09-28 Tom Tromey <tromey@redhat.com>
-
- * library/console.itb (Console::_operate_and_get_next): New method.
- (Console::_setprompt): Insert next history element if requested.
- (Console::_build_win): Bind C-o to _operate_and_get_next.
- * library/console.ith (_operate_and_get_next): Declare.
- (_pendingHistElement): New variable.
-
-2001-09-27 Elena Zannoni <ezannoni@redhat.com>
-
- * library/targetselection.itb (build_win, default_port): Handle
- hpux 11.00.
-
-2001-09-27 Keith Seitz <keiths@redhat.com>
-
- * library/prefs.tcl (escape_value): Update to work
- with Tcl's new and old syntax.
-
-2001-09-19 Keith Seitz <keiths@redhat.com>
-
- * library/main.tcl: Append iwidgets library path, if needed.
- * generic/gdbtk.c (gdbtk_init): Add TCLLIBPATH to iwidgets
- package index.
- Define IWIDGETS_LIBRARY in interpreter so that we can add
- this path to the auto_path at the right time later.
-
-2001-09-10 Ian Roxborough <irox@redhat.com>
-
- * generic/gdbtk.c (gdbtk_init): Set IWIDGETS_LIBRARY if
- Insight is launched from within the build directory.
- * library/util.tcl (find_iwidgets_library): Removed.
- * library/main.tcl: Don't call find_iwidgets_library, do a
- package require instead.
-
-2001-08-28 Keith Seitz <keiths@redhat.com>
-
- * library/bpwin.itb (bp_select): Use standard preferences
- for selection fg & bg, not tixOption database.
-
- * process.itb, tracedlg.tcl: Remove all traces of those
- three evil little letters, "t", "i", "x".
-
-2001-08-28 Keith Seitz <keiths@redhat.com>
-
- * library/tracedlg.tcl (build_win): Use libgui's
- Labelledframe instead of tixLabelFrame.
- Use iwidgets::scrolledlistbox instead of tixScrolledListbox.
- (edit): Check if there is a selection in the listbox
- before proceeding.
- Escape method callbacks before passing to ActionDlg.
-
- * library/actiondlg.tcl (constructor): Use "gdb_reginfo"
-
-2001-08-28 Keith Seitz <keiths@redhat.com>
-
- * library/tdump.tcl (class TdumpWin): Inherit from GDBWin
- and ManagedWin.
- (constructor): Remove old itcl2 handling code and name the
- window.
- (build_win): Use iwidgets::scrolledtext instead of
- tixScrolledText.
- (twin): Remove unused variable. Use itk_component(stext)
- instead.
- (maxwidth): Remove unused variable.
- (destructor): Remove unused method.
- (config): Ditto.
-
-2001-08-28 Keith Seitz <keiths@redhat.com>
-
- * library/srcpref.itb (build_win): Use iwidgets::spinint
- instead of tixControl.
-
-2001-08-28 Keith Seitz <keiths@redhat.com>
-
- * library/process.ith (top): Remove unused protected variable.
- Use GDBWin::_top instead.
- (lb): Remove unused variable.
- (change_context): Remove parameter. It's not needed.
- * library/process.itb (constructor): Don't set the variable
- "top". It isn't needed. GDBWin has this information.
- (buildwin): Get rid of tixScrolledListbox. Use
- iwidgets::scrolledlistbox instead.
- Loose the balloon help. It annoys more than helps.
- (update): Use new scrolledlistbox component.
- Split the list of threads BEFORE doing llength. Someone
- shoot me if this has to be fixed one more time...
- (change_context): Update definition and usage.
- (cursor): Use GDBWin::_top instead of our own private copy.
-
-2001-08-28 Keith Seitz <keiths@redhat.com>
-
- * generic/gdbtk-cmds.c (gdb_disassemble_driver): We should be
- looking for "thread", not "threads" to determine if we have
- a multi-threaded child process.
-
-2001-08-28 Keith Seitz <keiths@redhat.com>
-
- * library/bpwin.itb (build_win): Get rid of tixScrolledWindow
- and use iwidgets::scrolledframe until something better comes
- along.
-
-2001-08-23 Tom Tromey <tromey@redhat.com>
-
- * library/srcwin.itb (SrcWin::fillFuncCB): Sort function names.
-
-2001-08-23 Martin M. Hunt <hunt@redhat.com>
-
- * library/targetselection.itb: Added PMON and DDB targets.
-
-2001-08-22 Tom Tromey <tromey@redhat.com>
-
- * library/prefs.tcl (pref_read): Version number appears in
- comment.
-
-2001-08-21 Keith Seitz <keiths@redhat.com>
-
- * generic/gdbtk.c (gdbtk_init): Gdb just fixed this. No
- need for the workaround I just checked in anymore.
-
-2001-08-21 Keith Seitz <keiths@redhat.com>
-
- * generic/gdbtk.c (gdbtk_init): Reinitialize disassemle info's
- stream parameter: we just deleted the one it saved when we
- re-routed gdb_stdout to our own gdb_stdout.
-
-2001-08-20 Keith Seitz <keiths@redhat.com>
-
- * library/stackwin.itb (build_win): Use iwidget's scrolled listbox
- instead of tix scrolled list box.
- (update): Update to use iwidget's scrolled list box.
- (change_frame): Ditto.
- Remove parameters.
- * library/stackwin.ith (change_frame): Remove all parameters.
-
-2001-08-20 Keith Seitz <keiths@redhat.com>
-
- * generic/gdbtk-cmds.c (gdb_load_disassembly): Save the original
- address from parse_and_eval_address: if find_pc_partial_function
- errors, we will lose our original address.
- If find_pc_partial_function does error, print out both
- the address we thought we were disassembling at AND the address
- we actually did disassemble at. This should help elide address-
- to-pointer and pointer-to-address problems.
- * library/srctextwin.itb (FillAssembly): When gdb_load_disassembly
- fails, use its error message instead of the cooked "Unable to
- Read insturctions..." message.
- (UnLoadFromCache): If oldpane is empty, don't try show it,
- don't try to set our view to it, don't do anything but
- erase the given pane.
-
-2001-08-17 Keith Seitz <keiths@redhat.com>
-
- * generic/gdbtk-varobj.c (variable_obj_command): Pass pointer
- to varobj* when calling variable_update (API changed).
- (variable_create): Don't pass varobj* to install_variable. It's
- not used.
- (variable_children): Likewise.
- (variable_update): Change parameters to accept pointer to
- varobj*. Matches API change in varobj_update.
- (install_variable): Remove unused "var" parameter.
-
-2001-08-16 Keith Seitz <keiths@redhat.com>
-
- * generic/gdbtk.c (gdbtk_init): Revert change from earlier.
- It is insufficient. We must get the absolute pathname
- from autoconf.
- Don't bother setting TCL_LIBRARY: it must be set already
- in order for us to execute a script.
-
-2001-08-16 Keith Seitz <keiths@redhat.com>
-
- * library/globalpref.ith (_change_font, _change_size): New
- private methods.
- (_size): New private variable.
- (font_changed, wfont_changed): Removed.
- * library/globalpref.itb (make_font_item): Change combobox
- callback to use _change_font.
- Replace tixControl with iwidgets::spinint.
- (font_changed, wfont_changed): Removed.
- (_change_font, _change_size): New private methods.
- * tclIndex: Regenerate.
-
-2001-08-16 Keith Seitz <keiths@redhat.com>
-
- * generic/gdbtk.c (gdbtk_init): Make sure we're working with
- absolute pathnames in the *_LIBRAY variables.
-
-2001-08-16 Keith Seitz <keiths@redhat.com>
-
- From Ian Roxborough <irox@redhat.com>
- * generic/gdbtk-hooks.c (x_event): Deal with Tcl API insanity
- for Tcl_ObjGetVar2 or Tcl_GetObjVar2.
- (gdbtk_trace_find): Likewise for Tcl_GlobalEvalObj
- or Tcl_EvalObj (TCL_EVAL_GLOBAL).
-
-2001-08-15 Keith Seitz <keiths@redhat.com>
-
- * generic/gdbtk.c (gdbtk_init): Don't assume a particular
- layout for the source directory, let the Makefile tell us
- where the real source directory is.
- When compiling under Cygwin, convert the (posix) path to a
- win32 path, which is what tcl really wants.
-
-2001-08-15 Ian Roxborough <irox@redhat.com>
-
- * generic/gdbtk.c (gdbtk_init): If Insight isn't
- executed from inside a directory called "bin",
- assume that we are being running from the build
- directory and set the *_LIBRARY variables to point
- to (hopefully) the correct source directory.
-
-2001-08-13 Keith Seitz <keiths@redhat.com>
-
- * library/regwin.ith: Rewrite.
- * library/regwin.itb: Rewrite.
- * library/tclIndex: Regenerate.
-
-2001-08-13 Keith Seitz <keiths@redhat.com>
-
- * generic/gdbtk-register.c (gdb_register_info): New function.
- Consolidates all register handling.
- (get_register_size): New function.
- (gdb_changed_register_list, gdb_fetch_registers,
- gdb_regnames): Deprecate.
- (setup_architecture_data): Free old register cache
- when necessary.
-
-2001-08-13 Keith Seitz <keiths@redhat.com>
-
- * generic/gdbtk-hooks.c (gdbtk_add_hooks): Register
- architecture_changed event handler.
- (gdbtk_architecture_changed): New function.
- * library/gdbevent.ith (class ArchChangdEvent): New event.
- * library/ehandler.ith (arch_changed): New method. Handler
- for ArchChangedEvents.
- * library/interface.tcl (gdbtk_tcl_architecture_changed): New
- proc to handle architecture change events.
-
-2001-08-09 Keith Seitz <keiths@redhat.com>
-
- * library/prefs.tcl (pref_set_defaults): Add new font
- color defaults for highlighting, headers, selecting, and "normal".
- Get rid of gdb/variable/highlight_fg and gdb/reg/highlight_fg.
- * library/variables.tcl (build_win): Use gdb/font/highlight_fg
- and gdb/font/highilght_bg to set highlight style.
- * library/memwin.itb (build_win): Use header_fg and header_bg.
-
-2001-08-03 Keith Seitz <keiths@redhat.com>
-
- * library/srcbar.itcl (_post): New method.
- (_update_file_menu): New method.
- (create_file_menu): Move the guts to _update_file_menu.
- Add a post command to the menu.
- * library/interface.tcl (gdbtk_tcl_file_changed): Catch the
- call to run_hooks.
- (gdbtk_tcl_exec_file_display): Save the new session, too.
- (set_exe_name): Don't bother saving the session here.
- (_close_file): Save the session here, too.
- (gdbtk_clear_file): Catch the call to run_hooks, too.
- * library/gdbmenubar.itcl (menubar_new_menu): Allow caller
- to specify optional arguments to be passed to Tk when
- creating the menu.
- Tk's "menu add" command returns an empty string. Save the
- menu's index in the parent instead. This is what all
- the menu subcommands want.
-
-2001-08-02 Keith Seitz <keiths@redhat.com>
-
- * generic/gdbtk-bp.c (gdb_get_breakpoint_info): Update
- with recent breakpoint structure changes in gdb.
- (gdb_set_bp_addr): Likewise.
- (gdb_get_tracepoint_info): Update with recent tracepoint
- structure changes in gdb.
-
-2001-07-31 Elena Zannoni <ezannoni@redhat.com>
-
- * generic/gdbtk-cmds.c: Don't include regcache.h.
- * generic/gdbtk-register.c: Include regcache.h.
-
-2001-07-26 Jonathan Larmour <jlarmour@redhat.com>
-
- * library/prefs.tcl (pref_set_defaults): Add additional entry
- points for eCos if main is not present.
-
-2001-07-21 Martin M. Hunt <hunt@redhat.com>
-
- * library/interface.tcl (gdbtk_locate_main): Fix function
- so that it returns either a null string or a valid location,
- as documented.
-
- * library/variables.tcl (build_menu_helper): Set
- the Format menu option to "disabled" initially.
-
-2001-07-20 Martin M. Hunt <hunt@redhat.com>
-
- * library/managedwin.itb: Revert to global to properly
- initialize geometry with some window managers.
- * library/managedwin.ith (shutdown): Remove _geometry.
-
- * library/memwin.itb: Fix syntax to open a new window
- using the "-force" flag.
-
- * generic/gdbtk-register.c (gdb_regnames): Fix 'if'
- statement so count is decremented only if "-numbers"
- is the first arg.
-
-2001-07-18 Martin M. Hunt <hunt@redhat.com>
-
- * library/util.tcl (find_iwidgets_library): Look
- for iwidgets3* so we don't accidently find iwidgets2.x.
-
-2001-07-16 Nick Duffek <nsd@redhat.com>
-
- * library/regwin.itb (RegWin::build_win): Add radio button
- for unsigned register format.
- (RegWin::reg_select): Iterate through 8 rather than 7 formats.
- (RegWin::but3): Add menu option for unsigned register format.
-
-2001-07-13 Keith Seitz <keiths@redhat.com>
-
- * library/download.itb (constructor): Use the iwidgets
- feedback widget instead of tixMeter.
- Pack all the topmost widgets together -- don't use grid.
- (update_download): Support the feedback widget.
- (done): Ditto.
-
- * library/download.ith (steps): New private variable.
- (num_steps): New common.
-
-2001-07-12 Keith Seitz <keiths@redhat.com>
-
- * library/srcbar.itcl (create_trace_buttons): Fix
- syntax errors.
-
- * library/tracedlg.tcl: Update to work with Itcl3.0
- and ManagedWin.
-
- * library/actiondlg.tcl: Update to work with Itcl3.0
- and ManagedWin.
- (build_win): Use iwidgets scrolled listbox instead
- of the tix one.
-
-2001-07-05 Keith Seitz <keiths@redhat.com>
-
- * library/managedwin.itb (_create): Don't pass "-over"
- to center_window unless we really are asked to put the
- window over another!
-
-2001-06-18 Keith Seitz <keiths@redhat.com>
-
- * library/managedwin.itb (_create): When creating a
- window over another, be sure to center on the window,
- not the object.
-
-2001-06-13 Keith Seitz <keiths@redhat.com>
-
- * generic/gdbtk-bp.c (gdbtk_tracepoint_create): Change
- parameter to int to match breakpoint notifications.
- (gdbtk_tracepoint_modify): Ditto.
- (gdbtk_tracepoint_delete): Ditto.
- (tracepoint_notify): Ditto.
- * generic/gdbtk-hooks.c (gdbtk_add_hooks): Remove
- tracepoint hooks and install tracepoint event handlers.
-
-2001-06-11 Tom Tromey <tromey@redhat.com>
-
- * library/help/session.html: New file.
- * library/help/index.html: Added link.
-
- * library/session.tcl (session_save): Save breakpoints.
- (SESSION_serialize_bps): New proc.
- (SESSION_recreate_bps): New proc.
- (session_load): Recreate breakpoints.
- * library/util.tcl (bp_exists): Expect user specification in
- breakpoint info.
- * library/srctextwin.itb (SrcTextWin::showBPBalloon): Expect user
- specification in breakpoint info.
- * library/gdbevent.itb (BreakpointEvent::_init): Initialize
- _user_specification.
- (BreakpointEvent::get): Handle user_specification.
- * library/gdbevent.ith (BreakpointEvent): Added
- _user_specification field.
- * library/bpwin.itb (BpWin::bp_store): Expect user specification
- and use it when saving.
- (BpWin::bp_type): Expect user specification.
- * generic/gdbtk-bp.c (BREAKPOINT_IS_WATCHPOINT): New macro.
- (gdb_get_breakpoint_info): Added `user specification' to result.
-
-2001-06-11 Keith Seitz <keiths@redhat.com>
-
- * generic/gdbtk-stack.c (gdb_stack): Return TCL_ERROR if
- we are unable to get the current frame. get_current_frame
- may have output an error message.
-
-2001-06-07 Keith Seitz <keiths@redhat.com>
-
- * generic/gdbtk-hooks.c (x_event): Remove unused variable "count".
- (tracepoint_notify): Remove superfluous declaration. This funtion
- was moved to gdbtk-bp.c.
-
- * generic/gdbtk-bp.c (gdb_find_bp_at_addr): Remove unused variable
- "b".
- (gdb_set_bp): Remove unused variable "cmd".
- (gdb_set_bp_addr): Remove unused variables "cmd" and "filename".
-
- * generic/gdbtk.c (gdbtk_init): Remove unused variables
- "auto_path_name", "auto_path_elem", and "found_main".
-
-2001-06-05 Martin Hunt <hunt@redhat.com>
-
- * generic/gdbtk.c (_initialize_gdbtk): Don't close console yet.
- (gdbtk_init): Wait until after tcl/tk stuff is all initialized
- to close console (on Windows) and redirect ouput.
-
-2001-06-05 Martin Hunt <hunt@redhat.com>
-
- * library/globalpref.itb(build_win): Don't change directory
- before building icon combobox. Add debug lines.
-
-2001-06-04 Keith Seitz <keiths@redhat.com>
-
- * library/srcbar.itcl (constructor): Set the toolbar's initial
- state.
-
-2001-06-04 Keith Seitz <keiths@redhat.com>
-
- * library/interface.tcl (gdb_update_hook): Mark as deprecated.
- (gdbtk_update): Dispatch and UpdateEvent, too.
- * library/ehandler.ith (update): New event handler.
- * library/gdbevent.ith (UpdateEvent): New event.
- * library/gdbevent.itb (UpdateEvent::constructor): New method.
- (UpdateEvent::get): New method.
- * library/kod.ith (udpate): Match event handler definition.
- * library/kod.itb (update): Ditto.
- (build_win): Pass dummy argument to update method.
- (top): Ditto.
- (up): Ditto.
- (set_variable): Ditto.
- * library/memwin.ith (update): Match event handler definition.
- * library/memwin.itb (update): Ditto.
- (constructor): Remove gdb_update_hook.
- (destructor): Ditto.
- * library/process.ith (update): Match event handler definition.
- * library/process.itb (update): Ditto.
- (constructor): Remove gdb_update_hook.
- (destructor): Ditto.
- (build_win): Pass dummy argument to update method.
- * library/regwin.ith (update): Match event handler definition.
- * library/regwin.itb (update): Ditto.
- (constructor): Remove gdb_update_hook.
- (destructor): Ditto.
- (build_win): Pass dummy argument to update method.
- (but3): Ditto.
- (unedit): Ditto.
- * library/stackwin.ith (update): Match event handler definition.
- * library/stackwin.itb (update): Ditto.
- (constructor): Remove gdb_update_hook.
- (destructor): Ditto.
- (build_win): Pass dummy argument to update method.
- * library/tdump.tcl (update): Match event handler definition.
- (constructor): Remove gdb_update_hook.
- (destructor): Ditto.
- (build_win): Pass dummy argument to update method.
- * library/variables.tcl (update): Match event handler definition.
- (build_win): Pass dummy argument to update method.
- * library/locals.tcl (update): Match event handler definition.
- (constructor): Pass dummy argument to update method.
- * library/watch.tcl (update): Match event handler definition.
- Pass dummy argument to VariableWin::update.
- (add): Pass dummy argument to update method.
- * library/srcwin.ith (update): New method.
- (update_hook_init): Remove.
- * library/srcwin.itb (update): New method.
- (constructor): Remove gdb_update_hook.
- (destructor): Ditto.
- * tclIndex: Regenerate.
-
-2001-06-01 Keith Seitz <keiths@redhat.com>
-
- * library/console.itb (constructor): Pass dummy argument
- to idle method.
- (destructor): Ditto.
-
-2001-05-31 Keith Seitz <keiths@redhat.com>
-
- * library/interface.tcl (gdbtk_idle): Run hooks, too,
- until they're all gone.
-
-2001-05-31 Keith Seitz <keiths@redhat.com>
-
- * library/interface.tcl (gdb_idle_hook): Mark as deprecated.
- (gdbtk_idle): Dispatch an IdleEvent. gdb_idle_hook is gone.
- * library/ehandler.ith (idle): New event handler.
- * library/gdbevent.ith (IdleEvent): New event.
- * library/console.ith (idle): Match event handler definition.
- * library/console.itb (idle): Ditto.
- (constructor): Remove gdb_idle_hook.
- (destructor): Ditto.
- * library/kod.ith (idle): Match event handler definition.
- * library/kod.itb (idle): Ditto.
- (constructor): Remove gdb_idle_hook.
- (destructor): Ditto.
- * library/memwin.ith (idle): Match event handler definition.
- * library/memwin.itb (idle): Ditto.
- (constructor): Remove gdb_idle_hook.
- (destructor): Ditto.
- * library/pluginwin.itcl (stopped): Rename to "idle" and
- match event handler definition.
- Fix misleading comments.
- * library/process.ith (idle): Match event handler definition.
- * library/process.itb (idle): Ditto.
- (constructor): Remove gdb_idle_hook.
- (destructor): Ditto.
- * library/regwin.ith (idle): Match event handler definition.
- * library/regwin.itb (idle): Ditto.
- (constructor): Remove gdb_idle_hook.
- (destructor): Ditto.
- * library/srcbar.itcl (idle): New method.
- (constructor): Remove gdb_idle_hook.
- (destructor): Ditto.
- * library/srcwin.ith (idle): Match event handler definition.
- * library/srcwin.itb (idle): Ditto.
- (constructor): Remove gdb_idle_hook.
- (destructor): Ditto.
- * library/stackwin.ith (idle): Match event handler definition.
- * library/stackwin.itb (idle): Ditto.
- (constructor): Remove gdb_idle_hook.
- (destructor): Ditto.
- * library/variables.tcl (idle): Match event handler definition.
- (constructor): Remove gdb_idle_hook.
- (destructor): Ditto.
- * library/plugins/rhabout/rhabout.itcl (stopped): Rename
- to "idle" and match new event handler definition.
- * library/tclIndex: Regenerated.
-
-2001-05-31 Keith Seitz <keiths@redhat.com>
-
- * library/interface.tcl (gdb_busy_hook): Deprecate.
- (gdbtk_busy): Create and dispatch a BusyEvent instead
- of running hooks.
- * library/ehandler.ith (busy): New event handler.
- * library/gdbevent.ith (BusyEvent): New event class.
- * library/console.ith: Inherit from GDBEventHandler.
- (busy): Match event handler definition.
- * library/console.itb (busy): Ditto.
- (constructor): Remove gdb_busy_event.
- (destructor): Ditto.
- * library/kod.ith (busy): Match event handler definition.
- * library/kod.itb (busy): Ditto.
- (constructor): Remove gdb_busy_hook.
- (destructor): Ditto.
- * library/memwin.ith (busy): Match event handler definition.
- * library/memwin.itb (busy): Ditto.
- (constructor): Remove gdb_busy_hook.
- (destructor): Ditto.
- * library/pluginwin.itcl (running): Rename to "busy" and
- match event handler definition.
- (consturctor): Remove gdb_busy_hook.
- (destructor): Ditto.
- * library/process.ith (busy): Match event handler definition.
- * library/process.itb (busy): Ditto.
- (constructor): Remove gdb_busy_hook.
- (destructor): Ditto.
- * library/regwin.ith (busy): Match event handler definition.
- * library/regwin.itb (busy): Ditto.
- (constructor): Remove gdb_busy_hook.
- (destructor): Ditto.
- * library/srcbar.itcl (constructor): Remove gdb_busy_hook.
- (destructor): Ditto.
- (busy): New method.
- * library/srcwin.ith (busy): Match event handler definition.
- * library/srcwin.itb (busy): Ditto.
- Only do the "busy" stuff if do_updates is set.
- (toggle_updates): Remove gdb_busy_hook.
- (constructor): Ditto.
- (destructor): Ditto.
- * library/stackwin.ith (busy): Match event handler definition.
- * library/stackwin.itb (busy): Ditto.
- (constructor): Remove gdb_busy_hook.
- (destructor): Ditto.
- * library/variables.tcl (constructor): Ditto.
- (destructor): Ditto.
- (disable_ui): Rename to "busy" and match event handler
- definition.
- * library/plugins/rhabout/rhabout.itcl (running): Rename
- to "busy" and match new event handler definition.
- * library/tclIndex: Regenerated.
-
-2001-05-25 Keith Seitz <keiths@cygnus.com>
-
- * generic/gdbtk-cmds.c (bin2hex): New function.
- (fromhex): New function.
- (gdb_set_mem): New function.
- (Gdbtk_Init): Add new command, "gdb_set_mem".
- * library/memwin.itb (edit): Use "gdb_set_mem" to set
- memory, not some gdb_cmd contrivance.
- When sending data to gdb_set_mem, make sure that it
- is properly zero-padded.
-
-2001-05-22 Keith Seitz <keiths@cygnus.com>
-
- * memwin.ith (error_dialog): Declare public method.
- * memwin.itb (error_dialog): Define.
- (edit): When attempting to set memory, post an error dialog
- if gdb told us an error occurred while writing the memory.
-
-2001-05-22 Keith Seitz <keiths@cygnus.com>
-
- * library/interface.tcl (gdbtk_tcl_file_changed): Handle
- the case of empty-string files, sent by gdb when the
- user requests to reset the file.
- (_close_file): New proc to deal with closing an exe.
- * library/srcbar.itcl (create_file_menu): Add "Close" menu
- option.
- (create_view_menu): Change key binding for Watch Window to
- Ctrl+T to accomodate "Close" going to Ctrl+W.
- * library/srctextwin.itb (config_win): Update key binding
- for Watch Window.
- Add key binding for Close.
- (do_key): Add "close".
- (_clear_cache): Finally implement. I think this works now.
-
-2001-05-22 Keith Seitz <keiths@cygnus.com>
-
- * library/variables.tcl (postMenu): Add mysterious workaround
- for popup menu bug in Tk for windows.
- Highlight the selection, too.
-
-2001-05-21 Keith Seitz <keiths@cygnus.com>
-
- * library/managedwin.itb (_create): Check the geometry of
- any window we create. Don't create a window that is
- bigger than the screen.
-
-2001-05-18 Keith Seitz <keiths@cygnus.com>
-
- * library/managedwin.ith (_geometry): Use a protected variable
- instead of a global from ManagedWin::reveal.
- (open): Make arg list reflect managedwin.itb.
- * library/managedwin.itb (window_name): Use class variable
- _top instead of recomputing the toplevel every time.
- (reveal): Ditto.
- Use class variable "_geometry" instead of global variable.
- (shutdown): Do not save ModalDialogs.
- (_create): If centering the new window, use libgui's
- center_window to do it.
-
-2001-05-18 Keith Seitz <keiths@cygnus.com>
-
- * generic/gdbtk-hooks.c (gdbtk_wait): Change integer pid
- argument to match gdb's new "ptid_t" pids.
-
-2001-05-14 Keith Seitz <keiths@cygnus.com>
-
- * library/interface.tcl (gdbtk_quit_check): Don't save sessions
- here. It doesn't work for the Console Window.
- (gdbtk_cleanup): Save session information here.
- (gdbtk_tcl_exec_file_display): When files are loaded,
- get the full pathname to the exe.
-
-2001-05-11 Tom Tromey <tromey@redhat.com>
-
- * library/prefs.tcl (pref_save): Fix bug when key in gdb space has
- extra `/' in it.
-
-2001-05-11 Kevin Buettner <kevinb@redhat.com>
-
- * generic/gdbtk-bp.c (set_raw_breakpoint): Revise declaration
- to match the recently changed declaration in breakpoint.c.
- Update all callers.
-
-2001-05-11 Keith Seitz <keiths@cygnus.com>
-
- * generic/gdbtk-bp.c (gdbtk_create_breakpoint): Safe guard
- against "invalid" (internal) breakpoint numbers.
- (gdbtk_modify_breakpoint): Ditto.
- (gdbtk_delete_breakpoint): Ditto.
-
-2001-05-10 Keith Seitz <keiths@cygnus.com>
-
- * generic/gdbtk-bp.c (gdb_set_bp): Generate a breakpoint event
- when we create a breakpoint. The hook is no longer used.
- (gdb_set_bp_addr): Ditto.
-
-2001-05-10 Keith Seitz <keiths@cygnus.com>
-
- * generic/gdbtk-bp.c (breakpoint_list, breakpoint_list_size): New
- variables. Gdb is forcing us to maintain our own breakpoint
- database.
- (Gdbtk_Breakpoint_Init): Initialize our breakpoint database.
- (gdb_find_bp_at_addr): Use our breakpoint database.
- (gdb_find_bp_at_line): Ditto.
- (gdb_get_breakpoint_list): Ditto.
- (gdb_get_breakpoint_info): Remove deleted breakpoint hack.
- (gdbtk_create_breakpoint): Moved here from gdbtk-hooks.c.
- Add breakpoint to our breakpoint database.
- (gdbtk_modify_breakpoint): Ditto the move.
- (gdbtk_delete_breakpoint): Ditto the move.
- Remove breakpoint from our database.
- (gdb_get_tracepoint_info): Remove delete tracepoint hack.
- It's not needed for tracepoints: they were implemented properly.
- (gdbtk_create_tracepoint): Moved here from gdbtk-hooks.c.
- (gdbtk_modify_tracepoint): Ditto.
- (gdbtk_delete_tracepoint): Ditto.
- * generic/gdbtk-hooks.c: Include "gdb-events.h".
- (gdbtk_create_breakpoint): Moved to gdbtk-bp.c
- (gdbtk_modify_breakpoint): Ditto.
- (gdbtk_delete_breakpoint): Ditto.
- (breakpoint_notify): Ditto.
- (gdbtk_create_tracepoint): Ditto.
- (gdbtk_modify_tracepoint): Ditto.
- (gdbtk_delete_tracepoint): Ditto.
- (tracepoint_notify): Ditto.
- (report_error): No longer static.
- (gdbtk_add_hooks): Create our own event handler
- vector and register breakpoint_create, breakpoint_modify,
- and breakpoint_delete handlers in gdbtk-bp.c.
-
-2001-05-10 Keith Seitz <keiths@cygnus.com>
-
- * generic/gdbtk-cmds.c: Put on diet. All breakpoint-,
- tracepoint-, register-, and stack-related functions moved
- into separate files.
- (call_wrapper): Renamed to "gdbtk_call_wrapper" and export.
- Update all callers.
- * generic/gdbtk.h: Move all breakpoint-related stuff into
- gdbtk-bp.c.
- Remove declaration for "call_wrapper". Now in gdbtk-cmds.h
- (and called "gdbtk_call_wrapper").
- * generic/gdbtk-varobj.c: Include "gdbtk-cmds.h".
- * generic/gdbtk-cmds.h: New file.
- * generic/gdbtk-bp.c: New file.
- * generic/gdbtk-register.c: New file.
- * generic/gdbtk-stack.c: New file.
-
-2001-05-09 Keith Seitz <keiths@cygnus.com>
-
- * library/interface.tcl (gdb_quit_hook): Remove. It's unused.
- (gdbtk_quit): Do no shutdown window manager and save
- preferences here.
- (gdbtk_cleanup): This is the proper place to do those
- things.
-
-2001-05-07 Keith Seitz <keiths@cygnus.com>
-
- * library/globalpref.itb (build_win): Preserve the
- current working directory.
-
-2001-05-06 Kevin Buettner <kevinb@redhat.com>
-
- * generic/gdbtk-cmds.c (gdb_target_has_execution_command)
- (get_clear_file): Use ptid_equal() for comparing ptid values.
- Use ``null_ptid'' instead of 0 in comparisons against
- ``inferior_ptid''.
-
- From Phil Edwards <pedwards@disaster.jaj.com>:
- * generic/gdbtk-cmds.c (gdb_target_has_execution_command)
- (get_clear_file): Rename ``inferior_pid'' to ``inferior_ptid''.
-
-2001-05-01 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Include the command "warp_pointer"
- for all platforms. Used for testing ONLY.
-
- * util.tcl (gdbtk_read_defs): If there is an error reading
- the testsuite definition file, print the error message to
- stderr, not stdout. This will allow tcl to know that an error
- has occurred.
- (find_iwidgets_library): Make it work for running testsuites
- from installed directory.
-
- * main.tcl: If we failed to find iwidgets, check if the
- testsuite is running. If it is running, do not pop up
- a dialog box: just print out the error and exit.
- Initialize _test(verbose) for the testsuite.
-
-2001-04-23 Keith Seitz <keiths@cygnus.com>
-
- * generic/gdbtk-cmds.c (gdb_get_breakpoint_info): If unable
- to find the requested breakpoint for lookup, check if
- it is about to be deleted and return information about
- that breakpoint.
- (gdb_get_tracepoint_info): Ditto for tracepoints.
- * generic/gdbtk-hooks.c (gdbtk_deleted_bp): New global.
- (gdbtk_delete_breakpoint): Remember the deleted breakpoint
- for gdb_get_breakpoint_info, in case it is called during
- the event notification.
- (gdbtk_delete_tracepoints): Ditto for tracepoints.
-
- * generic/gdbtk-cmds.c (gdb_entry_point): Return an empty
- string when there is no active target (i.e., there is no
- entry point to return yet).
-
-2001-04-20 Keith Seitz <keiths@cygnus.com>
-
- * library/srctextwin.ith (handle_set_hook): Rename to set_variable.
- * library/srctextwin.itb (set_variable): Handle SetVariableEvent.
- (constructor): Remove gdb_set_hook.
- (destructor): Ditto.
- * library/srcbar.itcl: Inherit from GDBEventHandler.
- (set_hook): Rename to set_variable and handle SetVariableEvent.
- (constructor): Remove gdb_set_hook.
- (destructor): Ditto.
- * library/regwin.ith (handle_set_hook): Renamed to set_variable.
- * library/regwin.itb (set_variable): Handle SetVariableEvent.
- (constructor): Remove gdb_set_hook.
- (destructor): Ditto.
- * library/kod.ith (set_os): Renamed to "set_variable".
- * library/kod.itb (set_variable): Handle SetVariableEvent.
- (constructor): Remove gdb_set_hook.
- (destructor): Ditto.
- * library/tclIndex: Regenerated.
-
-2001-04-20 Keith Seitz <keiths@cygnus.com>
-
- * library/interface.tcl (gdbtk_tcl_set_variable): New proc.
- * library/gdbevent.ith (SetVariableEvent): New event.
- * library/gdbevent.itb (SetVariableEvent::get): Override
- GDBEvent::get.
- * library/ehandler.ith (set_variable): New public method.
- * generic/gdbtk-hooks.c (gdbtk_set_hook): Let inteface function
- gdbtk_tcl_set_variable do all the work.
- * tclIndex: Regenerated.
-
-2001-04-19 Keith Seitz <keiths@cygnus.com>
-
- * library/gdbevent.ith: New file. Defines new event model.
- * library/gdbevent.itb: New file. Implements new event
- model.
- * library/ehandler.ith: New file. Defines new event model.
- * library/ehandler.itb: New file. Implements new event
- model.
- * library/gdbwin.ith: Inherit from GDBEventHandler.
- (update): Delete unused method.
- (_state): Delete unused variable.
- * library/tclIndex: Regenerated.
-
- * generic/gdbtk-cmds.c (gdb_set_bp): Use create_breakpoint_hook
- to notify gui of changes.
- (gdb_set_bp_addr): Ditto.
- (gdb_get_breakpoint_info): Update comments to match reality.
- * generic/gdbtk-hooks.c (breakpoint_notify): Only pass the
- breakpoint number which generated the event.
- (tracepoint_notify): Ditto for tracepoints.
- * library/interface.tcl (gdb_breakpoint_change_hook): Mark
- as deprecated and comment out definition.
- (gdbtk_tcl_breakpoint): Use new GDBEvent event "breakpoint"
- to notify rest of UI about breakpoint event.
- (gdbtk_tcl_tracepoint): Ditto for "tracepoint" event.
- * library/bpwin.ith (update): Renamed to "breakpoint".
- (breakpoint): New public method.
- (tracepoint): New public method.
- (bp_add): Take event as argument instead of number.
- (bp_modify): Ditto.
- (bp_delete): Ditto.
- * library/bpwin.itb (constructor): Remove
- gdb_breakpoint_changed_hook.
- (destructor): Ditto.
- (build_win): Insert any existing breakpoints by
- making BreakpointEvents for them.
- (breakpoint): Renamed from "update" to handle
- breakpoint events.
- Remove code to deal with tracepoints.
- (tracepoint): New method to handle tracepoint
- events.
- (bp_add): Deal with breakpoint events, not breakpoint
- numbers.
- (bp_modify): Ditto.
- (bp_delete): Ditto.
- * library/srctextwin.ith: Inherit from GDBWin.
- (breakpoint): New public method.
- (tracepoint): New public method.
- * library/srctextwin.itb (constructor): Remove
- gdb_breakpoint_changed_hook.
- (destructor): Ditto.
- (breakpoint): New method to handle breakpoint event.
- (tracepoint): New method to handle tracepoint event.
- (do_bp): Handle duplicate breakpoints for asm, too.
- (remove_bp_at_line): Delete breakpoints by number, not
- linespec. clear_command removes breakpoints from the
- breakpoint_chain BEFORE deleting the breakpoint. delete_command
- does this afterward (so we can call gdb_get_breakpoint_info on
- an about-to-be-deleted breakpoint).
-
-2001-04-18 Martin M. Hunt <hunt@redhat.com>
-
- * generic/gdbtk.c (gdbtk_init): Initialize uiout.
-
-2001-04-18 Tom Tromey <tromey@redhat.com>
-
- * library/interface.tcl (run_executable): Use
- gdb_set_inferior_args.
- * library/session.tcl (session_load): Use gdb_set_inferior_args.
- * generic/gdbtk-cmds.c (Gdbtk_Init): Register
- gdb_set_inferior_args.
- (gdb_get_inferior_args): New function.
-
-2001-04-17 Tom Tromey <tromey@redhat.com>
-
- * library/session.tcl (session_save): Use gdb_get_inferior_args.
- * generic/gdbtk-cmds.c (inferior_args): Removed.
- (Gdbtk_Init): Don't register gdb_inferior_args variable. Do
- register gdb_get_inferior_args function.
- (gdb_get_inferior_args): New function.
-
-2001-04-17 Fernando Nasser <fnasser@redhat.com>
-
- * library/variables.tcl (update): Temporary fix to the detection of
- "type_changed" condition. Proper fix will require that this condition
- is properly reported by the underlying code.
-
-2001-04-12 Nicholas Duffek <nsd@redhat.com>
-
- * generic/gdbtk-cmds.c (gdb_entry_point): New TCL command.
- * library/interface.tcl (gdbtk_locate_main): Try the program's
- entry point if no main function is found.
-
-2001-04-10 Keith Seitz <keiths@cygnus.com>
-
- From Tom Tromey (tromey@redhat.com):
- * library/managedwin.itb (reveal): We actually do want to force
- the focus for Windows.
-
-2001-04-09 Martin M. Hunt <hunt@redhat.com>
-
- * library/managedwin.itb (ManagedWin::reveal): After
- deiconifying window for the first time, set its geometry
- again, if the platform is unix. This fixes a problem with kde.
- (ManagedWin::_create): Set a variable with the initial
- geometry.
-
-2001-04-04 Christopher Faylor <cgf@redhat.com>
-
- * generic/gdbtk.c: Add __CYGWIN__ conditional to WIN32 test.
-
-2001-04-04 Martin M. Hunt <hunt@redhat.com>
-
- * generic/gdbtk-hooks.c (gdbtk_fileopen): New function.
- Initialize ui_file stuff for gdbtk.
- (gdbtk_fputs): Don't print if gdbtk_disable_fputs. Send
- stdlog and stdtarg to their handler functions.
-
- * generic/gdbtk.c (Gdbtk_Init): Don't set gdb_stdlog
- and gdb_stdtarg to gdb_stdout,
- (gdbtk_init): Unset gdbtk_disable_fputs
- when ready to accept output from gdb. Remove references to
- fputs_unfiltered_hook.
-
- * generic/gdbtk.h: Declare new flag gdbtk_disable_fputs.
-
- * generic/gdbtk-cmds.c (gdb_restore_fputs): Instead of setting
- fputs_unfiltered_hook, set the new flag gdbtk_disable_fputs.
-
- * library/prefs.tcl (pref_set_defaults): Add defaults
- for log_fg and target_fg.
-
- * library/interface.tcl (gdbtk_tcl_fputs_error): Use
- err_tag.
- (gdbtk_tcl_fputs_log): New function. Write log messages
- to console.
- (gdbtk_tcl_fputs_target): New function. Write target
- IO to console.
-
- * library/console.ith (einsert): Add tag parameter.
-
- * library/console.itb (_build_win): Add new tags for log
- and target IO.
- (einsert): Add tag parameter.
-
-2001-04-02 Martin M. Hunt <hunt@redhat.com>
-
- * generic/gdbtk-cmds.c (gdb_loadfile): Adjust size of text_argv
- array to prevent writing out of range. Remove unused variables.
- Fix formatting.
- (gdb_get_tracepoint_info): Remove unused variable "fname".
- (gdb_load_disassembly): Remove unused variable "widget".
- (gdb_loc): Remove unused variable "sym".
- (gdb_set_bp_addr): Remove unused variable "line".
- (gdb_get_breakpoint_info): Remove unused variable "sym".
- (get_frame_name): Remove unused variable "name".
-
-2001-03-29 Fernando Nasser <fnasser@redhat.com>
-
- * library/variables.tcl (update): Cope with varobj type changes.
-
-2001-03-29 Fernando Nasser <fnasser@redhat.com>
-
- * library/variables.tcl (destructor): Remove file_changed_hook hook.
-
-2001-03-29 Fernando Nasser <fnasser@redhat.com>
-
- * generic/gdbtk-varobj.c (variable_obj_command): Do not cache varobj
- handles as they may change -- use varobj_get_handle() instead.
-
-2001-03-15 Martin Hunt <hunt@redhat.com>
- * library/browserwin.itb: Change all references to freeze_me,
- thaw_me and Top to _freeze_me, _thaw_me, and _top to match
- changes to managedwin.
-
- * library/kod.itb: Ditto.
-
-2001-03-15 Tom Tromey <tromey@redhat.com>
-
- * library/mempref.itb (MemPref::build_win): Correctly set initial
- value of combobox.
- * library/memwin.itb: Added copyright header.
- (MemWin::constructor): Set defaults from preference database.
- (MemWin::reconfig): Update preference database.
- * library/prefs.tcl (pref_save): Save `mem' preferences.
- (pref_set_defaults): Define default memory preferences.
-
-2001-03-08 Andrew Cagney <ac131313@redhat.com>
-
- * generic/gdbtk-cmds.c (map_arg_registers): Use REG_NUM instead of
- ARCH_REG_NUM.
-
-2001-03-01 Nicholas Duffek <nsd@redhat.com>
-
- * README.GDBTK: Minor spelling, grammar, and formatting fixes.
-
-2001-03-01 Keith Seitz <keiths@cygnus.com>
-
- * library/managedwin.ith: Move all implementations into
- managedwin.itb.
- (public variable nosize): Delete.
- (freeze_me, thaw_me, make_icon_window): Prepend with
- underscore to remind people these are not public
- methods/procs.
- (protected variable Top, screenwidth, screenheight): Ditto
- for these variables.
- (protected common manage_active, mainwindow): Delete.
- (enable): Delete.
- (reconfig): Add empty body.
- * library/managedwin.itb: Move all implementations from
- header here.
- Update all references to renamed variables/methods/procs.
- (destructor, restart, shutdown, _open, find) Let
- Itcl tell us which ManagedWins we have lying around.
- (enable): Delete.
- (reconfig): It's empty. Moved empty body to header.
-
-2001-03-01 Nicholas Duffek <nsd@redhat.com>
-
- * library/managedwin.itb (ManagedWin::shutdown): Save each
- managed window's geometry as a preference.
- * library/managedwin.ith (ManagedWin::destructor): Don't save
- managed windows' geometries as preferences.
-
-2001-03-01 Nicholas Duffek <nsd@redhat.com>
-
- * library/srctextwin.itb (SrcTextWin::location): Clear previous
- pane's cursor after switching panes.
-
-2001-03-01 Nicholas Duffek <nsd@redhat.com>
-
- * library/srctextwin.itb (config_win): Give focus to $win.
-
-Tue Feb 27 23:56:23 2001 Andrew Cagney <ac131313@redhat.com>
-
- * generic/gdbtk-cmds.c: Include recently created "regcache.h"
-
-2001-02-27 Keith Seitz <kseitz@nwlink.com>
-
- * generic/gdbtk-cmds.c (gdb_fetch_registers): Mark
- the result as generating a list only if it really does
- generate a list.
-
-2001-02-21 Fernando Nasser <fnasser@redhat.com>
-
- * TODO: New file. Initial version of the TODO file, as posted to the
- insight list circa October 2000.
-
-2001-02-14 Fernando Nasser <fnasser@redhat.com>
-
- From 2001-02-09 Martin Hunt <hunt@redhat.com>
- * generic/gdbtk-cmds.c (gdb_load_disassembly): In mixed
- mode, source lines should be tagged with source_tag2.
-
-2001-02-08 Fernando Nasser <fnasser@redhat.com>
-
- From 2001-02-06 Martin Hunt <hunt@redhat.com>
- * library/debugwin.itb: Change window name to "Insight Debug"
- * library/embeddedwin.ith: Fix debug messages.
- * library/locals.tcl: Ditto.
- * library/watch.tcl (postMenu): Ditto.
- * library/variables.tcl: Ditto.
- * library/interface.tcl: Ditto.
- * library/regwin.itb: Ditto.
- * library/gdbwin.ith: Ditto.
- * library/srcbar.itcl: Ditto.
-
-2001-02-06 Fernando Nasser <fnasser@redhat.com>
-
- Originally from Martin Hunt <hunt@redhat.com>, with modifications
- * library/srcwin.itb (_name): Check for errors when invoking
- gdb_find_file.
- * library/srctextwin.itb (_mtime_changed, location): Ditto.
- * generic/gdbtk-cmds.c (gdb_find_file_command): Better error checking.
- (full_lookup_symtab): Fix misleading comment.
-
-2001-02-04 Fernando Nasser <fnasser@redhat.com>
-
- * library/plugins/plugins.tcl: Fix typos and remove "-transient"
- parameter from open command.
- * library/plugins/HOW-TO: New file. Describes how to add a plug-in
- window to Insight.
-
-2001-02-01 Fernando Nasser <fnasser@redhat.com>
-
- * library/images/insight.gif: New splash screen/about graphics.
- * library/images2/insight.gif: New splash screen/about graphics.
- * library/about.tcl: Update copyright, window title and change colors
- to match new splash screen/about images.
-
-2001-02-01 Fernando Nasser <fnasser@redhat.com>
-
- * library/gdbtoolbar.itcl (add): New method. Emulate the style of the
- toolbar iwidget commands.
- (toolbar_show): Old name.
- (show): New name.
- (toolbar_create_button): Old name.
- (create): New name.
- (toolbar_configure_button): Old name.
- (itemconfigure): New name.
- (toolbar_bind_button): Old name.
- (itembind): New name.
- (toolbar_set_button_balloon): Old name.
- (itemballoon): New name.
- (toolbar_add_button): Make private.
- (toolbar_add_label): Ditto.
- (toolbar_add_button_separator): Ditto.
- (toolbar_remove_button): Ditto.
- (tollbar_insert_button): Ditto.
- * library/srcbar.itcl: Adjust to the above syntax.
- * library/plugins/rhabout/rhabout.itcl: Ditto.
-
-2001-02-01 Fernando Nasser <fnasser@redhat.com>
-
- * library/gdbmenubar.itcl (constructor): Remove unused code.
- (add): New method. Emulate the style of the menubar iwidget commands.
- (menubar_show): Old name.
- (show): New name.
- (menubar_menu_exists): Old name.
- (exists): New name.
- (menubar_clear_menu): Old name.
- (clear): New name.
- (menubar_delete_menu): Old name.
- (delete): New name.
- (menubar_new_menu): Make private. Does not return anything.
- (menubar_add_menu_command): Make private.
- (menubar_add_menu_separator): Ditto.
- (menubar_change_menu_state): Ditto.
- * library/srcbar.itcl: Adjust to the above syntax.
- * library/plugins/plugins.tcl: Ditto.
- * library/plugins/rhabout/rhabout.itcl: Ditto.
-
-2001-02-01 Fernando Nasser <fnasser@redhat.com>
-
- * library/pluginwin.itcl (contrucdtor, destructor): Use "code" to
- specify callbacks.
- (running, stopped, no_inferior): Make it a protected method.
- (childsite): Explicitly mark as a public method.
- * library/plugins/rhabout/rhabout.itcl (constructor): Add a label
- widget to show status messages.
- (running, stopped): Overload versions of the base class; display
- status messages as an example.
-
-2001-01-31 Fernando Nasser <fnasser@redhat.com>
-
- * library/pluginwin.itcl: New file. Implements the PluginWindow
- class that provides some basic functionality for plug-ins.
- * library/plugins/rhabout/rhabout.itcl: Inherit from the new
- PluginWindow class. Remove code dependent on ModalDlg.
- (constructor): Creates menus and a toolbar to show how these
- PluginWindow components are used.
- * library/tclIndex: Regenerate.
-
-2001-01-31 Fernando Nasser <fnasser@redhat.com>
-
- * library/plugins/rhabout.tcl: Add load for optional sample C command
- procedure.
- * library/plugins/rhabout/rhabout.itcl (constructor): Try calling
- optional sample C command procedure rhabout_extra_text.
- * library/plugins/rhabout/rhabout.c: New file. Implement an example
- plug-in shared library with a sample C command procedure.
- * library/plugins/rhabout/Makefile: New file. Makefile for the sample
- shared library above (Linux only).
-
-2001-01-28 Fernando Nasser <fnasser@redhat.com>
-
- * library/plugins: New directory. Sample plug-in directory to help
- developers of Insight plug-ins. See README file in that directory.
- * library/plugins/plugins.tcl: New file. Sample version of a code
- fragment file which adds entries to the PlugIn menu of the Source
- Window to activate custom plug-in windows.
- * library/plugins/pkgIndex.tcl: New file. Sample version of a file
- with package information for the installed plug-ins.
- * library/plugins/rhabout.tcl: New file. Sample file providing a
- plug-in package.
- * library/plugins/rhabout: New directory. Sample plug-in.
- * library/plugins/rhabout/rhabout.itcl: New file. Sample class
- implementing a plug-in window.
- * library/plugins/rhabout/tclIndex: New file. Tcl index for the sample
- plug-in implementation.
-
-2001-01-28 Fernando Nasser <fnasser@redhat.com>
-
- * library/main.tcl: Add plugin subdirectory, if existent, to auto_path.
- * library/srcbar.itcl (create_plugin_menu): New method. Create a pull
- down menu for plugins if there are any for this target configuration.
- (create_menu_items): Invoke the new method above.
-
-2001-01-28 Fernando Nasser <fnasser@redhat.com>
-
- * library/gdbmenubar.itcl (menubar_new_menu): Save lable of a menu to
- use as index.
- (menubar_delete_menu): New function. Delete a menu.
-
-2001-01-28 Fernando Nasser <fnasser@redhat.com>
-
- * library/gdbmenubar.itcl (menu_list): Add missing declararion for
- global variable.
-
-2001-01-28 Fernando Nasser <fnasser@redhat.com>
-
- * library/gdbmenubar.itcl (set_class_state): Turn off verbose debug
- messages.
- * library/gdbtoolbar.itcl (set_class_state): Ditto.
-
-2001-01-26 Fernando Nasser <fnasser@redhat.com>
-
- * generic/gdbtk-cmds.c (gdb_clear_file): Call exec_file_clear() and
- symbol_file_clear() instead of exec_file_command() and
- symbol_file_command().
- (gdb_find_file_command): Return the proper error text.
-
-2001-01-25 Fernando Nasser <fnasser@redhat.com>
-
- * library/srcbar.itcl: New file. Implement SrcBar, a menu and toolbar
- for the Source Window (code previously in srcmenubar.itcl and
- srctoolbar.itcl).
- * library/srcmenubar.itcl: Remove obsolete file.
- * library/srctoolbar.itcl: Remove obsolete file.
- * library/srcbar.tcl: Remove obsolete file.
- * library/gdbmenubar.itcl (menubar_show): New method. Associate the
- menu with the toplevel window.
- * library/srcwin.itb (_build_win): Use SrcBar.
- * library/tclIndex: Regenerate.
-
-2001-01-24 Fernando Nasser <fnasser@redhat.com>
-
- From Martin Hunt <hunt@cygnus.com>
- * generic/gdbtk-cmds.c (gdb_set_bp_addr, gdb_set_bp): Change
- strsave() to xstrdup().
-
-2001-01-24 Fernando Nasser <fnasser@redhat.com>
-
- From Martin Hunt <hunt@cygnus.com>
- * generic/gdbtk-cmds.c (gdbtk_dis_asm_read_memory): Fix call
- to xfer_memory().
-
-2001-01-19 Fernando Nasser <fnasser@redhat.com>
-
- * library/prefs.tcl (pref_set_defaults): Set default value of
- gdb/src/top_control to place the source window controls at the top.
-
-2001-01-18 Fernando Nasser <fnasser@redhat.com>
-
- * library/srctextwin.itb (_highlightAsmLine): Add missing FUNCNAME
- parameter.
- (FillAssembly, FillMixed): Pass the FUNCNAME parameter that is
- needed by the above method.
- * library/srctextwin.ith (_highlightAsmLine): Add FUNCNAME parameter
- to method definition.
-
-2001-01-17 Fernando Nasser <fnasser@redhat.com>
-
- * library/srctextwin.itb (_highlightAsmLine): Add missing FILENAME
- parameter.
- (FillAssembly, FillMixed): Pass the FILENAME parameter that is
- needed by the above method.
- * library/srctextwin.ith (_highlightAsmLine): Add FILENAME parameter
- to method definition.
-
-2001-01-15 Fernando Nasser <fnasser@redhat.com>
-
- * srcwin.itb (clear_file): Pass the appropriate value to the GO
- argument of mode() so it does not try to read a source file when
- no executable is loaded.
-
-2001-01-09 Fernando Nasser <fnasser@redhat.com>
-
- * library/srcmenubar.itcl (create_file_menu): Add missing incr for
- session numbers.
-
-2001-01-04 Fernando Nasser <fnasser@redhat.com>
-
- The following changes fix the problem of having to click on a splash
- window to make it disapear.
- * modal.tcl (post): Take as an argument "expire", the time a modal
- window is displayed.
- * managedwin.itb (open): Check for an "expire" argument and pass the
- value down to modal post method.
-
-2001-01-04 Fernando Nasser <fnasser@redhat.com>
-
- * library/gdbmenubar.itcl (set_class_state): New public method.
- Standard method to control state by class.
- (menubar_menu_class_find): Delete public accessor method.
- (menubar_change_menu_state): Change the state of a menu item
- not of a whole class list.
- * library/srcmenubar.itcl (enable_ui): Use set_class_state instead
- of prying into base class internal data.
- * library/gdbtoolbar.itcl (set_class_state): New public method.
- Standard method to control state by class.
- (toolbar_button_class_find): Delete public accessor method.
- * library/srctoolbar.itcl (enable_ui): Use set_class_state instead
- of prying into base class internal data.
-
-2001-01-04 Fernando Nasser <fnasser@redhat.com>
-
- * library/interface.tcl (gdbtk_connect): New proc. Connects to ai
- remote target (code previously at library/gdbmenubar.itcl).
- (disconnect): Rename to...
- (gdbtk_disconnect): New name for proc disconnect.
- * library/srcmenubar.itcl (do_connect): Remove the code mentioned
- above and call the new interface proc gdbtk_connect.
- Also, call ::update idletasks after changing the state of the
- menu entries.
- (do_detach): Call gdbtk_disconnect, not ::disconnect (old name).
- (do_disconnect): Call gdbtk_disconnect, not disconnect (old name).
-
-2001-01-03 Fernando Nasser <fnasser@redhat.com>
-
- * library/prefs.tcl (pref_set_defaults): Define gdb/src/top_control
- to allow the source window controls to be placed at the top.
- * library/srcwin.itb (_build_win): Test for gdb/src/top_control
- and place the controls accordingly.
-
-2001-01-02 Fernando Nasser <fnasser@redhat.com>
-
- * library/gdbmenubar.itcl: New file. Define the GDBMenuBar class,
- a generic menubar building facility for Insight windows (WIP).
- * library/gdbtoolbar.itcl: New file. Define the GDBToolBar class,
- a generic toolbar building facility for Insight windows (WIP).
- * library/srcmenubar.itcl: New file. Define the SrcMenuBar class,
- which implements the Source Window menubar (inherits GDBMenuBar).
- * library/srctoolbar.itcl: New file. Define the SrcToolBar class,
- which implements the Source Window toolbar (inherits GDBToolBar).
- * library/srcwin.itb (_build_win): Use SrcMenuBar and SrcToolBar
- instead of the obsolete GDBSrcBar.
- * library/srcbar.tcl: Mark as OBSOLETE.
- * library/toolbar.tcl: Mark as OBSOLETE. Rename class GDBToolBar
- to avoid conflict with new class with the same name.
- * library/Makefile (TCL): Include .itcl files.
- * library/tclIndex: Regenerate.
-
-2001-01-02 Fernando Nasser <fnasser@redhat.com>
-
- * library/srcwin.itb (_build_win): If gdb is running a program, load
- the window with source for that location (if available).
- (download_progress): Calls to "update" must refer to the global
- namespace.
-
-2001-01-02 Fernando Nasser <fnasser@redhat.com>
-
- * library/interface.tcl (gdbtk_quit_check): Save session whenever
- possible.
-
-2001-01-01 Fernando Nasser <fnasser@redhat.com>
-
- * library/ChangeLog-2000: New file. Entries dated 2000 moved here
- from library/ChangeLog.
- * library/ChangeLog: Removed.
- * generic/ChangeLog-2000: New file. Entries dated 2000 moved here
- from library/ChangeLog.
- * generic/ChangeLog: Removed.
-
-2000-12-14 Fernando Nasser <fnasser@redhat.com>
-
- * library/ChangeLog-1999: New file. Entries dated 1999 moved here
- from library/ChangeLog.
- * library/ChangeLog-1998: New file. Similar change for 1998.
- * library/ChangeLog-1997: New file. Similar change for 1997.
- * library/ChangeLog: Removed entries previous to 2000.
- * generic/ChangeLog-1999: New file. Entries dated 1999 moved here
- from library/ChangeLog.
- * generic/ChangeLog-1998: New file. Similar change for 1998.
- * generic/ChangeLog-1997: New file. Similar change for 1997.
- * generic/ChangeLog: Removed entries previous to 2000.
-
-2000-04-17 Jonathan Larmour <jlarmour@redhat.co.uk>
-
- * ChangeLog-gdbtk: Renamed to ChangeLog
- * ChangeLog: New file
- * README.GDBTK: No need for changelog-default-name hint for Emacs now
-
-Sat Feb 5 00:14:30 2000 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdb.rc, gdbtool.ico, README.GDBTK: To here from top level GDB
- directory.
- * gdb/gdbtcl2: Directory moved to gdbtk/library.
- * gdb/gdbtk/generic: New directory.
-
diff --git a/gdb/gdbtk/ChangeLog-2002 b/gdb/gdbtk/ChangeLog-2002
deleted file mode 100644
index 6c22903ad3e..00000000000
--- a/gdb/gdbtk/ChangeLog-2002
+++ /dev/null
@@ -1,878 +0,0 @@
-2002-12-20 Martin M. Hunt <hunt@redhat.com>
-
- * library/srcbar.itcl (SrcBar): Don't load vmake icon.
-
- * library/images: Removed back.gif, build.gif, file.gif, fore.gif,
- gdbtk.gif, opt.gif, tools.gif, tools2_3d.gif, and vmake.gif.
-
- * library/images2: Removed back.gif, build.gif, file.gif, fore.gif,
- gdbtk.gif, load.gif, opt.gif, tools.gif, tools2_3d.gif, and vmake.gif.
-
-2002-12-18 Martin M. Hunt <hunt@redhat.com>
-
- * library/main.tcl: Don't try to print errors to stderr on Windows.
-
-2002-12-18 Martin M. Hunt <hunt@redhat.com>
-
- * library/regwin.itb (RegWin::update): When updating, check
- that a cell still exists before checking its value.
- (RegWin::_select_group): Clear cells with changed values before
- changing group. After new group is selected, highlight any changed
- values still visible.
-
-2002-12-17 Martin M. Hunt <hunt@redhat.com>
-
- * library/interface.tcl (gdbtk_tcl_fputs_target_err):
- New function.
- (gdbtk_tcl_fputs_target): Open console window if it is
- not already open.
- (gdbtk_gets): New function.
- Opens a console window if necessary and calls Console::gets.
-
- * library/console.ith (gets): Declare method.
- (_input_mode): New private variable.
- (_input_result): Ditto.
- (_input_error): Ditto.
- (_cancel): New private method
- (invoke): Add arg.
-
- * library/console.itb (_setprompt): Allow setting prompt
- to nothing. Delete to beginning of line before writing prompt.
- (gets): New public method to prompt user for input.
- (_cancel): New private method to handle ^C when inputting data.
- (invoke): Check for ^d when in input mode.
-
-2002-12-17 Martin M. Hunt <hunt@redhat.com>
-
- * library/regwin.itb (_load_prefs): Get list of registers from
- the group name.
- (_build_win): Remove old menu system. Replace with an optionmenu
- that contains all the valid group names for this architecture.
- (_layout_table): No need to update old menu.
- (_but3): Add "Close" to popup menu.
- (_delete_from_display): No need to update old menu.
- (_display_all): Ditto.
- (_post_menu): Deleted.
- (_select_group): New method. Callback for group optionmenu.
-
- * library/regwin.ith: New private variable _group.
- New private method _select_group. Removed _post_menu.
-
- * generic/gdbtk-register.c: Include reggroups.h.
- (gdb_register_info): Add "group" and "grouplist".
- (gdb_regformat): Fix Tcl_WrongNumArgs call so it doesn't crash.
- (gdb_reggrouplist): New function. Returns the names of the
- register groups.
- (gdb_reggroup): New function. Returns the register numbers of the
- registers in a group.
-
-2002-12-06 Andrew Cagney <ac131313@redhat.com>
-
- * generic/gdbtk-cmds.c (gdb_update_mem): Don't add a 0x prefix.
-
-2002-12-05 Martin M. Hunt <hunt@redhat.com>
-
- * library/regwin.itb (update): Revert previous patch to this
- function. But also don't tag blank cells.
- (_but3): Fix help call.
-
-2002-12-04 Martin M. Hunt <hunt@redhat.com>
-
- * library/regwin.itb (_but3): Fix help call.
-
- * library/helpviewer.tcl (open_help): Fix KDE apps list.
-
- * library/debugwin.itb (build_win): Fix help call.
-
- * library/regwin.itb (update): Remove some old code
- that marked registers as changed when the target started.
- (_build_win): Make changed registers more visible by
- changing their bg to Colors(change).
-
- * library/prefs.tcl (pref_set_option_db): Create a new
- Color(change) which is the color of text indicating a change.
- Current default is green.
-
- * library/vartree.itb (_init_data): Make changed values
- Color(change). Can't change bg, so we change fill color.
-
-2002-12-04 Keith Seitz <keiths@redhat.com>
-
- * generic/gdbtk-hooks.c: Include tcl.h and tk.h to pull
- in declarations for some Tk functions used in this file.
- * generic/gdbtk-cmds.c: Likewise.
-
-2002-12-03 Martin M. Hunt <hunt@redhat.com>
-
- * library/vartree.itb (_but3): Add popup menu item to dump
- memory at the value of the variable.
-
- * library/vartree.itb (buildlayer): Check for error when updating
- a variable's value.
- (update_var): Ditto.
-
- * library/srcpref.itb: Latest tk doesn't support
- "-col" as a grid option. Use "-column".
-
- * library/regwin.itb: Ditto.
-
- * library/main.tcl: Require package "debug". Make
- package loading a bit more robust.
-
-2002-11-30 Andrew Cagney <ac131313@redhat.com>
-
- * generic/gdbtk-stack.c: Replace selected_frame with
- deprecated_selected_frame.
- * generic/gdbtk-register.c: Ditto.
- * generic/gdbtk-cmds.c (gdb_loc): Replace selected_frame with
- deprecated_selected_frame. Use get_frame_pc and find_frame_sal.
-
-2002-11-27 Martin M. Hunt <hunt@redhat.com>
-
- * generic/gdbtk.c (gdbtk_init): Don't call Tix_Init.
- Don't include tix.h
-
- * generic/gdbtk-hooks.c: Don't include tix.h.
-
- * generic/gdbtkj-cmds.c: Don't include tix.h.
-
-2002-11-27 Andrew Cagney <cagney@redhat.com>
-
- * generic/gdbtk-stack.c (get_frame_name): Use get_frame_type
- instead of deprecated_frame_in_dummy.
- * generic/gdbtk-cmds.c (gdb_loc): Ditto.
-
-2002-11-19 Andrew Cagney <ac131313@redhat.com>
-
- * generic/gdbtk-stack.c (gdb_selected_frame): Use get_frame_base
- instead of FRAME_FP. Mention that get_frame_id() should be used.
-
-2002-11-19 Andrew Cagney <ac131313@redhat.com>
-
- * generic/gdbtk-cmds.c (gdb_loc): Use get_frame_type instead of
- ->signal_handler_caller.
- * generic/gdbtk-stack.c (get_frame_name): Ditto.
- (get_frame_name): Ditto.
-
-2002-11-12 Andrew Cagney <ac131313@redhat.com>
-
- From 2002-11-11 David Carlton <carlton@math.stanford.edu>
- * generic/gdbtk-stack.c (get_frame_name): Replace call to
- frame_in_dummy with one to deprecated_frame_in_dummy.
- * generic/gdbtk-cmds.c (gdb_loc): Ditto.
-
-2002-11-11 Martin M. Hunt <hunt@redhat.com>
-
- * library/srctextwin.itb (do_key): Add arg to
- print call.
-
-2002-11-11 Martin M. Hunt <hunt@redhat.com>
-
- * library/data.ith: Deleted.
- * library/data.itb: Deleted.
-
-2002-11-11 Martin M. Hunt <hunt@redhat.com>
-
- * library/memwin.itb: Supply arg to _update_address.
-
-2002-11-11 Martin M. Hunt <hunt@redhat.com>
-
- * library/toolbar.tcl: Deleted this obsolete file.
- * library/tclIndex: Rebuilt.
-
-2002-11-11 Martin M. Hunt <hunt@redhat.com>
-
- * library/srcbar.itcl (create_help_menu): For unix systems,
- if compatibility is set to KDE or GNOME, put the help menu
- in the right place. Otherwise put it on the far right, like
- Motif does.
-
-2002-11-11 Martin M. Hunt <hunt@redhat.com>
-
- * library/helpviewer.tcl: New file. Finds
- an appropriate help browser and displays the help files.
-
- * library/vartree.itb: Fix open_help calls.
-
- * library/helpviewer.ith: Deleted.
- * library/helpviewer.itb: Deleted.
-
- * library/prefs.tcl (pref_set_defaults): Remove
- pref gdb/help/browser. Add pref gdb/help/browsername.
- We couldn't simply rename because it would break older
- versions of Insight that expect gdb/help/browser to be
- a number.
-
-2002-11-08 Martin M. Hunt <hunt@redhat.com>
-
- * library/prefs.tcl (pref_save): Fix GDBtkInitVersion.
- (pref_save): Check that value is not null before writing.
-
-2002-11-07 Martin M. Hunt <hunt@redhat.com>
-
- * library/util.tcl (CygScrolledListbox): Delete.
-
- * library/srctextwin.itb: Change from CygScrolledListbox
- to iwidgets::scrolledlistbox. Set foreground and background.
- Center popup over source window.
-
-2002-11-06 Martin M. Hunt <hunt@redhat.com>
-
- * library/locals.tcl (build_win): Fix so window opens
- on Windows.
-
-2002-11-06 Martin M. Hunt <hunt@redhat.com>
- * library/debugwin.itb: Remove VariableWin. Add VarTree.
-
-2002-11-06 Martin M. Hunt <hunt@redhat.com>
- * library/watch.tcl: Completely rewritten to use VarTree.
- * library/locals.tcl: Completely rewritten to use VarTree.
- * library/variables.tcl: Deleted.
- * library/vartree.ith: New file.
- * library/vartree.itb: New file. Implements a variable
- tree.
- * library/tclIndex: Rebuilt.
-
-2002-11-06 Martin M. Hunt <hunt@redhat.com>
- * library/globalpref.itb (_build_win): Add radiobox
- to select KDE/GNOME/default for pref gdb/compat. Remove
- browser option.
-
- * library/regwin.itb (build_win): Colors(hbg) has been
- removed so use Colors(bg) instead.
-
- * library/prefs.tcl (pref_set_defaults): Add a new
- preference "gdb/compat" which can be set to KDE, GNOME,
- Windows or default. This allows us to change Insight's
- behavior based on windowing system.
- (pref_set_colors): Attempt to read in .gtkrc files.
- Do different things for KDE vs GNOME.
- (pref_load_default): New function. Load default colors.
- (pref_load_gnome): New function. Find and open GNOME file.
- (load_gnome_file): New function. Loads GNOME file.
- (pref_set_option_db): New function. Set option database.
-
-2002-11-06 Martin M. Hunt <hunt@redhat.com>
- * generic/gdbtk-varobj.c: Remove FREEIF and replace with xfree.
- Make format_string static.
- (variable_update): Return an object
- with "-1" in it on error.
-
-2002-11-06 Keith Seitz <keiths@redhat.com>
-
- * generic/gdbtk-hooks.c (gdbtk_call_command): Make a null
- cleanup and run it after every issued gdb command. Apparently
- some commands depend on this. [This should really be part of
- main gdb...]
-
-2002-10-15 Martin M. Hunt <hunt@redhat.com>
-
- * library/tclIndex: Rebuilt.
-
- * library/* : auto_mkindex cannot rebuild
- tclIndex because it does not recognize the namespace
- import in main.tcl. To get it to work again, rename the
- following:
- body -> itcl::body
- configbody -> itcl::configbody
- class -> itcl::class
-
-2002-10-10 Martin M. Hunt <hunt@redhat.com>
-
- * generic/gdbtk-cmds.c (gdb_update_mem): No results
- were being returned. Append results to result_ptr_obj_ptr.
-
-2002-10-10 Martin M. Hunt <hunt@redhat.com>
-
- * library/session.tcl (save): Save target_cmd,
- attach, load, run, and cont as session prefs.
- (notice_file_change): Load in above session
- prefs.
-
- * library/interface.tcl (set_target): Set icons busy
- before attempting target command and set back to idle after.
- (run_executable): Return on ATTACH_ERROR.
- (gdbtk_run): If run button is hit when a program
- is currently being debugged, put up a dialog allowing
- user to continue or cancel.
-
-2002-10-09 Martin M. Hunt <hunt@redhat.com>
-
- * library/targetselection.itb (init_target_db): Add gdbserver
- target.
- (get_target_list): Always add "gdbserver" to list of valid
- targets.
- (valid_target): Always allow "gdbserver".
-
-2002-09-27 Keith Seitz <keiths@redhat.com>
-
- * generic/gdbtk-hooks.c (gdbtk_add_hooks): Add gdbtk_annotate_signal
- as annotate_signalled_hook.
-
-2002-09-26 Andrew Cagney <ac131313@redhat.com>
-
- From Grace Sainsbury <graces@redhat.com>:
- * generic/gdbtk-main.c: New file.
-
-2002-09-24 Martin M. Hunt <hunt@redhat.com>
-
- * library/srctextwin.itb (FillMixed): Fix debug
- statement for 64-bit.
- (_highlightAsmLine): Fix 64-bit arithmetic.
-
-2002-09-19 Martin M. Hunt <hunt@redhat.com>
-
- * library/srctextwin.itb (FillAssembly): Fix debug
- statement for 64-bit addresses.
- (showBPBalloon): Fix for 64-bit addresses.
-
- * library/memwin.itb (incr_addr): Fix 64-bit addresses.
-
-2002-09-18 Keith Seitz <keiths@redhat.com>
-
- * library/console.itb (_build_win): Bind control-c and control-v
- to copy and paste.
-
-2002-08-15 Keith Seitz <keiths@redhat.com>
-
- * README: Massive update.
-
-2002-08-14 Keith Seitz <keiths@redhat.com>
-
- * README.GDBTK: Updated and renamed to README.
- * README: "New" file.
-
-2002-08-14 Keith Seitz <keiths@redhat.com>
-
- * library/srcbar.itcl (create_plugin_menu): Deal with
- multi plugin directories.
- Catch any errors that might occur reading plugin.tcl.
- * library/main.tcl: Add plugins from new default directory.
- (INSIGHT_PLUGINS): New environment variable to point to other
- plugin directories.
-
-2002-08-14 Keith Seitz <keiths@redhat.com>
-
- * library/plugins: Removed.
- * plugins/: New folder to hold plugins.
- * Makefile.am, Makefile.in, aclocal.m4, configure,
- configure.in: New files.
-
-2002-08-14 Keith Seitz <keiths@redhat.com>
-
- * generic/gdbtk.c (view_command): New function to display
- location in source window.
- (gdbtk_init): Add new gdb "view" command.
-
-2002-08-06 Keith Seitz <keiths@redhat.com>
-
- * library/srcwin.itb (_build_win): Anchor status label so that
- text appears at left instead of centered.
-
-2002-08-03 Andrew Cagney <ac131313@redhat.com>
-
- * generic/gdbtk-bp.c: Include "gdb_string.h".
- * generic/gdbtk-register.c: Ditto.
- * generic/gdbtk-varobj.c: Ditto.
-
-2002-08-01 Keith Seitz <keiths@redhat.com>
-
- * library/prefs.tcl (pref_read): Don't suppress setting the default
- colors if the user has suppressed reading the preferences file.
-
-2002-07-31 Keith Seitz <keiths@redhat.com>
-
- * library/browserwin.itb (_full_funcs_combo): Remove "-modal"
- option from tk_messageBox call. It was redhat-local in tk8.0,
- but is no longer in tk8.3.
- * library/download.itb (download_it): Likewise.
- * library/interface.tcl (gdbtk_tcl_query): Likewise.
- (show_warning): Likewise.
- (set_exe): Likewise.
- (set_target): Likewise.
- * library/memwin.itb (error_dialog): Likewise.
- * library/srcwin.itb (fillFuncCB): Likewise.
- * library/util.tcl (tfind_cmd): Likewise.
-
-2002-07-03 Martin M. Hunt <hunt@redhat.com>
-
- * generic/gdbtk-hooks.c (gdbtk_call_command): Use cmd_func().
-
-2002-06-12 Keith Seitz <keiths@redhat.com>
-
- * library/gdbmenubar.itcl (add): Add new "cascade" type.
- (menubar_add_cascade): New method to build cascading menus.
-
-2002-06-07 Martin M. Hunt <hunt@redhat.com>
-
- * library/prefs.tcl (pref_set_colors): New function. Set up colors
- from Windows system colors or X resource database. Save in array.
- (pref_set_defaults): Remove gdb/font/normal_fg, etc.
- (pref_read): Call pref_set_colors.
-
- * library/main.tcl: Remove call to "tix resetoptions TixGray".
-
- * library/bpwin.itb, library/browserwin.itb, library/console.itb,
- library/globalpref.itb, library/memwin.itb, library/process.itb,
- library/regwin.itb, library/srcpref.itb, library/srctextwin.itb,
- library/stackwin.itb, library/tdump.tcl, library/tracedlg.tcl,
- library/variables.tcl: Replace calls to [pref get gdb/fonts/*]
- for colors with references to Color array. Remove all tixOptions calls.
- Fix up colors as necessary.
-
-2002-05-31 Martin M. Hunt <hunt@redhat.com>
-
- * library/prefs.tcl (pref_read): If the regular expression
- cannot parse line, print debug message and skip it.
-
-2002-05-15 Martin M. Hunt <hunt@redhat.com>
-
- * library/help/register.html: Rewrite docs.
-
- * library/regwin.ith (_types): New private variable array to save
- the possible types for each register.
- (_type): New private variable array to save the selected type for
- each register.
- (_rows): New private variable. Number of rows in the table.
- (_cols): New private variable. Number of cols in the table.
- (_load_prefs): New private method.
- (_open_memory): New private method.
- (_edit_menu): Deleted:
- (_select): Deleted.
- (_change_format): Add optional type argument.
-
- * library/regwin.itb (RegWin::_load_prefs): New method. Collects
- all the prefs stuff here instead of in _layout_table. Prefs
- code was all rewritten to handle new types and formats.
- (RegWin::_build_win): Disable Double-1 binding. Bind
- button 1 to edit the cell. Don't make an Edit menu item.
- Remove Natural, Binary, Octal, and Raw formats. Add "Open
- Memory Window" menu item.
- (RegWin::_dimensions): This function was being abused so I removed
- it. Replaced with inline code in _layout_table which saves its
- computed values so it doesn't have to be recalculated unless
- something changes.
- (RegWin::_layout_table): Rewritten to be more efficient. Grabs
- all values in one call to gdb_reginfo instead of one for each register.
- Uses new types and formats. Calls _load_prefs.
- (RegWin::_accept_edit): Use type information when setting value.
- When done, call _unedit to remove tags.
- (RegWin::_open_memory): Open memory window with initial value
- set to the value of a register.
- (RegWin::_but3): Add types menu items. Limit format options
- to reasonable ones. Add "Open Memory Window". Add "Help"
- (RegWin::_edit): Just call _select_cell.
- (RegWin::_edit_menu): Deleted.
- (RegWin::_move): Don't recompute rows and cols; use _rows and
- _cols computed by _layout_table.
- (RegWin::_post_menu): Update types and formats. Disable "Open Memory
- Window" if register is not integer. Remove Edit.
- (RegWin::_select): Deleted.
- (RegWin::_select_cell): Tag cell as being edited. Then
- call focus, which is a workaround for a TkTable glitch where
- the insertion bar sometimes disappeared.
- (RegWin::_unedit): Clear selection. Call focus. Don't change
- any bindings.
- (RegWin::_get_value): Eliminate previous crap and just call
- "gdb_reginfo value".
- (RegWin::_change_format): Add optional type arg. Call
- "gdb_reginfo format".
- (RegWin::_update): Get a list of all the changed registers
- instead of checking one at a time.
-
- * generic/gdbtk-register.c (Gdbtk_Register_Init): Don't
- create gdb_pc_reg. It is not used. Call register_gdbarch_swap
- with regformat and regtype.
- (gdb_register_info): Add "type" and "format" options.
- (get_pc_register): Delete.
- (get_register_types): New function. Returns list of valid types
- for a list of registers.
- (get_register): Use saved format and type for each register. Check if
- there are any registers yet (target not running). Use mem_file
- to collect output. Append output to a list.
- (map_arg_registers): If passed a list, iterate though each element
- and build a list of values to return.
- (setup_architecture_data): Memory was not being initialized, so
- use xcalloc(). Allocate memory for regformat and regtype.
- (gdb_regformat): New function called by "gdb_reginfo format".
-
-2002-05-15 Martin M. Hunt <hunt@redhat.com>
-
- * generic/gdbtk-cmds.c (gdb_eval): For mem_file stuff, delete
- the file when done and free memory.
-
-2002-05-06 Martin M. Hunt <hunt@redhat.com>
-
- * library/session.tcl (notice_file_change): Catch the
- directory change, in case the directory no longer exists.
-
-2002-05-05 Alexandre Oliva <aoliva@redhat.com>
-
- * generic/gdbtk-register.c (get_register, register_changed_p):
- Don't depend on variable-sized automatic arrays.
-
-2002-05-04 Andrew Cagney <ac131313@redhat.com>
-
- * generic/gdbtk-wrapper.h (GDB_select_frame): Delete declaration.
- * generic/gdbtk-wrapper.c (GDB_select_frame): Delete function.
- (wrap_select_frame): Delete function.
-
-2002-04-26 Martin M. Hunt <hunt@redhat.com>
-
- * library/interface.tcl (gdbtk_force_quit): New function.
- Closes source windows then calls gdb_force_quit.
- (gdbtk_quit): Call gdbtk_force_quit.
-
-2002-04-24 Keith Seitz <keiths@redhat.com>
-
- * library/managedwin.ith (_ignore_on_save): New protected method.
- * library/managedwin.itb (shutdown): If _ignore_on_save, don't
- save this window to the active window list in the preferences
- file.
- * library/debugwin.ith (DebugWin::_ignore_on_save): Don't save
- this window to preferences active list.
- (DebugWinDOpts::_ignore_on_save): Likewise.
- * library/pluginwin.itcl (_ignore_on_save): Likewise.
- * library/download.ith (_ignore_on_save): Likewise.
-
-2002-04-22 Keith Seitz <keiths@redhat.com>
-
- * generic/gdbtk-stack.c (Gdbtk_Stack_Init): Don't link
- selected_frame_level directly.
- * generic/gdbtk-hooks.c (gdbtk_selected_frame_changed): Set
- the global "gdb_selected_frame_level" directly.
-
-2002-04-21 Andrew Cagney <ac131313@redhat.com>
-
- * generic/gdbtk-wrapper.c (GDB_find_frame_addr_in_frame_chain):
- Delete function.
- (wrap_find_frame_addr_in_frame_chain): Delete function.
- * generic/gdbtk-wrapper.h (GDB_find_frame_addr_in_frame_chain):
- Delete declaration.
-
-2002-04-17 Andrew Cagney <cagney@redhat.com>
-
- * generic/gdbtk.c (gdbtk_init): Use error or throw_exception to
- report an error.
-
-2002-04-12 Andrew Cagney <cagney@redhat.com>
-
- * generic/gdbtk-register.c (register_changed_p): Use
- frame_register_read instead of read_relative_register_raw_bytes.
- (get_register): Delete out-of-date comment.
-
-2002-04-08 Andrew Cagney <ac131313@redhat.com>
-
- * generic/gdbtk-wrapper.c (wrap_get_frame_block): Add missing NULL
- parameter. Match recent get_frame_block changes.
-
-2002-04-05 Keith Seitz <keiths@redhat.com>
-
- * generic/gdbtk-stack.c (gdb_block_vars): Update get_frame_block to
- match recent gdb changes.
- (gdb_get_blocks): Likewise.
- (gdb_get_vars_command): Likewise.
- (gdb_selected_block): Likewise.
-
-2002-04-04 Keith Seitz <keiths@redhat.com>
-
- * library/download.itb (constructor): Set feedback meter
- to "0.0".
- Remove "steps" array.
- (update_download): Use fractional completions for feedback.
- (done): Ditto.
- * library/download.ith (protected variable steps): Remove.
-
-2002-04-04 Daniel Jacobowitz <drow@mvista.com>
-
- * generic/gdbtk-cmds.c (gdb_disassemble_driver): Skip
- end-of-function markers in the line table.
-
-2002-04-01 Keith Seitz <keiths@redhat.com>
-
- * generic/gdbtk-cmds.c (gdb_load_disassembly): Use string_to_core_addr
- instead of parse_and_eval_address.
- Use xfree instead of free.
-
-2002-03-25 Elena Zannoni <ezannoni@redhat.com>
-
- * generic/gdbtk-hooks.c: Include cli/cli-decode.h for
- cmd_list_element.
-
-2002-03-25 Alexandre Oliva <aoliva@redhat.com>
-
- * generic/gdbtk.c (HAS_STDARG): Define.
- * generic/gdbtk-cmds.c (HAS_STDARG): Likewise.
- * generic/gdbtk-hooks.c (HAS_STDARG): Likewise.
-
-2002-03-14 Keith Seitz <keiths@redhat.com>
-
- * library/bpwin.itb (constructor): Set some sane initial
- size.
-
-2002-03-07 Martin M. Hunt <hunt@redhat.com>
-
- * library/srctextwin.itb (SrcTextWin::showBPBalloon): Put
- linefeeds between multiple breakpoints.
-
-2002-03-06 Martin M. Hunt <hunt@redhat.com>
-
- * library/srctextwin.itb (SrcTextWin::showBPBalloon):
- Reformat output. Add conditions, ignore count, commands.
-
- * library/interface.tcl (gdbtk_tcl_readline): Remove
- call to "command::insert" and instead insert the command
- into the console window.
- (gdbtk_tcl_readline_end): Catch the unsets and do not call
- non-existent function command::end_multi_line_input.
-
-2002-03-06 Martin M. Hunt <hunt@redhat.com>
-
- * library/bpwin.itb: Left-justify the labels in
- the table.
-
-2002-03-06 Keith Seitz <keiths@redhat.com>
-
- * generic/gdbtk-cmds.c: Include "ctype.h" if available.
- (gdb_get_mem): Renamed to gdb_update_mem.
- (gdb_update_mem): Take array as first tcl argument. This
- array will hold the data for the table, which is now stuffed
- in C instead of tcl.
- (gdb_eval): Use our own ui-file instead of gdb_stdout.
- * library/memwin.ith (_update_address): New method.
- (update_address): Address expression is no longer optional.
- * library/memwin.itb (build_win): Use _update_address instead of
- update_address.
- (toggle_enabled): Ditto.
- (newsize): Use _update_address instead of update_addr.
- (update_address_cb): Use _update_address instead of update_address.
- (do_popup): Likewise.
- (goto): Likewise.
- (incr_addr): Use _update_address instead of update_addr.
- (edit): Use gdb_update_mem instead of gdb_get_mem.
- (update_addr): use gdb_update_mem to do all the window updating.
-
-2002-03-06 Martin M. Hunt <hunt@redhat.com>
-
- * library/srcwin.itb: Don't try to set balloon help
- for search widget; it moved to srcbar.
-
-2002-03-05 Martin M. Hunt <hunt@redhat.com>
-
- * library/prefs.tcl (pref_read): If a preference specifies
- "src-font", substitute "global/fixed".
- (pref_set_defaults): Change defaults from "src-font" to
- "global/fixed". Do not create font object "src-font". Do
- not add hook to trace its changes.
- (pref_src-font_trace): Remove.
-
- * library/console.itb (Console::_update_option): Remove
- font update because this happens automatically.
-
- * library/globalpref.itb: No need to set
- changed flag for fonts; updates happen automatically
- when prefs are updated.
-
- * library/bpwin.itb: Replaced src-font with global/fixed.
- * library/browserwin.itb: Ditto.
- * library/mempref.itb: Ditto.
- * library/memwin.itb: Ditto.
- * library/process.itb: Ditto.
- * library/regwin.itb: Ditto.
- * library/srcbar.itcl: Ditto.
- * library/srcpref.itb: Ditto.
- * library/srctextwin.itb: Ditto.
- * library/srcwin.itb: Ditto.
- * library/stackwin.itb: Ditto.
- * library/tdump.tcl: Ditto.
- * library/tracedlg.tcl: Ditto.
- * library/variables.tcl: Ditto.
- * library/watch.tcl: Ditto.
-
-2002-03-01 Keith Seitz <keiths@redhat.com>
-
- * generic/gdbtk-register.c (register_changed_p): Don't use REGISTER_BYTES.
- There is no guarantee anymore that REGISTER_BYTES contains
- NUM_REGS+NUM_PSEUDO_REGS registers.
- (setup_architecture_data): Likewise.
-
-2002-02-25 Ian Roxborough <irox@redhat.com>
-
- * library/srcbar.itcl (SrcBar::create_buttons): Added
- "Search in source file" entry box and label to the top
- row toolbar.
- * library/srcwin.itb (SrcWin::_build_win): Removed
- "Search in source file" entry box.
- (SrcWin::_search): Renamed to "search", add string
- parameter and cleaned up.
- * library/srcwin.ith (SrcWin): Removed private
- method "_search" and added public method "search".
-
-2002-02-17 Tom Tromey <tromey@redhat.com>
-
- * library/tclIndex: Updated.
- * library/srcbar.itcl (SrcBar): Use new Session namespace.
- * library/main.tcl: Use new Session namespace.
- * library/interface.tcl (gdbtk_tcl_preloop): Use new Session
- namespace.
- (gdbtk_cleanup): Likewise.
- (_close_file): Likewise.
- * library/session.tcl: Use a namespace. Renamed all functions.
-
-2002-02-13 Martin M. Hunt <hunt@redhat.com>
-
- * generic/gdbtk-hooks.c (gdbtk_print_frame_info): Don't
- set GDB globals current_source_symtab and current_source_line.
- Let GDB do it.
-
-2002-02-13 Keith Seitz <keiths@redhat.com>
-
- * library/managedwin.itb (_create): If given a transient window,
- make sure that the SrcWin that is to become its master exists;
- otherwise, use ".".
-
-2002-02-12 Keith Seitz <keiths@redhat.com>
-
- From Don Bowman <don@sandvine.com>:
- * library/targetselection.itb (init_target_db): Add target
- vxWorks.
- Update copyright.
-
-2002-02-10 Daniel Jacobowitz <drow@mvista.com>
-
- * generic/gdbtk-cmds.c (gdb_listfuncs): Don't call
- BLOCK_SHOULD_SORT.
- * library/browserwin.itb (BrowserWin::_fill_funcs_combo): Sort
- the output of gdb_listfuncs.
-
-2002-02-07 Martin M. Hunt <hunt@redhat.com>
-
- * generic/gdbtk.c, generic/gdbtk-bp.c, generic/gdbtk-cmds.c,
- generic/gdbtk-hooks.c, generic/gdbtk-stack.c: Cleanup includes.
-
-2002-02-06 Martin M. Hunt <hunt@redhat.com>
-
- * generic/gdbtk.c, generic/gdbtk-bp.c, generic/gdbtk-cmds.c,
- generic/gdbtk-hooks.c, generic/gdbtk-register.c,
- generic/gdbtk-stack.c, generic/gdbtk-varobj.c,
- generic/gdbtk-wrapper.c: Cleanup. Fix indentation. Fix
- function declarations. Remove unused variables. Add 2002
- copyrights.
-
-2002-02-06 Keith Seitz <keiths@redhat.com>
-
- * library/images/cygnus.gif: Remove.
- * library/images2/cygnus.gif: Remove.
-
-2002-02-05 Elena Zannoni <ezannoni@redhat.com>
-
- * generic/gdbtk-cmds.c (gdbtk_load_asm, gdbtk_print_asm): Use
- TARGET_PRINT_INSN instead of tm_print_insn.
-
-2002-01-18 Keith Seitz <keiths@redhat.com>
-
- * library/console.ith (get_text): Delete.
- (test): New public method.
- * library/console.itb (get_text): Delete.
- (test): New public method.
-
-2002-01-15 Keith Seitz <keiths@redhat.com>
-
- * generic/gdbtk-varobj.c (variable_value): When varobj_get_value
- fails, use error_last_message to return the error to tcl land.
- This allows us to display nice messages about why "0xdeadbeef" is
- not accessible!
-
-2002-01-11 Martin M. Hunt <hunt@redhat.com>
-
- * library/memwin.itb (idle): Check for existence of window.
- Prevents race-condition error.
-
- * library/srctextwin.itb (enable): Check for existence of $twin.
-
- * library/interface.tcl (gdbtk_tcl_exec_file_display):
- Set pathname in host-independent manner using "file" and
- gdb_current_directory.
-
-2002-01-10 Keith Seitz <keiths@redhat.com>
-
- * library/Makefile (ITCL_SH): Renamed to "ITCLSH".
- (tclIndex): We no longer have an Itcl shell, so we must use
- "package require Itcl".
-
-2002-01-08 Keith Seitz <keiths@redhat.com>
-
- * generic/gdbtk-cmds.c (gdb_find_file_command): If the symtab
- doesn't have the filename's fullname, look it up with
- symtab_to_filename.
-
-2002-01-08 Keith Seitz <keiths@redhat.com>
-
- * library/srcwin.itb (location): Fix typo. It's "addr" not
- "address".
-
-2002-01-08 Tom Tromey <tromey@redhat.com>
-
- * library/interface.tcl (gdbtk_tcl_preloop): Use current directory
- when `--args' given.
-
-2002-01-07 Ian Roxborough <irox@redhat.com>
-
- * library/srcbar.itcl (SrcBar::create_buttons): Line number
- and address fields have been removed and added to the
- status bar.
- * library/srcwin.itb (SrcWin::_build_win): Add address and
- line number fields to status bar. Moved download progress
- bar to status bar.
- (SrcWin::download_progress): Use canvas on status bar.
- Remember to adjust width of 64-bit address.
- (SrcWin::location): Set line number and address on status bar.
- * library/srcwin.ith (SrcWin): Added new private variable.
-
-2002-01-04 Andrew Cagney <ac131313@redhat.com>
-
- * generic/gdbtk-cmds.c (gdb_disassemble_driver): Replace
- LITTLE_ENDIAN with BFD_ENDIAN_LITTLE.
- * generic/gdbtk-register.c (get_register): Ditto.
-
-2002-01-04 Andrew Cagney <ac131313@redhat.com>
-
- * generic/gdbtk-wrapper.h: Add typedef value_ptr.
-
-2002-01-03 Martin M. Hunt <hunt@redhat.com>
-
- * library/session.tcl (SESSION_serialize_bps): Ignore
- breakpoints set on internal_error and info_command because
- these are set by .gdbinit and will be recreated by it.
- This is a bit of a hack and should be fixed properly
- someday.
-
- * library/debugwin.itb: Fix incorrect button names
- so they will be enabled/disabled properly.
-
- * library/srctextwin.itb: Set focus on srcwin only
- if another window doesn't have the focus.
-
-2002-01-02 Keith Seitz <keiths@redhat.com>
-
- * library/interface.tcl (set_exe): Allow users to debug
- executables with no debug information.
-
-2002-01-02 Keith Seitz <keiths@redhat.com>
-
- * library/console.ith (insert): Add tag parameter.
- (einsert): Delete.
- * library/console.itb: (insert): Add tag parameter.
- (einsert): Delete.
- * library/interface.tcl (gdbtk_tcl_fputs): Use Console::insert.
- (gdbtk_tcl_fputs_error): Likewise.
- (gdbtk_tcl_fputs_log): Likewise.
- (gdbtk_tcl_fputs_target): Likewise.
- (set_target): Likewise.
-
-2002-01-02 Ian Roxborough <irox@redhat.com>
-
- * library/managedwin.itb (ManagedWin::_create): When
- making a modal window transient, use the source window
- as the master and not ".".
-
diff --git a/gdb/gdbtk/ChangeLog-2003 b/gdb/gdbtk/ChangeLog-2003
deleted file mode 100644
index 5a005a2aafc..00000000000
--- a/gdb/gdbtk/ChangeLog-2003
+++ /dev/null
@@ -1,431 +0,0 @@
-2003-12-17 Jeff Johnston <jjohnstn@redhat.com>
-
- * generic/gdbtk-bp.c: Change calls to decode_line_1 to add
- new NULL parameter.
- * generic/gdbtk-cmds.c: Ditto.
- * generic/gdbtk-stack.c: Ditto.
-
-2003-12-11 Jim Blandy <jimb@redhat.com>
-
- * library/prefs.tcl (pref_read): The section marker or the word
- 'option' must be the first thing on the line; they don't count if
- they appear in the middle of the line.
-
-2003-11-24 David Carlton <carlton@kealia.com>
-
- * generic/gdbtk.c (target_is_native): Replace STREQ by strcmp.
- * generic/gdbtk-cmds.c (gdb_stop): Replace STREQ by strcmp.
- (gdb_search): Replace STREQN by strncmp and DEPRECATED_SYMBOL_NAME
- by SYMBOL_LINKAGE_NAME.
- * generic/gdbtk-varobj.c (variable_format): Replace STREQN by
- strncmp.
-
-2003-11-11 David Carlton <carlton@kealia.com>
-
- * generic/gdbtk-bp.c (gdb_find_bp_at_addr): Replace use of
- BREAKPOINT->address by BREAKPOINT->loc->address.
- (gdb_get_breakpoint_info): Ditto.
-
-2003-10-06 David Carlton <carlton@kealia.com>
-
- * generic/gdbtk-register.c (get_register_size): Replace
- REGISTER_RAW_SIZE by DEPRECATED_REGISTER_RAW_SIZE.
- (get_register, register_changed_p): Ditto.
-
-2003-09-30 David Carlton <carlton@kealia.com>
-
- * generic/gdbtk-register.c (get_register): Replace
- REGISTER_VIRTUAL_SIZE by
- DEPRECATED_REGISTER_VIRTUAL_SIZE.
-
-2003-09-08 Andrew Cagney <cagney@redhat.com>
-
- * generic/gdbtk-cmds.c: Include "disasm.h".
- (gdbtk_load_asm): Use "gdb_print_insn" instead of
- TARGET_PRINT_INSN .
- (gdb_disassemble_driver): Delete code referencing
- "deprecated_tm_print_insn_info". Delete "di" and "di_initialized"
- and any code initializing those variables. Pass NULL as "di"
- parameter to "print_asm_fn".
- (disassemble_from_exec): Mention that it is unused.
-
-2003-08-05 Andrew Cagney <cagney@redhat.com>
-
- * generic/gdbtk-register.c (gdb_reggrouplist): Update, use
- reggroup_next.
- (gdb_reggroup): Ditto.
-
-2003-08-04 David Carlton <carlton@kealia.com>
-
- * generic/gdbtk.c (gdbtk_source_start_file): Add "%s" first
- argument to error call.
- (tk_command): Ditto.
- (view_command): Ditto.
-
-2003-07-29 Martin Hunt <hunt@redhat.com>
-
- * library/prefs.tcl (pref_set_option_db): On Windows, fix
- highlighting of buttons. On Unix, fix highlighting of
- menus.
-
-2003-07-10 Martin Hunt <hunt@redhat.com>
-
- * library/prefs.tcl (pref_set_option_db): Only set
- activeBackground for Unix.
-
-2003-07-02 Martin Hunt <hunt@redhat.com>
-
- * library/prefs.tcl (pref_set_option_db): Only
- set checkbutton select color for Unix. Fixes Windows
- checkbutton problem.
-
-2003-06-26 Keith R Seitz <keiths@redhat.com>
-
- From Roland Schwingel <Roland.Schwingel@onevision.de>:
- * generic/gdbtk-cmds.c (gdb_find_file_command): If filename
- is already an absolute filename, try stat'ing it before searching
- symtabs.
-
-2003-06-13 Martin Hunt <hunt@redhat.com>
-
- * library/prefs.tcl (load_gnome_file): Fix parsing
- of gtk theme files so Red Hat 9 (and others) GNOME colors
- are correct.
-
-2003-06-11 David Carlton <carlton@bactrian.org>
-
- * generic/gdbtk-stack.c: Include dictionary.h.
- (gdb_block_vars): Update use of ALL_BLOCK_SYMBOLS.
- (gdb_get_blocks, gdb_get_vars_command): Ditto.
- * generic/gdbtk-cmds.c: Include dictionary.h.
- (gdb_listfuncs): Update use of ALL_BLOCK_SYMBOLS.
-
-2003-06-11 David Carlton <carlton@bactrian.org>
-
- * generic/gdbtk-register.c (get_register): REGISTER_CONVERTIBLE
- and REGISTER_CONVERT_TO_VIRTUAL are deprecated.
-
-2003-05-12 Elena Zannoni <ezannoni@redhat.com>
-
- * generic/gdbtk-cmds.c (gdb_search): Replace namespace_enum
- with domain_emum, and *_NAMESPACE with *_DOMAIN.
-
-2003-05-08 Andrew Cagney <cagney@redhat.com>
-
- * generic/gdbtk-register.c (get_register): Replace
- MAX_REGISTER_VIRTUAL_SIZE and MAX_REGISTER_RAW_SIZE with
- MAX_REGISTER_SIZE.
- (register_changed_p, setup_architecture_data): Ditto.
-
-2003-04-30 Andrew Cagney <cagney@redhat.com>
-
- * generic/gdbtk-cmds.c (gdb_disassemble_driver): Instead of
- TARGET_PRINT_INSN_INFO, "dis_asm_memory_error",
- "dis_asm_read_memory", and "dis_asm_print_address", use
- "deprecated_tm_print_insn_info"
-
-2003-04-11 Andrew Cagney <cagney@redhat.com>
-
- * generic/gdbtk-stack.c (get_frame_name): Use get_frame_pc and
- get_next_frame.
-
-2003-03-18 Keith Seitz <keiths@redhat.com>
-
- From Nick Kelsey <nickk@ubicom.com>:
- * process.itb (build_win): Removed ide_sizebox instantiation that is
- no longer required and is causing errors for win hosts.
- * tdump.tcl (build_win): Ditto.
- * locals.tcl (build_win): Removed ide_sizebox instantiation that is
- no longer required and already commented out.
- * regwin.itb (build_win): Ditto.
- * srcwin.itb (constructor): Ditto.
- * stackwin.itb (constructor): Ditto.
- * watch.tcl (constructor): Ditto.
-
-2003-03-24 Martin M. Hunt <hunt@redhat.com>
-
- * generic/gdbtk-register.c (get_register_types): Use
- register_type instead of REGISTER_VIRTUAL_TYPE.
- (get_register): Ditto.
-
-2003-03-17 Keith R Seitz <keiths@redhat.com>
-
- * generic/gdbtk-register.c (get_register): Use frame_register
- instead of get_saved_register (which was deleted from gdb).
-
-2003-03-06 Martin M. Hunt <hunt@redhat.com>
-
- * generic/gdbtk-interp.c (gdbtk_interpreter_init): Remove
- unused variable.
-
- * generic/gdbtk-cmds.c (gdb_update_mem): Remove unused variable.
- (gdbtk_print_source): Deleted.
- (gdbtk_print_asm): Deleted.
-
-2003-03-06 Martin M. Hunt <hunt@redhat.com>
-
- * generic/gdbtk-bp.c (gdb_get_tracepoint_info): Return CORE_ADDR.
-
-2003-03-06 Martin M. Hunt <hunt@redhat.com>
-
- * generic/gdbtk-cmds.c (gdb_disassemble): Deleted.
- (sprintf_append_element_to_obj): Deleted.
-
- * generic/gdbtk-bp.c (get_breakpoint_commands): Use
- Tcl_ListObjAppendElement() instead of
- sprintf_append_element_to_obj().
-
-2003-03-05 Martin M. Hunt <hunt@redhat.com>
-
- * library/srctextwin.itb (SrcTextWin::FillAssembly):
- Remove unused variables asm_lo_addr and asm_hi_addr.
- (FillMixed): Ditto.
-
-2003-03-05 Martin M. Hunt <hunt@redhat.com>
-
- * generic/gdbtk-cmds.c (Gdbtk_Init): Create gdb_CA_to_TAS.
- (gdb_load_disassembly): Now takes CORE_ADDRs. Returns CORE_ADDRs
- for low and high.
- (gdbtk_load_asm): Use CORE_ADDRs.
- (gdb_loc): Return CORE_ADDRs.
- (gdb_entry_point): Return CORE_ADDR.
- (gdb_incr_addr): Update description.
- (gdb_CA_to_TAS): New function. Takes a CORE_ADDR and returns
- a target sddress string.
-
- * generic/gdbtk-bp.c (gdb_find_bp_at_addr): Change to
- take a CORE_ADDR.
- (gdb_get_breakpoint_info): Returns a CORE_ADDR.
- (gdb_set_bp_addr): Takes a CORE_ADDR.
-
- * library/bpwin.itb (bp_add): Call gdb_CA_to_TAS before
- displaying address.
- (bp_modify): Ditto.
-
- * library/srcwin.itb (location): Call gdb_CA_to_TAS before
- displaying address. Don't add "0x" in front of address.
- (set_execution_status): Call gdb_CA_to_TAS before
- displaying address. Don't call [gdb_cmd printf] to format
- output. Weird.
-
-2003-02-25 David Carlton <carlton@math.stanford.edu>
-
- * generic/gdbtk.h: Replace all instances of SYMBOL_NAME by
- DEPRECATED_SYMBOL_NAME.
- * generic/gdbtk-stack.c, generic/gdbtk-cmds.c: Ditto.
- * generic/gdbtk-stack.c, generic/gdbtk-cmds.c: Update copyright.
-
-2003-02-21 Tom Tromey <tromey@redhat.com>
-
- * generic/gdbtk-interp.c (gdbtk_interpreter_init): Declare locals
- before code.
-
-2003-02-21 Daniel Jacobowitz <drow@mvista.com>
-
- * generic/gdbtk-stack.c (gdb_get_blocks, gdb_block_vars)
- (gdb_get_vars_command): Handle LOC_COMPUTED and LOC_COMPUTED_ARG.
-
-2003-02-20 Keith Seitz <keiths@redhat.com>
-
- * generic/gdbtk-cmds.c (gdb_search): Change SYMBOL_SOURCE_NAME
- to SYMBOL_PRINT_NAME to track recent changes in gdb.
-
-2003-02-20 Pierre Muller <muller@ics.u-strasbg.fr>
-
- * generic/gdbtk-cmds.c: Add missing "block.h" include.
- generic/gdbtk-stack.c: Ditto.
- generic/gdbtk-wrapper.c: Ditto.
-
-2003-02-18 Keith Seitz <keiths@redhat.com>
-
- * generic/gdbtk-main.c (main): Change name of intepreter to "insight".
- * generic/gdbtk.h: Add ifdef wrappers.
- (gdbtk_init): Declare.
- (gdbtk_source_start_file): Declare.
- * generic/gdbtk.c (gdbtk_init): Export.
- Reomve init_ui_hook stuff.
- Do not add hooks here anymore (moved into interps).
- Do not muck with gdbk_stdout et al (moved into interps).
- (gdbtk_source_start_file): Code ripped out of gdbtk_init
- which deals with sourcing the main startup file.
- (gdbtk_init_1): Hack: New function.
- (argv0): Hack: New static global.
- (tk_init): Moved to gdbtk-interps.c.
- (gdbtk_resume): Likewise.
- (gdbtk_suspend): Likewise.
- (gdbtk_prompt_p): Likewise.
- (gdbtk_exec): Likewise.
- (gdbtk_command_loop): Likewise.
- (_initialize_gdbtk): Move interpreter stuff to gdbtk-interps.c.
- Hack: Add new init_ui_hook.
- * generic/gdbtk-interps.c: New file.
-
-2003-02-17 Christopher Faylor <cgf@redhat.com>
-
- Revert below change.
-
-2003-02-17 Christopher Faylor <cgf@redhat.com>
-
- * gdbtk/gdbtk.c (tk_procs): Make file global. Declare at top.
- (_initialize_gdbtk): Move interp_add from here.
- (gdb_tk): Call interp_add here. Pass correct uiout to interp_new.
-
-2003-02-14 Keith Seitz <keiths@redhat.com>
-
- From Chris Faylor <cgf@redhat.com>:
- * generic/gdbtk-main.c (main): Initialize args.interpreter_p.
-
-2003-02-14 Martin M. Hunt <hunt@redhat.com>
-
- * library/globalpref.itb (GlobalPref::_change_icons): Fix
- curselection call for combobox.
-
-2003-02-12 Andrew Cagney <ac131313@redhat.com>
-
- * generic/gdbtk-hooks.c (tk_command_loop): Move function ...
- * generic/gdbtk.c (gdbtk_command_loop): ... to here. Add data
- parameter.
-
- * generic/gdbtk.c: Include "interps.h".
- (_initialize_gdbtk): Register the "gdbtk" interpreter. Don't set
- init_ui_hook.
- (gdbtk_init): Change parameter to a void data pointer.
- (tk_init, gdbtk_resume, gdbtk_suspend): New functions.
- (gdbtk_prompt_p, gdbtk_exec): New functions.
-
- * generic/gdbtk-hooks.c (gdbtk_add_hooks): Don't set
- command_loop_hook. Update copyright.
-
-2003-02-11 Martin M. Hunt <hunt@redhat.com>
-
- * library/help/images/browser1.png: New file.
- * library/help/images/browser2.png: New file.
-
-2003-02-11 Keith R Seitz <keiths@redhat.com>
-
- * generic/gdbtk-register.c (register_changed_p): If the selected
- frame is NULL, do not call frame_register_read, since that will
- now cause an internal error.
-
-2003-02-10 Andrew Cagney <ac131313@redhat.com>
-
- * generic/gdbtk-varobj.c (gdb_variable_command): Ditto for
- `commands'.
- (variable_type): Ditto for `first'.
- (variable_obj_command): Ditto.
- (variable_create): Ditto for create_options.
- (variable_type): Ditto for `last'. Use `string' and not `first'
- when modifying the buffer.
- (struct disassembly_client_data ): Ditto for `asm_argv'
- * generic/gdbtk-register.c (gdb_register_info): Ditto for
- `commands'.
- * generic/gdbtk-hooks.c (tk_command_loop): Ditto for `msg'.
- * generic/gdbtk-cmds.c (gdb_search): Ditto for `switches'.
- (gdbtk_load_source): Ditto for `text_argv'.
- (struct disassembly_client_data ): Ditto for `source_argv'.
- (gdbtk_load_asm): Ditto for `text_argv'.
- (struct disassembly_client_data ): Ditto for `asm_argv'
- (gdb_loadfile): Ditto for `text_argv'.
- * generic/gdbtk.c (TclDebug): Make `v' a constant pointer.
- (gdbtk_init): Ditto for `old_chain', `src_path', `msg', and
- `lib_path'.
-
-2003-02-10 Martin M. Hunt <hunt@redhat.com>
-
- * library/browserwin.itb: Set textbackground option to
- $::Colors(textbg) instead of "white".
-
-2003-02-10 Martin M. Hunt <hunt@redhat.com>
-
- * library/interface.tcl (gdbtk_attach_native): Don't force the user
- to choose an exec file when attaching.
-
- * library/attachdlg.itb: Some fixes to work with latest iwidgets.
-
-2003-02-10 Martin M. Hunt <hunt@redhat.com>
-
- * library/prefs.tcl (pref_set_defaults): Remove prefs
- gdb/browser/width, gdb/browser/top_height, gdb/browser/view_height,
- gdb/browser/view_is_open. Add gdb/browser/layout.
-
- * library/browserwin.ith: Update declarations to match
- changes in browserwin.itb.
-
- * library/browserwin.itb (constructor): Don't set toplevel
- bindings. Set _layout from prefs.
- (destructor): Don't check $resize_after. Don't save view_is_open.
- (_build_win): Create a popup menu and bind to button 3.
- Split the rest into 4 functions; _build_file_frame,
- _build_filter_frame, _build_function_frame, and _build_view_frame.
- Pack these 4 frames according to $_layout.
- (_toggle_more): Deleted.
- (_bind_toplevel): Deleted.
- (_do_resize): Deleted.
- (_resize): Deleted.
- (_fill_source): Always fill because source is always visible.
- (_fill_funcs_combo): Limit width of combo to 40 chars.
- (_build_filter_frame): New function.
- (_build_file_frame): New function.
- (_build_function_frame): New function.
- (_build_view_frame): New function.
- (_switch_layout): New function. Toggle between layouts.
-
- * library/tclIndex: Rebuilt.
-
- * library/help/browser.html: Rewrite.
-
-2003-02-03 Martin M. Hunt <hunt@redhat.com>
-
- * library/targetselection.itb (TargetSelection::build_win): Remove
- duplicate label.
-
-2003-02-03 Martin M. Hunt <hunt@redhat.com>
-
- * library/globalpref.itb, library/mempref.itb, library/srcpref.itb,
- library/srcwin.itb, library/targetselection.itb, library/tracedlg.tcl:
- Set background color of comboboxes to Colors(textbg).
-
- * library/main.tcl: Load combobox version 2.2.
-
- * library/prefs.tcl: Minor optimization. Change order of main_names
- to have the most common, "main", first.
-
-2003-02-03 Martin M. Hunt <hunt@redhat.com>
-
- * library/targetselection.itb (TargetSelection::port_list): Keep
- checking ports on Windows until we can open no more. Replaces
- fixed limit of 9.
-
-2003-02-03 Martin M. Hunt <hunt@redhat.com>
-
- * library/session.tcl (_recreate_bps): Catch errors.
-
-2003-02-03 Martin M. Hunt <hunt@redhat.com>
-
- * library/interface.tcl (gdbtk_locate_main): Rewrite for efficiency.
- No longer uses gdb_search. Caches result.
- (initialize_gdbtk): Initialize gdb_locate_main cache.
- * library/main.tcl: Call initialize_gdbtk after loading prefs.
-
-2003-01-21 Martin M. Hunt <hunt@redhat.com>
- * library/main.tcl: Don't require iwidgets 3.0.
-
- * library/console.itb (Console::_build_win): Rename
- tkTextClosestGap to tk::TextClosestGap. Rename tkCancelRepeat
- to tk::CancelRepeat. Rename tkPriv to tk::Priv. Needed for tk 8.4.1.
-
- * library/bpwin.itb (BpWin::build_win): Don't
- create sizebox.
- * library/locals.tcl (build_win): Ditto.
- * library/regwin.itb (RegWin::_build_win): Ditto.
- * library/srcwin.itb (SrcWin::constructor): Ditto.
- * library/stackwin.itb (StackWin::build_win): Ditto.
- * library/watch.tcl (build_win): Ditto.
-
- * generic/gdbtk.c (gdbtk_init): Look for iwidgets in
- "iwidgets" instead of "iwidgets3.0.0".
- Don't call ide_create_sizebox_command.
-
- * ChangeLog: New log for 2003.
- * ChangeLog-2002: Renamed from ChangeLog.
-
diff --git a/gdb/gdbtk/ChangeLog-2004 b/gdb/gdbtk/ChangeLog-2004
deleted file mode 100644
index 07201506650..00000000000
--- a/gdb/gdbtk/ChangeLog-2004
+++ /dev/null
@@ -1,209 +0,0 @@
-2004-12-13 Ben Elliston <bje@au.ibm.com>
-
- Remove some warnings:
- * generic/gdbtk-hooks.c (gdbtk_pre_add_symbol): Cast `name'.
- * generic/gdbtk-cmds.c (gdbtk_dis_asm_read_memory): Remove.
-
-2004-12-08 Keith Seitz <kseitz@sources.redhat.com>
-
- * library/download.ith (completed_steps): New variable.
- * library/download.itb (Download::constructor): Remove
- "-fraction" option from iwidgets feedback widget. It's not a valid
- option!
- (update_download): Compute the step number and use that to
- update the feedback widget.
- (done): Use completed_steps to figure out how many steps
- the dumb feedback meter needs to show full.
- (download_it): Initialize completed_steps.
-
-2004-11-18 Keith Seitz <kseitz@sources.redhat.com>
-
- * generic/gdbtk-wrapper.c (wrap_type_print): Use value_type instead
- of VALUE_TYPE.
- * generic/gdbtk-cmds.c (gdb_eval): Likewise.
-
-2004-10-31 David Lecomber <dsl@sources.redhat.com>
- * generic/gdbtk-register.c: Add message parameter
- to call of get_selected_frame.
-
-2004-08-27 Martin Hunt <hunt@redhat.com>
-
- * library/ipc.tcl: New file.
- * library/ipcpref.ith: New file.
- * library/ipcpref.itb: New file.
-
- * library/srcwin.itb (SrcWin::inferior): Call ipc
- send if enabled.
-
- * library/prefs.tcl (pref_set_defaults): Enable color
- schemes by default. Add IPC defaults.
-
- * library/srcbar.itcl (create_pref_menu): Create
- "Advanced" cascade menu and put "Edit Color Schemes"
- and "IPC Support" under it.
-
- * library/managedwin.itb (ManagedWin::destructor):
- If IPC enabled then send "quit" on exit.
-
- * library/main.tcl: Start IPC if enabled.
-
- * library/prefs.tcl (pref_set_defaults): Add IPC defaults.
-
- * library/gdbmenubar.itcl (menubar_get_current_menu):
- New method.
-
-2004-08-09 Ben Elliston <bje@au.ibm.com>
-
- * generic/gdbtk-register.c (get_register_size): Use
- register_size() instead of DEPRECATED_REGISTER_RAW_SIZE.
- (get_register): Likewise.
- (register_changed_p): Likewise.
-
-2004-07-02 Martin Hunt <hunt@redhat.com>
-
- * library/targetselection.itb: Use /dev/comX for
- cygwin instead of just comX.
-
- * library/interface.tcl (gdbtk_tcl_preloop): Set baud rate.
-
-2004-07-02 Martin Hunt <hunt@redhat.com>
-
- * generic/gdbtk-cmds.c (symtab_to_filename): New function. Like
- symtab_to_fullname() but returns the filename if the fullname
- cannot be found.
-
- * generic/gdbtk-cmds.c (gdb_find_file_command): Revert
- patch of 2004-06-11. Use symtab_to_filename() again.
- (gdb_loc): Ditto.
- (gdb_loadfile): Ditto.
- * generic/gdbtk-bp.c (gdb_get_breakpoint_info): Ditto.
- (gdb_get_tracepoint_info): Ditto.
-
- * generic/gdbtk-cmds.h: Declare symtab_to_filename().
-
-2004-06-26 Andrew Cagney <cagney@gnu.org>
-
- * generic/gdbtk-hooks.c (gdbtk_add_hooks): Call
- deprecated_set_gdb_event_hooks.
-
-2004-06-25 Andrew Cagney <cagney@gnu.org>
-
- * generic/gdbtk.h: "ui_loop_hook" was deprecated, update.
- * generic/gdbtk-hooks.c (gdbtk_add_hooks, x_event): Ditto.
- * generic/gdbtk-cmds.c: Ditto.
-
-2004-06-24 Andrew Cagney <cagney@gnu.org>
-
- * generic/gdbtk-hooks.c (gdbtk_add_hooks): Update references to
- pre_add_symbol_hook and post_add_symbol_hook, both deprecated.
- * library/interface.tcl (gdbtk_memory_changed): Update comments.
-
-2004-06-24 Andrew Cagney <cagney@gnu.org>
-
- * generic/gdbtk-hooks.c (ui_loop_hook, pre_add_symbol_hook)
- (post_add_symbol_hook, selected_frame_level_changed_hook): Delete
- extern declarations.
-
-2004-06-15 Alan Modra <amodra@bigpond.net.au>
-
- * generic/gdbtk-cmds.c (gdb_load_info): Use bfd_get_section_size
- instead of bfd_get_section_size_before_reloc.
-
-2004-06-11 Martin Hunt <hunt@redhat.com>
-
- * generic/gdbtk-cmds.c (gdb_find_file_command): Use
- symtab_to_fullname() instead of symtab_to_filename().
- (gdb_loc): Ditto.
- (gdb_loadfile): Ditto.
- * generic/gdbtk-bp.c (gdb_get_breakpoint_info): Ditto.
- (gdb_get_tracepoint_info): Ditto.
-
- * generic/gdbtk-register.c (get_register): Simplify and remove
- references to DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL.
-
-2004-05-27 Martin Hunt <hunt@redhat.com>
-
- * library/tdump.tcl (build_win): Remove old nonworking
- code to select scrolledtext mode. Just use "dynamic".
-
-2004-04-22 Keith Seitz <kseitz@sources.redhat.com>
-
- * generic/gdbtk-hooks.c (gdbtk_add_hooks): "Update" deprecated hooks.
- "Houston... We have a problem."
- * generic/gdbtk-interp.c (gdbtk_interpreter_resume): Likewise.
- * generic/gdbtk.c (gdbtk_init_1): Likewise.
-
-2004-04-19 Roland McGrath <roland@redhat.com>
-
- * generic/gdbtk-hooks.c: Update gdbtk_pre_add_symbol forward decl to
- match defn type change.
-
-2004-04-15 Roland McGrath <roland@redhat.com>
-
- * generic/gdbtk-hooks.c (gdbtk_pre_add_symbol): Add const to arg type.
- (pre_add_symbol): Likewise in extern decl.
-
-2004-04-05 Martin Hunt <hunt@redhat.com>
-
- * library/session.tcl: Make hostname and portname
- session-dependent. Add gdb_bg_num (the color
- scheme number) as a per-session variable.
-
- * library/prefs.tcl (pref_read): If color schemes are in use,
- set colors based on the current scheme.
- (pref_save): Add "bg" section.
- (pref_set_defaults): Define new variable gdb/use_color_schemes
- and define 16 default background colors.
-
- * library/managedwin.itb (ManagedWin::window_name): Append
- window "instance" string to window name.
- (ManagedWin::window_instance): Set window instance string.
-
- * library/debugwin.itb: Add a reconfig method to restore
- unique black textbackground, overriding color scheme.
-
- * library/csprefs.itb:
- * library/csprefs.ith: New files. Implement color scheme
- preferences.
-
- * library/util.tcl (set_bg_colors): New function.
- (r_setcolors): New function.
-
- * library/regwin.itb (_prefs_changed): Deleted.
- (reconfig): New function. Updates tkTable color tags
- if color scheme changes.
- * library/regwin.ith: Update to reflect above changes.
-
- * library/srcbar.itcl (create_pref_menu): Add pulldown
- menus for "Edit Color Schemes..." and "Use Color Schemes".
- (reconfig): Fix up menu items for color schemes.
-
- * library/globalpref.itb (_init_var): Add
- gdb/use_color_schemes to variable list.
- (_build_win): Add a checkbutton to enable/disable
- color schemes.
-
- * library/gdbmenubar.itcl (menubar_add_cascade): Add a class
- argument so cascade menus can be managed by class too.
-
- * library/interface.tcl (gdbtk_tcl_fputs): Check for
- existence of gdbtk_state(console). Stops annoying error
- messages.
- (gdbtk_tcl_fputs_error): Ditto.
- (gdbtk_tcl_fputs_log): Ditto.
-
-2004-03-29 Martin Hunt <hunt@redhat.com>
-
- * generic/gdbtk-register.c (map_arg_registers): If a specific
- register was requested, just return it without validating it
- has a name.
- (get_register): Check DEPRECATED_REGISTER_CONVERTIBLE_P ().
-
-2004-02-17 Martin Hunt <hunt@redhat.com>
-
- * generic/gdbtk-register.c (Gdbtk_Register_Init): Replace
- calls to register_gdbarch_swap with deprecated_register_gdbarch_swap.
-
- * library/srcwin.itb: Remove an apparently redundant call
- to gdbtk_locate_main and location. This actually broke in
- situations where no source files were found.
diff --git a/gdb/gdbtk/ChangeLog-2005 b/gdb/gdbtk/ChangeLog-2005
deleted file mode 100644
index 2c70bcd635d..00000000000
--- a/gdb/gdbtk/ChangeLog-2005
+++ /dev/null
@@ -1,214 +0,0 @@
-2005-12-23 Eli Zaretskii <eliz@gnu.org>
-
- * library/attachdlg.itb:
- * library/actiondlg.tcl:
- * library/about.tcl:
- * library/ehandler.itb:
- * library/editor.tcl:
- * library/download.ith:
- * library/download.itb:
- * library/debugwin.ith:
- * library/debugwin.itb:
- * library/cspref.ith:
- * library/cspref.itb:
- * library/console.ith:
- * library/console.itb:
- * library/browserwin.ith:
- * library/browserwin.itb:
- * library/bpwin.ith:
- * library/bpwin.itb:
- * library/blockframe.ith:
- * library/managedwin.ith:
- * library/managedwin.itb:
- * library/main.tcl:
- * library/locals.tcl:
- * library/ipcpref.ith:
- * library/ipcpref.itb:
- * library/ipc.tcl:
- * library/interface.tcl:
- * library/helpviewer.tcl:
- * library/globalpref.ith:
- * library/globalpref.itb:
- * library/gdbwin.ith:
- * library/gdbtoolbar.itcl:
- * library/gdbmenubar.itcl:
- * library/gdbevent.ith:
- * library/gdbevent.itb:
- * library/embeddedwin.ith:
- * library/ehandler.ith:
- * library/srcwin.itb:
- * library/srctextwin.ith:
- * library/srctextwin.itb:
- * library/srcpref.ith:
- * library/srcpref.itb:
- * library/srcbar.itcl:
- * library/session.tcl:
- * library/regwin.ith:
- * library/regwin.itb:
- * library/process.ith:
- * library/process.itb:
- * library/prefs.tcl:
- * library/pluginwin.itcl:
- * library/modal.tcl:
- * library/memwin.ith:
- * library/memwin.itb:
- * library/mempref.ith:
- * library/mempref.itb:
- * library/watch.tcl:
- * library/watch.tcl:
- * library/warning.tcl:
- * library/vartree.ith:
- * library/vartree.itb:
- * library/util.tcl:
- * library/tracedlg.tcl:
- * library/toplevelwin.ith:
- * library/tfind_args.tcl:
- * library/tdump.tcl:
- * library/targetselection.ith:
- * library/targetselection.itb:
- * library/stackwin.ith:
- * library/stackwin.itb:
- * library/srcwin.ith:
- * generic/gdbtk.h:
- * generic/gdbtk.c:
- * generic/gdbtk-wrapper.h:
- * generic/gdbtk-wrapper.c:
- * generic/gdbtk-varobj.c:
- * generic/gdbtk-stack.c:
- * generic/gdbtk-register.c:
- * generic/gdbtk-main.c:
- * generic/gdbtk-interp.c:
- * generic/gdbtk-hooks.c:
- * generic/gdbtk-cmds.h:
- * generic/gdbtk-cmds.c:
- * generic/gdbtk-bp.c: Put (C) after Copyright. Update the FSF
- address.
-
-2005-11-29 Andrew Stubbs <andrew.stubbs@st.com>
-
- * library/prefs.tcl (pref_read): Read preferences file if environment
- variable INSIGHT_FORCE_READ_PREFERENCES is set (regardless of -nx).
- * README: Mention INSIGHT_FORCE_READ_PREFERENCES.
-
-2005-11-11 Keith Seitz <keiths@redhat.com>
-
- From Spencer Oliver <spencer.oliver@anglia.com>:
- * library/targetselection.itb (build_win): Only pack the xterm checkbutton
- on unix platforms.
-
-2005-09-12 Keith Seitz <keiths@redhat.com>
-
- * generic/gdbtk.c (gdbtk_init): Remove all mention of Tix.
- * README: Ditto.
-
-2005-08-31 Keith Seitz <keiths@redhat.com>
-
- * library/help/target.html: Update dialog options.
- * library/targetselection.itb (help): Implement.
- (build_win): Don't disable help button.
- Only display "use tty" option on unix hosts.
-
-2005-08-31 Keith Seitz <keiths@redhat.com>
-
- * library/bpwin.itb (bp_store): gdb_get_breakpoint_info outputs
- the breakpoint condition, too -- include it in the lassign.
-
-2005-08-31 Keith Seitz <keiths@redhat.com>
-
- From Dieter Ruppert <dieter_ruppert@siemens.com>:
- * library/memwin.itb (update_address): Change parameter name
- so that it does not shadow a member variable.
- Save the updated address internally.
-
-2005-06-13 Keith Seitz <keiths@redhat.com>
-
- From Charles Brockman <mr hyphen chuck at att dot net>:
- * library/interface.tcl (gdbtk_tcl_warning): Filter "RTTI symbol not found"
- "warnings", too.
-
-2005-06-06 Keith Seitz <keiths@redhat.com>
-
- * library/interface.tcl (gdbtk_tcl_fputs_error): gdbtk_state is in the global
- namespace. Fix references.
- (gdbtk_tcl_fputs_log): Likewise.
-
- From Steven Johnson <johnson@sakuraindustries.com>:
- * library/interface.tcl (gdbtk_tcl_warning): Filter some basic warnings
- from gdb - "incomplete CFI.." and "Internal error".
-
-2005-06-06 Keith Seitz <keiths@redhat.com>
-
- From Steven Johnson <sjohnson@sakraindustries.com>:
- * generic/gcbtk-cmds.c (gdb_loc): Hand gdb_loc called before remote
- target connected, where gdb_loc now returns the entry address as $pc.
-
-2005-06-01 Keith Seitz <keiths@redhat.com>
-
- From James Lemke <jim@wasabisystems.com>:
- * generic/gdbtk-hooks.c (gdbtk_fileopenin, gdbtk_read): New functions
- for target to read stdin from console window.
- * generic/gdbtk-interp.c (_stdtargin): Added.
- * generic/gdbtk.h (gdbtk_fileopenin): Add declaration.
-
-2005-05-26 Keith Seitz <keiths@redhat.com>
-
- * generic/gdbtk-cmds.c (gdb_set_mem): target_write_memory now takes
- gdb_byte* instead of char*.
- * generic/gdbtk-register.c (get_register): frame_register and val_print
- take gdb_byte* instead of char*.
- * generic/gdbtk-wrapper.c: Ditto the val_print part.
-
- From Paul Schlie <schlie@comcast.net>:
- * generic/gdbtk-bp.c (gdb_set_bp): Use lbasename instead of basename.
- * generic/gdbtk-cmds.c (gdb_listfiles): Likewise.
-
-2005-04-28 Ben Elliston <bje@au.ibm.com>
-
- * generic/gdbtk-interp.c (gdbtk_interpreter_exec): Return struct
- gdb_exception due to the 2005-04-26 renaming of struct exception.
- * generic/gdbtk.c (gdbtk_source_start_file): Likewise.
-
-2005-02-25 Keith Seitz <kseitz@sources.redhat.com>
-
- * generic/gdbtk.c (gdbtk_source_start_file): In the _WIN32 case,
- use throw_exception (struct exception).
-
-2005-02-16 Martin Hunt <hunt@redhat.com>
-
- * generic/gdbtk-stack.c (get_frame_name): Replace
- print_address_numeric with deprecated_print_address_numeric.
- * generic/gdbtk-cmds.c (gdbtk_load_asm): Ditto.
-
-2005-02-07 Keith Seitz <kseitz@sources.redhat.com>
-
- * generic/gdbtk-cmds.c (gdb_eval): VALUE_EMBEDDED_OFFSET and
- VALUE_CONTENTS are now functions.
-
-
-2005-01-19 Keith Seitz <kseitz@sources.redhat.com>
-
- * Makefile.in: Regenerate.
- * aclocal.m4: Regenerate.
- * plugins/Makefile.in; Regenerate.
- * plugins/aclocal.m4: Regenerate.
-
-2005-01-17 Keith Seitz <kseitz@sources.redhat.com>
-
- * generic/gdbtk-varobj.c (variable_value): Remove all instances
- of error_last_message. It's gone.
-
- * generic/gdbtk-wrapper.c: Include exceptions.h
- * generic/gdbtk-cmds.c: Likewise.
- * generic/gdbtk-interp.c: Likewise.
- (gdbtk_interpreter_exec): Change return type to struct
- exception. Return exception_none.
-
-2005-01-13 Keith Seitz <keiths@redhat.com>
-
- * configure.in: Rename to ...
- * configure.ac: ... this.
- * configure: Regenerate with autoconf 2.59.
- * plugins/configure.in: Rename to ...
- * plugins/configure.ac: ... this.
- * pluginx/configure: Regenerate with autoconf 2.59.
-
diff --git a/gdb/gdbtk/Makefile.am b/gdb/gdbtk/Makefile.am
deleted file mode 100644
index 530ab66e228..00000000000
--- a/gdb/gdbtk/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-SUBDIRS = plugins
diff --git a/gdb/gdbtk/Makefile.in b/gdb/gdbtk/Makefile.in
deleted file mode 100644
index fa1492cacdf..00000000000
--- a/gdb/gdbtk/Makefile.in
+++ /dev/null
@@ -1,391 +0,0 @@
-# Makefile.in generated by automake 1.8.3 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = .
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-host_triplet = @host@
-DIST_COMMON = $(srcdir)/../../config.guess $(srcdir)/../../config.sub \
- README ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(top_srcdir)/configure $(am__configure_deps) \
- $(srcdir)/../../mkinstalldirs
-subdir = .
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno configure.status.lineno
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-depcomp =
-am__depfiles_maybe =
-SOURCES =
-DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
- html-recursive info-recursive install-data-recursive \
- install-exec-recursive install-info-recursive \
- install-recursive installcheck-recursive installdirs-recursive \
- pdf-recursive ps-recursive uninstall-info-recursive \
- uninstall-recursive
-ETAGS = etags
-CTAGS = ctags
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EXEEXT = @EXEEXT@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-AUTOMAKE_OPTIONS = cygnus
-SUBDIRS = plugins
-all: all-recursive
-
-.SUFFIXES:
-am--refresh:
- @:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
- cd $(srcdir) && $(AUTOMAKE) --foreign \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- echo ' $(SHELL) ./config.status'; \
- $(SHELL) ./config.status;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-uninstall-info-am:
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
- @set fnord $$MAKEFLAGS; amf=$$2; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- dot_seen=yes; \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @set fnord $$MAKEFLAGS; amf=$$2; \
- dot_seen=no; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- rev=''; for subdir in $$list; do \
- if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- fi; \
- done; \
- rev="$$rev ."; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-ctags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- if (etags --etags-include --version) >/dev/null 2>&1; then \
- include_option=--etags-include; \
- else \
- include_option=--include; \
- fi; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test -f $$subdir/TAGS && \
- tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
- fi; \
- done; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$tags$$unique" \
- || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-check-am:
-check: check-recursive
-all-am: Makefile
-installdirs: installdirs-recursive
-installdirs-am:
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-generic mostlyclean-am
-
-distclean: distclean-recursive
- -rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html: html-recursive
-
-info: info-recursive
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-recursive
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
- -rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -rf $(top_srcdir)/autom4te.cache
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-generic
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am:
-
-uninstall-info: uninstall-info-recursive
-
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
- check-am clean clean-generic clean-recursive ctags \
- ctags-recursive distclean distclean-generic \
- distclean-recursive distclean-tags dvi dvi-am html html-am \
- info info-am install install-am install-data install-data-am \
- install-exec install-exec-am install-info install-info-am \
- install-man install-strip installcheck installcheck-am \
- installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic maintainer-clean-recursive \
- mostlyclean mostlyclean-generic mostlyclean-recursive pdf \
- pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
- uninstall-info-am
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/gdb/gdbtk/README b/gdb/gdbtk/README
deleted file mode 100644
index 79cea281335..00000000000
--- a/gdb/gdbtk/README
+++ /dev/null
@@ -1,285 +0,0 @@
- README
- Written by Stu Grossman
- Updated 9/26/95 by Fred Fish for gdb 4.15 release
- Updated 4/18/97 by Martin Hunt
- Updated 8/15/02 by Keith Seitz
-
-This file describes how to build, install, use and hack on Insight (formerly
-GDBtk), a TK-based GUI for GDB, the GNU debugger.
-
-Introduction
-============
-
-Insight is a version of GDB that uses Tcl/Tk to implement a graphical
-user inter-face. It is a fully integrated GUI, not a separate
-front-end program. The interface consists of several separate
-windows, which use standard elements like buttons, scrollbars, entry
-boxes and such to create a fairly easy to use interface. Each window
-has a distinct content and purpose, and can be enabled or disabled
-individually. The windows contain things like the current source
-file, a disassembly of the current function, text commands (for things
-that aren't accessible via a button), and so forth.
-
-Building and Installing
-=======================
-
-Building Insight is very straightforward. It is configured/built by
-default when you checkout or download Insight. Right now, Insight MUST
-be built using the versions of Tcl, Tk, and Itcl that come with
-the sources. We're working to fix that, but it is going to take a lot
-of time. (Want to help?)
-
-On Unix machines, you will also need to have X11 (R4/R5/R6) installed
-(this is a prerequisite to installing Tk).
-
-Insight inherits much of GDB's configuration options (like where it is
-to be installed). See the GDB README file for more details on configure
-options and such for GDB.
-
-It is recommended that Insight, like GDB, be built outside of the source
-directory in order to preserve the integrity of the source directory. This
-is very useful, for example, when building GDB/Insight for multiple hosts
-or targets.
-
-For example:
-
- host> ls
- src/
- host> mkdir insight; cd insight
- host> ../src/configure
- host> make
- host> make install
-
-Environment Variables
-=====================
-
-Insight and all of its support infrastructure read various environment variables
-for optional startup information. All of these environment variables are
-optional: Insight and its packages know how to find their files in both the
-install and the source trees.
-
- Name Description
- ---- -----------
- TCL_LIBRARY The location of the Tcl library files
- TK_LIBRARY The location of the Tk library files
- REDHAT_GUI_LIBRARY The location of the libgui library files
- GDBTK_LIBRARY The location of the Insight library files
- INSIGHT_PLUGINS A colon-separated list of directories
- to search for plugins (see gdb/gdbtk/plugins/HOW-TO)
- GDBTK_DEBUG Controls runtime loading of the Debug Window.
- (This is the most useful debug option.)
- GDBTK_TRACE Controls runtime tracing of the tcl code
- GDBTK_DEBUGFILE Filename to send debug output
- GDBTK_TEST_RUNNING Testsuite variable. See gdb/testsuite/gdb.gdbtk/README
- for more information.
- INSIGHT_FORCE_READ_PREFERENCES
- If set, read .gdbtkinit (or gdb.ini on windows)
- even when -nx is passed to GDB.
-
-All of the environment variables for controlling Insight are well documented
-in gdb/gdbtk/library/main.tcl. Search for "env" to find them all.
-
-Using Insight
-=============
-
-Just run it like you would a normal GDB (in fact, it's actually called `gdb').
-If everything goes well, you should have several windows pop up. To get going,
-hit the Run button, and go exploring.
-
-If you want to use GDB in command line mode, just use the -nw option. Or, you
-can undefine the DISPLAY environment variable.
-
-Insight comes with all your standard debugger windows, including:
-
- o Console Window
- o Source Window
- o Register Window
- o Memory Window
- o Locals Window
- o Watch Window
- o Stack Window
- o Thread/Process Window
- o Function Browser Window
- o Debug Window (for developers)
-
-Insight also has an extensive (if outdated) online help system which describes
-all the windows and explains how to use them. Users are urged to browse this
-help system for information on using Insight.
-
-Hacking Insight
-===============
-
-The GUI is primarily implemented by Tcl/Tk code which lives in gdb/gdbtk/library
- and bunch of C files in gdb/gdbtk/generic. The Tcl/Tk code determines the look
-and feel, the layout, and the functions associated with all of the interface
-elements. The C code is mostly just glue between GDB internals and Tcl-land.
-In essence, all of the policy is implemented in Tcl/Tk, and is easily changed
-without recompiling.
-
-To make more serious changes to the interface, such as adding a new window or
-changing the framework, you will have to hack the tcl code (and probably the C
-code as well). The tcl library install directory is $(libdir) (probably
-/usr/local/lib/insight1.0). But, you will probably want to hack on your own
-private copy before putting it up for the rest of the users. To find the GDB tcl
-code, GDB first checks for the environment variable GDBTK_LIBRARY. GDB will check
-this directory for the file "main.tcl". If GDBTK_LIBRARY is not set, GDB will
-look for main.tcl in the install directory, and finally it will try to find
-the tcl directory in the sources.
-
-A word about the different files in Insight is in order. Insight is a hybrid of
-C code and "Tcl" code (actuall Incr Tcl code). We use the following conventions
-for naming our tcl files (most of the time!). Any file with a ".tcl" extension
-is simply vanilla tcl code. Any file ending with ".itcl" is an Itcl file,
-class definition and implementation all in one. So far so good. Now comes the
-toughy: Files ending in ".ith" are Itcl class definition files, and they all
-must have a corresponding implementation file, ending in ".itb". Why do we do
-this? Simple. With Itcl, one can reread class implementations at runtime, but
-one cannot change the class definition. So all those ".itcl" files can only
-be reread be restarting Insight. The same is not true, though, of the ".itb"
-files. Those files can be changed and immediately reread and used in Insight
-without having to restart (as long as the class definition doesn't change). This
-is a nifty Itcl feature which is fully exploited by the Debug Window, which
-has a "ReSource" menu on it to reread the Tcl files. (To get to the Debug Window,
-hit Ctrl-Alt-F11 in the Source Window or type "tk ManagedWin::open DebugWin" in
-the Console Window.)
-
-Internally, Insight is basically GDB, linked with Tcl/Tk, some Tcl/Tk extensions,
-and some glue code that interfaces GDB internals to Tcl-land. This means that
-Insight operates as a single program, not a front-end to GDB. All GDB commands,
-and a great deal of the target program state are accessible to the Tcl programmer.
-In addition, there are many callbacks from GDB to notify Tcl-land of important
-events. Many of these are accomplished via "hooks" in GDB, and others are
-accomplished using event notifications. GDB is slowly deprecating the use of
-"hooks" in favor of its new event mechanism.
-
-All of the below commands have lots of nice comments before them explaining what
-they all do, how they are to be used, etc. The source code is the definitive
-authority (other than a maintainer) for the definition/usage of a command in
-Insight. Hackers are urged to read through the source code for any commands
-which may need explaining.
-
-New Tcl Commands:
-
-Here is a brief, if incomplete, summary of the Tcl commands that are created
-by Insight. These are installed into the Tcl interpreter in the C files.
-
- Name Description
- ---- -----------
- gdb_cmd Sends a text command to gdb. Returns the result.
- DEPRECATED: Do not use any more.
- gdb_loc Returns a list of useful tidbits about the specified
- GDB linespec
- gdb_sourcelines Returns a list of executable lines for a source file
- gdb_listfiles Returns a list of all of the source files
- gdb_stop Stops the target process (or at least tries to)
- gdb_reginfo Returns information about registers (names, numbers,
- values, size, etc.)
- gdb_disassemble Returns the text of a disassembly of the entire
- function. No longer used.
- gdb_load_disassembly Loads the disassembly of a location into a
- source window's textbox
- gdb_eval Returns the value of a given expression
- gdb_get_breakpoint_list Returns a list of all breakpoints
- gdb_get_breakpoint_info Returns a list of info about a breakpoint
-
-Tcl procedures that are hooked into GDB:
-
-This is a list, albeit incomplete, of the "hook" functions that are installed
-into GDB. The actual "hooks" are installed/initialized in
-gdb/gdbtk/generic/gdbtk-hooks.c (and maybe one or two in gdbtk.c). The list
-below is the Tcl side of the hook.
-
- Name Description
- ---- -----------
- gdb_tcl_fputs Sends output into Tcl for the command window
- gdb_tcl_query Pops up a query window
- gdbtk_tcl_breakpoint Notifies Tcl of changes to a breakpoint
- gdbtk_tcl_idle Notifies Tcl that debugged process is now idle
- gdbtk_tcl_busy Notifies Tcl that debugged process is now running
-
-Events:
-
-Starting with GDB 5.0, GDB has had an event loop. Although largely unused right
-now, with it came some useful "baggage", especially event notifications, even
-though they, too, were largely incomplete. The list of events continues to grow,
-and Insight and GDB often "share" overlapping events, but the list below is
-complete (since there are only a few defined events). The source for these
-events can be found in gdb/gdbtk/library/gdbevents.it[hb].
-
- Name Description
- ---- -----------
- BreakpointEvent A breakpoint has been created/modified/deleted
- TracepointEvent A tracepoint has been created/modified/deleted
- SetVariableEvent User has issued a "set" command in Console
- BusyEvent The debugger is "busy"
- IdleEvent The debugger is "idle"
- UpdateEvent The state of the target has changed (or the
- GDB's view of the target has changed)
- ArchChangedEvent The architecture of the system has changed
- (this can happen when GDB defaults to using
- some basic CPU and detects that a more elaborate
- CPU is actually being used, e.g., SH5)
-
-GDB Commands:
-
-Insight installs a few GDB commands, which are available with the Console Window.
-
- Name Description
- ---- -----------
- tk Executes the arguments in the Insight Tcl
- interpreter
- view Displays the given linespec in the Source Window
-
-Problems
-========
-
-During building, you may run into problems with finding Tcl, Tk or X11. Look
-in gdb/Makefile, and fix TCL_CFLAGS, TCL, TK_CFLAGS, TK, and ENABLE_CLIBS as
-appropriate.
-
-If you one of the following messages when you run gdb:
-
- Tcl_Init failed: can't find init.tcl; perhaps you need to
- install Tcl or set your TCL_LIBRARY environment variable?
-or
- Tk_Init failed: can't find tk.tcl; perhaps you need to
- install Tk or set your TK_LIBRARY environment variable?
-
-then you haven't installed Tcl or TK properly. Fix the appropriate environment
-variable to point at the {tcl tk}/library directory, and restart gdb.
-
-Known Bugs
-==========
-
-generic problems
-
- o Using the GDB commands "up"/"down"/"frame" in Console Window
- can cause GDB and Insight to get out of sync. If this happens,
- simply use the Stack Window or the frame navigation buttons on
- the Source Window's toolbar to resync the two.
-
- o Not really a problem, but it might be nice to have a frame/stack
- window that displays the last N words on the stack, along with
- indications about which function owns a particular frame, how the
- frame pointers are chained, and possibly the names of variables
- alongside their frame slots.
-
-host- or target-specific problems
-
- o Windows is hosed. Tk8.3 in sources.redhat.com is not stable
- on windows. Wanna help?
-
-Where to find help
-==================
-
-The first place to turn for help is the online help system. It may be old, but
-it is still largely correct: it explains what everything does. If that fails,
-search the mailing list archives for other users who may have had similar problems
-or questions. The archives are online at
-
-http://sources.redhat.com/insight/mailinglist.htm .
-
-If all else fails, send a note to the mailing list, insight@sources.redhat.com,
-where users and maintainers lurk. This is a very low traffic list, so don't
-be afraid to join the list. Instructions for joining are on our homepage,
-http://sources.redhat.com/insight .
diff --git a/gdb/gdbtk/TODO b/gdb/gdbtk/TODO
deleted file mode 100644
index 942febdb2ca..00000000000
--- a/gdb/gdbtk/TODO
+++ /dev/null
@@ -1,113 +0,0 @@
-If you find inaccuracies in this list, please send mail to
-insight@sources.redhat.com. If you would like to work on any
-of these, you should consider sending mail to the same address, to
-find out whether anyone else is working on it.
-
- New Features and Enhancements
- =============================
-
-Display of the target program output. Perhaps use the XTerm hack created
-by Tom.
-
---
-
-Support for inserting breakpoints at arbitrary locations, perhaps adding an
-entry widget to the breakpoints window.
-
---
-
-Support for hardware breakpoints and watchpoints (will need fixes in gdb).
-
---
-
-"Disassembly from Memory" Window. Perhaps as a pane in place of the source
-code one.
-
---
-
-Register Window capable of handling large number of registers, typed
-registers, registers organized in groups that can be shown/hidden and
-that provide for better screen organization.
-
---
-
-Per-project preferences so that one can have a preferred target settings
-for each project (and environment variable and the current directory would
-be searched for the project preference file -- global preferences would
-still come from the users's home directory).
-
---
-
-Reactivate the "Use this target?" confirmation box. Do it independently of
-the above?
-
---
-
-Add option to activate the Source Window from the signal popup box when
-the inferior program is signaled.
-
- Code Cleanups
- =============
-
-Reorganize the Source Memory code.
-
---
-
-Clean up the class hierarchy.
-
---
-
-Migrate to Tcl/Tk 8.3.2
-
---
-
-Try BLT tree as an alternative to the Tix Tree, so we can drop Tix altogether.
-
---
-
-Optional use of installed Tcl/Tk (keeping it available on the distribution)
-
---
-
-Fix the gdbtk testsuite.
-
---
-
-Enhance the test harness, perhaps migrating to the new SourceNavigator testing
-system.
-
- Architectural Improvements
- ==========================
-
-Decouple the GUI from gdb, running them as separate processes.
-
---
-
-Separate the Tcl part from the Tk part to facilitate scripting.
-
- Bug Fixes
- =========
-
-Fix process attach, specially the process listing code.
-
-Fix Source Window so that Key shortcuts work (may not be possible without
-rewritting).
-
-Fix info popup annoyances (like trying to show a large array without even
-adding line breaks and showing up over right click menus).
-
-Fix command window command line recall that misses the arguments of
-commands that autoincrement their arguments.
-
-Fix function browser window problems.
-
-Maximization of a window affects preference sizing but forgets that maximized
-state was set.
-
-Taskbar "always on top" hides funcxtion combobox.
-
---
-Fernando Nasser
-Red Hat Canada Ltd. E-Mail: fnasser@cygnus.com
-2323 Yonge Street, Suite #300
-Toronto, Ontario M4P 2C9
diff --git a/gdb/gdbtk/aclocal.m4 b/gdb/gdbtk/aclocal.m4
deleted file mode 100644
index 563d659569a..00000000000
--- a/gdb/gdbtk/aclocal.m4
+++ /dev/null
@@ -1,943 +0,0 @@
-# generated automatically by aclocal 1.8.3 -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
-# Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-# -*- Autoconf -*-
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
-# Generated from amversion.in; do not edit by hand.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.8.3])])
-
-# AM_AUX_DIR_EXPAND
-
-# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
-#
-# Of course, Automake must honor this variable whenever it calls a
-# tool from the auxiliary directory. The problem is that $srcdir (and
-# therefore $ac_aux_dir as well) can be either absolute or relative,
-# depending on how configure is run. This is pretty annoying, since
-# it makes $ac_aux_dir quite unusable in subdirectories: in the top
-# source directory, any form will work fine, but in subdirectories a
-# relative path needs to be adjusted first.
-#
-# $ac_aux_dir/missing
-# fails when called from a subdirectory if $ac_aux_dir is relative
-# $top_srcdir/$ac_aux_dir/missing
-# fails if $ac_aux_dir is absolute,
-# fails when called from a subdirectory in a VPATH build with
-# a relative $ac_aux_dir
-#
-# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
-# are both prefixed by $srcdir. In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
-# start a VPATH build or use an absolute $srcdir.
-#
-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
-# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
-# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
-# and then we would define $MISSING as
-# MISSING="\${SHELL} $am_aux_dir/missing"
-# This will work as long as MISSING is not called from configure, because
-# unfortunately $(top_srcdir) has no meaning in configure.
-# However there are other variables, like CC, which are often used in
-# configure, and could therefore not use this "fixed" $ac_aux_dir.
-#
-# Another solution, used here, is to always expand $ac_aux_dir to an
-# absolute PATH. The drawback is that using absolute paths prevent a
-# configured tree to be moved without reconfiguration.
-
-AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-])
-
-# AM_CONDITIONAL -*- Autoconf -*-
-
-# Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 6
-
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
-# -------------------------------------
-# Define a conditional.
-AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
- [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])
-AC_SUBST([$1_FALSE])
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi
-AC_CONFIG_COMMANDS_PRE(
-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
- AC_MSG_ERROR([conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.])
-fi])])
-
-# serial 7 -*- Autoconf -*-
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
-# Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
-# written in clear, in which case automake, when reading aclocal.m4,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery. Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
-
-
-
-# _AM_DEPENDENCIES(NAME)
-# ----------------------
-# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
-# We try a few techniques and use that to set a single cache variable.
-#
-# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
-# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
-# dependency, and given that the user is not expected to run this macro,
-# just rely on AC_PROG_CC.
-AC_DEFUN([_AM_DEPENDENCIES],
-[AC_REQUIRE([AM_SET_DEPDIR])dnl
-AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
-AC_REQUIRE([AM_MAKE_INCLUDE])dnl
-AC_REQUIRE([AM_DEP_TRACK])dnl
-
-ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
- [$1], CXX, [depcc="$CXX" am_compiler_list=],
- [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
- [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
- [depcc="$$1" am_compiler_list=])
-
-AC_CACHE_CHECK([dependency style of $depcc],
- [am_cv_$1_dependencies_compiler_type],
-[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
- # We make a subdir and do the tests there. Otherwise we can end up
- # making bogus files that we don't know about and never remove. For
- # instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
- mkdir conftest.dir
- # Copy depcomp to subdir because otherwise we won't find it if we're
- # using a relative directory.
- cp "$am_depcomp" conftest.dir
- cd conftest.dir
- # We will build objects and dependencies in a subdirectory because
- # it helps to detect inapplicable dependency modes. For instance
- # both Tru64's cc and ICC support -MD to output dependencies as a
- # side effect of compilation, but ICC will put the dependencies in
- # the current directory while Tru64 will put them in the object
- # directory.
- mkdir sub
-
- am_cv_$1_dependencies_compiler_type=none
- if test "$am_compiler_list" = ""; then
- am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
- fi
- for depmode in $am_compiler_list; do
- # Setup a source with many dependencies, because some compilers
- # like to wrap large dependency lists on column 80 (with \), and
- # we should not choose a depcomp mode which is confused by this.
- #
- # We need to recreate these files for each test, as the compiler may
- # overwrite some of them when testing with obscure command lines.
- # This happens at least with the AIX C compiler.
- : > sub/conftest.c
- for i in 1 2 3 4 5 6; do
- echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
- done
- echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
- case $depmode in
- nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
- if test "x$enable_dependency_tracking" = xyes; then
- continue
- else
- break
- fi
- ;;
- none) break ;;
- esac
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this.
- if depmode=$depmode \
- source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
- depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
- >/dev/null 2>conftest.err &&
- grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- # icc doesn't choke on unknown options, it will just issue warnings
- # (even with -Werror). So we grep stderr for any message
- # that says an option was ignored.
- if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
- am_cv_$1_dependencies_compiler_type=$depmode
- break
- fi
- fi
- done
-
- cd ..
- rm -rf conftest.dir
-else
- am_cv_$1_dependencies_compiler_type=none
-fi
-])
-AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
-AM_CONDITIONAL([am__fastdep$1], [
- test "x$enable_dependency_tracking" != xno \
- && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
-])
-
-
-# AM_SET_DEPDIR
-# -------------
-# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
-AC_DEFUN([AM_SET_DEPDIR],
-[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
-])
-
-
-# AM_DEP_TRACK
-# ------------
-AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[ --disable-dependency-tracking speeds up one-time build
- --enable-dependency-tracking do not reject slow dependency extractors])
-if test "x$enable_dependency_tracking" != xno; then
- am_depcomp="$ac_aux_dir/depcomp"
- AMDEPBACKSLASH='\'
-fi
-AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])
-])
-
-# Generate code to set up dependency tracking. -*- Autoconf -*-
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-#serial 2
-
-# _AM_OUTPUT_DEPENDENCY_COMMANDS
-# ------------------------------
-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[for mf in $CONFIG_FILES; do
- # Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named `Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # So let's grep whole file.
- if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
- dirpart=`AS_DIRNAME("$mf")`
- else
- continue
- fi
- grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
- # Extract the definition of DEP_FILES from the Makefile without
- # running `make'.
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
- test -z "$DEPDIR" && continue
- # When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n 's/^U = //p' < "$mf"`
- test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
- # We invoke sed twice because it is the simplest approach to
- # changing $(DEPDIR) to its actual value in the expansion.
- for file in `sed -n '
- /^DEP_FILES = .*\\\\$/ {
- s/^DEP_FILES = //
- :loop
- s/\\\\$//
- p
- n
- /\\\\$/ b loop
- p
- }
- /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`AS_DIRNAME(["$file"])`
- AS_MKDIR_P([$dirpart/$fdir])
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
- done
-done
-])# _AM_OUTPUT_DEPENDENCY_COMMANDS
-
-
-# AM_OUTPUT_DEPENDENCY_COMMANDS
-# -----------------------------
-# This macro should only be invoked once -- use via AC_REQUIRE.
-#
-# This code is only required when automatic dependency tracking
-# is enabled. FIXME. This creates each `.P' file that we will
-# need in order to bootstrap the dependency handling code.
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
-[AC_CONFIG_COMMANDS([depfiles],
- [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
- [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
-
-# Do all the work for Automake. -*- Autoconf -*-
-
-# This macro actually does too much some checks are only needed if
-# your package does certain things. But this isn't really a big deal.
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 11
-
-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
-# AM_INIT_AUTOMAKE([OPTIONS])
-# -----------------------------------------------
-# The call with PACKAGE and VERSION arguments is the old style
-# call (pre autoconf-2.50), which is being phased out. PACKAGE
-# and VERSION should now be passed to AC_INIT and removed from
-# the call to AM_INIT_AUTOMAKE.
-# We support both call styles for the transition. After
-# the next Automake release, Autoconf can make the AC_INIT
-# arguments mandatory, and then we can depend on a new Autoconf
-# release and drop the old call support.
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.58])dnl
-dnl Autoconf wants to disallow AM_ names. We explicitly allow
-dnl the ones we care about.
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
-AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])dnl
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
- test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
- if (cygpath --version) >/dev/null 2>/dev/null; then
- CYGPATH_W='cygpath -w'
- else
- CYGPATH_W=echo
- fi
-fi
-AC_SUBST([CYGPATH_W])
-
-# Define the identity of the package.
-dnl Distinguish between old-style and new-style calls.
-m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
- AC_SUBST([PACKAGE], [$1])dnl
- AC_SUBST([VERSION], [$2])],
-[_AM_SET_OPTIONS([$1])dnl
- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
-
-_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
-
-# Some tools Automake needs.
-AC_REQUIRE([AM_SANITY_CHECK])dnl
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
-AM_MISSING_PROG(AMTAR, tar)
-AM_PROG_INSTALL_SH
-AM_PROG_INSTALL_STRIP
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-
-_AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_CC],
- [_AM_DEPENDENCIES(CC)],
- [define([AC_PROG_CC],
- defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [_AM_DEPENDENCIES(CXX)],
- [define([AC_PROG_CXX],
- defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
-])
-])
-
-
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated. The stamp files are numbered to have different names.
-
-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
-# loop where config.status creates the headers, so we can generate
-# our stamp files there.
-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
-[# Compute $1's index in $config_headers.
-_am_stamp_count=1
-for _am_header in $config_headers :; do
- case $_am_header in
- $1 | $1:* )
- break ;;
- * )
- _am_stamp_count=`expr $_am_stamp_count + 1` ;;
- esac
-done
-echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
-
-# AM_PROG_INSTALL_SH
-# ------------------
-# Define $install_sh.
-
-# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-AC_DEFUN([AM_PROG_INSTALL_SH],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
-AC_SUBST(install_sh)])
-
-# -*- Autoconf -*-
-# Copyright (C) 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 1
-
-# Check whether the underlying file-system supports filenames
-# with a leading dot. For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
- am__leading_dot=.
-else
- am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004
-# Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 3
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT([$USE_MAINTAINER_MODE])
- AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
-AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
-
-# Check to see how 'make' treats includes. -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 2
-
-# AM_MAKE_INCLUDE()
-# -----------------
-# Check to see how make treats includes.
-AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
- @echo done
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
- am__include=include
- am__quote=
- _am_result=GNU
-fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
- echo '.include "confinc"' > confmf
- if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
- am__include=.include
- am__quote="\""
- _am_result=BSD
- fi
-fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
-
-# -*- Autoconf -*-
-
-
-# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 3
-
-# AM_MISSING_PROG(NAME, PROGRAM)
-# ------------------------------
-AC_DEFUN([AM_MISSING_PROG],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
-$1=${$1-"${am_missing_run}$2"}
-AC_SUBST($1)])
-
-
-# AM_MISSING_HAS_RUN
-# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
-AC_DEFUN([AM_MISSING_HAS_RUN],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
-else
- am_missing_run=
- AC_MSG_WARN([`missing' script is too old or missing])
-fi
-])
-
-# AM_PROG_MKDIR_P
-# ---------------
-# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
-
-# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
-# created by `make install' are always world readable, even if the
-# installer happens to have an overly restrictive umask (e.g. 077).
-# This was a mistake. There are at least two reasons why we must not
-# use `-m 0755':
-# - it causes special bits like SGID to be ignored,
-# - it may be too restrictive (some setups expect 775 directories).
-#
-# Do not use -m 0755 and let people choose whatever they expect by
-# setting umask.
-#
-# We cannot accept any implementation of `mkdir' that recognizes `-p'.
-# Some implementations (such as Solaris 8's) are not thread-safe: if a
-# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
-# concurrently, both version can detect that a/ is missing, but only
-# one can create it and the other will error out. Consequently we
-# restrict ourselves to GNU make (using the --version option ensures
-# this.)
-AC_DEFUN([AM_PROG_MKDIR_P],
-[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
- # Keeping the `.' argument allows $(mkdir_p) to be used without
- # argument. Indeed, we sometimes output rules like
- # $(mkdir_p) $(somedir)
- # where $(somedir) is conditionally defined.
- # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
- # expensive solution, as it forces Make to start a sub-shell.)
- mkdir_p='mkdir -p -- .'
-else
- # On NextStep and OpenStep, the `mkdir' command does not
- # recognize any option. It will interpret all options as
- # directories to create, and then abort because `.' already
- # exists.
- for d in ./-p ./--version;
- do
- test -d $d && rmdir $d
- done
- # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
- if test -f "$ac_aux_dir/mkinstalldirs"; then
- mkdir_p='$(mkinstalldirs)'
- else
- mkdir_p='$(install_sh) -d'
- fi
-fi
-AC_SUBST([mkdir_p])])
-
-# Helper functions for option handling. -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 2
-
-# _AM_MANGLE_OPTION(NAME)
-# -----------------------
-AC_DEFUN([_AM_MANGLE_OPTION],
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
-
-# _AM_SET_OPTION(NAME)
-# ------------------------------
-# Set option NAME. Presently that only means defining a flag for this option.
-AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
-
-# _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
-# OPTIONS is a space-separated list of Automake options.
-AC_DEFUN([_AM_SET_OPTIONS],
-[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
-
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
-# -------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-AC_DEFUN([_AM_IF_OPTION],
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 3
-
-# AM_SANITY_CHECK
-# ---------------
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
- if test "$[*]" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftest.file`
- fi
- rm -f conftest.file
- if test "$[*]" != "X $srcdir/configure conftest.file" \
- && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "$[2]" = conftest.file
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-AC_MSG_RESULT(yes)])
-
-# AM_PROG_INSTALL_STRIP
-
-# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# One issue with vendor `install' (even GNU) is that you can't
-# specify the program used to strip binaries. This is especially
-# annoying in cross-compiling environments, where the build's strip
-# is unlikely to handle the host's binaries.
-# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
-# STRIPPROG with the value of the STRIP variable (set by the user).
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'. However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
-if test "$cross_compiling" != no; then
- AC_CHECK_TOOL([STRIP], [strip], :)
-fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
-
diff --git a/gdb/gdbtk/configure b/gdb/gdbtk/configure
deleted file mode 100755
index 4116160096f..00000000000
--- a/gdb/gdbtk/configure
+++ /dev/null
@@ -1,3706 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59.
-#
-# Copyright (C) 2003 Free Software Foundation, Inc.
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-exec 6>&1
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_config_libobj_dir=.
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Maximum number of lines to put in a shell here document.
-# This variable seems obsolete. It should probably be removed, and
-# only ac_max_sed_lines should be used.
-: ${ac_max_here_lines=38}
-
-# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-
-ac_unique_file="generic/gdbtk.h"
-ac_subdirs_all="$ac_subdirs_all plugins"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO SET_MAKE MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT subdirs LIBOBJS LTLIBOBJS'
-ac_subst_files=''
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-ac_prev=
-for ac_option
-do
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case $ac_option in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir=$ac_optarg ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build_alias ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build_alias=$ac_optarg ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file=$ac_optarg ;;
-
- --config-cache | -C)
- cache_file=config.cache ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir=$ac_optarg ;;
-
- -disable-* | --disable-*)
- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- eval "enable_$ac_feature=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_$ac_feature='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix=$ac_optarg ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he | -h)
- ac_init_help=long ;;
- -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
- ac_init_help=recursive ;;
- -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
- ac_init_help=short ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host_alias ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host_alias=$ac_optarg ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir=$ac_optarg ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir=$ac_optarg ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir=$ac_optarg ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir=$ac_optarg ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir=$ac_optarg ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir=$ac_optarg ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c | -n)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir=$ac_optarg ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix=$ac_optarg ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix=$ac_optarg ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix=$ac_optarg ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name=$ac_optarg ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir=$ac_optarg ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir=$ac_optarg ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site=$ac_optarg ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir=$ac_optarg ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir=$ac_optarg ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target_alias ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target_alias=$ac_optarg ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers | -V)
- ac_init_version=: ;;
-
- -with-* | --with-*)
- ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "with_$ac_package='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/-/_/g'`
- eval "with_$ac_package=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes=$ac_optarg ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries=$ac_optarg ;;
-
- -*) { echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; }
- ;;
-
- *=*)
- ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
- # Reject names that are not valid shell variable names.
- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
- { (exit 1); exit 1; }; }
- ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
- eval "$ac_envvar='$ac_optarg'"
- export $ac_envvar ;;
-
- *)
- # FIXME: should be removed in autoconf 3.0.
- echo "$as_me: WARNING: you should use --build, --host, --target" >&2
- expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- { echo "$as_me: error: missing argument to $ac_option" >&2
- { (exit 1); exit 1; }; }
-fi
-
-# Be sure to have absolute paths.
-for ac_var in exec_prefix prefix
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
- localstatedir libdir includedir oldincludedir infodir mandir
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
- if test "x$build_alias" = x; then
- cross_compiling=maybe
- echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
- elif test "x$build_alias" != "x$host_alias"; then
- cross_compiling=yes
- fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_confdir=`(dirname "$0") 2>/dev/null ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$0" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
- { (exit 1); exit 1; }; }
- else
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
- { (exit 1); exit 1; }; }
- fi
-fi
-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
- { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
- { (exit 1); exit 1; }; }
-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
-ac_env_build_alias_set=${build_alias+set}
-ac_env_build_alias_value=$build_alias
-ac_cv_env_build_alias_set=${build_alias+set}
-ac_cv_env_build_alias_value=$build_alias
-ac_env_host_alias_set=${host_alias+set}
-ac_env_host_alias_value=$host_alias
-ac_cv_env_host_alias_set=${host_alias+set}
-ac_cv_env_host_alias_value=$host_alias
-ac_env_target_alias_set=${target_alias+set}
-ac_env_target_alias_value=$target_alias
-ac_cv_env_target_alias_set=${target_alias+set}
-ac_cv_env_target_alias_value=$target_alias
-ac_env_CC_set=${CC+set}
-ac_env_CC_value=$CC
-ac_cv_env_CC_set=${CC+set}
-ac_cv_env_CC_value=$CC
-ac_env_CFLAGS_set=${CFLAGS+set}
-ac_env_CFLAGS_value=$CFLAGS
-ac_cv_env_CFLAGS_set=${CFLAGS+set}
-ac_cv_env_CFLAGS_value=$CFLAGS
-ac_env_LDFLAGS_set=${LDFLAGS+set}
-ac_env_LDFLAGS_value=$LDFLAGS
-ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
-ac_cv_env_LDFLAGS_value=$LDFLAGS
-ac_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_env_CPPFLAGS_value=$CPPFLAGS
-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_cv_env_CPPFLAGS_value=$CPPFLAGS
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE. See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
- -h, --help display this help and exit
- --help=short display options specific to this package
- --help=recursive display the short help of all the included packages
- -V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
- --cache-file=FILE cache test results in FILE [disabled]
- -C, --config-cache alias for \`--cache-file=config.cache'
- -n, --no-create do not create output files
- --srcdir=DIR find the sources in DIR [configure dir or \`..']
-
-_ACEOF
-
- cat <<_ACEOF
-Installation directories:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --infodir=DIR info documentation [PREFIX/info]
- --mandir=DIR man documentation [PREFIX/man]
-_ACEOF
-
- cat <<\_ACEOF
-
-Program names:
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM run sed PROGRAM on installed program names
-
-System types:
- --build=BUILD configure for building on BUILD [guessed]
- --host=HOST cross-compile to build programs to run on HOST [BUILD]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
-
- cat <<\_ACEOF
-
-Optional Features:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer
-
-Some influential environment variables:
- CC C compiler command
- CFLAGS C compiler flags
- LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
- nonstandard directory <lib dir>
- CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
- headers in a nonstandard directory <include dir>
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-_ACEOF
-fi
-
-if test "$ac_init_help" = "recursive"; then
- # If there are subdirs, report their specific --help.
- ac_popdir=`pwd`
- for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d $ac_dir || continue
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
- cd $ac_dir
- # Check for guested configure; otherwise get Cygnus style configure.
- if test -f $ac_srcdir/configure.gnu; then
- echo
- $SHELL $ac_srcdir/configure.gnu --help=recursive
- elif test -f $ac_srcdir/configure; then
- echo
- $SHELL $ac_srcdir/configure --help=recursive
- elif test -f $ac_srcdir/configure.ac ||
- test -f $ac_srcdir/configure.in; then
- echo
- $ac_configure --help
- else
- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi
- cd $ac_popdir
- done
-fi
-
-test -n "$ac_init_help" && exit 0
-if $ac_init_version; then
- cat <<\_ACEOF
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
- exit 0
-fi
-exec 5>config.log
-cat >&5 <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by $as_me, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- $ $0 $@
-
-_ACEOF
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
-
-/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
-/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
-/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- echo "PATH: $as_dir"
-done
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_sep=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
- for ac_arg
- do
- case $ac_arg in
- -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- continue ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- case $ac_pass in
- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
- 2)
- ac_configure_args1="$ac_configure_args1 '$ac_arg'"
- if test $ac_must_keep_next = true; then
- ac_must_keep_next=false # Got value, back to normal.
- else
- case $ac_arg in
- *=* | --config-cache | -C | -disable-* | --disable-* \
- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
- | -with-* | --with-* | -without-* | --without-* | --x)
- case "$ac_configure_args0 " in
- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
- esac
- ;;
- -* ) ac_must_keep_next=true ;;
- esac
- fi
- ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
- # Get rid of the leading space.
- ac_sep=" "
- ;;
- esac
- done
-done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log. We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Be sure not to use single quotes in there, as some shells,
-# such as our DU 5.0 friend, will then `close' the trap.
-trap 'exit_status=$?
- # Save into config.log some information that might help in debugging.
- {
- echo
-
- cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
- echo
- # The following way of writing the cache mishandles newlines in values,
-{
- (set) 2>&1 |
- case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- sed -n \
- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
- ;;
- *)
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-}
- echo
-
- cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_vars
- do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
-
- if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------- ##
-## Output files. ##
-## ------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_files
- do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
- fi
-
- if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
- echo
- sed "/^$/d" confdefs.h | sort
- echo
- fi
- test "$ac_signal" != 0 &&
- echo "$as_me: caught signal $ac_signal"
- echo "$as_me: exit $exit_status"
- } >&5
- rm -f core *.core &&
- rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
- exit $exit_status
- ' 0
-for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo >confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
- sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
- { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . $cache_file;;
- *) . ./$cache_file;;
- esac
- fi
-else
- { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
- >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in `(set) 2>&1 |
- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
- eval ac_old_set=\$ac_cv_env_${ac_var}_set
- eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val="\$ac_cv_env_${ac_var}_value"
- eval ac_new_val="\$ac_env_${ac_var}_value"
- case $ac_old_set,$ac_new_set in
- set,)
- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,set)
- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,);;
- *)
- if test "x$ac_old_val" != "x$ac_new_val"; then
- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
-echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
-echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
- fi;;
- esac
- # Pass precious variables to config.status.
- if test "$ac_new_set" = set; then
- case $ac_new_val in
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
- *) ac_arg=$ac_var=$ac_new_val ;;
- esac
- case " $ac_configure_args " in
- *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- esac
- fi
-done
-if $ac_cache_corrupted; then
- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-ac_aux_dir=
-for ac_dir in ../.. $srcdir/../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- elif test -f $ac_dir/shtool; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/shtool install -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in ../.. $srcdir/../.." >&5
-echo "$as_me: error: cannot find install-sh or install.sh in ../.. $srcdir/../.." >&2;}
- { (exit 1); exit 1; }; }
-fi
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"
-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
- ./ | .// | /cC/* | \
- /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
- ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
- /usr/ucb/* ) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # program-specific install script used by HP pwplus--don't use.
- :
- else
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
- done
- done
- ;;
-esac
-done
-
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL=$ac_cv_path_install
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL=$ac_install_sh
- fi
-fi
-echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo "$as_me:$LINENO: checking whether build environment is sane" >&5
-echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" >&5
-echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" >&2;}
- { (exit 1); exit 1; }; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
-Check your system clock" >&5
-echo "$as_me: error: newly created file is older than distributed files!
-Check your system clock" >&2;}
- { (exit 1); exit 1; }; }
-fi
-rm -f conftest*
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,$program_prefix,;$program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$,$program_suffix,;$program_transform_name"
-# Double any \ or $. echo might interpret backslashes.
-# By default was `s,x,x', remove it if useless.
-cat <<\_ACEOF >conftest.sed
-s/[\\$]/&&/g;s/;s,x,x,$//
-_ACEOF
-program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
-rm conftest.sed
-
-echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.make <<\_ACEOF
-all:
- @echo 'ac_maketemp="$(MAKE)"'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftest.make
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- SET_MAKE=
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-PACKAGE=insight
-
-VERSION=1.0
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
-echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE "$PACKAGE"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define VERSION "$VERSION"
-_ACEOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo "$as_me:$LINENO: checking for working aclocal" >&5
-echo $ECHO_N "checking for working aclocal... $ECHO_C" >&6
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal
- echo "$as_me:$LINENO: result: found" >&5
-echo "${ECHO_T}found" >&6
-else
- ACLOCAL="$missing_dir/missing aclocal"
- echo "$as_me:$LINENO: result: missing" >&5
-echo "${ECHO_T}missing" >&6
-fi
-
-echo "$as_me:$LINENO: checking for working autoconf" >&5
-echo $ECHO_N "checking for working autoconf... $ECHO_C" >&6
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$as_me:$LINENO: result: found" >&5
-echo "${ECHO_T}found" >&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$as_me:$LINENO: result: missing" >&5
-echo "${ECHO_T}missing" >&6
-fi
-
-echo "$as_me:$LINENO: checking for working automake" >&5
-echo $ECHO_N "checking for working automake... $ECHO_C" >&6
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake
- echo "$as_me:$LINENO: result: found" >&5
-echo "${ECHO_T}found" >&6
-else
- AUTOMAKE="$missing_dir/missing automake"
- echo "$as_me:$LINENO: result: missing" >&5
-echo "${ECHO_T}missing" >&6
-fi
-
-echo "$as_me:$LINENO: checking for working autoheader" >&5
-echo $ECHO_N "checking for working autoheader... $ECHO_C" >&6
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$as_me:$LINENO: result: found" >&5
-echo "${ECHO_T}found" >&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$as_me:$LINENO: result: missing" >&5
-echo "${ECHO_T}missing" >&6
-fi
-
-echo "$as_me:$LINENO: checking for working makeinfo" >&5
-echo $ECHO_N "checking for working makeinfo... $ECHO_C" >&6
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$as_me:$LINENO: result: found" >&5
-echo "${ECHO_T}found" >&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$as_me:$LINENO: result: missing" >&5
-echo "${ECHO_T}missing" >&6
-fi
-
-
-echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
-echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi;
- echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
-echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-# Make sure we can run config.sub.
-$ac_config_sub sun4 >/dev/null 2>&1 ||
- { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
-echo "$as_me: error: cannot run $ac_config_sub" >&2;}
- { (exit 1); exit 1; }; }
-
-echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6
-if test "${ac_cv_build+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_build_alias=$build_alias
-test -z "$ac_cv_build_alias" &&
- ac_cv_build_alias=`$ac_config_guess`
-test -z "$ac_cv_build_alias" &&
- { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
- { (exit 1); exit 1; }; }
-ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6
-build=$ac_cv_build
-build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6
-if test "${ac_cv_host+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_host_alias=$host_alias
-test -z "$ac_cv_host_alias" &&
- ac_cv_host_alias=$ac_cv_build_alias
-ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6
-host=$ac_cv_host
-host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.make <<\_ACEOF
-all:
- @echo 'ac_maketemp="$(MAKE)"'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftest.make
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- SET_MAKE=
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-fi
-
-fi
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# != 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
- fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- for ac_prog in cl
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$CC" && break
- done
-fi
-if test -z "$CC"; then
- ac_ct_CC=$CC
- for ac_prog in cl
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$ac_ct_CC" && break
-done
-
- CC=$ac_ct_CC
-fi
-
-fi
-
-
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-
-# Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
- "checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
- (eval $ac_compiler --version </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
- (eval $ac_compiler -v </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
- (eval $ac_compiler -V </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
- (eval $ac_link_default) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # Find the output, starting from the most likely. This scheme is
-# not robust to junk in `.', hence go to wildcards (a.*) only as a last
-# resort.
-
-# Be careful to initialize this variable, since it used to be cached.
-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
-ac_cv_exeext=
-# b.out is created by i960 compilers.
-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
-do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
- ;;
- conftest.$ac_ext )
- # This is the source file.
- ;;
- [ab].out )
- # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
- *.* )
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- # FIXME: I believe we export ac_cv_exeext for Libtool,
- # but it would be cool to find out if it's true. Does anybody
- # maintain Libtool? --akim.
- export ac_cv_exeext
- break;;
- * )
- break;;
- esac
-done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }
-fi
-
-ac_exeext=$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6
-
-# Check the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
- if { ac_try='./$ac_file'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
- fi
- fi
-fi
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-# Check the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6
-
-echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
- *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- export ac_cv_exeext
- break;;
- * ) break;;
- esac
-done
-else
- { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
-if test "${ac_cv_objext+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
- *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
- break;;
- esac
-done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_compiler_gnu=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_compiler_gnu=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
-GCC=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-CFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_g=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_prog_cc_g=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_prog_cc_stdc=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std1 is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std1. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
-_ACEOF
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX -qlanglvl=ansi
-# Ultrix and OSF/1 -std1
-# HP-UX 10.20 and later -Ae
-# HP-UX older versions -Aa -D_HPUX_SOURCE
-# SVR4 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_stdc=$ac_arg
-break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext
-done
-rm -f conftest.$ac_ext conftest.$ac_objext
-CC=$ac_save_CC
-
-fi
-
-case "x$ac_cv_prog_cc_stdc" in
- x|xno)
- echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
- *)
- echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
- CC="$CC $ac_cv_prog_cc_stdc" ;;
-esac
-
-# Some people use a C++ compiler to compile C. Since we use `exit',
-# in C++ we need to declare it. In case someone uses the same compiler
-# for both compiling C and C++ we need to have the C++ compiler decide
-# the declaration of exit, since it's the most demanding environment.
-cat >conftest.$ac_ext <<_ACEOF
-#ifndef __cplusplus
- choke me
-#endif
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- for ac_declaration in \
- '' \
- 'extern "C" void std::exit (int) throw (); using std::exit;' \
- 'extern "C" void std::exit (int); using std::exit;' \
- 'extern "C" void exit (int) throw ();' \
- 'extern "C" void exit (int);' \
- 'void exit (int);'
-do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-#include <stdlib.h>
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-continue
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
- echo '#ifdef __cplusplus' >>confdefs.h
- echo $ac_declaration >>confdefs.h
- echo '#endif' >>confdefs.h
-fi
-
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-
-
-
-subdirs="$subdirs plugins"
-
- ac_config_files="$ac_config_files Makefile"
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems. If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-{
- (set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- "s/'/'\\\\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-} |
- sed '
- t clear
- : clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- : end' >>confcache
-if diff $cache_file confcache >/dev/null 2>&1; then :; else
- if test -w $cache_file; then
- test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
- cat confcache >$cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/;
-s/:*\${srcdir}:*/:/;
-s/:*@srcdir@:*/:/;
-s/^\([^=]*=[ ]*\):*/\1/;
-s/:*$//;
-s/^[^=]*=[ ]*$//;
-}'
-fi
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-#
-# If the first sed substitution is executed (which looks for macros that
-# take arguments), then we branch to the quote section. Otherwise,
-# look for a macro that doesn't take arguments.
-cat >confdef2opt.sed <<\_ACEOF
-t clear
-: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
-t quote
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
-t quote
-d
-: quote
-s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
-s,\[,\\&,g
-s,\],\\&,g
-s,\$,$$,g
-p
-_ACEOF
-# We use echo to avoid assuming a particular line-breaking character.
-# The extra dot is to prevent the shell from consuming trailing
-# line-breaks from the sub-command output. A line-break within
-# single-quotes doesn't work because, if this script is created in a
-# platform that uses two characters for line-breaks (e.g., DOS), tr
-# would break.
-ac_LF_and_DOT=`echo; echo .`
-DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
-rm -f confdef2opt.sed
-
-
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
- # 1. Remove the extension, and $U if already installed.
- ac_i=`echo "$ac_i" |
- sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
- # 2. Add them.
- ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-
-: ${CONFIG_STATUS=./config.status}
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-exec 6>&1
-
-# Open the log real soon, to keep \$[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling. Logging --version etc. is OK.
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-} >&5
-cat >&5 <<_CSEOF
-
-This file was extended by $as_me, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-_CSEOF
-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
-echo >&5
-_ACEOF
-
-# Files that config.status was made for.
-if test -n "$ac_config_files"; then
- echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_headers"; then
- echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_links"; then
- echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_commands"; then
- echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTIONS] [FILE]...
-
- -h, --help print this help, then exit
- -V, --version print version number, then exit
- -q, --quiet do not print progress messages
- -d, --debug don't remove temporary files
- --recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
-
-Configuration files:
-$config_files
-
-Report bugs to <bug-autoconf@gnu.org>."
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-ac_cs_version="\\
-config.status
-configured by $0, generated by GNU Autoconf 2.59,
- with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-srcdir=$srcdir
-INSTALL="$INSTALL"
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value. By we need to know if files were specified by the user.
-ac_need_defaults=:
-while test $# != 0
-do
- case $1 in
- --*=*)
- ac_option=`expr "x$1" : 'x\([^=]*\)='`
- ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
- ac_shift=:
- ;;
- -*)
- ac_option=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
- *) # This is not an option, so the user has probably given explicit
- # arguments.
- ac_option=$1
- ac_need_defaults=false;;
- esac
-
- case $ac_option in
- # Handling of the options.
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --vers* | -V )
- echo "$ac_cs_version"; exit 0 ;;
- --he | --h)
- # Conflict between --help and --header
- { { echo "$as_me:$LINENO: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; };;
- --help | --hel | -h )
- echo "$ac_cs_usage"; exit 0 ;;
- --debug | --d* | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- CONFIG_FILES="$CONFIG_FILES $ac_optarg"
- ac_need_defaults=false;;
- --header | --heade | --head | --hea )
- $ac_shift
- CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
- ac_need_defaults=false;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; } ;;
-
- *) ac_config_targets="$ac_config_targets $1" ;;
-
- esac
- shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
- exec 6>/dev/null
- ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-if \$ac_cs_recheck; then
- echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
- exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-fi
-
-_ACEOF
-
-
-
-
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_config_target in $ac_config_targets
-do
- case "$ac_config_target" in
- # Handling of arguments.
- "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used. Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason to put it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=./confstat$$-$RANDOM
- (umask 077 && mkdir $tmp)
-} ||
-{
- echo "$me: cannot create a temporary directory in ." >&2
- { (exit 1); exit 1; }
-}
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-
-#
-# CONFIG_FILES section.
-#
-
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "\$CONFIG_FILES"; then
- # Protect against being on the right side of a sed subst in config.status.
- sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
- s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
-s,@SHELL@,$SHELL,;t t
-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
-s,@exec_prefix@,$exec_prefix,;t t
-s,@prefix@,$prefix,;t t
-s,@program_transform_name@,$program_transform_name,;t t
-s,@bindir@,$bindir,;t t
-s,@sbindir@,$sbindir,;t t
-s,@libexecdir@,$libexecdir,;t t
-s,@datadir@,$datadir,;t t
-s,@sysconfdir@,$sysconfdir,;t t
-s,@sharedstatedir@,$sharedstatedir,;t t
-s,@localstatedir@,$localstatedir,;t t
-s,@libdir@,$libdir,;t t
-s,@includedir@,$includedir,;t t
-s,@oldincludedir@,$oldincludedir,;t t
-s,@infodir@,$infodir,;t t
-s,@mandir@,$mandir,;t t
-s,@build_alias@,$build_alias,;t t
-s,@host_alias@,$host_alias,;t t
-s,@target_alias@,$target_alias,;t t
-s,@DEFS@,$DEFS,;t t
-s,@ECHO_C@,$ECHO_C,;t t
-s,@ECHO_N@,$ECHO_N,;t t
-s,@ECHO_T@,$ECHO_T,;t t
-s,@LIBS@,$LIBS,;t t
-s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
-s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
-s,@INSTALL_DATA@,$INSTALL_DATA,;t t
-s,@PACKAGE@,$PACKAGE,;t t
-s,@VERSION@,$VERSION,;t t
-s,@ACLOCAL@,$ACLOCAL,;t t
-s,@AUTOCONF@,$AUTOCONF,;t t
-s,@AUTOMAKE@,$AUTOMAKE,;t t
-s,@AUTOHEADER@,$AUTOHEADER,;t t
-s,@MAKEINFO@,$MAKEINFO,;t t
-s,@SET_MAKE@,$SET_MAKE,;t t
-s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
-s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
-s,@MAINT@,$MAINT,;t t
-s,@build@,$build,;t t
-s,@build_cpu@,$build_cpu,;t t
-s,@build_vendor@,$build_vendor,;t t
-s,@build_os@,$build_os,;t t
-s,@host@,$host,;t t
-s,@host_cpu@,$host_cpu,;t t
-s,@host_vendor@,$host_vendor,;t t
-s,@host_os@,$host_os,;t t
-s,@CC@,$CC,;t t
-s,@CFLAGS@,$CFLAGS,;t t
-s,@LDFLAGS@,$LDFLAGS,;t t
-s,@CPPFLAGS@,$CPPFLAGS,;t t
-s,@ac_ct_CC@,$ac_ct_CC,;t t
-s,@EXEEXT@,$EXEEXT,;t t
-s,@OBJEXT@,$OBJEXT,;t t
-s,@subdirs@,$subdirs,;t t
-s,@LIBOBJS@,$LIBOBJS,;t t
-s,@LTLIBOBJS@,$LTLIBOBJS,;t t
-CEOF
-
-_ACEOF
-
- cat >>$CONFIG_STATUS <<\_ACEOF
- # Split the substitutions into bite-sized pieces for seds with
- # small command number limits, like on Digital OSF/1 and HP-UX.
- ac_max_sed_lines=48
- ac_sed_frag=1 # Number of current file.
- ac_beg=1 # First line for current file.
- ac_end=$ac_max_sed_lines # Line after last line for current file.
- ac_more_lines=:
- ac_sed_cmds=
- while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- else
- sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- fi
- if test ! -s $tmp/subs.frag; then
- ac_more_lines=false
- else
- # The purpose of the label and of the branching condition is to
- # speed up the sed processing (if there are no `@' at all, there
- # is no need to browse any of the substitutions).
- # These are the two extra sed commands mentioned above.
- (echo ':t
- /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
- fi
- ac_sed_frag=`expr $ac_sed_frag + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_lines`
- fi
- done
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
- fi
-fi # test -n "$CONFIG_FILES"
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
- esac
-
- # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
-
- case $INSTALL in
- [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
- esac
-
- if test x"$ac_file" != x-; then
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
- rm -f "$ac_file"
- fi
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- if test x"$ac_file" = x-; then
- configure_input=
- else
- configure_input="$ac_file. "
- fi
- configure_input=$configure_input"Generated from `echo $ac_file_in |
- sed 's,.*/,,'` by configure."
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
- sed "$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s,@configure_input@,$configure_input,;t t
-s,@srcdir@,$ac_srcdir,;t t
-s,@abs_srcdir@,$ac_abs_srcdir,;t t
-s,@top_srcdir@,$ac_top_srcdir,;t t
-s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
-s,@builddir@,$ac_builddir,;t t
-s,@abs_builddir@,$ac_abs_builddir,;t t
-s,@top_builddir@,$ac_top_builddir,;t t
-s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
-s,@INSTALL@,$ac_INSTALL,;t t
-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
- rm -f $tmp/stdin
- if test x"$ac_file" != x-; then
- mv $tmp/out $ac_file
- else
- cat $tmp/out
- rm -f $tmp/out
- fi
-
-done
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded. So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status. When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
- ac_cs_success=:
- ac_config_status_args=
- test "$silent" = yes &&
- ac_config_status_args="$ac_config_status_args --quiet"
- exec 5>/dev/null
- $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
- exec 5>>config.log
- # Use ||, not &&, to avoid exiting from the if with $? = 1, which
- # would make configure fail if this is the last instruction.
- $ac_cs_success || { (exit 1); exit 1; }
-fi
-
-#
-# CONFIG_SUBDIRS section.
-#
-if test "$no_recursion" != yes; then
-
- # Remove --cache-file and --srcdir arguments so they do not pile up.
- ac_sub_configure_args=
- ac_prev=
- for ac_arg in $ac_configure_args; do
- if test -n "$ac_prev"; then
- ac_prev=
- continue
- fi
- case $ac_arg in
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
- | --c=*)
- ;;
- --config-cache | -C)
- ;;
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- ;;
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- ;;
- *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
- esac
- done
-
- # Always prepend --prefix to ensure using the same prefix
- # in subdir configurations.
- ac_sub_configure_args="--prefix=$prefix $ac_sub_configure_args"
-
- ac_popdir=`pwd`
- for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
-
- # Do not complain, so a configure script can configure whichever
- # parts of a large source tree are present.
- test -d $srcdir/$ac_dir || continue
-
- { echo "$as_me:$LINENO: configuring in $ac_dir" >&5
-echo "$as_me: configuring in $ac_dir" >&6;}
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
-
- cd $ac_dir
-
- # Check for guested configure; otherwise get Cygnus style configure.
- if test -f $ac_srcdir/configure.gnu; then
- ac_sub_configure="$SHELL '$ac_srcdir/configure.gnu'"
- elif test -f $ac_srcdir/configure; then
- ac_sub_configure="$SHELL '$ac_srcdir/configure'"
- elif test -f $ac_srcdir/configure.in; then
- ac_sub_configure=$ac_configure
- else
- { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5
-echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
- ac_sub_configure=
- fi
-
- # The recursion is here.
- if test -n "$ac_sub_configure"; then
- # Make the cache file name correct relative to the subdirectory.
- case $cache_file in
- [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
- *) # Relative path.
- ac_sub_cache_file=$ac_top_builddir$cache_file ;;
- esac
-
- { echo "$as_me:$LINENO: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
-echo "$as_me: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
- # The eval makes quoting arguments work.
- eval $ac_sub_configure $ac_sub_configure_args \
- --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir ||
- { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5
-echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;}
- { (exit 1); exit 1; }; }
- fi
-
- cd $ac_popdir
- done
-fi
-
diff --git a/gdb/gdbtk/configure.ac b/gdb/gdbtk/configure.ac
deleted file mode 100644
index 5925d6b84e0..00000000000
--- a/gdb/gdbtk/configure.ac
+++ /dev/null
@@ -1,12 +0,0 @@
-AC_INIT(generic/gdbtk.h)
-AC_CONFIG_AUX_DIR(../..)
-AM_INIT_AUTOMAKE(insight, 1.0)
-AM_MAINTAINER_MODE
-AC_CANONICAL_HOST
-AC_PROG_MAKE_SET
-AC_PROG_CC
-AC_OBJEXT
-AC_EXEEXT
-
-AC_CONFIG_SUBDIRS(plugins)
-AC_OUTPUT(Makefile)
diff --git a/gdb/gdbtk/gdb.rc b/gdb/gdbtk/gdb.rc
deleted file mode 100644
index 9f7c44035a0..00000000000
--- a/gdb/gdbtk/gdb.rc
+++ /dev/null
@@ -1 +0,0 @@
-tk ICON DISCARDABLE "gdbtool.ico"
diff --git a/gdb/gdbtk/gdbtool.ico b/gdb/gdbtk/gdbtool.ico
deleted file mode 100644
index 919202c7f43..00000000000
--- a/gdb/gdbtk/gdbtool.ico
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/generic/ChangeLog-1997 b/gdb/gdbtk/generic/ChangeLog-1997
deleted file mode 100644
index 365457035b8..00000000000
--- a/gdb/gdbtk/generic/ChangeLog-1997
+++ /dev/null
@@ -1,1196 +0,0 @@
-Tue Dec 16 21:16:42 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (LIBGUI): New variable.
- (GUI_CFLAGS_X): New variable.
- (IDE_CFLAGS): Add $(GUI_CFLAGS_X).
- * configure.in: Add $(LIBGUI) to TCL_LIBS and CONFIG_DEPS.
- * configure: Rebuild.
-
-Wed Dec 10 13:16:45 1997 Keith Seitz <keiths@onions.cygnus.com>
-
- * gdbtk.c (gdb_get_tracepoint_info): Use info in struct
- symtab_and_line (not struct tracepoint) so that we get the
- real line info for an address. Arrange data more like
- gdb_get_breakpoint_info.
- (tracepoint_notify): Use info in struct symtab_and_line again.
- (gdbtk_init): Add command "gdb_get_tracepoint_list" into
- interpreter.
- (gdb_get_tracepoint_list): New function that aids the source
- window in displaying tracepoints when the file changes.
-
-Fri Dec 5 10:31:23 1997 Keith Seitz <keiths@pizza.cygnus.com>
-
- * gdbtk.c (gdbtk_init): Add gdb_find_file into interpreter.
- (gdb_find_file_command): New function which searches source path
- to find the real full filename of a file.
-
-Mon Dec 1 10:19:44 1997 Keith Seitz <keiths@onions.cygnus.com>
-
- * gdbtk.c: Move include of "guitcl.h" back out of IDE ifdef.
- (gdbtk_init): Move ide_initialize_paths out of IDE ifdef.
-
- * configure.in (TCL_LIBS, CONFIG_DEPS): Add IDE libraries for all
- builds.
- (CONFIG_OBS): Remove tracepoint.o, which should always be included.
-
- * configure: regenerate
-
- * Makefile.in (install-only): ALWAYS install the new gdbtk
- (REMOTE_OBS): add tracepoint.o
-
-Thu Nov 27 09:07:18 1997 Michael Meissner <meissner@cygnus.com>
-
- * configure.in ({TCL_LIBS,CONFIG_DEPS}): Don't add IDE libraries
- if not --enable-ide.
- (CONFIG_OBS): Add tracepoint.o to list if --enable-gdbtk.
- * configure: Regenerate.
-
- * gdbtk.c (gdb_get_breakpoint_info): Add missing filename
- argument.
- (toplevel): Move include of guitcl.h into #ifdef IDE region.
- (gdbtk_init): Move ide_initialize_paths call into #ifdef IDE
- section.
-
- * Makefile.in (gdbtk.o): Update dependencies.
-
-Wed Nov 26 15:02:43 1997 Keith Seitz <keiths@onions.cygnus.com>
-
- * gdbtk.c (gdb_loc): symtab_to_filename can return NULL.
- (breakpoint_notify): Ditto.
- (gdb_get_breakpoint_info): Ditto.
-
-Wed Nov 26 11:33:09 1997 Keith Seitz <keiths@onions.cygnus.com>
-
- Merge in code from Foundry branch:
-
- * Makefile.in (install-only): install the new gdbtk, not the old
-
- * gdbtk.c (gdbtk_call_command): also run idle hooks for class_trace
- commands
- (gdbtk_init): Add new commands "gdb_get_locals", "gdb_get_args",
- "gdb_get_function", "gdb_get_line", "gdb_get_file",
- "gdb_tracepoint_exists", "gdb_get_tracepoint_info", "gdb_actions",
- and "gdb_prompt".
- (gdb_get_vars_command): New function.
- (gdb_get_line_command): New.
- (gdb_get_file_command): New.
- (gdb_get_function_command): New.
- (gdb_get_tracepoint_info): New.
- (gdbtk_create_tracepoint): New.
- (gdbtk_delete_tracepoint): New.
- (tracepoint_notify): New.
- (tracepoint_exists): New.
- (gdb_actions_command): New.
- (gdb_tracepoint_exists_command): New.
- (gdb_prompt_command): New.
-
-Thu Nov 13 18:15:54 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * gdbtk.c: Move include of gdbcore.h to top of file.
- (close_bfds): New static function if _WIN32.
- (gdbtk_readline): Call close_bfds.
- (call_wrapper, tk_command_loop): Likewise.
- (gdb_clear_file): New static function.
- (gdbtk_init): Create gdb_clear_file Tcl command.
-
-Wed Nov 12 14:58:39 1997 Jeff Holcomb <jeffh@cygnus.com>
-
- * gdbtk.c: gdbtk_load_hash and ui_load_progress_hook return an
- int result.
- (gdbtk_load_hash): download hash routine returns an int result.
-
-Mon Nov 10 15:11:51 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Call ide_create_shell_execute_command if
- __CYGWIN32__.
- * configure.in: Add -lshell32 to WIN32LIBS on cygwin32.
- * configure: Rebuild.
-
-Sun Nov 9 16:25:34 1997 Tom Tromey <tromey@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Run ide_create_help_command.
-
-Tue Oct 28 17:31:47 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Call ide_create_winprint_command.
-
-Thu Oct 23 15:53:37 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Add -lgdi32 to WIN32LIBS when linking gdbtk on
- cygwin32.
- * configure: Rebuild.
-
-Wed Oct 22 21:32:54 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Create sizebox command on Windows.
-
-Thu Oct 9 14:33:21 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Remove assertion argument from call to
- ide_create_window_register_command.
-
-Wed Oct 1 11:09:52 1997 Tom Tromey <tromey@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Pass name of restore interface to
- ide_create_window_register_command.
-
-Fri Sep 26 21:08:22 1997 Keith Seitz <keiths@pizza.cygnus.com>
-
- * gdbtk.c (gdbtk_init): Initialize ui_load_progress_hook.
-
-Thu Sep 25 03:05:00 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (gdb_load_info): New function. Returns a list
- of section names and sizes for an executable.
- (gdbtk_load_hash): Stub function to call tcl function
- download_hash.
-
-Tue Sep 23 01:29:00 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (gdb_get_mem): Fix compiler warning.
-
-Sun Sep 21 00:15:00 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (gdb_get_mem): Fix problem with ASCII dump.
-
-Tue Sep 16 18:07:17 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (gdb_get_mem): New function. Returns
- a formatted memory dump with optional ASCII dump.
-
-Mon Sep 8 12:48:50 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * gdbtk.c: Include ilutk.h if IDE.
- (gdb_confirm_quit, gdb_force_quit): New static functions.
- (gdbtk_init): Add Tcl commands gdb_confirm_quit and
- gdb_force_quit.
-
-Mon Sep 8 03:05:33 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (gdb_get_breakpoint_info): Now returns the
- function a breakpoint is in.
-
-Fri Sep 5 20:23:58 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Call ide_create_exit_command.
-
-Wed Sep 3 19:39:15 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * gdbtk.c: Include guitcl.h.
- (gdbtk_init): Always call ide_initialize_paths. Set the Tcl
- variable IDE to 1 when using the IDE. Always try using auto path
- to find main.tcl.
- * Makefile.in (IDE_CFLAGS_X): Always include libide.
- (LIBIDE): New variable.
- (IDE_X): Omit -lide.
- (IDE_DEPS): Omit libide.
- * configure.in: Add LIBIDE to TCL_LIBS and CONFIG_DEPS.
- * configure: Rebuild.
-
-Mon Aug 25 02:28:55 1997 Keith Seitz <keiths@pizza.cygnus.com>
-
- * gdbtk.c: (gdb_target_has_inferior) check if inferior_pid is non-zero
- before assuming that the inferior is running.
-
-Mon Aug 25 01:06:48 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * gdbtk.c (gdbtk_start_timer): Pass third argument to setitimer.
- (gdbtk_stop_timer): Likewise.
-
-Mon Aug 25 00:23:08 1997 Keith Seitz <keiths@pizza.cygnus.com>
-
- * gdbtk.c: (gdbtk_init) create new command "gdb_target_has_execution"
- (gdb_target_has_execution_command) new function
-
-Sun Aug 24 20:27:22 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * gdbtk.c (gdb_loc): If there are no symbols, just bail
- immediately.
- (tk_command_loop): Print errors encountered while running
- gdbtk_tcl_preloop.
-
-Sun Aug 24 13:44:03 1997 Tom Tromey <tromey@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Run ide_create_build_command.
-
-Sat Aug 23 21:53:39 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * gdbtk.c: If CYGWIN32, include <sys/time.h>.
- (x_fd): Don't define if WINNT.
- (gdbtk_start_timer, gdbtk_stop_timer): New static functions if
- CYGWIN32.
- (gdbtk_wait): Don't set up signal handling if WINNT. If CYGWIN32,
- call gdbtk_start_timer and gdbtk_stop_timer.
- (gdbtk_init): Don't set up signal handling or make x_fd
- asynchronous if CYGWIN32.
-
-Fri Aug 22 15:23:15 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * gdbtk.c (error_string_ptr): New static variable.
- (gdbtk_fputs): If result_ptr is NULL, and error_string_ptr is not
- NULL, and we're outputting to stderr, append string to
- error_string_ptr rather than calling gdbtk_tcl_fputs.
- (call_wrapper): Set up error_string_ptr. Put both error string
- and normal string in Tcl result.
-
- * gdbtk.c (gdbtk_init): Don't call ide_run_server_init until after
- gdb has initialized.
-
-Thu Aug 21 19:14:38 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * gdbtk.c: If _WIN32, include winuser.h.
- (gdbtk_init): If _WIN32, use MessageBox to display an error
- evaluating main.tcl.
-
-Thu Aug 21 00:48:00 1997 Martin M. Hunt <hunt@pern.cygnus.com>
-
- * gdbtk.c (gdbtk_init): Add call to ide_run_server_init().
- (gdb_cmd): For the load command, don't buffer the I/O.
-
-Wed Aug 20 11:41:22 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (gdbtk_query): Chaneg free() call to Tcl_Free().
-
-Tue Aug 19 17:09:19 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (TCL_DEPS, TK_DEPS): New variables.
- (ITCL_DEPS, TIX_DEPS): New variables.
- (IDE_DEPS): New variable.
- (CDEPS): Include @CONFIG_DEPS@.
- * configure.in: Set and substitute CONFIG_DEPS and TIX_DEPS.
- * configure: Rebuild.
-
-Sun Aug 17 00:42:11 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (gdb_listfuncs): New function that returns
- a list of all the functions in a source file.
-
-Tue Aug 12 16:35:21 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (install-only): Install tclIndex if ENABLE_IDE.
-
-Mon Aug 11 10:43:04 1997 Tom Tromey <tromey@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Use ide_event_init_from_environment.
-
-Fri Aug 8 15:59:24 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Change gdbtk_lib_tmp and gdbtk_file to be
- dynamically allocated, rather than fixed size. Pass "gdbtcl" to
- ide_initialize_paths to match installed directory name. If IDE,
- use auto_path to search for main.tcl.
- * Makefile.in (install-only): If ENABLE_IDE, install from gdbtcl2
- rather than gdbtcl.
-
- * gdbtk.c (gdbtk_cleanup): New static function.
- (gdbtk_init): Add gdbtk_cleanup as a final cleanup. Uncomment
- call to ide_initialize_paths. If we can't initialize the event
- system, set GDBTK_IDE to 0 in the Tcl interpreter. Create the
- ide_window_register and the ide_window commands. Initialize tk,
- itcl, and tix after initializing the IDE.
-
- * configure.in (tixdir): Update for cygwin32 case for Tcl 8.0.
- * configure: Rebuild.
-
-Fri Aug 8 00:13:32 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (breakpoint_notify): Change buffer size from 100
- to 256 to avoid memory corruption with very long pathnames.
-
-Thu Aug 7 14:08:23 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * configure.in: Change required Tix version to 4.1.8.0 .
- * configure: Rebuilt.
-
-Fri Aug 1 15:21:44 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * gdbtk.c (Tcl_Alloc): Don't provide our own version of this if
- _WIN32.
- (Tcl_Realloc, Tcl_Free): Likewise.
- * configure.in: Check for cygwin32 environment. Define and
- substitute WIN32LIBS and WIN32LDAPP. Always set configdir to
- unix; setting it to win was for an old Tcl/Tk configuration
- scheme.
- * aclocal.m4 (CY_AC_LOAD_TKCONFIG): Substitute TK_BUILD_INCLUDES.
- * Makefile.in (TK_CFLAGS): Add @TK_BUILD_INCLUDES@.
- (WIN32LDAPP, WIN32LIBS): Define.
- (CLIBS): Add $(WIN32LIBS).
- (gdb): Use $(WIN32LDAPP).
- * configure: Rebuild.
-
-Tue Jul 22 19:45:37 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * configure.in, aclocal.m4: Another fix to find the
- correct Tix library name.
-
- * configure: Rebuilt.
-
-Mon Jul 21 22:24:07 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * aclocal.m4: Search for the correct tix library.
-
-Thu Jul 10 00:02:41 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * Makefile.in, configure.in, aclocal.m4: Add Itcl, Tix, and
- IDE configuration information.
-
- * gdbtk.c (breakpoint_notify): Send address, linenumber and
- filename when a breakpoint is set. Avoids call to bp_info.
- (gdbtk_init): Call Tcl_FindExecutable(). Add code to handle
- Itcl, Tix and IDE initialization.
-
- * configure: Regenerated.
-
-Fri Jun 13 10:28:09 1997 Fred Fish <fnf@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Make truth value test explicit.
- Remove unused static variable "Gdbtk_Library".
-
-Sat Jun 7 02:34:19 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * gdbtk.c (gdb_get_breakpoint_info): Add string for new
- enumeration del_at_next_stop to bpdisp array.
-
-Tue Jun 3 15:46:51 1997 Tom Tromey <tromey@cygnus.com>
-
- * Makefile.in (LIB_RUNTIME_DIR): New variable.
-
-Wed May 7 19:10:19 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbtk.c (wrapped_call): New function - make actual call to tk
- worker function.
- (call_wrapper): Rewrite to use top.c:catch_errors.
-
- * gdbtk.c (gdb_stop): If No target_stop set quit flag and hope for
- best.
-
-Mon Apr 21 14:00:08 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * gdbtk.c (gdb_disassemble): Store endian-ness in `di'.
-
-Wed Apr 16 12:33:06 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * Makefile.in (install-only): Make list of gdbtcl files to install
- explicit - was picking up files such as ChangeLog etc.
- (install-only): Don't blindly create the directory.
-
-Tue Apr 1 15:04:21 1997 Jason Molenda (crash@godzilla.cygnus.co.jp)
-
- * configure.in (gdbtcl): Create soft-link for gdbtcl/ directory
- instead of gdbtk.tcl.
-
-Fri Mar 28 17:04:02 1997 Jason Molenda (crash@godzilla.cygnus.co.jp)
-
- * Makefile.in (gdbtk.o): look for GDBTK_LIBRARY in $(datadir) by
- default, not $(srcdir).
-
-Wed Mar 19 15:16:17 1997 Martin M. Hunt <hunt@onions.cygnus.com>
-
- * Makefile.in: Install gdbtcl dir instead of gdbtk.tcl.
-
- * gdbtk.c: Added some ifdefs for Windows. Changed GDBTK_FILENAME
- to GDBTK_LIBRARY, which is now a path to search.
- (gdb_path_conv): New function. Convert Cygwin32 pathname to
- DOS-style pathname.
-
- * {aclocal.m4,configure.in}: Changes for Windows builds.
-
- * configure: Rebuilt.
-
-Fri Mar 14 10:01:29 1997 Tom Tromey <tromey@cygnus.com>
-
- * configure: Regenerated.
- * configure.in (LIBS): Re-reverse order of TCL_LIBS and TK_LIBS.
-
-Wed Mar 12 14:29:52 1997 Tom Tromey <tromey@cygnus.com>
-
- * gdbtk.c (x_event): Use Tcl_DoOneEvent, TCL_DONT_WAIT,
- TCL_ALL_EVENTS.
-
- * configure: Regenerated.
- * configure.in (ENABLE_GDBTK): Put TCL_LIBS after TK_LIBS in
- LIBS.
-
-Mon Feb 10 13:50:53 1997 Stu Grossman (grossman@critters.cygnus.com)
-
- * gdbtk.c (call_wrapper): Clear running_now if an error occurs.
-
-Wed Dec 11 18:51:35 1996 Mark Alexander <marka@cygnus.com>
-
- * gdbtk.c (gdb_loc): Correct truncation of PC on 64-bit MIPS.
-
-Tue Nov 19 09:26:14 1996 Tom Tromey <tromey@cygnus.com>
-
- * gdbtk.c (gdbtk_readline): Fix memory leak.
-
-Mon Nov 18 23:43:05 1996 Tom Tromey <tromey@cygnus.com>
-
- Fixes for Tcl 7.6 / Tk 4.2:
- * gdbtk.tcl (apply_filespec): Use tk_getOpenFile.
- Remove old fileselect code.
- * gdbtk.c (Tcl_Alloc): Rename from Tcl_Malloc.
-
-Fri Sep 27 10:25:30 1996 Fred Fish <fnf@cygnus.com>
-
- * gdbtk.tcl (create_copyright_window): Increase timeout from
- 15 seconds to 30 seconds.
-
-Wed Sep 4 17:28:40 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * configure configure.in: Add host *windows* to list of hosts
- that don't support GDBtk.
-
-Fri Aug 23 00:44:57 1996 Fred Fish <fnf@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Check for a DISPLAY env variable and
- gracefully degrade to using command line interface if none is
- found.
-
-Fri Aug 9 12:32:53 1996 Tom Tromey <tromey@creche.cygnus.com>
-
- * Makefile.in (LIB_INSTALL_DIR): New macro.
- (TCL): Include @TCL_LD_SEARCH_FLAGS@.
-
-Thu Aug 1 20:35:01 1996 Tom Tromey <tromey@creche.cygnus.com>
-
- * gdbtk.c (mainWindow): Deleted.
- (cleanup_init): Don't destroy main window.
- (gdbtk_init): Main window now created by Tk_Init.
-
- * configure.in: Most X checks now handled automatically by Tk.
- Use new macros to find Tcl/Tk.
- * aclocal.m4: New version for new Tcl/Tk; from Don Libes.
- * config.in, configure: Regenerated.
-
- * Makefile.in (TCL, TCL_CFLAGS, TK, TK_CFLAGS, X11_CFLAGS,
- X11_LDFLAGS, X11_LIBS): Changed for new Tcl and Tk.
-
-Thu Aug 1 16:12:05 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
-
- * Makefile.in (gdbtk.tcl): put in $(datadir), not $(libdir).
-
-Fri Jul 26 14:07:37 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * gdbtk.c (gdb_disassemble): Initialize di.flavour.
-
-Thu Jul 25 19:41:31 1996 Fred Fish <fnf@cygnus.com>
-
- * gdbtk.c (null_routine): Ditto.
- (gdbtk_flush): Ditto.
- (gdbtk_fputs): Ditto.
- (gdbtk_query): Ditto.
- (gdbtk_readline): Ditto.
- (gdbtk_readline_end): Ditto.
- (gdb_get_breakpoint_list): Ditto.
- (gdb_get_breakpoint_info): Ditto.
- (breakpoint_notify): Ditto.
- (gdbtk_create_breakpoint): Ditto.
- (gdbtk_delete_breakpoint): Ditto.
- (gdbtk_modify_breakpoint): Ditto.
- (gdb_loc): Ditto.
- (gdb_eval): Ditto.
- (gdb_sourcelines): Ditto.
- (map_arg_registers): Ditto.
- (get_register_name): Ditto.
- (gdb_regnames): Ditto.
- (get_register): Ditto.
- (gdb_fetch_registers): Ditto.
- (register_changed_p): Ditto.
- (gdb_changed_register_list): Ditto.
- (gdb_cmd): Ditto.
- (call_wrapper): Ditto.
- (gdb_listfiles): Ditto.
- (gdb_stop): Ditto.
- (gdbtk_dis_asm_read_memory): Ditto.
- (compare_lines): Ditto.
- (gdb_disassemble): Ditto.
- (tk_command): Ditto.
- (cleanup_init): Ditto.
- (gdbtk_interactive): Ditto.
- (x_event): Ditto.
- (gdbtk_wait): Ditto.
- (gdbtk_call_command): Ditto.
- (tk_command_loop): Ditto.
- (gdbtk_init): Ditto.
-
- * gdbtk.c (register_changed_p): Remove unused local variable "buf".
-
-Sat Jul 20 17:46:40 1996 Fred Fish <fnf@cygnus.com>
-
- * gdbtk.tcl (files_command): Reorder the binding tags for
- the listbox widget to avoid referencing the listbox after
- the containing widget has been destroyed by the action of
- a previous binding.
-
-Sat Jul 20 10:09:28 1996 Fred Fish <fnf@cygnus.com>
-
- * gdbtk.tcl (delete_expr): Unset corresponding element of
- expr_update_list when destroying an expression.
- (create_expr_window): Initialize expr_num, delete_expr_num,
- and expr_update_list here when each new expression window
- is created, rather than once at startup.
-
-Mon Jul 15 16:44:05 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * gdbtk.c (gdb_disassemble): Setup di.mach from
- tm_print_insn_info.mach, and set endian from TARGET_BYTE_ORDER.
-
-Fri Jun 21 11:04:47 1996 Fred Fish <fnf@cygnus.com>
-
- * gdbtk.tcl (create_register_windows): Include missing '$'s.
- Add global declarations for various reg_format_* variables.
- * gdbtk.tcl (populate_register_window): Make initial window one
- line taller to account for new column header line.
-
-Fri Jun 21 09:46:47 1996 Fred Fish <fnf@cygnus.com>
-
- * gdbtk.c (get_register): Support for printing raw formats.
- * gdbtk.tcl: Add hint for using debug_interface.
- (center_window, add_breakpoint_frame, delete_breakpoint_frame):
- Enclose arg in braces for consistency.
- (create_registers_window, populate_reg_window, update_registers):
- Major rewrite to support displaying multiple formats in the register
- window.
- (init_reg_info): New function.
- (recompute_reg_display_list): Reset reg_display_list, start
- register display lines at line 2.
-
-Thu Jun 20 08:18:59 1996 Fred Fish <fnf@cygnus.com>
-
- * gdbtk.tcl (gdbtk_tcl_readline_begin): Handle backspace to
- avoid backing up over prompt. At every input, make sure insert
- point is at least after command start, handle control-u to delete
- current input line.
- (tclsh): Handle backspace to avoid backing up over prompt. Handle
- control-u to delete current input line.
-
-Wed Jun 19 17:23:38 1996 Geoffrey Noer <noer@cygnus.com>
-
- * configure.in: disable gdbtk for *cygwin32* hosted compiles
- * configure: regenerated with autoconf 2.8
-
-Sun May 19 16:49:37 1996 Fred Fish <fnf@cygnus.com>
-
- * gdbtk.c (gdbtk_readline_begin, gdbtk_readline, gdbtk_readline_end):
- New functions.
- (tk_command_loop): Set instream to NULL to enable Tk user interaction.
- (gdbtk_init): Set readline_begin_hook, readline_hook,
- and readline_end_hook.
- * gdbtk.tcl (gdbtk_tcl_readline_begin, gdbtk_tcl_readline,
- gdbtk_tcl_readline_end): New functions.
- (tclsh): Pack scroll bar on right side of window, not left.
-
-Fri May 17 13:54:34 1996 Fred Fish <fnf@cygnus.com>
-
- * gdbtk.tcl (create_command_window): Change a misspelled "get"
- to the intended "cget".
- (delete_line): Fix so it deletes the current line at the
- insertion cursor.
-
-Thu May 16 19:20:29 1996 Fred Fish <fnf@cygnus.com>
-
- * gdbtk.tcl (gdb_prompt): Set this early on.
- (create_command_window): Use gdb_prompt rather than "(gdb) ".
- (gdbtk_tcl_preloop): Proc executed just prior to Tk main loop.
- (tclsh): If an evaluation window already exists, just bring it
- to the front instead of trying to create another.
- * gdbtk.c (tk_command_loop): New function.
- (gdbtk_init): Call tk_command_loop rather than Tk_MainLoop.
-
-Thu May 16 16:16:35 1996 Fred Fish <fnf@cygnus.com>
-
- * gdbtk.tcl (evaluate_tcl_command, tclsh): New functions that
- implement a tcl evaluation window for gdbtk maintainers to use.
-
-Thu May 16 11:42:58 1996 Tom Tromey <tromey@creche.cygnus.com>
-
- * gdbtk.tcl (files_command): Correctly insert list of files into
- listbox widget.
-
- * gdbtk.tcl (files_command): listbox command no longer accepts
- -geometry.
-
-Wed May 15 16:04:09 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * gdbtk.tcl (create_command_window): If command window's buffer
- is disabled, don't execute any of the key bindings.
-
-Mon May 13 13:43:25 1996 Fred Fish <fnf@cygnus.com>
-
- * gdbtk.c (tk_command): Catch case where no argument is given
- since this will cause the tcl interpreter to dump core.
-
-Wed May 8 20:33:24 1996 Fred Fish <fnf@cygnus.com>
-
- * gdbtk.c: Fix a couple of misspellings.
-
-Thu May 2 19:17:49 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * gdbtk.tcl (debug_interface): New global, use to aid debugging.
- (insert_breakpoint_tag, delete_breakpoint_tag): Fix range.
- (file_popup_menu): Delete, never used.
- (listing_window_popup): Rename from listing_window_button_1,
- remove breakpoint toggling code.
- (toggle_breakpoint): New procedure.
- (create_file_win): Bind popup menu to button 2, toggle breakpoints
- with button 1 in breakpoint area, add display of tagged areas if
- debugging on.
-
-Fri Apr 5 13:44:40 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * gdbtk.c (running_now): New global variable.
- (gdb_cmd): Test it before executing any command.
- (gdbtk_call_command): Set it when inferior is running.
- * gdbtk.tcl (gdbtk_tcl_busy, gdbtk_tcl_idle): Enable and
- disable interaction with command window's text appropriately.
-
-Fri Apr 5 13:25:42 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * gdbtk.c (SIOCSPGRP, linux): If on Linux, undef SIOCSPGRP, since
- some versions of the kernel don't support it.
-
-Tue Feb 6 16:31:25 1996 Tom Tromey <tromey@creche.cygnus.com>
-
- * gdbtk.tcl (create_file_win): Eliminate text widget B1 binding so
- double-clicking will work again.
- (create_asm_win): Put "break" at end of all B1 bindings.
- (create_file_win): Lower "sel" tag, don't raise it.
- (ensure_line_visible): New proc.
- (update_listing, update_assembly): Use it.
- (create_copyright_window): Destroy window on Leave event.
- (create_command_window): Put "break" at end of all B2 bindings.
-
-Wed Jan 24 15:28:41 1996 Tom Tromey <tromey@creche.cygnus.com>
-
- * gdbtk.tcl, gdbtk.c: Updated copyrights.
-
- * configure.in: Look for -ldl or -ldld when using Tcl 7.5 or
- greater.
- * configure: Rebuilt.
-
-Tue Jan 23 09:00:48 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * gdbtk.c (gdb_disassemble): Pass fprintf_unfiltered to
- INIT_DISASSEMBLE_INFO.
-
-Mon Jan 15 09:58:41 1996 Tom Tromey <tromey@creche.cygnus.com>
-
- * gdbtk.tcl (create_expr_window): Many changes to update GUI.
- (add_expr): Changes from create_expr_window.
- (create_command_window): Set focus.
- (delete_expr): Rewrote.
- (expr_update_button): New proc.
- (add_expr): Put bindings on FocusIn, FocusOut.
- Don't allow .file_popup to be torn off.
-
-Fri Jan 12 09:36:17 1996 Tom Tromey <tromey@creche.cygnus.com>
-
- * gdbtk.tcl (gdbtk_tcl_query): Swap Yes and No buttons.
- (update_listing): Use lassign. Use "see" to scroll. Don't need
- screen_top, screen_bot, screen_height.
- (update_assembly): Use "see" to scroll.
- (textscrollproc): Removed.
- (create_file_win): Don't use textscrollproc.
- (asmscrollproc): Removed.
- (create_asm_window): Don't use asmscrollproc.
- (create_asm_win): Ditto.
- (screen_height, screen_top, screen_bot): Removed.
- (run_editor): New proc.
- (build_framework): Use it.
- (create_file_win, create_source_window): Don't use textscrollproc.
- (create_breakpoints_window): Set -xscrollcommand on canvas.
- (not_implemented_yet): Default button is 0.
- (delete_char): Don't use tk_textBackspace.
- (create_command_window): Allow Tk bindings to fire after deleting
- character.
- (create_command_window): Make Delete delete left, not right.
-
-Thu Jan 11 10:08:14 1996 Tom Tromey <tromey@creche.cygnus.com>
-
- * gdbtk.tcl (FSBox): Don't use tk_listboxSingleSelect.
-
- Changes in sync with expect:
- * configure.in (ENABLE_GDBTK): Use CY_AC_PATH_TCL and
- CY_AC_PATH_TK.
- * aclocal.m4: Replaced with version from expect.
- * configure: Regenerated.
-
-Wed Jan 10 09:07:22 1996 Tom Tromey <tromey@creche.cygnus.com>
-
- * gdbtk.tcl (gdbtk_tcl_fputs, gdbtk_tcl_fputs_error,
- gdbtk_tcl_flush): Use "see", not "yview".
- (gdbtk_tcl_query): Use questhead bitmap.
- various: Always wrap condition of 'if' in {...}.
- (add_breakpoint_frame): Set -value on radiobuttons.
- (lassign): New proc.
- (add_breakpoint_frame): Use lassign, not series of assignments.
- (decr): Made faster.
- (interactive_cmd): Use "see", not "yview".
- (not_implemented_yet): Use warning bitmap.
- (update_expr): Don't allow $expr to be evalled by Tcl.
- (create_expr_window): Don't use "focus".
- (delete_char, delete_line): Define globally.
- (delete_line, delete_char, create_command_window, update_autocmd,
- build_framework, create_asm_win, create_file_win): Use "see", not
- "yview".
- (create_copyright_window, center_window, bind_widget_after_class):
- New procs.
- (FSBox,create_command_window, create_autocmd_window): Binding
- changes for Tk4.
- (textscrollproc): Define globally.
- (build_framework): tk_menuBar no longer needed. Keys Prior, Next,
- Home, End, Up, and Down are all defined by Tk.
- (apply_filespec): Use error bitmap in dialog.
- (files_command): Don't use tk_listboxSingleSelect.
- (files_command): Don't use "uniq" to remove duplicates from a
- list.
- (update_assembly): Use lassign.
- (create_asm_win): Removed redundant bindings.
- (listing_window_button_1, file_popup_menu): Use tk_popup.
- (ButtonRelease-1 binding): Just remove tag from window; rest
- handled by Tk.
-
- * gdbtk.c (gdbtk_query): Use Tcl_Merge to provide quoting.
- (call_wrapper): Use Tcl_Eval, not Tcl_VarEval.
- (gdbtk_call_command): Ditto.
-
-Thu Jan 4 16:04:54 1996 Stu Grossman (grossman@cygnus.com)
-
- * configure configure.in: Make --enable-gdbtk be the default.
-
-Thu Dec 28 15:10:49 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * README.GDBTK: Polish introductory paragraph.
-
-Mon Oct 16 11:27:06 1995 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.c (gdb_disassemble): Use fprintf_unfiltered instead of
- fprintf_filtered.
-
-Tue Oct 10 15:26:39 1995 Fred Fish <fnf@cygnus.com>
-
- * README.GDBTK: Updated for version 4.15.
-
-Sat Aug 19 17:20:22 1995 Michael Tiemann <tiemann@axon.cygnus.com>
-
- * gdbtk.tcl: ENABLE comes back as "1" or "0", not "enable" or
- "disable".
- Also, wire up the breakpoint window so that it can be demo'd.
-
-Tue Aug 1 11:44:53 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * gdbtk.c: Include "gdb_string.h" instead of <string.h>.
-
-Tue Jun 20 10:19:40 1995 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.c: Add functions Tcl_Malloc, Tcl_Realloc, and Tcl_Free.
-
- * gdbtk.tcl (add_breakpoint_frame): Add more fields.
- * (create_file_win create_asm_win build_framework): Create null
- bindings for meta keys to keep window from dropping down to
- insertion point when meta is pressed by itself. New bindings:
- Up/Down - Scroll up/down one line at a time
- Next/Prior - Scroll up/down one page at a time
- Home/End - Warp to current pc/end of file
- * (build_framework): Turn on breakpoint menu.
- * (create_command_window): Implement tab completion. Add binding
- for ^C to stop target.
-
-Fri May 19 06:15:40 1995 Jim Kingdon <kingdon@deneb.cygnus.com>
-
- * gdbtk.c: Conditionalize use of stdarg rather than varargs on
- ANSI_PROTOTYPES not __STDC__; it must match the definition of
- PARAMS.
-
-Thu May 18 15:58:46 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * gdbtk.c (gdbtk_query): Use stdarg.h macros when compiling with
- an ANSI compiler.
-
-Sat Apr 15 13:52:24 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * gdbtk.c (gdb_disassemble): Read from inferior if connected
- to a VxWorks target.
-
-Fri Apr 14 10:18:20 1995 Stu Grossman (grossman@cygnus.com)
-
- * README.GDBTK: New file. Contains the obvious.
-
-Tue Apr 11 11:07:12 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * gdbtk.c (gdbtk_init): If SIOCSPGRP is not available, but
- F_SETOWN is, use that.
-
-Thu Apr 6 17:00:46 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * Makefile.in (X11_INCLUDES): Define as empty.
- (X11_CFLAGS): Define as including $(X11_INCLUDES).
- (X11_LIB_SWITCHES): Define as empty.
- (X11_LIBS): Define as -lX11.
-
- * configure.in (enable_gdbtk): If gdbtk, support the --x-includes
- and --x-libraries switches, setting the X11_INCLUDES and
- X11_LIB_SWITCHES respectively. Instead of using a hardcoded -lX11
- in ENABLE_CLIBS, use the X11_LIB_SWITCHES and X11_LIBS variables.
-
- * gdbtk.c (gdbtk_init): If SIOCSPGRP is not available, don't use
- it. This means that the stop button doesn't work, but is better
- than nothing.
-
-Wed Mar 29 17:09:29 1995 Stu Grossman (grossman@cygnus.com)
-
- * Makefile.in (gdbtk.o): Use X11_CFLAGS to provide alternate
- locations (per-host) for X11 include files.
- * config/pa/hppahpux.mh (XM_CLIBS): Add -L/usr/lib/X11R5 to force
- the use of R5 libs.
- (X11_CFLAGS): Add this to indicate the locs
- of the R5 include files.
-
-Wed Mar 8 16:12:21 1995 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.c (gdb_get_breakpoint_info): Return error if breakpoint
- type is not bp_breakpoint.
-
-Tue Feb 14 17:16:41 1995 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.c: Ditto.
- * gdbtk.c: General cleanups, get rid of unused variables. Redo
- handling of stdout/stderr to just return output as the result of
- the tcl command that caused the output. Cleanup -Wall stuff.
- * (breakpoint_notify): Now returns just action and breakpoint
- number.
- * (gdb_get_breakpoint_list): New routine. Does the obvious.
- * (gdb_get_breakpoint_info): Mostly derived from the old
- breakpoint_notify, but returns lots more info.
- * (dsprintf_append_element): Helper routine, works like printf,
- but appends a tcl element onto the specified DString. Good for
- building up lists as return values.
- * (gdbtk_enable/disable_breakpoint): Go away. Replaced with
- gdbtk_modify_breakpoint.
- * (*many routines*): Use new result protocol.
- * (call_wrapper): Make sure that recursive calls don't trash results.
- * gdbtk.tcl: New windows, autocmd, and breakpoints.
- * (gdbtk_tcl_fputs): Don't use $current_output_win redirection
- anymore. It's not needed (in fact, this routine may not be needed
- anymore).
- * (gdbtk_tcl_breakpoint): Change to reflect new breakpoint
- notification protocol.
- * (gdbtk_tcl_busy gdbtk_tcl_idle): Straighten out buttons, remove
- catches.
- * (interactive_cmd): Use this wrapper around button invocations
- of many commands. This will catch errors and put the results into
- the command window. It also updates all the other windows.
- * Also, change reliefs of most things to sunken. This actually
- looks better.
- * (create_file_win): Fix margin binding to allow breakpoints to
- work again.
- * (create_asm_win): Use return value of gdb_disassemble instead
- of implicit I/O to the command window.
- * (create_command_window): Use new result protocol to get output
- from commands.
-
-Sun Feb 5 20:32:44 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * gdbtk.c (gdb_disassemble): Deference pointer to function before
- calling it (pre-ANSI compilers generally require this).
-
-Fri Feb 3 11:19:20 1995 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.c (gdb_disassemble): Get rid of
- dis_asm_read_memory_hook. We can now call the disassemblers
- directly and have no need for this hook anymore.
-
-Mon Jan 30 17:34:24 1995 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.tcl (create_file_win): Disable old popup menu for source
- window.
-
-Wed Jan 25 18:23:46 1995 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.c (gdbtk_init): Prevent segfault when gdbtk.tcl can't be
- found.
- * gdbtk.tcl: Initialize expr_update_list() to prevent errors when
- popping up expression window for the first time.
-
-Tue Jan 24 12:10:28 1995 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.tcl (create_registers_window): Work around a radiobutton
- widget bug to make Options|Natural button work.
-
- * gdbtk.c (gdb_disassemble): Fix problem with source+assembly and
- g++ caused by out-of-order pc's.
- * gdbtk.tcl (files_command): Remove duplicate file names. Also,
- add scrollbar.
-
-Mon Jan 23 17:21:09 1995 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.tcl: Take .gdbtkinit if it exists. Makes gdbtk match the
- doc!
-
-Thu Jan 12 15:02:40 1995 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.c, gdbtk.tcl: Update/add copyright.
- * gdbtk.tcl (build_framework): Several fixes for filespec widget,
- including dismiss button, and better error handling.
- * (create_command_win): Bind button 2 to retrieve selection.
-
-Wed Jan 11 17:06:55 1995 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.tcl: Add button to control mixed source disassembly.
- Use text widgets in expr window. The give me more control over
- layout.
- Add auto-updating of exprs in expression window.
- Handle expressions out of scope a bit better.
- Make selected window pop up to the top when invoked via the
- menubar.
- Make copyright message have raised relief.
-
- * gdbtk.c (gdbtk_init): Improve handling for errors in gdbtk.tcl
- during startup.
-
-Thu Jan 5 17:38:29 1995 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.c (finish_saving_output): Don't do anything if not saving
- output.
- * (breakpoint_notify): Don't send null filename to tcl.
- * (gdb_eval): New tcl command to eval an expression.
- * (gdb_disassemble): New tcl command to do disassembly. This
- allows tcl code to choose between exec file and target memeory,
- and can also do mixed source and assembly.
- * (gdbtk_init): Move reading of gdbtk.tcl to the end to make sure
- that more of the environment is set up. Also, create link between
- gdb and tcl vars disassemble{-_}from{-_}exec.
-
- * gdbtk.tcl: New expression window support.
- * Make assembly window be 80 columns wide.
- * Use new disassembly method. Add menu items to select
- disassembly from exec file or target.
- * Change View menubar item to Options.
-
- * Get rid of Stack, Breakpoints, Signals, and Variables Windows,
- since they don't exist yet.
-
- * Pop up a copyright window on startup.
-
-Wed Jan 4 19:49:10 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * gdbtk.tcl (build_framework): Add standard commands menu, more
- windows to standard windows menu.
- (not_implemented_yet): Clarify message.
-
-Fri Dec 30 15:49:00 1994 Stan Shebs <shebs@andros.cygnus.com>
-
- * gdbtk.tcl (FSBox): New proc, File Selection Box code from exmh.
- (not_implemented_yet): New proc.
- (build_framework): Add various file commands to file menu.
-
-Fri Dec 23 16:18:50 1994 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.c (gdbtk_wait gdbtk_init): Portability improvements for
- SIGIO handling.
-
-Mon Dec 19 09:55:47 1994 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.tcl (update_assembly): Force update to make sure that pc
- is visible when creating new assembly windows.
-
-Sun Dec 18 23:31:20 1994 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.c (gdbtk_wait gdbtk_init): Use different method of
- enabling I/O interrupts for SVR4 (streams).
- * (start_saving_output save_output get_saved_output
- finish_saving_output flush_holdbuf gdbtk_flush gdbtk_fputs
- gdbtk_init):
- Totally revamp to use TCLs dynamic string functions. Also, quote
- all data passed back to TCL to prevent errors with unmatched
- braces, odd characters, etc... This fixes several wierd problems
- with outputting strings containing unmatched braces.
- * (breakpoint_notify gdb_loc): Use long hex format to output
- addresses of breakpoints and PCs. This fixes some Alpha problems.
- * (breakpoint_notify): Add stream arg to call to gdbtk_fputs.
- * (gdb_listfiles): Also, go through the symtabs when looking for
- files. This makes xcoff work (sort of), but probably breaks
- something else.
- * (gdb_stop): Return TCL_OK instead of nothing. This fixes odd
- TCL errors when hitting stop button.
- * (tk_command): Don't pass interp->result on to Tcl_{Var}Eval, as
- that will trash the result. strdup the result instead and pass
- that on. Improve error handling as well.
-
- * gdbtk.tcl (gdbtk_tcl_flush): Use global def of
- current_output_win. Makes flushing actually work!
- * (asm_win_name create_asm_win update_assembly): Bunch of fixes
- to make assembly windows stop flashing when loading a new file.
- * (gdbtk_tcl_busy gdbtk_tcl_idle): Use catch to prevent gdb_cmd
- errors from losing control.
- * (create_source_window): Add source file selection to View menu.
- * (create_command_window (<Key-Return> binding): Quote text fed
- into gdb_cmd to prevent eval errors.
-
-Thu Dec 15 16:40:10 1994 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.c: Improve mechanism for capturing output values.
- (full_filename): Remove.
- (gdb_cmd call_wrapper gdbtk_init): Protect all calls from tcl land
- with call_wrapper. This prevents longjmps (usually via error())
- from jumping out of tcl/tk and leaving things in an indeterminate
- state.
- (gdbtk_fputs): Differentiate stdout from stderr when passing text
- into tcl land.
- * gdbtk.tcl: New view option to disable line numbers. Put catch
- around most uses of gdb_cmd. Add update button to reg config
- window. Stop doing immediate updates when selecting registers.
- Change register view values into checkbuttons.
-
-Mon Dec 12 16:59:29 1994 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.tcl (reg_config_menu create_registers_window
- recompute_reg_display_list): Use array instead of individual vars
- for register display list.
- * (recompute_reg_display_list update_registers): Fix bug with not
- displaying all registers.
-
-Mon Dec 12 12:22:21 1994 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.c: New tcl commands: gdb_fetch_registers,
- gdb_changed_register_list, and gdb_regnames.
- * gdbtk.tcl: Use monochrome color model for now.
- * (delete_breakpoint_tag create_file_win): Add breakdot support.
- * (create_file_win create_asm_win update_listing build_framework
- create_source_window create_command_window): Re-org window
- creation to give all windows consistent look and feel.
- * (update_listing update_asm): Change pc pointer to '->'.
- * (registers_command reg_config_menu create_registers_window
- populate_reg_window update_registers): Revamp register window.
- Allow selection of registers to be displayed. Highlight changed
- registers.
-
-Mon Nov 28 09:17:20 1994 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.tcl (build_framework): Fix bug with setting window titles.
-
- * gdbtk.tcl (build_framework): Add "Report bug" to help menu.
-
- * gdbtk.tcl: Re-arrange windows using new, consistent layout. Clean
- up lots of code and centralize framework initialization.
-
-Wed Nov 16 15:28:29 1994 Rob Savoye (rob@cygnus.com)
-
- * Makefile.in: Fix the test for installing gdbtk.
-
-Mon Nov 14 08:51:29 1994 Stu Grossman (grossman@cygnus.com)
-
- * Makefile.in: Install gdbtk.tcl.
- * configure.in: Add ENABLE_GDBTK flag.
- * gdbtk.c (gdb_sourcelines): Returns list of source lines
- containing code. (gdb_regnames): Returns list of register names.
-
-Thu Nov 3 14:25:24 1994 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.c (gdb_stop): Switch to target_stop().
-
-Tue Nov 1 16:41:12 1994 Stu Grossman (grossman@cygnus.com)
-
- * Makefile.in: Use $(objdir)/tcl and $(objdir)/tk if they are
- available.
- * configure.in (ENABLE_CLIBS): Use $(TCL) and $(TK) instead of
- -ltcl and -ltk.
- * gdbtk.c: Get rid of lots of unnecessary #includes.
- * (gdbtk_init): Use ConnectionNumber macro instead of referencing
- Display structure directly.
- * gdbtk.tcl: Change exit button to quit button.
-
-Wed Oct 26 15:41:07 1994 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.c: Change sense and name of no_windows variable. Now
- called use_windows, and defaults to off (for compatibility).
-
-Thu Oct 20 17:35:45 1994 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.c (gdb_cmd): Force GUI into idle mode when errors occur.
- * (gdb_stop): New tcl command to stop the target process.
- * (x_event, gdbtk_wait): Allow GUI to interrupt gdb out of target
- waits.
- * (gdbtk_call_command): Wrapper around command processing to
- alert GUI of target state changes.
- * (gdbtk_init): Get the fd of X server for doing async
- notification of X events (via x_event). Setup new hooks.
- * gdbtk.tcl: Add scrollbars to assembly and command windows.
- * Change window foreground & background colors.
- * Create margin tag for breakpoints in source and assembly windows.
- * Add new routines to be invoked when target state changes to/from
- idle.
- * Add start of expression window.
- * Change bindings of mouse button 1 in assembly and source window
- to just set or clear breakpoints when in the margin tag.
- * Change shape of register window to be more vertical to better
- reflect its contents.
- * Add stop button.
- * Cleanup some code around command window bindings.
-
-Sat Sep 17 17:05:14 1994 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.tcl: Let ^U delete lines in the command window.
-
-Fri Sep 16 15:40:34 1994 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.c: Replace calls to full_filename with symtab_to_filename.
- * gdbtk.tcl: New routine pc_to_line replaces in line code. New
- routine decr replaces in line code.
- * (create_file_win): Use catch to handle open failures more
- elegantly. Also, create special window to display file open
- failure message. Move opening of file prior to creation of text
- widget.
- * (create_asm_win): Add PC as argument. We now base disassembly
- on PC instead of function name, since function names can be
- ambiguous (usually seen with shared libs). Also, use catch to
- simplify code where we don't care about failures.
-
-Wed Sep 14 00:55:26 1994 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.tcl: Add ref counts to breakpoint tags.
- * Put quotes around function name in disassemble command to better
- handle assembler names containing `.'.
- * Make pclist element 0 be filler to avoid off-by-one problem with
- line numbers.
- * Set names of top-level windows.
- * Add register display window.
- * Add PC to label of assembly window.
-
-Tue Sep 13 08:59:04 1994 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.c (gdbtk_flush gdbtk_fputs): Buffer up output to make
- disassembly more efficient.
- * (breakpoint_notify): Include pc in gdbtk_tcl_breakpoint
- callback.
- * (gdb_loc): Include pc in return value. Also, return function
- name if arg was specified.
- * (gdb_cmd_stub): Call gdb_flush to drain internal GDB buffers
- after command completes.
- * (gdbtk_init): Improve error handling.
-
- * gdbtk.tcl: Add lots of comments. Clean up code.
- * (gdbtk_tcl_fputs): Make output window redirectable.
- * Add assembly window, and breapoint support.
- * Make button 1 in margin toggle breakpoints.
- * Use stippling to indicate breakpoint disabling.
-
-Fri Sep 2 19:11:40 1994 Stu Grossman (grossman@cygnus.com)
-
- * configure.in: Don't symlink to gdbtk.tcl if it's already there.
-
-Thu Jul 28 14:37:36 1994 Stu Grossman (grossman@cygnus.com)
-
- Support for TK GUI.
- * Makefile.in: Add rule for gdbtk.o.
- * configure.in: Add support for --enable-gdbtk.
- * gdbtk.c: New file. Contains support routines for TK interface.
- * gdbtk.tcl: New file. Implements GUI policy.
-
-
-Local Variables:
-mode: change-log
-left-margin: 8
-fill-column: 74
-version-control: never
-End:
diff --git a/gdb/gdbtk/generic/ChangeLog-1998 b/gdb/gdbtk/generic/ChangeLog-1998
deleted file mode 100644
index ca919a6156c..00000000000
--- a/gdb/gdbtk/generic/ChangeLog-1998
+++ /dev/null
@@ -1,837 +0,0 @@
- Mon Dec 21 11:11:02 1998 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-cmds.c (get_register): Call get_saved_register instead of
- read_relative_register_raw_bytes to fetch registers.
-
- Thu Dec 17 09:00:56 1998 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-cmds.c (gdb_search): Don't mention C++ RTTI and
- global constructor/destructor symbols.
-
- Thu Nov 12 15:20:15 1998 Jim Ingham <jingham@cygnus.com>
- * More bug fixes merged in from devo.
-
- * gdbtk-cmds.c (gdb_cmd): Added an optional second argument to the
- gdb_cmd, which is from_tty. This is passed to the gdb command
- parser. It is 0 by default, and the console window passes 1.
-
- * gdbtk-cmds.c: moved disassemble_from_exec from gdbtk.c to gdbtk-cmds.c
- with all the other link-var'ed variables
-
- * gdbtk-hooks.c (gdbtk_trace_find): Only run the hook functions if
- we are called from_tty.
-
- * gdbtk-hooks.c (gdbtk_trace_start_stop): Set the trace buttons
- from a trace_start_command callback rather than doing it as a
- special case in gdb_cmd.
-
- * tracepoint.c (tstart_command, tstop_command): Add call to
- trace_start_stop_hook here.
-
- 1998-11-04 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk-cmds.c (gdb_set_bp_addr): For callback, send full
- pathname instead of just basename.
-
- 1998-11-03 Keith Seitz <keiths@cygnus.com>
- * v850ice.c (do_gdb): New function.
- (ice_stepi): Use do_gdb to step properly.
- (ice_nexti): Use do_gdb to step properly.
- (view_source): Correct call to src window's location for new version.
-
- Tue Aug 25 18:13:30 1998 Jim Ingham <jingham@cygnus.com>
-
- * gdbtk.c (gdbtk_init): I hadn't excised ALL the old startup code,
- so it was not working correctly. Now it does.
-
- Fri Aug 21 14:37:40 1998 Jim Ingham <jingham@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Changed the startup code to use
- tcl_findLibrary
-
-
-
-
-on Dec 28 17:44:36 1998 David Taylor <taylor@texas.cygnus.com>
-
-
- The following changes were made by Jim Blandy <jimb@cygnus.com>,
- Edith Epstein <eepstein@cygnus.com>, Elena Zannoni
- <ezannoni@cygnus.com> Stan Shebs <shebs@cygnus.com>, and David
- Taylor <taylor@cygnus.com>, as part of the project to merge in
- changes originally made by HP; HP did not create ChangeLog
- entries.
-
- * gdbtk.c (gdbtk_init): change stderr to gdb_stderr.
-
- * gdbtk-cmds.c
- (get_pc_register): Use paddr_nz, not sprintf's %llx and
- a cast to `long long'. Those aren't portable.
- (gdb_eval): add embedded_offset param to val_print call
- (get_register): add embedded_offset param to val_print call
-
- * gdbtk-hooks.c
- (tk_command_loop): change instream to a FILE.
- (gdbtk_flush): change both the declaration and definition to
- use GDB_FILE rather than FILE.
-
-Mon Dec 21 11:11:02 1998 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-cmds.c (get_register): Call get_saved_register instead of
- read_relative_register_raw_bytes to fetch registers.
-
-Thu Dec 17 09:00:56 1998 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-cmds.c (gdb_search): Don't mention C++ RTTI and
- global constructor/destructor symbols.
-
-Tue Dec 15 10:09:31 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbtk-cmds.c (gdb_disassemble): Fix typo.
-
-Sun Dec 13 09:52:51 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbtk-cmds.c: Update TARGET_PRINT_INSN_INFO, TARGET_PRINT_INSN.
-
-Fri Dec 11 09:52:04 1998 Andrew Cagney <cagney@chook>
-
- * gdbtk-cmds.c: Replace reg_name with REGISTER_NAME.
-
-Mon Dec 14 13:20:50 1998 Jim Ingham <jingham@cygnus.com>
-
- * Makefile.in, configure.in configure - add support for LIBGUI
- outside the IDE context.
-
-Thu Nov 19 13:14:57 1998 Geoffrey Noer <noer@cygnus.com>
-
- * gdbtk-cmds.c: Can't start using new API names yet. Switch back
- to calling cygwin32_ funcs until some time has passed...
- * gdbtk.c: Ditto. Also, include sys/cygwin.h for Cygwin, instead
- of providing own proto.
-
-Fri Nov 13 00:15:08 1998 Geoffrey Noer <noer@cygnus.com>
-
- Changes to account for name change from cygwin32 to cygwin and
- clean up Win32-related ifdefs.
-
- * gdbtk.c: lose "32" from cygwin_ func calls. ifndef for
- checking DISPLAY should be for _WIN32, not WINNT.
- * gdbtk.h: pick GDBTK_PATH_SEP based on _WIN32, not WINNT.
- * gdbtk-cmds.c (gdb_path_conv): lose "32" from cygwin_ func call,
- change ifdef to __CYGWIN32__ instead of WINNT.
- * {gdbtk.c, gdbtk-hooks.c}: __CYGWIN32__ refs drop the "32".
-
-Thu Nov 12 15:20:15 1998 Jim Ingham <jingham@cygnus.com>
-
- * gdbtk-cmds.c (gdb_cmd): Added an optional second argument to the
- gdb_cmd, which is from_tty. This is passed to the gdb command
- parser. It is 0 by default, and the console window passes 1.
-
- * gdbtk-cmds.c: moved disassemble_from_exec from gdbtk.c to gdbtk-cmds.c
- with all the other link-var'ed variables
-
- * gdbtk-hooks.c (gdbtk_trace_find): Only run the hook functions if
- we are called from_tty.
-
- * gdbtk-hooks.c (gdbtk_trace_start_stop): Set the trace buttons
- from a trace_start_command callback rather than doing it as a
- special case in gdb_cmd.
-
- * tracepoint.c (tstart_command, tstop_command): Add call to
- trace_start_stop_hook here.
-
-Wed Nov 4 12:41:42 1998 Jim Ingham <jingham@cygnus.com>
-
- * gdbtk-cmds.c (gdb_set_bp_addr): Pass the type, enable & thread
- to gdbtk_tcl_breakpoint.
- * gdbtk-hooks.c (gdbtk_trace_find): Added this function. It is
- the hook function for tfind commands.
- * tracepoint.c (trace_find_command): Added the trace_find_hook,
- run when you do trace_find_command.
- * tracepoint.h: Define the trace_find_hook.
-
-1998-11-03 Keith Seitz <keiths@cygnus.com>
-
- * v850ice.c (do_gdb): New function.
- (ice_stepi): Use do_gdb to step properly.
- (ice_nexti): Use do_gdb to step properly.
- (view_source): Correct call to src window's location for new version.
-
-Mon Nov 2 11:16:10 1998 Jim Ingham <jingham@cygnus.com>
-
- * gdbtk-cmds (gdb_get_tracepoint_info): Demangle C++ function names.
-
-Fri Oct 30 11:22:23 1998 Jim Ingham <jingham@cygnus.com>
-
- * gdbtk-cmds (gdb_get_tracepoint_info): Fixed typo.
-
-Wed Oct 28 16:19:02 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk-cmds.c (gdb_set_bp_addr): For callback, send full
- pathname instead of just basename.
-
-Wed Oct 28 10:14:33 1998 Jim Ingham <jingham@cygnus.com>
-
- * gdbtk-cmds.c: Made the bdtypes & bpdisp arrays shared so they
- could be used in gdbtk-hooks.c (breakpoint_notify).
- Also fixed a few error messages to actually print the bp number
- rather that #%d...
- * gdbtk-hooks.c (breakpoint_notify): pass more of the information
- about the breakpoint into the Tcl command, so it does not have to
- try and guess about information we have on the C side.
- * gdbtk.h: Export the bptypes & pbdisp arrays.
-
-1998-10-13 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * gdbtk.c, gdbtk-cmds.c: Cast parameters passed to make_cleanup to
- use the new make_cleanup_func typedef.
-
-1998-10-08 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-hooks.c (gdbtk_add_hooks): Install a hook for
- (new) file_changed_hook.
- (gdbtk_exec_file_changed): Rename to gdbtk_exec_file_display
- to mimic hook's name.
- (gdbtk_file_changed): New hook function.
-
-Tue Oct 6 22:57:13 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * configure.in (links): Link gdbtcl2 directory instead of gdbtcl.
-
-Mon Oct 5 00:34:00 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk-cmds.c (gdb_set_bp_addr): New command. Sets a
- breakpoint at an address. Use this instead of gdb_cmd "break"
- because the syntax of the break command is broken and doesn't
- allow you to create a thread-specific BP at an address. Also
- this is faster.
-
-Sun Oct 4 22:35:47 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk-cmds.c (gdb_set_bp): Add an optional thread number.
- (gdb_find_bp_at_line): New function. Returns a list of bpnums
- at the specified line number.
- (gdb_find_bp_at_addr): New function. Returns a list of bpnums
- at an address..
-
-1998-10-02 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-hooks.c (gdbtk_exec_file_changed): New function which handles
- exec_file changes.
- (gdbtk_add_hooks): Define exec_file_display_hook (to gdbtk_exec_file_changed)
-
- * gdbtk-cmds.c (gdb_stop): target_stop is ALWAYS defined, so
- compare against something a little more meaningful (target_ignore).
-
-1998-09-24 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk.c (gdbtk_wait): Don't run the timer for ice targets.
-
- * v850ice.c (WM_ADDR_TO_SYM): New message.
- (v850ice_wndproc): Add handler for WM_SOURCE.
- (v850ice_wait): Call the ui_loop_hook occasionally.
- (ice_cont): Acknowledge message before doing anything.
- (ice_stepi): Ack message and let gdbtk do stepping.
- (ice_nexti): Ack message and let gdbtk do stepping.
- (view_source): New function ICE calls to display source code.
-
-1998-09-18 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-cmds.c (get_frame_name): Demangle function names, too.
-
-Thu Sep 10 22:10:29 1998 Jim Ingham <jingham@cygnus.com>
-
- *gdbtk-cmds.c (gdb_disassemble): Make sure the symtab's linetable is not
- null before trying to use it...
-
-1998-09-02 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-cmds.c (gdb_cmd): Do not run the timer when downloading --
- the ui_progress_hook that has been installed will actually
- update the gui for us.
-
-Mon Aug 31 15:42:10 1998 Tom Tromey <tromey@cygnus.com>
-
- * gdbtk-hooks.c (context_hook): Don't define.
-
-1998-08-31 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-cmds.c (gdb_listfuncs): When stripping out "global destructors"
- and "global constructors", do not append any elements to the result.
-
-Sun Aug 30 00:49:18 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk-cmds.c (Gdbtk_Init): Link C variable gdb_context
- with tcl variable gdb_context_id.
-
- * gdbtk-hooks.c (gdbtk_context_change): Implement new hook called
- context_hook. Called when threads change.
-
- * gdbtk.c: Initialize gdb_context.
-
- * gdbtk.h: Declare gdb_context.
-
- * infrun (wait_for_inferior): Call context_hook.
-
- * thread.c (thread_command): Call context_hook.
-
- * defs.h: Declare context_hook.
-
-Fri Aug 28 12:14:49 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk-cmds.c (gdb_loadfile): Open the file after doing
- the symtab lookup and calling symtab_to_filename(). This
- makes GDBtk work with the GDB "dir" command.
-
-1998-08-18 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-hooks.c (gdbtk_add_hooks): Set selected_frame_level_changed_hook.
- (gdbtk_selected_frame_changed): New function.
-
- * gdbtk-cmds.c (Gdbtk_Init): Add command gdb_stack into interpreter.
- Link gdb's global selected_frame_level with interpreter global
- gdb_selected_frame_level.
- (gdb_stack): New function to faciltate speedier backtraces from
- gdbtk.
- (get_frame_name): New helper function for gdb_stack.
-
-Tue Aug 18 15:42:40 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk-cmds.c (gdb_listfuncs): Strip out global constructors
- and destructors from the function list.
-
-Thu Aug 13 15:09:59 1998 Drew Moseley <dmoseley@cygnus.com>
-
- * gdbtk.c (gdbtk_cleanup): added a scope-level around the contents
- of the #ifdef so that the variable declarations in there would not
- be illegal in a C compilation.
-
-Mon Jul 27 13:07:16 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (gdbtk_call_command): Removed because it is now
- in gdbtk-hooks.c
- (null_routine): Removed.
-
- * gdbtk-hooks.c (tracepoint_notify): Fix sprintf to
- match number of arguments.
-
- * gdbtk-cmds.c (gdb_loc): When calling gdb_loc with an
- argument, call find_pc_line() to get a complete
- symtab_and_line struct.
-
-Fri Jul 24 14:25:43 1998 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-cmds.c (gdb_search): Add missing NULL to switches.
- Add missing flags to result_ptr.
- Pass along any errors caused by getting the list of files from
- tcl.
- Allocate correct amount of memory for the file list.
- Don't do any unecessary cleanups.
-
-Fri Jul 24 01:08:37 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk-cmds.c (gdb_loadfile): When there are no
- linenumbers, use only one tab.
-
-Sat Jul 18 12:28:39 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (gdbtk_cleanup): Add call to tcl function
- gdbtk_cleanup. We need this so the GUI gets to clean
- up no matter how GDB exits.
-
-Wed Jul 1 13:10:58 1998 Jim Ingham <jingham@cygnus.com>
-
- * Moved gdbtk_hooks.c & gdbtk_cmds.c to gdbtk-hooks.c &
- gdbtk-cmds.c to comply with the gdb conventions. Changed the
- configure & makefile to reflect the change...
-
-Wed Jul 1 11:07:21 1998 Jim Ingham <jingham@cygnus.com>
-
- * gdbtk.c: removed all the commands and hooks from this file so
- now it contains only the startup code.
- * gdbtk.c (gdbtk_init): Fixed a bug in the startup code on Windows
- that caused gdbtk not to find the share directory unless
- GDBTK_LIBRARY was set.
- * gdbtk_cmds.c: New file - this contains all the Tcl commands that
- gdb defines. All the old commands were moved here, the
- string-based commands were converted to object commands, and the
- object-based commands were all converted to uniformly use the
- call_wrapper. A new function, Gdbtk_Init was added to centralize
- initializing the gdb package.
- * gdbtk_hooks.c: New file - All the hooks were moved here, and a new
- function, gdbtk_add_hooks was added to centralize adding all these
- hook functions. gdbtk_fputs was also modified to handle the new
- result_ptr structure. See the comments in gdbtk.h for more
- details.
- * gdbtk.h: New file - this contains all the defines and globals
- shared by gdbtk.c, gdbtk_cmds.c & gdbtk_hooks.c
- * Makefile.in, configure.in & configure: mutatis mutandi for the
- new files.
-
-
-Mon Jun 29 11:49:17 1998 Keith Seitz <keiths@cygnus.com>
-
- * main.c (main): Don't include gdbtk test code if GDBTK is
- not defined by configure.
-
- * configure.in: When enabling gdbtk, add "-DGDBTK" to ENABLE_CFLAGS.
-
- * configure: Regenerate.
-
-Fri Jun 26 13:56:07 1998 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk.c: Change all references to static global "interp" to
- "gdbtk_interp" and export this global.
- (gdbtk_init): If gdbtk_source_filename is not NULL, source this file
- into the interpreter when it goes idle.
- Add new command "gdb_search".
- (gdb_search): New function which searches the symbol table.
- (gdbtk_test): New function called by main when the --tclcommand
- option is used.
-
- * main.c (main): Add a new option "--tclcommand" which is used
- by the testsuite to source a file into the interpreter when it
- goes idle.
-
-Sun Jun 21 09:31:12 1998 Ron Unrau (runrau@cygnus.com)
-
- * gdbtk.c (gdb_set_bp): Use new interface.
-
-Wed Jun 17 19:12:23 1998 Jeff Holcomb <jeffh@cygnus.com>
-
- * Makefile.in (install-only): Install tracing help files.
-
-Mon Jun 15 13:18:21 1998 Jim Ingham <jingham@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Add elements to the auto_path AS LIST
- ELEMENTS. This allows gdbtk to work when installed in a directory
- which has a space in the path. D. Moseley pointed out the bug.
-
-
-Tue Jun 9 14:10:46 1998 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk.c (gdb_get_vars_command): Return static variables and
- variables stored in registers.
-
- * main.c (main): Call pre/post_add_symbol_hook's when loading
- executables and symbol files.
-
-Fri Jun 5 00:16:22 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Change all references to
- GDBTK_IDE to IDE_ENABLED.
-
-Thu Jun 4 18:31:53 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Initialize tkTable.
-
-Thu Jun 4 10:15:03 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * gdbtk.c: merged:
-
- - Elena Zannoni <ezannoni@kwikemart.cygnus.com>
- (call_obj_wrapper): in case of error, copy the
- error message from the result to the error_string.
- (gdbtk_fputs): add comments.
- (gdb_actions_command): call validate_actionline when installing the
- tracepoint, to do the syntax checking of the actions for us.
- - Elena Zannoni <ezannoni@kwikemart.cygnus.com>
- (gdb_get_trace_frame_num): new function to get the
- trace frame number from gdb.
- (gdbtk_init): added new command gdb_get_trace_frame_num.
- - Jim Blandy <jimb@zwingli.cygnus.com>
- (struct wrapped_call_objs): Change the `func' member to
- be a Tcl_ObjCmdProc, not an Tcl_CmdProc, since it accepts a vector
- of objects as arguments. Change the object vector to be const,
- since that's what all the users of this structure seem to expect.
- (call_obj_wrapper): Cast clientData properly before storing it in
- the wrapped_args structure.
-
-Thu May 28 17:19:14 1998 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk.c (_initialize_gdbtk): Get rid of the console. Patch from
- Chris Faylor (cgf@cygnus.com).
-
- * configure.in: Link cygwin32 with subsystem console.
-
- * configure: Regenerated
-
-Sun May 24 14:00:24 1998 Keith Seitz <keiths@cygnus.com>
-
- * ser-unix.c (wait_for): Do not reset timeout_remaining for cygwin32 so that
- we can use this member to track real timeouts.
- (hardwire_readchar): Modify for cygwin32 so that we only ever use a real
- system timeout of one second. Track the "real" timeout as a series of these
- one second timeouts.
- Call ui_loop_hook to keep the gui alive.
-
- * top.c: Define new hook for cygwin32, "ui_loop_hook".
-
- * gdbtk.c (gdbtk_init): Add ui_loop_hook for CygWin32 to work around
- update problems.
-
-Thu May 21 13:56:24 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * gdbtk.c: reinserted the changes that were accidentally deleted:
- (_initialize_gdbtk): Use correct device names in
- cygwin-specific call (cosmetic change).
- (gdbtk_ignorable_warning): removed va_list parameter,
- which was unused.
- (_initialize_gdbtk): add cygwin32 specific code to
- allow `gdb -nw' to work when specified specified from a windows
- console-mode command line.
-
-1998-05-19 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * gdbtk.c (struct wrapped_call_objs): Change the `func' member to
- be a Tcl_ObjCmdProc, not an Tcl_CmdProc, since it accepts a vector
- of objects as arguments. Change the object vector to be const,
- since that's what all the users of this structure seem to expect.
- (call_obj_wrapper): Cast clientData properly before storing it in
- the wrapped_args structure.
-
-Wed May 13 11:12:58 1998 James Ingham <jingham@leda.cygnus.com>
-
- * gdbtk.c: Fixed a goof in the definition of the gdb_get_args &
- gdb_get_locals Tcl commands. Moved the previous ChangeLog entry
- from ChangeLog to ChangeLog-gdbtk (here)...
-
-Tue May 12 13:29:20 1998 Jeff Holcomb <jeffh@cygnus.com>
-
- * Makefile.in (install-only): Add images/icons.txt and
- images2/icons.txt to files that need to be installed.
-
-Tue May 12 12:03:16 1998 James Ingham <jingham@leda.cygnus.com>
-
- * gdbtk.c: Add an object call wrapper for the new Tcl_Obj based
- commands. This way the obj commands will also go through
- catch_errors. This is just a bandaid while I rewrite the
- string-based commands to use the object format.
-
-Tue May 5 09:30:25 1998 Christopher Faylor <cgf@cygnus.com>
-
- * gdbtk.c (_initialize_gdbtk): Use correct device names in
- cygwin-specific call (cosmetic change).
-
-Wed Apr 29 15:53:16 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * gdbtk.c (gdbtk_ignorable_warning): removed va_list parameter,
- which was unused.
-
-Tue Apr 28 19:41:33 1998 Tom Tromey <tromey@cygnus.com>
-
- * Makefile.in (GDBTKLIBS): New macro.
- (INSTALLED_LIBS): Include GDBTKLIBS.
- (CLIBS): Likewise.
- * configure: Rebuilt.
- * configure.in: Put Tcl/Tk libs into GDBTKLIBS, not LIBS.
- (GDBTKLIBS): AC_SUBST.
-
-Thu Apr 23 19:01:05 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * Makefile.in (install-only): Install help files.
-
-Wed Apr 22 21:17:35 1998 Christopher Faylor <cgf@cygnus.com>
-
- * gdbtk.c (_initialize_gdbtk): add cygwin32 specific code to
- allow `gdb -nw' to work when specified specified from a windows
- console-mode command line.
-
-Wed Apr 15 11:23:53 1998 Stan Shebs <shebs@andros.cygnus.com>
-
- * gdbtcl: Remove directory and contents, this version of
- the interface is obsolete.
-
-Mon Apr 13 16:17:52 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (gdb_loadfile): Change fstat() call to stat().
- Needed because you can't convert a FILE* to an fd.
-
-Mon Apr 13 16:28:07 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * gdbtk.c: (perror_with_name_wrapper) new function to call
- perror_with_name safely.
- (gdb_loadfile) added source vs. executable time stamp check.
- (gdbtk_warning) new function to pass a warning message to the gui.
- (gdbtk_ignorable_warning) new function to pass a warning
- to the gui. Used only for the src. vs. exec check.
- (gdbtk_init) added warning_hook
- added include <sys/stat.h>
-
-Mon Apr 13 12:58:26 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * gdbtk.c (gdbtk_start_timer): Include on all platforms. Decrease
- timer interval a little.
- (gdbtk_stop_timer): Include on all platforms.
- (gdbtk_wait): No more signals! Use a timer on all platforms to keep the
- GUI alive.
- (gdbtk_init): Remove FIOASYNC and all x_fd references. Now using timers
- on all platforms.
-
-Fri Apr 10 15:48:10 1998 Jason Molenda (crash@bugshack.cygnus.com)
-
- * gdbtk.c (gdb_listfiles): Allocate space for 'files' dynamically.
-
-Thu Apr 9 14:20:59 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Remove redundant variable "IDE".
-
-Tue Apr 7 15:13:58 1998 Stan Shebs <shebs@andros.cygnus.com>
-
- * gdbtk.tcl: Remove, no longer used.
-
-Tue Apr 7 12:49:45 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * gdbtk.c (gdb_cmd): NEVER call the busy, update, and idle hooks.
-
-Tue Mar 31 15:42:06 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * gdbtk.c (gdb_loadfile): Don't use the return result from
- sprintf, which returns a char * under SunOS4.
-
-Tue Mar 31 17:18:43 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Add $(LIBIDETCL) as well as $(LIBIDE) if
- --enable-ide.
- * Makefile.in (IDE_CFLAGS_X): Add -I for libidetcl/src.
- (LIBIDETCL): Define.
- * configure: Rebuild.
-
-Sun Mar 29 21:19:46 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * gdbtk.c (gdb_get_tracepoint_info): Change formatting of address.
- (tracepoint_exists): Remove code which confuses assembly traces.
-
-Sat Mar 28 12:13:23 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * gdbtk.c (gdb_cmd): If argc > 2, assume that the busy and idle hooks
- should not be called.
-
-Thu Mar 26 22:29:28 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * gdbtk.c: (gdb_trace_status) new function.
- (gdbtk_init) added command "gdb_is_tracing".
- (tracepoint_notify) added passcount information.
-
-Thu Mar 26 12:00:35 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (gdbtk_fputs): Insert fencepost.
- (gdb_loc): Correct pc calculation.
- (gdb_immediate_command): Return if a load is in progress.
- (gdb_cmd): Return if a load is in progress.
- (target_stop_wrapper): New function.
- (gdb_stop): Call target_stop_wrapper.
- (x_event): Add fencepost and optimize load cancel check.
- (gdbtk_start_timer): Set up structs only once.
- (gdbtk_stop_timer): Just use preset structs to set timer parameters.
- (gdb_loadfile): If file cannot be loaded, return error message.
- (gdb_loadfile): Add space before tab so that lines without
- a '-' can later be changed to have one.
-
-Wed Mar 25 14:08:51 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * gdbtk.c (gdbtk_pre_add_symbol): Use Tcl_merge to form Tcl commands.
-
-Mon Mar 23 13:41:39 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * gdbtk.c (gdb_get_mem): Rewrite to fetch entire contents
- of the memory window at once.
-
-Sat Mar 21 19:34:49 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- Merged changes from Foundry: list follows by author:
-
- - Tom Tromey <tromey@cygnus.com>
-
- * Makefile.in (gdbres.o): New target.
- (WINDRES): New define.
- * configure: Rebuilt.
- * configure.in (WINDRES): Define.
- (CONFIG_OBS): Include gdbres.o on Windows.
- * gdbtool.ico: New file.
- * gdb.rc: New file.
- * gdbtk.c (gdbtk_init): Call ide_create_messagebox_command.
- (gdbtk_cleanup): Call ide_interface_deregister_all.
- (gdbtk_init): Pass event handle to cleanup.
- (TclDebug): Use Tcl_Merge to construct command.
- (gdbtk_init): Call ide_create_cygwin_path_command.
-
- - Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (gdb_set_bp): Set addr_string for bp.
- (gdb_get_breakpoint_info): Demangle function
- names in breakpoint info.
- Include "demangle.h".
- (gdb_loc, gdb_listfuncs): Demangle C++
- function names.
- (gdb_set_bp): Properly quote filename to fix
- problems with spaces. Send pc back as a hex string.
- (gdb_listfuncs): Remove debugging line.
- Turn off some debugging lines.
- (breakpoint_notify): Return correct line number.
- (gdb_get_breakpoint_info): Return correct line number.
- (gdb_set_bp): New function to provide a better way to
- set breakpoints.
- (gdbtk_readline, gdbtk_readline_begin): Memory
- allocated by tcl needs to be freed by Tcl_Free().
- (find_file_in_dir): Deleted.
- (gdb_find_file_command): Call full_lookup_symtab().
- (gdb_listfuncs): Call full_lookup_symtab().
- (full_lookup_symtab): New function. Like lookup_symtab
- except handles multiple files with the same basename,
- full pathnames, and always sets symtab->fullname.
- (gdb_loadfile): Call full_lookup_symtab(). Clear
- realloc'd memory.
- (gdb_loadfile): Don't tag lines without source.
- Tag source lines with source_tag.
- (gdb_find_file_command, find_file_in_dir):
- Rewrite. Now searches symtabs and psymtabs for a match
- on the partial or full filename. Returns the full pathname.
- (gdb_loadfile): Realloc additional memory
- if someone loads in a file with more than 160,000
- lines. I don't know if this really works because
- I don't have enough memory to test it.
- (gdb_sourcelines): Deleted.
- (gdb_loadfile): New function. Takes a text widget
- and loads it with the contents of a file. Marks
- and tags source lines.
- (pc_changed): New function.
- (get_pc_register): Returns the value of
- the PC to GDB.
- (gdb_loc): If looking on the stack, return
- real pc along with calling source line.
- (gdb_loc): Return "" instead of "N/A" if
- filename is not found.
- (gdb_get_breakpoint_info): Same.
- (get_register): For Natural mode, set format to 0.
- Minor bugfixes from keiths.
- (TclDebug): New function for debugging use.
- (gdb_loc): Return correct PC for frames
- that are not the innermost frame.
- (gdb_listfiles): Rewritten to use object
- API. Now takes an optional dirname which will cause
- only files in that directory or its subdirectories
- to be returned. Now returns basenames instead of
- full pathnames.
- (gdb_cmd): Set/reset load_in_progress flag.
- (call_wrapper): Don't pop up dialog for errors in
- downloads; just abort download.
- (gdbtk_load_hash): Set return value correctly.
-
- - Keith Seitz <keiths@onions.cygnus.com>
-
- * gdbtk.c (gdbtk_init): Define the ui_loop_hook so that it can be
- called by routines which might block, allowing us to update the GUI.
- (gdbtk_wait): Move timer calls to annotation hooks.
- (gdbtk_init): Define the annotation hooks.
- (gdbtk_annotate_starting): New function for cygwin32 hosts.
- (gdbtk_annotate_stopped): New function for cygwin32 hosts.
- (gdbtk_annotate_exited): New function for cygwin32 hosts.
- (gdbtk_annotate_signalled): New function. for cygwin32 hosts.
- (gdbtk_init): Use gdbtk_print_frame_info hook.
- (gdbtk_print_frame_info): New function which sets current_source_symtab
- based on the given symtab and line info.
- (gdb_immediate_command): New function which does
- not buffer any
- output. (Contrast to gdb_cmd.)
- (gdb_prompt_command): New function to return gdb's prompt.
- (find_file_in_dir): New functon which searches source paths
- for a given filename.
- (gdb_find_file): New function which returns path to given file -- uses
- find_file_in_dir.
- (gdbtk_init): Install "gdb_immediate", "gdb_find_file", and
- "gdb_prompt"
- commands into interpreter.
-
- - Ian Lance Taylor <ian@cygnus.com>
-
- * gdbtk.c (gdbtk_timer_going): If __CYGWIN32__, new static
- variable.
- (gdb_cmd): If __CYGWIN32__, if executing the load command, call
- gdbtk_start_timer and gdbtk_stop_timer.
- (call_wrapper): If __CYGWIN32__, if the timer is going, turn it
- off. Clear load_in_progress.
- (x_event): If load_in_progress, quit if download_cancel_ok.
- (gdbtk_start_timer): Set gdbtk_timer_going.
- (gdbtk_stop_timer): Clear gdbtk_timer_going.
- (gdbtk_wait): Call x_event.
- (gdbtk_init): Call ide_create_win_grab_command if
- __CYGIN32__.
- (gdb_clear_file): Clear stop_pc.
-
-Wed Mar 4 16:50:18 1998 Jason Molenda (crash@bugshack.cygnus.com)
-
- * gdbtk.c (gdb_listfiles): Fix thinko in last change.
-
-Wed Mar 4 15:34:49 1998 Jason Molenda (crash@bugshack.cygnus.com)
-
- * gdbtk.c (gdb_listfiles): Allocate space for 'files' dynamically.
-
-Tue Feb 10 17:50:37 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * gdbtk.c (gdbtk_modify_tracepoint): Define new tracepoint modification hook.
- (gdbtk_print_frame_info): Define this hook so that current_source_symtab
- is set properly.
- (gdb_actions_command): Use free_actions () from tracepoint.c/h.
-
-Mon Jan 26 11:37:55 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * gdbtk.c (gdb_actions_command): Make note of next action
- before freeing all references to it.
-
-Sat Jan 24 23:52:08 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c: Merge from Foundry branch.
- (TclDebug): New debugging function.
- (gdb_loc): For frames, find address of calling function
- instead of whatever is on the stack (usually the next
- instruction).
- (gdb_listfiles): Takes an optional pathname argument and
- returns an alphabetized list of basenames of files in the
- path.
-
-Wed Jan 22 10:37:02 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * symfile.c: Define two new hooks for symbol reading:
- "pre_add_symbol_hook" and "post_add_symbol_hook". These hooks
- are called before we begin reading symbols, and after we finish.
- (generic_load): Use new symbol reading hooks and get rid of
- compiler warning.
-
- * gdbtk.c (gdbtk_init): Add hooks for pre- and post-symbol reading.
- (gdbtk_pre_add_symbol): New function: the pre-add-symbol hook.
- (gdbtk_post_add_symbol): New function: the post-add-symbol hook.
- (find_file_in_dir): New function. Moved the guts of gdb_find_file_command
- into here to allow its use by others.
- (gdb_loc): Use find_file_in_dir to return the real path to the file
- (or "N/A" if we can't find it).
-
- * configure.in (TIX_LIB_EXT): Define new variable for those special cases
- when TCL_SHLIB_SUFFIX is not enough to specify the dependency.
-
- * configure: Regenerate.
-
-Fri Jan 23 07:47:06 1998 Fred Fish <fnf@cygnus.com>
-
- * Makefile.in (uninstall): Remove installed gdbtcl dir, if one
- was installed.
-
-Thu Jan 15 12:42:28 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * gdbtk.c (gdb_immediate_command): New function which does not buffer any
- output. (Contrast to gdb_cmd.)
- (gdbtk_init): Install "gdb_immediate" command into interpreter.
-
-Wed Jan 14 16:38:44 1998 Keith Seitz <keiths@pizza.cygnus.com>
-
- * configure.in (--enable-gdbtk): If tcl was built with --enable-shared,
- use TCL_SHLIB_SUFFIX to specify the suffix of the library file so that
- we don't expect to see "libfoo.a" instead of "libfoo.{so,sl, etc}".
-
- * configure: Regenerate.
-
-Wed Dec 31 16:50:26 1998 Keith Seitz (keiths@onions.cygnus.com)
-
- * gdbtk.c (gdb_actions_command): extract and save step count
- from "while-stepping" command
-
diff --git a/gdb/gdbtk/generic/ChangeLog-1999 b/gdb/gdbtk/generic/ChangeLog-1999
deleted file mode 100644
index b5788594070..00000000000
--- a/gdb/gdbtk/generic/ChangeLog-1999
+++ /dev/null
@@ -1,2624 +0,0 @@
-1999-09-23 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * gdbtk-varobj.c (variable_value): Fix small memory leak.
-
-Thu Nov 18 18:19:59 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbtk.c (tk_command), gdbtk-hooks.c (gdbtk_readline),
- gdbtk-variable.c (variable_type): Replace strdup with xstrdup.
-
-Thu Nov 18 19:03:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbtk-cmds.c (gdb_get_mem): Document nbr parameter. Fix check
- on nbr and nbytes parameters.
-
-1999-11-18 Tom Tromey <tromey@cygnus.com>
-
- * gdbtk-cmds.c (gdb_actions_command): Updated for new
- get_tracepoint_by_number.
-
-Tue Nov 9 15:40:51 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbtk-cmds.c (gdb_get_mem): Keep calling
- target_read_memory_partial until all the data is read.
-
-1999-11-01 Tom Tromey <tromey@cygnus.com>
-
- * gdbtk-cmds.c (gdb_actions_command): Updated for new
- get_tracepoint_by_number.
-
-Fri Oct 15 18:34:41 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbtk-hooks.c (ui_load_progress_hook): Move extern declaration
- to defs.h.
- (gdbtk_load_hash): Update SECTION argument to match prototype.
- Make static.
-
-Wed Oct 13 17:57:17 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbtk-hooks.c (gdbtk_flush): Delete.
- (gdbtk_add_hooks): Don't initialize flush_hook.
-
-Mon Oct 11 10:19:04 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbtk-cmds.c (gdb_get_tracepoint_info): Use paddr_nz to convert
- the address into a string.
-
-1999-10-05 James Ingham <jingham@leda.cygnus.com>
-
- * gdbtk-cmds.c (map_arg_registers): Don't stop at the first
- undefined register, but skip it and go on. There may be other
- defined registers higher up in the list.
-
-1999-09-29 Fred Fish <fnf@cygnus.com>
-
- * gdbtk-varobj.c (variable_create): Replace cast "(CORE_ADDR) - 1"
- with the more obviously intended expression "(CORE_ADDR) -1".
-
-1999-09-23 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * gdbtk-variable.c (variable_value): Fix handling of baseclasses and
- correct the behavior when it is not a baseclass (both cases could
- potentially dumping core).
-
-1999-09-23 James Ingham <jingham@leda.cygnus.com>
-
- * gdbtk.c (gdbtk_init): Add the initialization of the shell
- execute command under cygwin.
-
- * gdbtk-hooks.c (gdbtk_attach): New function, run from the attach
- hook.
- (gdbtk_detach): New function, run from the detach hook.
- (gdbtk_add_hooks): Add the attach & detach hooks.
-
-1999-09-23 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * gdbtk-varobj.c (variable_create): Dynamically allocate variable
- object name string.
-
-1999-09-22 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * gdbtk-variable.c (_gdb_variable): Remove unused entry.
- (variable_update): Fix error in list initialization (apparently
- innocuous).
- (type_changeable): Fix handling of typedef'ed structs and
- unions (removing c_variable.exp test case 2.12 FAIL).
-
-Mon Sep 20 18:03:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbtk-variable.c (new_root_variable): Fix prototype declaration.
- * gdbtk.c (_initialize_gdbtk): Add declaration.
- * gdbtk-cmds.c (tracepoint_exists): Make static. Add declaration.
- * gdbtk.c (gdbtk_add_hooks): Move declaration from here.
- * gdbtk.h (gdbtk_add_hooks): To here.
-
-Fri Sep 17 19:00:39 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbtk-cmds.c: Include "source.h".
- (gdb_load_disassembly): Fix printf calls.
- Makefile.in (gdbtk-cmds.o): Add dependency on source.h.
-
- * gdbtk.c: Include <itk.h> for Itk_Init.
-
-1999-09-17 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * gdbtk-varobj.c: New file. It supersedes gdbtk-variable.c and
- uses standard gdb varobj code.
-
-Fri Sep 3 20:16:54 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbtk.c (gdbtk_init): Cast ``host_name'' and ``target_name'' to
- void. While Tcl_SetVar2 treats the value argument as read-only
- its prototype does not specify const for the parameter.
-
-Mon Aug 30 17:56:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbtk.c, gdbtk-hooks.c, gdbtk-cmds.c: #include <unistd.h> moved
- to defs.h.
-
-Mon Aug 30 15:34:42 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbtk-hooks.c (x_event): Missing result to return - return 0.
- Make in_x_event volatile.
- (in_fputs): Make volatile.
-
-1999-09-02 Stan Shebs <shebs@andros.cygnus.com>
-
- * gdbtk.c: Include version.h, remove inconsistent decls of
- host_name and target_name.
-
-1999-08-27 James Ingham <jingham@leda.cygnus.com>
-
- * gdbtk.h: Add def'n for gdbtk_fputs, since it is needed outside
- of gdbtk-hooks.c
-
- * gdbtk-cmds.c (gdb_load_disassembly): Really implement this
- function. Load the source widget from C.
- (gdbtk_load_source): Helper for the above, which loads source lines.
- (gdbtk_load_asm): Helper for the above, which loads assembly
- lines.
- (gdb_restore_fputs): New function, restore the gdbtk_fputs hook,
- in case somebody supressed it, and then errored out before they
- got a chance to put it back.
-
-1999-08-10 James Ingham <jingham@leda.cygnus.com>
-
- * gdbtk-hooks.c: Remove the gdb_disassembly_flavor_hook. Use the
- set_hook instead.
-
-Mon Aug 9 10:28:22 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbtk.c, gdbtk-cmds.c: Delete #if ANSI_PROTOTYPES code, GDB
- assumes ISO-C.
-
-1999-08-06 Tom Tromey <tromey@cygnus.com>
-
- * gdbtk-hooks.c (gdbtk_add_hooks): Set `set_hook'.
- (gdbtk_set_hook): New function.
-
-1999-08-05 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-variable.c (new_variable): Add missing return value.
-
-1999-08-02 James Ingham <jingham@leda.cygnus.com>
-
- * gdbtk-cmds.c: Misc. Cleanups... Mostly wrapping at 80
- characters.
- (gdb_loadfile): Go straight to the widget command to insert the
- text, rather than through the interpreter. Gives about 2x-3x
- speedup in rendering the source text.
- (gdb_disassemble): Rewrite to separate out the generic disassembly
- work from the printing part. The former goes in
- gdb_disassembly_driver. This way I can share the code with the
- version that loads the text widget directly.
- (gdb_load_disassembly): New function. This will load the text
- widget directly (not done yet).
- (gdbtk_load_source): Load the text widget with a source line.
- (gdbtk_load_asm): Load the text widget with an assembly line.
- (gdbtk_print_source): Print a source line to stdout.
- (gdbtk_print_asm): Print an assembly line to stdout.
- (gdb_disassemble_driver): New function.
-
- * gdbtk.h: Fix a compiler warning from Keith's 07-27 checkin.
-
-1999-08-02 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-variable.c (CPLUS_FAKE_CHILD): NULL variables are not
- "fakes", either.
-
-1999-07-27 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-variable.c: Rewrite. :-)
- * gdbtk-wrapper.c (GDB_value_ind): New function.
- (GDB_value_slice): New function.
- (GDB_value_coerce_array): New function.
- (GDB_value_struct_elt): New function.
- (GDB_value_cast): New function.
- (GDB_get_frame_block): New function.
- (wrap_value_slice): New function.
- (wrap_value_coerce_array): New function.
- (wrap_value_struct_elt): New function.
- (wrap_value_cast): New function.
- (wrap_get_frame_block): New function.
- * gdbtk-wrapper.h: Add declarations for above new functions.
- * gdbtk-cmds.c (gdb_selected_block): New function.
- (gdb_get_blocks): New function.
- (gdb_block_vars): New function.
-
-1999-07-16 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-cmds.c (gdb_loc): Change all references of "stop_pc" to
- "read_pc ()".
-
- * gdbtk.c (target_is_native): New function.
- (target_should_use_timer): Use target_is_native to determine whether
- the timer should run.
- * gdbtk.h (target_is_native): Add prototype.
- * gdbtk-cmds.c (gdb_disassemble): Use target_is_native to determine if
- we should disassemble from inferior memory.
-
-1999-07-09 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * gdbtk-variable.c (variable_obj_command): Add missing comments
- for object variable commands.
-
-Fri Jul 9 12:06:36 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbtk-cmds.c (Gdbtk_Init): Explicitly route log/debug and target
- output to stderr instead of stdout.
-
-1999-06-21 James Ingham <jingham@leda.cygnus.com>
-
- * gdbtk.c (target_should_use_timer): Add check for "linuxthreads"
- to enable the timer for Linux as well as other natives.
-
-1999-06-15 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-hooks.c (gdbtk_annotate_signal): Run
- gdbtk_stop_idle_callback so that signals don't interfere
- with the stop button.
-
-1999-06-10 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Add host_name and target_name to
- GDBStartup.
-
- * gdbtk-cmds.c (gdb_clear_file): Delete breakpoints and
- clear the exec file, too.
- (gdb_loadfile): Don't close a file that's not opened until
- later.
-
-Wed Jun 9 14:21:40 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbtk-cmds.c (old_regs): Change array to a pointer.
- (setup_architecture_data): New function.
- (Gdbtk_Init): Call setup_architecture_data. Register ``old_regs''
- as an architecture dependant variable.
-
-1999-05-25 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-wrapper.c (GDB_val_print): Fix compiler warnings.
- (wrap_val_print): Ditto.
- (GDB_block_for_pc): Ditto.
- (wrap_block_for_pc): Ditto.
- (GDB_find_frame_addr_in_frame_chain): Ditto.
- (wrap_find_frame_addr_in_frame_chain): Ditto.
-
- * gdbtk-variable.c (variable_create): Rename "-pc" option
- to the more explicit name "-frame". Update usage.
- (create_variable): Swallow errors before parse_exp_1, too.
- If no frame is given as an argument, use the current frame;
- otherwise, use the current block in the specified frame.
- (variable_children): Check for errors creating children.
- (create_child): Ditto.
-
- * gdbtk-cmds.c (get_selected_frame): New function.
- (Gdbtk_Init): Add get_selected_frame to interpreter.
- (gdb_get_vars_command): Use current block in selected frame
- if no args specified.
-
- * Makefile.in (gdbtk-cmds.o): Depend on frame.h, too
-
-Tue May 25 16:12:57 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbtk-cmds.c (REGISTER_CONVERTIBLE,
- REGISTER_CONVERT_TO_VIRTUAL): Delete default definitions.
- gdbarch.h ensures that there is always a definition available.
-
-1999-05-20 Andrew Cagney <cagney@b1.cygnus.com>
-
- Mon Apr 26 09:15:27 1999 Andrew Cagney <cagney@b1.cygnus.com>:
- * gdbtk.c (x_event_wrapper): Wrapper for x_event that matches
- signal function signature.
- (gdbtk_start_timer): set .sa_handler to x_event_wrapper instead of
- x_event.
-
-1999-05-14 Keith Seitz <keiths@cygnus.com>
-
- * configure.in (ENABLE_GDBTK): Don't clobber WIN32LIBS.
- * configure: Regenerated.
-
-1999-04-12 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-variable.c (variable_value_changed): Swallow errors from
- evaluate_expression.
-
-1999-04-09 James Ingham <jingham@cygnus.com>
-
- * gdbtk-cmds.c (gdb_get_mem): Use the Tcl list API to add the
- ASCII entry to the return list. We were trying to do the quoting
- by hand which is bound to lose in some cases.
-
-1999-04-06 Martin Hunt <hunt@cygnus.com>
-
- * gdbtk-hooks.c (gdbtk_annotate_signal): New function.
- Notifies GDBtk when a signal occurs.
-
-1999-04-02 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-hooks.c (gdbtk_force_detach): New global.
- (x_event): Change to return gdbtk_force_detach so that
- callers will know if we want to detach. See comments.
- (gdbtk_wait): Insert calls to gdbtk_start/stop_timer. This
- is a nop for most hosts/targets. Remove ice-specific code.
-
- * gdbtk-cmds.c (gdb_stop): Add "detach" option, which forces
- gdb to detach from the target. See comments.
-
- * gdbtk.c (target_should_use_timer): New function.
- (gdbtk_start_timer): Only use on unix native targets.
- (gdbtk_stop_timer): Ditto.
-
- * gdbtk.h (x_event): Update declaration: now returns an int.
-
-1999-03-29 Stan Shebs <shebs@andros.cygnus.com>
-
- * gdbtk.c, gdbtk-cmds.c, gdbtk-hooks.c: Don't include setjmp.h.
-
-1999-03-29 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-cmds.c (pc_function_name): New function which returns the
- source name (regardless of mangling) of the function at a given PC.
- (gdb_get_function_command): Use it.
- (gdb_get_tracepoint_info): Ditto.
- (gdb_loc): Ditto.
- (gdb_get_breakpoint_info): Ditto.
-
- * Makefile.in (install-only): Don't install help/index.toc: it doesn't
- exist anymore.
-
-Wed Mar 10 19:37:23 1999 Geoffrey Noer <noer@cygnus.com>
-
- * gdbtk-cmds.c: Don't need to include any Win32 API headers.
- * gdbtk-hooks.c: Include Windows.h, not just winuser.h.
- * gdbtk.c: Ditto.
-
-1999-03-04 Martin Hunt <hunt@cygnus.com>
-
- * gdbtk-hooks.c (gdbtk_load_hash): Change download_hash()
- to Download::download_hash().
-
-1999-03-01 Martin Hunt <hunt@cygnus.com>
-
- * gdbtk.c (TclDebug): Increase buffer size to 10000, in case
- backtraces are very long.
-
-1999-02-26 James Ingham <jingham@cygnus.com>
-
- * gdbtk-cmds.c (gdb_search): Add a -filename switch, which returns
- the file in which the function or type was defined, along with the
- function...
-
- * gdbtk.c (gdbtk_find_main): The external editor stuff was getting
- set twice...
-
-1999-02-18 Martin Hunt <hunt@cygnus.com>
-
- * gdbtk-cmds.c (gdb_disassemble): When debugging native threads,
- set disassemble_from_exec to 0. This fixes bugs where disassembly
- of threaded programs failed.
-
-1999-02-16 James Ingham <jingham@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Remove redundant setting of the external
- editor variables.
-
-1999-02-11 Martin Hunt <hunt@cygnus.com>
-
- * gdbtk-variable.c (variable_format): Enable binary format.
-
-1999-02-11 Martin Hunt <hunt@cygnus.com>
-
- * gdbtk-hooks.c: Change ALL Tcl_Eval calls in hooks to
- call report_error() if there are errors.
-
-1999-02-11 Martin Hunt <hunt@cygnus.com>
-
- * gdbtk.c, gdbtk-cmds.c, gdbtk-hooks.c: Removed old IDE stuff.
-
-1999-02-09 Martin Hunt <hunt@cygnus.com>
-
- * gdbtk-hooks.c: Remove gdbtk_ignorable_warning prototype.
- It is in gdbtk.h.
- (report_error): New function. Displays debugging information
- if a hook function fails. All hook functions should probably
- call this.
- (gdbtk_warning): Call report_error() if there is a problem.
- (gdbtk_register_changed): Call report_error() if there is a problem.
- (gdbtk_memory_changed): Call report_error() if there is a problem.
- (gdbtk_ignorable_warning): Pass along class argument. If there
- is a problem, call report_error().
-
- * gdbtk-cmds.c: Remove TclDebug prototype. It is in gdbtk.h.
- (gdb_loadfile): Add class name to gdbtk_ignorable_warning call.
-
- * gdbtk.c (TclDebug): Add "priority" argument. Calls "dbug"
- instead of "debug". Removed non-ANSI ifdefs.
-
- * gdbtk.h: Fixed protos for gdbtk_ignorable_warning and TclDebug.
-
-1999-02-05 James Ingham <jingham@cygnus.com>
-
- * Makefile.in: Add GDBTK_CFLAGS - this is now used to hold
- -fwritable-strings when compiling with Tk8.1.
- * configure.in: Add GDBTK_CFLAGS, set it to -fwritable-strings for
- Tcl/Tk8.1 & greater.
- * acinclude.m4: Move the rest of the defines to find Itcl, Itk &
- Tix from aclocal.m4 to here.
- * aclocal.m4: regenerate.
- * configure: regenerate.
-
- * gdbtk-hooks.c (x_event): Tcl_ObjGetVar2 was removed from
- Tcl8.1. Use Tcl_GetVar2 instead.
- * gdbtk-hooks.c (gdbtk_trace_find): Fix up call to
- Tcl_GlobalEvalObj for Tcl/Tk 8.1.
- * gdbtk-hooks.c (gdbtk_trace_start_stop): Call to Tcl_EvalObj was
- inefficient, replace with call to Tcl_GlobalEval.
- * gdbtk.c: Don't swap out the Tcl_Alloc calls in gdbtk.c. We took
- care of that in Tcl itself for 8.1.
- * gdbtk.c: Remove const from the script string since Tcl8.1 has
- taken to scribbling sentinals into strings passed to it again...
-
- * gdbtk-cmds.c (wrapped_call): Change declaration of 1st arg from
- char * to PTR to eliminate warning.
- * gdbtk-cmds.c (perror_with_name_wrapper): Ditto
-
-Thu Feb 4 10:35:28 1999 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-variable.c (variable_create): Allocate enough
- space to hold the NULL, too!
-
-Wed Feb 3 13:37:07 1999 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-variable.c (variable_create): Add parentheses to the name
- so that casts do not confuse the expression parser.
-
-1999-02-03 Keith Seitz <keiths@cygnus.com>
-
- * gdbtool.ico: Add missing desktop image.
-
-1999-02-02 Martin Hunt <hunt@cygnus.com>
-
- * gdbtk-cmds.c (get_register): For RAW display, concat all the
- pieces together before calling fputs.
-
-1999-02-01 Martin Hunt <hunt@cygnus.com>
-
- * gdbtk-cmds.c: (gdb_set_bp): Change the "type" argument
- to be ASCII instead of an integer. Currently accepts "temp"
- or "normal". Fixed error messages.
- (gdb_set_bp_addr): Ditto.
-
-1999-01-29 James Ingham <jingham@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Set the fputs_unfiltered_hook to
- gdbtk_fputs BEFORE you eval script. The old code was setting it
- to null until after you did this, but that is wrong, because it
- will cause the output of CAUGHT errors to go to gdb_stderr, which
- is wrong. You only want to write errors to the console if the
- eval generates an error.
-
-1999-01-29 Martin Hunt <hunt@cygnus.com>
-
- * gdbtk-cmds.c (gdb_get_breakpoint_info): When printing addresses,
- do not rely on the format string "%lx" -- it does not exist for all
- hosts. Use paddr instead.
- (gdb_loadfile): Increase maximum line size to pass testsuite cases.
-
- * gdbtk-hooks.c (gdbtk_add_hooks): Remove pc_changed_hook and
- add register_changed_hook and memory_changed_hook.
- (gdbtk_register_changed): New function.
- (gdbtk_memory_changed): New function.
-
- * gdbtk.c (gdbtk_init): Create tcl warp_pointer command
- for use with testing.
-
- * gdbtk-cmds.c (gdb_loc): Fix for case where there are only
- minimal symbols. Also make gdb_loc return the shared library
- the location is in, if it is in one.
-
-1999-01-27 James Ingham <jingham@cygnus.com>
-
- * gdbtk-wrapper.c: Missed a couple of places where FILE->GDB_FILE
- in the fputs_unfiltered_hook needed to propagate.
-
-1999-01-27 James Ingham <jingham@cygnus.com>
-
- Merging in changes from gdbtk-980810 - the Itcl3
- gdb branch.
-
- 1999-01-12 Martin Hunt <hunt@cygnus.com>
-
- * gdbtk-cmds.c (gdb_loadfile): Increase maximum line size so
- files with very long lines get numbered correctly.
-
- Thu Jan 7 06:50:32 1999 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-hooks.c (gdbtk_add_hooks): Add the error_begin_hook;
- (gdbtk_error_begin): New function.
- (gdbtk_fputs): If GDBTK_ERROR_ONLY is set, treat output to
- any stream as if it had come from gdb_stderr.
-
- * gdbtk.h: Define GDBTK_SYMBOL_SOURCE_NAME: does the same thing
- as SYMBOL_SOURCE_NAME, except that it NEVER returns a mangled name.
- Define GDBTK_ERROR_ONLY flag for result_ptr.
-
- * gdbtk-cmds.c (gdb_listfuncs): Use SYMBOL_DEMANGLED_NAME to
- get the symbol's fully demangled name (including class and
- args for overloaded funcs), not cplus_demangle.
- (get_frame_name): Use GDBTK_SYMBOL_SOURCE_NAME to get the name
- of the frame level.
-
- * gdbtk-wrapper.c, gdbtk-wrapper.h:
- (GDB_val_print): Allow caller to specify all function args to val_print.
- (wrap_val_print): Ditto.
-
- * gdbtk-variable.c (variable_value): Clear addressprint when getting
- value of C++ reference-type variables
- If we errored because a parent (struct pointer) was junk, output
- an error message indicating so.
- (call_gdb_val_print): Tell val_print to dereference C++ reference
- types.
- (number_of_children): void * also has no children.
- (get_call_output): Clear any error flags that may have been set
- as a result of error_begin.
-
- * utils.c (error_begin_hook): New hook.
- (error_begin): Call error_begin_hook so that the GUI
- gets notified.
-
- * defs.h (error_begin_hook): Declare.
-
- Wed Jan 6 08:43:31 1999 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-wrapper.c, gdbtk-wrapper.h: Add wrappers for parse_exp_1,
- evaluate_type, block_for_pc, block_innermost_frame, reinit_frame_cache,
- and find_frame_addr_in_frame_chain.
-
- * gdbtk-variable.c (variable_create): Check for failure when
- creating variables.
- (create_variable): Use wrapped calls for block_for_pc, parse_exp_1,
- and block_innermost_frame.
- Return NULL if parse_exp_1 fails.
- Attempt to prohibit creating a gdb_variable for type names.
- (variable_value_changed): Use wrapped calls for reinit_frame_cache and
- find_frame_addr_in_frame_chain.
- (variable_type): Use wrapped call for evaluate_type.
- (variable_value): Use wrapped call for parse_exp_1.
- (variable_editable): Use wrapped call for evaluate_type.
-
- Tue Jan 5 11:37:17 1999 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-variable.c: New variable object interface.
- * gdbtk-wrapper.c, gdbtk-wrapper.h: New wrappers for safely calling
- gdb functions without the fear of longjmp'ing.
- * configure.in (CONFIG_OBS): Add gdbtk-wrapper.o and gdbtk-variable.o
- when gdbtk is enabled.
- * configure: Regenerate.
- * Makefile.in: Add gdbtk-wrapper.o and gdbtk-variable.o
- * gdbtk-cmds.c (call_wrapper): Export so that other files can use.
- (Gdbtk_Init): Initialize new variable interface.
- * gdbtk.h: Add declaration for call_wrapper.
-
- Tue Jan 5 11:19:14 1999 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-cmds.c (gdb_loc): Call resolve_sal_pc to before using
- the sal's pc.
-
- * gdbtk.c (gdbtk_init): Add global array GDBStartup to interpreter
- which contains any startup info. Add "inhibit_prefs" (follows -nx)
- so that "-nx" turns preference reading/writing off.
-
- Mon Dec 21 11:11:02 1998 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-cmds.c (get_register): Call get_saved_register instead of
- read_relative_register_raw_bytes to fetch registers.
-
- Thu Dec 17 09:00:56 1998 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-cmds.c (gdb_search): Don't mention C++ RTTI and
- global constructor/destructor symbols.
-
- Thu Nov 12 15:20:15 1998 Jim Ingham <jingham@cygnus.com>
- * More bug fixes merged in from devo.
-
- * gdbtk-cmds.c (gdb_cmd): Added an optional second argument to the
- gdb_cmd, which is from_tty. This is passed to the gdb command
- parser. It is 0 by default, and the console window passes 1.
-
- * gdbtk-cmds.c: moved disassemble_from_exec from gdbtk.c to gdbtk-cmds.c
- with all the other link-var'ed variables
-
- * gdbtk-hooks.c (gdbtk_trace_find): Only run the hook functions if
- we are called from_tty.
-
- * gdbtk-hooks.c (gdbtk_trace_start_stop): Set the trace buttons
- from a trace_start_command callback rather than doing it as a
- special case in gdb_cmd.
-
- * tracepoint.c (tstart_command, tstop_command): Add call to
- trace_start_stop_hook here.
-
- 1998-11-04 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk-cmds.c (gdb_set_bp_addr): For callback, send full
- pathname instead of just basename.
-
- 1998-11-03 Keith Seitz <keiths@cygnus.com>
- * v850ice.c (do_gdb): New function.
- (ice_stepi): Use do_gdb to step properly.
- (ice_nexti): Use do_gdb to step properly.
- (view_source): Correct call to src window's location for new version.
-
- Tue Aug 25 18:13:30 1998 Jim Ingham <jingham@cygnus.com>
-
- * gdbtk.c (gdbtk_init): I hadn't excised ALL the old startup code,
- so it was not working correctly. Now it does.
-
- Fri Aug 21 14:37:40 1998 Jim Ingham <jingham@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Changed the startup code to use
- tcl_findLibrary
-
-
-
-
-on Dec 28 17:44:36 1998 David Taylor <taylor@texas.cygnus.com>
-
-
- The following changes were made by Jim Blandy <jimb@cygnus.com>,
- Edith Epstein <eepstein@cygnus.com>, Elena Zannoni
- <ezannoni@cygnus.com> Stan Shebs <shebs@cygnus.com>, and David
- Taylor <taylor@cygnus.com>, as part of the project to merge in
- changes originally made by HP; HP did not create ChangeLog
- entries.
-
- * gdbtk.c (gdbtk_init): change stderr to gdb_stderr.
-
- * gdbtk-cmds.c
- (get_pc_register): Use paddr_nz, not sprintf's %llx and
- a cast to `long long'. Those aren't portable.
- (gdb_eval): add embedded_offset param to val_print call
- (get_register): add embedded_offset param to val_print call
-
- * gdbtk-hooks.c
- (tk_command_loop): change instream to a FILE.
- (gdbtk_flush): change both the declaration and definition to
- use GDB_FILE rather than FILE.
-
-Mon Dec 21 11:11:02 1998 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-cmds.c (get_register): Call get_saved_register instead of
- read_relative_register_raw_bytes to fetch registers.
-
-Thu Dec 17 09:00:56 1998 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-cmds.c (gdb_search): Don't mention C++ RTTI and
- global constructor/destructor symbols.
-
-Tue Dec 15 10:09:31 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbtk-cmds.c (gdb_disassemble): Fix typo.
-
-Sun Dec 13 09:52:51 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbtk-cmds.c: Update TARGET_PRINT_INSN_INFO, TARGET_PRINT_INSN.
-
-Fri Dec 11 09:52:04 1998 Andrew Cagney <cagney@chook>
-
- * gdbtk-cmds.c: Replace reg_name with REGISTER_NAME.
-
-Mon Dec 14 13:20:50 1998 Jim Ingham <jingham@cygnus.com>
-
- * Makefile.in, configure.in configure - add support for LIBGUI
- outside the IDE context.
-
-Thu Nov 19 13:14:57 1998 Geoffrey Noer <noer@cygnus.com>
-
- * gdbtk-cmds.c: Can't start using new API names yet. Switch back
- to calling cygwin32_ funcs until some time has passed...
- * gdbtk.c: Ditto. Also, include sys/cygwin.h for Cygwin, instead
- of providing own proto.
-
-Fri Nov 13 00:15:08 1998 Geoffrey Noer <noer@cygnus.com>
-
- Changes to account for name change from cygwin32 to cygwin and
- clean up Win32-related ifdefs.
-
- * gdbtk.c: lose "32" from cygwin_ func calls. ifndef for
- checking DISPLAY should be for _WIN32, not WINNT.
- * gdbtk.h: pick GDBTK_PATH_SEP based on _WIN32, not WINNT.
- * gdbtk-cmds.c (gdb_path_conv): lose "32" from cygwin_ func call,
- change ifdef to __CYGWIN32__ instead of WINNT.
- * {gdbtk.c, gdbtk-hooks.c}: __CYGWIN32__ refs drop the "32".
-
-Thu Nov 12 15:20:15 1998 Jim Ingham <jingham@cygnus.com>
-
- * gdbtk-cmds.c (gdb_cmd): Added an optional second argument to the
- gdb_cmd, which is from_tty. This is passed to the gdb command
- parser. It is 0 by default, and the console window passes 1.
-
- * gdbtk-cmds.c: moved disassemble_from_exec from gdbtk.c to gdbtk-cmds.c
- with all the other link-var'ed variables
-
- * gdbtk-hooks.c (gdbtk_trace_find): Only run the hook functions if
- we are called from_tty.
-
- * gdbtk-hooks.c (gdbtk_trace_start_stop): Set the trace buttons
- from a trace_start_command callback rather than doing it as a
- special case in gdb_cmd.
-
- * tracepoint.c (tstart_command, tstop_command): Add call to
- trace_start_stop_hook here.
-
-Wed Nov 4 12:41:42 1998 Jim Ingham <jingham@cygnus.com>
-
- * gdbtk-cmds.c (gdb_set_bp_addr): Pass the type, enable & thread
- to gdbtk_tcl_breakpoint.
- * gdbtk-hooks.c (gdbtk_trace_find): Added this function. It is
- the hook function for tfind commands.
- * tracepoint.c (trace_find_command): Added the trace_find_hook,
- run when you do trace_find_command.
- * tracepoint.h: Define the trace_find_hook.
-
-1998-11-03 Keith Seitz <keiths@cygnus.com>
-
- * v850ice.c (do_gdb): New function.
- (ice_stepi): Use do_gdb to step properly.
- (ice_nexti): Use do_gdb to step properly.
- (view_source): Correct call to src window's location for new version.
-
-Mon Nov 2 11:16:10 1998 Jim Ingham <jingham@cygnus.com>
-
- * gdbtk-cmds (gdb_get_tracepoint_info): Demangle C++ function names.
-
-Fri Oct 30 11:22:23 1998 Jim Ingham <jingham@cygnus.com>
-
- * gdbtk-cmds (gdb_get_tracepoint_info): Fixed typo.
-
-Wed Oct 28 16:19:02 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk-cmds.c (gdb_set_bp_addr): For callback, send full
- pathname instead of just basename.
-
-Wed Oct 28 10:14:33 1998 Jim Ingham <jingham@cygnus.com>
-
- * gdbtk-cmds.c: Made the bdtypes & bpdisp arrays shared so they
- could be used in gdbtk-hooks.c (breakpoint_notify).
- Also fixed a few error messages to actually print the bp number
- rather that #%d...
- * gdbtk-hooks.c (breakpoint_notify): pass more of the information
- about the breakpoint into the Tcl command, so it does not have to
- try and guess about information we have on the C side.
- * gdbtk.h: Export the bptypes & pbdisp arrays.
-
-1998-10-13 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * gdbtk.c, gdbtk-cmds.c: Cast parameters passed to make_cleanup to
- use the new make_cleanup_func typedef.
-
-1998-10-08 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-hooks.c (gdbtk_add_hooks): Install a hook for
- (new) file_changed_hook.
- (gdbtk_exec_file_changed): Rename to gdbtk_exec_file_display
- to mimic hook's name.
- (gdbtk_file_changed): New hook function.
-
-Tue Oct 6 22:57:13 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * configure.in (links): Link gdbtcl2 directory instead of gdbtcl.
-
-Mon Oct 5 00:34:00 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk-cmds.c (gdb_set_bp_addr): New command. Sets a
- breakpoint at an address. Use this instead of gdb_cmd "break"
- because the syntax of the break command is broken and doesn't
- allow you to create a thread-specific BP at an address. Also
- this is faster.
-
-Sun Oct 4 22:35:47 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk-cmds.c (gdb_set_bp): Add an optional thread number.
- (gdb_find_bp_at_line): New function. Returns a list of bpnums
- at the specified line number.
- (gdb_find_bp_at_addr): New function. Returns a list of bpnums
- at an address..
-
-1998-10-02 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-hooks.c (gdbtk_exec_file_changed): New function which handles
- exec_file changes.
- (gdbtk_add_hooks): Define exec_file_display_hook (to gdbtk_exec_file_changed)
-
- * gdbtk-cmds.c (gdb_stop): target_stop is ALWAYS defined, so
- compare against something a little more meaningful (target_ignore).
-
-1998-09-24 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk.c (gdbtk_wait): Don't run the timer for ice targets.
-
- * v850ice.c (WM_ADDR_TO_SYM): New message.
- (v850ice_wndproc): Add handler for WM_SOURCE.
- (v850ice_wait): Call the ui_loop_hook occasionally.
- (ice_cont): Acknowledge message before doing anything.
- (ice_stepi): Ack message and let gdbtk do stepping.
- (ice_nexti): Ack message and let gdbtk do stepping.
- (view_source): New function ICE calls to display source code.
-
-1998-09-18 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-cmds.c (get_frame_name): Demangle function names, too.
-
-Thu Sep 10 22:10:29 1998 Jim Ingham <jingham@cygnus.com>
-
- *gdbtk-cmds.c (gdb_disassemble): Make sure the symtab's linetable is not
- null before trying to use it...
-
-1998-09-02 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-cmds.c (gdb_cmd): Do not run the timer when downloading --
- the ui_progress_hook that has been installed will actually
- update the gui for us.
-
-Mon Aug 31 15:42:10 1998 Tom Tromey <tromey@cygnus.com>
-
- * gdbtk-hooks.c (context_hook): Don't define.
-
-1998-08-31 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-cmds.c (gdb_listfuncs): When stripping out "global destructors"
- and "global constructors", do not append any elements to the result.
-
-Sun Aug 30 00:49:18 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk-cmds.c (Gdbtk_Init): Link C variable gdb_context
- with tcl variable gdb_context_id.
-
- * gdbtk-hooks.c (gdbtk_context_change): Implement new hook called
- context_hook. Called when threads change.
-
- * gdbtk.c: Initialize gdb_context.
-
- * gdbtk.h: Declare gdb_context.
-
- * infrun (wait_for_inferior): Call context_hook.
-
- * thread.c (thread_command): Call context_hook.
-
- * defs.h: Declare context_hook.
-
-Fri Aug 28 12:14:49 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk-cmds.c (gdb_loadfile): Open the file after doing
- the symtab lookup and calling symtab_to_filename(). This
- makes GDBtk work with the GDB "dir" command.
-
-1998-08-18 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-hooks.c (gdbtk_add_hooks): Set selected_frame_level_changed_hook.
- (gdbtk_selected_frame_changed): New function.
-
- * gdbtk-cmds.c (Gdbtk_Init): Add command gdb_stack into interpreter.
- Link gdb's global selected_frame_level with interpreter global
- gdb_selected_frame_level.
- (gdb_stack): New function to faciltate speedier backtraces from
- gdbtk.
- (get_frame_name): New helper function for gdb_stack.
-
-Tue Aug 18 15:42:40 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk-cmds.c (gdb_listfuncs): Strip out global constructors
- and destructors from the function list.
-
-Thu Aug 13 15:09:59 1998 Drew Moseley <dmoseley@cygnus.com>
-
- * gdbtk.c (gdbtk_cleanup): added a scope-level around the contents
- of the #ifdef so that the variable declarations in there would not
- be illegal in a C compilation.
-
-Mon Jul 27 13:07:16 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (gdbtk_call_command): Removed because it is now
- in gdbtk-hooks.c
- (null_routine): Removed.
-
- * gdbtk-hooks.c (tracepoint_notify): Fix sprintf to
- match number of arguments.
-
- * gdbtk-cmds.c (gdb_loc): When calling gdb_loc with an
- argument, call find_pc_line() to get a complete
- symtab_and_line struct.
-
-Fri Jul 24 14:25:43 1998 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk-cmds.c (gdb_search): Add missing NULL to switches.
- Add missing flags to result_ptr.
- Pass along any errors caused by getting the list of files from
- tcl.
- Allocate correct amount of memory for the file list.
- Don't do any unecessary cleanups.
-
-Fri Jul 24 01:08:37 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk-cmds.c (gdb_loadfile): When there are no
- linenumbers, use only one tab.
-
-Sat Jul 18 12:28:39 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (gdbtk_cleanup): Add call to tcl function
- gdbtk_cleanup. We need this so the GUI gets to clean
- up no matter how GDB exits.
-
-Wed Jul 1 13:10:58 1998 Jim Ingham <jingham@cygnus.com>
-
- * Moved gdbtk_hooks.c & gdbtk_cmds.c to gdbtk-hooks.c &
- gdbtk-cmds.c to comply with the gdb conventions. Changed the
- configure & makefile to reflect the change...
-
-Wed Jul 1 11:07:21 1998 Jim Ingham <jingham@cygnus.com>
-
- * gdbtk.c: removed all the commands and hooks from this file so
- now it contains only the startup code.
- * gdbtk.c (gdbtk_init): Fixed a bug in the startup code on Windows
- that caused gdbtk not to find the share directory unless
- GDBTK_LIBRARY was set.
- * gdbtk_cmds.c: New file - this contains all the Tcl commands that
- gdb defines. All the old commands were moved here, the
- string-based commands were converted to object commands, and the
- object-based commands were all converted to uniformly use the
- call_wrapper. A new function, Gdbtk_Init was added to centralize
- initializing the gdb package.
- * gdbtk_hooks.c: New file - All the hooks were moved here, and a new
- function, gdbtk_add_hooks was added to centralize adding all these
- hook functions. gdbtk_fputs was also modified to handle the new
- result_ptr structure. See the comments in gdbtk.h for more
- details.
- * gdbtk.h: New file - this contains all the defines and globals
- shared by gdbtk.c, gdbtk_cmds.c & gdbtk_hooks.c
- * Makefile.in, configure.in & configure: mutatis mutandi for the
- new files.
-
-
-Mon Jun 29 11:49:17 1998 Keith Seitz <keiths@cygnus.com>
-
- * main.c (main): Don't include gdbtk test code if GDBTK is
- not defined by configure.
-
- * configure.in: When enabling gdbtk, add "-DGDBTK" to ENABLE_CFLAGS.
-
- * configure: Regenerate.
-
-Fri Jun 26 13:56:07 1998 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk.c: Change all references to static global "interp" to
- "gdbtk_interp" and export this global.
- (gdbtk_init): If gdbtk_source_filename is not NULL, source this file
- into the interpreter when it goes idle.
- Add new command "gdb_search".
- (gdb_search): New function which searches the symbol table.
- (gdbtk_test): New function called by main when the --tclcommand
- option is used.
-
- * main.c (main): Add a new option "--tclcommand" which is used
- by the testsuite to source a file into the interpreter when it
- goes idle.
-
-Sun Jun 21 09:31:12 1998 Ron Unrau (runrau@cygnus.com)
-
- * gdbtk.c (gdb_set_bp): Use new interface.
-
-Wed Jun 17 19:12:23 1998 Jeff Holcomb <jeffh@cygnus.com>
-
- * Makefile.in (install-only): Install tracing help files.
-
-Mon Jun 15 13:18:21 1998 Jim Ingham <jingham@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Add elements to the auto_path AS LIST
- ELEMENTS. This allows gdbtk to work when installed in a directory
- which has a space in the path. D. Moseley pointed out the bug.
-
-
-Tue Jun 9 14:10:46 1998 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk.c (gdb_get_vars_command): Return static variables and
- variables stored in registers.
-
- * main.c (main): Call pre/post_add_symbol_hook's when loading
- executables and symbol files.
-
-Fri Jun 5 00:16:22 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Change all references to
- GDBTK_IDE to IDE_ENABLED.
-
-Thu Jun 4 18:31:53 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Initialize tkTable.
-
-Thu Jun 4 10:15:03 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * gdbtk.c: merged:
-
- - Elena Zannoni <ezannoni@kwikemart.cygnus.com>
- (call_obj_wrapper): in case of error, copy the
- error message from the result to the error_string.
- (gdbtk_fputs): add comments.
- (gdb_actions_command): call validate_actionline when installing the
- tracepoint, to do the syntax checking of the actions for us.
- - Elena Zannoni <ezannoni@kwikemart.cygnus.com>
- (gdb_get_trace_frame_num): new function to get the
- trace frame number from gdb.
- (gdbtk_init): added new command gdb_get_trace_frame_num.
- - Jim Blandy <jimb@zwingli.cygnus.com>
- (struct wrapped_call_objs): Change the `func' member to
- be a Tcl_ObjCmdProc, not an Tcl_CmdProc, since it accepts a vector
- of objects as arguments. Change the object vector to be const,
- since that's what all the users of this structure seem to expect.
- (call_obj_wrapper): Cast clientData properly before storing it in
- the wrapped_args structure.
-
-Thu May 28 17:19:14 1998 Keith Seitz <keiths@cygnus.com>
-
- * gdbtk.c (_initialize_gdbtk): Get rid of the console. Patch from
- Chris Faylor (cgf@cygnus.com).
-
- * configure.in: Link cygwin32 with subsystem console.
-
- * configure: Regenerated
-
-Sun May 24 14:00:24 1998 Keith Seitz <keiths@cygnus.com>
-
- * ser-unix.c (wait_for): Do not reset timeout_remaining for cygwin32 so that
- we can use this member to track real timeouts.
- (hardwire_readchar): Modify for cygwin32 so that we only ever use a real
- system timeout of one second. Track the "real" timeout as a series of these
- one second timeouts.
- Call ui_loop_hook to keep the gui alive.
-
- * top.c: Define new hook for cygwin32, "ui_loop_hook".
-
- * gdbtk.c (gdbtk_init): Add ui_loop_hook for CygWin32 to work around
- update problems.
-
-Thu May 21 13:56:24 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * gdbtk.c: reinserted the changes that were accidentally deleted:
- (_initialize_gdbtk): Use correct device names in
- cygwin-specific call (cosmetic change).
- (gdbtk_ignorable_warning): removed va_list parameter,
- which was unused.
- (_initialize_gdbtk): add cygwin32 specific code to
- allow `gdb -nw' to work when specified specified from a windows
- console-mode command line.
-
-1998-05-19 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * gdbtk.c (struct wrapped_call_objs): Change the `func' member to
- be a Tcl_ObjCmdProc, not an Tcl_CmdProc, since it accepts a vector
- of objects as arguments. Change the object vector to be const,
- since that's what all the users of this structure seem to expect.
- (call_obj_wrapper): Cast clientData properly before storing it in
- the wrapped_args structure.
-
-Wed May 13 11:12:58 1998 James Ingham <jingham@leda.cygnus.com>
-
- * gdbtk.c: Fixed a goof in the definition of the gdb_get_args &
- gdb_get_locals Tcl commands. Moved the previous ChangeLog entry
- from ChangeLog to ChangeLog-gdbtk (here)...
-
-Tue May 12 13:29:20 1998 Jeff Holcomb <jeffh@cygnus.com>
-
- * Makefile.in (install-only): Add images/icons.txt and
- images2/icons.txt to files that need to be installed.
-
-Tue May 12 12:03:16 1998 James Ingham <jingham@leda.cygnus.com>
-
- * gdbtk.c: Add an object call wrapper for the new Tcl_Obj based
- commands. This way the obj commands will also go through
- catch_errors. This is just a bandaid while I rewrite the
- string-based commands to use the object format.
-
-Tue May 5 09:30:25 1998 Christopher Faylor <cgf@cygnus.com>
-
- * gdbtk.c (_initialize_gdbtk): Use correct device names in
- cygwin-specific call (cosmetic change).
-
-Wed Apr 29 15:53:16 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * gdbtk.c (gdbtk_ignorable_warning): removed va_list parameter,
- which was unused.
-
-Tue Apr 28 19:41:33 1998 Tom Tromey <tromey@cygnus.com>
-
- * Makefile.in (GDBTKLIBS): New macro.
- (INSTALLED_LIBS): Include GDBTKLIBS.
- (CLIBS): Likewise.
- * configure: Rebuilt.
- * configure.in: Put Tcl/Tk libs into GDBTKLIBS, not LIBS.
- (GDBTKLIBS): AC_SUBST.
-
-Thu Apr 23 19:01:05 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * Makefile.in (install-only): Install help files.
-
-Wed Apr 22 21:17:35 1998 Christopher Faylor <cgf@cygnus.com>
-
- * gdbtk.c (_initialize_gdbtk): add cygwin32 specific code to
- allow `gdb -nw' to work when specified specified from a windows
- console-mode command line.
-
-Wed Apr 15 11:23:53 1998 Stan Shebs <shebs@andros.cygnus.com>
-
- * gdbtcl: Remove directory and contents, this version of
- the interface is obsolete.
-
-Mon Apr 13 16:17:52 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (gdb_loadfile): Change fstat() call to stat().
- Needed because you can't convert a FILE* to an fd.
-
-Mon Apr 13 16:28:07 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * gdbtk.c: (perror_with_name_wrapper) new function to call
- perror_with_name safely.
- (gdb_loadfile) added source vs. executable time stamp check.
- (gdbtk_warning) new function to pass a warning message to the gui.
- (gdbtk_ignorable_warning) new function to pass a warning
- to the gui. Used only for the src. vs. exec check.
- (gdbtk_init) added warning_hook
- added include <sys/stat.h>
-
-Mon Apr 13 12:58:26 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * gdbtk.c (gdbtk_start_timer): Include on all platforms. Decrease
- timer interval a little.
- (gdbtk_stop_timer): Include on all platforms.
- (gdbtk_wait): No more signals! Use a timer on all platforms to keep the
- GUI alive.
- (gdbtk_init): Remove FIOASYNC and all x_fd references. Now using timers
- on all platforms.
-
-Fri Apr 10 15:48:10 1998 Jason Molenda (crash@bugshack.cygnus.com)
-
- * gdbtk.c (gdb_listfiles): Allocate space for 'files' dynamically.
-
-Thu Apr 9 14:20:59 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Remove redundant variable "IDE".
-
-Tue Apr 7 15:13:58 1998 Stan Shebs <shebs@andros.cygnus.com>
-
- * gdbtk.tcl: Remove, no longer used.
-
-Tue Apr 7 12:49:45 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * gdbtk.c (gdb_cmd): NEVER call the busy, update, and idle hooks.
-
-Tue Mar 31 15:42:06 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * gdbtk.c (gdb_loadfile): Don't use the return result from
- sprintf, which returns a char * under SunOS4.
-
-Tue Mar 31 17:18:43 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Add $(LIBIDETCL) as well as $(LIBIDE) if
- --enable-ide.
- * Makefile.in (IDE_CFLAGS_X): Add -I for libidetcl/src.
- (LIBIDETCL): Define.
- * configure: Rebuild.
-
-Sun Mar 29 21:19:46 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * gdbtk.c (gdb_get_tracepoint_info): Change formatting of address.
- (tracepoint_exists): Remove code which confuses assembly traces.
-
-Sat Mar 28 12:13:23 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * gdbtk.c (gdb_cmd): If argc > 2, assume that the busy and idle hooks
- should not be called.
-
-Thu Mar 26 22:29:28 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * gdbtk.c: (gdb_trace_status) new function.
- (gdbtk_init) added command "gdb_is_tracing".
- (tracepoint_notify) added passcount information.
-
-Thu Mar 26 12:00:35 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (gdbtk_fputs): Insert fencepost.
- (gdb_loc): Correct pc calculation.
- (gdb_immediate_command): Return if a load is in progress.
- (gdb_cmd): Return if a load is in progress.
- (target_stop_wrapper): New function.
- (gdb_stop): Call target_stop_wrapper.
- (x_event): Add fencepost and optimize load cancel check.
- (gdbtk_start_timer): Set up structs only once.
- (gdbtk_stop_timer): Just use preset structs to set timer parameters.
- (gdb_loadfile): If file cannot be loaded, return error message.
- (gdb_loadfile): Add space before tab so that lines without
- a '-' can later be changed to have one.
-
-Wed Mar 25 14:08:51 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * gdbtk.c (gdbtk_pre_add_symbol): Use Tcl_merge to form Tcl commands.
-
-Mon Mar 23 13:41:39 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * gdbtk.c (gdb_get_mem): Rewrite to fetch entire contents
- of the memory window at once.
-
-Sat Mar 21 19:34:49 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- Merged changes from Foundry: list follows by author:
-
- - Tom Tromey <tromey@cygnus.com>
-
- * Makefile.in (gdbres.o): New target.
- (WINDRES): New define.
- * configure: Rebuilt.
- * configure.in (WINDRES): Define.
- (CONFIG_OBS): Include gdbres.o on Windows.
- * gdbtool.ico: New file.
- * gdb.rc: New file.
- * gdbtk.c (gdbtk_init): Call ide_create_messagebox_command.
- (gdbtk_cleanup): Call ide_interface_deregister_all.
- (gdbtk_init): Pass event handle to cleanup.
- (TclDebug): Use Tcl_Merge to construct command.
- (gdbtk_init): Call ide_create_cygwin_path_command.
-
- - Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (gdb_set_bp): Set addr_string for bp.
- (gdb_get_breakpoint_info): Demangle function
- names in breakpoint info.
- Include "demangle.h".
- (gdb_loc, gdb_listfuncs): Demangle C++
- function names.
- (gdb_set_bp): Properly quote filename to fix
- problems with spaces. Send pc back as a hex string.
- (gdb_listfuncs): Remove debugging line.
- Turn off some debugging lines.
- (breakpoint_notify): Return correct line number.
- (gdb_get_breakpoint_info): Return correct line number.
- (gdb_set_bp): New function to provide a better way to
- set breakpoints.
- (gdbtk_readline, gdbtk_readline_begin): Memory
- allocated by tcl needs to be freed by Tcl_Free().
- (find_file_in_dir): Deleted.
- (gdb_find_file_command): Call full_lookup_symtab().
- (gdb_listfuncs): Call full_lookup_symtab().
- (full_lookup_symtab): New function. Like lookup_symtab
- except handles multiple files with the same basename,
- full pathnames, and always sets symtab->fullname.
- (gdb_loadfile): Call full_lookup_symtab(). Clear
- realloc'd memory.
- (gdb_loadfile): Don't tag lines without source.
- Tag source lines with source_tag.
- (gdb_find_file_command, find_file_in_dir):
- Rewrite. Now searches symtabs and psymtabs for a match
- on the partial or full filename. Returns the full pathname.
- (gdb_loadfile): Realloc additional memory
- if someone loads in a file with more than 160,000
- lines. I don't know if this really works because
- I don't have enough memory to test it.
- (gdb_sourcelines): Deleted.
- (gdb_loadfile): New function. Takes a text widget
- and loads it with the contents of a file. Marks
- and tags source lines.
- (pc_changed): New function.
- (get_pc_register): Returns the value of
- the PC to GDB.
- (gdb_loc): If looking on the stack, return
- real pc along with calling source line.
- (gdb_loc): Return "" instead of "N/A" if
- filename is not found.
- (gdb_get_breakpoint_info): Same.
- (get_register): For Natural mode, set format to 0.
- Minor bugfixes from keiths.
- (TclDebug): New function for debugging use.
- (gdb_loc): Return correct PC for frames
- that are not the innermost frame.
- (gdb_listfiles): Rewritten to use object
- API. Now takes an optional dirname which will cause
- only files in that directory or its subdirectories
- to be returned. Now returns basenames instead of
- full pathnames.
- (gdb_cmd): Set/reset load_in_progress flag.
- (call_wrapper): Don't pop up dialog for errors in
- downloads; just abort download.
- (gdbtk_load_hash): Set return value correctly.
-
- - Keith Seitz <keiths@onions.cygnus.com>
-
- * gdbtk.c (gdbtk_init): Define the ui_loop_hook so that it can be
- called by routines which might block, allowing us to update the GUI.
- (gdbtk_wait): Move timer calls to annotation hooks.
- (gdbtk_init): Define the annotation hooks.
- (gdbtk_annotate_starting): New function for cygwin32 hosts.
- (gdbtk_annotate_stopped): New function for cygwin32 hosts.
- (gdbtk_annotate_exited): New function for cygwin32 hosts.
- (gdbtk_annotate_signalled): New function. for cygwin32 hosts.
- (gdbtk_init): Use gdbtk_print_frame_info hook.
- (gdbtk_print_frame_info): New function which sets current_source_symtab
- based on the given symtab and line info.
- (gdb_immediate_command): New function which does
- not buffer any
- output. (Contrast to gdb_cmd.)
- (gdb_prompt_command): New function to return gdb's prompt.
- (find_file_in_dir): New functon which searches source paths
- for a given filename.
- (gdb_find_file): New function which returns path to given file -- uses
- find_file_in_dir.
- (gdbtk_init): Install "gdb_immediate", "gdb_find_file", and
- "gdb_prompt"
- commands into interpreter.
-
- - Ian Lance Taylor <ian@cygnus.com>
-
- * gdbtk.c (gdbtk_timer_going): If __CYGWIN32__, new static
- variable.
- (gdb_cmd): If __CYGWIN32__, if executing the load command, call
- gdbtk_start_timer and gdbtk_stop_timer.
- (call_wrapper): If __CYGWIN32__, if the timer is going, turn it
- off. Clear load_in_progress.
- (x_event): If load_in_progress, quit if download_cancel_ok.
- (gdbtk_start_timer): Set gdbtk_timer_going.
- (gdbtk_stop_timer): Clear gdbtk_timer_going.
- (gdbtk_wait): Call x_event.
- (gdbtk_init): Call ide_create_win_grab_command if
- __CYGIN32__.
- (gdb_clear_file): Clear stop_pc.
-
-Wed Mar 4 16:50:18 1998 Jason Molenda (crash@bugshack.cygnus.com)
-
- * gdbtk.c (gdb_listfiles): Fix thinko in last change.
-
-Wed Mar 4 15:34:49 1998 Jason Molenda (crash@bugshack.cygnus.com)
-
- * gdbtk.c (gdb_listfiles): Allocate space for 'files' dynamically.
-
-Tue Feb 10 17:50:37 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * gdbtk.c (gdbtk_modify_tracepoint): Define new tracepoint modification hook.
- (gdbtk_print_frame_info): Define this hook so that current_source_symtab
- is set properly.
- (gdb_actions_command): Use free_actions () from tracepoint.c/h.
-
-Mon Jan 26 11:37:55 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * gdbtk.c (gdb_actions_command): Make note of next action
- before freeing all references to it.
-
-Sat Jan 24 23:52:08 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c: Merge from Foundry branch.
- (TclDebug): New debugging function.
- (gdb_loc): For frames, find address of calling function
- instead of whatever is on the stack (usually the next
- instruction).
- (gdb_listfiles): Takes an optional pathname argument and
- returns an alphabetized list of basenames of files in the
- path.
-
-Wed Jan 22 10:37:02 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * symfile.c: Define two new hooks for symbol reading:
- "pre_add_symbol_hook" and "post_add_symbol_hook". These hooks
- are called before we begin reading symbols, and after we finish.
- (generic_load): Use new symbol reading hooks and get rid of
- compiler warning.
-
- * gdbtk.c (gdbtk_init): Add hooks for pre- and post-symbol reading.
- (gdbtk_pre_add_symbol): New function: the pre-add-symbol hook.
- (gdbtk_post_add_symbol): New function: the post-add-symbol hook.
- (find_file_in_dir): New function. Moved the guts of gdb_find_file_command
- into here to allow its use by others.
- (gdb_loc): Use find_file_in_dir to return the real path to the file
- (or "N/A" if we can't find it).
-
- * configure.in (TIX_LIB_EXT): Define new variable for those special cases
- when TCL_SHLIB_SUFFIX is not enough to specify the dependency.
-
- * configure: Regenerate.
-
-Fri Jan 23 07:47:06 1998 Fred Fish <fnf@cygnus.com>
-
- * Makefile.in (uninstall): Remove installed gdbtcl dir, if one
- was installed.
-
-Thu Jan 15 12:42:28 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * gdbtk.c (gdb_immediate_command): New function which does not buffer any
- output. (Contrast to gdb_cmd.)
- (gdbtk_init): Install "gdb_immediate" command into interpreter.
-
-Wed Jan 14 16:38:44 1998 Keith Seitz <keiths@pizza.cygnus.com>
-
- * configure.in (--enable-gdbtk): If tcl was built with --enable-shared,
- use TCL_SHLIB_SUFFIX to specify the suffix of the library file so that
- we don't expect to see "libfoo.a" instead of "libfoo.{so,sl, etc}".
-
- * configure: Regenerate.
-
-Wed Dec 31 16:50:26 1998 Keith Seitz (keiths@onions.cygnus.com)
-
- * gdbtk.c (gdb_actions_command): extract and save step count
- from "while-stepping" command
-
-Tue Dec 16 21:16:42 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (LIBGUI): New variable.
- (GUI_CFLAGS_X): New variable.
- (IDE_CFLAGS): Add $(GUI_CFLAGS_X).
- * configure.in: Add $(LIBGUI) to TCL_LIBS and CONFIG_DEPS.
- * configure: Rebuild.
-
-Wed Dec 10 13:16:45 1997 Keith Seitz <keiths@onions.cygnus.com>
-
- * gdbtk.c (gdb_get_tracepoint_info): Use info in struct
- symtab_and_line (not struct tracepoint) so that we get the
- real line info for an address. Arrange data more like
- gdb_get_breakpoint_info.
- (tracepoint_notify): Use info in struct symtab_and_line again.
- (gdbtk_init): Add command "gdb_get_tracepoint_list" into
- interpreter.
- (gdb_get_tracepoint_list): New function that aids the source
- window in displaying tracepoints when the file changes.
-
-Fri Dec 5 10:31:23 1997 Keith Seitz <keiths@pizza.cygnus.com>
-
- * gdbtk.c (gdbtk_init): Add gdb_find_file into interpreter.
- (gdb_find_file_command): New function which searches source path
- to find the real full filename of a file.
-
-Mon Dec 1 10:19:44 1997 Keith Seitz <keiths@onions.cygnus.com>
-
- * gdbtk.c: Move include of "guitcl.h" back out of IDE ifdef.
- (gdbtk_init): Move ide_initialize_paths out of IDE ifdef.
-
- * configure.in (TCL_LIBS, CONFIG_DEPS): Add IDE libraries for all
- builds.
- (CONFIG_OBS): Remove tracepoint.o, which should always be included.
-
- * configure: regenerate
-
- * Makefile.in (install-only): ALWAYS install the new gdbtk
- (REMOTE_OBS): add tracepoint.o
-
-Thu Nov 27 09:07:18 1997 Michael Meissner <meissner@cygnus.com>
-
- * configure.in ({TCL_LIBS,CONFIG_DEPS}): Don't add IDE libraries
- if not --enable-ide.
- (CONFIG_OBS): Add tracepoint.o to list if --enable-gdbtk.
- * configure: Regenerate.
-
- * gdbtk.c (gdb_get_breakpoint_info): Add missing filename
- argument.
- (toplevel): Move include of guitcl.h into #ifdef IDE region.
- (gdbtk_init): Move ide_initialize_paths call into #ifdef IDE
- section.
-
- * Makefile.in (gdbtk.o): Update dependencies.
-
-Wed Nov 26 15:02:43 1997 Keith Seitz <keiths@onions.cygnus.com>
-
- * gdbtk.c (gdb_loc): symtab_to_filename can return NULL.
- (breakpoint_notify): Ditto.
- (gdb_get_breakpoint_info): Ditto.
-
-Wed Nov 26 11:33:09 1997 Keith Seitz <keiths@onions.cygnus.com>
-
- Merge in code from Foundry branch:
-
- * Makefile.in (install-only): install the new gdbtk, not the old
-
- * gdbtk.c (gdbtk_call_command): also run idle hooks for class_trace
- commands
- (gdbtk_init): Add new commands "gdb_get_locals", "gdb_get_args",
- "gdb_get_function", "gdb_get_line", "gdb_get_file",
- "gdb_tracepoint_exists", "gdb_get_tracepoint_info", "gdb_actions",
- and "gdb_prompt".
- (gdb_get_vars_command): New function.
- (gdb_get_line_command): New.
- (gdb_get_file_command): New.
- (gdb_get_function_command): New.
- (gdb_get_tracepoint_info): New.
- (gdbtk_create_tracepoint): New.
- (gdbtk_delete_tracepoint): New.
- (tracepoint_notify): New.
- (tracepoint_exists): New.
- (gdb_actions_command): New.
- (gdb_tracepoint_exists_command): New.
- (gdb_prompt_command): New.
-
-Thu Nov 13 18:15:54 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * gdbtk.c: Move include of gdbcore.h to top of file.
- (close_bfds): New static function if _WIN32.
- (gdbtk_readline): Call close_bfds.
- (call_wrapper, tk_command_loop): Likewise.
- (gdb_clear_file): New static function.
- (gdbtk_init): Create gdb_clear_file Tcl command.
-
-Wed Nov 12 14:58:39 1997 Jeff Holcomb <jeffh@cygnus.com>
-
- * gdbtk.c: gdbtk_load_hash and ui_load_progress_hook return an
- int result.
- (gdbtk_load_hash): download hash routine returns an int result.
-
-Mon Nov 10 15:11:51 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Call ide_create_shell_execute_command if
- __CYGWIN32__.
- * configure.in: Add -lshell32 to WIN32LIBS on cygwin32.
- * configure: Rebuild.
-
-Sun Nov 9 16:25:34 1997 Tom Tromey <tromey@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Run ide_create_help_command.
-
-Tue Oct 28 17:31:47 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Call ide_create_winprint_command.
-
-Thu Oct 23 15:53:37 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Add -lgdi32 to WIN32LIBS when linking gdbtk on
- cygwin32.
- * configure: Rebuild.
-
-Wed Oct 22 21:32:54 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Create sizebox command on Windows.
-
-Thu Oct 9 14:33:21 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Remove assertion argument from call to
- ide_create_window_register_command.
-
-Wed Oct 1 11:09:52 1997 Tom Tromey <tromey@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Pass name of restore interface to
- ide_create_window_register_command.
-
-Fri Sep 26 21:08:22 1997 Keith Seitz <keiths@pizza.cygnus.com>
-
- * gdbtk.c (gdbtk_init): Initialize ui_load_progress_hook.
-
-Thu Sep 25 03:05:00 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (gdb_load_info): New function. Returns a list
- of section names and sizes for an executable.
- (gdbtk_load_hash): Stub function to call tcl function
- download_hash.
-
-Tue Sep 23 01:29:00 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (gdb_get_mem): Fix compiler warning.
-
-Sun Sep 21 00:15:00 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (gdb_get_mem): Fix problem with ASCII dump.
-
-Tue Sep 16 18:07:17 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (gdb_get_mem): New function. Returns
- a formatted memory dump with optional ASCII dump.
-
-Mon Sep 8 12:48:50 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * gdbtk.c: Include ilutk.h if IDE.
- (gdb_confirm_quit, gdb_force_quit): New static functions.
- (gdbtk_init): Add Tcl commands gdb_confirm_quit and
- gdb_force_quit.
-
-Mon Sep 8 03:05:33 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (gdb_get_breakpoint_info): Now returns the
- function a breakpoint is in.
-
-Fri Sep 5 20:23:58 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Call ide_create_exit_command.
-
-Wed Sep 3 19:39:15 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * gdbtk.c: Include guitcl.h.
- (gdbtk_init): Always call ide_initialize_paths. Set the Tcl
- variable IDE to 1 when using the IDE. Always try using auto path
- to find main.tcl.
- * Makefile.in (IDE_CFLAGS_X): Always include libide.
- (LIBIDE): New variable.
- (IDE_X): Omit -lide.
- (IDE_DEPS): Omit libide.
- * configure.in: Add LIBIDE to TCL_LIBS and CONFIG_DEPS.
- * configure: Rebuild.
-
-Mon Aug 25 02:28:55 1997 Keith Seitz <keiths@pizza.cygnus.com>
-
- * gdbtk.c: (gdb_target_has_inferior) check if inferior_pid is non-zero
- before assuming that the inferior is running.
-
-Mon Aug 25 01:06:48 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * gdbtk.c (gdbtk_start_timer): Pass third argument to setitimer.
- (gdbtk_stop_timer): Likewise.
-
-Mon Aug 25 00:23:08 1997 Keith Seitz <keiths@pizza.cygnus.com>
-
- * gdbtk.c: (gdbtk_init) create new command "gdb_target_has_execution"
- (gdb_target_has_execution_command) new function
-
-Sun Aug 24 20:27:22 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * gdbtk.c (gdb_loc): If there are no symbols, just bail
- immediately.
- (tk_command_loop): Print errors encountered while running
- gdbtk_tcl_preloop.
-
-Sun Aug 24 13:44:03 1997 Tom Tromey <tromey@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Run ide_create_build_command.
-
-Sat Aug 23 21:53:39 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * gdbtk.c: If CYGWIN32, include <sys/time.h>.
- (x_fd): Don't define if WINNT.
- (gdbtk_start_timer, gdbtk_stop_timer): New static functions if
- CYGWIN32.
- (gdbtk_wait): Don't set up signal handling if WINNT. If CYGWIN32,
- call gdbtk_start_timer and gdbtk_stop_timer.
- (gdbtk_init): Don't set up signal handling or make x_fd
- asynchronous if CYGWIN32.
-
-Fri Aug 22 15:23:15 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * gdbtk.c (error_string_ptr): New static variable.
- (gdbtk_fputs): If result_ptr is NULL, and error_string_ptr is not
- NULL, and we're outputting to stderr, append string to
- error_string_ptr rather than calling gdbtk_tcl_fputs.
- (call_wrapper): Set up error_string_ptr. Put both error string
- and normal string in Tcl result.
-
- * gdbtk.c (gdbtk_init): Don't call ide_run_server_init until after
- gdb has initialized.
-
-Thu Aug 21 19:14:38 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * gdbtk.c: If _WIN32, include winuser.h.
- (gdbtk_init): If _WIN32, use MessageBox to display an error
- evaluating main.tcl.
-
-Thu Aug 21 00:48:00 1997 Martin M. Hunt <hunt@pern.cygnus.com>
-
- * gdbtk.c (gdbtk_init): Add call to ide_run_server_init().
- (gdb_cmd): For the load command, don't buffer the I/O.
-
-Wed Aug 20 11:41:22 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (gdbtk_query): Chaneg free() call to Tcl_Free().
-
-Tue Aug 19 17:09:19 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (TCL_DEPS, TK_DEPS): New variables.
- (ITCL_DEPS, TIX_DEPS): New variables.
- (IDE_DEPS): New variable.
- (CDEPS): Include @CONFIG_DEPS@.
- * configure.in: Set and substitute CONFIG_DEPS and TIX_DEPS.
- * configure: Rebuild.
-
-Sun Aug 17 00:42:11 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (gdb_listfuncs): New function that returns
- a list of all the functions in a source file.
-
-Tue Aug 12 16:35:21 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (install-only): Install tclIndex if ENABLE_IDE.
-
-Mon Aug 11 10:43:04 1997 Tom Tromey <tromey@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Use ide_event_init_from_environment.
-
-Fri Aug 8 15:59:24 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Change gdbtk_lib_tmp and gdbtk_file to be
- dynamically allocated, rather than fixed size. Pass "gdbtcl" to
- ide_initialize_paths to match installed directory name. If IDE,
- use auto_path to search for main.tcl.
- * Makefile.in (install-only): If ENABLE_IDE, install from gdbtcl2
- rather than gdbtcl.
-
- * gdbtk.c (gdbtk_cleanup): New static function.
- (gdbtk_init): Add gdbtk_cleanup as a final cleanup. Uncomment
- call to ide_initialize_paths. If we can't initialize the event
- system, set GDBTK_IDE to 0 in the Tcl interpreter. Create the
- ide_window_register and the ide_window commands. Initialize tk,
- itcl, and tix after initializing the IDE.
-
- * configure.in (tixdir): Update for cygwin32 case for Tcl 8.0.
- * configure: Rebuild.
-
-Fri Aug 8 00:13:32 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * gdbtk.c (breakpoint_notify): Change buffer size from 100
- to 256 to avoid memory corruption with very long pathnames.
-
-Thu Aug 7 14:08:23 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * configure.in: Change required Tix version to 4.1.8.0 .
- * configure: Rebuilt.
-
-Fri Aug 1 15:21:44 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * gdbtk.c (Tcl_Alloc): Don't provide our own version of this if
- _WIN32.
- (Tcl_Realloc, Tcl_Free): Likewise.
- * configure.in: Check for cygwin32 environment. Define and
- substitute WIN32LIBS and WIN32LDAPP. Always set configdir to
- unix; setting it to win was for an old Tcl/Tk configuration
- scheme.
- * aclocal.m4 (CY_AC_LOAD_TKCONFIG): Substitute TK_BUILD_INCLUDES.
- * Makefile.in (TK_CFLAGS): Add @TK_BUILD_INCLUDES@.
- (WIN32LDAPP, WIN32LIBS): Define.
- (CLIBS): Add $(WIN32LIBS).
- (gdb): Use $(WIN32LDAPP).
- * configure: Rebuild.
-
-Tue Jul 22 19:45:37 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * configure.in, aclocal.m4: Another fix to find the
- correct Tix library name.
-
- * configure: Rebuilt.
-
-Mon Jul 21 22:24:07 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * aclocal.m4: Search for the correct tix library.
-
-Thu Jul 10 00:02:41 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * Makefile.in, configure.in, aclocal.m4: Add Itcl, Tix, and
- IDE configuration information.
-
- * gdbtk.c (breakpoint_notify): Send address, linenumber and
- filename when a breakpoint is set. Avoids call to bp_info.
- (gdbtk_init): Call Tcl_FindExecutable(). Add code to handle
- Itcl, Tix and IDE initialization.
-
- * configure: Regenerated.
-
-Fri Jun 13 10:28:09 1997 Fred Fish <fnf@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Make truth value test explicit.
- Remove unused static variable "Gdbtk_Library".
-
-Sat Jun 7 02:34:19 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * gdbtk.c (gdb_get_breakpoint_info): Add string for new
- enumeration del_at_next_stop to bpdisp array.
-
-Tue Jun 3 15:46:51 1997 Tom Tromey <tromey@cygnus.com>
-
- * Makefile.in (LIB_RUNTIME_DIR): New variable.
-
-Wed May 7 19:10:19 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbtk.c (wrapped_call): New function - make actual call to tk
- worker function.
- (call_wrapper): Rewrite to use top.c:catch_errors.
-
- * gdbtk.c (gdb_stop): If No target_stop set quit flag and hope for
- best.
-
-Mon Apr 21 14:00:08 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * gdbtk.c (gdb_disassemble): Store endian-ness in `di'.
-
-Wed Apr 16 12:33:06 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * Makefile.in (install-only): Make list of gdbtcl files to install
- explicit - was picking up files such as ChangeLog etc.
- (install-only): Don't blindly create the directory.
-
-Tue Apr 1 15:04:21 1997 Jason Molenda (crash@godzilla.cygnus.co.jp)
-
- * configure.in (gdbtcl): Create soft-link for gdbtcl/ directory
- instead of gdbtk.tcl.
-
-Fri Mar 28 17:04:02 1997 Jason Molenda (crash@godzilla.cygnus.co.jp)
-
- * Makefile.in (gdbtk.o): look for GDBTK_LIBRARY in $(datadir) by
- default, not $(srcdir).
-
-Wed Mar 19 15:16:17 1997 Martin M. Hunt <hunt@onions.cygnus.com>
-
- * Makefile.in: Install gdbtcl dir instead of gdbtk.tcl.
-
- * gdbtk.c: Added some ifdefs for Windows. Changed GDBTK_FILENAME
- to GDBTK_LIBRARY, which is now a path to search.
- (gdb_path_conv): New function. Convert Cygwin32 pathname to
- DOS-style pathname.
-
- * {aclocal.m4,configure.in}: Changes for Windows builds.
-
- * configure: Rebuilt.
-
-Fri Mar 14 10:01:29 1997 Tom Tromey <tromey@cygnus.com>
-
- * configure: Regenerated.
- * configure.in (LIBS): Re-reverse order of TCL_LIBS and TK_LIBS.
-
-Wed Mar 12 14:29:52 1997 Tom Tromey <tromey@cygnus.com>
-
- * gdbtk.c (x_event): Use Tcl_DoOneEvent, TCL_DONT_WAIT,
- TCL_ALL_EVENTS.
-
- * configure: Regenerated.
- * configure.in (ENABLE_GDBTK): Put TCL_LIBS after TK_LIBS in
- LIBS.
-
-Mon Feb 10 13:50:53 1997 Stu Grossman (grossman@critters.cygnus.com)
-
- * gdbtk.c (call_wrapper): Clear running_now if an error occurs.
-
-Wed Dec 11 18:51:35 1996 Mark Alexander <marka@cygnus.com>
-
- * gdbtk.c (gdb_loc): Correct truncation of PC on 64-bit MIPS.
-
-Tue Nov 19 09:26:14 1996 Tom Tromey <tromey@cygnus.com>
-
- * gdbtk.c (gdbtk_readline): Fix memory leak.
-
-Mon Nov 18 23:43:05 1996 Tom Tromey <tromey@cygnus.com>
-
- Fixes for Tcl 7.6 / Tk 4.2:
- * gdbtk.tcl (apply_filespec): Use tk_getOpenFile.
- Remove old fileselect code.
- * gdbtk.c (Tcl_Alloc): Rename from Tcl_Malloc.
-
-Fri Sep 27 10:25:30 1996 Fred Fish <fnf@cygnus.com>
-
- * gdbtk.tcl (create_copyright_window): Increase timeout from
- 15 seconds to 30 seconds.
-
-Wed Sep 4 17:28:40 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * configure configure.in: Add host *windows* to list of hosts
- that don't support GDBtk.
-
-Fri Aug 23 00:44:57 1996 Fred Fish <fnf@cygnus.com>
-
- * gdbtk.c (gdbtk_init): Check for a DISPLAY env variable and
- gracefully degrade to using command line interface if none is
- found.
-
-Fri Aug 9 12:32:53 1996 Tom Tromey <tromey@creche.cygnus.com>
-
- * Makefile.in (LIB_INSTALL_DIR): New macro.
- (TCL): Include @TCL_LD_SEARCH_FLAGS@.
-
-Thu Aug 1 20:35:01 1996 Tom Tromey <tromey@creche.cygnus.com>
-
- * gdbtk.c (mainWindow): Deleted.
- (cleanup_init): Don't destroy main window.
- (gdbtk_init): Main window now created by Tk_Init.
-
- * configure.in: Most X checks now handled automatically by Tk.
- Use new macros to find Tcl/Tk.
- * aclocal.m4: New version for new Tcl/Tk; from Don Libes.
- * config.in, configure: Regenerated.
-
- * Makefile.in (TCL, TCL_CFLAGS, TK, TK_CFLAGS, X11_CFLAGS,
- X11_LDFLAGS, X11_LIBS): Changed for new Tcl and Tk.
-
-Thu Aug 1 16:12:05 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
-
- * Makefile.in (gdbtk.tcl): put in $(datadir), not $(libdir).
-
-Fri Jul 26 14:07:37 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * gdbtk.c (gdb_disassemble): Initialize di.flavour.
-
-Thu Jul 25 19:41:31 1996 Fred Fish <fnf@cygnus.com>
-
- * gdbtk.c (null_routine): Ditto.
- (gdbtk_flush): Ditto.
- (gdbtk_fputs): Ditto.
- (gdbtk_query): Ditto.
- (gdbtk_readline): Ditto.
- (gdbtk_readline_end): Ditto.
- (gdb_get_breakpoint_list): Ditto.
- (gdb_get_breakpoint_info): Ditto.
- (breakpoint_notify): Ditto.
- (gdbtk_create_breakpoint): Ditto.
- (gdbtk_delete_breakpoint): Ditto.
- (gdbtk_modify_breakpoint): Ditto.
- (gdb_loc): Ditto.
- (gdb_eval): Ditto.
- (gdb_sourcelines): Ditto.
- (map_arg_registers): Ditto.
- (get_register_name): Ditto.
- (gdb_regnames): Ditto.
- (get_register): Ditto.
- (gdb_fetch_registers): Ditto.
- (register_changed_p): Ditto.
- (gdb_changed_register_list): Ditto.
- (gdb_cmd): Ditto.
- (call_wrapper): Ditto.
- (gdb_listfiles): Ditto.
- (gdb_stop): Ditto.
- (gdbtk_dis_asm_read_memory): Ditto.
- (compare_lines): Ditto.
- (gdb_disassemble): Ditto.
- (tk_command): Ditto.
- (cleanup_init): Ditto.
- (gdbtk_interactive): Ditto.
- (x_event): Ditto.
- (gdbtk_wait): Ditto.
- (gdbtk_call_command): Ditto.
- (tk_command_loop): Ditto.
- (gdbtk_init): Ditto.
-
- * gdbtk.c (register_changed_p): Remove unused local variable "buf".
-
-Sat Jul 20 17:46:40 1996 Fred Fish <fnf@cygnus.com>
-
- * gdbtk.tcl (files_command): Reorder the binding tags for
- the listbox widget to avoid referencing the listbox after
- the containing widget has been destroyed by the action of
- a previous binding.
-
-Sat Jul 20 10:09:28 1996 Fred Fish <fnf@cygnus.com>
-
- * gdbtk.tcl (delete_expr): Unset corresponding element of
- expr_update_list when destroying an expression.
- (create_expr_window): Initialize expr_num, delete_expr_num,
- and expr_update_list here when each new expression window
- is created, rather than once at startup.
-
-Mon Jul 15 16:44:05 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * gdbtk.c (gdb_disassemble): Setup di.mach from
- tm_print_insn_info.mach, and set endian from TARGET_BYTE_ORDER.
-
-Fri Jun 21 11:04:47 1996 Fred Fish <fnf@cygnus.com>
-
- * gdbtk.tcl (create_register_windows): Include missing '$'s.
- Add global declarations for various reg_format_* variables.
- * gdbtk.tcl (populate_register_window): Make initial window one
- line taller to account for new column header line.
-
-Fri Jun 21 09:46:47 1996 Fred Fish <fnf@cygnus.com>
-
- * gdbtk.c (get_register): Support for printing raw formats.
- * gdbtk.tcl: Add hint for using debug_interface.
- (center_window, add_breakpoint_frame, delete_breakpoint_frame):
- Enclose arg in braces for consistency.
- (create_registers_window, populate_reg_window, update_registers):
- Major rewrite to support displaying multiple formats in the register
- window.
- (init_reg_info): New function.
- (recompute_reg_display_list): Reset reg_display_list, start
- register display lines at line 2.
-
-Thu Jun 20 08:18:59 1996 Fred Fish <fnf@cygnus.com>
-
- * gdbtk.tcl (gdbtk_tcl_readline_begin): Handle backspace to
- avoid backing up over prompt. At every input, make sure insert
- point is at least after command start, handle control-u to delete
- current input line.
- (tclsh): Handle backspace to avoid backing up over prompt. Handle
- control-u to delete current input line.
-
-Wed Jun 19 17:23:38 1996 Geoffrey Noer <noer@cygnus.com>
-
- * configure.in: disable gdbtk for *cygwin32* hosted compiles
- * configure: regenerated with autoconf 2.8
-
-Sun May 19 16:49:37 1996 Fred Fish <fnf@cygnus.com>
-
- * gdbtk.c (gdbtk_readline_begin, gdbtk_readline, gdbtk_readline_end):
- New functions.
- (tk_command_loop): Set instream to NULL to enable Tk user interaction.
- (gdbtk_init): Set readline_begin_hook, readline_hook,
- and readline_end_hook.
- * gdbtk.tcl (gdbtk_tcl_readline_begin, gdbtk_tcl_readline,
- gdbtk_tcl_readline_end): New functions.
- (tclsh): Pack scroll bar on right side of window, not left.
-
-Fri May 17 13:54:34 1996 Fred Fish <fnf@cygnus.com>
-
- * gdbtk.tcl (create_command_window): Change a misspelled "get"
- to the intended "cget".
- (delete_line): Fix so it deletes the current line at the
- insertion cursor.
-
-Thu May 16 19:20:29 1996 Fred Fish <fnf@cygnus.com>
-
- * gdbtk.tcl (gdb_prompt): Set this early on.
- (create_command_window): Use gdb_prompt rather than "(gdb) ".
- (gdbtk_tcl_preloop): Proc executed just prior to Tk main loop.
- (tclsh): If an evaluation window already exists, just bring it
- to the front instead of trying to create another.
- * gdbtk.c (tk_command_loop): New function.
- (gdbtk_init): Call tk_command_loop rather than Tk_MainLoop.
-
-Thu May 16 16:16:35 1996 Fred Fish <fnf@cygnus.com>
-
- * gdbtk.tcl (evaluate_tcl_command, tclsh): New functions that
- implement a tcl evaluation window for gdbtk maintainers to use.
-
-Thu May 16 11:42:58 1996 Tom Tromey <tromey@creche.cygnus.com>
-
- * gdbtk.tcl (files_command): Correctly insert list of files into
- listbox widget.
-
- * gdbtk.tcl (files_command): listbox command no longer accepts
- -geometry.
-
-Wed May 15 16:04:09 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * gdbtk.tcl (create_command_window): If command window's buffer
- is disabled, don't execute any of the key bindings.
-
-Mon May 13 13:43:25 1996 Fred Fish <fnf@cygnus.com>
-
- * gdbtk.c (tk_command): Catch case where no argument is given
- since this will cause the tcl interpreter to dump core.
-
-Wed May 8 20:33:24 1996 Fred Fish <fnf@cygnus.com>
-
- * gdbtk.c: Fix a couple of misspellings.
-
-Thu May 2 19:17:49 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * gdbtk.tcl (debug_interface): New global, use to aid debugging.
- (insert_breakpoint_tag, delete_breakpoint_tag): Fix range.
- (file_popup_menu): Delete, never used.
- (listing_window_popup): Rename from listing_window_button_1,
- remove breakpoint toggling code.
- (toggle_breakpoint): New procedure.
- (create_file_win): Bind popup menu to button 2, toggle breakpoints
- with button 1 in breakpoint area, add display of tagged areas if
- debugging on.
-
-Fri Apr 5 13:44:40 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * gdbtk.c (running_now): New global variable.
- (gdb_cmd): Test it before executing any command.
- (gdbtk_call_command): Set it when inferior is running.
- * gdbtk.tcl (gdbtk_tcl_busy, gdbtk_tcl_idle): Enable and
- disable interaction with command window's text appropriately.
-
-Fri Apr 5 13:25:42 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * gdbtk.c (SIOCSPGRP, linux): If on Linux, undef SIOCSPGRP, since
- some versions of the kernel don't support it.
-
-Tue Feb 6 16:31:25 1996 Tom Tromey <tromey@creche.cygnus.com>
-
- * gdbtk.tcl (create_file_win): Eliminate text widget B1 binding so
- double-clicking will work again.
- (create_asm_win): Put "break" at end of all B1 bindings.
- (create_file_win): Lower "sel" tag, don't raise it.
- (ensure_line_visible): New proc.
- (update_listing, update_assembly): Use it.
- (create_copyright_window): Destroy window on Leave event.
- (create_command_window): Put "break" at end of all B2 bindings.
-
-Wed Jan 24 15:28:41 1996 Tom Tromey <tromey@creche.cygnus.com>
-
- * gdbtk.tcl, gdbtk.c: Updated copyrights.
-
- * configure.in: Look for -ldl or -ldld when using Tcl 7.5 or
- greater.
- * configure: Rebuilt.
-
-Tue Jan 23 09:00:48 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * gdbtk.c (gdb_disassemble): Pass fprintf_unfiltered to
- INIT_DISASSEMBLE_INFO.
-
-Mon Jan 15 09:58:41 1996 Tom Tromey <tromey@creche.cygnus.com>
-
- * gdbtk.tcl (create_expr_window): Many changes to update GUI.
- (add_expr): Changes from create_expr_window.
- (create_command_window): Set focus.
- (delete_expr): Rewrote.
- (expr_update_button): New proc.
- (add_expr): Put bindings on FocusIn, FocusOut.
- Don't allow .file_popup to be torn off.
-
-Fri Jan 12 09:36:17 1996 Tom Tromey <tromey@creche.cygnus.com>
-
- * gdbtk.tcl (gdbtk_tcl_query): Swap Yes and No buttons.
- (update_listing): Use lassign. Use "see" to scroll. Don't need
- screen_top, screen_bot, screen_height.
- (update_assembly): Use "see" to scroll.
- (textscrollproc): Removed.
- (create_file_win): Don't use textscrollproc.
- (asmscrollproc): Removed.
- (create_asm_window): Don't use asmscrollproc.
- (create_asm_win): Ditto.
- (screen_height, screen_top, screen_bot): Removed.
- (run_editor): New proc.
- (build_framework): Use it.
- (create_file_win, create_source_window): Don't use textscrollproc.
- (create_breakpoints_window): Set -xscrollcommand on canvas.
- (not_implemented_yet): Default button is 0.
- (delete_char): Don't use tk_textBackspace.
- (create_command_window): Allow Tk bindings to fire after deleting
- character.
- (create_command_window): Make Delete delete left, not right.
-
-Thu Jan 11 10:08:14 1996 Tom Tromey <tromey@creche.cygnus.com>
-
- * gdbtk.tcl (FSBox): Don't use tk_listboxSingleSelect.
-
- Changes in sync with expect:
- * configure.in (ENABLE_GDBTK): Use CY_AC_PATH_TCL and
- CY_AC_PATH_TK.
- * aclocal.m4: Replaced with version from expect.
- * configure: Regenerated.
-
-Wed Jan 10 09:07:22 1996 Tom Tromey <tromey@creche.cygnus.com>
-
- * gdbtk.tcl (gdbtk_tcl_fputs, gdbtk_tcl_fputs_error,
- gdbtk_tcl_flush): Use "see", not "yview".
- (gdbtk_tcl_query): Use questhead bitmap.
- various: Always wrap condition of 'if' in {...}.
- (add_breakpoint_frame): Set -value on radiobuttons.
- (lassign): New proc.
- (add_breakpoint_frame): Use lassign, not series of assignments.
- (decr): Made faster.
- (interactive_cmd): Use "see", not "yview".
- (not_implemented_yet): Use warning bitmap.
- (update_expr): Don't allow $expr to be evalled by Tcl.
- (create_expr_window): Don't use "focus".
- (delete_char, delete_line): Define globally.
- (delete_line, delete_char, create_command_window, update_autocmd,
- build_framework, create_asm_win, create_file_win): Use "see", not
- "yview".
- (create_copyright_window, center_window, bind_widget_after_class):
- New procs.
- (FSBox,create_command_window, create_autocmd_window): Binding
- changes for Tk4.
- (textscrollproc): Define globally.
- (build_framework): tk_menuBar no longer needed. Keys Prior, Next,
- Home, End, Up, and Down are all defined by Tk.
- (apply_filespec): Use error bitmap in dialog.
- (files_command): Don't use tk_listboxSingleSelect.
- (files_command): Don't use "uniq" to remove duplicates from a
- list.
- (update_assembly): Use lassign.
- (create_asm_win): Removed redundant bindings.
- (listing_window_button_1, file_popup_menu): Use tk_popup.
- (ButtonRelease-1 binding): Just remove tag from window; rest
- handled by Tk.
-
- * gdbtk.c (gdbtk_query): Use Tcl_Merge to provide quoting.
- (call_wrapper): Use Tcl_Eval, not Tcl_VarEval.
- (gdbtk_call_command): Ditto.
-
-Thu Jan 4 16:04:54 1996 Stu Grossman (grossman@cygnus.com)
-
- * configure configure.in: Make --enable-gdbtk be the default.
-
-Thu Dec 28 15:10:49 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * README.GDBTK: Polish introductory paragraph.
-
-Mon Oct 16 11:27:06 1995 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.c (gdb_disassemble): Use fprintf_unfiltered instead of
- fprintf_filtered.
-
-Tue Oct 10 15:26:39 1995 Fred Fish <fnf@cygnus.com>
-
- * README.GDBTK: Updated for version 4.15.
-
-Sat Aug 19 17:20:22 1995 Michael Tiemann <tiemann@axon.cygnus.com>
-
- * gdbtk.tcl: ENABLE comes back as "1" or "0", not "enable" or
- "disable".
- Also, wire up the breakpoint window so that it can be demo'd.
-
-Tue Aug 1 11:44:53 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * gdbtk.c: Include "gdb_string.h" instead of <string.h>.
-
-Tue Jun 20 10:19:40 1995 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.c: Add functions Tcl_Malloc, Tcl_Realloc, and Tcl_Free.
-
- * gdbtk.tcl (add_breakpoint_frame): Add more fields.
- * (create_file_win create_asm_win build_framework): Create null
- bindings for meta keys to keep window from dropping down to
- insertion point when meta is pressed by itself. New bindings:
- Up/Down - Scroll up/down one line at a time
- Next/Prior - Scroll up/down one page at a time
- Home/End - Warp to current pc/end of file
- * (build_framework): Turn on breakpoint menu.
- * (create_command_window): Implement tab completion. Add binding
- for ^C to stop target.
-
-Fri May 19 06:15:40 1995 Jim Kingdon <kingdon@deneb.cygnus.com>
-
- * gdbtk.c: Conditionalize use of stdarg rather than varargs on
- ANSI_PROTOTYPES not __STDC__; it must match the definition of
- PARAMS.
-
-Thu May 18 15:58:46 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * gdbtk.c (gdbtk_query): Use stdarg.h macros when compiling with
- an ANSI compiler.
-
-Sat Apr 15 13:52:24 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * gdbtk.c (gdb_disassemble): Read from inferior if connected
- to a VxWorks target.
-
-Fri Apr 14 10:18:20 1995 Stu Grossman (grossman@cygnus.com)
-
- * README.GDBTK: New file. Contains the obvious.
-
-Tue Apr 11 11:07:12 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * gdbtk.c (gdbtk_init): If SIOCSPGRP is not available, but
- F_SETOWN is, use that.
-
-Thu Apr 6 17:00:46 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * Makefile.in (X11_INCLUDES): Define as empty.
- (X11_CFLAGS): Define as including $(X11_INCLUDES).
- (X11_LIB_SWITCHES): Define as empty.
- (X11_LIBS): Define as -lX11.
-
- * configure.in (enable_gdbtk): If gdbtk, support the --x-includes
- and --x-libraries switches, setting the X11_INCLUDES and
- X11_LIB_SWITCHES respectively. Instead of using a hardcoded -lX11
- in ENABLE_CLIBS, use the X11_LIB_SWITCHES and X11_LIBS variables.
-
- * gdbtk.c (gdbtk_init): If SIOCSPGRP is not available, don't use
- it. This means that the stop button doesn't work, but is better
- than nothing.
-
-Wed Mar 29 17:09:29 1995 Stu Grossman (grossman@cygnus.com)
-
- * Makefile.in (gdbtk.o): Use X11_CFLAGS to provide alternate
- locations (per-host) for X11 include files.
- * config/pa/hppahpux.mh (XM_CLIBS): Add -L/usr/lib/X11R5 to force
- the use of R5 libs.
- (X11_CFLAGS): Add this to indicate the locs
- of the R5 include files.
-
-Wed Mar 8 16:12:21 1995 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.c (gdb_get_breakpoint_info): Return error if breakpoint
- type is not bp_breakpoint.
-
-Tue Feb 14 17:16:41 1995 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.c: Ditto.
- * gdbtk.c: General cleanups, get rid of unused variables. Redo
- handling of stdout/stderr to just return output as the result of
- the tcl command that caused the output. Cleanup -Wall stuff.
- * (breakpoint_notify): Now returns just action and breakpoint
- number.
- * (gdb_get_breakpoint_list): New routine. Does the obvious.
- * (gdb_get_breakpoint_info): Mostly derived from the old
- breakpoint_notify, but returns lots more info.
- * (dsprintf_append_element): Helper routine, works like printf,
- but appends a tcl element onto the specified DString. Good for
- building up lists as return values.
- * (gdbtk_enable/disable_breakpoint): Go away. Replaced with
- gdbtk_modify_breakpoint.
- * (*many routines*): Use new result protocol.
- * (call_wrapper): Make sure that recursive calls don't trash results.
- * gdbtk.tcl: New windows, autocmd, and breakpoints.
- * (gdbtk_tcl_fputs): Don't use $current_output_win redirection
- anymore. It's not needed (in fact, this routine may not be needed
- anymore).
- * (gdbtk_tcl_breakpoint): Change to reflect new breakpoint
- notification protocol.
- * (gdbtk_tcl_busy gdbtk_tcl_idle): Straighten out buttons, remove
- catches.
- * (interactive_cmd): Use this wrapper around button invocations
- of many commands. This will catch errors and put the results into
- the command window. It also updates all the other windows.
- * Also, change reliefs of most things to sunken. This actually
- looks better.
- * (create_file_win): Fix margin binding to allow breakpoints to
- work again.
- * (create_asm_win): Use return value of gdb_disassemble instead
- of implicit I/O to the command window.
- * (create_command_window): Use new result protocol to get output
- from commands.
-
-Sun Feb 5 20:32:44 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * gdbtk.c (gdb_disassemble): Deference pointer to function before
- calling it (pre-ANSI compilers generally require this).
-
-Fri Feb 3 11:19:20 1995 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.c (gdb_disassemble): Get rid of
- dis_asm_read_memory_hook. We can now call the disassemblers
- directly and have no need for this hook anymore.
-
-Mon Jan 30 17:34:24 1995 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.tcl (create_file_win): Disable old popup menu for source
- window.
-
-Wed Jan 25 18:23:46 1995 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.c (gdbtk_init): Prevent segfault when gdbtk.tcl can't be
- found.
- * gdbtk.tcl: Initialize expr_update_list() to prevent errors when
- popping up expression window for the first time.
-
-Tue Jan 24 12:10:28 1995 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.tcl (create_registers_window): Work around a radiobutton
- widget bug to make Options|Natural button work.
-
- * gdbtk.c (gdb_disassemble): Fix problem with source+assembly and
- g++ caused by out-of-order pc's.
- * gdbtk.tcl (files_command): Remove duplicate file names. Also,
- add scrollbar.
-
-Mon Jan 23 17:21:09 1995 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.tcl: Take .gdbtkinit if it exists. Makes gdbtk match the
- doc!
-
-Thu Jan 12 15:02:40 1995 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.c, gdbtk.tcl: Update/add copyright.
- * gdbtk.tcl (build_framework): Several fixes for filespec widget,
- including dismiss button, and better error handling.
- * (create_command_win): Bind button 2 to retrieve selection.
-
-Wed Jan 11 17:06:55 1995 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.tcl: Add button to control mixed source disassembly.
- Use text widgets in expr window. The give me more control over
- layout.
- Add auto-updating of exprs in expression window.
- Handle expressions out of scope a bit better.
- Make selected window pop up to the top when invoked via the
- menubar.
- Make copyright message have raised relief.
-
- * gdbtk.c (gdbtk_init): Improve handling for errors in gdbtk.tcl
- during startup.
-
-Thu Jan 5 17:38:29 1995 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.c (finish_saving_output): Don't do anything if not saving
- output.
- * (breakpoint_notify): Don't send null filename to tcl.
- * (gdb_eval): New tcl command to eval an expression.
- * (gdb_disassemble): New tcl command to do disassembly. This
- allows tcl code to choose between exec file and target memeory,
- and can also do mixed source and assembly.
- * (gdbtk_init): Move reading of gdbtk.tcl to the end to make sure
- that more of the environment is set up. Also, create link between
- gdb and tcl vars disassemble{-_}from{-_}exec.
-
- * gdbtk.tcl: New expression window support.
- * Make assembly window be 80 columns wide.
- * Use new disassembly method. Add menu items to select
- disassembly from exec file or target.
- * Change View menubar item to Options.
-
- * Get rid of Stack, Breakpoints, Signals, and Variables Windows,
- since they don't exist yet.
-
- * Pop up a copyright window on startup.
-
-Wed Jan 4 19:49:10 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * gdbtk.tcl (build_framework): Add standard commands menu, more
- windows to standard windows menu.
- (not_implemented_yet): Clarify message.
-
-Fri Dec 30 15:49:00 1994 Stan Shebs <shebs@andros.cygnus.com>
-
- * gdbtk.tcl (FSBox): New proc, File Selection Box code from exmh.
- (not_implemented_yet): New proc.
- (build_framework): Add various file commands to file menu.
-
-Fri Dec 23 16:18:50 1994 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.c (gdbtk_wait gdbtk_init): Portability improvements for
- SIGIO handling.
-
-Mon Dec 19 09:55:47 1994 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.tcl (update_assembly): Force update to make sure that pc
- is visible when creating new assembly windows.
-
-Sun Dec 18 23:31:20 1994 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.c (gdbtk_wait gdbtk_init): Use different method of
- enabling I/O interrupts for SVR4 (streams).
- * (start_saving_output save_output get_saved_output
- finish_saving_output flush_holdbuf gdbtk_flush gdbtk_fputs
- gdbtk_init):
- Totally revamp to use TCLs dynamic string functions. Also, quote
- all data passed back to TCL to prevent errors with unmatched
- braces, odd characters, etc... This fixes several wierd problems
- with outputting strings containing unmatched braces.
- * (breakpoint_notify gdb_loc): Use long hex format to output
- addresses of breakpoints and PCs. This fixes some Alpha problems.
- * (breakpoint_notify): Add stream arg to call to gdbtk_fputs.
- * (gdb_listfiles): Also, go through the symtabs when looking for
- files. This makes xcoff work (sort of), but probably breaks
- something else.
- * (gdb_stop): Return TCL_OK instead of nothing. This fixes odd
- TCL errors when hitting stop button.
- * (tk_command): Don't pass interp->result on to Tcl_{Var}Eval, as
- that will trash the result. strdup the result instead and pass
- that on. Improve error handling as well.
-
- * gdbtk.tcl (gdbtk_tcl_flush): Use global def of
- current_output_win. Makes flushing actually work!
- * (asm_win_name create_asm_win update_assembly): Bunch of fixes
- to make assembly windows stop flashing when loading a new file.
- * (gdbtk_tcl_busy gdbtk_tcl_idle): Use catch to prevent gdb_cmd
- errors from losing control.
- * (create_source_window): Add source file selection to View menu.
- * (create_command_window (<Key-Return> binding): Quote text fed
- into gdb_cmd to prevent eval errors.
-
-Thu Dec 15 16:40:10 1994 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.c: Improve mechanism for capturing output values.
- (full_filename): Remove.
- (gdb_cmd call_wrapper gdbtk_init): Protect all calls from tcl land
- with call_wrapper. This prevents longjmps (usually via error())
- from jumping out of tcl/tk and leaving things in an indeterminate
- state.
- (gdbtk_fputs): Differentiate stdout from stderr when passing text
- into tcl land.
- * gdbtk.tcl: New view option to disable line numbers. Put catch
- around most uses of gdb_cmd. Add update button to reg config
- window. Stop doing immediate updates when selecting registers.
- Change register view values into checkbuttons.
-
-Mon Dec 12 16:59:29 1994 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.tcl (reg_config_menu create_registers_window
- recompute_reg_display_list): Use array instead of individual vars
- for register display list.
- * (recompute_reg_display_list update_registers): Fix bug with not
- displaying all registers.
-
-Mon Dec 12 12:22:21 1994 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.c: New tcl commands: gdb_fetch_registers,
- gdb_changed_register_list, and gdb_regnames.
- * gdbtk.tcl: Use monochrome color model for now.
- * (delete_breakpoint_tag create_file_win): Add breakdot support.
- * (create_file_win create_asm_win update_listing build_framework
- create_source_window create_command_window): Re-org window
- creation to give all windows consistent look and feel.
- * (update_listing update_asm): Change pc pointer to '->'.
- * (registers_command reg_config_menu create_registers_window
- populate_reg_window update_registers): Revamp register window.
- Allow selection of registers to be displayed. Highlight changed
- registers.
-
-Mon Nov 28 09:17:20 1994 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.tcl (build_framework): Fix bug with setting window titles.
-
- * gdbtk.tcl (build_framework): Add "Report bug" to help menu.
-
- * gdbtk.tcl: Re-arrange windows using new, consistent layout. Clean
- up lots of code and centralize framework initialization.
-
-Wed Nov 16 15:28:29 1994 Rob Savoye (rob@cygnus.com)
-
- * Makefile.in: Fix the test for installing gdbtk.
-
-Mon Nov 14 08:51:29 1994 Stu Grossman (grossman@cygnus.com)
-
- * Makefile.in: Install gdbtk.tcl.
- * configure.in: Add ENABLE_GDBTK flag.
- * gdbtk.c (gdb_sourcelines): Returns list of source lines
- containing code. (gdb_regnames): Returns list of register names.
-
-Thu Nov 3 14:25:24 1994 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.c (gdb_stop): Switch to target_stop().
-
-Tue Nov 1 16:41:12 1994 Stu Grossman (grossman@cygnus.com)
-
- * Makefile.in: Use $(objdir)/tcl and $(objdir)/tk if they are
- available.
- * configure.in (ENABLE_CLIBS): Use $(TCL) and $(TK) instead of
- -ltcl and -ltk.
- * gdbtk.c: Get rid of lots of unnecessary #includes.
- * (gdbtk_init): Use ConnectionNumber macro instead of referencing
- Display structure directly.
- * gdbtk.tcl: Change exit button to quit button.
-
-Wed Oct 26 15:41:07 1994 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.c: Change sense and name of no_windows variable. Now
- called use_windows, and defaults to off (for compatibility).
-
-Thu Oct 20 17:35:45 1994 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.c (gdb_cmd): Force GUI into idle mode when errors occur.
- * (gdb_stop): New tcl command to stop the target process.
- * (x_event, gdbtk_wait): Allow GUI to interrupt gdb out of target
- waits.
- * (gdbtk_call_command): Wrapper around command processing to
- alert GUI of target state changes.
- * (gdbtk_init): Get the fd of X server for doing async
- notification of X events (via x_event). Setup new hooks.
- * gdbtk.tcl: Add scrollbars to assembly and command windows.
- * Change window foreground & background colors.
- * Create margin tag for breakpoints in source and assembly windows.
- * Add new routines to be invoked when target state changes to/from
- idle.
- * Add start of expression window.
- * Change bindings of mouse button 1 in assembly and source window
- to just set or clear breakpoints when in the margin tag.
- * Change shape of register window to be more vertical to better
- reflect its contents.
- * Add stop button.
- * Cleanup some code around command window bindings.
-
-Sat Sep 17 17:05:14 1994 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.tcl: Let ^U delete lines in the command window.
-
-Fri Sep 16 15:40:34 1994 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.c: Replace calls to full_filename with symtab_to_filename.
- * gdbtk.tcl: New routine pc_to_line replaces in line code. New
- routine decr replaces in line code.
- * (create_file_win): Use catch to handle open failures more
- elegantly. Also, create special window to display file open
- failure message. Move opening of file prior to creation of text
- widget.
- * (create_asm_win): Add PC as argument. We now base disassembly
- on PC instead of function name, since function names can be
- ambiguous (usually seen with shared libs). Also, use catch to
- simplify code where we don't care about failures.
-
-Wed Sep 14 00:55:26 1994 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.tcl: Add ref counts to breakpoint tags.
- * Put quotes around function name in disassemble command to better
- handle assembler names containing `.'.
- * Make pclist element 0 be filler to avoid off-by-one problem with
- line numbers.
- * Set names of top-level windows.
- * Add register display window.
- * Add PC to label of assembly window.
-
-Tue Sep 13 08:59:04 1994 Stu Grossman (grossman@cygnus.com)
-
- * gdbtk.c (gdbtk_flush gdbtk_fputs): Buffer up output to make
- disassembly more efficient.
- * (breakpoint_notify): Include pc in gdbtk_tcl_breakpoint
- callback.
- * (gdb_loc): Include pc in return value. Also, return function
- name if arg was specified.
- * (gdb_cmd_stub): Call gdb_flush to drain internal GDB buffers
- after command completes.
- * (gdbtk_init): Improve error handling.
-
- * gdbtk.tcl: Add lots of comments. Clean up code.
- * (gdbtk_tcl_fputs): Make output window redirectable.
- * Add assembly window, and breapoint support.
- * Make button 1 in margin toggle breakpoints.
- * Use stippling to indicate breakpoint disabling.
-
-Fri Sep 2 19:11:40 1994 Stu Grossman (grossman@cygnus.com)
-
- * configure.in: Don't symlink to gdbtk.tcl if it's already there.
-
-Thu Jul 28 14:37:36 1994 Stu Grossman (grossman@cygnus.com)
-
- Support for TK GUI.
- * Makefile.in: Add rule for gdbtk.o.
- * configure.in: Add support for --enable-gdbtk.
- * gdbtk.c: New file. Contains support routines for TK interface.
- * gdbtk.tcl: New file. Implements GUI policy.
-
-
-Local Variables:
-mode: change-log
-left-margin: 8
-fill-column: 74
-version-control: never
-End:
diff --git a/gdb/gdbtk/generic/ChangeLog-2000 b/gdb/gdbtk/generic/ChangeLog-2000
deleted file mode 100644
index 51993bdee1a..00000000000
--- a/gdb/gdbtk/generic/ChangeLog-2000
+++ /dev/null
@@ -1,211 +0,0 @@
-2000-11-29 Tom Tromey <tromey@cygnus.com>
-
- * gdbtk-cmds.c (Gdbtk_Init): Create gdb_current_directory,
- gdb_inferior_args, and gdb_source_path variables.
-
-2000-11-29 Tom Tromey <tromey@cygnus.com>
-
- * gdbtk-cmds.c (call_wrapper): Don't reset result if wrapped
- command returned error.
-
-2000-11-28 Tom Tromey <tromey@cygnus.com>
-
- * gdbtk-cmds.c (gdb_clear_file): Use Tcl_WrongNumArgs.
- (gdb_confirm_quit): Likewise.
- (gdb_force_quit): Likewise.
- (gdb_eval): Likewise.
- (gdb_immediate_command): Likewise.
- (gdb_get_vars_command): Likewise.
- (gdb_get_line_command): Likewise.
- (gdb_get_file_command): Likewise.
- (gdb_get_function_command): Likewise.
- (gdb_cmd): Likewise. Also, don't allow more than 2 arguments.
- (gdb_listfiles): Corrected usage of Tcl_WrongNumArgs.
- (gdb_listfuncs): Use Tcl_WrongNumArgs. Return error.
- (gdb_fetch_registers): Likewise.
- (gdb_tracepoint_exists_command): Use Tcl_WrongNumArgs.
- (gdb_get_tracepoint_info): Likewise.
- (gdb_get_trace_frame_num): Likewise.
- (gdb_actions_command): Likewise.
- (gdb_disassemble): Likewise. Also, return error.
- (gdb_get_breakpoint_list): Likewise.
- (gdb_path_conv): Likewise.
- (gdb_load_disassembly): Use Tcl_WrongNumArgs.
- (gdb_loc): Likewise.
- (gdb_set_bp): Likewise.
- (gdb_set_bp_addr): Likewise.
- (gdb_get_breakpoint_info): Likewise.
-
-2000-10-23 Fernando Nasser <fnasser@redhat.com>
-
- From 2000-10-19 Steven Johnson <sbjohnson@ozemail.com.au>
- Note: The original patch used asprintf/vasprintf. I changed it to
- use the new xasprintf/xvasprintf gdb functions.
- * gdbtk.c (TclDebug, gdbtk_init): Replaced the vast majority of
- sprintf/vsprintf calls with asprintf and vasprintf respectively.
- Should prevent any possible buffer overruns possible with
- fixed size sprintf buffers. Specifically fixes a problem with long
- filenames and clearing breakpoints overflowing their buffers when
- using sprintf, causing a segfault. Generically should also prevent
- any other similar problems from occuring.
- * gdbtk-cmds.c (sprintf_append_element_to_obj, get_pc_register,
- gdb_get_tracepoint_info, gdb_load_disassembly, gdbtk_load_source,
- gdbtk_load_asm, gdb_set_bp, gdb_set_bp_addr, gdb_get_breakpoint_info,
- gdb_selected_frame, gdb_selected_block, gdb_get_blocks): Ditto.
- * gdbtk-hooks.c (gdbtk_warning, gdbtk_ignorable_warning,
- gdbtk_readline_begin, gdbtk_set_hook, breakpoint_notify,
- gdbtk_query, tracepoint_notify, gdbtk_error_begin,
- gdbtk_annotate_signal): Ditto.
-
-2000-10-23 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * gdbtk-hooks.c (x_event): Only process events if the target is
- running.
-
-2000-10-23 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * gdbtk-variable.c: Removed. Obsolete file.
-
-2000-10-13 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * gdbtk.c (target_is_native): The "multi-thread" target is native.
-
-2000-09-15 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * gdbtk-varobj.c (variable_value): Send back the error text issued
- by gdb so it can be displayed in a pop-up box.
-
-2000-07-25 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * gdbtk-cmds.c (map_arg_registers): Set numregs to include the
- pseudo regs as well.
-
-2000-07-10 Kevin Buettner <kevinb@redhat.com>
-
- * gdbtk-cmds.c, gdbtk-hooks.c, gdbtk-variable.c: Eliminate use
- of PARAMS in function pointer declarations.
-
-2000-07-02 Kevin Buettner <kevinb@redhat.com>
-
- * gdbtk-cmds.c, gdbtk-hooks.c, gdbtk-variable.c,
- gdbtk-varobj.c, gdbtk-wrapper.c, gdbtk-wrapper.h, gdbtk.c,
- gdbtk.h: Eliminate use of PARAMS from declarations in these
- files.
-
-2000-06-08 Fernando Nasser <fnasser@cygnus.com>
-
- * gdbtk-cmds.c (get_register): Allow editing of typed registers if
- the type is a union with the first tag equal to the register name.
-
-Thu Jun 8 17:59:01 2000 Andrew Cagney <cagney@b1.cygnus.com>
-
- (gdb_load_info): Use make_cleanup_bfd_close.
- (gdb_search): Use make_cleanup_free_search_symbols.
- * gdbtk.c (cleanup_init): Change signature to match make_cleanups.
- (gdbtk_init): Discard make_cleanup_func cast.
- * gdbtk-cmds.c (gdb_eval): Ditto.
-
-2000-06-06 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * gdbtk.c: Remove CYGWIN32 conditional around timer machinery.
- Cygwin can handle timers fine now.
-
-2000-04-17 Jonathan Larmour <jlarmour@redhat.co.uk>
-
- * ChangeLog-gdbtk: Renamed to ChangeLog
- * ChangeLog: New file
- * gdbtk-cmds.c, gdbtk-hooks.c, gdbtk-variable.c, gdbtk-varobj.c,
- gdbtk-wrapper.h, gdbtk-wrapper.c, gdbtk.h, gdbtk.c: No need for
- changelog-default-name hint for Emacs now
-
-2000-04-14 Jonathan Larmour <jlarmour@redhat.co.uk>
-
- * gdbtk.c (gdbtk_init): For now, reset gdb_stdtarg to gdb_stdout
- when using gdbtk.
-
-2000-04-01 Jim Blandy <jimb@redhat.com>
-
- * gdbtk-hooks.c (gdbtk_restore_result_ptr): New function.
- * gdbtk.h (gdbtk_restore_result_ptr): Declare it.
- * gdbtk-cmds.c (gdbtk_load_asm): Use it to restore the old value
- of result_ptr, in case we get errors while disassembling things.
-
-2000-03-28 Jim Blandy <jimb@redhat.com>
-
- Handle the fact that there are holes in the register numbering.
- * gdbtk-cmds.c (gdb_regnames): If given the -numbers option,
- return the register numbers along with their names.
- (get_register_name): Record both the register name and number, if
- requested.
-
-2000-03-13 James Ingham <jingham@leda.cygnus.com>
-
- * gdbtk-varobj.c (variable_create): Pass the correct
- "how_specified" flag to the varobj_create routine.
-
-2000-02-29 James Ingham <jingham@leda.cygnus.com>
-
- * gdbtk-cmds.c (gdb_disassemble_driver): The to_shortname for
- Linux is "linuxthreads", not "linux-threads", so we have to change
- the heuristic to account for this. This fixes a crash when trying
- to disassemble from shared libraries.
-
-2000-02-23 Keith R Seitz <kseitz@nwlink.com>
-
- * gdbtk-wrapper.h: Add declarations for GDB_get_prev_frame, GDB_get_next_frame,
- GDB_find_relative_frame, GDB_get_current_frame.
- * gdbtk-wrapper.c (GDB_get_prev_frame, wrap_get_prev_frame): New functions.
- (GDB_get_next_frame, wrap_get_next_frame): New functions.
- (GDB_find_relative_frame, wrap_find_relative_frame): New functions.
- (GDB_get_current_frame, wrap_get_current_frame): New functions.
-
- * gdbtk-hooks.c (gdbtk_add_hooks): Use "specify_exec_file_hook" so
- that our hook is added to the list of hooks run instead of overwriting
- all other hooks.
-
- * gdbtk-cmds.c (gdb_stack): Wrap all calls to internal functions and
- deal with errors more gracefully.
-
-Wed Feb 23 13:01:36 2000 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbtk-cmds.c (gdbtk_dis_asm_read_memory): Change LEN to unsigned
- long. Match ../include/dis-asm.h change.
-
-Fri Feb 4 23:19:03 2000 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbtk.c (gdbtk_init): Update default path to tcl code - now
- gdbtk/library.
-
-Fri Feb 4 23:19:03 2000 Andrew Cagney <cagney@b1.cygnus.com>
-
- * ChangeLog-gdbtk, gdbtk-cmds.c, gdbtk-hooks.c, gdbtk-variable.c,
- gdbtk-varobj.c, gdbtk-wrapper.c, gdbtk-wrapper.h, gdbtk.c,
- gdbtk.h: Moved here from the top level GDB directory.
-
-Tue Feb 1 00:17:12 2000 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbtk-hooks.c, gdbtk-variable.c, gdbtk-wrapper.c,
- gdbtk-wrapper.h, gdbtk.h: Update to reflect rename of gdb-file /
- GDB_FILE to ui-file / ``struct ui_file''.
-
-2000-01-31 Keith Seitz <kseitz@nwlink.com>
-
- * gdbtk-cmds.c (gdb_disassemble_driver) If using multi-arch, set the
- architecture in the disassembly info.
-
-Mon Jan 31 18:32:06 2000 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbtk-variable.c, gdbtk-cmds.c, gdbtk.c: Include "tui/tui-file.h"
-
-Mon Jan 3 01:09:24 2000 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbtk-cmds.c (gdb_get_mem): Use builtin_type_int32 et.al. to
- force the word size to 32 bits.
-
-
-Local Variables:
-mode: change-log
-left-margin: 8
-fill-column: 74
-version-control: never
-End:
diff --git a/gdb/gdbtk/generic/gdbtk-bp.c b/gdb/gdbtk/generic/gdbtk-bp.c
deleted file mode 100644
index 932ec1510aa..00000000000
--- a/gdb/gdbtk/generic/gdbtk-bp.c
+++ /dev/null
@@ -1,995 +0,0 @@
-/* Tcl/Tk command definitions for Insight - Breakpoints.
- Copyright (C) 2001, 2002 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-#include "defs.h"
-#include "symtab.h"
-#include "symfile.h"
-#include "source.h"
-#include "linespec.h"
-#include "breakpoint.h"
-#include "tracepoint.h"
-#include "gdb_string.h"
-#include <tcl.h>
-#include "gdbtk.h"
-#include "gdbtk-cmds.h"
-
-/* From breakpoint.c */
-extern struct breakpoint *breakpoint_chain;
-
-/* From gdbtk-hooks.c */
-extern void report_error (void);
-
-/* These two lookup tables are used to translate the type & disposition fields
- of the breakpoint structure (respectively) into something gdbtk understands.
- They are also used in gdbtk-hooks.c */
-
-char *bptypes[] =
- {"none", "breakpoint", "hw breakpoint", "until",
- "finish", "watchpoint", "hw watchpoint",
- "read watchpoint", "acc watchpoint",
- "longjmp", "longjmp resume", "step resume",
- "sigtramp", "watchpoint scope",
- "call dummy", "shlib events", "catch load",
- "catch unload", "catch fork", "catch vfork",
- "catch exec", "catch catch", "catch throw"
- };
-char *bpdisp[] =
- {"delete", "delstop", "disable", "donttouch"};
-
-/* Is this breakpoint interesting to a user interface? */
-#define BREAKPOINT_IS_INTERESTING(bp) \
-((bp)->type == bp_breakpoint \
- || (bp)->type == bp_hardware_breakpoint \
- || (bp)->type == bp_watchpoint \
- || (bp)->type == bp_hardware_watchpoint \
- || (bp)->type == bp_read_watchpoint \
- || (bp)->type == bp_access_watchpoint)
-
-/* Is this breakpoint a watchpoint? */
-#define BREAKPOINT_IS_WATCHPOINT(bp) \
-((bp)->type == bp_watchpoint \
- || (bp)->type == bp_hardware_watchpoint \
- || (bp)->type == bp_read_watchpoint \
- || (bp)->type == bp_access_watchpoint)
-
-/*
- * These are routines we need from breakpoint.c.
- * at some point make these static in breakpoint.c and move GUI code there
- */
-
-extern struct breakpoint *set_raw_breakpoint (struct symtab_and_line sal,
- enum bptype bp_type);
-extern void set_breakpoint_count (int);
-extern int breakpoint_count;
-
-/* Breakpoint/Tracepoint lists. Unfortunately, gdb forces us to
- keep a list of breakpoints, too. Why couldn't it be done like
- treacepoints? */
-#define DEFAULT_LIST_SIZE 32
-static struct breakpoint **breakpoint_list;
-static int breakpoint_list_size = DEFAULT_LIST_SIZE;
-
-/*
- * Forward declarations
- */
-
-/* Breakpoint-related functions */
-static int gdb_find_bp_at_addr (ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]);
-static int gdb_find_bp_at_line (ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]);
-static int gdb_get_breakpoint_info (ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST[]);
-static int gdb_get_breakpoint_list (ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST[]);
-static int gdb_set_bp (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST objv[]);
-static int gdb_set_bp_addr (ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]);
-
-/* Tracepoint-related functions */
-static int gdb_actions_command (ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]);
-static int gdb_get_trace_frame_num (ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]);
-static int gdb_get_tracepoint_info (ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]);
-static int gdb_get_tracepoint_list (ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]);
-static int gdb_trace_status (ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST[]);
-static int gdb_tracepoint_exists_command (ClientData, Tcl_Interp *,
- int, Tcl_Obj * CONST objv[]);
-static Tcl_Obj *get_breakpoint_commands (struct command_line *cmd);
-
-static int tracepoint_exists (char *args);
-
-/* Breakpoint/tracepoint events and related functions */
-
-void gdbtk_create_breakpoint (int);
-void gdbtk_delete_breakpoint (int);
-void gdbtk_modify_breakpoint (int);
-void gdbtk_create_tracepoint (int);
-void gdbtk_delete_tracepoint (int);
-void gdbtk_modify_tracepoint (int);
-static void breakpoint_notify (int, const char *);
-static void tracepoint_notify (int, const char *);
-
-int
-Gdbtk_Breakpoint_Init (Tcl_Interp *interp)
-{
- /* Breakpoint commands */
- Tcl_CreateObjCommand (interp, "gdb_find_bp_at_addr", gdbtk_call_wrapper,
- gdb_find_bp_at_addr, NULL);
- Tcl_CreateObjCommand (interp, "gdb_find_bp_at_line", gdbtk_call_wrapper,
- gdb_find_bp_at_line, NULL);
- Tcl_CreateObjCommand (interp, "gdb_get_breakpoint_info", gdbtk_call_wrapper,
- gdb_get_breakpoint_info, NULL);
- Tcl_CreateObjCommand (interp, "gdb_get_breakpoint_list", gdbtk_call_wrapper,
- gdb_get_breakpoint_list, NULL);
- Tcl_CreateObjCommand (interp, "gdb_set_bp", gdbtk_call_wrapper, gdb_set_bp, NULL);
- Tcl_CreateObjCommand (interp, "gdb_set_bp_addr", gdbtk_call_wrapper,
- gdb_set_bp_addr, NULL);
-
- /* Tracepoint commands */
- Tcl_CreateObjCommand (interp, "gdb_actions",
- gdbtk_call_wrapper, gdb_actions_command, NULL);
- Tcl_CreateObjCommand (interp, "gdb_get_trace_frame_num",
- gdbtk_call_wrapper, gdb_get_trace_frame_num, NULL);
- Tcl_CreateObjCommand (interp, "gdb_get_tracepoint_info",
- gdbtk_call_wrapper, gdb_get_tracepoint_info, NULL);
- Tcl_CreateObjCommand (interp, "gdb_get_tracepoint_list",
- gdbtk_call_wrapper, gdb_get_tracepoint_list, NULL);
- Tcl_CreateObjCommand (interp, "gdb_is_tracing",
- gdbtk_call_wrapper, gdb_trace_status, NULL);
- Tcl_CreateObjCommand (interp, "gdb_tracepoint_exists",
- gdbtk_call_wrapper, gdb_tracepoint_exists_command, NULL);
-
- /* Initialize our tables of BPs. */
- breakpoint_list = (struct breakpoint **) xmalloc (breakpoint_list_size * sizeof (struct breakpoint *));
- memset (breakpoint_list, 0, breakpoint_list_size * sizeof (struct breakpoint *));
-
- return TCL_OK;
-}
-
-/*
- * This section contains commands for manipulation of breakpoints.
- */
-
-/* set a breakpoint by source file and line number
- flags are as follows:
- least significant 2 bits are disposition, rest is
- type (normally 0).
-
- enum bptype {
- bp_breakpoint, Normal breakpoint
- bp_hardware_breakpoint, Hardware assisted breakpoint
- }
-
- Disposition of breakpoint. Ie: what to do after hitting it.
- enum bpdisp {
- del, Delete it
- del_at_next_stop, Delete at next stop, whether hit or not
- disable, Disable it
- donttouch Leave it alone
- };
-*/
-
-
-/* This implements the tcl command "gdb_find_bp_at_addr"
-
-* Tcl Arguments:
-* addr: CORE_ADDR
-* Tcl Result:
-* It returns a list of breakpoint numbers
-*/
-static int
-gdb_find_bp_at_addr (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- int i;
- CORE_ADDR addr;
- Tcl_WideInt waddr;
-
- if (objc != 2)
- {
- Tcl_WrongNumArgs (interp, 1, objv, "address");
- return TCL_ERROR;
- }
-
- if (Tcl_GetWideIntFromObj (interp, objv[1], &waddr) != TCL_OK)
- return TCL_ERROR;
- addr = waddr;
-
- Tcl_SetListObj (result_ptr->obj_ptr, 0, NULL);
- for (i = 0; i < breakpoint_list_size; i++)
- {
- if (breakpoint_list[i] != NULL
- && breakpoint_list[i]->loc->address == addr)
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr,
- Tcl_NewIntObj (i));
- }
-
- return TCL_OK;
-}
-
-/* This implements the tcl command "gdb_find_bp_at_line"
-
-* Tcl Arguments:
-* filename: the file in which to find the breakpoint
-* line: the line number for the breakpoint
-* Tcl Result:
-* It returns a list of breakpoint numbers
-*/
-static int
-gdb_find_bp_at_line (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-
-{
- struct symtab *s;
- int i, line;
-
- if (objc != 3)
- {
- Tcl_WrongNumArgs (interp, 1, objv, "filename line");
- return TCL_ERROR;
- }
-
- s = lookup_symtab (Tcl_GetStringFromObj (objv[1], NULL));
- if (s == NULL)
- return TCL_ERROR;
-
- if (Tcl_GetIntFromObj (interp, objv[2], &line) == TCL_ERROR)
- {
- result_ptr->flags = GDBTK_IN_TCL_RESULT;
- return TCL_ERROR;
- }
-
- Tcl_SetListObj (result_ptr->obj_ptr, 0, NULL);
- for (i = 0; i < breakpoint_list_size; i++)
- if (breakpoint_list[i] != NULL
- && breakpoint_list[i]->line_number == line
- && !strcmp (breakpoint_list[i]->source_file, s->filename))
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr,
- Tcl_NewIntObj (i));
-
- return TCL_OK;
-}
-
-/* This implements the tcl command gdb_get_breakpoint_info
- *
- * Tcl Arguments:
- * breakpoint_number
- * Tcl Result:
- * A list with {file, function, line_number, address, type, enabled?,
- * disposition, ignore_count, {list_of_commands},
- * condition, thread, hit_count user_specification}
- */
-static int
-gdb_get_breakpoint_info (ClientData clientData, Tcl_Interp *interp, int objc,
- Tcl_Obj *CONST objv[])
-{
- struct symtab_and_line sal;
- int bpnum;
- struct breakpoint *b;
- char *funcname, *filename;
-
- Tcl_Obj *new_obj;
-
- if (objc != 2)
- {
- Tcl_WrongNumArgs (interp, 1, objv, "breakpoint");
- return TCL_ERROR;
- }
-
- if (Tcl_GetIntFromObj (NULL, objv[1], &bpnum) != TCL_OK)
- {
- result_ptr->flags = GDBTK_IN_TCL_RESULT;
- return TCL_ERROR;
- }
-
- b = (bpnum <= breakpoint_list_size ? breakpoint_list[bpnum] : NULL);
- if (!b || b->type != bp_breakpoint)
- {
- gdbtk_set_result (interp, "Breakpoint #%d does not exist.", bpnum);
- return TCL_ERROR;
- }
-
- sal = find_pc_line (b->loc->address, 0);
-
- filename = symtab_to_filename (sal.symtab);
- if (filename == NULL)
- filename = "";
-
- Tcl_SetListObj (result_ptr->obj_ptr, 0, NULL);
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr,
- Tcl_NewStringObj (filename, -1));
-
- funcname = pc_function_name (b->loc->address);
- new_obj = Tcl_NewStringObj (funcname, -1);
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr, new_obj);
-
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr,
- Tcl_NewIntObj (b->line_number));
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr,
- Tcl_NewStringObj (core_addr_to_string
- (b->loc->address),
- -1));
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr,
- Tcl_NewStringObj (bptypes[b->type], -1));
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr,
- Tcl_NewBooleanObj (b->enable_state == bp_enabled));
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr,
- Tcl_NewStringObj (bpdisp[b->disposition], -1));
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr,
- Tcl_NewIntObj (b->ignore_count));
-
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr,
- get_breakpoint_commands (b->commands));
-
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr,
- Tcl_NewStringObj (b->cond_string, -1));
-
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr,
- Tcl_NewIntObj (b->thread));
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr,
- Tcl_NewIntObj (b->hit_count));
-
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr,
- Tcl_NewStringObj (BREAKPOINT_IS_WATCHPOINT (b)
- ? b->exp_string
- : b->addr_string, -1));
-
- return TCL_OK;
-}
-
-/* Helper function for gdb_get_breakpoint_info, this function is
- responsible for figuring out what to type at the "commands" command
- in gdb's cli in order to get at the same command list passed here. */
-
-static Tcl_Obj *
-get_breakpoint_commands (struct command_line *cmd)
-{
- Tcl_Obj *obj, *tmp;
-
- obj = Tcl_NewObj ();
- while (cmd != NULL)
- {
- switch (cmd->control_type)
- {
- case simple_control:
- /* A simple command. Just append it. */
- Tcl_ListObjAppendElement (NULL, obj,
- Tcl_NewStringObj (cmd->line, -1));
- break;
-
- case break_control:
- /* A loop_break */
- Tcl_ListObjAppendElement (NULL, obj,
- Tcl_NewStringObj ("loop_break", -1));
- break;
-
- case continue_control:
- /* A loop_continue */
- Tcl_ListObjAppendElement (NULL, obj,
- Tcl_NewStringObj ("loop_continue", -1));
- break;
-
- case while_control:
- /* A while loop. Must append "end" to the end of it. */
- tmp = Tcl_NewStringObj ("while ", -1);
- Tcl_AppendToObj (tmp, cmd->line, -1);
- Tcl_ListObjAppendElement (NULL, obj, tmp);
- Tcl_ListObjAppendList (NULL, obj,
- get_breakpoint_commands (*cmd->body_list));
- Tcl_ListObjAppendElement (NULL, obj,
- Tcl_NewStringObj ("end", -1));
- break;
-
- case if_control:
- /* An if statement. cmd->body_list[0] is the true part,
- cmd->body_list[1] contains the "else" (false) part. */
- tmp = Tcl_NewStringObj ("if ", -1);
- Tcl_AppendToObj (tmp, cmd->line, -1);
- Tcl_ListObjAppendElement (NULL, obj, tmp);
- Tcl_ListObjAppendList (NULL, obj,
- get_breakpoint_commands (cmd->body_list[0]));
- if (cmd->body_count == 2)
- {
- Tcl_ListObjAppendElement (NULL, obj,
- Tcl_NewStringObj ("else", -1));
- Tcl_ListObjAppendList (NULL, obj,
- get_breakpoint_commands(cmd->body_list[1]));
- }
- Tcl_ListObjAppendElement (NULL, obj,
- Tcl_NewStringObj ("end", -1));
- break;
-
- case invalid_control:
- /* Something invalid. Just skip it. */
- break;
- }
-
- cmd = cmd->next;
- }
-
- return obj;
-}
-
-/* This implements the tcl command gdb_get_breakpoint_list
- * It builds up a list of the current breakpoints.
- *
- * Tcl Arguments:
- * None.
- * Tcl Result:
- * A list of breakpoint numbers.
- */
-static int
-gdb_get_breakpoint_list (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- int i;
- Tcl_Obj *new_obj;
-
- if (objc != 1)
- {
- Tcl_WrongNumArgs (interp, 1, objv, NULL);
- return TCL_ERROR;
- }
-
- for (i = 0; i < breakpoint_list_size; i++)
- {
- if (breakpoint_list[i] != NULL
- && breakpoint_list[i]->type == bp_breakpoint)
- {
- new_obj = Tcl_NewIntObj (i);
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr, new_obj);
- }
- }
-
- return TCL_OK;
-}
-
-/* This implements the tcl command "gdb_set_bp"
- * It sets breakpoints, and notifies the GUI.
- *
- * Tcl Arguments:
- * filename: the file in which to set the breakpoint
- * line: the line number for the breakpoint
- * type: the type of the breakpoint
- * thread: optional thread number
- * Tcl Result:
- * The return value of the call to gdbtk_tcl_breakpoint.
- */
-static int
-gdb_set_bp (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- struct symtab_and_line sal;
- int line, thread = -1;
- struct breakpoint *b;
- char *buf, *typestr;
- enum bpdisp disp;
-
- if (objc != 4 && objc != 5)
- {
- Tcl_WrongNumArgs (interp, 1, objv, "filename line type ?thread?");
- return TCL_ERROR;
- }
-
- sal.symtab = lookup_symtab (Tcl_GetStringFromObj (objv[1], NULL));
- if (sal.symtab == NULL)
- return TCL_ERROR;
-
- if (Tcl_GetIntFromObj (interp, objv[2], &line) == TCL_ERROR)
- {
- result_ptr->flags = GDBTK_IN_TCL_RESULT;
- return TCL_ERROR;
- }
-
- typestr = Tcl_GetStringFromObj (objv[3], NULL);
- if (strncmp (typestr, "temp", 4) == 0)
- disp = disp_del;
- else if (strncmp (typestr, "normal", 6) == 0)
- disp = disp_donttouch;
- else
- {
- gdbtk_set_result (interp, "type must be \"temp\" or \"normal\"");
- return TCL_ERROR;
- }
-
- if (objc == 5)
- {
- if (Tcl_GetIntFromObj (interp, objv[4], &thread) == TCL_ERROR)
- {
- result_ptr->flags = GDBTK_IN_TCL_RESULT;
- return TCL_ERROR;
- }
- }
-
- sal.line = line;
- if (!find_line_pc (sal.symtab, sal.line, &sal.pc))
- return TCL_ERROR;
-
- sal.section = find_pc_overlay (sal.pc);
- b = set_raw_breakpoint (sal, bp_breakpoint);
- set_breakpoint_count (breakpoint_count + 1);
- b->number = breakpoint_count;
- b->disposition = disp;
- b->thread = thread;
-
- /* FIXME: this won't work for duplicate basenames! */
- xasprintf (&buf, "%s:%d", lbasename (Tcl_GetStringFromObj (objv[1], NULL)),
- line);
- b->addr_string = xstrdup (buf);
- free(buf);
-
- /* now send notification command back to GUI */
- breakpoint_create_event (b->number);
- return TCL_OK;
-}
-
-/* This implements the tcl command "gdb_set_bp_addr"
- * It sets breakpoints, and notifies the GUI.
- *
- * Tcl Arguments:
- * addr: the CORE_ADDR at which to set the breakpoint
- * type: the type of the breakpoint
- * thread: optional thread number
- * Tcl Result:
- * The return value of the call to gdbtk_tcl_breakpoint.
- */
-static int
-gdb_set_bp_addr (ClientData clientData, Tcl_Interp *interp, int objc,
- Tcl_Obj *CONST objv[])
-
-{
- struct symtab_and_line sal;
- int thread = -1;
- CORE_ADDR addr;
- Tcl_WideInt waddr;
- struct breakpoint *b;
- char *saddr, *typestr;
- enum bpdisp disp;
-
- if (objc != 3 && objc != 4)
- {
- Tcl_WrongNumArgs (interp, 1, objv, "address type ?thread?");
- return TCL_ERROR;
- }
-
- if (Tcl_GetWideIntFromObj (interp, objv[1], &waddr) != TCL_OK)
- return TCL_ERROR;
- addr = waddr;
- saddr = Tcl_GetStringFromObj (objv[1], NULL);
-
- typestr = Tcl_GetStringFromObj (objv[2], NULL);
- if (strncmp (typestr, "temp", 4) == 0)
- disp = disp_del;
- else if (strncmp (typestr, "normal", 6) == 0)
- disp = disp_donttouch;
- else
- {
- gdbtk_set_result (interp, "type must be \"temp\" or \"normal\"");
- return TCL_ERROR;
- }
-
- if (objc == 4)
- {
- if (Tcl_GetIntFromObj (interp, objv[3], &thread) == TCL_ERROR)
- {
- result_ptr->flags = GDBTK_IN_TCL_RESULT;
- return TCL_ERROR;
- }
- }
-
- sal = find_pc_line (addr, 0);
- sal.pc = addr;
- b = set_raw_breakpoint (sal, bp_breakpoint);
- set_breakpoint_count (breakpoint_count + 1);
- b->number = breakpoint_count;
- b->disposition = disp;
- b->thread = thread;
- b->addr_string = xstrdup (saddr);
-
- /* now send notification command back to GUI */
- breakpoint_create_event (b->number);
- return TCL_OK;
-}
-
-/*
- * This section contains functions that deal with breakpoint
- * events from gdb.
- */
-
-/* The next three functions use breakpoint_notify to allow the GUI
- * to handle creating, deleting and modifying breakpoints. These three
- * functions are put into the appropriate gdb hooks in gdbtk_init.
- */
-
-void
-gdbtk_create_breakpoint (int num)
-{
- struct breakpoint *b;
- for (b = breakpoint_chain; b != NULL; b = b->next)
- {
- if (b->number == num)
- break;
- }
-
- if (b == NULL || !BREAKPOINT_IS_INTERESTING (b))
- return;
-
- /* Check if there is room to store it */
- if (num >= breakpoint_list_size)
- {
- int oldsize = breakpoint_list_size;
- while (num >= breakpoint_list_size)
- breakpoint_list_size += DEFAULT_LIST_SIZE;
- breakpoint_list = (struct breakpoint **) xrealloc (breakpoint_list, breakpoint_list_size * sizeof (struct breakpoint *));
- memset (&(breakpoint_list[oldsize]), 0, (breakpoint_list_size - oldsize) * sizeof (struct breakpoint *));
- }
-
- breakpoint_list[num] = b;
- breakpoint_notify (num, "create");
-}
-
-void
-gdbtk_delete_breakpoint (int num)
-{
- if (num >= 0
- && num <= breakpoint_list_size
- && breakpoint_list[num] != NULL)
- {
- breakpoint_notify (num, "delete");
- breakpoint_list[num] = NULL;
- }
-}
-
-void
-gdbtk_modify_breakpoint (int num)
-{
- if (num >= 0)
- breakpoint_notify (num, "modify");
-}
-
-/* This is the generic function for handling changes in
- * a breakpoint. It routes the information to the Tcl
- * command "gdbtk_tcl_breakpoint" in the form:
- * gdbtk_tcl_breakpoint action b_number b_address b_line b_file
- * On error, the error string is written to gdb_stdout.
- */
-static void
-breakpoint_notify (int num, const char *action)
-{
- char *buf;
-
- if (num > breakpoint_list_size
- || num < 0
- || breakpoint_list[num] == NULL
- /* FIXME: should not be so restrictive... */
- || breakpoint_list[num]->type != bp_breakpoint)
- return;
-
- /* We ensure that ACTION contains no special Tcl characters, so we
- can do this. */
- xasprintf (&buf, "gdbtk_tcl_breakpoint %s %d", action, num);
-
- if (Tcl_Eval (gdbtk_interp, buf) != TCL_OK)
- report_error ();
- free(buf);
-}
-
-/*
- * This section contains the commands that deal with tracepoints:
- */
-
-/* This implements the tcl command gdb_actions
- * It sets actions for a given tracepoint.
- *
- * Tcl Arguments:
- * number: the tracepoint in question
- * actions: the actions to add to this tracepoint
- * Tcl Result:
- * None.
- */
-
-static int
-gdb_actions_command (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- struct tracepoint *tp;
- Tcl_Obj **actions;
- int nactions, i, len;
- char *number, *args, *action;
- long step_count;
- struct action_line *next = NULL, *temp;
- enum actionline_type linetype;
-
- if (objc != 3)
- {
- Tcl_WrongNumArgs (interp, 1, objv, "number actions");
- return TCL_ERROR;
- }
-
- args = number = Tcl_GetStringFromObj (objv[1], NULL);
- tp = get_tracepoint_by_number (&args, 0, 0);
- if (tp == NULL)
- {
- Tcl_AppendStringsToObj (result_ptr->obj_ptr, "Tracepoint \"",
- number, "\" does not exist", NULL);
- return TCL_ERROR;
- }
-
- /* Free any existing actions */
- if (tp->actions != NULL)
- free_actions (tp);
-
- step_count = 0;
-
- Tcl_ListObjGetElements (interp, objv[2], &nactions, &actions);
-
- /* Add the actions to the tracepoint */
- for (i = 0; i < nactions; i++)
- {
- temp = xmalloc (sizeof (struct action_line));
- temp->next = NULL;
- action = Tcl_GetStringFromObj (actions[i], &len);
- temp->action = savestring (action, len);
-
- linetype = validate_actionline (&(temp->action), tp);
-
- if (linetype == BADLINE)
- {
- free (temp);
- continue;
- }
-
- if (next == NULL)
- {
- tp->actions = temp;
- next = temp;
- }
- else
- {
- next->next = temp;
- next = temp;
- }
- }
-
- return TCL_OK;
-}
-
-static int
-gdb_get_trace_frame_num (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- if (objc != 1)
- {
- Tcl_WrongNumArgs (interp, 1, objv, "linespec");
- return TCL_ERROR;
- }
-
- Tcl_SetIntObj (result_ptr->obj_ptr, get_traceframe_number ());
- return TCL_OK;
-
-}
-
-static int
-gdb_get_tracepoint_info (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- struct symtab_and_line sal;
- int tpnum;
- struct tracepoint *tp;
- struct action_line *al;
- Tcl_Obj *action_list;
- char *filename, *funcname;
-
- if (objc != 2)
- {
- Tcl_WrongNumArgs (interp, 1, objv, "tpnum");
- return TCL_ERROR;
- }
-
- if (Tcl_GetIntFromObj (NULL, objv[1], &tpnum) != TCL_OK)
- {
- result_ptr->flags |= GDBTK_IN_TCL_RESULT;
- return TCL_ERROR;
- }
-
- ALL_TRACEPOINTS (tp)
- if (tp->number == tpnum)
- break;
-
- if (tp == NULL)
- {
- gdbtk_set_result (interp, "Tracepoint #%d does not exist", tpnum);
- return TCL_ERROR;
- }
-
- Tcl_SetListObj (result_ptr->obj_ptr, 0, NULL);
- sal = find_pc_line (tp->address, 0);
- filename = symtab_to_filename (sal.symtab);
- if (filename == NULL)
- filename = "N/A";
- Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr,
- Tcl_NewStringObj (filename, -1));
-
- funcname = pc_function_name (tp->address);
- Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr, Tcl_NewStringObj
- (funcname, -1));
-
- Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr,
- Tcl_NewIntObj (sal.line));
- Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr,
- Tcl_NewStringObj (core_addr_to_string (tp->address), -1));
- Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr,
- Tcl_NewIntObj (tp->enabled_p));
- Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr,
- Tcl_NewIntObj (tp->pass_count));
- Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr,
- Tcl_NewIntObj (tp->step_count));
- Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr,
- Tcl_NewIntObj (tp->thread));
- Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr,
- Tcl_NewIntObj (tp->hit_count));
-
- /* Append a list of actions */
- action_list = Tcl_NewObj ();
- for (al = tp->actions; al != NULL; al = al->next)
- {
- Tcl_ListObjAppendElement (interp, action_list,
- Tcl_NewStringObj (al->action, -1));
- }
- Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr, action_list);
-
- return TCL_OK;
-}
-
-/* return a list of all tracepoint numbers in interpreter */
-static int
-gdb_get_tracepoint_list (ClientData clientData,
- Tcl_Interp *interp,
- int objc,
- Tcl_Obj *CONST objv[])
-{
- struct tracepoint *tp;
-
- Tcl_SetListObj (result_ptr->obj_ptr, 0, NULL);
-
- ALL_TRACEPOINTS (tp)
- Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr,
- Tcl_NewIntObj (tp->number));
-
- return TCL_OK;
-}
-
-static int
-gdb_trace_status (ClientData clientData,
- Tcl_Interp *interp,
- int objc,
- Tcl_Obj *CONST objv[])
-{
- int result = 0;
-
- if (trace_running_p)
- result = 1;
-
- Tcl_SetIntObj (result_ptr->obj_ptr, result);
- return TCL_OK;
-}
-
-/* returns -1 if not found, tracepoint # if found */
-static int
-tracepoint_exists (char *args)
-{
- struct tracepoint *tp;
- char **canonical;
- struct symtabs_and_lines sals;
- char *file = NULL;
- int result = -1;
-
- sals = decode_line_1 (&args, 1, NULL, 0, &canonical, NULL);
- if (sals.nelts == 1)
- {
- resolve_sal_pc (&sals.sals[0]);
- file = xmalloc (strlen (sals.sals[0].symtab->dirname)
- + strlen (sals.sals[0].symtab->filename) + 1);
- if (file != NULL)
- {
- strcpy (file, sals.sals[0].symtab->dirname);
- strcat (file, sals.sals[0].symtab->filename);
-
- ALL_TRACEPOINTS (tp)
- {
- if (tp->address == sals.sals[0].pc)
- result = tp->number;
-#if 0
- /* Why is this here? This messes up assembly traces */
- else if (tp->source_file != NULL
- && strcmp (tp->source_file, file) == 0
- && sals.sals[0].line == tp->line_number)
- result = tp->number;
-#endif
- }
- }
- }
- if (file != NULL)
- free (file);
- return result;
-}
-
-static int
-gdb_tracepoint_exists_command (ClientData clientData,
- Tcl_Interp *interp,
- int objc,
- Tcl_Obj *CONST objv[])
-{
- char *args;
-
- if (objc != 2)
- {
- Tcl_WrongNumArgs (interp, 1, objv,
- "function:line|function|line|*addr");
- return TCL_ERROR;
- }
-
- args = Tcl_GetStringFromObj (objv[1], NULL);
-
- Tcl_SetIntObj (result_ptr->obj_ptr, tracepoint_exists (args));
- return TCL_OK;
-}
-
-/*
- * This section contains functions which deal with tracepoint
- * events from gdb.
- */
-
-void
-gdbtk_create_tracepoint (int num)
-{
- tracepoint_notify (num, "create");
-}
-
-void
-gdbtk_delete_tracepoint (int num)
-{
- tracepoint_notify (num, "delete");
-}
-
-void
-gdbtk_modify_tracepoint (int num)
-{
- tracepoint_notify (num, "modify");
-}
-
-static void
-tracepoint_notify (int num, const char *action)
-{
- char *buf;
-
- /* We ensure that ACTION contains no special Tcl characters, so we
- can do this. */
- xasprintf (&buf, "gdbtk_tcl_tracepoint %s %d", action, num);
-
- if (Tcl_Eval (gdbtk_interp, buf) != TCL_OK)
- report_error ();
- free(buf);
-}
diff --git a/gdb/gdbtk/generic/gdbtk-cmds.c b/gdb/gdbtk/generic/gdbtk-cmds.c
deleted file mode 100644
index 8bc3732c1d0..00000000000
--- a/gdb/gdbtk/generic/gdbtk-cmds.c
+++ /dev/null
@@ -1,3023 +0,0 @@
-/* Tcl/Tk command definitions for Insight.
- Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004
- Free Software Foundation, Inc.
-
- Written by Stu Grossman <grossman@cygnus.com> of Cygnus Support.
- Substantially augmented by Martin Hunt, Keith Seitz & Jim Ingham of
- Cygnus Support.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-#include "defs.h"
-#include "inferior.h"
-#include "source.h"
-#include "symfile.h"
-#include "objfiles.h"
-#include "gdbcore.h"
-#include "demangle.h"
-#include "linespec.h"
-#include "tui/tui-file.h"
-#include "top.h"
-#include "annotate.h"
-#include "block.h"
-#include "dictionary.h"
-#include "filenames.h"
-#include "disasm.h"
-#include "value.h"
-#include "exceptions.h"
-
-/* tcl header files includes varargs.h unless HAS_STDARG is defined,
- but gdb uses stdarg.h, so make sure HAS_STDARG is defined. */
-#define HAS_STDARG 1
-
-#include <itcl.h>
-#include <tcl.h>
-#include <tk.h>
-
-#include "guitcl.h"
-#include "gdbtk.h"
-#include "gdbtk-wrapper.h"
-#include "gdbtk-cmds.h"
-
-#include <signal.h>
-#include <fcntl.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
-#include <sys/stat.h>
-
-#include "gdb_string.h"
-#include "dis-asm.h"
-#include "gdbcmd.h"
-
-#ifdef __CYGWIN__
-#include <sys/cygwin.h> /* for cygwin_conv_to_full_win32_path */
-#endif
-
-#ifdef HAVE_CTYPE_H
-#include <ctype.h> /* for isprint() */
-#endif
-
-/* Various globals we reference. */
-extern char *source_path;
-
-/* These two objects hold boolean true and false,
- and are shared by all the list objects that gdb_listfuncs
- returns. */
-
-static Tcl_Obj *mangled, *not_mangled;
-
-/* These two control how the GUI behaves when gdb is either tracing or loading.
- They are used in this file & gdbtk_hooks.c */
-
-int No_Update = 0;
-int load_in_progress = 0;
-
-/* This Structure is used in gdb_disassemble_driver.
- We need a different sort of line table from the normal one cuz we can't
- depend upon implicit line-end pc's for lines to do the
- reordering in this function. */
-
-struct my_line_entry
-{
- int line;
- CORE_ADDR start_pc;
- CORE_ADDR end_pc;
-};
-
-/* Use this to pass the Tcl Text widget command and the open file
- descriptor to the disassembly load command. */
-
-struct disassembly_client_data
-{
- FILE *fp;
- int file_opened_p;
- int widget_line_no;
- Tcl_Interp *interp;
- char *widget;
- Tcl_Obj *result_obj[3];
- const char *asm_argv[14];
- const char *source_argv[7];
- char *map_arr;
- Tcl_DString src_to_line_prefix;
- Tcl_DString pc_to_line_prefix;
- Tcl_DString line_to_pc_prefix;
- Tcl_CmdInfo cmd;
-};
-
-/* This variable determines where memory used for disassembly is read
- from. See note in gdbtk.h for details. */
-/* NOTE: cagney/2003-09-08: This variable is unused. */
-int disassemble_from_exec = -1;
-
-extern int gdb_variable_init (Tcl_Interp * interp);
-
-/*
- * Declarations for routines exported from this file
- */
-
-int Gdbtk_Init (Tcl_Interp * interp);
-
-/*
- * Declarations for routines used only in this file.
- */
-
-static int compare_lines (const PTR, const PTR);
-static int comp_files (const void *, const void *);
-static int gdb_clear_file (ClientData, Tcl_Interp * interp, int,
- Tcl_Obj * CONST[]);
-static int gdb_cmd (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]);
-static int gdb_confirm_quit (ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST[]);
-static int gdb_entry_point (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]);
-static int gdb_eval (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]);
-static int gdb_find_file_command (ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]);
-static int gdb_force_quit (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]);
-static int gdb_get_file_command (ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]);
-static int gdb_get_function_command (ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]);
-static int gdb_get_line_command (ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]);
-static int gdb_update_mem (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]);
-static int gdb_set_mem (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]);
-static int gdb_immediate_command (ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST[]);
-static int gdb_incr_addr (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]);
-static int gdb_CA_to_TAS (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]);
-static int gdb_listfiles (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]);
-static int gdb_listfuncs (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]);
-static int gdb_loadfile (ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]);
-static int gdb_load_disassembly (ClientData clientData, Tcl_Interp
- * interp, int objc, Tcl_Obj * CONST objv[]);
-static int gdb_get_inferior_args (ClientData clientData,
- Tcl_Interp *interp,
- int objc, Tcl_Obj * CONST objv[]);
-static int gdb_set_inferior_args (ClientData clientData,
- Tcl_Interp *interp,
- int objc, Tcl_Obj * CONST objv[]);
-static int gdb_load_info (ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]);
-static int gdb_loc (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]);
-static int gdb_path_conv (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]);
-static int gdb_prompt_command (ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]);
-static int gdb_restore_fputs (ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST[]);
-static int gdb_search (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST objv[]);
-static int gdb_stop (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]);
-static int gdb_target_has_execution_command (ClientData,
- Tcl_Interp *, int,
- Tcl_Obj * CONST[]);
-static void gdbtk_load_source (ClientData clientData,
- struct symtab *symtab,
- int start_line, int end_line);
-static CORE_ADDR gdbtk_load_asm (ClientData clientData, CORE_ADDR pc,
- struct disassemble_info *di);
-static int gdb_disassemble_driver (CORE_ADDR low, CORE_ADDR high,
- int mixed_source_and_assembly,
- ClientData clientData,
- void (*print_source_fn) (ClientData, struct
- symtab *, int,
- int),
- CORE_ADDR (*print_asm_fn) (ClientData,
- CORE_ADDR,
- struct
- disassemble_info
- *));
-char *get_prompt (void);
-static int perror_with_name_wrapper (PTR args);
-static int wrapped_call (PTR opaque_args);
-static int hex2bin (const char *hex, char *bin, int count);
-static int fromhex (int a);
-
-
-/* Gdbtk_Init
- * This loads all the Tcl commands into the Tcl interpreter.
- *
- * Arguments:
- * interp - The interpreter into which to load the commands.
- *
- * Result:
- * A standard Tcl result.
- */
-
-int
-Gdbtk_Init (Tcl_Interp *interp)
-{
- Tcl_CreateObjCommand (interp, "gdb_cmd", gdbtk_call_wrapper, gdb_cmd, NULL);
- Tcl_CreateObjCommand (interp, "gdb_immediate", gdbtk_call_wrapper,
- gdb_immediate_command, NULL);
- Tcl_CreateObjCommand (interp, "gdb_loc", gdbtk_call_wrapper, gdb_loc, NULL);
- Tcl_CreateObjCommand (interp, "gdb_path_conv", gdbtk_call_wrapper, gdb_path_conv,
- NULL);
- Tcl_CreateObjCommand (interp, "gdb_listfiles", gdbtk_call_wrapper, gdb_listfiles,
- NULL);
- Tcl_CreateObjCommand (interp, "gdb_listfuncs", gdbtk_call_wrapper, gdb_listfuncs,
- NULL);
- Tcl_CreateObjCommand (interp, "gdb_entry_point", gdbtk_call_wrapper,
- gdb_entry_point, NULL);
- Tcl_CreateObjCommand (interp, "gdb_update_mem", gdbtk_call_wrapper, gdb_update_mem,
- NULL);
- Tcl_CreateObjCommand (interp, "gdb_set_mem", gdbtk_call_wrapper, gdb_set_mem,
- NULL);
- Tcl_CreateObjCommand (interp, "gdb_stop", gdbtk_call_wrapper, gdb_stop, NULL);
- Tcl_CreateObjCommand (interp, "gdb_restore_fputs", gdbtk_call_wrapper, gdb_restore_fputs,
- NULL);
- Tcl_CreateObjCommand (interp, "gdb_eval", gdbtk_call_wrapper, gdb_eval, NULL);
- Tcl_CreateObjCommand (interp, "gdb_incr_addr", gdbtk_call_wrapper, gdb_incr_addr, NULL);
- Tcl_CreateObjCommand (interp, "gdb_CA_to_TAS", gdbtk_call_wrapper, gdb_CA_to_TAS, NULL);
- Tcl_CreateObjCommand (interp, "gdb_clear_file", gdbtk_call_wrapper,
- gdb_clear_file, NULL);
- Tcl_CreateObjCommand (interp, "gdb_confirm_quit", gdbtk_call_wrapper,
- gdb_confirm_quit, NULL);
- Tcl_CreateObjCommand (interp, "gdb_force_quit", gdbtk_call_wrapper,
- gdb_force_quit, NULL);
- Tcl_CreateObjCommand (interp, "gdb_target_has_execution",
- gdbtk_call_wrapper,
- gdb_target_has_execution_command, NULL);
- Tcl_CreateObjCommand (interp, "gdb_load_info", gdbtk_call_wrapper, gdb_load_info,
- NULL);
- Tcl_CreateObjCommand (interp, "gdb_get_function", gdbtk_call_wrapper,
- gdb_get_function_command, NULL);
- Tcl_CreateObjCommand (interp, "gdb_get_line", gdbtk_call_wrapper,
- gdb_get_line_command, NULL);
- Tcl_CreateObjCommand (interp, "gdb_get_file", gdbtk_call_wrapper,
- gdb_get_file_command, NULL);
- Tcl_CreateObjCommand (interp, "gdb_prompt",
- gdbtk_call_wrapper, gdb_prompt_command, NULL);
- Tcl_CreateObjCommand (interp, "gdb_find_file",
- gdbtk_call_wrapper, gdb_find_file_command, NULL);
- Tcl_CreateObjCommand (interp, "gdb_loadfile", gdbtk_call_wrapper, gdb_loadfile,
- NULL);
- Tcl_CreateObjCommand (interp, "gdb_load_disassembly", gdbtk_call_wrapper,
- gdb_load_disassembly, NULL);
- Tcl_CreateObjCommand (gdbtk_interp, "gdb_search", gdbtk_call_wrapper,
- gdb_search, NULL);
- Tcl_CreateObjCommand (interp, "gdb_get_inferior_args", gdbtk_call_wrapper,
- gdb_get_inferior_args, NULL);
- Tcl_CreateObjCommand (interp, "gdb_set_inferior_args", gdbtk_call_wrapper,
- gdb_set_inferior_args, NULL);
-
- /* gdb_context is used for debugging multiple threads or tasks */
- Tcl_LinkVar (interp, "gdb_context_id",
- (char *) &gdb_context,
- TCL_LINK_INT | TCL_LINK_READ_ONLY);
-
- /* Make gdb's notion of the pwd visible. This is read-only because
- (1) it doesn't make sense to change it directly and (2) it is
- allocated using xmalloc and not Tcl_Alloc. You might think we
- could just use the Tcl `pwd' command. However, Tcl (erroneously,
- imho) maintains a cache of the current directory name, and
- doesn't provide a way for gdb to invalidate the cache. */
- Tcl_LinkVar (interp, "gdb_current_directory",
- (char *) &current_directory,
- TCL_LINK_STRING | TCL_LINK_READ_ONLY);
-
- /* Current gdb source file search path. This is read-only for
- reasons similar to those for gdb_current_directory. */
- Tcl_LinkVar (interp, "gdb_source_path",
- (char *) &source_path,
- TCL_LINK_STRING | TCL_LINK_READ_ONLY);
-
- /* Init variable interface... */
- if (gdb_variable_init (interp) != TCL_OK)
- return TCL_ERROR;
-
- /* Init breakpoint module */
- if (Gdbtk_Breakpoint_Init (interp) != TCL_OK)
- return TCL_ERROR;
-
- /* Init stack module */
- if (Gdbtk_Stack_Init (interp) != TCL_OK)
- return TCL_ERROR;
-
- /* Init register module */
- if (Gdbtk_Register_Init (interp) != TCL_OK)
- return TCL_ERROR;
-
- /* Determine where to disassemble from */
- Tcl_LinkVar (gdbtk_interp, "disassemble-from-exec",
- (char *) &disassemble_from_exec,
- TCL_LINK_INT);
-
- Tcl_PkgProvide (interp, "Gdbtk", GDBTK_VERSION);
- return TCL_OK;
-}
-
-/* This routine acts as a top-level for all GDB code called by Tcl/Tk. It
- handles cleanups, and uses catch_errors to trap calls to return_to_top_level
- (usually via error).
- This is necessary in order to prevent a longjmp out of the bowels of Tk,
- possibly leaving things in a bad state. Since this routine can be called
- recursively, it needs to save and restore the contents of the result_ptr as
- necessary. */
-
-int
-gdbtk_call_wrapper (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- struct wrapped_call_args wrapped_args;
- gdbtk_result new_result, *old_result_ptr;
- int wrapped_returned_error = 0;
-
- old_result_ptr = result_ptr;
- result_ptr = &new_result;
- result_ptr->obj_ptr = Tcl_NewObj ();
- result_ptr->flags = GDBTK_TO_RESULT;
-
- wrapped_args.func = (Tcl_ObjCmdProc *) clientData;
- wrapped_args.interp = interp;
- wrapped_args.objc = objc;
- wrapped_args.objv = objv;
- wrapped_args.val = TCL_OK;
-
- if (!catch_errors (wrapped_call, &wrapped_args, "", RETURN_MASK_ALL))
- {
-
- wrapped_args.val = TCL_ERROR; /* Flag an error for TCL */
-
- /* Make sure the timer interrupts are turned off. */
- gdbtk_stop_timer ();
-
- gdb_flush (gdb_stderr); /* Flush error output */
- gdb_flush (gdb_stdout); /* Sometimes error output comes here as well */
-
- /* If we errored out here, and the results were going to the
- console, then gdbtk_fputs will have gathered the result into the
- result_ptr. We also need to echo them out to the console here */
-
- gdb_flush (gdb_stderr); /* Flush error output */
- gdb_flush (gdb_stdout); /* Sometimes error output comes here as well */
-
- /* In case of an error, we may need to force the GUI into idle
- mode because gdbtk_call_command may have bombed out while in
- the command routine. */
-
- running_now = 0;
- Tcl_Eval (interp, "gdbtk_tcl_idle");
-
- }
- else
- {
- /* If the wrapped call returned an error directly, then we don't
- want to reset the result. */
- wrapped_returned_error = wrapped_args.val == TCL_ERROR;
- }
-
- /* do not suppress any errors -- a remote target could have errored */
- load_in_progress = 0;
-
- /*
- * Now copy the result over to the true Tcl result. If
- * GDBTK_TO_RESULT flag bit is set, this just copies a null object
- * over to the Tcl result, which is fine because we should reset the
- * result in this case anyway. If the wrapped command returned an
- * error, then we assume that the result is already set correctly.
- */
- if ((result_ptr->flags & GDBTK_IN_TCL_RESULT) || wrapped_returned_error)
- {
- Tcl_DecrRefCount (result_ptr->obj_ptr);
- }
- else
- {
- Tcl_SetObjResult (interp, result_ptr->obj_ptr);
- }
-
- result_ptr = old_result_ptr;
-
-#ifdef _WIN32
- close_bfds ();
-#endif
-
- return wrapped_args.val;
-}
-
-/*
- * This is the wrapper that is passed to catch_errors.
- */
-
-static int
-wrapped_call (PTR opaque_args)
-{
- struct wrapped_call_args *args = (struct wrapped_call_args *) opaque_args;
- args->val = (*args->func) (args->func, args->interp, args->objc, args->objv);
- return 1;
-}
-
-
-/*
- * This section contains the commands that control execution.
- */
-
-/* This implements the tcl command gdb_clear_file.
-
-* Prepare to accept a new executable file. This is called when we
-* want to clear away everything we know about the old file, without
-* asking the user. The Tcl code will have already asked the user if
-* necessary. After this is called, we should be able to run the
-* `file' command without getting any questions.
-*
-* Arguments:
-* None
-* Tcl Result:
-* None
-*/
-
-static int
-gdb_clear_file (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- if (objc != 1)
- {
- Tcl_WrongNumArgs (interp, 1, objv, NULL);
- return TCL_ERROR;
- }
-
- if (! ptid_equal (inferior_ptid, null_ptid) && target_has_execution)
- {
- if (attach_flag)
- target_detach (NULL, 0);
- else
- target_kill ();
- }
-
- if (target_has_execution)
- pop_target ();
-
- delete_command (NULL, 0);
- exec_file_clear (0);
- symbol_file_clear (0);
-
- return TCL_OK;
-}
-
-/* This implements the tcl command gdb_confirm_quit
- * Ask the user to confirm an exit request.
- *
- * Arguments:
- * None
- * Tcl Result:
- * A boolean, 1 if the user answered yes, 0 if no.
- */
-
-static int
-gdb_confirm_quit (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- int ret;
-
- if (objc != 1)
- {
- Tcl_WrongNumArgs (interp, 1, objv, NULL);
- return TCL_ERROR;
- }
-
- ret = quit_confirm ();
- Tcl_SetBooleanObj (result_ptr->obj_ptr, ret);
- return TCL_OK;
-}
-
-/* This implements the tcl command gdb_force_quit
- * Quit without asking for confirmation.
- *
- * Arguments:
- * None
- * Tcl Result:
- * None
- */
-
-static int
-gdb_force_quit (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- if (objc != 1)
- {
- Tcl_WrongNumArgs (interp, 1, objv, NULL);
- return TCL_ERROR;
- }
-
- quit_force ((char *) NULL, 1);
- return TCL_OK;
-}
-
-/* Pressing the stop button on the source window should attempt to
- * stop the target. If, after some short time, this fails, a dialog
- * should appear allowing the user to detach.
- *
- * The global GDBTK_FORCE_DETACH is set when we wish to detach from a
- * target. This value is returned by deprecated_ui_loop_hook
- * (x_event), indicating to callers that they should detach.
- *
- * Read the comments before x_event to find out how we (try) to keep
- * gdbtk alive while some other event loop has stolen control from us.
- */
-
-/*
- * This command implements the tcl command gdb_stop, which
- * is used to either stop the target or detach.
- * Note that it is assumed that a simulator or native target
- * can ALWAYS be stopped. Doing a "detach" on them has no effect.
- *
- * Arguments:
- * None or "detach"
- * Tcl Result:
- * None
- */
-
-static int
-gdb_stop (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- int force = 0;
- char *s;
-
- if (objc > 1)
- {
- s = Tcl_GetStringFromObj (objv[1], NULL);
- if (strcmp (s, "detach") == 0)
- force = 1;
- }
-
- if (force)
- {
- /* Set the "forcibly detach from target" flag. x_event will
- return this value to callers when they should forcibly detach. */
- gdbtk_force_detach = 1;
- }
- else
- {
- if (target_stop != target_ignore)
- target_stop ();
- else
- quit_flag = 1; /* hope something sees this */
- }
-
- return TCL_OK;
-}
-
-
-/*
- * This section contains Tcl commands that are wrappers for invoking
- * the GDB command interpreter.
- */
-
-
-/* This implements the tcl command `gdb_eval'.
- * It uses the gdb evaluator to return the value of
- * an expression in the current language
- *
- * Tcl Arguments:
- * expression - the expression to evaluate.
- * format - optional format character. Valid chars are:
- * o - octal
- * x - hex
- * d - decimal
- * u - unsigned decimal
- * t - binary
- * f - float
- * a - address
- * c - char
- * Tcl Result:
- * The result of the evaluation.
- */
-
-static int
-gdb_eval (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- struct expression *expr;
- struct cleanup *old_chain = NULL;
- int format = 0;
- value_ptr val;
- struct ui_file *stb;
- long dummy;
- char *result;
-
- if (objc != 2 && objc != 3)
- {
- Tcl_WrongNumArgs (interp, 1, objv, "expression [format]");
- return TCL_ERROR;
- }
-
- if (objc == 3)
- format = *(Tcl_GetStringFromObj (objv[2], NULL));
-
- expr = parse_expression (Tcl_GetStringFromObj (objv[1], NULL));
- old_chain = make_cleanup (free_current_contents, &expr);
- val = evaluate_expression (expr);
-
- /* "Print" the result of the expression evaluation. */
- stb = mem_fileopen ();
- make_cleanup_ui_file_delete (stb);
- val_print (value_type (val), value_contents (val),
- value_embedded_offset (val), VALUE_ADDRESS (val),
- stb, format, 0, 0, 0);
- result = ui_file_xstrdup (stb, &dummy);
- Tcl_SetObjResult (interp, Tcl_NewStringObj (result, -1));
- xfree (result);
- result_ptr->flags |= GDBTK_IN_TCL_RESULT;
-
- do_cleanups (old_chain);
- return TCL_OK;
-}
-
-/* This implements the tcl command "gdb_cmd".
-
-* It sends its argument to the GDB command scanner for execution.
-* This command will never cause the update, idle and busy hooks to be called
-* within the GUI.
-*
-* Tcl Arguments:
-* command - The GDB command to execute
-* from_tty - 1 indicates this comes to the console.
-* Pass this to the gdb command.
-* Tcl Result:
-* The output from the gdb command (except for the "load" & "while"
-* which dump their output to the console.
-*/
-
-static int
-gdb_cmd (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- int from_tty = 0;
-
- if (objc < 2 || objc > 3)
- {
- Tcl_WrongNumArgs (interp, 1, objv, "command ?from_tty?");
- return TCL_ERROR;
- }
-
- if (objc == 3)
- {
- if (Tcl_GetBooleanFromObj (NULL, objv[2], &from_tty) != TCL_OK)
- {
- gdbtk_set_result (interp, "from_tty must be a boolean.");
- return TCL_ERROR;
- }
- }
-
- if (running_now || load_in_progress)
- return TCL_OK;
-
- No_Update = 1;
-
- /* for the load instruction (and possibly others later) we
- set turn off the GDBTK_TO_RESULT flag bit so gdbtk_fputs()
- will not buffer all the data until the command is finished. */
-
- if ((strncmp ("load ", Tcl_GetStringFromObj (objv[1], NULL), 5) == 0))
- {
- result_ptr->flags &= ~GDBTK_TO_RESULT;
- load_in_progress = 1;
- }
-
- execute_command (Tcl_GetStringFromObj (objv[1], NULL), from_tty);
-
- if (load_in_progress)
- {
- load_in_progress = 0;
- result_ptr->flags |= GDBTK_TO_RESULT;
- }
-
- bpstat_do_actions (&stop_bpstat);
-
- return TCL_OK;
-}
-
-/*
- * This implements the tcl command "gdb_immediate"
- *
- * It does exactly the same thing as gdb_cmd, except NONE of its outut
- * is buffered. This will also ALWAYS cause the busy, update, and idle
- * hooks to be called, contrasted with gdb_cmd, which NEVER calls them.
- * It turns off the GDBTK_TO_RESULT flag, which diverts the result
- * to the console window.
- *
- * Tcl Arguments:
- * command - The GDB command to execute
- * from_tty - 1 to indicate this is from the console.
- * Tcl Result:
- * None.
- */
-
-static int
-gdb_immediate_command (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- int from_tty = 0;
-
- if (objc < 2 || objc > 3)
- {
- Tcl_WrongNumArgs (interp, 1, objv, "command ?from_tty?");
- return TCL_ERROR;
- }
-
- if (objc == 3)
- {
- if (Tcl_GetBooleanFromObj (NULL, objv[2], &from_tty) != TCL_OK)
- {
- gdbtk_set_result (interp, "from_tty must be a boolean.");
- return TCL_ERROR;
- }
- }
-
- if (running_now || load_in_progress)
- return TCL_OK;
-
- No_Update = 0;
-
- result_ptr->flags &= ~GDBTK_TO_RESULT;
-
- execute_command (Tcl_GetStringFromObj (objv[1], NULL), from_tty);
-
- bpstat_do_actions (&stop_bpstat);
-
- result_ptr->flags |= GDBTK_TO_RESULT;
-
- return TCL_OK;
-}
-
-/* This implements the tcl command "gdb_prompt"
-
-* It returns the gdb interpreter's prompt.
-*
-* Tcl Arguments:
-* None.
-* Tcl Result:
-* The prompt.
-*/
-
-static int
-gdb_prompt_command (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- Tcl_SetStringObj (result_ptr->obj_ptr, get_prompt (), -1);
- return TCL_OK;
-}
-
-
-/*
- * This section contains general informational commands.
- */
-
-/* This implements the tcl command "gdb_target_has_execution"
-
-* Tells whether the target is executing.
-*
-* Tcl Arguments:
-* None
-* Tcl Result:
-* A boolean indicating whether the target is executing.
-*/
-
-static int
-gdb_target_has_execution_command (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- int result = 0;
-
- if (target_has_execution && ! ptid_equal (inferior_ptid, null_ptid))
- result = 1;
-
- Tcl_SetBooleanObj (result_ptr->obj_ptr, result);
- return TCL_OK;
-}
-
-/* This implements the tcl command "gdb_get_inferior_args"
-
-* Returns inferior command line arguments as a string
-*
-* Tcl Arguments:
-* None
-* Tcl Result:
-* A string containing the inferior command line arguments
-*/
-
-static int
-gdb_get_inferior_args (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- if (objc != 1)
- {
- Tcl_WrongNumArgs (interp, 1, objv, NULL);
- return TCL_ERROR;
- }
-
- Tcl_SetStringObj (result_ptr->obj_ptr, get_inferior_args (), -1);
- return TCL_OK;
-}
-
-/* This implements the tcl command "gdb_set_inferior_args"
-
-* Sets inferior command line arguments
-*
-* Tcl Arguments:
-* A string containing the inferior command line arguments
-* Tcl Result:
-* None
-*/
-
-static int
-gdb_set_inferior_args (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- char *args;
-
- if (objc != 2)
- {
- Tcl_WrongNumArgs (interp, 1, objv, "argument");
- return TCL_ERROR;
- }
-
- args = Tcl_GetStringFromObj (objv[1], NULL);
-
- /* The xstrdup/xfree stuff is so that we maintain a coherent picture
- for gdb. I would expect the accessors to do this, but they
- don't. */
- args = xstrdup (args);
- args = set_inferior_args (args);
- xfree (args);
-
- return TCL_OK;
-}
-
-/* This implements the tcl command "gdb_load_info"
-
-* It returns information about the file about to be downloaded.
-*
-* Tcl Arguments:
-* filename: The file to open & get the info on.
-* Tcl Result:
-* A list consisting of the name and size of each section.
-*/
-
-static int
-gdb_load_info (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- bfd *loadfile_bfd;
- struct cleanup *old_cleanups;
- asection *s;
- Tcl_Obj *ob[2];
-
- char *filename = Tcl_GetStringFromObj (objv[1], NULL);
-
- loadfile_bfd = bfd_openr (filename, gnutarget);
- if (loadfile_bfd == NULL)
- {
- gdbtk_set_result (interp, "Open of %s failed", filename);
- return TCL_ERROR;
- }
- old_cleanups = make_cleanup_bfd_close (loadfile_bfd);
-
- if (!bfd_check_format (loadfile_bfd, bfd_object))
- {
- gdbtk_set_result (interp, "Bad Object File");
- return TCL_ERROR;
- }
-
- Tcl_SetListObj (result_ptr->obj_ptr, 0, NULL);
-
- for (s = loadfile_bfd->sections; s; s = s->next)
- {
- if (s->flags & SEC_LOAD)
- {
- bfd_size_type size = bfd_get_section_size (s);
- if (size > 0)
- {
- ob[0] = Tcl_NewStringObj ((char *)
- bfd_get_section_name (loadfile_bfd, s),
- -1);
- ob[1] = Tcl_NewLongObj ((long) size);
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr,
- Tcl_NewListObj (2, ob));
- }
- }
- }
-
- do_cleanups (old_cleanups);
- return TCL_OK;
-}
-
-
-/* This implements the tcl command "gdb_get_line"
-
-* It returns the linenumber for a given linespec. It will take any spec
-* that can be passed to decode_line_1
-*
-* Tcl Arguments:
-* linespec - the line specification
-* Tcl Result:
-* The line number for that spec.
-*/
-static int
-gdb_get_line_command (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- struct symtabs_and_lines sals;
- char *args, **canonical;
-
- if (objc != 2)
- {
- Tcl_WrongNumArgs (interp, 1, objv, "linespec");
- return TCL_ERROR;
- }
-
- args = Tcl_GetStringFromObj (objv[1], NULL);
- sals = decode_line_1 (&args, 1, NULL, 0, &canonical, NULL);
- if (sals.nelts == 1)
- {
- Tcl_SetIntObj (result_ptr->obj_ptr, sals.sals[0].line);
- return TCL_OK;
- }
-
- Tcl_SetStringObj (result_ptr->obj_ptr, "N/A", -1);
- return TCL_OK;
-
-}
-
-/* This implements the tcl command "gdb_get_file"
-
-* It returns the file containing a given line spec.
-*
-* Tcl Arguments:
-* linespec - The linespec to look up
-* Tcl Result:
-* The file containing it.
-*/
-
-static int
-gdb_get_file_command (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- struct symtabs_and_lines sals;
- char *args, **canonical;
-
- if (objc != 2)
- {
- Tcl_WrongNumArgs (interp, 1, objv, "linespec");
- return TCL_ERROR;
- }
-
- args = Tcl_GetStringFromObj (objv[1], NULL);
- sals = decode_line_1 (&args, 1, NULL, 0, &canonical, NULL);
- if (sals.nelts == 1)
- {
- Tcl_SetStringObj (result_ptr->obj_ptr,
- sals.sals[0].symtab->filename, -1);
- return TCL_OK;
- }
-
- Tcl_SetStringObj (result_ptr->obj_ptr, "N/A", -1);
- return TCL_OK;
-}
-
-/* This implements the tcl command "gdb_get_function"
-
-* It finds the function containing the given line spec.
-*
-* Tcl Arguments:
-* linespec - The line specification
-* Tcl Result:
-* The function that contains it, or "N/A" if it is not in a function.
-*/
-static int
-gdb_get_function_command (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- char *function;
- struct symtabs_and_lines sals;
- char *args, **canonical;
-
- if (objc != 2)
- {
- Tcl_WrongNumArgs (interp, 1, objv, "linespec");
- return TCL_ERROR;
- }
-
- args = Tcl_GetStringFromObj (objv[1], NULL);
- sals = decode_line_1 (&args, 1, NULL, 0, &canonical, NULL);
- if (sals.nelts == 1)
- {
- resolve_sal_pc (&sals.sals[0]);
- function = pc_function_name (sals.sals[0].pc);
- Tcl_SetStringObj (result_ptr->obj_ptr, function, -1);
- return TCL_OK;
- }
-
- Tcl_SetStringObj (result_ptr->obj_ptr, "N/A", -1);
- return TCL_OK;
-}
-
-/* This implements the tcl command "gdb_find_file"
-
-* It searches the symbol tables to get the full pathname to a file.
-*
-* Tcl Arguments:
-* filename: the file name to search for.
-* Tcl Result:
-* The full path to the file, an empty string if the file was not
-* available or an error message if the file is not found in the symtab.
-*/
-
-static int
-gdb_find_file_command (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- struct symtab *st;
- char *filename, *fullname = NULL;
-
- if (objc != 2)
- {
- Tcl_WrongNumArgs (interp, 1, objv, "filename");
- return TCL_ERROR;
- }
-
- filename = Tcl_GetStringFromObj (objv[1], NULL);
-
- /* Shortcut: There seems to be some mess in gdb dealing with
- files. While we should let gdb sort it out, it doesn't hurt
- to be a little defensive here.
-
- If the filename is already an absolute filename, just try
- to stat it. If it's not found, then ask gdb to find it for us. */
- if (IS_ABSOLUTE_PATH (filename))
- {
- struct stat st;
- const int status = stat (filename, &st);
-
- if (status == 0)
- {
- if (S_ISREG (st.st_mode))
- fullname = filename;
- }
- }
- else
- {
- /* Ask gdb to find the file for us. */
- st = lookup_symtab (filename);
-
- /* We should always get a symtab. */
- if (!st)
- {
- gdbtk_set_result (interp, "File not found in symtab (2)");
- return TCL_ERROR;
- }
-
- fullname =
- (st->fullname == NULL ? symtab_to_filename (st) : st->fullname);
- }
-
- /* We may not be able to open the file (not available). */
- if (fullname == NULL)
- {
- Tcl_SetStringObj (result_ptr->obj_ptr, "", -1);
- return TCL_OK;
- }
-
- Tcl_SetStringObj (result_ptr->obj_ptr, fullname, -1);
-
- return TCL_OK;
-}
-
-/* This implements the tcl command "gdb_listfiles"
-
-* This lists all the files in the current executible.
-*
-* Note that this currently pulls in all sorts of filenames
-* that aren't really part of the executable. It would be
-* best if we could check each file to see if it actually
-* contains executable lines of code, but we can't do that
-* with psymtabs.
-*
-* Arguments:
-* ?pathname? - If provided, only files which match pathname
-* (up to strlen(pathname)) are included. THIS DOES NOT
-* CURRENTLY WORK BECAUSE PARTIAL_SYMTABS DON'T SUPPLY
-* THE FULL PATHNAME!!!
-*
-* Tcl Result:
-* A list of all matching files.
-*/
-static int
-gdb_listfiles (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- struct objfile *objfile;
- struct partial_symtab *psymtab;
- struct symtab *symtab;
- const char *lastfile, *pathname = NULL;
- const char **files;
- int files_size;
- int i, numfiles = 0, len = 0;
-
- files_size = 1000;
- files = (const char **) xmalloc (sizeof (char *) * files_size);
-
- if (objc > 2)
- {
- Tcl_WrongNumArgs (interp, 1, objv, "?pathname?");
- return TCL_ERROR;
- }
- else if (objc == 2)
- pathname = Tcl_GetStringFromObj (objv[1], &len);
-
- ALL_PSYMTABS (objfile, psymtab)
- {
- if (numfiles == files_size)
- {
- files_size = files_size * 2;
- files = (const char **) xrealloc (files, sizeof (char *) * files_size);
- }
- if (psymtab->filename)
- {
- if (!len || !strncmp (pathname, psymtab->filename, len)
- || !strcmp (psymtab->filename, lbasename (psymtab->filename)))
- {
- files[numfiles++] = lbasename (psymtab->filename);
- }
- }
- }
-
- ALL_SYMTABS (objfile, symtab)
- {
- if (numfiles == files_size)
- {
- files_size = files_size * 2;
- files = (const char **) xrealloc (files, sizeof (char *) * files_size);
- }
- if (symtab->filename && symtab->linetable && symtab->linetable->nitems)
- {
- if (!len || !strncmp (pathname, symtab->filename, len)
- || !strcmp (symtab->filename, lbasename (symtab->filename)))
- {
- files[numfiles++] = lbasename (symtab->filename);
- }
- }
- }
-
- qsort (files, numfiles, sizeof (char *), comp_files);
-
- lastfile = "";
-
- /* Discard the old result pointer, in case it has accumulated anything
- and set it to a new list object */
-
- Tcl_SetListObj (result_ptr->obj_ptr, 0, NULL);
-
- for (i = 0; i < numfiles; i++)
- {
- if (strcmp (files[i], lastfile))
- Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr,
- Tcl_NewStringObj (files[i], -1));
- lastfile = files[i];
- }
-
- free (files);
- return TCL_OK;
-}
-
-static int
-comp_files (const void *file1, const void *file2)
-{
- return strcmp (*(char **) file1, *(char **) file2);
-}
-
-
-/* This implements the tcl command "gdb_search"
-
-
-* Tcl Arguments:
-* option - One of "functions", "variables" or "types"
-* regexp - The regular expression to look for.
-* Then, optionally:
-* -files fileList
-* -static 1/0
-* -filename 1/0
-* Tcl Result:
-* A list of all the matches found. Optionally, if -filename is set to 1,
-* then the output is a list of two element lists, with the symbol first,
-* and the file in which it is found second.
-*/
-
-static int
-gdb_search (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- struct symbol_search *ss = NULL;
- struct symbol_search *p;
- struct cleanup *old_chain = NULL;
- Tcl_Obj *CONST * switch_objv;
- int index, switch_objc, i, show_files = 0;
- domain_enum space = 0;
- char *regexp;
- int static_only, nfiles;
- Tcl_Obj **file_list;
- char **files;
- static const char *search_options[] =
- {"functions", "variables", "types", (char *) NULL};
- static const char *switches[] =
- {"-files", "-filename", "-static", (char *) NULL};
- enum search_opts
- {
- SEARCH_FUNCTIONS, SEARCH_VARIABLES, SEARCH_TYPES
- };
- enum switches_opts
- {
- SWITCH_FILES, SWITCH_FILENAME, SWITCH_STATIC_ONLY
- };
-
- if (objc < 3)
- {
- Tcl_WrongNumArgs (interp, 1, objv, "option regexp ?arg ...?");
- return TCL_ERROR;
- }
-
- if (Tcl_GetIndexFromObj (interp, objv[1], search_options, "option", 0,
- &index) != TCL_OK)
- {
- result_ptr->flags |= GDBTK_IN_TCL_RESULT;
- return TCL_ERROR;
- }
-
- /* Unfortunately, we cannot teach search_symbols to search on
- multiple regexps, so we have to do a two-tier search for
- any searches which choose to narrow the playing field. */
- switch ((enum search_opts) index)
- {
- case SEARCH_FUNCTIONS:
- space = FUNCTIONS_DOMAIN;
- break;
- case SEARCH_VARIABLES:
- space = VARIABLES_DOMAIN;
- break;
- case SEARCH_TYPES:
- space = TYPES_DOMAIN;
- break;
- }
-
- regexp = Tcl_GetStringFromObj (objv[2], NULL);
- /* Process any switches that refine the search */
- switch_objc = objc - 3;
- switch_objv = objv + 3;
-
- static_only = 0;
- nfiles = 0;
- files = (char **) NULL;
- while (switch_objc > 0)
- {
- if (Tcl_GetIndexFromObj (interp, switch_objv[0], switches,
- "option", 0, &index) != TCL_OK)
- {
- result_ptr->flags |= GDBTK_IN_TCL_RESULT;
- return TCL_ERROR;
- }
-
- switch ((enum switches_opts) index)
- {
- case SWITCH_FILENAME:
- {
- if (switch_objc < 2)
- {
- Tcl_WrongNumArgs (interp, 3, objv,
- "?-files fileList -filename 1|0 -static 1|0?");
- result_ptr->flags |= GDBTK_IN_TCL_RESULT;
- return TCL_ERROR;
- }
- if (Tcl_GetBooleanFromObj (interp, switch_objv[1], &show_files)
- != TCL_OK)
- {
- result_ptr->flags |= GDBTK_IN_TCL_RESULT;
- return TCL_ERROR;
- }
- switch_objc--;
- switch_objv++;
- }
- break;
- case SWITCH_FILES:
- {
- int result;
- if (switch_objc < 2)
- {
- Tcl_WrongNumArgs (interp, 3, objv,
- "?-files fileList -filename 1|0 -static 1|0?");
- result_ptr->flags |= GDBTK_IN_TCL_RESULT;
- return TCL_ERROR;
- }
- result = Tcl_ListObjGetElements (interp, switch_objv[1],
- &nfiles, &file_list);
- if (result != TCL_OK)
- return result;
-
- files = (char **) xmalloc (nfiles * sizeof (char *));
- for (i = 0; i < nfiles; i++)
- files[i] = Tcl_GetStringFromObj (file_list[i], NULL);
- switch_objc--;
- switch_objv++;
- }
- break;
- case SWITCH_STATIC_ONLY:
- if (switch_objc < 2)
- {
- Tcl_WrongNumArgs (interp, 3, objv,
- "?-files fileList -filename 1|0 -static 1|0?");
- result_ptr->flags |= GDBTK_IN_TCL_RESULT;
- return TCL_ERROR;
- }
- if (Tcl_GetBooleanFromObj (interp, switch_objv[1], &static_only)
- != TCL_OK)
- {
- result_ptr->flags |= GDBTK_IN_TCL_RESULT;
- return TCL_ERROR;
- }
- switch_objc--;
- switch_objv++;
- }
- switch_objc--;
- switch_objv++;
- }
-
- search_symbols (regexp, space, nfiles, files, &ss);
- if (ss != NULL)
- old_chain = make_cleanup_free_search_symbols (ss);
-
- Tcl_SetListObj (result_ptr->obj_ptr, 0, NULL);
-
- for (p = ss; p != NULL; p = p->next)
- {
- Tcl_Obj *elem;
-
- if (static_only && p->block != STATIC_BLOCK)
- continue;
-
- /* Strip off some C++ special symbols, like RTTI and global
- constructors/destructors. */
- if ((p->symbol != NULL
- && strncmp (SYMBOL_LINKAGE_NAME (p->symbol), "__tf", 4) != 0
- && strncmp (SYMBOL_LINKAGE_NAME (p->symbol), "_GLOBAL_", 8) != 0)
- || p->msymbol != NULL)
- {
- elem = Tcl_NewListObj (0, NULL);
-
- if (p->msymbol == NULL)
- Tcl_ListObjAppendElement (interp, elem,
- Tcl_NewStringObj (SYMBOL_PRINT_NAME (p->symbol), -1));
- else
- Tcl_ListObjAppendElement (interp, elem,
- Tcl_NewStringObj (SYMBOL_PRINT_NAME (p->msymbol), -1));
-
- if (show_files)
- {
- if ((p->symtab != NULL) && (p->symtab->filename != NULL))
- {
- Tcl_ListObjAppendElement (interp, elem, Tcl_NewStringObj
- (p->symtab->filename, -1));
- }
- else
- {
- Tcl_ListObjAppendElement (interp, elem,
- Tcl_NewStringObj ("", 0));
- }
- }
-
- Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr, elem);
- }
- }
-
- if (ss != NULL)
- do_cleanups (old_chain);
-
- return TCL_OK;
-}
-
-/* This implements the tcl command gdb_listfuncs
-
-* It lists all the functions defined in a given file
-*
-* Arguments:
-* file - the file to look in
-* Tcl Result:
-* A list of two element lists, the first element is
-* the symbol name, and the second is a boolean indicating
-* whether the symbol is demangled (1 for yes).
-*/
-
-static int
-gdb_listfuncs (clientData, interp, objc, objv)
- ClientData clientData;
- Tcl_Interp *interp;
- int objc;
- Tcl_Obj *CONST objv[];
-{
- struct symtab *symtab;
- struct blockvector *bv;
- struct block *b;
- struct symbol *sym;
- int i;
- struct dict_iterator iter;
- Tcl_Obj *funcVals[2];
-
- if (objc != 2)
- {
- Tcl_WrongNumArgs (interp, 1, objv, "file");
- return TCL_ERROR;
- }
-
- symtab = lookup_symtab (Tcl_GetStringFromObj (objv[1], NULL));
- if (!symtab)
- {
- gdbtk_set_result (interp, "No such file (%s)",
- Tcl_GetStringFromObj (objv[1], NULL));
- return TCL_ERROR;
- }
-
- if (mangled == NULL)
- {
- mangled = Tcl_NewBooleanObj (1);
- not_mangled = Tcl_NewBooleanObj (0);
- Tcl_IncrRefCount (mangled);
- Tcl_IncrRefCount (not_mangled);
- }
-
- Tcl_SetListObj (result_ptr->obj_ptr, 0, NULL);
-
- bv = BLOCKVECTOR (symtab);
- for (i = GLOBAL_BLOCK; i <= STATIC_BLOCK; i++)
- {
- b = BLOCKVECTOR_BLOCK (bv, i);
- ALL_BLOCK_SYMBOLS (b, iter, sym)
- {
- if (SYMBOL_CLASS (sym) == LOC_BLOCK)
- {
-
- char *name = SYMBOL_DEMANGLED_NAME (sym);
-
- if (name)
- {
- /* strip out "global constructors" and
- * "global destructors"
- * because we aren't interested in them. */
-
- if (strncmp (name, "global ", 7))
- {
- /* If the function is overloaded,
- * print out the functions
- * declaration, not just its name. */
-
- funcVals[0] = Tcl_NewStringObj (name, -1);
- funcVals[1] = mangled;
- }
- else
- continue;
-
- }
- else
- {
- funcVals[0] = Tcl_NewStringObj (DEPRECATED_SYMBOL_NAME (sym), -1);
- funcVals[1] = not_mangled;
- }
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr,
- Tcl_NewListObj (2, funcVals));
- }
- }
- }
- return TCL_OK;
-}
-
-/* This implements the TCL command `gdb_restore_fputs'
- It sets the fputs_unfiltered hook back to gdbtk_fputs.
- Its sole reason for being is that sometimes we move the
- fputs hook out of the way to specially trap output, and if
- we get an error which we weren't expecting, it won't get put
- back, so we run this at idle time as insurance.
-*/
-
-static int
-gdb_restore_fputs (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- gdbtk_disable_fputs = 0;
- return TCL_OK;
-}
-
-
-/* This implements the tcl command gdb_load_disassembly
- *
- * Arguments:
- * widget - the name of a text widget into which to load the data
- * source_with_assm - must be "source" or "nosource"
- * low_address - the CORE_ADDR from which to start disassembly
- * ?hi_address? - the CORE_ADDR to which to disassemble, defaults
- * to the end of the function containing low_address.
- * Tcl Result:
- * The text widget is loaded with the data, and a list is returned.
- * The first element of the list is a two element list containing the
- * real low & high elements, the rest is a mapping between line number
- * in the text widget, and either the source line number of that line,
- * if it is a source line, or the assembly address. You can distinguish
- * between the two, because the address will start with 0x...
- */
-
-static int
-gdb_load_disassembly (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- CORE_ADDR low, high, orig;
- struct disassembly_client_data client_data;
- int mixed_source_and_assembly, ret_val, i;
- char *arg_ptr;
- char *map_name;
- Tcl_WideInt waddr;
-
- if (objc != 6 && objc != 7)
- {
- Tcl_WrongNumArgs (interp, 1, objv, "[source|nosource] map_arr index_prefix low_address ?hi_address");
- return TCL_ERROR;
- }
-
- client_data.widget = Tcl_GetStringFromObj (objv[1], NULL);
- if ( Tk_NameToWindow (interp, client_data.widget,
- Tk_MainWindow (interp)) == NULL)
- {
- gdbtk_set_result (interp, "Invalid widget name.");
- return TCL_ERROR;
- }
-
- if (!Tcl_GetCommandInfo (interp, client_data.widget, &client_data.cmd))
- {
- gdbtk_set_result (interp, "Can't get widget command info");
- return TCL_ERROR;
- }
-
- arg_ptr = Tcl_GetStringFromObj (objv[2], NULL);
- if (*arg_ptr == 's' && strcmp (arg_ptr, "source") == 0)
- mixed_source_and_assembly = 1;
- else if (*arg_ptr == 'n' && strcmp (arg_ptr, "nosource") == 0)
- mixed_source_and_assembly = 0;
- else
- {
- gdbtk_set_result (interp, "Second arg must be 'source' or 'nosource'");
- return TCL_ERROR;
- }
-
- /* As we populate the text widget, we will also create an array in the
- caller's scope. The name is given by objv[3].
- Each source line gets an entry or the form:
- array($prefix,srcline=$src_line_no) = $widget_line_no
-
- Each assembly line gets two entries of the form:
- array($prefix,pc=$pc) = $widget_line_no
- array($prefix,line=$widget_line_no) = $src_line_no
-
- Where prefix is objv[4].
- */
-
- map_name = Tcl_GetStringFromObj (objv[3], NULL);
-
- if (*map_name != '\0')
- {
- char *prefix;
- int prefix_len;
-
- client_data.map_arr = "map_array";
- if (Tcl_UpVar (interp, "1", map_name, client_data.map_arr, 0) != TCL_OK)
- {
- gdbtk_set_result (interp, "Can't link map array.");
- return TCL_ERROR;
- }
-
- prefix = Tcl_GetStringFromObj (objv[4], &prefix_len);
-
- Tcl_DStringInit(&client_data.src_to_line_prefix);
- Tcl_DStringAppend (&client_data.src_to_line_prefix,
- prefix, prefix_len);
- Tcl_DStringAppend (&client_data.src_to_line_prefix, ",srcline=",
- sizeof (",srcline=") - 1);
-
- Tcl_DStringInit(&client_data.pc_to_line_prefix);
- Tcl_DStringAppend (&client_data.pc_to_line_prefix,
- prefix, prefix_len);
- Tcl_DStringAppend (&client_data.pc_to_line_prefix, ",pc=",
- sizeof (",pc=") - 1);
-
- Tcl_DStringInit(&client_data.line_to_pc_prefix);
- Tcl_DStringAppend (&client_data.line_to_pc_prefix,
- prefix, prefix_len);
- Tcl_DStringAppend (&client_data.line_to_pc_prefix, ",line=",
- sizeof (",line=") - 1);
-
- }
- else
- {
- client_data.map_arr = "";
- }
-
- /* Now parse the addresses */
- if (Tcl_GetWideIntFromObj (interp, objv[5], &waddr) != TCL_OK)
- return TCL_ERROR;
- low = waddr;
-
- orig = low;
-
- if (objc == 6)
- {
- if (find_pc_partial_function (low, NULL, &low, &high) == 0)
- error ("No function contains address 0x%s", core_addr_to_string (orig));
- }
- else
- {
- if (Tcl_GetWideIntFromObj (interp, objv[6], &waddr) != TCL_OK)
- return TCL_ERROR;
- high = waddr;
- }
-
- /* Setup the client_data structure, and call the driver function. */
-
- client_data.file_opened_p = 0;
- client_data.widget_line_no = 0;
- client_data.interp = interp;
- for (i = 0; i < 3; i++)
- {
- client_data.result_obj[i] = Tcl_NewObj();
- Tcl_IncrRefCount (client_data.result_obj[i]);
- }
-
- /* Fill up the constant parts of the argv structures */
- client_data.asm_argv[0] = client_data.widget;
- client_data.asm_argv[1] = "insert";
- client_data.asm_argv[2] = "end";
- client_data.asm_argv[3] = "-\t";
- client_data.asm_argv[4] = "break_rgn_tag";
- /* client_data.asm_argv[5] = address; */
- client_data.asm_argv[6] = "break_rgn_tag";
- /* client_data.asm_argv[7] = offset; */
- client_data.asm_argv[8] = "break_rgn_tag";
- client_data.asm_argv[9] = ":\t\t";
- client_data.asm_argv[10] = "source_tag";
- /* client_data.asm_argv[11] = code; */
- client_data.asm_argv[12] = "source_tag";
- client_data.asm_argv[13] = "\n";
-
- if (mixed_source_and_assembly)
- {
- client_data.source_argv[0] = client_data.widget;
- client_data.source_argv[1] = "insert";
- client_data.source_argv[2] = "end";
- /* client_data.source_argv[3] = line_number; */
- client_data.source_argv[4] = "";
- /* client_data.source_argv[5] = line; */
- client_data.source_argv[6] = "source_tag2";
- }
-
- ret_val = gdb_disassemble_driver (low, high, mixed_source_and_assembly,
- (ClientData) &client_data,
- gdbtk_load_source, gdbtk_load_asm);
-
- /* Now clean up the opened file, and the Tcl data structures */
-
- if (client_data.file_opened_p == 1)
- fclose(client_data.fp);
-
- if (*client_data.map_arr != '\0')
- {
- Tcl_DStringFree(&client_data.src_to_line_prefix);
- Tcl_DStringFree(&client_data.pc_to_line_prefix);
- Tcl_DStringFree(&client_data.line_to_pc_prefix);
- }
-
- for (i = 0; i < 3; i++)
- {
- Tcl_DecrRefCount (client_data.result_obj[i]);
- }
-
- /* Finally, if we were successful, stick the low & high addresses
- into the Tcl result. */
-
- if (ret_val == TCL_OK)
- {
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr,
- Tcl_NewStringObj (core_addr_to_string (low), -1));
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr,
- Tcl_NewStringObj (core_addr_to_string (high), -1));
- }
- return ret_val;
-}
-
-static void
-gdbtk_load_source (ClientData clientData, struct symtab *symtab,
- int start_line, int end_line)
-{
- struct disassembly_client_data *client_data =
- (struct disassembly_client_data *) clientData;
- char *buffer;
- int index_len;
-
- index_len = Tcl_DStringLength (&client_data->src_to_line_prefix);
-
- if (client_data->file_opened_p == 1)
- {
- const char **text_argv;
- char line[10000], line_number[18];
- int found_carriage_return = 1;
-
- /* First do some sanity checks on the requested lines */
-
- if (start_line < 1
- || end_line < start_line || end_line > symtab->nlines)
- {
- return;
- }
-
- line_number[0] = '\t';
- line[0] = '\t';
-
- text_argv = client_data->source_argv;
-
- text_argv[3] = line_number;
- text_argv[5] = line;
-
- if (fseek (client_data->fp, symtab->line_charpos[start_line - 1],
- SEEK_SET) < 0)
- {
- fclose(client_data->fp);
- client_data->file_opened_p = -1;
- return;
- }
-
- for (; start_line < end_line; start_line++)
- {
- if (!fgets (line + 1, 9980, client_data->fp))
- {
- fclose(client_data->fp);
- client_data->file_opened_p = -1;
- return;
- }
-
- client_data->widget_line_no++;
-
- sprintf (line_number + 1, "%d", start_line);
-
- if (found_carriage_return)
- {
- char *p = strrchr(line, '\0') - 2;
- if (*p == '\r')
- {
- *p = '\n';
- *(p + 1) = '\0';
- }
- else
- found_carriage_return = 0;
- }
-
- /* Run the command, then add an entry to the map array in
- the caller's scope, if requested. */
-
- client_data->cmd.proc (client_data->cmd.clientData,
- client_data->interp, 7, text_argv);
-
- if (*client_data->map_arr != '\0')
- {
-
- Tcl_DStringAppend (&client_data->src_to_line_prefix,
- line_number + 1, -1);
-
- /* FIXME: Convert to Tcl_SetVar2Ex when we move to 8.2. This
- will allow us avoid converting widget_line_no into a string. */
-
- xasprintf (&buffer, "%d", client_data->widget_line_no);
-
- Tcl_SetVar2 (client_data->interp, client_data->map_arr,
- Tcl_DStringValue (&client_data->src_to_line_prefix),
- buffer, 0);
- free(buffer);
-
- Tcl_DStringSetLength (&client_data->src_to_line_prefix, index_len);
- }
- }
-
- }
- else if (!client_data->file_opened_p)
- {
- int fdes;
- /* The file is not yet open, try to open it, then print the
- first line. If we fail, set FILE_OPEN_P to -1. */
-
- fdes = open_source_file (symtab);
- if (fdes < 0)
- {
- client_data->file_opened_p = -1;
- }
- else
- {
- /* FIXME: Convert to a Tcl File Channel and read from there.
- This will allow us to get the line endings and conversion
- to UTF8 right automatically when we move to 8.2.
- Need a Cygwin call to convert a file descriptor to the native
- Windows handler to do this. */
-
- client_data->file_opened_p = 1;
- client_data->fp = fdopen (fdes, FOPEN_RB);
- clearerr (client_data->fp);
-
- if (symtab->line_charpos == 0)
- find_source_lines (symtab, fdes);
-
- /* We are called with an actual load request, so call ourselves
- to load the first line. */
-
- gdbtk_load_source (clientData, symtab, start_line, end_line);
- }
- }
- else
- {
- /* If we couldn't open the file, or got some prior error, just exit. */
- return;
- }
-}
-
-
-/* FIXME: cagney/2003-09-08: "di" is not used and unneeded. */
-static CORE_ADDR
-gdbtk_load_asm (ClientData clientData, CORE_ADDR pc,
- struct disassemble_info *di)
-{
- struct disassembly_client_data * client_data
- = (struct disassembly_client_data *) clientData;
- const char **text_argv;
- int i, pc_to_line_len, line_to_pc_len;
- gdbtk_result new_result;
- int insn;
- struct cleanup *old_chain = NULL;
-
- pc_to_line_len = Tcl_DStringLength (&client_data->pc_to_line_prefix);
- line_to_pc_len = Tcl_DStringLength (&client_data->line_to_pc_prefix);
-
- text_argv = client_data->asm_argv;
-
- /* Preserve the current Tcl result object, print out what we need, and then
- suck it out of the result, and replace... */
-
- old_chain = make_cleanup (gdbtk_restore_result_ptr, (void *) result_ptr);
- result_ptr = &new_result;
- result_ptr->obj_ptr = client_data->result_obj[0];
- result_ptr->flags = GDBTK_TO_RESULT;
-
- /* Null out the three return objects we will use. */
-
- for (i = 0; i < 3; i++)
- Tcl_SetObjLength (client_data->result_obj[i], 0);
-
- deprecated_print_address_numeric (pc, 1, gdb_stdout);
- gdb_flush (gdb_stdout);
-
- result_ptr->obj_ptr = client_data->result_obj[1];
- print_address_symbolic (pc, gdb_stdout, 1, "\t");
- gdb_flush (gdb_stdout);
-
- result_ptr->obj_ptr = client_data->result_obj[2];
- /* FIXME: cagney/2003-09-08: This should use gdb_disassembly. */
- insn = gdb_print_insn (pc, gdb_stdout);
- gdb_flush (gdb_stdout);
-
- client_data->widget_line_no++;
-
- text_argv[5] = Tcl_GetStringFromObj (client_data->result_obj[0], NULL);
- text_argv[7] = Tcl_GetStringFromObj (client_data->result_obj[1], NULL);
- text_argv[11] = Tcl_GetStringFromObj (client_data->result_obj[2], NULL);
-
- client_data->cmd.proc (client_data->cmd.clientData,
- client_data->interp, 14, text_argv);
-
- if (*client_data->map_arr != '\0')
- {
- char *buffer;
-
- /* Run the command, then add an entry to the map array in
- the caller's scope. */
-
- Tcl_DStringAppend (&client_data->pc_to_line_prefix, core_addr_to_string (pc), -1);
-
- /* FIXME: Convert to Tcl_SetVar2Ex when we move to 8.2. This
- will allow us avoid converting widget_line_no into a string. */
-
- xasprintf (&buffer, "%d", client_data->widget_line_no);
-
- Tcl_SetVar2 (client_data->interp, client_data->map_arr,
- Tcl_DStringValue (&client_data->pc_to_line_prefix),
- buffer, 0);
-
- Tcl_DStringAppend (&client_data->line_to_pc_prefix, buffer, -1);
-
-
- Tcl_SetVar2 (client_data->interp, client_data->map_arr,
- Tcl_DStringValue (&client_data->line_to_pc_prefix),
- core_addr_to_string (pc), 0);
-
- /* Restore the prefixes to their initial state. */
-
- Tcl_DStringSetLength (&client_data->pc_to_line_prefix, pc_to_line_len);
- Tcl_DStringSetLength (&client_data->line_to_pc_prefix, line_to_pc_len);
-
- xfree (buffer);
- }
-
- do_cleanups (old_chain);
-
- return pc + insn;
-}
-
-static int
-gdb_disassemble_driver (CORE_ADDR low, CORE_ADDR high,
- int mixed_source_and_assembly,
- ClientData clientData,
- void (*print_source_fn) (ClientData, struct symtab *, int, int),
- CORE_ADDR (*print_asm_fn) (ClientData, CORE_ADDR, struct disassemble_info *))
-{
- CORE_ADDR pc;
-
- /* If just doing straight assembly, all we need to do is disassemble
- everything between low and high. If doing mixed source/assembly, we've
- got a totally different path to follow. */
-
- if (mixed_source_and_assembly)
- { /* Come here for mixed source/assembly */
- /* The idea here is to present a source-O-centric view of a function to
- the user. This means that things are presented in source order, with
- (possibly) out of order assembly immediately following. */
- struct symtab *symtab;
- struct linetable_entry *le;
- int nlines;
- int newlines;
- struct my_line_entry *mle;
- struct symtab_and_line sal;
- int i;
- int out_of_order;
- int next_line;
-
- /* Assume symtab is valid for whole PC range */
- symtab = find_pc_symtab (low);
-
- if (!symtab || !symtab->linetable)
- goto assembly_only;
-
- /* First, convert the linetable to a bunch of my_line_entry's. */
-
- le = symtab->linetable->item;
- nlines = symtab->linetable->nitems;
-
- if (nlines <= 0)
- goto assembly_only;
-
- mle = (struct my_line_entry *) alloca (nlines *
- sizeof (struct my_line_entry));
-
- out_of_order = 0;
-
- /* Copy linetable entries for this function into our data structure,
- creating end_pc's and setting out_of_order as appropriate. */
-
- /* First, skip all the preceding functions. */
-
- for (i = 0; i < nlines - 1 && le[i].pc < low; i++) ;
-
- /* Now, copy all entries before the end of this function. */
-
- newlines = 0;
- for (; i < nlines - 1 && le[i].pc < high; i++)
- {
- if (le[i].line == le[i + 1].line
- && le[i].pc == le[i + 1].pc)
- continue; /* Ignore duplicates */
-
- /* Skip any end-of-function markers. */
- if (le[i].line == 0)
- continue;
-
- mle[newlines].line = le[i].line;
- if (le[i].line > le[i + 1].line)
- out_of_order = 1;
- mle[newlines].start_pc = le[i].pc;
- mle[newlines].end_pc = le[i + 1].pc;
- newlines++;
- }
-
- /* If we're on the last line, and it's part of the function, then we
- need to get the end pc in a special way. */
-
- if (i == nlines - 1
- && le[i].pc < high)
- {
- mle[newlines].line = le[i].line;
- mle[newlines].start_pc = le[i].pc;
- sal = find_pc_line (le[i].pc, 0);
- mle[newlines].end_pc = sal.end;
- newlines++;
- }
-
- /* Now, sort mle by line #s (and, then by addresses within lines). */
-
- if (out_of_order)
- qsort (mle, newlines, sizeof (struct my_line_entry), compare_lines);
-
- /* Now, for each line entry, emit the specified lines (unless they have
- been emitted before), followed by the assembly code for that line. */
-
- next_line = 0; /* Force out first line */
- for (i = 0; i < newlines; i++)
- {
- /* Print out everything from next_line to the current line. */
-
- if (mle[i].line >= next_line)
- {
- if (next_line != 0)
- print_source_fn (clientData, symtab, next_line,
- mle[i].line + 1);
- else
- print_source_fn (clientData, symtab, mle[i].line,
- mle[i].line + 1);
-
- next_line = mle[i].line + 1;
- }
-
- for (pc = mle[i].start_pc; pc < mle[i].end_pc; )
- {
- QUIT;
- /* FIXME: cagney/2003-09-08: This entire function should
- be replaced by gdb_disassembly. */
- pc = print_asm_fn (clientData, pc, NULL);
- }
- }
- }
- else
- {
- assembly_only:
- for (pc = low; pc < high; )
- {
- QUIT;
- /* FIXME: cagney/2003-09-08: This entire function should be
- replaced by gdb_disassembly. */
- pc = print_asm_fn (clientData, pc, NULL);
- }
- }
-
- return TCL_OK;
-}
-
-/* This will be passed to qsort to sort the results of the disassembly */
-
-static int
-compare_lines (const PTR mle1p, const PTR mle2p)
-{
- struct my_line_entry *mle1, *mle2;
- int val;
-
- mle1 = (struct my_line_entry *) mle1p;
- mle2 = (struct my_line_entry *) mle2p;
-
- val = mle1->line - mle2->line;
-
- if (val != 0)
- return val;
-
- return mle1->start_pc - mle2->start_pc;
-}
-
-/* This implements the TCL command `gdb_loc',
-
-* Arguments:
-* ?symbol? The symbol or address to locate - defaults to pc
-* Tcl Return:
-* a list consisting of the following:
-* basename, function name, filename, line number, address, current pc
-*/
-
-static int
-gdb_loc (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
-{
- char *filename;
- struct symtab_and_line sal;
- char *fname;
- CORE_ADDR pc;
-
- if (objc == 1)
- {
- /* This function can be called, before the target is properly
- set-up, the following prevents an error, by trying to
- read_pc when there is no pc to read. It defaults pc,
- before the target is connected to the entry point of the
- program */
- if (!target_has_registers)
- {
- pc = entry_point_address ();
- sal = find_pc_line (pc, 0);
- }
- else if (deprecated_selected_frame
- && (get_frame_pc (deprecated_selected_frame) != read_pc ()))
- {
- /* Note - this next line is not correct on all architectures.
- For a graphical debugger we really want to highlight the
- assembly line that called the next function on the stack.
- Many architectures have the next instruction saved as the
- pc on the stack, so what happens is the next instruction
- is highlighted. FIXME */
- pc = get_frame_pc (deprecated_selected_frame);
- find_frame_sal (deprecated_selected_frame, &sal);
- }
- else
- {
- pc = read_pc ();
- sal = find_pc_line (pc, 0);
- }
- }
- else if (objc == 2)
- {
- struct symtabs_and_lines sals;
- int nelts;
-
- sals = decode_line_spec (Tcl_GetStringFromObj (objv[1], NULL), 1);
-
- nelts = sals.nelts;
- sal = sals.sals[0];
- free (sals.sals);
-
- if (sals.nelts != 1)
- {
- gdbtk_set_result (interp, "Ambiguous line spec", -1);
- return TCL_ERROR;
- }
- resolve_sal_pc (&sal);
- pc = sal.pc;
- }
- else
- {
- Tcl_WrongNumArgs (interp, 1, objv, "?symbol?");
- return TCL_ERROR;
- }
-
- if (sal.symtab)
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr,
- Tcl_NewStringObj (sal.symtab->filename, -1));
- else
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr,
- Tcl_NewStringObj ("", 0));
-
- fname = pc_function_name (pc);
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr,
- Tcl_NewStringObj (fname, -1));
-
- filename = symtab_to_filename (sal.symtab);
- if (filename == NULL)
- filename = "";
-
- /* file name */
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr, Tcl_NewStringObj (filename, -1));
- /* line number */
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr, Tcl_NewIntObj (sal.line));
- /* PC in current frame */
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr,
- Tcl_NewStringObj (core_addr_to_string (pc), -1));
- /* Real PC */
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr,
- Tcl_NewStringObj (core_addr_to_string (stop_pc), -1));
- /* shared library */
-#ifdef PC_SOLIB
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr,
- Tcl_NewStringObj (PC_SOLIB (pc), -1));
-#else
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr,
- Tcl_NewStringObj ("", -1));
-#endif
- return TCL_OK;
-}
-
-/* This implements the TCL command gdb_entry_point. It returns the current
- entry point address. */
-
-static int
-gdb_entry_point (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- char *addrstr;
-
- /* If we have not yet loaded an exec file, then we have no
- entry point, so return an empty string.*/
- if ((int) current_target.to_stratum > (int) dummy_stratum)
- {
- addrstr = (char *)core_addr_to_string (entry_point_address ());
- Tcl_SetStringObj (result_ptr->obj_ptr, addrstr, -1);
- }
- else
- Tcl_SetStringObj (result_ptr->obj_ptr, "", -1);
-
- return TCL_OK;
-}
-
-/* Covert hex to binary. Stolen from remote.c,
- but added error handling */
-static int
-fromhex (int a)
-{
- if (a >= '0' && a <= '9')
- return a - '0';
- else if (a >= 'a' && a <= 'f')
- return a - 'a' + 10;
- else if (a >= 'A' && a <= 'F')
- return a - 'A' + 10;
-
- return -1;
-}
-
-static int
-hex2bin (const char *hex, char *bin, int count)
-{
- int i, m, n;
- int incr = 2;
-
-
- if (TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE)
- {
- /* need to read string in reverse */
- hex += count - 2;
- incr = -2;
- }
-
- for (i = 0; i < count; i += 2)
- {
- if (hex[0] == 0 || hex[1] == 0)
- {
- /* Hex string is short, or of uneven length.
- Return the count that has been converted so far. */
- return i;
- }
- m = fromhex (hex[0]);
- n = fromhex (hex[1]);
- if (m == -1 || n == -1)
- return -1;
- *bin++ = m * 16 + n;
- hex += incr;
- }
-
- return i;
-}
-
-/* This implements the Tcl command 'gdb_set_mem', which
- * sets some chunk of memory.
- *
- * Arguments:
- * gdb_set_mem addr hexstr len
- *
- * addr: address of data to set
- * hexstr: ascii string of data to set
- * len: number of bytes of data to set
- */
-static int
-gdb_set_mem (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- CORE_ADDR addr;
- gdb_byte buf[128];
- char *hexstr;
- int len, size;
-
- if (objc != 4)
- {
- Tcl_WrongNumArgs (interp, 1, objv, "addr hex_data len");
- return TCL_ERROR;
- }
-
- /* Address to write */
- addr = string_to_core_addr (Tcl_GetStringFromObj (objv[1], NULL));
-
- /* String value to write: it's in hex */
- hexstr = Tcl_GetStringFromObj (objv[2], NULL);
- if (hexstr == NULL)
- return TCL_ERROR;
-
- /* Length of buf */
- if (Tcl_GetIntFromObj (interp, objv[3], &len) != TCL_OK)
- return TCL_ERROR;
-
- /* Convert hexstr to binary and write */
- if (hexstr[0] == '0' && hexstr[1] == 'x')
- hexstr += 2;
- size = hex2bin (hexstr, (char *) buf, strlen (hexstr));
- if (size < 0)
- {
- /* Error in input */
- gdbtk_set_result (interp, "Invalid hexadecimal input: \"0x%s\"", hexstr);
- return TCL_ERROR;
- }
-
- target_write_memory (addr, buf, len);
- return TCL_OK;
-}
-
-/* This implements the Tcl command 'gdb_update_mem', which
- * updates a block of memory in the memory window
- *
- * Arguments:
- * gdb_update_mem data addr form size nbytes bpr aschar
- *
- * 1 data: variable that holds table's data
- * 2 addr: address of data to dump
- * 3 mform: a char indicating format
- * 4 size: size of each element; 1,2,4, or 8 bytes
- * 5 nbytes: the number of bytes to read
- * 6 bpr: bytes per row
- * 7 aschar: if present, an ASCII dump of the row is included. ASCHAR
- * used for unprintable characters.
- *
- * Return:
- * a list of three integers: {border_col_width data_col_width ascii_col_width}
- * which can be used to set the table's column widths. */
-
-static int
-gdb_update_mem (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- long dummy;
- char index[20];
- CORE_ADDR addr;
- int nbytes, rnum, bpr;
- int size, asize, i, j, bc;
- int max_ascii_len, max_val_len, max_label_len;
- char format, aschar;
- char *data, *tmp;
- char buff[128], *mbuf, *mptr, *cptr, *bptr;
- struct ui_file *stb;
- struct type *val_type;
- struct cleanup *old_chain;
-
- if (objc < 7 || objc > 8)
- {
- Tcl_WrongNumArgs (interp, 1, objv, "data addr format size bytes bytes_per_row ?ascii_char?");
- return TCL_ERROR;
- }
-
- /* Get table data and link to a local variable */
- data = Tcl_GetStringFromObj (objv[1], NULL);
- if (data == NULL)
- {
- gdbtk_set_result (interp, "could not get data variable");
- return TCL_ERROR;
- }
-
- if (Tcl_UpVar (interp, "1", data, "data", 0) != TCL_OK)
- {
- gdbtk_set_result (interp, "could not link table data");
- return TCL_ERROR;
- }
-
- if (Tcl_GetIntFromObj (interp, objv[4], &size) != TCL_OK)
- return TCL_ERROR;
- else if (size <= 0)
- {
- gdbtk_set_result (interp, "Invalid size, must be > 0");
- return TCL_ERROR;
- }
-
- if (Tcl_GetIntFromObj (interp, objv[5], &nbytes) != TCL_OK)
- return TCL_ERROR;
- else if (nbytes <= 0)
- {
- gdbtk_set_result (interp, "Invalid number of bytes, must be > 0");
- return TCL_ERROR;
- }
-
- if (Tcl_GetIntFromObj (interp, objv[6], &bpr) != TCL_OK)
- return TCL_ERROR;
- else if (bpr <= 0)
- {
- gdbtk_set_result (interp, "Invalid bytes per row, must be > 0");
- return TCL_ERROR;
- }
-
- tmp = Tcl_GetStringFromObj (objv[2], NULL);
- if (tmp == NULL)
- {
- gdbtk_set_result (interp, "could not get address");
- return TCL_ERROR;
- }
- addr = string_to_core_addr (tmp);
-
- format = *(Tcl_GetStringFromObj (objv[3], NULL));
- mbuf = (char *) xmalloc (nbytes + 32);
- if (!mbuf)
- {
- gdbtk_set_result (interp, "Out of memory.");
- return TCL_ERROR;
- }
-
- memset (mbuf, 0, nbytes + 32);
- mptr = cptr = mbuf;
-
- rnum = 0;
- while (rnum < nbytes)
- {
- int error;
- int num = target_read_memory_partial (addr + rnum, mbuf + rnum,
- nbytes - rnum, &error);
- if (num <= 0)
- break;
- rnum += num;
- }
-
- if (objc == 8)
- aschar = *(Tcl_GetStringFromObj (objv[7], NULL));
- else
- aschar = 0;
-
- switch (size)
- {
- case 1:
- val_type = builtin_type_int8;
- asize = 'b';
- break;
- case 2:
- val_type = builtin_type_int16;
- asize = 'h';
- break;
- case 4:
- val_type = builtin_type_int32;
- asize = 'w';
- break;
- case 8:
- val_type = builtin_type_int64;
- asize = 'g';
- break;
- default:
- val_type = builtin_type_int8;
- asize = 'b';
- }
-
- bc = 0; /* count of bytes in a row */
- bptr = &buff[0]; /* pointer for ascii dump */
-
- /* Open a memory ui_file that we can use to print memory values */
- stb = mem_fileopen ();
- old_chain = make_cleanup_ui_file_delete (stb);
-
- /* A little macro to do column indices. As a rule, given the current
- byte, i, of a total nbytes and the bytes per row, bpr, and the size of
- each cell, size, the row and column will be given by:
-
- row = i/bpr
- col = (i%bpr)/size
- */
-#define INDEX(row,col) sprintf (index, "%d,%d",(row),(col))
-
- /* Fill in address labels */
- max_label_len = 0;
- for (i = 0; i < nbytes; i += bpr)
- {
- char s[130];
- sprintf (s, "%s", core_addr_to_string (addr + i));
- INDEX ((int) i/bpr, -1);
- Tcl_SetVar2 (interp, "data", index, s, 0);
-
- /* The tcl code in MemWin::update_addr used to track the size
- of each cell. I don't see how these could change for any given
- update, so we don't loop over all cells. We just note the first
- size. */
- if (max_label_len == 0)
- max_label_len = strlen (s);
- }
-
- /* Fill in memory */
- max_val_len = 0; /* Ditto the above comments about max_label_len */
- max_ascii_len = 0;
- for (i = 0; i < nbytes; i += size)
- {
- INDEX ((int) i/bpr, (int) (i%bpr)/size);
-
- if (i >= rnum)
- {
- /* Read fewer bytes than requested */
- tmp = "N/A";
-
- if (aschar)
- {
- for (j = 0; j < size; j++)
- *bptr++ = 'X';
- }
- }
- else
- {
- /* print memory to our uiout file and set the table's variable */
- ui_file_rewind (stb);
- print_scalar_formatted (mptr, val_type, format, asize, stb);
- tmp = ui_file_xstrdup (stb, &dummy);
-
- /* See comments above on max_*_len */
- if (max_val_len == 0)
- max_val_len = strlen (tmp);
-
- if (aschar)
- {
- for (j = 0; j < size; j++)
- {
- if (isprint (*cptr))
- *bptr++ = *cptr++;
- else
- {
- *bptr++ = aschar;
- cptr++;;
- }
- }
- }
- }
- Tcl_SetVar2 (interp, "data", index, tmp, 0);
-
- mptr += size;
- bc += size;
-
- if (aschar && (bc >= bpr))
- {
- /* end of row. Add it to the result and reset variables */
- *bptr = '\000';
- INDEX (i/bpr, bpr/size);
- Tcl_SetVar2 (interp, "data", index, buff, 0);
-
- /* See comments above on max_*_len */
- if (max_ascii_len == 0)
- max_ascii_len = strlen (buff);
-
- bc = 0;
- bptr = &buff[0];
- }
- }
-
- /* return max_*_len so that column widths can be set */
- Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr, Tcl_NewIntObj (max_label_len + 1));
- Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr, Tcl_NewIntObj (max_val_len + 1));
- Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr, Tcl_NewIntObj (max_ascii_len + 1));
- do_cleanups (old_chain);
- xfree (mbuf);
- return TCL_OK;
-#undef INDEX
-}
-
-
-/* This implements the tcl command "gdb_loadfile"
- * It loads a c source file into a text widget.
- *
- * Tcl Arguments:
- * widget: the name of the text widget to fill
- * filename: the name of the file to load
- * linenumbers: A boolean indicating whether or not to display line numbers.
- * Tcl Result:
- *
- */
-
-/* In this routine, we will build up a "line table", i.e. a
- * table of bits showing which lines in the source file are executible.
- * LTABLE_SIZE is the number of bytes to allocate for the line table.
- *
- * Its size limits the maximum number of lines
- * in a file to 8 * LTABLE_SIZE. This memory is freed after
- * the file is loaded, so it is OK to make this very large.
- * Additional memory will be allocated if needed. */
-#define LTABLE_SIZE 20000
-static int
-gdb_loadfile (ClientData clientData, Tcl_Interp *interp, int objc,
- Tcl_Obj *CONST objv[])
-{
- char *file, *widget;
- int linenumbers, ln, lnum, ltable_size;
- FILE *fp;
- char *ltable;
- struct symtab *symtab;
- struct linetable_entry *le;
- long mtime = 0;
- struct stat st;
- char line[10000], line_num_buf[18];
- const char *text_argv[9];
- Tcl_CmdInfo text_cmd;
-
-
- if (objc != 4)
- {
- Tcl_WrongNumArgs(interp, 1, objv, "widget filename linenumbers");
- return TCL_ERROR;
- }
-
- widget = Tcl_GetStringFromObj (objv[1], NULL);
- if ( Tk_NameToWindow (interp, widget, Tk_MainWindow (interp)) == NULL)
- {
- return TCL_ERROR;
- }
-
- if (!Tcl_GetCommandInfo (interp, widget, &text_cmd))
- {
- gdbtk_set_result (interp, "Can't get widget command info");
- return TCL_ERROR;
- }
-
- file = Tcl_GetStringFromObj (objv[2], NULL);
- Tcl_GetBooleanFromObj (interp, objv[3], &linenumbers);
-
- symtab = lookup_symtab (file);
- if (!symtab)
- {
- gdbtk_set_result (interp, "File not found in symtab");
- return TCL_ERROR;
- }
-
- file = symtab_to_filename ( symtab );
- if ((fp = fopen ( file, "r" )) == NULL)
- {
- gdbtk_set_result (interp, "Can't open file for reading");
- return TCL_ERROR;
- }
-
- if (stat (file, &st) < 0)
- {
- catch_errors (perror_with_name_wrapper, "gdbtk: get time stamp", "",
- RETURN_MASK_ALL);
- return TCL_ERROR;
- }
-
- if (symtab && symtab->objfile && symtab->objfile->obfd)
- mtime = bfd_get_mtime(symtab->objfile->obfd);
- else if (exec_bfd)
- mtime = bfd_get_mtime(exec_bfd);
-
- if (mtime && mtime < st.st_mtime)
- {
- gdbtk_ignorable_warning("file_times",\
- "Source file is more recent than executable.\n");
- }
-
-
- /* Source linenumbers don't appear to be in order, and a sort is */
- /* too slow so the fastest solution is just to allocate a huge */
- /* array and set the array entry for each linenumber */
-
- ltable_size = LTABLE_SIZE;
- ltable = (char *)malloc (LTABLE_SIZE);
- if (ltable == NULL)
- {
- fclose (fp);
- gdbtk_set_result (interp, "Out of memory.");
- return TCL_ERROR;
- }
-
- memset (ltable, 0, LTABLE_SIZE);
-
- if (symtab->linetable && symtab->linetable->nitems)
- {
- le = symtab->linetable->item;
- for (ln = symtab->linetable->nitems ;ln > 0; ln--, le++)
- {
- lnum = le->line >> 3;
- if (lnum >= ltable_size)
- {
- char *new_ltable;
- new_ltable = (char *)realloc (ltable, ltable_size*2);
- memset (new_ltable + ltable_size, 0, ltable_size);
- ltable_size *= 2;
- if (new_ltable == NULL)
- {
- free (ltable);
- fclose (fp);
- gdbtk_set_result (interp, "Out of memory.");
- return TCL_ERROR;
- }
- ltable = new_ltable;
- }
- ltable[lnum] |= 1 << (le->line % 8);
- }
- }
-
- ln = 1;
-
- line[0] = '\t';
- text_argv[0] = widget;
- text_argv[1] = "insert";
- text_argv[2] = "end";
- text_argv[5] = line;
- text_argv[6] = "source_tag";
- text_argv[8] = NULL;
-
- if (linenumbers)
- {
- int found_carriage_return = 1;
-
- line_num_buf[1] = '\t';
-
- text_argv[3] = line_num_buf;
-
- while (fgets (line + 1, 9980, fp))
- {
- /* Look for DOS style \r\n endings, and if found,
- * strip off the \r. We assume (for the sake of
- * speed) that ALL lines in the file have DOS endings,
- * or none do.
- */
-
- if (found_carriage_return)
- {
- char *p = strrchr(line, '\0') - 2;
- if (*p == '\r')
- {
- *p = '\n';
- *(p + 1) = '\0';
- }
- else
- found_carriage_return = 0;
- }
-
- sprintf (line_num_buf+2, "%d", ln);
- if (ltable[ln >> 3] & (1 << (ln % 8)))
- {
- line_num_buf[0] = '-';
- text_argv[4] = "break_rgn_tag";
- }
- else
- {
- line_num_buf[0] = ' ';
- text_argv[4] = "";
- }
-
- text_cmd.proc(text_cmd.clientData, interp, 7, text_argv);
- ln++;
- }
- }
- else
- {
- int found_carriage_return = 1;
-
- while (fgets (line + 1, 9980, fp))
- {
- if (found_carriage_return)
- {
- char *p = strrchr(line, '\0') - 2;
- if (*p == '\r')
- {
- *p = '\n';
- *(p + 1) = '\0';
- }
- else
- found_carriage_return = 0;
- }
-
- if (ltable[ln >> 3] & (1 << (ln % 8)))
- {
- text_argv[3] = "- ";
- text_argv[4] = "break_rgn_tag";
- }
- else
- {
- text_argv[3] = " ";
- text_argv[4] = "";
- }
-
- text_cmd.proc(text_cmd.clientData, interp, 7, text_argv);
- ln++;
- }
- }
-
- free (ltable);
- fclose (fp);
- return TCL_OK;
-}
-
-/*
- * This section contains a bunch of miscellaneous utility commands
- */
-
-/* This implements the tcl command gdb_path_conv
-
-* On Windows, it canonicalizes the pathname,
-* On Unix, it is a no op.
-*
-* Arguments:
-* path
-* Tcl Result:
-* The canonicalized path.
-*/
-
-static int
-gdb_path_conv (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- if (objc != 2)
- {
- Tcl_WrongNumArgs (interp, 1, objv, NULL);
- return TCL_ERROR;
- }
-
-#ifdef __CYGWIN__
- {
- char pathname[256], *ptr;
-
- cygwin_conv_to_full_win32_path (Tcl_GetStringFromObj (objv[1], NULL),
- pathname);
- for (ptr = pathname; *ptr; ptr++)
- {
- if (*ptr == '\\')
- *ptr = '/';
- }
- Tcl_SetStringObj (result_ptr->obj_ptr, pathname, -1);
- }
-#else
- Tcl_SetStringObj (result_ptr->obj_ptr, Tcl_GetStringFromObj (objv[1], NULL),
- -1);
-#endif
-
- return TCL_OK;
-}
-
-/*
- * This section has utility routines that are not Tcl commands.
- */
-
-static int
-perror_with_name_wrapper (PTR args)
-{
- perror_with_name (args);
- return 1;
-}
-
-/* Look for the function that contains PC and return the source
- (demangled) name for this function.
-
- If no symbol is found, it returns an empty string. In either
- case, memory is owned by gdb. Do not attempt to free it. */
-char *
-pc_function_name (CORE_ADDR pc)
-{
- struct symbol *sym;
- char *funcname = NULL;
-
- /* First lookup the address in the symbol table... */
- sym = find_pc_function (pc);
- if (sym != NULL)
- funcname = GDBTK_SYMBOL_SOURCE_NAME (sym);
- else
- {
- /* ... if that fails, look it up in the minimal symbols. */
- struct minimal_symbol *msym = NULL;
-
- msym = lookup_minimal_symbol_by_pc (pc);
- if (msym != NULL)
- funcname = GDBTK_SYMBOL_SOURCE_NAME (msym);
- }
-
- if (funcname == NULL)
- funcname = "";
-
- return funcname;
-}
-
-void
-gdbtk_set_result (Tcl_Interp *interp, const char *fmt,...)
-{
- va_list args;
- char *buf;
-
- va_start (args, fmt);
- xvasprintf (&buf, fmt, args);
- va_end (args);
- Tcl_SetObjResult (interp, Tcl_NewStringObj (buf, -1));
- xfree(buf);
-}
-
-
-/* This implements the tcl command 'gdb_incr_addr'.
- * It does address arithmetic and outputs a proper
- * hex string. This was originally implemented
- * when tcl did not support 64-bit values, but we keep
- * it because it saves us from having to call incr
- * followed by format to get the result in hex.
- * Also, it may be true in the future that CORE_ADDRs
- * will have their own ALU to deal properly with
- * architecture-specific address arithmetic.
- *
- * Tcl Arguments:
- * addr - CORE_ADDR
- * number - optional number to add to the address
- * default is 1.
- *
- * Tcl Result:
- * hex string containing the result of addr + number
- */
-
-static int
-gdb_incr_addr (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- CORE_ADDR address;
- int number = 1;
-
- if (objc != 2 && objc != 3)
- {
- Tcl_WrongNumArgs (interp, 1, objv, "CORE_ADDR [number]");
- return TCL_ERROR;
- }
-
- address = string_to_core_addr (Tcl_GetStringFromObj (objv[1], NULL));
-
- if (objc == 3)
- {
- if (Tcl_GetIntFromObj (interp, objv[2], &number) != TCL_OK)
- return TCL_ERROR;
- }
-
- address += number;
-
- Tcl_SetStringObj (result_ptr->obj_ptr, (char *)core_addr_to_string (address), -1);
-
- return TCL_OK;
-}
-
-/* This implements the tcl command 'gdb_CAS_to_TAS'.
- * It takes a CORE_ADDR and outputs a string suitable
- * for displaying as the target address.
- *
- * Note that CORE_ADDRs are internal addresses which map
- * to target addresses in different ways depending on the
- * architecture. The target address string is a user-readable
- * string may be quite different than the CORE_ADDR. For example,
- * a CORE_ADDR of 0x02001234 might indicate a data address of
- * 0x1234 which this function might someday output as something
- * like "D:1234".
- *
- * Tcl Arguments:
- * address - CORE_ADDR
- *
- * Tcl Result:
- * string
- */
-
-static int
-gdb_CA_to_TAS (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- CORE_ADDR address;
- Tcl_WideInt wide_addr;
-
- if (objc != 2)
- {
- Tcl_WrongNumArgs (interp, 1, objv, "CORE_ADDR");
- return TCL_ERROR;
- }
-
- /* Read address into a wideint, which is the largest tcl supports
- then convert to a CORE_ADDR */
- if (Tcl_GetWideIntFromObj (interp, objv[1], &wide_addr) != TCL_OK)
- return TCL_ERROR;
- address = wide_addr;
-
- /* This is not really correct. Using paddr_nz() will convert to hex and truncate
- to 32-bits when required but will otherwise not do what we really want. */
- Tcl_SetStringObj (result_ptr->obj_ptr, paddr_nz (address), -1);
-
- return TCL_OK;
-}
-
-/* Another function that was removed in GDB and replaced
- * with something similar, but different enough to break
- * Insight.
- */
-int find_and_open_source (struct objfile *objfile, const char *filename,
- const char *dirname, char **fullname);
-
-char *
-symtab_to_filename (struct symtab *s)
-{
-
- int r;
-
- if (!s)
- return NULL;
-
- /* Don't check s->fullname here, the file could have been
- deleted/moved/..., look for it again */
- r = find_and_open_source (s->objfile, s->filename, s->dirname,
- &s->fullname);
- if (r)
- close (r);
-
- if (s->fullname && *s->fullname)
- return s->fullname;
- return s->filename;
-}
diff --git a/gdb/gdbtk/generic/gdbtk-cmds.h b/gdb/gdbtk/generic/gdbtk-cmds.h
deleted file mode 100644
index 9a1c6a94f73..00000000000
--- a/gdb/gdbtk/generic/gdbtk-cmds.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Tcl/Tk command interface for Insight
- Copyright (C) 2001 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-#if !defined(GDBTK_CMDS_H)
-#define GDBTK_CMDS_H 1
-
-/* This structure filled in gdbtk_call_wrapper and passed to
- the wrapped call function.
- It stores the command pointer and arguments
- run in the wrapper function. */
-struct wrapped_call_args
- {
- Tcl_Interp *interp;
- Tcl_ObjCmdProc *func;
- int objc;
- Tcl_Obj *CONST * objv;
- int val;
- };
-
-/* A generic call-wrapper to catch longjmps when calling C commands from
- tcl. ALL tcl commands should be wrapped in this call. */
-extern int gdbtk_call_wrapper (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]);
-
-/* Returns the source (demangled) name for a function at PC. Returns empty string
- if not found. Memory is owned by gdb. Do not free it. */
-extern char *pc_function_name (CORE_ADDR pc);
-
-/* Convenience function to sprintf something(s) into a new element in
- a Tcl list object. */
-extern void sprintf_append_element_to_obj (Tcl_Obj * objp, char *format, ...);
-
-/* printf-like function to return error messages */
-extern void gdbtk_set_result (Tcl_Interp *interp, const char *fmt,...);
-
-/* Module init routines: Each module of commands should be declared here. */
-extern int Gdbtk_Breakpoint_Init (Tcl_Interp *interp);
-extern int Gdbtk_Stack_Init (Tcl_Interp *interp);
-extern int Gdbtk_Register_Init (Tcl_Interp *interp);
-
-/* replacement for removed gdb function */
-char *symtab_to_filename (struct symtab *s);
-
-#endif /* GDBTK_CMDS_H */
diff --git a/gdb/gdbtk/generic/gdbtk-hooks.c b/gdb/gdbtk/generic/gdbtk-hooks.c
deleted file mode 100644
index 1324d28f83f..00000000000
--- a/gdb/gdbtk/generic/gdbtk-hooks.c
+++ /dev/null
@@ -1,836 +0,0 @@
-/* Startup code for Insight.
-
- Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 200, 2002, 2003, 2004
- Free Software Foundation, Inc.
-
- Written by Stu Grossman <grossman@cygnus.com> of Cygnus Support.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-#include "defs.h"
-#include "inferior.h"
-#include "symfile.h"
-#include "objfiles.h"
-#include "gdbcore.h"
-#include "tracepoint.h"
-#include "demangle.h"
-#include "gdb-events.h"
-#include "top.h"
-#include "annotate.h"
-#include "cli/cli-decode.h"
-
-#ifdef _WIN32
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#endif
-
-/* tcl header files includes varargs.h unless HAS_STDARG is defined,
- but gdb uses stdarg.h, so make sure HAS_STDARG is defined. */
-#define HAS_STDARG 1
-
-#include <itcl.h>
-#include <tcl.h>
-#include <tk.h>
-#include "guitcl.h"
-#include "gdbtk.h"
-
-#include <signal.h>
-#include <fcntl.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
-
-#include "gdb_string.h"
-#include "dis-asm.h"
-#include "gdbcmd.h"
-
-
-volatile int in_fputs = 0;
-
-/* Set by gdb_stop, this flag informs x_event to tell its caller
- that it should forcibly detach from the target. */
-int gdbtk_force_detach = 0;
-
-/* From gdbtk-bp.c */
-extern void gdbtk_create_breakpoint (int);
-extern void gdbtk_delete_breakpoint (int);
-extern void gdbtk_modify_breakpoint (int);
-extern void gdbtk_create_tracepoint (int);
-extern void gdbtk_delete_tracepoint (int);
-extern void gdbtk_modify_tracepoint (int);
-
-static void gdbtk_architecture_changed (void);
-static void gdbtk_trace_find (char *arg, int from_tty);
-static void gdbtk_trace_start_stop (int, int);
-static void gdbtk_attach (void);
-static void gdbtk_detach (void);
-static void gdbtk_file_changed (char *);
-static void gdbtk_exec_file_display (char *);
-static void gdbtk_call_command (struct cmd_list_element *, char *, int);
-static ptid_t gdbtk_wait (ptid_t, struct target_waitstatus *);
-int x_event (int);
-static int gdbtk_query (const char *, va_list);
-static void gdbtk_warning (const char *, va_list);
-static char *gdbtk_readline (char *);
-static void gdbtk_readline_begin (char *format,...);
-static void gdbtk_readline_end (void);
-static void gdbtk_pre_add_symbol (const char *);
-static void gdbtk_print_frame_info (struct symtab *, int, int, int);
-static void gdbtk_post_add_symbol (void);
-static void gdbtk_register_changed (int regno);
-static void gdbtk_memory_changed (CORE_ADDR addr, int len);
-static void gdbtk_selected_frame_changed (int);
-static void gdbtk_context_change (int);
-static void gdbtk_error_begin (void);
-void report_error (void);
-static void gdbtk_annotate_signal (void);
-static void gdbtk_set_hook (struct cmd_list_element *cmdblk);
-
-/*
- * gdbtk_fputs can't be static, because we need to call it in gdbtk.c.
- * See note there for details.
- */
-
-long gdbtk_read (struct ui_file *, char *, long);
-void gdbtk_fputs (const char *, struct ui_file *);
-static int gdbtk_load_hash (const char *, unsigned long);
-
-/*
- * gdbtk_add_hooks - add all the hooks to gdb. This will get called by the
- * startup code to fill in the hooks needed by core gdb.
- */
-
-void
-gdbtk_add_hooks (void)
-{
- static struct gdb_events handlers;
-
- /* Gdb event handlers */
- handlers.breakpoint_create = gdbtk_create_breakpoint;
- handlers.breakpoint_modify = gdbtk_modify_breakpoint;
- handlers.breakpoint_delete = gdbtk_delete_breakpoint;
- handlers.tracepoint_create = gdbtk_create_tracepoint;
- handlers.tracepoint_modify = gdbtk_modify_tracepoint;
- handlers.tracepoint_delete = gdbtk_delete_tracepoint;
- handlers.architecture_changed = gdbtk_architecture_changed;
- deprecated_set_gdb_event_hooks (&handlers);
-
- /* Hooks */
- deprecated_call_command_hook = gdbtk_call_command;
- deprecated_set_hook = gdbtk_set_hook;
- deprecated_readline_begin_hook = gdbtk_readline_begin;
- deprecated_readline_hook = gdbtk_readline;
- deprecated_readline_end_hook = gdbtk_readline_end;
-
- deprecated_print_frame_info_listing_hook = gdbtk_print_frame_info;
- deprecated_query_hook = gdbtk_query;
- deprecated_warning_hook = gdbtk_warning;
-
- deprecated_interactive_hook = gdbtk_interactive;
- deprecated_target_wait_hook = gdbtk_wait;
- deprecated_ui_load_progress_hook = gdbtk_load_hash;
-
- deprecated_ui_loop_hook = x_event;
- deprecated_pre_add_symbol_hook = gdbtk_pre_add_symbol;
- deprecated_post_add_symbol_hook = gdbtk_post_add_symbol;
- deprecated_file_changed_hook = gdbtk_file_changed;
- specify_exec_file_hook (gdbtk_exec_file_display);
-
- deprecated_trace_find_hook = gdbtk_trace_find;
- deprecated_trace_start_stop_hook = gdbtk_trace_start_stop;
-
- deprecated_attach_hook = gdbtk_attach;
- deprecated_detach_hook = gdbtk_detach;
-
- deprecated_register_changed_hook = gdbtk_register_changed;
- deprecated_memory_changed_hook = gdbtk_memory_changed;
- deprecated_selected_frame_level_changed_hook = gdbtk_selected_frame_changed;
- deprecated_context_hook = gdbtk_context_change;
-
- deprecated_error_begin_hook = gdbtk_error_begin;
-
- deprecated_annotate_signal_hook = gdbtk_annotate_signal;
- deprecated_annotate_signalled_hook = gdbtk_annotate_signal;
-}
-
-/* These control where to put the gdb output which is created by
- {f}printf_{un}filtered and friends. gdbtk_fputs is the lowest
- level of these routines and capture all output from the rest of
- GDB.
-
- The reason to use the result_ptr rather than the gdbtk_interp's result
- directly is so that a call_wrapper invoked function can preserve its result
- across calls into Tcl which might be made in the course of the function's
- execution.
-
- * result_ptr->obj_ptr is where to accumulate the result.
- * GDBTK_TO_RESULT flag means the output goes to the gdbtk_tcl_fputs proc
- instead of to the result_ptr.
- * GDBTK_MAKES_LIST flag means add to the result as a list element.
-
-*/
-
-gdbtk_result *result_ptr = NULL;
-
-/* If you want to restore an old value of result_ptr whenever cleanups
- are run, pass this function to make_cleanup, along with the value
- of result_ptr you'd like to reinstate. */
-void
-gdbtk_restore_result_ptr (void *old_result_ptr)
-{
- result_ptr = (gdbtk_result *) old_result_ptr;
-}
-
-/* This allows you to Tcl_Eval a tcl command which takes
- a command word, and then a single argument. */
-int
-gdbtk_two_elem_cmd (cmd_name, argv1)
- char *cmd_name;
- char *argv1;
-{
- char *command;
- int result, flags_ptr, arg_len, cmd_len;
-
- arg_len = Tcl_ScanElement (argv1, &flags_ptr);
- cmd_len = strlen (cmd_name);
- command = malloc (arg_len + cmd_len + 2);
- strcpy (command, cmd_name);
- strcat (command, " ");
-
- Tcl_ConvertElement (argv1, command + cmd_len + 1, flags_ptr);
-
- result = Tcl_Eval (gdbtk_interp, command);
- if (result != TCL_OK)
- report_error ();
- free (command);
- return result;
-}
-
-struct ui_file *
-gdbtk_fileopenin (void)
-{
- struct ui_file *file = ui_file_new ();
- set_ui_file_read (file, gdbtk_read);
- return file;
-}
-
-struct ui_file *
-gdbtk_fileopen (void)
-{
- struct ui_file *file = ui_file_new ();
- set_ui_file_fputs (file, gdbtk_fputs);
- return file;
-}
-
-/* This handles input from the gdb console.
- */
-
-long
-gdbtk_read (struct ui_file *stream, char *buf, long sizeof_buf)
-{
- int result;
- size_t actual_len;
-
- if (stream == gdb_stdtargin)
- {
- result = Tcl_Eval (gdbtk_interp, "gdbtk_console_read");
- if (result != TCL_OK)
- {
- report_error ();
- actual_len = 0;
- }
- else
- actual_len = strlen (gdbtk_interp->result);
-
- /* Truncate the string if it is too big for the caller's buffer. */
- if (actual_len >= sizeof_buf)
- actual_len = sizeof_buf - 1;
-
- memcpy (buf, gdbtk_interp->result, actual_len);
- buf[actual_len] = '\0';
- return actual_len;
- }
- else
- {
- errno = EBADF;
- return 0;
- }
-}
-
-
-/* This handles all the output from gdb. All the gdb printf_xxx functions
- * eventually end up here. The output is either passed to the result_ptr
- * where it will go to the result of some gdbtk command, or passed to the
- * Tcl proc gdbtk_tcl_fputs (where it is usually just dumped to the console
- * window.
- *
- * The cases are:
- *
- * 1) result_ptr == NULL - This happens when some output comes from gdb which
- * is not generated by a command in gdbtk-cmds, usually startup stuff.
- * In this case we just route the data to gdbtk_tcl_fputs.
- * 2) The GDBTK_TO_RESULT flag is set - The result is supposed to go to Tcl.
- * We place the data into the result_ptr, either as a string,
- * or a list, depending whether the GDBTK_MAKES_LIST bit is set.
- * 3) The GDBTK_TO_RESULT flag is unset - We route the data to gdbtk_tcl_fputs
- * UNLESS it was coming to gdb_stderr. Then we place it in the result_ptr
- * anyway, so it can be dealt with.
- *
- */
-
-void
-gdbtk_fputs (const char *ptr, struct ui_file *stream)
-{
- if (gdbtk_disable_fputs)
- return;
-
- in_fputs = 1;
-
- if (stream == gdb_stdlog)
- gdbtk_two_elem_cmd ("gdbtk_tcl_fputs_log", (char *) ptr);
- else if (stream == gdb_stdtarg)
- gdbtk_two_elem_cmd ("gdbtk_tcl_fputs_target", (char *) ptr);
- else if (result_ptr != NULL)
- {
- if (result_ptr->flags & GDBTK_TO_RESULT)
- {
- if (result_ptr->flags & GDBTK_MAKES_LIST)
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr,
- Tcl_NewStringObj ((char *) ptr, -1));
- else
- Tcl_AppendToObj (result_ptr->obj_ptr, (char *) ptr, -1);
- }
- else if (stream == gdb_stderr || result_ptr->flags & GDBTK_ERROR_ONLY)
- {
- if (result_ptr->flags & GDBTK_ERROR_STARTED)
- Tcl_AppendToObj (result_ptr->obj_ptr, (char *) ptr, -1);
- else
- {
- Tcl_SetStringObj (result_ptr->obj_ptr, (char *) ptr, -1);
- result_ptr->flags |= GDBTK_ERROR_STARTED;
- }
- }
- else
- {
- gdbtk_two_elem_cmd ("gdbtk_tcl_fputs", (char *) ptr);
- if (result_ptr->flags & GDBTK_MAKES_LIST)
- gdbtk_two_elem_cmd ("gdbtk_tcl_fputs", " ");
- }
- }
- else
- {
- gdbtk_two_elem_cmd ("gdbtk_tcl_fputs", (char *) ptr);
- }
-
- in_fputs = 0;
-}
-
-/*
- * This routes all warnings to the Tcl function "gdbtk_tcl_warning".
- */
-
-static void
-gdbtk_warning (const char *warning, va_list args)
-{
- char *buf;
- xvasprintf (&buf, warning, args);
- gdbtk_two_elem_cmd ("gdbtk_tcl_warning", buf);
- free(buf);
-}
-
-
-/* Error-handling function for all hooks */
-/* Hooks are not like tcl functions, they do not simply return */
-/* TCL_OK or TCL_ERROR. Also, the calling function typically */
-/* doesn't care about errors in the hook functions. Therefore */
-/* after every hook function, report_error should be called. */
-/* report_error can just call Tcl_BackgroundError() which will */
-/* pop up a messagebox, or it can silently log the errors through */
-/* the gdbtk dbug command. */
-
-void
-report_error ()
-{
- TclDebug ('E', Tcl_GetVar (gdbtk_interp, "errorInfo", TCL_GLOBAL_ONLY));
- /* Tcl_BackgroundError(gdbtk_interp); */
-}
-
-/*
- * This routes all ignorable warnings to the Tcl function
- * "gdbtk_tcl_ignorable_warning".
- */
-
-void
-gdbtk_ignorable_warning (const char *class, const char *warning)
-{
- char *buf;
- xasprintf (&buf, "gdbtk_tcl_ignorable_warning {%s} {%s}", class, warning);
- if (Tcl_Eval (gdbtk_interp, buf) != TCL_OK)
- report_error ();
- free(buf);
-}
-
-static void
-gdbtk_register_changed (int regno)
-{
- if (Tcl_Eval (gdbtk_interp, "gdbtk_register_changed") != TCL_OK)
- report_error ();
-}
-
-static void
-gdbtk_memory_changed (CORE_ADDR addr, int len)
-{
- if (Tcl_Eval (gdbtk_interp, "gdbtk_memory_changed") != TCL_OK)
- report_error ();
-}
-
-
-/* This hook is installed as the deprecated_ui_loop_hook, which is
- * used in several places to keep the gui alive (x_event runs gdbtk's
- * event loop). Users include:
- * - ser-tcp.c in socket reading code
- * - ser-unix.c in serial port reading code
- * - built-in simulators while executing
- *
- * x_event used to be called on SIGIO on the socket to the X server
- * for unix. Unfortunately, Linux does not deliver SIGIO, so we resort
- * to an elaborate scheme to keep the gui alive.
- *
- * For simulators and socket or serial connections on all hosts, we
- * rely on deprecated_ui_loop_hook (x_event) to keep us going. If the
- * user requests a detach (as a result of pressing the stop button --
- * see comments before gdb_stop in gdbtk-cmds.c), it sets the global
- * GDBTK_FORCE_DETACH, which is the value that x_event returns to it's
- * caller. It is up to the caller of x_event to act on this
- * information.
- *
- * For native unix, we simply set an interval timer which calls
- * x_event to allow the debugger to run through the Tcl event
- * loop. See comments before gdbtk_start_timer and gdb_stop_timer
- * in gdbtk.c.
- *
- * For native windows (and a few other targets, like the v850 ICE), we
- * rely on the target_wait loops to call deprecated_ui_loop_hook to
- * keep us alive. */
-int
-x_event (int signo)
-{
- static volatile int in_x_event = 0;
- static Tcl_Obj *varname = NULL;
-
- /* Do nor re-enter this code or enter it while collecting gdb output. */
- if (in_x_event || in_fputs)
- return 0;
-
- /* Also, only do things while the target is running (stops and redraws).
- FIXME: We wold like to at least redraw at other times but this is bundled
- together in the TCL_WINDOW_EVENTS group and we would also process user
- input. We will have to prevent (unwanted) user input to be generated
- in order to be able to redraw (removing this test here). */
- if (!running_now)
- return 0;
-
- in_x_event = 1;
- gdbtk_force_detach = 0;
-
- /* Process pending events */
- while (Tcl_DoOneEvent (TCL_DONT_WAIT | TCL_ALL_EVENTS) != 0)
- ;
-
- if (load_in_progress)
- {
- int val;
- if (varname == NULL)
- {
-#if TCL_MAJOR_VERSION == 8 && (TCL_MINOR_VERSION < 1 || TCL_MINOR_VERSION > 2)
- Tcl_Obj *varnamestrobj = Tcl_NewStringObj ("download_cancel_ok", -1);
- varname = Tcl_ObjGetVar2 (gdbtk_interp, varnamestrobj, NULL, TCL_GLOBAL_ONLY);
-#else
- varname = Tcl_GetObjVar2 (gdbtk_interp, "download_cancel_ok", NULL, TCL_GLOBAL_ONLY);
-#endif
- }
- if ((Tcl_GetIntFromObj (gdbtk_interp, varname, &val) == TCL_OK) && val)
- {
- quit_flag = 1;
-#ifdef REQUEST_QUIT
- REQUEST_QUIT;
-#else
- if (immediate_quit)
- quit ();
-#endif
- }
- }
- in_x_event = 0;
-
- return gdbtk_force_detach;
-}
-
-/* VARARGS */
-static void
-gdbtk_readline_begin (char *format,...)
-{
- va_list args;
- char *buf;
-
- va_start (args, format);
- xvasprintf (&buf, format, args);
- gdbtk_two_elem_cmd ("gdbtk_tcl_readline_begin", buf);
- free(buf);
-}
-
-static char *
-gdbtk_readline (char *prompt)
-{
- int result;
-
-#ifdef _WIN32
- close_bfds ();
-#endif
-
- result = gdbtk_two_elem_cmd ("gdbtk_tcl_readline", prompt);
-
- if (result == TCL_OK)
- {
- return (xstrdup (gdbtk_interp->result));
- }
- else
- {
- gdbtk_fputs (gdbtk_interp->result, gdb_stdout);
- gdbtk_fputs ("\n", gdb_stdout);
- return (NULL);
- }
-}
-
-static void
-gdbtk_readline_end ()
-{
- if (Tcl_Eval (gdbtk_interp, "gdbtk_tcl_readline_end") != TCL_OK)
- report_error ();
-}
-
-static void
-gdbtk_call_command (struct cmd_list_element *cmdblk,
- char *arg, int from_tty)
-{
- struct cleanup *old_chain;
-
- old_chain = make_cleanup (null_cleanup, 0);
- running_now = 0;
- if (cmdblk->class == class_run || cmdblk->class == class_trace)
- {
-
- running_now = 1;
- if (!No_Update)
- Tcl_Eval (gdbtk_interp, "gdbtk_tcl_busy");
- cmd_func (cmdblk, arg, from_tty);
- running_now = 0;
- if (!No_Update)
- Tcl_Eval (gdbtk_interp, "gdbtk_tcl_idle");
- }
- else
- cmd_func (cmdblk, arg, from_tty);
-
- do_cleanups (old_chain);
-}
-
-/* Called after a `set' command succeeds. Runs the Tcl hook
- `gdb_set_hook' with the full name of the variable (a Tcl list) as
- the first argument and the new value as the second argument. */
-
-static void
-gdbtk_set_hook (struct cmd_list_element *cmdblk)
-{
- Tcl_DString cmd;
- char *p;
- char *buffer = NULL;
-
- Tcl_DStringInit (&cmd);
- Tcl_DStringAppendElement (&cmd, "gdbtk_tcl_set_variable");
-
- /* Append variable name as sublist. */
- Tcl_DStringStartSublist (&cmd);
- p = cmdblk->prefixname;
- while (p && *p)
- {
- char *q = strchr (p, ' ');
- char save = '\0';
- if (q)
- {
- save = *q;
- *q = '\0';
- }
- Tcl_DStringAppendElement (&cmd, p);
- if (q)
- *q = save;
- p = q + 1;
- }
- Tcl_DStringAppendElement (&cmd, cmdblk->name);
- Tcl_DStringEndSublist (&cmd);
-
- switch (cmdblk->var_type)
- {
- case var_string_noescape:
- case var_filename:
- case var_enum:
- case var_string:
- Tcl_DStringAppendElement (&cmd, (*(char **) cmdblk->var
- ? *(char **) cmdblk->var
- : "(null)"));
- break;
-
- case var_boolean:
- Tcl_DStringAppendElement (&cmd, (*(int *) cmdblk->var ? "1" : "0"));
- break;
-
- case var_uinteger:
- case var_zinteger:
- xasprintf (&buffer, "%u", *(unsigned int *) cmdblk->var);
- Tcl_DStringAppendElement (&cmd, buffer);
- break;
-
- case var_integer:
- xasprintf (&buffer, "%d", *(int *) cmdblk->var);
- Tcl_DStringAppendElement (&cmd, buffer);
- break;
-
- default:
- /* This case should already be trapped by the hook caller. */
- Tcl_DStringAppendElement (&cmd, "error");
- break;
- }
-
- if (Tcl_Eval (gdbtk_interp, Tcl_DStringValue (&cmd)) != TCL_OK)
- report_error ();
-
- Tcl_DStringFree (&cmd);
-
- if (buffer != NULL)
- {
- free(buffer);
- }
-}
-
-int
-gdbtk_load_hash (const char *section, unsigned long num)
-{
- char *buf;
- xasprintf (&buf, "Download::download_hash %s %ld", section, num);
- if (Tcl_Eval (gdbtk_interp, buf) != TCL_OK)
- report_error ();
- free(buf);
-
- return atoi (gdbtk_interp->result);
-}
-
-
-/* This hook is called whenever we are ready to load a symbol file so that
- the UI can notify the user... */
-static void
-gdbtk_pre_add_symbol (const char *name)
-{
- gdbtk_two_elem_cmd ("gdbtk_tcl_pre_add_symbol", (char *) name);
-}
-
-/* This hook is called whenever we finish loading a symbol file. */
-static void
-gdbtk_post_add_symbol ()
-{
- if (Tcl_Eval (gdbtk_interp, "gdbtk_tcl_post_add_symbol") != TCL_OK)
- report_error ();
-}
-
-/* This hook function is called whenever we want to wait for the
- target. */
-
-static ptid_t
-gdbtk_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
-{
- gdbtk_force_detach = 0;
- gdbtk_start_timer ();
- ptid = target_wait (ptid, ourstatus);
- gdbtk_stop_timer ();
-
- return ptid;
-}
-
-/*
- * This handles all queries from gdb.
- * The first argument is a printf style format statement, the rest are its
- * arguments. The resultant formatted string is passed to the Tcl function
- * "gdbtk_tcl_query".
- * It returns the users response to the query, as well as putting the value
- * in the result field of the Tcl interpreter.
- */
-
-static int
-gdbtk_query (const char *query, va_list args)
-{
- char *buf;
- long val;
-
- xvasprintf (&buf, query, args);
- gdbtk_two_elem_cmd ("gdbtk_tcl_query", buf);
- free(buf);
-
- val = atol (gdbtk_interp->result);
- return val;
-}
-
-
-static void
-gdbtk_print_frame_info (struct symtab *s, int line,
- int stopline, int noerror)
-{
-}
-
-/*
- * gdbtk_trace_find
- *
- * This is run by the trace_find_command. arg is the argument that was passed
- * to that command, from_tty is 1 if the command was run from a tty, 0 if it
- * was run from a script. It runs gdbtk_tcl_tfind_hook passing on these two
- * arguments.
- *
- */
-
-static void
-gdbtk_trace_find (char *arg, int from_tty)
-{
- Tcl_Obj *cmdObj;
-
- cmdObj = Tcl_NewListObj (0, NULL);
- Tcl_ListObjAppendElement (gdbtk_interp, cmdObj,
- Tcl_NewStringObj ("gdbtk_tcl_trace_find_hook", -1));
- Tcl_ListObjAppendElement (gdbtk_interp, cmdObj, Tcl_NewStringObj (arg, -1));
- Tcl_ListObjAppendElement (gdbtk_interp, cmdObj, Tcl_NewIntObj (from_tty));
-#if TCL_MAJOR_VERSION == 8 && (TCL_MINOR_VERSION < 1 || TCL_MINOR_VERSION > 2)
- if (Tcl_GlobalEvalObj (gdbtk_interp, cmdObj) != TCL_OK)
- report_error ();
-#else
- if (Tcl_EvalObj (gdbtk_interp, cmdObj, TCL_EVAL_GLOBAL) != TCL_OK)
- report_error ();
-#endif
-}
-
-/*
- * gdbtk_trace_start_stop
- *
- * This is run by the trace_start_command and trace_stop_command.
- * The START variable determines which, 1 meaning trace_start was run,
- * 0 meaning trace_stop was run.
- *
- */
-
-static void
-gdbtk_trace_start_stop (int start, int from_tty)
-{
-
- if (start)
- Tcl_GlobalEval (gdbtk_interp, "gdbtk_tcl_tstart");
- else
- Tcl_GlobalEval (gdbtk_interp, "gdbtk_tcl_tstop");
-
-}
-
-static void
-gdbtk_selected_frame_changed (int level)
-{
-#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 1
- char *a;
- xasprintf (&a, "%d", level);
- Tcl_SetVar (gdbtk_interp, "gdb_selected_frame_level", a, TCL_GLOBAL_ONLY);
- xfree (a);
-#else
- Tcl_SetVar2Ex (gdbtk_interp, "gdb_selected_frame_level", NULL,
- Tcl_NewIntObj (level), TCL_GLOBAL_ONLY);
-#endif
-}
-
-/* Called when the current thread changes. */
-/* gdb_context is linked to the tcl variable "gdb_context_id" */
-static void
-gdbtk_context_change (int num)
-{
- gdb_context = num;
-}
-
-/* Called from file_command */
-static void
-gdbtk_file_changed (char *filename)
-{
- gdbtk_two_elem_cmd ("gdbtk_tcl_file_changed", filename);
-}
-
-/* Called from exec_file_command */
-static void
-gdbtk_exec_file_display (char *filename)
-{
- gdbtk_two_elem_cmd ("gdbtk_tcl_exec_file_display", filename);
-}
-
-/* Called from error_begin, this hook is used to warn the gui
- about multi-line error messages */
-static void
-gdbtk_error_begin ()
-{
- if (result_ptr != NULL)
- result_ptr->flags |= GDBTK_ERROR_ONLY;
-}
-
-/* notify GDBtk when a signal occurs */
-static void
-gdbtk_annotate_signal ()
-{
- char *buf;
-
- /* Inform gui that the target has stopped. This is
- a necessary stop button evil. We don't want signal notification
- to interfere with the elaborate and painful stop button detach
- timeout. */
- Tcl_Eval (gdbtk_interp, "gdbtk_stop_idle_callback");
-
- xasprintf (&buf, "gdbtk_signal %s {%s}", target_signal_to_name (stop_signal),
- target_signal_to_string (stop_signal));
- if (Tcl_Eval (gdbtk_interp, buf) != TCL_OK)
- report_error ();
- free(buf);
-}
-
-static void
-gdbtk_attach ()
-{
- if (Tcl_Eval (gdbtk_interp, "after idle \"update idletasks;gdbtk_attached\"") != TCL_OK)
- {
- report_error ();
- }
-}
-
-static void
-gdbtk_detach ()
-{
- if (Tcl_Eval (gdbtk_interp, "gdbtk_detached") != TCL_OK)
- {
- report_error ();
- }
-}
-
-/* Called from gdbarch_update_p whenever the architecture changes. */
-static void
-gdbtk_architecture_changed (void)
-{
- Tcl_Eval (gdbtk_interp, "gdbtk_tcl_architecture_changed");
-}
diff --git a/gdb/gdbtk/generic/gdbtk-interp.c b/gdb/gdbtk/generic/gdbtk-interp.c
deleted file mode 100644
index 07bb559c8d3..00000000000
--- a/gdb/gdbtk/generic/gdbtk-interp.c
+++ /dev/null
@@ -1,181 +0,0 @@
-/* Insight Definitions for GDB, the GNU debugger.
- Written by Keith Seitz <kseitz@sources.redhat.com>
-
- Copyright (C) 2003, 2004 Free Software Foundation, Inc.
-
- This file is part of Insight.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-#include "defs.h"
-#include "interps.h"
-#include "ui-file.h"
-#include "ui-out.h"
-#include "cli-out.h"
-#include "gdb_string.h"
-#include "cli/cli-cmds.h"
-#include "cli/cli-decode.h"
-#include "exceptions.h"
-
-#include "tcl.h"
-#include "tk.h"
-#include "gdbtk.h"
-
-static void gdbtk_command_loop (void);
-static void hack_disable_interpreter_exec (char *, int);
-
-struct gdbtk_interp_data
-{
- struct ui_file *_stdout;
- struct ui_file *_stderr;
- struct ui_file *_stdlog;
- struct ui_file *_stdtarg;
- struct ui_file *_stdtargin;
-};
-
-static struct gdbtk_interp_data *gdbtk_data;
-
-/* See note in gdbtk_interpreter_init */
-static void
-hack_disable_interpreter_exec (char *args, int from_tty)
-{
- error ("interpreter-exec not available when running Insight");
-}
-
-static void *
-gdbtk_interpreter_init (void)
-{
- /* Disable interpreter-exec. It causes us big trouble right now. */
- struct cmd_list_element *cmd = NULL;
- struct cmd_list_element *alias = NULL;
- struct cmd_list_element *prefix = NULL;
-
- gdbtk_init ();
-
- if (lookup_cmd_composition ("interpreter-exec", &alias, &prefix, &cmd))
- {
- set_cmd_cfunc (cmd, hack_disable_interpreter_exec);
- }
-
- return gdbtk_data;
-}
-
-static int
-gdbtk_interpreter_resume (void *data)
-{
- static int started = 0;
- struct gdbtk_interp_data *d = (struct gdbtk_interp_data *) data;
- gdbtk_add_hooks ();
-
- gdb_stdout = d->_stdout;
- gdb_stderr = d->_stderr;
- gdb_stdlog = d->_stdlog;
- gdb_stdtarg = d->_stdtarg;
- gdb_stdtargin = d->_stdtargin;
-
- deprecated_command_loop_hook = gdbtk_command_loop;
-
- /* 2003-02-11 keiths: We cannot actually source our main Tcl file in
- our interpreter's init function because any errors that may
- get generated will go to the wrong gdb_stderr. Instead of hacking
- our interpreter init function to force gdb_stderr to our ui_file,
- we defer sourcing the startup file until now, when gdb is ready
- to let our interpreter run. */
- if (!started)
- {
- started = 1;
- gdbtk_source_start_file ();
- }
-
- return 1;
-}
-
-static int
-gdbtk_interpreter_suspend (void *data)
-{
- return 1;
-}
-
-static int
-gdbtk_interpreter_display_prompt_p (void *data)
-{
- return 1;
-}
-
-static struct gdb_exception
-gdbtk_interpreter_exec (void *data, const char *command_str)
-{
- return exception_none;
-}
-
-/* This function is called instead of gdb's internal command loop. This is the
- last chance to do anything before entering the main Tk event loop.
- At the end of the command, we enter the main loop. */
-
-static void
-gdbtk_command_loop (void)
-{
- extern FILE *instream;
-
- /* We no longer want to use stdin as the command input stream */
- instream = NULL;
-
- if (Tcl_Eval (gdbtk_interp, "gdbtk_tcl_preloop") != TCL_OK)
- {
- const char *msg;
-
- /* Force errorInfo to be set up propertly. */
- Tcl_AddErrorInfo (gdbtk_interp, "");
-
- msg = Tcl_GetVar (gdbtk_interp, "errorInfo", TCL_GLOBAL_ONLY);
-#ifdef _WIN32
- MessageBox (NULL, msg, NULL, MB_OK | MB_ICONERROR | MB_TASKMODAL);
-#else
- fputs_unfiltered (msg, gdb_stderr);
-#endif
- }
-
-#ifdef _WIN32
- close_bfds ();
-#endif
-
- Tk_MainLoop ();
-}
-
-void
-_initialize_gdbtk_interp (void)
-{
- static const struct interp_procs procs = {
- gdbtk_interpreter_init, /* init_proc */
- gdbtk_interpreter_resume, /* resume_proc */
- gdbtk_interpreter_suspend, /* suspend_proc */
- gdbtk_interpreter_exec, /* exec_proc */
- gdbtk_interpreter_display_prompt_p /* prompt_proc_p */
- };
- struct interp *gdbtk_interp;
-
- gdbtk_data =
- (struct gdbtk_interp_data *) xmalloc (sizeof (struct gdbtk_interp_data));
- memset (gdbtk_data, 0, sizeof (struct gdbtk_interp_data));
- gdbtk_data->_stdout = gdbtk_fileopen ();
- gdbtk_data->_stderr = gdbtk_fileopen ();
- gdbtk_data->_stdlog = gdbtk_fileopen ();
- gdbtk_data->_stdtarg = gdbtk_fileopen ();
- gdbtk_data->_stdtargin = gdbtk_fileopenin ();
- gdbtk_interp = interp_new ("insight", gdbtk_data, cli_out_new (gdbtk_data->_stdout),
- &procs);
- interp_add (gdbtk_interp);
-}
diff --git a/gdb/gdbtk/generic/gdbtk-main.c b/gdb/gdbtk/generic/gdbtk-main.c
deleted file mode 100644
index 39864f93a9e..00000000000
--- a/gdb/gdbtk/generic/gdbtk-main.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Main function for gdb with insight.
-
- Copyright (C) 2002 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-
-#include "defs.h"
-#include "main.h"
-#include "gdb_string.h"
-
-int
-main (int argc, char **argv)
-{
- struct captured_main_args args;
- memset (&args, 0, sizeof args);
- args.argc = argc;
- args.argv = argv;
- args.use_windows = 1;
- args.interpreter_p = "insight";
- return gdb_main (&args);
-}
diff --git a/gdb/gdbtk/generic/gdbtk-register.c b/gdb/gdbtk/generic/gdbtk-register.c
deleted file mode 100644
index 57351e074de..00000000000
--- a/gdb/gdbtk/generic/gdbtk-register.c
+++ /dev/null
@@ -1,567 +0,0 @@
-/* Tcl/Tk command definitions for Insight - Registers
- Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-#include "defs.h"
-#include "frame.h"
-#include "regcache.h"
-#include "reggroups.h"
-#include "value.h"
-#include "target.h"
-#include "gdb_string.h"
-
-#include <tcl.h>
-#include "gdbtk.h"
-#include "gdbtk-cmds.h"
-
-/* This contains the previous values of the registers, since the last call to
- gdb_changed_register_list.
-
- It is an array of (NUM_REGS+NUM_PSEUDO_REGS)*MAX_REGISTER_RAW_SIZE bytes. */
-
-static int gdb_register_info (ClientData, Tcl_Interp *, int, Tcl_Obj **);
-static void get_register (int, void *);
-static void get_register_name (int, void *);
-static void get_register_size (int regnum, void *arg);
-static int map_arg_registers (Tcl_Interp *, int, Tcl_Obj **,
- void (*)(int, void *), void *);
-static void register_changed_p (int, void *);
-static void setup_architecture_data (void);
-static int gdb_regformat (ClientData, Tcl_Interp *, int, Tcl_Obj **);
-static int gdb_reggroup (ClientData, Tcl_Interp *, int, Tcl_Obj **);
-static int gdb_reggrouplist (ClientData, Tcl_Interp *, int, Tcl_Obj **);
-
-static void get_register_types (int regnum, void *arg);
-
-static char *old_regs = NULL;
-static int *regformat = (int *)NULL;
-static struct type **regtype = (struct type **)NULL;
-
-int
-Gdbtk_Register_Init (Tcl_Interp *interp)
-{
- Tcl_CreateObjCommand (interp, "gdb_reginfo", gdbtk_call_wrapper,
- gdb_register_info, NULL);
-
- /* Register/initialize any architecture specific data */
- setup_architecture_data ();
-
- deprecated_register_gdbarch_swap (&old_regs, sizeof (old_regs), NULL);
- deprecated_register_gdbarch_swap (&regformat, sizeof (regformat), NULL);
- deprecated_register_gdbarch_swap (&regtype, sizeof (regtype), NULL);
- deprecated_register_gdbarch_swap (NULL, 0, setup_architecture_data);
-
- return TCL_OK;
-}
-
-/* This implements the tcl command "gdb_reginfo".
- * It returns the requested information about registers.
- *
- * Tcl Arguments:
- * OPTION - "changed", "name", "size", "value" (see below)
- * REGNUM(S) - the register(s) for which info is requested
- *
- * Tcl Result:
- * The requested information
- *
- * Options:
- * changed
- * Returns a list of registers whose values have changed since the
- * last time the proc was called.
- *
- * usage: gdb_reginfo changed [regnum0, ..., regnumN]
- *
- * name
- * Return a list containing the names of the registers whose numbers
- * are given by REGNUM ... . If no register numbers are given, return
- * all the registers' names.
- *
- * usage: gdb_reginfo name [-numbers] [regnum0, ..., regnumN]
- *
- * Note that some processors have gaps in the register numberings:
- * even if there is no register numbered N, there may still be a
- * register numbered N+1. So if you call gdb_regnames with no
- * arguments, you can't assume that the N'th element of the result is
- * register number N.
- *
- * Given the -numbers option, gdb_regnames returns, not a list of names,
- * but a list of pairs {NAME NUMBER}, where NAME is the register name,
- * and NUMBER is its number.
- *
- * size
- * Returns the raw size of the register(s) in bytes.
- *
- * usage: gdb_reginfo size [regnum0, ..., regnumN]
- *
- * value
- * Returns a list of register values.
- *
- * usage: gdb_reginfo value [regnum0, ..., regnumN]
- */
-static int
-gdb_register_info (ClientData clientData, Tcl_Interp *interp, int objc,
- Tcl_Obj **objv)
-{
- int index;
- void *argp;
- void (*func)(int, void *);
- static const char *commands[] = {"changed", "name", "size", "value", "type",
- "format", "group", "grouplist", NULL};
- enum commands_enum { REGINFO_CHANGED, REGINFO_NAME, REGINFO_SIZE, REGINFO_VALUE,
- REGINFO_TYPE, REGINFO_FORMAT, REGINFO_GROUP, REGINFO_GROUPLIST };
-
- if (objc < 2)
- {
- Tcl_WrongNumArgs (interp, 1, objv, "name|size|value|type|format|groups [regnum1 ... regnumN]");
- return TCL_ERROR;
- }
-
- if (Tcl_GetIndexFromObj (interp, objv[1], commands, "options", 0,
- &index) != TCL_OK)
- {
- result_ptr->flags |= GDBTK_IN_TCL_RESULT;
- return TCL_ERROR;
- }
-
- /* Skip the option */
- objc -= 2;
- objv += 2;
-
- switch ((enum commands_enum) index)
- {
- case REGINFO_CHANGED:
- func = register_changed_p;
- argp = NULL;
- break;
-
- case REGINFO_NAME:
- {
- int len;
- char *s = Tcl_GetStringFromObj (objv[0], &len);
- if (objc != 0 && strncmp (s, "-numbers", len) == 0)
- {
- argp = (void *) 1;
- objc--;
- objv++;
- }
- else
- argp = NULL;
-
- func = get_register_name;
- }
- break;
-
- case REGINFO_SIZE:
- func = get_register_size;
- argp = NULL;
- break;
-
- case REGINFO_VALUE:
- func = get_register;
- argp = NULL;
- break;
-
- case REGINFO_TYPE:
- func = get_register_types;
- argp = NULL;
- break;
-
- case REGINFO_FORMAT:
- return gdb_regformat (clientData, interp, objc, objv);
-
- case REGINFO_GROUP:
- return gdb_reggroup (clientData, interp, objc, objv);
-
- case REGINFO_GROUPLIST:
- return gdb_reggrouplist (clientData, interp, objc, objv);
-
- default:
- return TCL_ERROR;
- }
-
- return map_arg_registers (interp, objc, objv, func, argp);
-}
-
-static void
-get_register_size (int regnum, void *arg)
-{
- Tcl_ListObjAppendElement (gdbtk_interp, result_ptr->obj_ptr,
- Tcl_NewIntObj (register_size (current_gdbarch, regnum)));
-}
-
-/* returns a list of valid types for a register */
-/* Normally this will be only one type, except for SIMD and other */
-/* special registers. */
-
-static void
-get_register_types (int regnum, void *arg)
-{
- struct type *reg_vtype;
- int i,n;
-
- reg_vtype = register_type (current_gdbarch, regnum);
-
- if (TYPE_CODE (reg_vtype) == TYPE_CODE_UNION)
- {
- n = TYPE_NFIELDS (reg_vtype);
- /* limit to 16 types */
- if (n > 16)
- n = 16;
-
- for (i = 0; i < n; i++)
- {
- Tcl_Obj *ar[3], *list;
- char *buff;
- xasprintf (&buff, "%lx", (long)TYPE_FIELD_TYPE (reg_vtype, i));
- ar[0] = Tcl_NewStringObj (TYPE_FIELD_NAME (reg_vtype, i), -1);
- ar[1] = Tcl_NewStringObj (buff, -1);
- if (TYPE_CODE (TYPE_FIELD_TYPE (reg_vtype, i)) == TYPE_CODE_FLT)
- ar[2] = Tcl_NewStringObj ("float", -1);
- else
- ar[2] = Tcl_NewStringObj ("int", -1);
- list = Tcl_NewListObj (3, ar);
- Tcl_ListObjAppendElement (gdbtk_interp, result_ptr->obj_ptr, list);
- xfree (buff);
- }
- }
- else
- {
- Tcl_Obj *ar[3], *list;
- char *buff;
- xasprintf (&buff, "%lx", (long)reg_vtype);
- ar[0] = Tcl_NewStringObj (TYPE_NAME(reg_vtype), -1);
- ar[1] = Tcl_NewStringObj (buff, -1);
- if (TYPE_CODE (reg_vtype) == TYPE_CODE_FLT)
- ar[2] = Tcl_NewStringObj ("float", -1);
- else
- ar[2] = Tcl_NewStringObj ("int", -1);
- list = Tcl_NewListObj (3, ar);
- xfree (buff);
- Tcl_ListObjAppendElement (gdbtk_interp, result_ptr->obj_ptr, list);
- }
-}
-
-
-static void
-get_register (int regnum, void *arg)
-{
- int realnum;
- CORE_ADDR addr;
- enum lval_type lval;
- struct type *reg_vtype;
- gdb_byte buffer[MAX_REGISTER_SIZE];
- int optim, format;
- struct cleanup *old_chain = NULL;
- struct ui_file *stb;
- long dummy;
- char *res;
-
- format = regformat[regnum];
- if (format == 0)
- format = 'x';
-
- reg_vtype = regtype[regnum];
- if (reg_vtype == NULL)
- reg_vtype = register_type (current_gdbarch, regnum);
-
- if (!target_has_registers)
- {
- if (result_ptr->flags & GDBTK_MAKES_LIST)
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr, Tcl_NewStringObj ("", -1));
- else
- Tcl_SetStringObj (result_ptr->obj_ptr, "", -1);
- return;
- }
-
- frame_register (get_selected_frame (NULL), regnum, &optim, &lval,
- &addr, &realnum, buffer);
-
- if (optim)
- {
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr,
- Tcl_NewStringObj ("Optimized out", -1));
- return;
- }
-
- stb = mem_fileopen ();
- old_chain = make_cleanup_ui_file_delete (stb);
-
- if (format == 'r')
- {
- /* shouldn't happen. raw format is deprecated */
- int j;
- char *ptr, buf[1024];
-
- strcpy (buf, "0x");
- ptr = buf + 2;
- for (j = 0; j < register_size (current_gdbarch, regnum); j++)
- {
- int idx = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? j
- : register_size (current_gdbarch, regnum) - 1 - j;
- sprintf (ptr, "%02x", (unsigned char) buffer[idx]);
- ptr += 2;
- }
- fputs_unfiltered (buf, stb);
- }
- else
- {
- if ((TYPE_CODE (reg_vtype) == TYPE_CODE_UNION)
- && (strcmp (FIELD_NAME (TYPE_FIELD (reg_vtype, 0)),
- REGISTER_NAME (regnum)) == 0))
- {
- val_print (FIELD_TYPE (TYPE_FIELD (reg_vtype, 0)), buffer, 0, 0,
- stb, format, 1, 0, Val_pretty_default);
- }
- else
- val_print (reg_vtype, buffer, 0, 0,
- stb, format, 1, 0, Val_pretty_default);
- }
-
- res = ui_file_xstrdup (stb, &dummy);
-
- if (result_ptr->flags & GDBTK_MAKES_LIST)
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr, Tcl_NewStringObj (res, -1));
- else
- Tcl_SetStringObj (result_ptr->obj_ptr, res, -1);
-
- xfree (res);
- do_cleanups (old_chain);
-}
-
-static void
-get_register_name (int regnum, void *argp)
-{
- /* Non-zero if the caller wants the register numbers, too. */
- int numbers = (int) argp;
- Tcl_Obj *name = Tcl_NewStringObj (REGISTER_NAME (regnum), -1);
- Tcl_Obj *elt;
-
- if (numbers)
- {
- /* Build a tuple of the form "{REGNAME NUMBER}", and append it to
- our result. */
- Tcl_Obj *array[2];
-
- array[0] = name;
- array[1] = Tcl_NewIntObj (regnum);
- elt = Tcl_NewListObj (2, array);
- }
- else
- elt = name;
-
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr, elt);
-}
-
-/* This is a sort of mapcar function for operations on registers */
-
-static int
-map_arg_registers (Tcl_Interp *interp, int objc, Tcl_Obj **objv,
- void (*func) (int regnum, void *argp), void *argp)
-{
- int regnum, numregs;
-
- /* Note that the test for a valid register must include checking the
- REGISTER_NAME because NUM_REGS may be allocated for the union of
- the register sets within a family of related processors. In this
- case, some entries of REGISTER_NAME will change depending upon
- the particular processor being debugged. */
-
- numregs = NUM_REGS + NUM_PSEUDO_REGS;
-
- if (objc == 0) /* No args, just do all the regs */
- {
- result_ptr->flags |= GDBTK_MAKES_LIST;
- for (regnum = 0; regnum < numregs; regnum++)
- {
- if (REGISTER_NAME (regnum) == NULL
- || *(REGISTER_NAME (regnum)) == '\0')
- continue;
- func (regnum, argp);
- }
- return TCL_OK;
- }
-
- if (objc == 1)
- if (Tcl_ListObjGetElements (interp, *objv, &objc, &objv ) != TCL_OK)
- return TCL_ERROR;
-
- if (objc > 1)
- result_ptr->flags |= GDBTK_MAKES_LIST;
-
- /* Else, list of register #s, just do listed regs */
- for (; objc > 0; objc--, objv++)
- {
- if (Tcl_GetIntFromObj (NULL, *objv, &regnum) != TCL_OK)
- {
- result_ptr->flags |= GDBTK_IN_TCL_RESULT;
- return TCL_ERROR;
- }
-
- if (regnum >= 0 && regnum < numregs)
- func (regnum, argp);
- else
- {
- Tcl_SetStringObj (result_ptr->obj_ptr, "bad register number", -1);
- return TCL_ERROR;
- }
- }
- return TCL_OK;
-}
-
-static void
-register_changed_p (int regnum, void *argp)
-{
- char raw_buffer[MAX_REGISTER_SIZE];
-
- if (deprecated_selected_frame == NULL
- || !frame_register_read (deprecated_selected_frame, regnum, raw_buffer))
- return;
-
- if (memcmp (&old_regs[regnum * MAX_REGISTER_SIZE], raw_buffer,
- register_size (current_gdbarch, regnum)) == 0)
- return;
-
- /* Found a changed register. Save new value and return its number. */
-
- memcpy (&old_regs[regnum * MAX_REGISTER_SIZE], raw_buffer,
- register_size (current_gdbarch, regnum));
-
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr, Tcl_NewIntObj (regnum));
-}
-
-static void
-setup_architecture_data ()
-{
- xfree (old_regs);
- xfree (regformat);
- xfree (regtype);
-
- old_regs = xcalloc (1, (NUM_REGS + NUM_PSEUDO_REGS) * MAX_REGISTER_SIZE + 1);
- regformat = (int *)xcalloc ((NUM_REGS + NUM_PSEUDO_REGS) , sizeof(int));
- regtype = (struct type **)xcalloc ((NUM_REGS + NUM_PSEUDO_REGS), sizeof(struct type **));
-}
-
-/* gdb_regformat sets the format for a register */
-/* This is necessary to allow "gdb_reginfo value" to return a list */
-/* of registers and values. */
-/* Usage: gdb_reginfo format regno typeaddr format */
-
-static int
-gdb_regformat (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj **objv)
-{
- int fm, regno;
- struct type *type;
-
- if (objc != 3)
- {
- Tcl_WrongNumArgs (interp, 0, objv, "gdb_reginfo regno type format");
- return TCL_ERROR;
- }
-
- if (Tcl_GetIntFromObj (interp, objv[0], &regno) != TCL_OK)
- return TCL_ERROR;
-
- type = (struct type *)strtol (Tcl_GetStringFromObj (objv[1], NULL), NULL, 16);
- fm = (int)*(Tcl_GetStringFromObj (objv[2], NULL));
-
- if (regno >= NUM_REGS + NUM_PSEUDO_REGS)
- {
- gdbtk_set_result (interp, "Register number %d too large", regno);
- return TCL_ERROR;
- }
-
- regformat[regno] = fm;
- regtype[regno] = type;
-
- return TCL_OK;
-}
-
-
-/* gdb_reggrouplist returns the names of the register groups */
-/* for the current architecture. */
-/* Usage: gdb_reginfo groups */
-
-static int
-gdb_reggrouplist (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj **objv)
-{
- struct reggroup *group;
- int i = 0;
-
- if (objc != 0)
- {
- Tcl_WrongNumArgs (interp, 0, objv, "gdb_reginfo grouplist");
- return TCL_ERROR;
- }
-
- for (group = reggroup_next (current_gdbarch, NULL);
- group != NULL;
- group = reggroup_next (current_gdbarch, group))
- {
- if (reggroup_type (group) == USER_REGGROUP)
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr, Tcl_NewStringObj (reggroup_name (group), -1));
- }
- return TCL_OK;
-}
-
-
-/* gdb_reggroup returns the names of the registers in a group. */
-/* Usage: gdb_reginfo group groupname */
-
-static int
-gdb_reggroup (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj **objv)
-{
- struct reggroup *group;
- char *groupname;
- int regnum;
-
- if (objc != 1)
- {
- Tcl_WrongNumArgs (interp, 0, objv, "gdb_reginfo group groupname");
- return TCL_ERROR;
- }
-
- groupname = Tcl_GetStringFromObj (objv[0], NULL);
- if (groupname == NULL)
- {
- gdbtk_set_result (interp, "could not read groupname");
- return TCL_ERROR;
- }
-
- for (group = reggroup_next (current_gdbarch, NULL);
- group != NULL;
- group = reggroup_next (current_gdbarch, group))
- {
- if (strcmp (groupname, reggroup_name (group)) == 0)
- break;
- }
-
- if (group == NULL)
- return TCL_ERROR;
-
- for (regnum = 0; regnum < NUM_REGS + NUM_PSEUDO_REGS; regnum++)
- {
- if (gdbarch_register_reggroup_p (current_gdbarch, regnum, group))
- Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr, Tcl_NewIntObj (regnum));
- }
- return TCL_OK;
-}
-
diff --git a/gdb/gdbtk/generic/gdbtk-stack.c b/gdb/gdbtk/generic/gdbtk-stack.c
deleted file mode 100644
index 4c2c00e1e0c..00000000000
--- a/gdb/gdbtk/generic/gdbtk-stack.c
+++ /dev/null
@@ -1,623 +0,0 @@
-/* Tcl/Tk command definitions for Insight - Stack.
- Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-#include "defs.h"
-#include "target.h"
-#include "breakpoint.h"
-#include "linespec.h"
-#include "block.h"
-#include "dictionary.h"
-
-#include <tcl.h>
-#include "gdbtk.h"
-#include "gdbtk-cmds.h"
-#include "gdbtk-wrapper.h"
-
-static int gdb_block_vars (ClientData clientData,
- Tcl_Interp * interp, int objc,
- Tcl_Obj * CONST objv[]);
-static int gdb_get_args_command (ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]);
-static int gdb_get_blocks (ClientData clientData,
- Tcl_Interp * interp, int objc,
- Tcl_Obj * CONST objv[]);
-static int gdb_get_locals_command (ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]);
-static int gdb_get_vars_command (ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]);
-static int gdb_selected_block (ClientData clientData,
- Tcl_Interp * interp, int argc,
- Tcl_Obj * CONST objv[]);
-static int gdb_selected_frame (ClientData clientData,
- Tcl_Interp * interp, int argc,
- Tcl_Obj * CONST objv[]);
-static int gdb_stack (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]);
-static void get_frame_name (Tcl_Interp *interp, Tcl_Obj *list,
- struct frame_info *fi);
-
-int
-Gdbtk_Stack_Init (Tcl_Interp *interp)
-{
- Tcl_CreateObjCommand (interp, "gdb_block_variables", gdbtk_call_wrapper,
- gdb_block_vars, NULL);
- Tcl_CreateObjCommand (interp, "gdb_get_blocks", gdbtk_call_wrapper,
- gdb_get_blocks, NULL);
- Tcl_CreateObjCommand (interp, "gdb_get_args", gdbtk_call_wrapper,
- gdb_get_args_command, NULL);
- Tcl_CreateObjCommand (interp, "gdb_get_locals", gdbtk_call_wrapper,
- gdb_get_locals_command, NULL);
- Tcl_CreateObjCommand (interp, "gdb_selected_block", gdbtk_call_wrapper,
- gdb_selected_block, NULL);
- Tcl_CreateObjCommand (interp, "gdb_selected_frame", gdbtk_call_wrapper,
- gdb_selected_frame, NULL);
- Tcl_CreateObjCommand (interp, "gdb_stack", gdbtk_call_wrapper, gdb_stack, NULL);
-
- return TCL_OK;
-}
-
-/* This implements the tcl command gdb_block_vars.
- *
- * Returns all variables valid in the specified block.
- *
- * Arguments:
- * The start and end addresses which identify the block.
- * Tcl Result:
- * All variables defined in the given block.
- */
-static int
-gdb_block_vars (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- struct block *block;
- struct dict_iterator iter;
- struct symbol *sym;
- CORE_ADDR start, end;
-
- if (objc < 3)
- {
- Tcl_WrongNumArgs (interp, 1, objv, "startAddr endAddr");
- return TCL_ERROR;
- }
-
- Tcl_SetListObj (result_ptr->obj_ptr, 0, NULL);
- if (deprecated_selected_frame == NULL)
- return TCL_OK;
-
- start = string_to_core_addr (Tcl_GetStringFromObj (objv[1], NULL));
- end = string_to_core_addr (Tcl_GetStringFromObj (objv[2], NULL));
-
- block = get_frame_block (deprecated_selected_frame, 0);
-
- while (block != 0)
- {
- if (BLOCK_START (block) == start && BLOCK_END (block) == end)
- {
- ALL_BLOCK_SYMBOLS (block, iter, sym)
- {
- switch (SYMBOL_CLASS (sym))
- {
- case LOC_ARG: /* argument */
- case LOC_REF_ARG: /* reference arg */
- case LOC_REGPARM: /* register arg */
- case LOC_REGPARM_ADDR: /* indirect register arg */
- case LOC_LOCAL_ARG: /* stack arg */
- case LOC_BASEREG_ARG: /* basereg arg */
- case LOC_LOCAL: /* stack local */
- case LOC_BASEREG: /* basereg local */
- case LOC_STATIC: /* static */
- case LOC_REGISTER: /* register */
- case LOC_COMPUTED: /* computed location */
- case LOC_COMPUTED_ARG: /* computed location arg */
- Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr,
- Tcl_NewStringObj (DEPRECATED_SYMBOL_NAME (sym),
- -1));
- break;
-
- default:
- break;
- }
- }
-
- return TCL_OK;
- }
- else if (BLOCK_FUNCTION (block))
- break;
- else
- block = BLOCK_SUPERBLOCK (block);
- }
-
- return TCL_OK;
-}
-
-/* This implements the tcl command gdb_get_blocks
- *
- * Returns the start and end addresses for all blocks in
- * the selected frame.
- *
- * Arguments:
- * None
- * Tcl Result:
- * A list of all valid blocks in the selected_frame.
- */
-static int
-gdb_get_blocks (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- struct block *block;
- struct dict_iterator iter;
- int junk;
- struct symbol *sym;
- CORE_ADDR pc;
-
- Tcl_SetListObj (result_ptr->obj_ptr, 0, NULL);
-
- if (deprecated_selected_frame != NULL)
- {
- block = get_frame_block (deprecated_selected_frame, 0);
- pc = get_frame_pc (deprecated_selected_frame);
- while (block != 0)
- {
- junk = 0;
- ALL_BLOCK_SYMBOLS (block, iter, sym)
- {
- switch (SYMBOL_CLASS (sym))
- {
- default:
- case LOC_UNDEF: /* catches errors */
- case LOC_CONST: /* constant */
- case LOC_TYPEDEF: /* local typedef */
- case LOC_LABEL: /* local label */
- case LOC_BLOCK: /* local function */
- case LOC_CONST_BYTES: /* loc. byte seq. */
- case LOC_UNRESOLVED: /* unresolved static */
- case LOC_OPTIMIZED_OUT: /* optimized out */
- junk = 1;
- break;
-
- case LOC_ARG: /* argument */
- case LOC_REF_ARG: /* reference arg */
- case LOC_REGPARM: /* register arg */
- case LOC_REGPARM_ADDR: /* indirect register arg */
- case LOC_LOCAL_ARG: /* stack arg */
- case LOC_BASEREG_ARG: /* basereg arg */
- case LOC_COMPUTED_ARG: /* computed location arg */
-
- case LOC_LOCAL: /* stack local */
- case LOC_BASEREG: /* basereg local */
- case LOC_STATIC: /* static */
- case LOC_REGISTER: /* register */
- case LOC_COMPUTED: /* computed location */
- junk = 0;
- break;
- }
- }
-
- /* If we found a block with locals in it, add it to the list.
- Note that the ranges of start and end address for blocks
- are exclusive, so double-check against the PC */
-
- if (!junk && pc < BLOCK_END (block))
- {
- char *addr;
-
- Tcl_Obj *elt = Tcl_NewListObj (0, NULL);
- xasprintf (&addr, "0x%s", paddr_nz (BLOCK_START (block)));
- Tcl_ListObjAppendElement (interp, elt,
- Tcl_NewStringObj (addr, -1));
- free(addr);
- xasprintf (&addr, "0x%s", paddr_nz (BLOCK_END (block)));
- Tcl_ListObjAppendElement (interp, elt,
- Tcl_NewStringObj (addr, -1));
- Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr, elt);
- free(addr);
- }
-
- if (BLOCK_FUNCTION (block))
- break;
- else
- block = BLOCK_SUPERBLOCK (block);
- }
- }
-
- return TCL_OK;
-}
-
-/* gdb_get_args -
- * This and gdb_get_locals just call gdb_get_vars_command with the right
- * value of clientData. We can't use the client data in the definition
- * of the command, because the call wrapper uses this instead...
- */
-static int
-gdb_get_args_command (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- return gdb_get_vars_command ((ClientData) 1, interp, objc, objv);
-}
-
-
-static int
-gdb_get_locals_command (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- return gdb_get_vars_command ((ClientData) 0, interp, objc, objv);
-}
-
-/* This implements the tcl commands "gdb_get_locals" and "gdb_get_args"
-
-* This function sets the Tcl interpreter's result to a list of variable names
-* depending on clientData. If clientData is one, the result is a list of
-* arguments; zero returns a list of locals -- all relative to the block
-* specified as an argument to the command. Valid commands include
-* anything decode_line_1 can handle (like "main.c:2", "*0x02020202",
-* and "main").
-*
-* Tcl Arguments:
-* linespec - the linespec defining the scope of the lookup. Empty string
-* to use the current block in the innermost frame.
-* Tcl Result:
-* A list of the locals or args
-*/
-static int
-gdb_get_vars_command (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- struct symtabs_and_lines sals;
- struct symbol *sym;
- struct block *block;
- char **canonical, *args;
- struct dict_iterator iter;
- int i, arguments;
-
- if (objc > 2)
- {
- Tcl_WrongNumArgs (interp, 1, objv,
- "[function:line|function|line|*addr]");
- return TCL_ERROR;
- }
-
- arguments = (int) clientData;
-
- /* Initialize the result pointer to an empty list. */
-
- Tcl_SetListObj (result_ptr->obj_ptr, 0, NULL);
-
- if (objc == 2)
- {
- args = Tcl_GetStringFromObj (objv[1], NULL);
- sals = decode_line_1 (&args, 1, NULL, 0, &canonical, NULL);
- if (sals.nelts == 0)
- {
- gdbtk_set_result (interp, "error decoding line");
- return TCL_ERROR;
- }
-
- /* Resolve all line numbers to PC's */
- for (i = 0; i < sals.nelts; i++)
- resolve_sal_pc (&sals.sals[i]);
-
- block = block_for_pc (sals.sals[0].pc);
- }
- else
- {
- /* Specified currently selected frame */
- if (deprecated_selected_frame == NULL)
- return TCL_OK;
-
- block = get_frame_block (deprecated_selected_frame, 0);
- }
-
- while (block != 0)
- {
- ALL_BLOCK_SYMBOLS (block, iter, sym)
- {
- switch (SYMBOL_CLASS (sym))
- {
- default:
- case LOC_UNDEF: /* catches errors */
- case LOC_CONST: /* constant */
- case LOC_TYPEDEF: /* local typedef */
- case LOC_LABEL: /* local label */
- case LOC_BLOCK: /* local function */
- case LOC_CONST_BYTES: /* loc. byte seq. */
- case LOC_UNRESOLVED: /* unresolved static */
- case LOC_OPTIMIZED_OUT: /* optimized out */
- break;
- case LOC_ARG: /* argument */
- case LOC_REF_ARG: /* reference arg */
- case LOC_REGPARM: /* register arg */
- case LOC_REGPARM_ADDR: /* indirect register arg */
- case LOC_LOCAL_ARG: /* stack arg */
- case LOC_BASEREG_ARG: /* basereg arg */
- case LOC_COMPUTED_ARG: /* computed location arg */
- if (arguments)
- Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr,
- Tcl_NewStringObj (DEPRECATED_SYMBOL_NAME (sym), -1));
- break;
- case LOC_LOCAL: /* stack local */
- case LOC_BASEREG: /* basereg local */
- case LOC_STATIC: /* static */
- case LOC_REGISTER: /* register */
- case LOC_COMPUTED: /* computed location */
- if (!arguments)
- Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr,
- Tcl_NewStringObj (DEPRECATED_SYMBOL_NAME (sym), -1));
- break;
- }
- }
- if (BLOCK_FUNCTION (block))
- break;
- else
- block = BLOCK_SUPERBLOCK (block);
- }
-
- return TCL_OK;
-}
-
-/* This implements the tcl command gdb_selected_block
- *
- * Returns the start and end addresses of the innermost
- * block in the selected frame.
- *
- * Arguments:
- * None
- * Tcl Result:
- * The currently selected block's start and end addresses
- */
-static int
-gdb_selected_block (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- char *start = NULL;
- char *end = NULL;
-
- if (deprecated_selected_frame == NULL)
- {
- xasprintf (&start, "%s", "");
- xasprintf (&end, "%s", "");
- }
- else
- {
- struct block *block;
- block = get_frame_block (deprecated_selected_frame, 0);
- xasprintf (&start, "0x%s", paddr_nz (BLOCK_START (block)));
- xasprintf (&end, "0x%s", paddr_nz (BLOCK_END (block)));
- }
-
- Tcl_SetListObj (result_ptr->obj_ptr, 0, NULL);
- Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr,
- Tcl_NewStringObj (start, -1));
- Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr,
- Tcl_NewStringObj (end, -1));
-
- free(start);
- free(end);
- return TCL_OK;
-}
-
-/* This implements the tcl command gdb_selected_frame
-
-* Returns the address of the selected frame
-* frame.
-*
-* Arguments:
-* None
-* Tcl Result:
-* The currently selected frame's address
-*/
-static int
-gdb_selected_frame (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- char *frame;
-
- if (deprecated_selected_frame == NULL)
- xasprintf (&frame, "%s","");
- else
- /* FIXME: cagney/2002-11-19: This should be using get_frame_id()
- to identify the frame and *NOT* get_frame_base(). */
- xasprintf (&frame, "0x%s",
- paddr_nz (get_frame_base (deprecated_selected_frame)));
-
- Tcl_SetStringObj (result_ptr->obj_ptr, frame, -1);
-
- free(frame);
- return TCL_OK;
-}
-
-/* This implements the tcl command gdb_stack.
- * It builds up a list of stack frames.
- *
- * Tcl Arguments:
- * start - starting stack frame
- * count - number of frames to inspect
- * Tcl Result:
- * A list of function names
- */
-static int
-gdb_stack (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- int start, count;
-
- if (objc < 3)
- {
- Tcl_WrongNumArgs (interp, 1, objv, "start count");
- return TCL_ERROR;
- }
-
- if (Tcl_GetIntFromObj (NULL, objv[1], &start))
- {
- result_ptr->flags |= GDBTK_IN_TCL_RESULT;
- return TCL_ERROR;
- }
- if (Tcl_GetIntFromObj (NULL, objv[2], &count))
- {
- result_ptr->flags |= GDBTK_IN_TCL_RESULT;
- return TCL_ERROR;
- }
-
- if (target_has_stack)
- {
- gdb_result r;
- struct frame_info *top;
- struct frame_info *fi;
-
- /* Find the outermost frame */
- r = GDB_get_current_frame (&fi);
- if (r != GDB_OK)
- return TCL_ERROR;
-
- while (fi != NULL)
- {
- top = fi;
- r = GDB_get_prev_frame (fi, &fi);
- if (r != GDB_OK)
- fi = NULL;
- }
-
- /* top now points to the top (outermost frame) of the
- stack, so point it to the requested start */
- start = -start;
- r = GDB_find_relative_frame (top, &start, &top);
-
- result_ptr->obj_ptr = Tcl_NewListObj (0, NULL);
- if (r != GDB_OK)
- return TCL_OK;
-
- /* If start != 0, then we have asked to start outputting
- frames beyond the innermost stack frame */
- if (start == 0)
- {
- fi = top;
- while (fi && count--)
- {
- get_frame_name (interp, result_ptr->obj_ptr, fi);
- r = GDB_get_next_frame (fi, &fi);
- if (r != GDB_OK)
- break;
- }
- }
- }
-
- return TCL_OK;
-}
-
-/* A helper function for get_stack which adds information about
- * the stack frame FI to the caller's LIST.
- *
- * This is stolen from print_frame_info in stack.c.
- */
-static void
-get_frame_name (Tcl_Interp *interp, Tcl_Obj *list, struct frame_info *fi)
-{
- struct symtab_and_line sal;
- struct symbol *func = NULL;
- register char *funname = 0;
- enum language funlang = language_unknown;
- Tcl_Obj *objv[1];
-
- if (get_frame_type (fi) == DUMMY_FRAME)
- {
- objv[0] = Tcl_NewStringObj ("<function called from gdb>\n", -1);
- Tcl_ListObjAppendElement (interp, list, objv[0]);
- return;
- }
- if ((get_frame_type (fi) == SIGTRAMP_FRAME))
- {
- objv[0] = Tcl_NewStringObj ("<signal handler called>\n", -1);
- Tcl_ListObjAppendElement (interp, list, objv[0]);
- return;
- }
-
- sal =
- find_pc_line (get_frame_pc (fi),
- get_next_frame (fi) != NULL
- && !(get_frame_type (fi) == SIGTRAMP_FRAME)
- && !(get_frame_type (fi) == DUMMY_FRAME));
-
- func = find_pc_function (get_frame_pc (fi));
- if (func)
- {
- struct minimal_symbol *msymbol = lookup_minimal_symbol_by_pc (get_frame_pc (fi));
- if (msymbol != NULL
- && (SYMBOL_VALUE_ADDRESS (msymbol)
- > BLOCK_START (SYMBOL_BLOCK_VALUE (func))))
- {
- func = 0;
- funname = GDBTK_SYMBOL_SOURCE_NAME (msymbol);
- funlang = SYMBOL_LANGUAGE (msymbol);
- }
- else
- {
- funname = GDBTK_SYMBOL_SOURCE_NAME (func);
- funlang = SYMBOL_LANGUAGE (func);
- }
- }
- else
- {
- struct minimal_symbol *msymbol = lookup_minimal_symbol_by_pc (get_frame_pc (fi));
- if (msymbol != NULL)
- {
- funname = GDBTK_SYMBOL_SOURCE_NAME (msymbol);
- funlang = SYMBOL_LANGUAGE (msymbol);
- }
- }
-
- if (sal.symtab)
- {
- objv[0] = Tcl_NewStringObj (funname, -1);
- Tcl_ListObjAppendElement (interp, list, objv[0]);
- }
- else
- {
-#if 0
- /* we have no convenient way to deal with this yet... */
- if (fi->pc != sal.pc || !sal.symtab)
- {
- deprecated_print_address_numeric (fi->pc, 1, gdb_stdout);
- printf_filtered (" in ");
- }
- printf_symbol_filtered (gdb_stdout, funname ? funname : "??", funlang,
- DMGL_ANSI);
-#endif
- objv[0] = Tcl_NewStringObj (funname != NULL ? funname : "??", -1);
-#ifdef PC_LOAD_SEGMENT
- /* If we couldn't print out function name but if can figure out what
- load segment this pc value is from, at least print out some info
- about its load segment. */
- if (!funname)
- {
- Tcl_AppendStringsToObj (objv[0], " from ", PC_LOAD_SEGMENT (fi->pc),
- (char *) NULL);
- }
-#endif
-#ifdef PC_SOLIB
- if (!funname)
- {
- char *lib = PC_SOLIB (get_frame_pc (fi));
- if (lib)
- {
- Tcl_AppendStringsToObj (objv[0], " from ", lib, (char *) NULL);
- }
- }
-#endif
- Tcl_ListObjAppendElement (interp, list, objv[0]);
- }
-}
diff --git a/gdb/gdbtk/generic/gdbtk-varobj.c b/gdb/gdbtk/generic/gdbtk-varobj.c
deleted file mode 100644
index 5215c718970..00000000000
--- a/gdb/gdbtk/generic/gdbtk-varobj.c
+++ /dev/null
@@ -1,612 +0,0 @@
-/* Variable user interface layer for GDB, the GNU debugger.
- Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-#include "defs.h"
-#include "value.h"
-#include "gdb_string.h"
-#include "varobj.h"
-
-#include <tcl.h>
-#include "gdbtk.h"
-#include "gdbtk-cmds.h"
-
-/*
- * Public functions defined in this file
- */
-
-int gdb_variable_init (Tcl_Interp *);
-
-/*
- * Private functions defined in this file
- */
-
-/* Entries into this file */
-
-static int gdb_variable_command (ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST[]);
-
-static int variable_obj_command (ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST[]);
-
-/* Variable object subcommands */
-
-static int variable_create (Tcl_Interp *, int, Tcl_Obj * CONST[]);
-
-static void variable_delete (Tcl_Interp *, struct varobj *, int);
-
-static Tcl_Obj *variable_children (Tcl_Interp *, struct varobj *);
-
-static int variable_format (Tcl_Interp *, int, Tcl_Obj * CONST[],
- struct varobj *);
-
-static int variable_type (Tcl_Interp *, int, Tcl_Obj * CONST[],
- struct varobj *);
-
-static int variable_value (Tcl_Interp *, int, Tcl_Obj * CONST[],
- struct varobj *);
-
-static Tcl_Obj *variable_update (Tcl_Interp * interp, struct varobj **var);
-
-/* Helper functions for the above subcommands. */
-
-static void install_variable (Tcl_Interp *, char *);
-
-static void uninstall_variable (Tcl_Interp *, char *);
-
-/* String representations of gdb's format codes */
-static char *format_string[] =
- {"natural", "binary", "decimal", "hexadecimal", "octal"};
-
-
-/* Initialize the variable code. This function should be called once
- to install and initialize the variable code into the interpreter. */
-int
-gdb_variable_init (Tcl_Interp *interp)
-{
- Tcl_Command result;
- static int initialized = 0;
-
- if (!initialized)
- {
- result = Tcl_CreateObjCommand (interp, "gdb_variable", gdbtk_call_wrapper,
- (ClientData) gdb_variable_command, NULL);
- if (result == NULL)
- return TCL_ERROR;
-
- initialized = 1;
- }
-
- return TCL_OK;
-}
-
-/* This function defines the "gdb_variable" command which is used to
- create variable objects. Its syntax includes:
-
- gdb_variable create
- gdb_variable create NAME
- gdb_variable create -expr EXPR
- gdb_variable create -frame FRAME
- (it will also include permutations of the above options)
-
- NAME = name of object to create. If no NAME, then automatically create
- a name
- EXPR = the gdb expression for which to create a variable. This will
- be the most common usage.
- FRAME = the frame defining the scope of the variable.
-*/
-static int
-gdb_variable_command (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- static const char *commands[] =
- {"create", "list", NULL};
- enum commands_enum
- {
- VARIABLE_CREATE, VARIABLE_LIST
- };
- int index, result;
-
- if (objc < 2)
- {
- Tcl_WrongNumArgs (interp, 1, objv, "option ?arg...?");
- return TCL_ERROR;
- }
-
- if (Tcl_GetIndexFromObj (interp, objv[1], commands, "options", 0,
- &index) != TCL_OK)
- {
- return TCL_ERROR;
- }
-
- switch ((enum commands_enum) index)
- {
- case VARIABLE_CREATE:
- result = variable_create (interp, objc - 2, objv + 2);
- break;
-
- default:
- return TCL_ERROR;
- }
-
- return result;
-}
-
-/* This function implements the actual object command for each
- variable object that is created (and each of its children).
-
- Currently the following commands are implemented:
- - delete delete this object and its children
- - update update the variable and its children (root vars only)
- - numChildren how many children does this object have
- - children create the children and return a list of their objects
- - name print out the name of this variable
- - format query/set the display format of this variable
- - type get the type of this variable
- - value get/set the value of this variable
- - editable is this variable editable?
-*/
-static int
-variable_obj_command (ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- enum commands_enum
- {
- VARIABLE_DELETE,
- VARIABLE_NUM_CHILDREN,
- VARIABLE_CHILDREN,
- VARIABLE_FORMAT,
- VARIABLE_TYPE,
- VARIABLE_VALUE,
- VARIABLE_NAME,
- VARIABLE_EDITABLE,
- VARIABLE_UPDATE
- };
- static const char *commands[] =
- {
- "delete",
- "numChildren",
- "children",
- "format",
- "type",
- "value",
- "name",
- "editable",
- "update",
- NULL
- };
- struct varobj *var;
- char *varobj_name;
- int index, result;
-
- /* Get the current handle for this variable token (name). */
- varobj_name = Tcl_GetStringFromObj (objv[0], NULL);
- if (varobj_name == NULL)
- return TCL_ERROR;
- var = varobj_get_handle (varobj_name);
-
-
- if (objc < 2)
- {
- Tcl_WrongNumArgs (interp, 1, objv, "option ?arg...?");
- return TCL_ERROR;
- }
-
- if (Tcl_GetIndexFromObj (interp, objv[1], commands, "options", 0,
- &index) != TCL_OK)
- return TCL_ERROR;
-
- result = TCL_OK;
- switch ((enum commands_enum) index)
- {
- case VARIABLE_DELETE:
- if (objc > 2)
- {
- int len;
- char *s = Tcl_GetStringFromObj (objv[2], &len);
- if (*s == 'c' && strncmp (s, "children", len) == 0)
- {
- variable_delete (interp, var, 1 /* only children */ );
- break;
- }
- }
- variable_delete (interp, var, 0 /* var and children */ );
- break;
-
- case VARIABLE_NUM_CHILDREN:
- Tcl_SetObjResult (interp, Tcl_NewIntObj (varobj_get_num_children (var)));
- break;
-
- case VARIABLE_CHILDREN:
- {
- Tcl_Obj *children = variable_children (interp, var);
- Tcl_SetObjResult (interp, children);
- }
- break;
-
- case VARIABLE_FORMAT:
- result = variable_format (interp, objc, objv, var);
- break;
-
- case VARIABLE_TYPE:
- result = variable_type (interp, objc, objv, var);
- break;
-
- case VARIABLE_VALUE:
- result = variable_value (interp, objc, objv, var);
- break;
-
- case VARIABLE_NAME:
- {
- char *name = varobj_get_expression (var);
- Tcl_SetObjResult (interp, Tcl_NewStringObj (name, -1));
- xfree (name);
- }
- break;
-
- case VARIABLE_EDITABLE:
- Tcl_SetObjResult (interp,
- Tcl_NewIntObj (varobj_get_attributes (var) & 0x00000001 /* Editable? */ ));
- break;
-
- case VARIABLE_UPDATE:
- /* Only root variables can be updated */
- {
- Tcl_Obj *obj = variable_update (interp, &var);
- Tcl_SetObjResult (interp, obj);
- }
- break;
-
- default:
- return TCL_ERROR;
- }
-
- return result;
-}
-
-/*
- * Variable object construction/destruction
- */
-
-/* This function is responsible for processing the user's specifications
- and constructing a variable object. */
-static int
-variable_create (Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
-{
- enum create_opts
- {
- CREATE_EXPR, CREATE_FRAME
- };
- static const char *create_options[] =
- {"-expr", "-frame", NULL};
- struct varobj *var;
- char *name;
- char *obj_name;
- int index;
- CORE_ADDR frame = (CORE_ADDR) -1;
- int how_specified = USE_SELECTED_FRAME;
-
- /* REMINDER: This command may be invoked in the following ways:
- gdb_variable create [NAME] [-expr EXPR] [-frame FRAME]
-
- NAME = name of object to create. If no NAME, then automatically create
- a name
- EXPR = the gdb expression for which to create a variable. This will
- be the most common usage.
- FRAME = the address of the frame defining the variable's scope
- */
- name = NULL;
- if (objc)
- name = Tcl_GetStringFromObj (objv[0], NULL);
- if (name == NULL || *name == '-')
- {
- /* generate a name for this object */
- obj_name = varobj_gen_name ();
- }
- else
- {
- /* specified name for object */
- obj_name = strdup (name);
- objv++;
- objc--;
- }
-
- /* Run through all the possible options for this command */
- name = NULL;
- while (objc > 0)
- {
- if (Tcl_GetIndexFromObj (interp, objv[0], create_options, "options",
- 0, &index) != TCL_OK)
- {
- xfree (obj_name);
- result_ptr->flags |= GDBTK_IN_TCL_RESULT;
- return TCL_ERROR;
- }
-
- switch ((enum create_opts) index)
- {
- case CREATE_EXPR:
- name = Tcl_GetStringFromObj (objv[1], NULL);
- objc--;
- objv++;
- break;
-
- case CREATE_FRAME:
- {
- char *str;
- str = Tcl_GetStringFromObj (objv[1], NULL);
- frame = string_to_core_addr (str);
- how_specified = USE_SPECIFIED_FRAME;
- objc--;
- objv++;
- }
- break;
-
- default:
- break;
- }
-
- objc--;
- objv++;
- }
-
- /* Create the variable */
- var = varobj_create (obj_name, name, frame, how_specified);
-
- if (var != NULL)
- {
- /* Install a command into the interpreter that represents this
- object */
- install_variable (interp, obj_name);
- Tcl_SetObjResult (interp, Tcl_NewStringObj (obj_name, -1));
- result_ptr->flags |= GDBTK_IN_TCL_RESULT;
-
- xfree (obj_name);
- return TCL_OK;
- }
-
- xfree (obj_name);
- return TCL_ERROR;
-}
-
-/* Delete the variable object VAR and its children */
-/* If only_children_p, Delete only the children associated with the object. */
-static void
-variable_delete (Tcl_Interp *interp, struct varobj *var,
- int only_children_p)
-{
- char **dellist;
- char **vc;
-
- varobj_delete (var, &dellist, only_children_p);
-
- vc = dellist;
- while (*vc != NULL)
- {
- uninstall_variable (interp, *vc);
- xfree (*vc);
- vc++;
- }
-
- xfree (dellist);
-}
-
-/* Return a list of all the children of VAR, creating them if necessary. */
-static Tcl_Obj *
-variable_children (Tcl_Interp *interp, struct varobj *var)
-{
- Tcl_Obj *list;
- struct varobj **childlist;
- struct varobj **vc;
- char *childname;
-
- list = Tcl_NewListObj (0, NULL);
-
- varobj_list_children (var, &childlist);
-
- vc = childlist;
- while (*vc != NULL)
- {
- childname = varobj_get_objname (*vc);
- /* Add child to result list and install the Tcl command for it. */
- Tcl_ListObjAppendElement (NULL, list,
- Tcl_NewStringObj (childname, -1));
- install_variable (interp, childname);
- vc++;
- }
-
- xfree (childlist);
- return list;
-}
-
-/* Update the values for a variable and its children. */
-/* NOTE: Only root variables can be updated... */
-
-static Tcl_Obj *
-variable_update (Tcl_Interp *interp, struct varobj **var)
-{
- Tcl_Obj *changed;
- struct varobj **changelist;
- struct varobj **vc;
-
- /* varobj_update() can return -1 if the variable is no longer around,
- i.e. we stepped out of the frame in which a local existed. */
- if (varobj_update (var, &changelist) == -1)
- return Tcl_NewStringObj ("-1", -1);
-
- changed = Tcl_NewListObj (0, NULL);
- vc = changelist;
- while (*vc != NULL)
- {
- /* Add changed variable object to result list */
- Tcl_ListObjAppendElement (NULL, changed,
- Tcl_NewStringObj (varobj_get_objname (*vc), -1));
- vc++;
- }
-
- xfree (changelist);
- return changed;
-}
-
-/* This implements the format object command allowing
- the querying or setting of the object's display format. */
-static int
-variable_format (Tcl_Interp *interp, int objc,
- Tcl_Obj *CONST objv[], struct varobj *var)
-{
- if (objc > 2)
- {
- /* Set the format of VAR to given format */
- int len;
- char *fmt = Tcl_GetStringFromObj (objv[2], &len);
- if (strncmp (fmt, "natural", len) == 0)
- varobj_set_display_format (var, FORMAT_NATURAL);
- else if (strncmp (fmt, "binary", len) == 0)
- varobj_set_display_format (var, FORMAT_BINARY);
- else if (strncmp (fmt, "decimal", len) == 0)
- varobj_set_display_format (var, FORMAT_DECIMAL);
- else if (strncmp (fmt, "hexadecimal", len) == 0)
- varobj_set_display_format (var, FORMAT_HEXADECIMAL);
- else if (strncmp (fmt, "octal", len) == 0)
- varobj_set_display_format (var, FORMAT_OCTAL);
- else
- {
- gdbtk_set_result (interp, "unknown display format \"",
- fmt, "\": must be: \"natural\", \"binary\""
- ", \"decimal\", \"hexadecimal\", or \"octal\"");
- return TCL_ERROR;
- }
- }
- else
- {
- /* Report the current format */
- Tcl_Obj *fmt;
-
- /* FIXME: Use varobj_format_string[] instead */
- fmt = Tcl_NewStringObj (
- format_string[(int) varobj_get_display_format (var)], -1);
- Tcl_SetObjResult (interp, fmt);
- }
-
- return TCL_OK;
-}
-
-/* This function implements the type object command, which returns the type of a
- variable in the interpreter (or an error). */
-static int
-variable_type (Tcl_Interp *interp, int objc,
- Tcl_Obj *CONST objv[], struct varobj *var)
-{
- const char *first;
- const char *last;
- char *string;
- Tcl_RegExp regexp;
-
- /* For the "fake" variables, do not return a type.
- Their type is NULL anyway */
- /* FIXME: varobj_get_type() calls type_print(), so we may have to wrap
- its call here and return TCL_ERROR in the case it errors out */
- if ((string = varobj_get_type (var)) == NULL)
- {
- Tcl_ResetResult (interp);
- return TCL_OK;
- }
-
- first = string;
-
- /* gdb will print things out like "struct {...}" for anonymous structs.
- In gui-land, we don't want the {...}, so we strip it here. */
- regexp = Tcl_RegExpCompile (interp, "{...}");
- if (Tcl_RegExpExec (interp, regexp, string, first))
- {
- /* We have an anonymous struct/union/class/enum */
- Tcl_RegExpRange (regexp, 0, &first, &last);
- if (*(first - 1) == ' ')
- first--;
- string[first - string] = '\0';
- }
-
- Tcl_SetObjResult (interp, Tcl_NewStringObj (string, -1));
- xfree (string);
- return TCL_OK;
-}
-
-/* This function implements the value object command, which allows an object's
- value to be queried or set. */
-static int
-variable_value (Tcl_Interp *interp, int objc,
- Tcl_Obj *CONST objv[], struct varobj *var)
-{
- char *r;
-
- /* If we're setting the value of the variable, objv[2] will contain the
- variable's new value. */
- if (objc > 2)
- {
- /* FIXME: Do we need to test if val->error is set here?
- If so, make it an attribute. */
- if (varobj_get_attributes (var) & 0x00000001 /* Editable? */ )
- {
- char *s;
-
- s = Tcl_GetStringFromObj (objv[2], NULL);
- if (!varobj_set_value (var, s))
- {
- gdbtk_set_result (interp, "Could not assign expression to variable object");
- return TCL_ERROR;
- }
- }
-
- Tcl_ResetResult (interp);
- return TCL_OK;
- }
-
- r = varobj_get_value (var);
-
- if (r == NULL)
- {
- gdbtk_set_result (interp, "Could not read variable object value after assignment");
- return TCL_ERROR;
- }
- else
- {
- Tcl_SetObjResult (interp, Tcl_NewStringObj (r, -1));
- xfree (r);
- return TCL_OK;
- }
-}
-
-/* Helper functions for the above */
-
-/* Install the given variable VAR into the tcl interpreter with
- the object name NAME. */
-static void
-install_variable (Tcl_Interp *interp, char *name)
-{
- Tcl_CreateObjCommand (interp, name, variable_obj_command,
- NULL, NULL);
-}
-
-/* Unistall the object VAR in the tcl interpreter. */
-static void
-uninstall_variable (Tcl_Interp *interp, char *varname)
-{
- Tcl_DeleteCommand (interp, varname);
-}
-
diff --git a/gdb/gdbtk/generic/gdbtk-wrapper.c b/gdb/gdbtk/generic/gdbtk-wrapper.c
deleted file mode 100644
index 13311bfd4be..00000000000
--- a/gdb/gdbtk/generic/gdbtk-wrapper.c
+++ /dev/null
@@ -1,723 +0,0 @@
-/* longjmp-free interface between gdb and gdbtk.
- Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-#include "defs.h"
-#include "frame.h"
-#include "value.h"
-#include "block.h"
-#include "exceptions.h"
-#include "gdbtk-wrapper.h"
-
-/*
- * Wrapper functions exported to the world
- */
-
-gdb_result GDB_value_fetch_lazy (value_ptr);
-
-gdb_result GDB_evaluate_expression (struct expression *, value_ptr *);
-
-gdb_result GDB_type_print (value_ptr, char *, struct ui_file *, int);
-
-gdb_result GDB_val_print (struct type *type, char *valaddr,
- CORE_ADDR address, struct ui_file *stream,
- int format, int deref_ref, int recurse,
- enum val_prettyprint pretty);
-
-gdb_result GDB_value_equal (value_ptr, value_ptr, int *);
-
-gdb_result GDB_parse_exp_1 (char **stringptr, struct block *block, int comma,
- struct expression **result);
-
-gdb_result GDB_evaluate_type (struct expression *exp, value_ptr * result);
-
-gdb_result GDB_block_for_pc (CORE_ADDR pc, struct block **result);
-
-gdb_result GDB_block_innermost_frame (struct block *block,
- struct frame_info **result);
-
-gdb_result GDB_reinit_frame_cache (void);
-
-gdb_result GDB_value_ind (value_ptr val, value_ptr * rval);
-
-gdb_result GDB_value_slice (value_ptr val, int low, int num,
- value_ptr * rval);
-
-gdb_result GDB_value_coerce_array (value_ptr val, value_ptr * rval);
-
-gdb_result GDB_value_struct_elt (value_ptr * argp, value_ptr * args,
- char *name, int *static_memfunc,
- char *err, value_ptr * rval);
-
-gdb_result GDB_value_cast (struct type *type, value_ptr val,
- value_ptr * rval);
-
-gdb_result GDB_get_frame_block (struct frame_info *fi, struct block **rval);
-
-gdb_result GDB_get_prev_frame (struct frame_info *fi,
- struct frame_info **result);
-
-gdb_result GDB_get_next_frame (struct frame_info *fi,
- struct frame_info **result);
-
-gdb_result GDB_find_relative_frame (struct frame_info *fi,
- int *start, struct frame_info **result);
-
-gdb_result GDB_get_current_frame (struct frame_info **result);
-
-/*
- * Private functions for this file
- */
-static gdb_result call_wrapped_function (catch_errors_ftype *,
- struct gdb_wrapper_arguments *);
-
-static int wrap_type_print (char *);
-
-static int wrap_evaluate_expression (char *);
-
-static int wrap_value_fetch_lazy (char *);
-
-static int wrap_val_print (char *);
-
-static int wrap_value_equal (char *);
-
-static int wrap_parse_exp_1 (char *opaque_arg);
-
-static int wrap_evaluate_type (char *opaque_arg);
-
-static int wrap_block_for_pc (char *opaque_arg);
-
-static int wrap_block_innermost_frame (char *opaque_arg);
-
-static int wrap_reinit_frame_cache (char *opaque_arg);
-
-static int wrap_value_ind (char *opaque_arg);
-
-static int wrap_value_slice (char *opaque_arg);
-
-static int wrap_value_coerce_array (char *opaque_arg);
-
-static int wrap_value_struct_elt (char *opaque_arg);
-
-static int wrap_value_cast (char *opaque_arg);
-
-static int wrap_get_frame_block (char *opaque_arg);
-
-static int wrap_get_prev_frame (char *opaque_arg);
-
-static int wrap_get_next_frame (char *opaque_arg);
-
-static int wrap_find_relative_frame (char *opaque_arg);
-
-static int wrap_get_current_frame (char *opaque_arg);
-
-static gdb_result
-call_wrapped_function (catch_errors_ftype *fn, struct gdb_wrapper_arguments *arg)
-{
- if (!catch_errors (fn, (char *) &arg, "", RETURN_MASK_ERROR))
- {
- /* An error occurred */
- return GDB_ERROR;
- }
-
- return GDB_OK;
-}
-
-gdb_result
-GDB_type_print (value_ptr val, char *varstring,
- struct ui_file *stream, int show)
-{
- struct gdb_wrapper_arguments args;
-
- args.args[0] = (char *) val;
- args.args[1] = varstring;
- args.args[2] = (char *) stream;
- args.args[3] = (char *) show;
- return call_wrapped_function ((catch_errors_ftype *) wrap_type_print, &args);
-}
-
-static int
-wrap_type_print (char *a)
-{
- struct gdb_wrapper_arguments **args = (struct gdb_wrapper_arguments **) a;
- value_ptr val = (value_ptr) (*args)->args[0];
- char *varstring = (*args)->args[1];
- struct ui_file *stream = (struct ui_file *) (*args)->args[2];
- int show = (int) (*args)->args[3];
- type_print (value_type (val), varstring, stream, show);
- return 1;
-}
-
-gdb_result
-GDB_val_print (struct type *type,
- char *valaddr,
- CORE_ADDR address,
- struct ui_file *stream,
- int format,
- int deref_ref,
- int recurse,
- enum val_prettyprint pretty)
-{
- struct gdb_wrapper_arguments args;
-
- args.args[0] = (char *) type;
- args.args[1] = (char *) valaddr;
- args.args[2] = (char *) &address;
- args.args[3] = (char *) stream;
- args.args[4] = (char *) format;
- args.args[5] = (char *) deref_ref;
- args.args[6] = (char *) recurse;
- args.args[7] = (char *) pretty;
-
- return call_wrapped_function ((catch_errors_ftype *) wrap_val_print, &args);
-}
-
-static int
-wrap_val_print (char *a)
-{
- struct gdb_wrapper_arguments **args = (struct gdb_wrapper_arguments **) a;
- struct type *type;
- const gdb_byte *valaddr;
- CORE_ADDR address;
- struct ui_file *stream;
- int format;
- int deref_ref;
- int recurse;
- enum val_prettyprint pretty;
-
- type = (struct type *) (*args)->args[0];
- valaddr = (gdb_byte *) (*args)->args[1];
- address = *(CORE_ADDR *) (*args)->args[2];
- stream = (struct ui_file *) (*args)->args[3];
- format = (int) (*args)->args[4];
- deref_ref = (int) (*args)->args[5];
- recurse = (int) (*args)->args[6];
- pretty = (enum val_prettyprint) (*args)->args[7];
-
- val_print (type, valaddr, 0, address, stream, format, deref_ref,
- recurse, pretty);
- return 1;
-}
-
-gdb_result
-GDB_value_fetch_lazy (value_ptr value)
-{
- struct gdb_wrapper_arguments args;
-
- args.args[0] = (char *) value;
- return call_wrapped_function ((catch_errors_ftype *) wrap_value_fetch_lazy, &args);
-}
-
-static int
-wrap_value_fetch_lazy (char *a)
-{
- struct gdb_wrapper_arguments **args = (struct gdb_wrapper_arguments **) a;
-
- value_fetch_lazy ((value_ptr) (*args)->args[0]);
- return 1;
-}
-
-gdb_result
-GDB_evaluate_expression (struct expression *exp, value_ptr *value)
-{
- struct gdb_wrapper_arguments args;
- gdb_result result;
- args.args[0] = (char *) exp;
-
- result = call_wrapped_function ((catch_errors_ftype *) wrap_evaluate_expression, &args);
- if (result != GDB_OK)
- return result;
-
- *value = (value_ptr) args.result;
- return GDB_OK;
-}
-
-static int
-wrap_evaluate_expression (char *a)
-{
- struct gdb_wrapper_arguments **args = (struct gdb_wrapper_arguments **) a;
-
- (*args)->result =
- (char *) evaluate_expression ((struct expression *) (*args)->args[0]);
- return 1;
-}
-
-gdb_result
-GDB_value_equal (val1, val2, result)
- value_ptr val1;
- value_ptr val2;
- int *result;
-{
- struct gdb_wrapper_arguments args;
- gdb_result r;
-
- args.args[0] = (char *) val1;
- args.args[1] = (char *) val2;
-
- r = call_wrapped_function ((catch_errors_ftype *) wrap_value_equal, &args);
- if (r != GDB_OK)
- return r;
-
- *result = (int) args.result;
- return GDB_OK;
-}
-
-static int
-wrap_value_equal (char *a)
-{
- struct gdb_wrapper_arguments **args = (struct gdb_wrapper_arguments **) a;
- value_ptr val1, val2;
-
- val1 = (value_ptr) (*args)->args[0];
- val2 = (value_ptr) (*args)->args[1];
-
- (*args)->result = (char *) value_equal (val1, val2);
- return 1;
-}
-
-gdb_result
-GDB_parse_exp_1 (char **stringptr, struct block *block,
- int comma, struct expression **result)
-{
- struct gdb_wrapper_arguments args;
- gdb_result r;
-
- args.args[0] = (char *) stringptr;
- args.args[1] = (char *) block;
- args.args[2] = (char *) comma;
-
- r = call_wrapped_function ((catch_errors_ftype *) wrap_parse_exp_1, &args);
- if (r != GDB_OK)
- return r;
-
- *result = (struct expression *) args.result;
- return GDB_OK;
-}
-
-static int
-wrap_parse_exp_1 (char *opaque_arg)
-{
- struct gdb_wrapper_arguments **args = (struct gdb_wrapper_arguments **) opaque_arg;
- struct block *block;
- char **stringptr;
- int comma;
-
- stringptr = (char **) (*args)->args[0];
- block = (struct block *) (*args)->args[1];
- comma = (int) (*args)->args[2];
-
- (*args)->result = (char *) parse_exp_1 (stringptr, block, comma);
- return 1;
-}
-
-gdb_result
-GDB_evaluate_type (struct expression *exp, value_ptr *result)
-{
- struct gdb_wrapper_arguments args;
- gdb_result r;
-
- args.args[0] = (char *) exp;
-
- r = call_wrapped_function ((catch_errors_ftype *) wrap_evaluate_type, &args);
- if (r != GDB_OK)
- return r;
-
- *result = (value_ptr) args.result;
- return GDB_OK;
-}
-
-static int
-wrap_evaluate_type (char *opaque_arg)
-{
- struct gdb_wrapper_arguments **args = (struct gdb_wrapper_arguments **) opaque_arg;
- struct expression *exp;
-
- exp = (struct expression *) (*args)->args[0];
- (*args)->result = (char *) evaluate_type (exp);
- return 1;
-}
-
-gdb_result
-GDB_block_for_pc (CORE_ADDR pc, struct block **result)
-{
- struct gdb_wrapper_arguments args;
- gdb_result r;
-
- args.args[0] = (char *) &pc;
-
- r = call_wrapped_function ((catch_errors_ftype *) wrap_block_for_pc, &args);
- if (r != GDB_OK)
- return r;
-
- *result = (struct block *) args.result;
- return GDB_OK;
-}
-
-static int
-wrap_block_for_pc (char *opaque_arg)
-{
- struct gdb_wrapper_arguments **args = (struct gdb_wrapper_arguments **) opaque_arg;
- CORE_ADDR pc;
-
- pc = *(CORE_ADDR *) (*args)->args[0];
- (*args)->result = (char *) block_for_pc (pc);
- return 1;
-}
-
-gdb_result
-GDB_block_innermost_frame (struct block *block, struct frame_info **result)
-{
- struct gdb_wrapper_arguments args;
- gdb_result r;
-
- args.args[0] = (char *) block;
-
- r = call_wrapped_function ((catch_errors_ftype *) wrap_block_innermost_frame, &args);
- if (r != GDB_OK)
- return r;
-
- *result = (struct frame_info *) args.result;
- return GDB_OK;
-}
-
-static int
-wrap_block_innermost_frame (char *opaque_arg)
-{
- struct gdb_wrapper_arguments **args = (struct gdb_wrapper_arguments **) opaque_arg;
- struct block *block;
-
- block = (struct block *) (*args)->args[0];
- (*args)->result = (char *) block_innermost_frame (block);
- return 1;
-}
-
-gdb_result
-GDB_reinit_frame_cache ()
-{
- gdb_result r;
-
- r = call_wrapped_function ((catch_errors_ftype *) wrap_reinit_frame_cache, NULL);
- if (r != GDB_OK)
- return r;
-
- return GDB_OK;
-}
-
-static int
-wrap_reinit_frame_cache (char *opaque_arg)
-{
- reinit_frame_cache ();
- return 1;
-}
-
-gdb_result
-GDB_value_ind (value_ptr val, value_ptr *rval)
-{
- struct gdb_wrapper_arguments args;
- gdb_result r;
-
- args.args[0] = (char *) val;
-
- r = call_wrapped_function ((catch_errors_ftype *) wrap_value_ind, &args);
- if (r != GDB_OK)
- return r;
-
- *rval = (value_ptr) args.result;
- return GDB_OK;
-}
-
-static int
-wrap_value_ind (char *opaque_arg)
-{
- struct gdb_wrapper_arguments **args = (struct gdb_wrapper_arguments **) opaque_arg;
- value_ptr val;
-
- val = (value_ptr) (*args)->args[0];
- (*args)->result = (char *) value_ind (val);
- return 1;
-}
-
-gdb_result
-GDB_value_slice (value_ptr val, int low, int num, value_ptr *rval)
-{
- struct gdb_wrapper_arguments args;
- gdb_result r;
-
- args.args[0] = (char *) val;
- args.args[1] = (char *) &low;
- args.args[2] = (char *) &num;
-
- r = call_wrapped_function ((catch_errors_ftype *) wrap_value_slice, &args);
- if (r != GDB_OK)
- return r;
-
- *rval = (value_ptr) args.result;
- return GDB_OK;
-}
-
-static int
-wrap_value_slice (char *opaque_arg)
-{
- struct gdb_wrapper_arguments **args = (struct gdb_wrapper_arguments **) opaque_arg;
- value_ptr val;
- int low, num;
-
- val = (value_ptr) (*args)->args[0];
- low = *(int *) (*args)->args[1];
- num = *(int *) (*args)->args[2];
- (*args)->result = (char *) value_slice (val, low, num);
- return 1;
-}
-
-gdb_result
-GDB_value_coerce_array (val, rval)
- value_ptr val;
- value_ptr *rval;
-{
- struct gdb_wrapper_arguments args;
- gdb_result r;
-
- args.args[0] = (char *) val;
-
- r = call_wrapped_function ((catch_errors_ftype *) wrap_value_coerce_array,
- &args);
- if (r != GDB_OK)
- return r;
-
- *rval = (value_ptr) args.result;
- return GDB_OK;
-}
-
-static int
-wrap_value_coerce_array (char *opaque_arg)
-{
- struct gdb_wrapper_arguments **args = (struct gdb_wrapper_arguments **) opaque_arg;
- value_ptr val;
-
- val = (value_ptr) (*args)->args[0];
- (*args)->result = (char *) value_coerce_array (val);
- return 1;
-}
-
-gdb_result
-GDB_value_struct_elt (value_ptr *argp,
- value_ptr *args,
- char *name,
- int *static_memfunc,
- char *err,
- value_ptr *rval)
-{
- struct gdb_wrapper_arguments argss;
- gdb_result r;
-
- argss.args[0] = (char *) argp;
- argss.args[1] = (char *) args;
- argss.args[2] = name;
- argss.args[3] = (char *) static_memfunc;
- argss.args[4] = err;
- r = call_wrapped_function ((catch_errors_ftype *) wrap_value_struct_elt, &argss);
- if (r != GDB_OK)
- return r;
-
- *rval = (value_ptr) argss.result;
- return GDB_OK;
-}
-
-static int
-wrap_value_struct_elt (char *opaque_arg)
-{
- struct gdb_wrapper_arguments **argss = (struct gdb_wrapper_arguments **) opaque_arg;
- value_ptr *argp, *args;
- char *name;
- int *static_memfunc;
- char *err;
-
- argp = (value_ptr *) (*argss)->args[0];
- args = (value_ptr *) (*argss)->args[1];
- name = (*argss)->args[2];
- static_memfunc = (int *) (*argss)->args[3];
- err = (*argss)->args[4];
-
- (*argss)->result = (char *) value_struct_elt (argp, args, name, static_memfunc, err);
- return 1;
-}
-
-gdb_result
-GDB_value_cast (struct type *type, value_ptr val, value_ptr *rval)
-{
- struct gdb_wrapper_arguments args;
- gdb_result r;
-
- args.args[0] = (char *) type;
- args.args[1] = (char *) val;
-
- r = call_wrapped_function ((catch_errors_ftype *) wrap_value_cast, &args);
- if (r != GDB_OK)
- return r;
-
- *rval = (value_ptr) args.result;
- return GDB_OK;
-}
-
-static int
-wrap_value_cast (char *opaque_arg)
-{
- struct gdb_wrapper_arguments **args = (struct gdb_wrapper_arguments **) opaque_arg;
- value_ptr val;
- struct type *type;
-
- type = (struct type *) (*args)->args[0];
- val = (value_ptr) (*args)->args[1];
- (*args)->result = (char *) value_cast (type, val);
-
- return 1;
-}
-
-gdb_result
-GDB_get_frame_block (struct frame_info *fi, struct block **rval)
-{
- struct gdb_wrapper_arguments args;
- gdb_result r;
-
- args.args[0] = (char *) fi;
-
- r = call_wrapped_function ((catch_errors_ftype *) wrap_get_frame_block, &args);
- if (r != GDB_OK)
- return r;
-
- *rval = (struct block *) args.result;
- return GDB_OK;
-}
-
-static int
-wrap_get_frame_block (char *opaque_arg)
-{
- struct gdb_wrapper_arguments **args = (struct gdb_wrapper_arguments **) opaque_arg;
- struct frame_info *fi;
-
- fi = (struct frame_info *) (*args)->args[0];
- (*args)->result = (char *) get_frame_block (fi, NULL);
-
- return 1;
-}
-
-gdb_result
-GDB_get_prev_frame (struct frame_info *fi, struct frame_info **result)
-{
- struct gdb_wrapper_arguments args;
- gdb_result r;
-
- args.args[0] = (char *) fi;
- r = call_wrapped_function ((catch_errors_ftype *) wrap_get_prev_frame, &args);
- if (r != GDB_OK)
- return r;
-
- *result = (struct frame_info *) args.result;
- return GDB_OK;
-}
-
-static int
-wrap_get_prev_frame (char *opaque_arg)
-{
- struct gdb_wrapper_arguments **args = (struct gdb_wrapper_arguments **) opaque_arg;
- struct frame_info *fi = (struct frame_info *) (*args)->args[0];
-
- (*args)->result = (char *) get_prev_frame (fi);
- return 1;
-}
-
-gdb_result
-GDB_get_next_frame (struct frame_info *fi, struct frame_info **result)
-{
- struct gdb_wrapper_arguments args;
- gdb_result r;
-
- args.args[0] = (char *) fi;
- r = call_wrapped_function ((catch_errors_ftype *) wrap_get_next_frame, &args);
- if (r != GDB_OK)
- return r;
-
- *result = (struct frame_info *) args.result;
- return GDB_OK;
-}
-
-static int
-wrap_get_next_frame (char *opaque_arg)
-{
- struct gdb_wrapper_arguments **args = (struct gdb_wrapper_arguments **) opaque_arg;
- struct frame_info *fi = (struct frame_info *) (*args)->args[0];
-
- (*args)->result = (char *) get_next_frame (fi);
- return 1;
-}
-
-gdb_result
-GDB_find_relative_frame (struct frame_info *fi, int *start,
- struct frame_info **result)
-{
- struct gdb_wrapper_arguments args;
- gdb_result r;
-
- args.args[0] = (char *) fi;
- args.args[1] = (char *) start;
-
- r = call_wrapped_function ((catch_errors_ftype *) wrap_find_relative_frame,
- &args);
- if (r != GDB_OK)
- return r;
-
- *result = (struct frame_info *) args.result;
- return GDB_OK;
-}
-
-static int
-wrap_find_relative_frame (char *opaque_arg)
-{
- struct gdb_wrapper_arguments **args = (struct gdb_wrapper_arguments **) opaque_arg;
- struct frame_info *fi = (struct frame_info *) (*args)->args[0];
- int *start = (int *) (*args)->args[1];
-
- (*args)->result = (char *) find_relative_frame (fi, start);
- return 1;
-}
-
-gdb_result
-GDB_get_current_frame (struct frame_info **result)
-{
- struct gdb_wrapper_arguments args;
- gdb_result r;
-
- r = call_wrapped_function ((catch_errors_ftype *) wrap_get_current_frame,
- &args);
- if (r != GDB_OK)
- return r;
-
- *result = (struct frame_info *) args.result;
- return GDB_OK;
-}
-
-static int
-wrap_get_current_frame (char *opaque_arg)
-{
- struct gdb_wrapper_arguments **args = (struct gdb_wrapper_arguments **) opaque_arg;
-
- (*args)->result = (char *) get_current_frame ();
- return 1;
-}
-
diff --git a/gdb/gdbtk/generic/gdbtk-wrapper.h b/gdb/gdbtk/generic/gdbtk-wrapper.h
deleted file mode 100644
index c07d8148b23..00000000000
--- a/gdb/gdbtk/generic/gdbtk-wrapper.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/* longjmp-free interface between gdb and gdbtk.
- Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
-
-This file is part of GDB. It contains routines to safely call common gdb
-functions without the fear of longjmp'ing.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor,
-Boston, MA 02110-1301, USA. */
-
-#ifndef GDBTK_WRAPPER_H
-#define GDBTK_WRAPPER_H
-/* Use this struct used to pass arguments to wrapper routines. We assume
- (arbitrarily) that no gdb function takes more than ten arguments. */
-struct gdb_wrapper_arguments {
-
- /* Pointer to some result from the gdb function call, if any */
- char *result;
-
- /* The list of arguments. */
- char *args[10];
-};
-
-/* FIXME: cagney/2002-01-04: GDB no longer uses or supplies the
- value_ptr typedef. Provide one here to keep the Insight code
- immediatly happy. */
-typedef struct value *value_ptr;
-
-/* Whenever any gdb function wrapper is called, its return status is: */
-typedef enum gdb_wrapper_status { GDB_OK, GDB_ERROR } gdb_result;
-
-/* This list of functions which have been wrapped. Please keep this list
- in alphabetical order, using "GDB_" to prefix the actual name of the
- function. */
-extern gdb_result GDB_evaluate_expression (struct expression *expr,
- value_ptr * val);
-extern gdb_result GDB_type_print (value_ptr val, char *varstring,
- struct ui_file *stream, int show);
-extern gdb_result GDB_val_print (struct type *type, char *valaddr,
- CORE_ADDR address, struct ui_file *stream,
- int format, int deref_ref, int recurse,
- enum val_prettyprint pretty);
-extern gdb_result GDB_value_fetch_lazy (value_ptr value);
-extern gdb_result GDB_value_equal (value_ptr val1, value_ptr val2,
- int *result);
-extern gdb_result GDB_parse_exp_1 (char **stringptr, struct block *block,
- int comma, struct expression **result);
-extern gdb_result GDB_evaluate_type (struct expression *exp,
- value_ptr * result);
-extern gdb_result GDB_block_for_pc (CORE_ADDR pc, struct block **result);
-extern gdb_result GDB_block_innermost_frame (struct block *block,
- struct frame_info **result);
-extern gdb_result GDB_reinit_frame_cache (void);
-extern gdb_result GDB_value_ind (value_ptr val, value_ptr * rval);
-extern gdb_result GDB_value_slice (value_ptr val, int low, int num,
- value_ptr * rval);
-extern gdb_result GDB_value_coerce_array (value_ptr val, value_ptr * rval);
-extern gdb_result GDB_value_struct_elt (value_ptr * argp, value_ptr * args,
- char *name, int *static_memfunc,
- char *err, value_ptr * rval);
-extern gdb_result GDB_value_cast (struct type *type, value_ptr val,
- value_ptr * rval);
-gdb_result GDB_get_frame_block (struct frame_info *fi, struct block **rval);
-extern gdb_result GDB_get_prev_frame (struct frame_info *fi,
- struct frame_info **result);
-extern gdb_result GDB_get_next_frame (struct frame_info *fi,
- struct frame_info **result);
-extern gdb_result GDB_find_relative_frame (struct frame_info *fi,
- int *start,
- struct frame_info **result);
-extern gdb_result GDB_get_current_frame (struct frame_info **result);
-#endif /* GDBTK_WRAPPER_H */
-
diff --git a/gdb/gdbtk/generic/gdbtk.c b/gdb/gdbtk/generic/gdbtk.c
deleted file mode 100644
index 457f9703d1f..00000000000
--- a/gdb/gdbtk/generic/gdbtk.c
+++ /dev/null
@@ -1,767 +0,0 @@
-/* Startup code for Insight
- Copyright (C) 1994, 1995, 1996, 1997, 1998, 2001, 2002, 2003, 2004
- Free Software Foundation, Inc.
-
- Written by Stu Grossman <grossman@cygnus.com> of Cygnus Support.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-#include "defs.h"
-#include "inferior.h"
-#include "symfile.h"
-#include "objfiles.h"
-#include "gdbcore.h"
-#include "tracepoint.h"
-#include "demangle.h"
-#include "version.h"
-#include "top.h"
-#include "annotate.h"
-#include "exceptions.h"
-
-#if defined(_WIN32) || defined(__CYGWIN__)
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#endif
-
-/* tcl header files includes varargs.h unless HAS_STDARG is defined,
- but gdb uses stdarg.h, so make sure HAS_STDARG is defined. */
-#define HAS_STDARG 1
-
-#include <itcl.h>
-#include <itk.h>
-#include "guitcl.h"
-#include "gdbtk.h"
-
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
-#include <signal.h>
-
-#include "gdb_string.h"
-#include "dis-asm.h"
-#include "gdbcmd.h"
-
-#ifdef __CYGWIN32__
-#include <sys/cygwin.h> /* for cygwin32_attach_handle_to_fd */
-#endif
-
-extern void _initialize_gdbtk (void);
-
-/* For unix natives, we use a timer to periodically keep the gui alive.
- See comments before x_event. */
-static sigset_t nullsigmask;
-static struct sigaction act1, act2;
-static struct itimerval it_on, it_off;
-
-static void
-x_event_wrapper (int signo)
-{
- x_event (signo);
-}
-
-/*
- * This variable controls the interaction with an external editor.
- */
-
-char *external_editor_command = NULL;
-
-extern int Tktable_Init (Tcl_Interp * interp);
-
-void gdbtk_init (void);
-
-static void gdbtk_init_1 (char *argv0);
-
-void gdbtk_interactive (void);
-
-static void cleanup_init (void *ignore);
-
-static void tk_command (char *, int);
-
-static int target_should_use_timer (struct target_ops *t);
-
-int target_is_native (struct target_ops *t);
-
-int gdbtk_test (char *);
-
-static void view_command (char *, int);
-
-/* Handle for TCL interpreter */
-Tcl_Interp *gdbtk_interp = NULL;
-
-static int gdbtk_timer_going = 0;
-
-/* linked variable used to tell tcl what the current thread is */
-int gdb_context = 0;
-
-/* This variable is true when the inferior is running. See note in
- * gdbtk.h for details.
- */
-int running_now;
-
-/* This variable holds the name of a Tcl file which should be sourced by the
- interpreter when it goes idle at startup. Used with the testsuite. */
-static char *gdbtk_source_filename = NULL;
-
-int gdbtk_disable_fputs = 1;
-
-static const char *argv0;
-
-#ifndef _WIN32
-
-/* Supply malloc calls for tcl/tk. We do not want to do this on
- Windows, because Tcl_Alloc is probably in a DLL which will not call
- the mmalloc routines.
- We also don't need to do it for Tcl/Tk8.1, since we locally changed the
- allocator to use malloc & free. */
-
-#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0
-char *
-TclpAlloc (unsigned int size)
-{
- return xmalloc (size);
-}
-
-char *
-TclpRealloc (char *ptr, unsigned int size)
-{
- return xrealloc (ptr, size);
-}
-
-void
-TclpFree (char *ptr)
-{
- free (ptr);
-}
-#endif /* TCL_VERSION == 8.0 */
-
-#endif /* ! _WIN32 */
-
-#ifdef _WIN32
-
-/* On Windows, if we hold a file open, other programs can't write to
- * it. In particular, we don't want to hold the executable open,
- * because it will mean that people have to get out of the debugging
- * session in order to remake their program. So we close it, although
- * this will cost us if and when we need to reopen it.
- */
-
-void
-close_bfds ()
-{
- struct objfile *o;
-
- ALL_OBJFILES (o)
- {
- if (o->obfd != NULL)
- bfd_cache_close (o->obfd);
- }
-
- if (exec_bfd != NULL)
- bfd_cache_close (exec_bfd);
-}
-
-#endif /* _WIN32 */
-
-
-/* TclDebug (const char *fmt, ...) works just like printf() but
- * sends the output to the GDB TK debug window.
- * Not for normal use; just a convenient tool for debugging
- */
-
-void
-TclDebug (char level, const char *fmt,...)
-{
- va_list args;
- char *buf;
- const char *v[3];
- char *merge;
- char *priority;
-
- switch (level)
- {
- case 'W':
- priority = "W";
- break;
- case 'E':
- priority = "E";
- break;
- case 'X':
- priority = "X";
- break;
- default:
- priority = "I";
- }
-
- va_start (args, fmt);
-
-
- xvasprintf (&buf, fmt, args);
- va_end (args);
-
- v[0] = "dbug";
- v[1] = priority;
- v[2] = buf;
-
- merge = Tcl_Merge (3, v);
- if (Tcl_Eval (gdbtk_interp, merge) != TCL_OK)
- Tcl_BackgroundError (gdbtk_interp);
- Tcl_Free (merge);
- free(buf);
-}
-
-
-/*
- * The rest of this file contains the start-up, and event handling code for gdbtk.
- */
-
-/*
- * This cleanup function is added to the cleanup list that surrounds the Tk
- * main in gdbtk_init. It deletes the Tcl interpreter.
- */
-
-static void
-cleanup_init (void *ignore)
-{
- if (gdbtk_interp != NULL)
- Tcl_DeleteInterp (gdbtk_interp);
- gdbtk_interp = NULL;
-}
-
-/* Come here during long calculations to check for GUI events. Usually invoked
- via the QUIT macro. */
-
-void
-gdbtk_interactive ()
-{
- /* Tk_DoOneEvent (TK_DONT_WAIT|TK_IDLE_EVENTS); */
-}
-
-/* Start a timer which will keep the GUI alive while in target_wait. */
-void
-gdbtk_start_timer ()
-{
- static int first = 1;
-
- if (first)
- {
- /* first time called, set up all the structs */
- first = 0;
- sigemptyset (&nullsigmask);
-
- act1.sa_handler = x_event_wrapper;
- act1.sa_mask = nullsigmask;
- act1.sa_flags = 0;
-
- act2.sa_handler = SIG_IGN;
- act2.sa_mask = nullsigmask;
- act2.sa_flags = 0;
-
- it_on.it_interval.tv_sec = 0;
- it_on.it_interval.tv_usec = 250000; /* .25 sec */
- it_on.it_value.tv_sec = 0;
- it_on.it_value.tv_usec = 250000;
-
- it_off.it_interval.tv_sec = 0;
- it_off.it_interval.tv_usec = 0;
- it_off.it_value.tv_sec = 0;
- it_off.it_value.tv_usec = 0;
- }
-
- if (target_should_use_timer (&current_target))
- {
- if (!gdbtk_timer_going)
- {
- sigaction (SIGALRM, &act1, NULL);
- setitimer (ITIMER_REAL, &it_on, NULL);
- gdbtk_timer_going = 1;
- }
- }
- return;
-}
-
-/* Stop the timer if it is running. */
-void
-gdbtk_stop_timer ()
-{
- if (gdbtk_timer_going)
- {
- gdbtk_timer_going = 0;
- setitimer (ITIMER_REAL, &it_off, NULL);
- sigaction (SIGALRM, &act2, NULL);
- }
- return;
-}
-
-/* Should this target use the timer? See comments before
- x_event for the logic behind all this. */
-static int
-target_should_use_timer (struct target_ops *t)
-{
- return target_is_native (t);
-}
-
-/* Is T a native target? */
-int
-target_is_native (struct target_ops *t)
-{
- char *name = t->to_shortname;
-
- if (strcmp (name, "exec") == 0 || strcmp (name, "hpux-threads") == 0
- || strcmp (name, "child") == 0 || strcmp (name, "procfs") == 0
- || strcmp (name, "solaris-threads") == 0
- || strcmp (name, "linuxthreads") == 0
- || strcmp (name, "multi-thread") == 0)
- return 1;
-
- return 0;
-}
-
-/* gdbtk_init installs this function as a final cleanup. */
-
-static void
-gdbtk_cleanup (PTR dummy)
-{
- Tcl_Eval (gdbtk_interp, "gdbtk_cleanup");
- Tcl_Finalize ();
-}
-
-
-/* Initialize gdbtk. This involves creating a Tcl interpreter,
- * defining all the Tcl commands that the GUI will use, pointing
- * all the gdb "hooks" to the correct functions,
- * and setting the Tcl auto loading environment so that we can find all
- * the Tcl based library files.
- */
-
-void
-gdbtk_init (void)
-{
- struct cleanup *old_chain;
- char *s;
- int element_count;
- const char **exec_path;
- CONST char *internal_exec_name;
-
- /* If there is no DISPLAY environment variable, Tk_Init below will fail,
- causing gdb to abort. If instead we simply return here, gdb will
- gracefully degrade to using the command line interface. */
-
-#ifndef _WIN32
- if (getenv ("DISPLAY") == NULL)
- {
- return;
- }
-#endif
-
- old_chain = make_cleanup (cleanup_init, 0);
-
- /* First init tcl and tk. */
- Tcl_FindExecutable (argv0);
- gdbtk_interp = Tcl_CreateInterp ();
-
-#ifdef TCL_MEM_DEBUG
- Tcl_InitMemory (gdbtk_interp);
-#endif
-
- if (!gdbtk_interp)
- error ("Tcl_CreateInterp failed");
-
- /* We need to check if we are being run from
- a bin directory, if not then we may have to
- set some environment variables. */
-
- internal_exec_name = Tcl_GetNameOfExecutable ();
-
- Tcl_SplitPath ((char *) internal_exec_name, &element_count, &exec_path);
-
- if (strcmp (exec_path[element_count - 2], "bin") != 0)
- {
- /* We check to see if TCL_LIBRARY, TK_LIBRARY,
- ITCL_LIBRARY, ITK_LIBRARY, TIX_LIBRARY and maybe
- a couple other environment variables have been
- set (we don't want to override the User's settings).
- If the *_LIBRARY variable is not set, point it at
- the source directory. */
-
- static char set_libs_path_script[] = "\
- set srcDir [file dirname [file dirname $env(TCL_LIBRARY)]];\n\
-\
- if {![info exists env(TK_LIBRARY)]} {\n\
- set env(TK_LIBRARY) [file join $srcDir tk library]\n\
- }\n\
-\
- if {![info exists env(ITCL_LIBRARY)]} {\n\
- set env(ITCL_LIBRARY) [file join $srcDir itcl itcl library]\n\
- }\n\
-\
- if {![info exists env(ITK_LIBRARY)]} {\n\
- set env(ITK_LIBRARY) [file join $srcDir itcl itk library]\n\
- }\n\
-\
- if {![info exists env(IWIDGETS_LIBRARY)]} {\n\
- set env(IWIDGETS_LIBRARY)\
- [file join $srcDir itcl iwidgets generic]\n\
- }\n\
-\
- if {![info exists env(GDBTK_LIBRARY)]} {\n\
- set env(GDBTK_LIBRARY) [file join $srcDir gdb gdbtk library]\n\
- }\n\
-\
- # Append the directory with the itcl pkg index\n\
- if {[info exists env(TCLLIBPATH)]} {\n\
- append env(TCLLIBPATH) :[file joing $srcDir itcl]\n\
- } else {\n\
- set env(TCLLIBPATH) [file join $srcDir itcl]\n\
- }\n\
-\
- # We also need to append the iwidgets library path.\n\
- # Unfortunately, there is no IWIDGETS_LIBRARY.\n\
- set IWIDGETS_LIBRARY [file join $srcDir itcl iwidgets generic]\n";
-
- Tcl_Obj *commandObj;
-
- /* Before we can run our script we must set TCL_LIBRARY. */
- if (Tcl_GetVar2 (gdbtk_interp, "env", "TCL_LIBRARY", TCL_GLOBAL_ONLY) == NULL)
- {
- int i, count;
- char *src_dir = SRC_DIR;
- const char **src_path;
- const char **lib_path;
- Tcl_DString lib_dstring;
-
- Tcl_DStringInit (&lib_dstring);
-
-#ifdef __CYGWIN__
- /* SRC_DIR from configure is a posix path. Tcl really needs a
- windows path. */
- src_dir = (char *) alloca (cygwin_posix_to_win32_path_list_buf_size (SRC_DIR));
- cygwin_posix_to_win32_path_list (SRC_DIR, src_dir);
-#endif
- Tcl_SplitPath (src_dir, &count, &src_path);
-
- /* Append tcl/library to src_dir (src_dir=/foo/bar/gdb) */
- lib_path = (const char **) alloca ((count + 2) * sizeof (char *));
- for (i = 0; i < count - 1; i++)
- lib_path[i] = src_path[i];
- lib_path[i++] = "tcl";
- lib_path[i++] = "library";
- Tcl_JoinPath (i, lib_path, &lib_dstring);
-
- /* Set TCL_LIBRARY */
- Tcl_SetVar2 (gdbtk_interp, "env", "TCL_LIBRARY",
- Tcl_DStringValue (&lib_dstring) , TCL_GLOBAL_ONLY);
- Tcl_DStringFree (&lib_dstring);
- Tcl_Free ((char *) src_path);
- }
-
- commandObj = Tcl_NewStringObj (set_libs_path_script, -1);
- Tcl_IncrRefCount (commandObj);
- Tcl_EvalObj (gdbtk_interp, commandObj);
- Tcl_DecrRefCount (commandObj);
- }
-
- Tcl_Free ((char *) exec_path);
-
- if (Tcl_Init (gdbtk_interp) != TCL_OK)
- error ("Tcl_Init failed: %s", gdbtk_interp->result);
-
- /* Set up some globals used by gdb to pass info to gdbtk
- for start up options and the like */
- xasprintf (&s, "%d", inhibit_gdbinit);
- Tcl_SetVar2 (gdbtk_interp, "GDBStartup", "inhibit_prefs", s, TCL_GLOBAL_ONLY);
- free(s);
-
- /* Note: Tcl_SetVar2() treats the value as read-only (making a
- copy). Unfortunately it does not mark the parameter as
- ``const''. */
- Tcl_SetVar2 (gdbtk_interp, "GDBStartup", "host_name", (char*) host_name, TCL_GLOBAL_ONLY);
- Tcl_SetVar2 (gdbtk_interp, "GDBStartup", "target_name", (char*) target_name, TCL_GLOBAL_ONLY);
-
- make_final_cleanup (gdbtk_cleanup, NULL);
-
- /* Initialize the Paths variable. */
- if (ide_initialize_paths (gdbtk_interp, "") != TCL_OK)
- error ("ide_initialize_paths failed: %s", gdbtk_interp->result);
-
- if (Tk_Init (gdbtk_interp) != TCL_OK)
- error ("Tk_Init failed: %s", gdbtk_interp->result);
-
- if (Itcl_Init (gdbtk_interp) == TCL_ERROR)
- error ("Itcl_Init failed: %s", gdbtk_interp->result);
- Tcl_StaticPackage (gdbtk_interp, "Itcl", Itcl_Init,
- (Tcl_PackageInitProc *) NULL);
-
- if (Itk_Init (gdbtk_interp) == TCL_ERROR)
- error ("Itk_Init failed: %s", gdbtk_interp->result);
- Tcl_StaticPackage (gdbtk_interp, "Itk", Itk_Init,
- (Tcl_PackageInitProc *) NULL);
-
- if (Tktable_Init (gdbtk_interp) != TCL_OK)
- error ("Tktable_Init failed: %s", gdbtk_interp->result);
-
- Tcl_StaticPackage (gdbtk_interp, "Tktable", Tktable_Init,
- (Tcl_PackageInitProc *) NULL);
- /*
- * These are the commands to do some Windows Specific stuff...
- */
-
-#ifdef __CYGWIN32__
- if (ide_create_messagebox_command (gdbtk_interp) != TCL_OK)
- error ("messagebox command initialization failed");
- /* On Windows, create a sizebox widget command */
-#if 0
- if (ide_create_sizebox_command (gdbtk_interp) != TCL_OK)
- error ("sizebox creation failed");
-#endif
- if (ide_create_winprint_command (gdbtk_interp) != TCL_OK)
- error ("windows print code initialization failed");
- if (ide_create_win_grab_command (gdbtk_interp) != TCL_OK)
- error ("grab support command initialization failed");
- /* Path conversion functions. */
- if (ide_create_cygwin_path_command (gdbtk_interp) != TCL_OK)
- error ("cygwin path command initialization failed");
- if (ide_create_shell_execute_command (gdbtk_interp) != TCL_OK)
- error ("cygwin shell execute command initialization failed");
-#endif
-
- /* Only for testing -- and only when it can't be done any
- other way. */
- if (cyg_create_warp_pointer_command (gdbtk_interp) != TCL_OK)
- error ("warp_pointer command initialization failed");
-
- /*
- * This adds all the Gdbtk commands.
- */
-
- if (Gdbtk_Init (gdbtk_interp) != TCL_OK)
- {
- error ("Gdbtk_Init failed: %s", gdbtk_interp->result);
- }
-
- Tcl_StaticPackage (gdbtk_interp, "Insight", Gdbtk_Init, NULL);
-
- /* Add a back door to Tk from the gdb console... */
-
- add_com ("tk", class_obscure, tk_command,
- "Send a command directly into tk.");
-
- add_com ("view", class_obscure, view_command,
- "View a location in the source window.");
-
- /*
- * Set the variable for external editor:
- */
-
- if (external_editor_command != NULL)
- {
- Tcl_SetVar (gdbtk_interp, "external_editor_command",
- external_editor_command, 0);
- xfree (external_editor_command);
- external_editor_command = NULL;
- }
-
-#ifdef __CYGWIN32__
- (void) FreeConsole ();
-#endif
-
- discard_cleanups (old_chain);
-}
-
-void
-gdbtk_source_start_file (void)
-{
- /* find the gdb tcl library and source main.tcl */
-#ifdef NO_TCLPRO_DEBUGGER
- static char script[] = "\
-proc gdbtk_find_main {} {\n\
- global Paths GDBTK_LIBRARY\n\
- rename gdbtk_find_main {}\n\
- tcl_findLibrary insight 1.0 {} main.tcl GDBTK_LIBRARY GDBTKLIBRARY\n\
- set Paths(appdir) $GDBTK_LIBRARY\n\
-}\n\
-gdbtk_find_main";
-#else
- static char script[] = "\
-proc gdbtk_find_main {} {\n\
- global Paths GDBTK_LIBRARY env\n\
- rename gdbtk_find_main {}\n\
- if {[info exists env(DEBUG_STUB)]} {\n\
- source $env(DEBUG_STUB)\n\
- debugger_init\n\
- set debug_startup 1\n\
- } else {\n\
- set debug_startup 0\n\
- }\n\
- tcl_findLibrary insight 1.0 {} main.tcl GDBTK_LIBRARY GDBTK_LIBRARY\n\
- set Paths(appdir) $GDBTK_LIBRARY\n\
-}\n\
-gdbtk_find_main";
-#endif /* NO_TCLPRO_DEBUGGER */
-
- /* now enable gdbtk to parse the output from gdb */
- gdbtk_disable_fputs = 0;
-
- if (Tcl_GlobalEval (gdbtk_interp, (char *) script) != TCL_OK)
- {
- const char *msg;
-
- /* Force errorInfo to be set up propertly. */
- Tcl_AddErrorInfo (gdbtk_interp, "");
- msg = Tcl_GetVar (gdbtk_interp, "errorInfo", TCL_GLOBAL_ONLY);
-
-#ifdef _WIN32
- /* On windows, display the error using a pop-up message box.
- If GDB wasn't started from the DOS prompt, the user won't
- get to see the failure reason. */
- MessageBox (NULL, msg, NULL, MB_OK | MB_ICONERROR | MB_TASKMODAL);
- {
- struct gdb_exception e;
- e.reason = RETURN_ERROR;
- e.error = GENERIC_ERROR;
- e.message = msg;
- throw_exception (e);
- }
-#else
- /* FIXME: cagney/2002-04-17: Wonder what the lifetime of
- ``msg'' is - does it need a cleanup? */
- error ("%s", msg);
-#endif
- }
-
- /* Now source in the filename provided by the --tclcommand option.
- This is mostly used for the gdbtk testsuite... */
-
- if (gdbtk_source_filename != NULL)
- {
- char *s = "after idle source ";
- char *script = concat (s, gdbtk_source_filename, (char *) NULL);
- Tcl_Eval (gdbtk_interp, script);
- free (gdbtk_source_filename);
- free (script);
- }
-}
-
-static void
-gdbtk_init_1 (char *arg0)
-{
- argv0 = arg0;
- deprecated_init_ui_hook = NULL;
-}
-
-/* gdbtk_test is used in main.c to validate the -tclcommand option to
- gdb, which sources in a file of tcl code after idle during the
- startup procedure. */
-
-int
-gdbtk_test (char *filename)
-{
- if (access (filename, R_OK) != 0)
- return 0;
- else
- gdbtk_source_filename = xstrdup (filename);
- return 1;
-}
-
-/* Come here during initialize_all_files () */
-
-void
-_initialize_gdbtk ()
-{
- /* Current_interpreter not set yet, so we must check
- if "interpreter_p" is set to "insight" to know if
- insight is GOING to run. */
- if (strcmp (interpreter_p, "insight") == 0)
- deprecated_init_ui_hook = gdbtk_init_1;
-#ifdef __CYGWIN__
- else
- {
- DWORD ft = GetFileType (GetStdHandle (STD_INPUT_HANDLE));
-
- switch (ft)
- {
- case FILE_TYPE_DISK:
- case FILE_TYPE_CHAR:
- case FILE_TYPE_PIPE:
- break;
- default:
- AllocConsole ();
- cygwin32_attach_handle_to_fd ("/dev/conin", 0,
- GetStdHandle (STD_INPUT_HANDLE),
- 1, GENERIC_READ);
- cygwin32_attach_handle_to_fd ("/dev/conout", 1,
- GetStdHandle (STD_OUTPUT_HANDLE),
- 0, GENERIC_WRITE);
- cygwin32_attach_handle_to_fd ("/dev/conout", 2,
- GetStdHandle (STD_ERROR_HANDLE),
- 0, GENERIC_WRITE);
- break;
- }
- }
-#endif
-}
-
-static void
-tk_command (char *cmd, int from_tty)
-{
- int retval;
- char *result;
- struct cleanup *old_chain;
-
- /* Catch case of no argument, since this will make the tcl interpreter
- dump core. */
- if (cmd == NULL)
- error_no_arg ("tcl command to interpret");
-
- retval = Tcl_Eval (gdbtk_interp, cmd);
-
- result = xstrdup (gdbtk_interp->result);
-
- old_chain = make_cleanup (free, result);
-
- if (retval != TCL_OK)
- error ("%s", result);
-
- printf_unfiltered ("%s\n", result);
-
- do_cleanups (old_chain);
-}
-
-static void
-view_command (char *args, int from_tty)
-{
- char *script;
- struct cleanup *old_chain;
-
- if (args != NULL)
- {
- xasprintf (&script,
- "[lindex [ManagedWin::find SrcWin] 0] location BROWSE_TAG [gdb_loc %s]",
- args);
- old_chain = make_cleanup (xfree, script);
- if (Tcl_Eval (gdbtk_interp, script) != TCL_OK)
- {
- Tcl_Obj *obj = Tcl_GetObjResult (gdbtk_interp);
- error ("%s", Tcl_GetStringFromObj (obj, NULL));
- }
-
- do_cleanups (old_chain);
- }
- else
- error ("Argument required (location to view)");
-}
diff --git a/gdb/gdbtk/generic/gdbtk.h b/gdb/gdbtk/generic/gdbtk.h
deleted file mode 100644
index 5e2fdbb3bbb..00000000000
--- a/gdb/gdbtk/generic/gdbtk.h
+++ /dev/null
@@ -1,190 +0,0 @@
-/* Tcl/Tk interface routines header file.
- Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2003
- Free Software Foundation, Inc.
-
- Written by Stu Grossman <grossman@cygnus.com> of Cygnus Support.
-
- This file is part of GDB. It contains the public data that is shared between
- the gdbtk startup code and the gdbtk commands.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-#ifndef _GDBTK_H
-#define _GDBTK_H
-
-#ifdef _WIN32
-#define GDBTK_PATH_SEP ";"
-#else
-#define GDBTK_PATH_SEP ":"
-#endif
-
-/* Some versions (1.3.79, 1.3.81) of Linux don't support SIOCSPGRP the way
- gdbtk wants to use it... */
-#ifdef __linux__
-#undef SIOCSPGRP
-#endif
-
-/*
- * These are the version numbers for GDBTK. There is a package require
- * statement in main.tcl that checks the version. If you make an incompatible
- * change to the gdb commands, or add any new commands, be sure to bump the
- * version number both here and in main.tcl. This will save us the trouble of
- * having a version of gdb find the wrong versions of the Tcl libraries.
- */
-
-#define GDBTK_MAJOR_VERSION "1"
-#define GDBTK_MINOR_VERSION "0"
-#define GDBTK_VERSION "1.0"
-
-/*
- * These are variables that are needed in gdbtk commands.
- */
-
-/* This variable determines where memory used for disassembly is read from.
- If > 0, then disassembly comes from the exec file rather than the
- target (which might be at the other end of a slow serial link). If
- == 0 then disassembly comes from target. If < 0 disassembly is
- automatically switched to the target if it's an inferior process,
- otherwise the exec file is used. It is defined in gdbtk.c */
-
-
-extern int disassemble_from_exec;
-
-/* This variable is true when the inferior is running. Although it's
- possible to disable most input from widgets and thus prevent
- attempts to do anything while the inferior is running, any commands
- that get through - even a simple memory read - are Very Bad, and
- may cause GDB to crash or behave strangely. So, this variable
- provides an extra layer of defense. It is defined in gdbtk.c */
-
-extern int running_now;
-
-/* These two control how the GUI behaves when tracing or loading
- They are defined in gdbtk-cmds.c */
-
-extern int No_Update;
-extern int load_in_progress;
-
-/* This is the main gdbtk interpreter. It is defined and initialized
- in gdbtk.c */
-
-extern Tcl_Interp *gdbtk_interp;
-
-/*
- * This structure controls how the gdb output is fed into gdbtk_call_wrapper invoked
- * commands. See the explanation of gdbtk_fputs in gdbtk_hooks.c for more details.
- */
-
-typedef struct gdbtk_result
- {
- Tcl_Obj *obj_ptr; /* This will eventually be copied over to the
- Tcl result */
- int flags; /* Flag vector to control how the result is
- used. */
- }
-gdbtk_result;
-
-struct target_ops;
-
-/* These defines give the allowed values for the gdbtk_result.flags field. */
-
-#define GDBTK_TO_RESULT 1 /* This controls whether output from
- gdbtk_fputs goes to the command result, or
- to gdbtk_tcl_fputs. */
-#define GDBTK_MAKES_LIST 2 /* whether gdbtk_fputs adds the
- element it is outputting as a string, or
- as a separate list element. */
-#define GDBTK_IN_TCL_RESULT 4 /* Indicates that the result is already in the
- Tcl result. You can use this to preserve
- error messages from functions like
- Tcl_GetIntFromObj. You can also store the
- output of a call wrapped command directly in
- the Tcl result if you want, but beware, it will
- not then be preserved across recursive
- gdbtk_call_wrapper invocations. */
-#define GDBTK_ERROR_STARTED 8 /* This one is just used in gdbtk_fputs. If we
- see some output on stderr, we need to clear
- the result we have been accumulating, or the
- error and the previous successful output
- will get mixed, which would be confusing. */
-#define GDBTK_ERROR_ONLY 16 /* Indicates that all incoming I/O is
- to be treated as if it had arrived for gdb_stderr. This is
- used to help error_begin in utils.c. */
-
-/* This is a pointer to the gdbtk_result struct that
- we are currently filling. We use the C stack to make a stack of these
- structures for nested calls to gdbtk commands that are invoked through
- the gdbtk_call_wrapper mechanism. See that function for more details. */
-
-extern gdbtk_result *result_ptr;
-
-/* If you want to restore an old value of result_ptr whenever cleanups
- are run, pass this function to make_cleanup, along with the value
- of result_ptr you'd like to reinstate. */
-extern void gdbtk_restore_result_ptr (void *);
-
-/* GDB context identifier */
-extern int gdb_context;
-
-/* Internal flag used to tell callers of deprecated_ui_loop_hook
- whether they should detach from the target. See explanations before
- x_event and gdb_stop. */
-extern int gdbtk_force_detach;
-
-/*
- * These functions are used in all the modules of Gdbtk.
- *
- */
-
-extern int Gdbtk_Init (Tcl_Interp * interp);
-extern void gdbtk_stop_timer (void);
-extern void gdbtk_start_timer (void);
-extern void gdbtk_ignorable_warning (const char *, const char *);
-extern void gdbtk_interactive (void);
-extern int x_event (int);
-extern int gdbtk_two_elem_cmd (char *, char *);
-extern int target_is_native (struct target_ops *t);
-extern void gdbtk_fputs (const char *, struct ui_file *);
-extern struct ui_file *gdbtk_fileopen (void);
-extern struct ui_file *gdbtk_fileopenin (void);
-extern int gdbtk_disable_fputs;
-
-#ifdef _WIN32
-extern void close_bfds ();
-#endif /* _WIN32 */
-
-extern void
- TclDebug (char level, const char *fmt,...);
-
-/* A convenience macro for getting the demangled source names,
- regardless of the user's mangling style. */
-#define GDBTK_SYMBOL_SOURCE_NAME(symbol) \
- (SYMBOL_DEMANGLED_NAME (symbol) != NULL \
- ? SYMBOL_DEMANGLED_NAME (symbol) \
- : DEPRECATED_SYMBOL_NAME (symbol))
-
-
-/* gdbtk_add_hooks - add all the hooks to gdb. This will get called
- by the startup code to fill in the hooks needed by core gdb. */
-extern void gdbtk_add_hooks (void);
-
-/* Initialize Insight */
-extern void gdbtk_init (void);
-
-/* Start Insight. Insight must have already been initialized with a call
- to gdbtk_init. */
-extern void gdbtk_source_start_file (void);
-#endif /* !_GDBTK_H */
diff --git a/gdb/gdbtk/library/ChangeLog-1997 b/gdb/gdbtk/library/ChangeLog-1997
deleted file mode 100644
index 0ec4a0b0d0d..00000000000
--- a/gdb/gdbtk/library/ChangeLog-1997
+++ /dev/null
@@ -1,1487 +0,0 @@
-Wed Dec 10 13:17:21 1997 Keith Seitz <keiths@onions.cygnus.com>
-
- * src.tcl (file): Insert tracepoint dots into the source window, too.
-
- * tracedlg.tcl (build_win): Add an update to workaround a Tix/Tk bug when
- mapping the dialog under X.
-
- * console.tcl (insert): Add all errors to the end of the text widget.
- (einsert): Send errors to end of text widget, not insertion pt.
- (invoke): Send errors to end of text widget, not insertion pt.
-
- * interface.tcl (gdbtk_tcl_readline_begin): Insert message into
- command window so that the user sees messages like "Enter commands, one
- per line. Enter 'end' when finished."
-
- * actiondlg.tcl (change_other): Clear the entry on <Return>.
- Add fencepost to avoid manipulating collect list twice which
- could otherwise have undesired side effects.
- Add some validation test for typed-in entries.
- (ok): Call change_other to check the "Other" entry widget when the
- dialog is dismissed.
- (change): fix typo
-
-Mon Dec 8 15:07:51 1997 Keith Seitz <keiths@onions.cygnus.com>
-
- * tracedlg.tcl (get_data): New method which gets the data associated
- with an action.
- (add_all_actions): Use the new get_data method.
-
- * actiondlg.tcl (get_selections): Add "declaration" for i so that
- its scope is not limited to for loop.
-
-Fri Dec 5 10:01:24 1997 Keith Seitz <keiths@pizza.cygnus.com>
-
- * tracedlg.tcl (build_win): Add support for ranges of lines at which
- tracepoint should be set.
- (add_action): With ranges, use actions from first in tracepoint in the
- range.
- (ok): Set tracepoints for ranges, asking if it is ok to overwrite
- any existing ones when necessary. Dismiss the dialog first -- or else
- it could hang around forever.
- (edit): With ranges, use actions of the first tracepoint.
- TraceDlg::Lines: Renamed from TraceDlg::Line.
- TraceDlg::New: New protected variable (indicates if there are any new
- tracepoints being set with this dialog).
- TraceDlg::Exists: New protected variable (indicates if there are any
- existing tracepoints that may be overwritten -- so ask the user first).
-
- * src.tcl (fill_files): Use gdb_find_file to test for the existence
- of a file, not "file exists".
- (do_popup): Filter the selection a little. If the selection is
- multi-line selection, enable the tracepoint range option. Don't
- display "add to watch" for EVERYTHING!
- (validBPLine): Valid lines can have images on them, too.
- (bp_line): Fallout of above: check if breakpoint exists before
- deciding whether to clear it or set it.
- (getVariable): Sllow LINE to be passed, so others can filter lines, too.
- (set_tracepoint): Pass TraceDlg a list of lines -- only one line in this
- case.
- (tracepoint_range): New function to set tracepoint ranges.
- (file): Use gdb_find_file to get the real filename.
-
-Wed Nov 26 15:02:43 1997 Keith Seitz <keiths@onions.cygnus.com>
-
- * balloon.tcl, gettext.tcl: Remove obsolete files.
-
- * console.tcl (invoke): Remove debug line.
-
- * src.tcl (update): Remove debug line.
-
- * prefs.tcl (pref_set_defaults): Turn debug mode off by deafult.
-
-Wed Nov 26 11:30:49 1997 Keith Seitz <keiths@onions.cygnus.com>
-
- * main.tcl: Initialize gdbtk_state(readline).
-
- * console.tcl (invoke): Check if we are in readline mode, so that
- we wait for the user's input and set a global with the result.
- (activate): Add prompt argument for readline's prompt.
- (setprompt): Add prompt argument for readline's prompt.
-
- * interface.tcl (gdbtk_tcl_readline): hack to get readline working
-
- * lots: Merge with foundry's 11/18/97 build.
-
- * console.tcl (setprompt): Get prompt from gdb.
-
- * prefs.tcl (pref_set_defaults): Add tracepoint defaults.
-
- * interface.tcl (gdbtk_tcl_tracepoint): New function which mimicks
- gdbtk_tcl_breakpoint.
-
- * src.tcl (constructor): Set default behavior of left click. Make
- a tracepoint dot, too.
- (fill_files): "New" function: ripped out of "location". It fills the
- 'files' combo box on the bottom of the source window.
- (location): Use fill_files to fill the files combo box.
- (do_bp): Add support for tracepoints.
- (bp_line): Add support for tracepoints.
- (set_tracepoint): New function to set a tracepoint on a given line.
- (config_win): Add "Set tracepoint here" to right-click menu.
-
- * actiondlg.tcl: New file to help with tracepoint data collection actions.
-
- * tracedlg.tcl: New file to help with tracepoints.
-
-Mon Nov 17 16:49:56 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * src.tcl (config_win): Remove stray character.
-
-Mon Nov 17 16:04:08 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * main.tcl (startup code: Use the first element from the
- vmake-exelist list.
- (exe_name): Likewise.
- (gdbtk_tcl_preloop): Quote file name passed to file.
- (download): Quote file name passed to load.
-
-Sun Nov 16 18:21:57 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * bp.tcl (build_win): Change headers to be raised.
- Change resizing so that the bp grid doesn't change
- size and is always in the upper left corner. Scrollbars
- will appear if the window is shrunk too small.
- (bp_add): Set checkbutton color differently if not
- on Windows.
-
- * manage.tcl (manage_init): About title should only
- have Foundry in it if we are running Foundry.
-
-Fri Nov 14 11:15:29 1997 Jeff Holcomb <jeffh@cygnus.com>
-
- * manage.tcl (manage_init): About window title is now "About
- Cygnus Foundry".
-
- * toolbar.tcl (create_menu_items): Changed "About Foundry
- Debugger..." menu option to "About Cygnus Foundry...".
-
-Fri Nov 14 00:00:42 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * memory.tcl (toggle_enabled): Toggle the background
- color when Auto Update is changed.
-
- * download_pref.tcl (save): New method. Save new
- defaults.
-
- * pref.tcl (build_win): Don't delete subwidget.
- (save): New method.
-
- * manage.tcl (manage_init): Change preferences title.
-
- * prefs.tcl (pref_set_defaults): Define gdb/advanced.
- Used for testing advanced features.
-
- * src.tcl (build_win): Set min size for top pane.
- (mode): Set minimum size for pane2 when needed.
-
- * toolbar.tcl (create_menu_items): Underline the
- W in "Web", not the "e".
-
-Thu Nov 13 16:07:53 1997 Jeff Holcomb <jeffh@cygnus.com>
-
- * download.tcl (done): Update window and show the window for
- at least 3 seconds.
- (constructor): Initialize start_time and last_num.
-
-Thu Nov 13 18:17:07 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * main.tcl (ide_run_server): Call run_executable.
- (run_executable): New procedure, mostly from old ide_run_server.
- If ! GDBTK_IDE, just execute a run command. In the case where
- we've already downloaded, don't bother to do the run command after
- idle. If downloading is not forced, ask whether we should do it.
- * src.tcl (config_win): Call run_executable, not gdb_cmd run.
- * srcbar.tcl (_set_run): Likewise.
- * toolbar.tcl (create_menu_items): Likewise.
-
- * main.tcl: Initialize gdb_exe_set. If IDE, arrange to receive
- process-ended events.
- (gdbtk_tcl_preloop): Don't try to read the file if it doesn't
- exist.
- (download): Don't try to download the file if it doesn't exist.
- Set gdb_download_mtime.
- (exe_name): Just call set_exe_name.
- (set_exe_name): New procedure. Like old exe_name, but call
- gdb_clear_file before running gdb file command, set gdb_exe_set,
- and run gdb_idle_hook.
- (receive_process_ended): New procedure.
-
-Thu Nov 13 13:35:32 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * prefs.tcl (pref_set_defaults): Set debug off by default.
-
- * src.tcl (config_win): Bind Ctrl+P and Ctrl+D.
- (update_title): Change window titlebar.
-
- * srcbar.tcl (_set_run): Change balloon help for
- stop and run icons.
- (create_menu_items): Add accelerator for Print Source.
-
- * toolbar.tcl (create_buttons): Change balloon help for
- project icon.
- (create_menu_items): Change access keys. Add accelerator
- for Download.
-
-Thu Nov 13 10:47:04 1997 Jeff Holcomb <jeffh@cygnus.com>
-
- * download.tcl (constructor): Fix text and button layout.
- Don't allow resizing.
-
-Wed Nov 12 16:59:17 1997 Jeff Holcomb <jeffh@cygnus.com>
-
- * download.tcl (constructor): Patch from Ian to redo the
- download window and also cancel support.
- (update): Ditto.
- (done): Ditto.
- (cancel): New method to handle canceling the download.
- (download_hash): Cancel support.
-
-Wed Nov 12 13:11:20 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * memory.tcl (build_win): Change "Address" to "Addresses"
- on menu and add separator.
-
-Tue Nov 11 11:00:25 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * download_pref.tcl (cancel): Must reset combobox
- because dialog no longer gets deleted.
-
-Tue Nov 11 15:40:36 1997 Tom Tromey <tromey@cygnus.com>
-
- * toolbar.tcl (create_menu_items): Underline "W", not "C", in
- "Cygnus on the Web".
-
-Tue Nov 11 11:00:25 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * variables.tcl (edit): Disable menus when in editing mode.
-
-Tue Nov 11 02:00:25 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * variables.tcl (selectionChanged): When selection changes,
- cancel any editing in progress.
- (build_win): Set background in text styles.
- (edit): Set background colors.
- (UnEdit): Clear selection when done.
-
-Mon Nov 10 12:22:00 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * variables.tcl (build_win): Set background color.
-
-Mon Nov 10 05:30:00 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * about.tcl (build_win): Bind button one to close
- the window.
-
- * tclIndex: Rebuilt.
-
-Mon Nov 10 03:00:00 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * download_pref.tcl (build_win): Fix reading of initial
- baud rate.
-
- * download.tcl (Download): Call keep_raised.
-
- * main.tcl (ide_do_run): Catch GDB commands.
- (ide_run_server): Catch GDB commands.
- (ide_do_run): Don't set gdb_download_complete to 0.
- We don't need further downloads unless executable changes
- or Download is selected from the menubar.
- (keep_raised): Keep a window on top.
-
- * src.tcl (config_win): Catch GDB commands.
-
- * toolbar.tcl (create_menu_items): Catch GDB commands.
- (create_menu_items): Remove automatic step.
-
- * srcbar.tcl (_set_run): Catch GDB commands.
-
- * stack.tcl (build_win): Change background color.
-
- * bp.tcl: Change background color.
- (destructor): Remove breakpoint change hook.
- (bp_type): Fix problem with toggling temp to normal bps.
- (build_win): Add popup menu.
-
- * interface.tcl (gdbtk_tcl_query): Change title and type.
-
-Mon Nov 10 00:26:25 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * pref.tcl (build_win): OK button wasn't working.
-
- * main.tcl: Rework all the "automatic" downloading stuff so
- it doesn't download and run when only the preferences are
- being displayed.
-
- * src.tcl (open_src): Callback from IDE that opens
- a source window when the bug is clicked on. Starts
- up automatic download if necessary.
-
- * tclIndex: Rebuilt.
-
- * images2/bp.gif, stack.gif, up,gif, down.gif, bottom.gif:
- Updated icons.
-
-Sun Nov 9 19:30:33 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * main.tcl (gdbtk_tcl_preloop): Remove uneeded if statement.
- Remove calls to manage get_state.
-
- * manage.tcl (manage_get_state): Remove.
- (manage_init): Add save state to several windows.
- (manage_create): Use ide_property instead of prefs to find window
- geometry.
- (manage_delete): Restructure to fix several bugs.
- (manage_save): Use ide_property instead of prefs. Don't
- call pref_save.
- (manage_register_defaults): Remove calls to manage_get_state.
-
- * tclIndex: Rebuilt.
-
-Sun Nov 9 16:34:44 1997 Tom Tromey <tromey@cygnus.com>
-
- * pref.tcl (build_win): Removed View page.
-
- * toolbar.tcl (create_menu_items): Debugger -> "Foundry Debugger";
- Help menu now parallels vmake.
- * manage.tcl (manage_init): GDBTK -> "Foundry Debugger".
-
-Sun Nov 9 18:24:18 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * memory.tcl (build_win): Use a single menu, remove ``Hide
- menubar'' entry, add ^U binding.
- * manage.tcl (manage_init): Change name of memory window from
- ``Memory Dump'' to ``Memory''.
-
- * srcbar.tcl (create_buttons): Remove toggle update button.
-
- * src.tcl (update_title): Don't use colon if there is no file
- name.
-
- * main.tcl: If GDBTK_IDE, initialize gdb_download_complete.
- (gdbtk_tcl_preloop): If GDBTK_IDE, call download.
- (ide_run_server): Don't run if we already have a run request. If
- download is complete, run program as an idle callback. Otherwise,
- wait until the download is complete before running the program.
- (ide_do_run): New procedure to support ide_run_server.
- (download): Don't run program. Set gdb_download_complete.
-
- * src.tcl (name): Give an error if the file does not exist.
- (location): Only add files that exist to the file name combobox.
-
-Sun Nov 9 11:09:39 1997 Tom Tromey <tromey@cygnus.com>
-
- * src.tcl (name): Use better error message.
-
- * locals.tcl (build_win): New method.
- * watch.tcl (build_win): Create menu. Watch -> "Add Watch".
- (Menu): New instance variable.
- (selectionChanged): New method.
- (postMenu): "Stop Watching" -> Remove.
- * variables.tcl (build_win): Set -ignoreinvoke on Tree widget, and
- set -command to run editEntry method. Don't install <Double-1>
- binding. Put headers on Tree widget. Run selectionChanged
- method.
- (editEntry): Renamed. Now takes entry name as argument.
- (populate): Don't set -state disabled on new items.
- (getSelection): New method.
- (selectionChanged): New method.
- (build_menu_helper): New method.
- (postMenu): View->Format.
- (build_win): Likewise.
-
- * variables.tcl (editXY): Only edit if entry is not empty.
-
- * srcbar.tcl (create_menu_items): Edit -> Open.
- (create_buttons): Likewise.
-
-Thu Nov 6 11:00:41 1997 Tom Tromey <tromey@cygnus.com>
-
- * manage.tcl (manage_delete): Special-case deletion of pref window.
- (manage_create): Don't special-case deletion of pref window.
-
-Thu Nov 6 13:57:32 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * manage.tcl (manage_get_state): Return an empty string for a
- withdrawn window and for the preferences window.
-
- * main.tcl (exe_name): Don't do anything if the executable name
- has not actually changed.
-
-Wed Nov 5 23:08:00 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * main.tcl (download): Always specify exact filename
- to load.
-
-Wed Nov 5 00:31:53 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * manage.tcl (manage_delete): Only delete source window if
- user answers yes to query.
-
- * bp.tcl: Rewrite to include pulldown menu and new look.
-
- * register.tcl: Rewrite to include pulldown menu and new look.
-
- * stack.tcl: Open initial size wide enough to show all text.
-
- * src.tcl: Modified popup window. Remove option to open
- multiple source windows because the IDE window code doesn't
- work with it.
-
- * srcbar.tcl (_set_run): Change balloon message for Run.
-
- * variables.tcl, watch.tcl: Use fixed font.
-
- * toolbar.tcl (create_menu_items): Handle Close Debugger correctly.
-
- * mem_pref.tcl: Put focus and grab on window.
-
- * memory.tcl: Balloon message change.
-
-Mon Nov 3 11:04:44 1997 Tom Tromey <tromey@cygnus.com>
-
- * main.tcl (gdbtk_tcl_preloop): Look at main even if IDE running.
- (ide_run_server): Open src window.
-
- * manage.tcl (manage_init): Don't recreate initial windows when
- running under IDE.
-
-Fri Oct 31 00:00:04 1997 Tom Tromey <tromey@cygnus.com>
-
- * pref.tcl (cancel): Use manage delete.
- * toolbar.tcl (create_menu_items): Don't register debugger
- preference window.
- * manage.tcl (manage_register_defaults): Use idewindow, not
- idewindow_proc.
- (manage_delete): Don't deregister preference window.
- (manage): Added find, create_closed methods.
- (manage_create): Added visibility argument; changed all callers.
- Special case destruction of pref window.
- * main.tcl: IDE window callback proc is "manage find". Register
- debugger preference window. Create closed src and pref windows
- initially.
- (gdbtk_tcl_preloop): Don't create source window in IDE mode.
-
- * src.tcl (trace_variable): New method.
- (constructor): Use variable traces to track target/exe changes.
- (destructor): Remove variable traces.
-
-Thu Oct 30 12:50:28 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * mem_pref.tcl: Change buttons to OK/Cancel/Apply.
- Minor cleanup.
-
- * memory.tcl: New look. Added menubar.
-
-Tue Oct 28 23:03:00 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * toolbar.tcl (create_buttons): Clean up balloon help
- for buttons.
- (create_menu_items): Move print menu items to srcbar.tcl.
- Cleanup labels.
-
- * srcbar.tcl (create_menu_items): Add print menu items.
- (create_buttons): Clean up balloon help for buttons.
-
-Tue Oct 28 17:26:15 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * toolbar.tcl (create_menu_items): Add print menu items.
- (print): New function. Calls the proper print routine.
-
- * src.tcl (print): New function. Dump the contents
- of the text widget to a printer.
-
-Tue Oct 28 01:06:15 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * toolbar.tcl (create_menu_items): Add new
- preferences menu code.
-
- * pref.tcl (build_win): Remove all old ppreferences.
- Add Connection and View preferences.
- (cancel): New function. Restore previous values and
- quit.
-
- * manage.tcl (manage_delete): Unregister preferences
- on exit.
-
- * src.tcl (constructor): Add sizebox under Windows.
-
- * download.tcl (constructor): Remove shortcuts on buttons.
- Put focus on "OK" button.
-
- * download_pref.tcl (cancel): New function. Restores
- previous values.
-
-Tue Oct 21 15:28:29 1997 Tom Tromey <tromey@cygnus.com>
-
- * main.tcl: Main window now named "Foundry Debugger".
-
-Fri Oct 24 14:03:00 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * manage.tcl (manage_menu): Deleted.
- (manage_delete): Notify IDE when windows are deleted.
- (manage_raise): New function.
- (manage_create): Notify IDE when a window is created.
-
- * download.tcl (constructor): Put focus on download
- window.
-
- * toolbar.tcl (create_menu_items): Make "Window" menu
- and IDE managed-menu, but don't put anything in it.
-
-Fri Oct 24 12:28:43 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * toolbar.tcl (create_menu_items): Add View menu.
-
- * src.tcl (config_win): Add accelerators for new View
- menu.
-
-Wed Oct 22 21:30:52 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * download.tcl (Download): Make window local modal.
- Raise it to top.
-
- * srcbar.tcl (create_buttons): Change border size on
- address and line labels. Change balloon help. Remove
- vertical line.
-
-Mon Oct 20 10:12:23 1997 Tom Tromey <tromey@cygnus.com>
-
- * toolbar.tcl (create_buttons): vmake window now named "Foundry
- Project".
-
-Mon Oct 13 19:02:33 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * bp.tcl (bp_modify): Change color of checkbuttons.
-
- * download.tcl (done): Write "DONE" on progress meters.
-
-Thu Oct 9 14:33:21 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * main.tcl: Call ide_window_register restorer.
-
-Thu Oct 9 12:46:25 1997 Tom Tromey <tromey@cygnus.com>
-
- * src.tcl (updateBalloon): Changed name of balloon variable.
- (showBalloon): Likewise. Use new "balloon show" command.
- (SrcBalloon): Removed.
- (TimeOut): Default is 1000 (1 second).
-
-Wed Oct 1 11:33:36 1997 Tom Tromey <tromey@cygnus.com>
-
- * main.tcl: Use "manage get_state" as window saver.
-
- * manage.tcl (manage): Added "restore", "get_state" options.
- (manage_restore): New proc.
- (manage_get_state): Likewise.
- (manage_register_defaults): Use "manage get_state" as window
- saver.
-
-Sun Sep 28 04:20:00 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * bp.tcl: Clean up the spacing to make the widget look better.
-
- * download_pref.tcl: Show the initial baud rate correctly.
-
- * download.tcl: Cleanup correctly when deleted.
-
- * main.tcl (gdb_tcl_preloop): Set baud rate.
- (ide_run_server): Delay download 1 second.
- (demo_it): Do gdb "next" commands every 2 seconds.
-
- * manage.tcl (manage_create): Withdraw window immediately then
- deiconify it when done.
-
- * prefs.tcl (pref_set_defaults): Don't define stack bg color.
-
- * register.tcl: Withdraw window immediately so we don't have
- to watch it slowly draw. Make it look more like memory window.
-
- * src.tcl: Fix major bug where source window got lost when
- the source file was not found. Reconfigures more smoothly.
-
- * srcbar.tcl (create_menu_items): Comment out "Close Debugger"
- menu item because it was broken.
-
- * stack.tcl: Use the same background color as the other windows.
-
- * toolbar.tcl: Add "Automatic Step" menu item.
-
-Fri Sep 26 21:10:11 1997 Keith Seitz <keiths@pizza.cygnus.com>
-
- * download.tcl (done): display bytes loaded as an integer.
-
-Fri Sep 26 13:09:47 1997 Tom Tromey <tromey@cygnus.com>
-
- * images2/edit.gif: Replaced.
-
-Fri Sep 26 00:42:00 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * main.tcl (ide_run_server): Just call download.
- (download): First set baud rate then target. Then, depending
- on preferences set a breakpoint at 'main' and 'exit' and run.
- (set_baud): New function.
-
- * download_pref.tcl (build_win) Add checkbuttons for "Run until
- 'main'" and "Set breakpoint at 'exit'.
- (change_baud): Set preference when baud changes.
-
- * pref.tcl (reconfig): Correct problem with download options.
-
- * prefs.tcl (pref_set_defaults): Define gdb/load/main,
- gdb/load/exit, and gdb/load/baud.
-
- * src.tcl (location): Fix a problem where the browse tag was
- sometimes not deleted.
-
- * manage.tcl: Add a window title for Download Options.
-
-Thu Sep 25 15:39:00 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * download_pref.tcl: New file. Creates a download options dialog.
-
- * manage.tcl: Add download prefs window to list.
-
- * toolbar.tcl: Add Download preferences to menu.
-
- * pref.tcl: Add Download to tab notebook preferences.
-
- * src.tcl: Set activebackground on popup to indicate color
- of the breakpoint dot that will be set.
-
-Thu Sep 25 12:36:00 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * download.tcl (done): Make sure all indicators show download
- completed, even if we weren't properly notified.
-
- * manage.tcl: Better support for windows that want to set
- their own titles.
-
- * src.tcl (update_title): New function. Sets titlebar
- to indicate current filename, and under IDE, executable and
- target.
-
- * images2/reg.gif: Updated image.
-
-Thu Sep 25 08:58:44 1997 Keith Seitz <keiths@onions.cygnus.com>
-
- * src.tcl (config_win): don't focus src window on Enter events
-
-Thu Sep 25 03:11:00 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * main.tcl (ide_run_server): Set target and download automatically.
- (download): Open a download window.
-
- * download.tcl: New file. Implements a download window.
-
- * manage.tcl (manage_init): Add download window.
- (manage_create): If there is no title, don't try to set one and
- don't try to set geometry.
-
- * registers.tcl: Make it look more like memory window.
-
- * toolbar.tcl, floatbar.tcl, srcbar.tcl: Update look of menus and toolbars
- to be closer to prototype.
-
- * Makefile: Add download.tcl.
-
- * tclIndex: Rebuilt.
-
- * images/memory.gif: Update.
-
- * images/bp.gif: New file. Breakpoint icon.
-
-Wed Sep 24 07:43:47 1997 Keith Seitz <keiths@onions.cygnus.com>
-
- * variables.tcl (VariableWin::build_win): add double-click binding to edit
- (editXY): new method to support above
-
- * prefs.tcl (pref_set_defaults): add register window pref for highlight color
-
- * register.tcl (RegWin::constructor): set highlight and normal fg
- (build_win): build window using grid geometry manager, not grid widget
- (dimensions): new method
- (fixLength): new method
- (but3): use "Menu" (protected data)
- (edit): use entry to edit values
- (acceptEdit): new method
- (unedit): new method
- (update): change to use new grid layout and change highlighting
- (reconfig): destroy scrolled window, too
- ScrolledWin: new protected data
- Menu: new protected data
- Editing: new protected data
-
-Tue Sep 23 15:15:22 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * main.tcl: If GDBTK_IDE, withdraw . before making any calls
- across the IDE backplane.
- * manage.tcl (manage_init): If using a floating toolbar, and
- GDBTK_IDE, deiconify . to undo the withdrawal.
-
-Tue Sep 23 01:31:00 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * main.tcl: Reorder calls to pref init and standard_look_and_feel.
-
- * global_pref.tcl: Change font requester to modify both src-font
- and global.fixed. Change to be compatible with latest libide font code.
-
- * prefs.tcl: Changes to get working with latest libide font code.
-
-Mon Sep 22 15:16:00 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * memory.tcl: Add editing. Remove debugging lines.
- Fix problems with resizing.
-
- * mem_pref.tcl: Remove debugging line.
-
-Fri Sep 19 08:22:25 1997 Keith Seitz <keiths@onions.cygnus.com>
-
- * variables.tcl (build_win): use preferences
- (getAllClassMembers): new method
- (getPath): update to support C++
-
- * watch.tcl (build_win): augment parent class' build_win instead of replacing it
-
- * stack.tcl (build_win): use preferences
- (update): catch gdb_loc in case source window is not open yet
-
- * prefs.tcl (pref_set_defaults): add new defaults for all previously
- hard-coded fonts and colors
-
- * global_pref.tcl (build_win): use preferences
-
- * console.tcl (Console::constructor): use preferences
-
- * bp.tcl (bp_add): use preferences
- (bp_modify): use preferences
-
-
- * src.tcl (SrcWin::constructor): use preferences
- (build_win): use preferences
- (config_win): use preferences, bind <Enter> to focus source window textbox
- so that our keypresses always work
- (SrcBalloon): new protected variable
- (TimeOut): new common variable
-
-Wed Sep 17 13:54:29 1997 Tom Tromey <tromey@cygnus.com>
-
- * toolbar.tcl (build_win): Use standard_toolbar.
-
-Wed Sep 17 13:52:00 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * src.tcl (config_win): Set bg color back to default.
-
-Tue Sep 16 23:10:00 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * images2/*: Delete unused icons.
-
-Tue Sep 16 21:30:40 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * bp.tcl (bp_add): Add some padding to space things
- out more. Anchor labels to the right side.
-
- * src.tcl: Fix problem where breakpoints were disappearing
- when files changed.
-
-Tue Sep 16 17:45:05 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * manage.tcl: Change manage_create and manage_open to accept
- a variable number of args. Add mem and mempref window types.
- Fix pref save call.
-
- * memory.tcl: New file. Implements a memory dump window.
- Currently read-only.
-
- * mem_pref.tcl: New file. Implements options dialog for
- memory dump window.
-
- * pref.tcl, toolbar_pref.tcl, register.tcl, src_pref.tcl,
- global_pref.tcl, about.tcl: Make "attach" a public config
- variable.
-
- * main.tcl: Use standard_look_and_feel.
-
- * Makefile, tclIndex: Rebuilt.
-
- * images/check.gif: A check mark image.
-
- * images/stop.gif: Fix transparency.
-
-Tue Sep 16 08:13:03 1997 Keith Seitz <keiths@onions.cygnus.com>
-
- * src.tcl (getVariable): fix off by one error when a breakpoint
- is set at a line
- (hasBreakpoint): new method
- (SrcWin): add idle hook for source balloons
- (updateBalloon): new method
- (showBalloon): use register_balloon
- (register_balloon): new method
-
-Tue Sep 16 05:55:31 1997 Keith Seitz <keiths@onions.cygnus.com>
-
- * watch.tcl (add): use a little more robust (if more obscure) method
- of determining validity of a variable name
- (label): translate % to $ in names
-
- * variables.tcl (Variable::setType): allow for convenience variables
- (Variable::isConvenience): new method
- (Variable::displayHex): allow for convenience variables
- (VariableWin::edit): do not eval $data when editing (for conv. vars)
- (VariableWin::postMenu): use virtual method label to title popup
-
-Fri Sep 12 12:17:13 1997 Keith Seitz <keiths@onions.cygnus.com>
-
- * variables.tcl (Variable::value): when no display style specified,
- choose some reasonable default for the given type
-
- * src.tcl (config_win): ad bindings to support variable balloons in source mode
- (getVariable): new method
- (cancelMotion): new method
- (motion): new method
- (showBalloon): new method
- timeoutID: new protected variable
- TimeOut: new protected variable
-
-Fri Sep 12 05:47:56 1997 Keith Seitz <keiths@onions.cygnus.com>
-
- * variables.tcl (getLocals): return empty list when no locals present.
-
-Thu Sep 11 14:13:19 1997 Keith Seitz <keiths@onions.cygnus.com>
-
- * variables.tcl (VariableWin::build_win): change popup construction
- (VariableWin::postMenu): redo menu layout to use dynamic idices of
- panes
- (VariableWin::edit): new method
- (VariableWin::UnEdit): new method
- (VariableWin::changeValue): new method
- (VariableWin::getPath): handle unamed unions/structs and arrays more
- intelligently
- VariableWin::Editing: new protected variable
- VariableWin::EditEntry: new protected variable
- (Variable::isOpenable): make sure we can open unions
- (Variable::isUnamed): new method
- (Variable::isUnion): new method
- (Variable::setType): handle unions and unamed structs/unions better
- (Variable::displayHex): unions, structs only display in hex
- (Variable::isArray): new method
- (Variable::isEnum): new method
- (Variable::isEditable): new method
- (Variable::value): enums now show symbol values, too. Analogous to char
- and char*.
-
- * watch.tcl (WatchWin::build_win): change popup construction
- (WatchWin::postMenu): redo menu layout to use dynamic indices of panes
-
-
-Wed Sep 10 20:44:12 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * manage.tcl (manage_register_defaults): Rename from
- manage_register_default. Take a list of windows.
- (manage_menu): Invoke manage_register_defaults once as an idle
- callback, rather than invoking manage_register_default in many
- different idle callbacks.
-
-Wed Sep 10 00:49:23 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * src.tcl (edit): Don't start editor if we're not
- debugging anything.
-
- * main.tcl: Keep correct colorscheme for windows.
-
-Mon Sep 8 12:10:26 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * manage.tcl (manage_restart): Only restart toolbar once.
-
- * global_pref.tcl: Minor fix.
-
- * images2/vmake.gif: Fix transparency.
-
-Mon Sep 8 13:05:11 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * interface.tcl (gdbtk_tcl_query): Use tk_messageBox rather than
- tk_dialog.
-
- * main.tcl: Register check and exit handlers using new commands
- provided by gdbtk.
-
-Mon Sep 8 03:01:25 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * global_pref.tcl (build_win): Some font fixes.
-
-Mon Sep 8 02:25:17 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * src.tcl: Make disabled breakpoints black.
- Make comboboxes only use scrollbars when needed.
-
- * interface.tcl (gdbtk_tcl_breakpoint): Change to support
- changes in gdbtk.c. Supply breakpoint number to hooks.
-
- * manage.tcl: Add breakpoint window. Add support for
- dynamically attaching/detaching toolbars.
-
- * bp.tcl: New file. Breakpoint window.
-
- * main.tcl: Change palette for debugging.
-
- * pref.tcl: New file. Preferences dialog.
-
- * floatbar.tcl: Add target and download buttons.
- Add spacing.
-
- * srcbar.tcl, toolbar.tcl: Change to use flat icons. Work with
- floating toolbar if requested.
-
- * prefs.tcl: Define new preferences to force toolbar
- to float or be attached to the source windows.
-
- * global_pref.tcl: Remove icon requester.
-
- * toolbar_pref.tcl: Add icon combobox. Add checkbuttons
- for forcing toolbar to either float or be attached to src window.
-
- * Makefile: Add bp.tcl
-
- * images/*: Fix transparency and add new icons.
-
- * images2/*: Add flat icons.
-
-Fri Sep 5 20:24:07 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * main.tcl: Register an exit handler when using the IDE.
-
-Thu Sep 4 11:47:38 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * ALL: Change preferences to use new preferences.
- Change "dbug" calls to "debug".
-
- * pref.tcl: New file. Local preferences read/write.
-
- * gettext.tcl, debug.tcl, balloon.tcl: Delete. Use
- versions from libide instead.
-
-Wed Sep 3 09:20:13 1997 Tom Tromey <tromey@cygnus.com>
-
- * main.tcl (add): Pass idewindow_no_state to idewindow_proc.
- * manage.tcl (manage_register_default): Pass idewindow_no_state to
- idewindow_proc.
-
-Mon Aug 25 05:59:01 1997 Martin M. Hunt <hunt@pern.cygnus.com>
-
- * images2/{finished.gif, finishedu.gif, nextd.gif nextu.gif,
- stepd.gif, stepu.gif}: Use icons with straight brackets
- instead of slanted.
-
- * prefs.tcl (pref_set_defaults): Set default debugMode to 0.
-
- * register.tcl (build_win): Change font to fixed and bg to white.
-
- * src.tcl: Change all references to fonts to "src-font".
-
- * global_pref.tcl: Change font requester to do src-font.
-
- * srcbar.tcl: Change address and line labels to use
- src-font and be sunken.
-
- * stack.tcl: Chnage bg to white and fonr to src-font.
-
-Mon Aug 25 03:06:35 1997 Keith Seitz <keiths@pizza.cygnus.com>
-
- * src.tcl: (set_status) check if inferior is running first, and reset
- message for status window if it is not.
-
-
-Mon Aug 25 00:28:39 1997 Martin M. Hunt <hunt@pern.cygnus.com>
-
- * srcbar.tcl: Change stack images to be consistent with others.
-
- * images2/{upu.gif,upd.gif,bottomd.gif,bottomu.gif,downu.gif,
- downd.gif}: New stack images.
-
- * images2/edit[ud].gif: Correct quantization and transparency.
-
- * manage.tcl (manage_delete): Kill gdb when all source windows
- are deleted.
- (manage_create): Only add IDE entries on the first source window.
-
- * src.tcl (do_popup): Don't map window if already mapped. Fixes
- problem with tk_popup. Change menu items.
-
-Mon Aug 25 00:24:43 1997 Keith Seitz <keiths@pizza.cygnus.com>
-
- * src.tcl: (set_status) change to using gdb_target_has_execution to
- determine if the target is running
-
-Sun Aug 24 23:02:19 1997 Tom Tromey <tromey@cygnus.com>
-
- * toolbar.tcl (build_win): Make sure object is deleted when window
- is destroyed.
- (destructor): Don't destroy containing widget; just us.
-
- * srcbar.tcl (create_menu_items): Added Exit item to menu.
-
- * src.tcl (build_win): Use grid, not packer, to lay out main
- window.
- (mode): Pack new text widget into pane; don't repack the pane
- itself.
-
-Sun Aug 24 22:06:30 1997 Keith Seitz <keiths@pizza.cygnus.com>
-
- * varialbes.tcl: (build_win) set hlist font to 'tix option get
- fixed_font', change selectBackground to Hlist background, select-
- BorderWidth to 0, selectForeground to black. Use tk_popup instead of
- tixPopup widget.
- (postMenu) make necessary tk_popup changes, make sure functions are
- only allowed to be displayed in hex.
- (isFunction) new method
- (displayHex) functions only displayable as hex
- (value) extract the address of functions for value
- * watch.tcl: (constructor) remove popup menu customization
- (build_win) change from tixPopup to tk_popup, hack the
- hlist options to use the correct font, etc as in variables.tcl,
- (validateEntry) always erase the contents of the entry
- (postMenu) make all changes to use tk_popup and move the "Stop
- watching" menu addition here
- (label) make sure that we use "foo.bar" and "foo->bar" correctly
- (add) fix typo preventing recognition of variables already being
- watched
-
-Sun Aug 24 18:49:16 1997 Martin M. Hunt <hunt@pern.cygnus.com>
-
- * console.tcl (invoke): Don't display error messages in console window.
- (constructor): Enable cut-and-paste. Fix intermittant bug.
-
- * main.tcl (gdbtk_tcl_preloop): Don't automatically do anything
- but issue the file command.
- (download): Issue load command. Called when icon is selected.
- (set_target): Issue target command. Called when target
- icon is selected.
-
- * srcbar.tcl: Add target and download buttons to toolbar.
-
-Sun Aug 24 20:30:41 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * main.tcl (gdbtk_tcl_preloop): If GDBTK_IDE, then automatically
- set file and target based on properties. If using the simulator,
- load the executable. Catch and ignore errors from setting the
- source window to show main.
-
-Sun Aug 24 14:39:23 1997 Tom Tromey <tromey@cygnus.com>
-
- * src.tcl (constructor): Don't set `editor'.
- (location): Never update external editor.
- (edit): Don't set `editor'.
- (editor): Removed instance variable.
-
- * images2/stepiu.gif, images2/stepid.gif, images2/nextiu.gif,
- images2/nextid.gif: Installed new versions.
-
- * srcbar.tcl (_toggle_updates): Pass $updatevalue to
- updatecommand.
- (destructor): Implemented.
- (_set_stepi): New method.
- (displaymode): Run _set_stepi when changed.
- (updatevalue): Global state stored in global array.
- (create_buttons): Create stepi, nexti buttons. Run _set_stepi.
- (_load_src_images): Create stepi, nexti icons.
-
- * images2/stepiu.gif, images2/stepid.gif, images2/nextiu.gif,
- images2/nextid.gif: New images.
- (create_buttons): Likewise.
-
- * src.tcl (toggle_updates): Use $value, not $a.
-
- * src.tcl (mode): Don't change commands on (nonexistent) step/next
- buttons.
-
- * toolbar.tcl (create_buttons): Added watch button.
- (_load_images): Create watch images.
- * images2/watchd.gif, images2/watchu.gif: New files.
- * images2/varsd.gif, images2/varsu.gif: Changed.
-
- * images2/*: Removed old images, added many new images.
-
- * prefs.tcl (pref_set_defaults): Default images are in images2
- directory.
- * src.tcl (build_win): Make a GDBSrcBar.
- (location): address and line information now in toolbar.
- (mode): Set -displaymode on toolbar.
- (update): Set -running on toolbar.
- (busy): Likewise.
- (edit): Now a method, not a proc.
- (toggle_updates): Added "value" argument.
- * Makefile (TCL): Added srcbar.tcl, floatbar.tcl.
- * toolbar.tcl (create_buttons): New method.
- (create_menu_items): Likewise.
- (build_win): Run create_menu_items and create_buttons. Move most
- of body into these methods. Removed Exit command from File menu.
- (_loaded_images): New common variable.
- (_load_images): New method.
- (create_buttons): Run it.
- (create_menu_items): Removed Tools menu.
- (configure): Renamed from config.
- * srcbar.tcl: New file. Implements toolbar attached to source
- window.
- * floatbar.tcl: New file. Implements floating toolbar.
- * manage.tcl (manage_init): toolbar-type is GDBFloatBar.
- (manage_init): Don't create toolbar if running under IDE.
-
-Sun Aug 24 13:05:22 1997 Martin M. Hunt <hunt@pern.cygnus.com>
-
- * manage.tcl (manage_init): Remove idemenuname from
- the _manage_objects array; it was redundant.
- (manage_create): Stop notifying IDE about new transient
- windows.
-
-Sun Aug 24 01:07:29 1997 Tom Tromey <tromey@cygnus.com>
-
- * about.tcl, console.tcl, global_pref.tcl, prefs.tcl,
- register.tcl, src.tcl, src_pref.tcl, stack.tcl, toolbar.tcl,
- toolbar_pref.tcl: Added Copyright statement.
-
- * Makefile (tags, TAGS): New targets.
-
- * toolbar.tcl (build_win): Quit->Exit. Only display this item if
- not using the IDE.
-
-Sat Aug 23 21:55:54 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * src.tcl (SrcWin update): Set command for stop icon.
- (SrcWin busy): Likewise.
-
- * manage.tcl: Move comments out of array initialization.
-
-Sat Aug 23 17:36:06 1997 Martin M. Hunt <hunt@pern.cygnus.com>
-
- * src.tcl (name): Handle case where files are part of the
- sources, but are unreadable.
- (build_win): Set filename combobox size to default.
-
- * manage.tcl: Remove breakpoint window from window list.
-
-Sat Aug 23 16:49:53 1997 Keith Seitz <keiths@onions.cygnus.com>
-
- * src.tcl: remove old breakdot stuff
- (reconfig) make sure we redraw the breakdots when font changes
- (file) check for duplicate break-able lines
- * variables.tcl: remove debug output
- * watch.tcl: add entry field to enter watch expressions
-
-Sat Aug 23 17:44:45 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * manage.tcl (manage_create): Register the window if it is not
- already registered, rather than if it is already registered.
-
- * src.tcl (SrcWin config_win): Add special double and triple click
- bindings to override standard text bindings in break dot area.
-
- * prefs.tcl (pref_set_defaults): Set the global font to the Tix
- default font. Set the src font to the Tix default fixed font.
- * src.tcl (SrcWin config_win): Configure the text font.
- * console.tcl (Console constructor): Set the cont to the Tix
- fixed font.
-
-Fri Aug 22 20:42:51 1997 Keith Seitz <keiths@onions.cygnus.com>
-
- * src.tcl: add breakpoint image that is text-size insensitive
- change layout of source, assembly, and mixed windows to use
- tabs, if possible, allowing more clickable area for toggling
- breakpoints, etc.
- * variables.tcl: (VariableWin::isFloat) new method
- (VariableWin::value) make sure floats are output as floats
- when user specifies "decimal" output
-
-Fri Aug 22 16:23:32 1997 Martin M. Hunt <hunt@pern.cygnus.com>
-
- * src.tcl (goto_func): Catch errors.
-
-Fri Aug 22 16:35:39 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * main.tcl: Use underscores rather than dashes in variable names.
- (ide_run_server): Make gdb_target_name global. Call file before
- calling target. Call load before calling run.
-
-Fri Aug 22 12:15:06 1997 Martin M. Hunt <hunt@pern.cygnus.com>
-
- * debug.tcl (dbug): Make debug window scrolled. Make it
- work with standalone gdb.
-
- * prefs.tcl (pref_save): Fix puts that were incorrectly
- changed to dbug.
-
-Thu Aug 21 17:57:59 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * ALL: Change all "puts" to "dbug".
-
- * debug.tcl: New file. Opens a window for debugging messages.
-
-Thu Aug 21 14:30:53 1997 Keith Seitz <keiths@onions.cygnus.com>
-
- * watch.tcl: (add) strip commas, too
-
-Thu Aug 21 14:26:36 1997 Keith Seitz <keiths@onions.cygnus.com>
-
- * variables.tcl: (buid_win) use listbox's font for font measuring
-
-Thu Aug 21 02:52:35 1997 Martin M. Hunt <hunt@pern.cygnus.com>
-
- * src.tcl (name): Check source filenames and handle errors
- if not found.
-
- * variables.tcl (destructor): Display styles are not
- objects so must be destroyed instead of deleted.
- (name): comment out debugging line.
-
- * main.tcl: Add stuff from standard_look_and_feel.
-
- * prefs.tcl, manage.tcl: Minor cleanup.
-
-Thu Aug 21 00:39:35 1997 Martin M. Hunt <hunt@pern.cygnus.com>
-
- * main.tcl (ide_run_server) New function. Starts GDB when
- asked politely.
- (target_name): New function. Watches for changes in the target
- name.
- (exe_name): New function. Watches for changes in the
- executable name.
-
- * console.tcl (insert, einsert): Scroll so the insertion
- point can be seen.
-
- * manage.tcl: SPecial hacks to create a global "console".
- Needed because we can't have puts searching for a console
- window everytime a puts arrives.
-
- * interface.tcl (gdbtk_tcl_fputs, gdbtk_tcl_fputs_error):
- Write to the console if one exists, and do an update.
-
- * tclIndex: Rebuilt.
-
-Wed Aug 20 17:23:07 1997 Keith Seitz <keiths@onions.cygnus.com>
-
- * variables.tcl: (Variable::setType VariableWin::getPath) handle types
- with multiple names (unsigned char, long long unsigned int) properly
- * locals.tcl: (update) comment out debug info
-
-Wed Aug 20 16:36:49 1997 Keith Seitz <keiths@pizza.cygnus.com>
-
- * watch.tcl: (add) try to handle errors more gracefully
- * variables.tcl: (value) make sure we handle bad pointer
- dereferences nicely
- (lots of places) switch to using 'ouput' instead of 'print'
-
-Wed Aug 20 11:43:35 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * src.tcl (file): Handle case where source files do
- not have any lines which generate code.
- (set_status): Keep status to one line.
-
-Wed Aug 20 00:00:52 1997 Tom Tromey <tromey@sanguine.cygnus.com>
-
- * images2/build.gif, images2/file.gif, images2/reg.gif,
- images2/stop.gif, images2/continue.gif, images2/finish.gif,
- images2/next.gif, images2/step.gif, images2/run.gif: New files.
-
-Tue Aug 19 14:52:59 1997 Keith Seitz <keiths@onions.cygnus.com>
-
- * tclIndex: rebuilt
- * Makefile: add variables.tcl, watch.tcl, and locals.tcl
- * manage.tcl: (manage_init): add locals window
- * src.tcl: (do_popup): add binding for watch window
- (addToWatch): new method
- * locals.tcl: new file
- * variables.tcl: new file
- * watch.tcl: new file
-
-
-Mon Aug 18 01:28:19 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * manage.tcl: Change window names to have only first
- char of each word capitalized.
-
- * global_pref.tcl (get_file): Handle bad pathnames.
-
-Sun Aug 17 01:59:02 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * register.tcl (destructor): Call manage delete.
- * global_pref.tcl (destructor): Call manage delete.
- * prefs.tcl (destructor): Call manage delete.
- * src_pref.tcl (destructor): Call manage delete.
- * toolbar_pref.tcl (destructor): Call manage delete.
-
- * manage.tcl: (manage_delete): Remove windows that
- have been quit, rather than killed by window manager.
-
- * src.tcl (location): Don't call gdb_listfuncs on
- NULL filenames.
-
-Sun Aug 17 00:18:02 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * src.tcl: Major changes to support file browsing.
- Also bug fixes for assembly mode, new comboboxes
- for filename and function selection.
-
- * src_pref.tcl: New file. Allows selection of
- colors used in source display.
-
- * prefs.tcl: Add new window type for src prefs.
- Set default colors for source window.
-
- * manage.tcl (manage_init): Add srcpref window type.
- (manage_restart): Preserve window geometries on restarts.
-
- * Makefile: Add src_pref.tcl.
-
- * tclIndex: Rebuilt.
-
- * toolbar.tcl: Add call to source prefs.
-
- * main.tcl: Change initial "src file" call to
- "src location".
-
-Thu Aug 14 15:49:02 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * manage.tcl (manage_create): Some fixes for IDE windows.
-
-Thu Aug 14 03:18:10 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * register.tcl, stack.tcl (destructor): Remove hook.
-
- * manage.tcl: Mostly rewritten from scratch to be
- more efficient and handle multiple windows of the same type.
- (manage_open): New function opens or creates a window
- as necessary.
- (manage_create): Now always creates a new window.
-
- * global_pref.tcl (build_win): Only put up font message
- box on Unix systems.
-
- * main.tcl: Change "manage create" calls to "manage open"
-
- * src (destructor): Remove hooks.
- (do_popup): Add a menu item to open another source window.
-
- * toolbar.tcl (build_win): Change "manage create" calls to
- "manage open". Bind button 3 on iconbar to "manage create".
-
- * prefs.tcl: Changes required for new features in manage.tcl.
-
- * tclIndex: Rebuilt.
-
- * hooks.tcl (remove_hook): Fix.
- (lremove): New function.
-
-Tue Aug 12 16:06:04 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * main.tcl: If running in the IDE, register the source window as
- the generic gdb window.
-
-Tue Aug 12 01:42:10 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * global_pref.tcl (build_win): Add a font size control
- widget, and a font preview window. Implement scanning
- for fixed-width fonts and a font cache.
- (font_changed): Save all font attributes in new-style
- font description.
-
- * balloon.tcl: Merge in latest changes from libide.
-
- * prefs.tcl (pref): Rename variables to make function
- clearer.
- (pref_init): After reading in prefs file, create
- all named fonts.
- (pref_set_defaults): Set default font to {courier 12 roman}.
-
-Mon Aug 11 13:47:49 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * tclIndex: New file.
-
- * Makefile: New file. Generates tclIndex when needed.
-
- * manage.tcl (manage_init): Add an icon for GDB.
- (manage_create): Bind Map and Unmap for toolbar toplevel.
- Tell window manager to display icon if one exists.
- (manage_iconify): Iconify or deiconify all windows.
- (make_icon_window): Build a window with an icon in it.
- (bind_for_toplevel_only): Local copy, because if you build
- GDB without IDE you won't get the one in libide.
-
- * main.tcl: Remove all the source commands.
-
- * toolbar.tcl: Use "-menu" configuration option for toplevel.
-
- * images/cygnus_icon.gif: A cygnus logo with GDB on it.
- For Unix window managers.
-
-Fri Aug 8 16:01:20 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * manage.tcl (manage): Add menu subcommand.
- (manage_init): Add -menu, -menuname, and -idemenuname options for
- all the windows.
- (manage_create): Register transient windows.
- (manage_menu, manage_register_default): New procedures.
- * toolbar.tcl (build_win): Call manage_menu to set up the window
- menu.
-
-Thu Aug 7 16:51:43 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * stack.tcl: Bind button 1 to select current
- frame. Add balloonhelp.
-
-Thu Aug 7 14:00:18 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * main.tcl, manage.tcl, toolbar.tcl: Add support
- for stack window.
-
- * stack.tcl, images/stack.gif: New files.
-
- * ALL: Change "::" to "@@" for itcl1.5/tcl8.0. You
- muct now use tcl8 for gdbtk to work.
-
-Tue Aug 5 12:10:43 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * register.tcl, global_pref.tcl: Change color "darkred"
- to red so it will work on windows.
-
-Tue Aug 5 12:01:26 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * manage.tcl (manage_init): Unset prefs are now ""
- instead of 0.
-
-Tue Aug 5 02:21:47 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * images*/run.gif: Change to green again.
-
-Tue Aug 5 01:42:56 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * main.tcl: Source register.tcl
-
- * register.tcl: New file. Editable register window
- and register preferences.
-
- * toolbar.tcl: Add hooks for register prefs.
-
- * manage.tcl: Add register window to list of windows.
- Deiconify windows when requested.
-
- * src.tcl: Minor changes.
-
- * global_pref.tcl: Bind return key to image dir entry
- widget.
-
- * prefs.tcl: Add register prefs to notebook widget.
- Change default for pref get to {} instead of 0.
-
-Fri Aug 1 14:21:25 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * images/*: Smaller toolbar icons. Fix some gifs
- to be transparent.
-
-Thu Jul 31 01:20:51 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * src.tcl (mode): Don't try to display EDIT button
- in any mode.
-
-Thu Jul 31 00:56:26 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * global_pref.tcl (build_win): Add ComboBox for simple font selection.
-
- * prefs.tcl (pref_init): Allow "option" commands in init file.
-
- * src.tcl: Remove EDIT button. Change fonts to use global font if
- no src font is specified.
-
- * toolbar.tcl: Enable Tools/Edit pulldown menu.
-
-Wed Jul 30 14:43:49 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * about.tcl (build_win): Set bg to white for Cygnus gif.
-
-Wed Jul 30 14:39:49 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * manage.tcl (manage_create): Fix window raising.
-
-Wed Jul 30 13:40:11 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * initial checkin.
-
diff --git a/gdb/gdbtk/library/ChangeLog-1998 b/gdb/gdbtk/library/ChangeLog-1998
deleted file mode 100644
index e44f3fc7a2a..00000000000
--- a/gdb/gdbtk/library/ChangeLog-1998
+++ /dev/null
@@ -1,3486 +0,0 @@
-Mon Dec 21 14:12:14 1998 Keith Seitz <keiths@cygnus.com>
-
- * manage.tcl (manage_create): Set window geometry after window is
- created.
-
- * prefs.tcl (pref_save): Save out preferences for memory window, too.
-
-Thu Dec 17 08:54:37 1998 Keith Seitz <keiths@cygnus.com>
-
- * browser.tcl (fill_source): Strip off any function args
- which could arise from C++ function names.
- (search): Be careful of C++ functions with spaces in the name
- returned from gdb_search.
-
-Tue Dec 15 13:24:42 1998 Keith Seitz <keiths@cygnus.com>
-
- * prefs.tcl (escape_value, unescape_value): New procs to
- escape equal signs in preference values.
- (pref_read): Use unescape_value whenever prefs are read.
- (pref_save): Use escape_value whenever prefs are saved..
-
-Tue Dec 15 11:07:01 1998 Keith Seitz <keiths@cygnus.com>
-
- * process.tcl (build_win): Do not export the listbox's selection
- as the X selection so that multiple listboxes can have selections
- highlighted at the same time.
-
- * stack.tcl (build_win): Ditto.
-
-Mon Dec 14 15:53:38 1998 Keith Seitz <keiths@cygnus.com>
-
- * watch.tcl (update): Catch errors to getLocals, which could error
- if no symbol table is loaded.
-
- * locals.tcl (update): Ditto.
-
-1998-11-17 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * kod.tcl: fix <Double-1> command spec for listbox.
-
-1998-11-13 Martin M. Hunt <hunt@cygnus.com>
-
- * srctextwin.tcl (bp): Pass "asm" argument to do_bp.
- (do_bp): Use asm argument to determine whether to
- check for multiple bps on the same src line. Remove
- redundant "if" statement.
-
-1998-11-12 Martin M. Hunt <hunt@cygnus.com>
-
- * srctextwin.tcl (do_bp): Fix multiple assembly
- breakpoints mapping to the same line number.
-
-Thu Nov 12 15:20:15 1998 Jim Ingham <jingham@cygnus.com>
-
- * console.tcl (complete): I added the ability to pass from_tty
- from gdb_cmd to the underlying commands. Pass 1 when the
- command is invoked from the console.
-
- * interface.tcl (gdbtk_tcl_tstart, gdbtk_tcl_tstop): Run the
- src window's do_tstop method rather than manipulating the
- widgets by hand.
-
- * src.tcl (build_win): Redo the packing so that the function
- combobox doesn't push all the other combo-boxes off the screen
- if it has a very long function name in it.
-
- * srcbar.tcl (do_tstop): Added a mode that just changes the
- GUI, which can be called from console hooks.
-
- * srctextwin.tcl: Fixed some bugs I introduced in setting
- breakpoints in the assembly & mixed mode windows. Dropped
- the notion of joint breakpoint images for lines that have
- breakpoints of two separate types. Too fragile.
- Also added the "dont_change_appearance" flag, used in the
- continue_to_here method to tell the GUI not to reflect the
- temporary disabling of all the breakpoints.
-
- * toolbar.tcl (insert_buttons): Added a little more error-checking.
-
-Wed Nov 11 08:40:04 1998 Fernando Nasser <fnasser@cygnus.com>
-
- * kod.c: adjusted sizes and packing options of widgets
-
-1998-11-10 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * main.tcl: small fix to the kod code as requested by the maintainers
- * kod.tcl: use show kod and info <kod cmd> as per spec
-
-Mon Nov 9 17:00:45 1998 Fernando Nasser <fnasser@cygnus.com>
-
- * kod.tcl: New file that implements the Kernel Object Display window
- * Makefile: added kod.tcl
- * main.tcl: test for kod support
- * manage.tcl (manage_init): support for kod
- * prefs.tcl (pref_save, pref_set_defaults): ibid
- * scrtextwin.tcl (config_win, do_key): ibid
- * toolbar.tcl (_load_images, create_window_buttons,
- create_view_menu): ibid
- * tclIndex: regen
-
-Mon Nov 9 12:09:48 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * actiondlg.tcl: Customize the stack collect string to collect
- the FP reg plus 64 words of stack mem. This will work for many
- targets. As noted in earlier comment, we need a way to configure
- this to the specific target.
-
-Wed Nov 4 12:41:42 1998 Jim Ingham <jingham@cygnus.com>
-
- * actiondlg.tcl: Get the stack collect string from an instance
- variable. Need to implement some way to get this from the
- target settings...
- * global_pref.tcl (toggle_tracing_mode): Add & remove hooks
- when you go in and out of tracing mode. Also reset the B1
- behavior when you leave tracing mode
- * interface.tcl (gdbtk_tcl_trace_find_hook): Added the trace
- find hook, so you can switch the GUI state when the tfind
- command is used to enter & leave browse mode.
- * srcbar.tcl (constructor, destructor trace_find_hook): Added
- the trace_find_hook to the source toolbar, and added the
- necessary hooks to handle it.
- * srctextwin.tcl (trace_find_hook): Added a trace find hook to
- the sourcebar as well.
- * stack.tcl (update): protect against errors in gdb_stack.
- Just return "NO STACK" if we couldn't get it.
- * src_pref.tcl (constructor, cancel): Put all the saved prefs
- in an array, on cancel, see if any have changed and only
- rebuild the window if there have been changes.
-
-1998-11-03 Keith Seitz <keiths@cygnus.com>
-
- * target.tcl: Add ice target.
- (GdbLoadPref): Add "after_attaching" preference.
- (set_saved): Add "after_attaching" preference.
- (write_saved): Add "after_attaching" preference.
- (change_target): Add "after_attaching" preference.
- (build_win): Add "after_attaching" entry to options
- frame.
-
- * main.tcl (set_target_name): Add ice target.
- (set_target): If an "after_attaching" preference exists,
- run it.
-
-Mon Nov 2 13:24:10 1998 Jim Ingham <jingham@cygnus.com>
-
- * bp.tcl (update): The hook function was passing more
- arguments than this function expected.
-
-Mon Nov 2 11:16:10 1998 Jim Ingham <jingham@cygnus.com>
-
- * toolbar.tcl: Added Tdump image.
-
-Fri Oct 30 17:36:05 1998 Jim Ingham <jingham@cygnus.com>
-
- * src.tcl (set_execution_status): Changed status messages,
- tracing is not the same as async debugging...
-
-Fri Oct 30 17:06:31 1998 Jim Ingham <jingham@cygnus.com>
-
- * bp.tcl (bp_all): Only remove tracepoints in the tracepoint
- window, and breakpoints in the breakpoint window.
-
-Fri Oct 30 11:22:23 1998 Jim Ingham <jingham@cygnus.com>
-
- * actiondlg.tcl: Added special tag "Collect Stack". This
- still needs to get hooked into the target database to deal
- with targets that need to do something special to collect the
- stack. Also moved some repeated code into loops.
- * main.tcl (source_file): Source in a file of gdb commands.
- * srcbar.tcl (constructor): Added source file menu entry, and
- made stack buttons belong to both the Trace & Control classes.
- * srctextwin.tcl (constructor): One too many separators in the
- trace trace popup menu.
- * tclIndex: regenerated.
- * tfind_args.tcl: Added "tfind frame"
- * toolbar.tcl (create_button): Allow a button to belong to
- more than one class.
- * toolbar.tcl (enable_ui): Eliminate redundant code, and allow
- a button to belong to more than one class.
- * toolbar.tcl (create_trace_menu): Added save tracepoints &
- Tfind frame menu items.
- * tracedlg.tcl: Added deletion of actions, and fixed a
- the whiile-stepping combobox callback for the new combobox.
- * util.tcl (save_trace_commands): new proc.
-
-1998-10-29 Michael Snyder <msnyder@demo-laptop2.cygnus.com>
-
- * target.tcl: add /dev/cua0 for Linux.
-
-Tue Oct 27 13:46:03 1998 Jim Ingham <jingham@cygnus.com>
-
- * Many little bug fixes all over in order to get tracing to work
- along with normal program control.
- * toolbar.tcl: Rewrote much of the code here to put commonly
- used code into functions, and clean up adding menus and
- buttons. Added the ability to disable particular menu items,
- not just whole menus. Added the ability to delete and insert
- buttons on the fly.
- * srcbar.tcl: Pushed the changes to toolbar.tcl into this file.
- * srctextwin.tcl: Changed the code dealing with breakpoints
- and tracepoints to use the text tags more consistently. Use
- only one set of menus for the whole widget, rather than having
- a separate set for the SRC+ASM case. Rewrote a lot of the
- code to separate out the tracing & program control functions.
- * interface.tcl (gdbtk_tcl_breakpoint): pass more information
- to the scrtextwin when a breakpoint changes state, so it can
- do the right thing without having to guess...
- * tracedlg.tcl (build_win): get the packing right so the
- window expands correctly.
- * main.tcl: do_tstop -> tstop, do_tstart -> tstart to avoid
- confusion with the methods in ScrBar.tcl.
- * prefs.tcl: Added two new preferences B1_Behavior to control
- whether B1 sets breakpoints or tracepoints.
- * src_prefs.tcl: Put in support for the B1_Behavior.
- * global_prefs.tcl: Put back tracing checkbox.
- * tdump.tcl: Fixed an incorrect (1 rather than 1.0) text
- widget line specification.
- * tfind_args.tcl (build_win): Bind return in the entry to the
- OK button. Clear the entry field if the Type has changed.
- * utils.tcl: Added comments for the debug commands.
- * watch.tcl (build_win): Flash the OK button before invoking it.
-
-Wed Oct 28 16:19:57 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * srctextwin.tcl: Changed the _map cache to use
- the variable Cname instead of the kludgy upvar alias.
-
-Mon Oct 26 21:08:54 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * srctextwin.tcl (motion): Show breakpoint balloons
- even when not running.
- (showBPBalloon): Check for null before displaying.
-
-Wed Oct 21 10:05:17 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * images/kod.gif: Added temporary kernel object display icon.
-
-Wed Oct 14 17:30:07 PDT 1998 Jim Ingham <jingham@cygnus.com>
-
- * main.tcl (gdbtk_tcl_preloop): Fixed the code to set gdb_exe_name.
- I seem to have dropped a variable...
- * main.tcl (_open_file): Make the open file dialog truely
- modal on windows.
-
-Wed Oct 14 14:29:17 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * target.tcl: Change default runlist for remote
- targets to download.
- (build_win): Add user-defined list of functions for
- initial breakpoints.
-
- * main.tcl (run_executable): Set user-defined initial
- breakpoints.
-
- * prefs.tcl (pref_set_defaults): Define new prefs
- gdb/load/bp_at_func and gdb/load/bp_func. These are
- user-defined initial breakpoints.
-
-Sat Oct 10 00:21:44 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * help/source.html: Add new images, add description of changes
- to breakpoints and threads support. Fix typos.
-
- * help/memory.html: Cleanup and add new information.
-
- * help/breakpoint.html: Reformat.
-
- * help/images: Add a bunch of new GIFs.
-
-1998-10-08 Keith Seitz <keiths@cygnus.com>
-
- * main.tcl (run_executable): Do not call set_exe here, either.
- (_open_file): Add some comments about using set_exe
- here instead of in download_it and run_executable. Do not look
- for main, either, since the file hooks will take care of that.
-
- * interface.tcl (gdbtk_tcl_pre_add_symbol): Do not reset the
- source windows here -- only show the user what is going on.
- (gdbtk_tcl_post_add_symbol): Force the source windows' file
- comboboxes to refill, since adding a symbol file may actually
- expand the debugger's view of the world.
- (gdbtk_tcl_file_changed): New hook proc. Called by file_changed_hook
- in symfile.c, this hook will cause the source window to point
- to main/entry. gdbtk_tcl_exec_file_display actually sets up
- gdbtk for this.
- (gdbtk_tcl_exec_file_display): Renamed from
- gdbtk_tcl_exec_file_changed for clarity. This hook is called
- from exec_file_display_hook in exec_file_command. This function
- sets up gdbtk to use a new executable, including resetting the
- debugger's state and source window(s). See comments in this file
- for more information.
-
- * download.tcl (download_it): Don't call set_exe here and
- do not touch state variables gdb_target_changed -- run_executable
- will do it. (In short, make download_it one step closer to only
- doing the download!)
-
-1998-10-08 Keith Seitz <keiths@cygnus.com>
-
- * variables.tcl (UnEdit): Fix quoting problems so that arrays may be
- inspected/edited.
- (edit): Ditto.
-
-Wed Oct 7 16:03:00 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * srctextwin.tcl (reconfig): Fix bindings.
-
-Wed Oct 7 13:07:00 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * manage.tcl (manage_create): Bind ALL source windows
- Map and Unmap events.
- (manage_delete): Small optimization.
- (manage_iconify): When the last source window is iconified,
- iconify all the support windows too. When any source
- window is deiconified, deiconify everything.
-
- * src.tcl (destructor): Destroy SrcTextWin too.
-
-Tue Oct 6 23:00:08 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * src.tcl (set_status): Display only the first line of
- the message.
- (build_win): Configure status window to a height of 1.
-
- * srcbar.tcl (create_menu_items): Change "Open..."
- menu item to call _open_file proc. Remove old
- _open_file method.
-
- * main.tcl (run_executable): If the run command fails
- with a result of "No executable" then call _open_file.
- (_open_file): New proc. Opens a file requester and
- sets the executable name to the selected file.
-
- * toolbar.tcl (create_menu_items): Add "..." to Source
- and Global prefs menu item.
-
-Mon Oct 5 21:10:30 1998 Jim Ingham <jingham@cygnus.com>
-
- * srctextwin.tcl (set_tracepoint): The filename variable
- changed to current(filename) but this use was not updated.
-
- * global_prefs: Added a global preference to turn on the
- tracing. It only sets the tracing preference, and does
- not cause gdb to relayout the toolbar yet...
-
- * util.tcl: Fixed the comments for the little debug
- thingie.
-
- * util.tcl (auto_step): Added a way to cancel the
- auto_stepping. This is not currently used, but with this
- it could be...
-
-Mon Oct 5 00:43:11 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * srctextwin.tcl (SrcTextWin): Create a threaded image
- with a color of [pref get gdb/src/thread_fg].
- (bind_src_tags): Bind bp_tag <Motion> and <Leave> for
- balloon help on breakpoints.
- (config_win): A bunch of binding changes to support
- balloon help breakpoints and setting multiple BPs
- on a line. Add menu item for thread specific BPs.
- (reconfig): Similar changes as above.
- (register_balloon): Remove.
- (updateBalloon): Cleanup and don't call register_balloon.
- (do_bp): When a BP is deleted, call gdb_find_bp_at_line()
- to see if there are any more BPs at the same line number.
- Add "thread" BP type.
- (bp_line): Accept an optional list of thread numbers to
- set BPs on. Loop through the list setting BPs on each thread.
- (motion): Accept a window and type argument. Call
- showBPBalloon in type is not "var".
- (showBPBalloon): New method.Opens a balloon with breakpoint
- info in it.
- (showballoon): Accept window parameter.
- (ask_thread_bp): New. A thread selector dialog. Opens
- a scrolled listbox with a list of threads and allows
- the user to multiselect threads to set BPs on.
- (do_thread_bp): New callback from ask_thread_bp()
- listbox.
-
- * src_pref.tcl: Replace disabled color selector with thread
- fg selector. Disabled color should probably always be
- black anyways.
-
- * util.tcl (CygScrolledListbox): Temporary simple scrolled
- listbox. Replace with a better one soon.
-
- * prefs.tcl (pref_set_defaults): Set default for thread fg.
-
- * bp.tcl (bp_add): For thread BPs, set the button color
- correctly.
-
- * tclIndex: Rebuilt.
-
-Fri Oct 2 17:07:32 1998 Jim Ingham <jingham@cygnus.com>
-
- * util.tcl (debug namespace): Added helper functions
- "trace_var", "remove_trace" & "remove_all_traces" which
- watch a variable, and dump the stack, and its value when
- it is touched... They are in the "debug" namespace.
- *tclIndex: regenerate index.
-
-Fri Oct 2 14:02:25 1998 Jim Ingham <jingham@cygnus.com>
-
- * main.tcl (gdbtk_tcl_preloop): Catch the error when no file
- is given on the command line.
-
-1998-10-02 Keith Seitz <keiths@cygnus.com>
-
- * srcbar.tcl (_open_file): Call SrcWin::point_to_main.
- (_set_runstop): Catch the stop in case the user
- aborts a session.
-
- * srctextwin.tcl (destructor): New. Remove all previously added
- hooks.
-
- * src.tcl (point_to_main): New function. I got tired of typing
- the same five lines over and over again.
-
- * main.tcl (set_baud): Target baud preferences are stored as
- [target name]-baud, not [target name]/baud.
- (run_executable): Call SrcWin::point_to_main.
- (gdbtk_tcl_preloop): Call SrcWin::point_to_main.
-
- * interface.tcl (gdbtk_tcl_pre_add_symbol): Use "update idletasks", not
- just "update".
- (gdbtk_tcl_post_add_symbol): Rewrite to have better behavior
- for symbol files which have been loaded. Use a small hack to work
- with gdbtk_tcl_exec_file_changed so that we look for main only
- when a new executable is loaded.
- (gdbtk_tcl_exec_file_changed): New proc to do some necessary
- setup when an exec file changes.
-
- * tclIndex: Regenerate.
-
-Fri Oct 2 11:40:05 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * Makefile (TCL): Add modal.tcl.
-
- * tclIndex: Rebuilt.
-
-1998-10-02 Keith Seitz <keiths@cygnus.com>
-
- * srcbar.tcl (_set_runstop): Catch the stop in case the user
- aborts a session.
-
-Thu Oct 1 18:58:11 1998 Jim Ingham <jingham@cygnus.com>
-
- * main.tcl (gdbtk_tcl_preloop): We were using lindex on the
- return value from info files, but if the directory had a space
- in it, then the result was not a proper Tcl list, and so the
- command would fail. Use regexp instead...
-
-Thu Oct 1 17:21:26 1998 Jim Ingham <jingham@cygnus.com>
-
- * download.tcl (download_it): One more place where we used
- "Foundry_Debugger" unconditionally... Stamped out.
-
- * main.tcl (set_target): Don't put the "Trying to
- communicate..." message in the window title, put it in the
- status area, and remember to remove it when you are done.
-
-Wed Sep 30 21:32:39 1998 Jim Ingham <jingham@cygnus.com>
-
- * srctextwin.tcl (insertBreakTag): There was a bug in the
- method of inserting break tags. If a tag of the intended
- type did not already exist, insertBreakTag would not set it.
- This method is a little less flexible, but actually works
- for all our uses.
-
-Wed Sep 30 19:42:43 1998 Jim Ingham <jingham@cygnus.com>
-
- * src.tcl (set_execution_status): When the program has
- terminated, most stubs detach. Then we need to set
- gdb_target_changed here so gdb will know to reattack when
- you press the Run button.
-
- * memory.tcl (update_address): We caught the gdb_eval when you
- give an address expression, but then only trapped the case
- where you gave an invalid address or non-existant symbol.
- Trap all the other errors as well...
-
-Wed Sep 30 16:55:53 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * bp.tcl: Add optional "thread" column and menu items
- to turn it on and off.
-
- * prefs.tcl (pref_set_defaults): Add gdb/bp/show_threads
- preference used for toggling the display of the thread
- column in the BP window. Default is 0 (off).
-
-1998-09-28 Keith Seitz <keiths@cygnus.com>
-
- * download.tcl (download_it): Don't download if there is no executable...
-
-Mon Sep 28 14:23:39 1998 Jim Ingham <jingham@cygnus.com>
-
- * modal.tcl: NEW FILE. Had to fix a bug in the dialogs
- so I made a sub-class: ModalDialog. The bug was that
- manage.tcl sets the WM_DELETE_WINDOW handler to be
- "manage delete" of the window, which is wrong for these
- windows, they need to unpost themselves first. Override
- this in the post method.
- * mem_pref.tcl: Subclass & remove the code that went into
- the ModalDialog class.
- * target.tcl: ditto.
- * tclIndex: regenerate for the new class.
-
-Fri Sep 25 19:01:32 1998 Jim Ingham <jingham@cygnus.com>
-
- * utils.tcl (freeze): Hacked the freeze method so that it comes closer
- to working on Windows, but it still flashes. Use a post
- method, like that im mem_prefs.tcl or target.tcl instead.
- * mem_pref.tcl (post): Added post method, so you can use the
- Windows EnableWindow call without sending your app into the
- background when the dialog is dismissed.
- * target.tcl (post): Added the same method to this class.
- Really should subclass these. Will do this when we rework the
- class hierarchy for Itcl3.0.
- * memory.tcl (create_prefs): Use the new post method.
- * main.tcl (set_target_name): Use the post method rather than
- freeze.
-
-1998-09-25 Keith Seitz <keiths@cygnus.com>
- * main.tcl (set_baud): Baud rates are saved in gdb/load/target-baud,
- not gdb/load/target/baud.
- (set_target): Attempt to silently detach before attaching.
-
- * target.tcl: Add gdb_target entries for Angel and ARM Remote
- protocols.
-
-1998-09-18 Keith Seitz <keiths@cygnus.com>
-
- * interface.tcl (gdbtk_tcl_post_add_symbol): Force the source window
- to 'main'; if that fails, let gdb guess based on stop_pc.
-
-1998-09-04 Keith Seitz <keiths@cygnus.com>
-
- * srctextwin.tcl (SrcTextWin::destructor): Define and remove
- previously installed hooks.
-
- * browser.tcl (get_selection): Listbox indices start at zero!
- Clear the selection if the user clicks below the last visible
- item in the listbox.
-
-Thu Sep 3 16:43:43 1998 Jim Ingham <jingham@leda.cygnus.com>
-
- * mem_prefs.tcl: Fixed the size & format radiogroups in
- the memory preferences so that they match the format
- options being sent to it by the memory window. Also
- greyed out the format box when float or double is selected.
- Also made sure we didn't re-enable any disabled widgets in
- the idle function.
-
-Sun Aug 30 00:40:28 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * process.tcl: New file. Implement a process/thread selection
- and display window.
-
- * srctextwin.tcl (do_key): Add entry for thread/process
- window.
- (config_win): Bind "Thread List" to Control-H.
- (FillSource): Fix bug when source is not found.
-
- * toolbar.tcl (create_menu_items): Add Thread List to menu
-
- * manage.tcl (manage_init): Add process window to
- managed array.
-
- * prefs.tcl (pref_save): Add "process" to window types to save.
-
- * Makefile: Add process.tcl
-
- * tclIndex: Rebuilt
-
-1998-08-28 Keith Seitz <keiths@cygnus.com>
-
- * variables.tcl (edit): Format data so that C arrays are not
- mistaken for tcl commands.
- (UnEdit): Ditto.
-
-Thu Aug 27 14:13:09 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * main.tcl (run_executable): If the target is "sim"
- then the pref "sim-opts" should be treated as target
- options instead of command line arguments.
-
-Wed Aug 26 00:06:11 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * src.tcl (mode): Set the mode widget using entryset.
- (build_win): Use default combobox selectbackground.
-
- * srctextwin.tcl (FillMixed): Better error handling.
- (LoadFIle): Stop harrassing users with worthless dialog boxes.
-
- * main.tcl (run_executable): Set args when arguments are
- given in the target dialog.
-
- * helpViewer.tcl (insertHtml): Window may have been
- closed while waiting for HTMLparse, so catch next commands
- to prevent error message.
-
- * images/stack.gif: Use the image from images2 because
- it looks better.
-
-Tue Aug 25 16:09:02 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * src.tcl (build_win): Change fonts on comboboxes to src-font.
-
- * global_pref.tcl: Change to new combobox.
-
-Tue Aug 25 11:41:43 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * srctextwin.tcl (insertBreakTag): Take an index
- instead of a linenumber. Check for bp_tag and break_tag.
- (display_breaks): Reset all lines back to break_tag
- after deleting bp image. Fixes caching bug.
- (do_bp): Fix up calls to insertBreakTag.
-
-Fri Aug 21 12:44:25 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * target.tcl (build_win): Remove tix stuff. Set maxheight
- of comboboxes to 10. Remove all code to count elements
- in comboboxes because the new one does it for us.
- (fill_rates): Remove combobox height configure code.
- (fill_targets): Same.
-
- * src.tcl (build_win): Change combobox -height to
- -maxheight for combobox 1.05.
- (name, goto_func): Use combobox entryset instead of SetSilent.
- (SetSilent): Deleted.
-
- * srctextwin.tcl (FillSource): Fix change mode call when
- no source is found.
-
-1998-08-20 Keith Seitz <keiths@cygnus.com>
-
- * srctextwin.tcl (print): New method. Moved from src.tcl.
-
- * srcbar.tcl (create_menu_items): Add page setup for non-ide again..
-
- * src.tcl (build_win): Fix balloon help for new comboboxes.
- (print): Move guts to srctextwin and invoke that method.
-
- * target.tcl: Remove protected variable tcpmode.
- Add "options" member for sim and exec targets. For sim, this is
- options to pass to the simulator; for exec, command line arguments.
- (build_win): Replace tix comboboxes with one from libgui.
- (set_saved): Add target-options when appropriate.
- (write_saved): Add target-options when appropriate.
- (fill_rates): Modify to work with new combobox.
- (fill_targets): Modify to work with new combobox.
- (config_dialog): New method which maps/unmaps/relabels comboboxes
- and entries for each target.
- (change_target): Remove all code pertaining to mapping/unmapping/relabeling
- comboboxes and entries and call config_dialog instead.
- (change_baud): Remove all code pertaining to mapping/unmapping/relabeling
- comboboxes and entries and call config_dialog instead.
-
- * console.tcl (Console): Add key binding for TAB completion.
- (find_lcp): New helper method for find_completion.
- (find_completion): New helper method for complete.
- (complete): New method (bound to tab key) which computes the completion
- of the current command line.
- (reset_tab): New method to reset the tab completion whenever a key
- is pressed (forces complete to recompute the completions instead of
- printing out the last list of completions).
-
-1998-08-18 Keith Seitz <keiths@cygnus.com>
-
- * stack.tcl (update): Use new built-in command gdb_stack for
- backtraces.
- Use the global gdb_selected_frame_level to figure out which
- line in the listbox should be highlighted.
- ALWAYS highlight the selected frame.
- Put a fencepost arount update so that we can prevent it from
- being called twice when change_frame is used.
- (change_frame): Protect call to gdbtk_update so that this object is
- not updated twice.
-
- * srctextwin.tcl (config_win): Copy the properties of the selection tag
- into a new "search" tag that will be used by the search widget.
- (search): Use the defined "search" tag to highlight found text.
- Remove all search-tagged text from the window when an empty expression
- is entered.
-
-Mon Aug 17 14:27:54 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * main.tcl (do_tstop): Require combobox package.
-
- * src.tcl (build_win): Use new combobox.
- (name): Changes for new combobox.
- (goto_func): Changes for new combobox.
- (FillNameCB): Changes for new combobox.
- (FillFuncCB): Changes for new combobox.
- (SetSilent): New method, like tixSetSilent.
- (mode): Changes for new combobox.
- (set_name): Changes for new combobox.
- (reset): Changes for new combobox.
-
- * srctextwin.tcl (FillSource): Call parent's mode method when
- mode is changed to assembly.
- (location): Call display_breaks only if flag is set.
- (LoadFIle, FillAssembly, FillMixed): Set display_breaks flag.
- (display_breaks): Set all breakpoints in a single pass.
- (insertBreakTag): Check $stop before trying to remove tag.
-
-Mon Jul 27 12:35:31 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * interface.tcl (gdbtk_tcl_tracepoint): Make function match C
- implementation by adding pass_count.
-
-Sat Jul 25 22:40:49 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * manage.tcl (manage_init): Change "loadpref" to "targetsel"
- and change class name to TargetSelection. This avoids confusion
- with the IDE GdbLoadPref class.
- * target.tcl (TargetSelection): Change class name.
- * main.tcl (set_target_name): Change "loadpref" to" targetsel"
-
-Fri Jul 24 14:37:49 1998 Keith Seitz <keiths@cygnus.com>
-
- * util.tcl (bp_exists): New procedure.
- * srctextwin.tcl (SrcTextWin::constructor): Add public vars
- "parent" and "ignore_var_balloons" and initialize accordingly.
- (config_win): Add binding for browser.
- Add binding for up/down arrows to scroll more naturally.
- (do_key): Add browser entry.
- * browser.tcl: Add srctextwin into browser.
- * prefs.tcl (pref_set_defaults): Add new preferences for the func
- browser.
- * tclIndex: Regenerate.
-
-Fri Jul 24 00:53:28 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * srctextwin.tcl (SrcTextWin): Initialize LineNums.
- (setTabs): Set tabs correctly when in assembly mode
- or when there are no linenumbers.
- (bind_src_tags): Remove lineNum_tag bindings.
- (config_win): Remove lineNum_tag and line_tag. Set
- linenumbers to break_tag and bp_tag instead.
- (FillAssembly): Don't use lineNum_tag.
- (FillMixed): Don't use line_tag.
- (LoadFile): Use new protected variable LineNums.
- (insertBreakTag): Instead of trying to calculate the
- correct location of the new tag, simply ask the widget
- where the old one was.
- (do_bp): Call insertBreakTag when bps are deleted.
-
- * src.tcl (FillNameCB): Call gdb_listfiles with [pwd].
-
-Sat Jul 18 13:27:20 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * src.tcl (location): Change BROWSE_TAG to STACK_TAG.
-
- * interface.tcl (gdbtk_quit): New function. Called by
- cleanup code in GDB.
-
-Fri Jul 17 00:03:43 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * memory.tcl (build_win): Change address controlbox to
- call update_address_cb.
- (update_address_cb): New method. Handle address
- controlbox callbacks. Set flag and call update_address.
- (update_address): Call BadExpr on bad expressions.
- Use local variable "ae" to set public variable addr_exp.
- This fixes bug where widget forgets its address when
- reconfigured. Set table background white when expression
- is OK.
- (BadExpr): When a bad expression is entered, create a
- messagebox and set the table bg to gray.
-
- * mem_pref.tcl (apply): Remove mystery debug line.
-
-Thu Jul 16 16:56:12 1998 Jim Ingham <jingham@cygnus.com>
-
- * download.tcl, ide.tcl, interface.tcl, main.tcl, manage.tcl
- srcbar.tcl, toolbar.tcl: Merged the IDE changes back into devo.
-
-Mon Jul 13 14:34:45 1998 Jim Ingham <jingham@cygnus.com>
-
- * mem_pref.tcl (destructor): Remember to delete the variable
- trace that implements the entry widget checking.
-
-Fri Jul 10 19:17:53 1998 Jim Ingham <jingham@cygnus.com>
-
- * mem_pref.tcl: Changed the number of bytes entry widget so
- that it only accepts +'ve integers, and protect against the
- case where the user deletes the contents of this entry, then
- closes the window. Also made the entry disabled when the
- other radio button is selected.
-
-Wed Jul 8 23:20:33 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * srctextwin.tcl (FillSource): Fix code that
- detects when no line numbers are available and we must use
- assembly mode.
-
-Mon Jul 6 17:53:50 1998 Jim Ingham <jingham@cygnus.com>
-
- * download.tcl, helpViewer.tcl, html_library.tcl, memory.tcl,
- register.tcl, src.tcl, srctextwin.tcl, target.tcl,
- tracedlg.tcl, util.tcl, variables.tcl, warning.tcl, watch.tcl:
- With the Tcl 8.0 compiler, expr commands are more efficient if
- you use:
- expr {$foo + $bar}
- instead of:
- expr $foo + $bar
- So I changed all the uses of expr to this form.
-
-
-Mon Jul 6 15:19:59 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * srctextwin.tcl (FillSource): Call Parent's mode method
- to combobox will be updated.
- * src.tcl (mode): Pass along second argument to mode_set.
-
-Wed Jul 1 15:09:47 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * srctextwin.tcl (location): Add missing parameter
- to FillSource call in SRC+ASM.
-
-Wed Jul 1 11:07:21 1998 Jim Ingham <jingham@cygnus.com>
-
- * main.tcl (gdbtk_preloop): Call gdbtk_idle on spec. If there was an
- error in loading an executible specified on the command line,
- then the pre_add_symbol hook would have called gdbtk_busy but
- the corresponding call to gdbtk_idle would not have occured.
-
- Also changed some catch calls so they didn't use
- "catch {set foo [real_command]}"
- but rather the more efficient:
- "catch {real_command} foo"
-
- * register.tcl: more catch cleanups
- * src.tcl: more catch cleanups
- * stack.tcl: more catch cleanups
- * target.tcl: more catch cleanups
- * tdump.tcl: more catch cleanups
- * variables.tcl: more catch cleanups
- * watch.tcl: more catch cleanups
-
-Wed Jul 1 12:21:55 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * src.tcl (build_win): Remove incorrect runstop
- argument for srcbar.
-
-Wed Jul 1 11:25:48 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * floatbar.tcl: Deleted.
- * Makefile: Removed floatbar.tcl
- * tclIndex: Rebuilt.
-
-Wed Jul 1 11:19:05 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * toolbar.tcl (enable_ui): Now takes an argument and
- handles disable_ui and no_inferior functions.
- (disable_ui): Deleted.
- (no_inferior): Deleted.
- (constructor): Set idle, busy, and no_inferior hooks
- to enable_ui.
-
- * srcbar.tcl (_open_file): Fix for multiple source windows.
-
-Wed Jul 1 01:40:52 1998 Martin M. Hunt <hunt@cygnus.com>
- * Makefile: Added srctextwin.tcl.
- * tclIndex: Rebuilt.
- * src.tcl: Major rewrite to move the source text window
- into another object implemented in srctextwin.tcl. Every function
- changed and many moved to srctextwin.tcl.
- * srctextwin.tcl: New file.
- * bp.tcl (goto_bp): Fix call to source widget.
-
- * src_pref.tcl (build_win): Add line number
- checkbutton. Layout needs changed.
- * prefs.tcl (pref_set_defaults): Add linenum pref.
-
-Thu Jun 25 17:31:30 1998 Keith Seitz <keiths@cygnus.com>
-
- * toolbar.tcl (create_menu_items): Add Function Browser menu item.
-
- * tclIndex: Regenerate.
-
- * Makefile: Add browser.tcl.
-
- * util.tcl (do_test): New procedure for invoking a test in the
- testsuite from the command line.
- (gdbtk_read_defs): New procedure for reading in the testsuite definitions
- file
-
- * src.tcl (build_win): Create new entry for searching the source window.
- This "feature" shares the screen with the download indicator.
- (download_progress): If starting a download, unmap the search widget
- and map the download progress indicator in its place. When downloading
- is done, do the opposite.
- (config_win): Bind the down and up arrow keys to directly scroll the
- window.
- (search): New method which searches for strings in the source window
- and jumps to a particular line.
- (set_state): Do not reset current_file to empty when an exe has been
- downloaded.
- (bp): Do not special case tracepoint debugging.
-
- * manage.tcl (manage_init): Add elements for function browser.
- (manage_create): If GDBTK_TEST_RUNNING is set in the environment,
- place all windows on the screen at +0+0.
-
- * prefs.tcl (pref_save): Add new preference category "search".
- (pref_set_defaults): Add search preferences.
-
- * tracedlg.tcl (TraceDlg::destructor): Destroy the actions dialog is
- it exists.
- (add_action): Save the object returned from the window manager when
- the actions dialog is opened so that we can later destroy it if
- necessary.
- (done): Clear ActionsDlg when the actions dialog is destroyed.
-
- * main.tcl (do_tstart): Do not disable the "Begin collection" menu
- item when we issue a tstart.
-
- * console.tcl (paste): New method which handles all Paste events for
- this window.
- (Console): Bind the middle mouse button on unix to generate a paste
- event.
- Override default binding for button-2 motion to allow easier pasting
- into the window.
- Bind the paste event to the method paste.
-
-Wed Jun 17 13:50:48 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * src.tcl (reconfig): Recognize tab size changes.
-
- * src_pref.tcl (build_win): Add tab control. Remove extra frame.
- Justify variable ballons text. Set activebackgrounds on
- color buttons.
-
-Tue Jun 9 13:57:24 1998 Keith Seitz <keiths@cygnus.com>
-
- * helpViewer.tcl (HtmlViewer): Display appropriate help based on the
- preference gdb/mode.
-
- * help/trace: Add help files for tracing.
-
- * main.tcl (gdbtk_tcl_preloop): Call gdbtk_update so that the
- source window fills files into the combobox.
-
- * srcbar.tcl (_open_file): "cd" to directory, don't add it to the
- search list. This never gets reset anywhere, so if multiple file
- commands are added, we could get the wrong path. Call gdb_clear_file,
- too.
-
- * interface.tcl (gdbtk_tcl_pre_add_symbol): Call the reset method
- of the source window, too.
-
- * src.tcl (reset): New method used to clear the source window
- whenever multiple file commands are used.
-
- * tdump.tcl (update): Erase the contents of the tdump window
- when displaying a new dump.
-
- * stack.tcl (update): Errors from the backtrace can contain
- backtrace info, too, so make sure we print as much of that as
- possible.
-
- * register.tcl (build_win): Do not allow editing in tracing
- mode.
- (reg_select): Do not allow editing in tracing mode.
-
- * memory.tcl (update_address): Check that gdb's handling of chars and
- char*s doesn't abort the update.
-
- * variables.tcl (build_win): Disable editing in tracing mode.
- (build_menu_helper): Disable editing in tracing mode.
- (getLocals): Use the builtin functions gdb_get_locals and
- gdb_get_args to get all local variables. Concat lists together.
- (Variable::value): Set a default value for "radix" in case
- the regsub fails.
-
-Tue Jun 9 00:00:18 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * interface.tcl (gdbtk_quit): No longer use quit_hook.
- Just call "manage save".
- * manage.tcl (manage): Remove manage quit.
- (manage_quit): Deleted.
- (manage_init): Remove quit_hook.
- (manage_save): Use "Pref setd" instead of "pref set".
- * prefs.tcl (pref_set_defaults): Remove quit_hook.
- (pref_quit): Deleted.
-
-Mon Jun 8 16:15:33 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * target.tcl (set_check_button): Check for existence of
- button before trying to set its state.
-
-Mon Jun 8 13:31:08 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * memory.tcl (build_win): Always Bind configure event to
- newsize method. Change table widget to use incr_addr for
- both incr and decr. Enable autorepeat.
- (create_prefs): Set rheight (row height).
- (newsize): Set rheight if necessary. Return if numbytes
- is not zero.
- (update_address): Move gdbtk_idle and gdbtk_busy calls to
- update_addr.
- (update_addr): Surround with gdbtk_idle and gdbtk_busy.
- (incr_addr): Take an argument to indicate how much
- to increment or decrement by.
- (decr_addr): Deleted.
-
-Fri Jun 5 00:13:49 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * Change all references to GDBTK_IDE to IDE_ENABLED.
-
-Thu Jun 4 18:34:11 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * memory.tcl: Complete rewrite. Added many new features
- and made it much faster.
-
- * mem_pref.tcl (build_win): Set listbox width.
-
- * images/check.gif: New image. Used in version of
- memory window without a menubar.
-
-Thu Jun 4 10:53:33 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * tclIndex: regenerated.
-
- Merged (most recent first):
-
- - Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * tracedlg.tcl (ok): if the tracepoint does not exist (this can happen
- if user is editing a tp and decides to remove it from tp window)
- do not core dump, give an error message instead, and return.
-
- * bp.tcl (get_actions): invoke trace dialog from tracepoint window,
- passing filename and line as arguments, rather than address.
-
- - Jeff Holcomb <jeffh@cygnus.com>
-
- * main.tcl (set_baud): Change gdb/load/$gdb_target_name/baud
- to gdb/load/${gdb_target_name}-baud.
-
- - Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * tdump.tcl (update): call tdump only if the current trace frame
- number is not -1.
-
- * interface.tcl (gdbtk_tcl_tstart): update menus entries only, do
- not do actual command.
- (gdbtk_tcl_tstopt): update menus entries only, do not do actual
- command.
- (gdbtk_tcl_warning): remove tdump warning message from list of not
- displayed messages.
-
- * main.tcl (do_tstart): catch error output from tstart and display
- error dialog.
- (do_tstop): catch error output from tstop and display error dialog.
-
- * bp.tcl (bp_add): align properly the bpnum and passcount fields,
- for the tracepoint window.
-
- * main.tcl (set_exe): set file_done (new global state variable)
- depending whether new file was read in or not.
- (set_target_name): return 0 if user chose cancel from target setting
- window displayed by 'connect'.
- (set_target): if no target_cmd is specified call set_target_name and
- ask user for it.
- (async_connect): handle possible outcomes of set_target command,
- issue appropriate messages to user.
- Initialize file_done to 0.
-
- * target.tcl (cancel): set gdb_target_name to CANCEL for use by
- set_target_name.
- Added public data 'exportcancel'.
-
- * toolbar.tcl (do_async_connect): change menu items state only
- if connect was successful.
-
- * src.tcl (bp): modify condition for SOURCE case to display tp dot
- after connecting to target.
-
- * actiondlg.tcl (constructor): make dialog non modal.
- (destructor): release grab not any longer necessary.
- (change): make lsearch use exact pattern matching for entries
- added to the collect list using the 'other' field. The new syntax
- allows array elements to be specified and this messes up the
- default glob style pattern matching.
- (change_other): reject memranges (obsolete). Delegate validation
- of user input to the lower levels, in gdb. I.e. keep everything
- until the whole tracepoint is installed.
-
- * tracedlg.tcl (gdb_add_tracepoint): call to gdb_actions is now
- catching the errors (in case of incorrect syntax) and displaying
- them to the user.
-
- * main.tcl (set_target): Changed text of error message to mention
- the Target Settings dialog.
-
- * prefs.tcl: Set default preference for gdb/load/check to 0.
-
- * target.tcl (build_win): disable comparison with executable for
- 'exec' targets.
- (set_check_button): new method. Enable/disable the check button
- for comparing executable.
- (change_target): call set_chack_button when target changes.
- Set default preference gdb/load/check to 0.
-
- * stack.tcl: set initial window width value to 40, so that window
- looks better if opened before a stack exists.
-
- - David Taylor <taylor@texas.cygnus.com>
-
- * main.tcl (async_connect): remote-compare is now compare-sections.
-
- - Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * warning.tcl (constructor): call destructor if dialog doesn't
- need to be displayed.
-
- * console.tcl (invoke): make function get input and return if in
- readline state, independently from the value of Running.
-
- * src.tcl (set_state): set state of pop up menus only for synch
- mode.
-
- * tdump.tcl (build_win): simplify the window, eliminating pane.
- This fixes resize problems.
- (update): add call to see to display last thing outputted to the
- window.
-
- * tfind_args.tcl (do_it): call the tfind_cmd procedure.
-
- * toolbar.tcl (create_menu_items): changed calls to tstart and tstop
- to use do_tstart and do_tstop.
-
- * srcbar.tcl (runstop): do not call _set_trace in asynch case,
- just use _set_runstop always.
- (_set_runstop): added handling for asynch mode cases.
- (_set_trace): removed.
-
- * main.tcl (do_tstart): new procedure to execute tstart command
- update tstart/tstop button, and menu entries accordingly.
- (do_tstop): new procedure for tstop, as above.
- (run_executable): calls do_tstart in the asynch case.
-
- * interface.tcl (gdbtk_tcl_tstart): new procedure to invoke
- the tstart command
- (gdbtk_tcl_tstop): new procedure to invoke the tstop command
-
- * interface.tcl: (gdbtk_tcl_warning) do not display warning
- about no current trace frame upon opening of tdump window.
-
- * main.tcl: (run_executable) in asynch mode just call tstart,
- connect is now done independently.
- (async_connect) new procedure to connect and do comarison with
- remote executable, in asynch mode. Sets up gui state globals.
- (async_disconnect) new procedure to disconnect from target in
- asynch mode. Sets up gui state globals.
-
- * prefs.tcl: added new preference gdb/load/check
-
- * srcbar.tcl: (create_buttons) tfind commands now use tfind_cmd
- function
-
- * target.tcl: added new preference gdb/load/check to execute an
- automatic remote-compare command on connection to target in asynch
- mode
- (set_saved) set saved value for new preference
- (write saved) write saved value for new preference
- (build_win) set state of 'run to main', 'break at exit', 'display
- dowload' to disabled for asynch mode target dialog.
- Added new checkbutton for automatic comparison of remote exec.
- Saved_check: new protected member
-
- * tdump.tcl: (update) changed check for no frame, since 0 is legal
- trace frame number.
-
- * toolbar.tcl: (create_menu_items): added menus items 'connect to
- target' and 'disconnect', in async mode. Changed to call tfind_cmd
- to execute tfind commands
- (do_async_connect): new method to connect to target in async mode.
- (do_asynch_disconnect): new method to disconnect from target in
- async mode.
-
- * util.tcl: (tfind_cmd): new proc to execute a tfind command on
- the target
-
-Thu May 28 12:49:29 1998 Keith Seitz <keiths@cygnus.com>
-
- * target.tcl: Add sparclite target.
- (fill_targets): Add sparclite target.
-
- * main.tcl (set_target_name): Rearrange so that the default behavior
- is to assume a remote-like target.
-
- * src.tcl (browse_to): Helper function for BpWin::goto_bp which causes
- the source window to show the specified location.
-
- * bp.tcl (bp_add): Clean up repetitive code.
- Add double-click binding which shows the breakpoint
- in the source window.
- (bp_select): Clean up repetitive code.
- (goto_bp): New function.
-
-Sun May 24 14:05:27 1998 Keith Seitz <keiths@cygnus.com>
-
- * src.tcl (reconfig): Remove the variable balloon selection in the text
- widget, too, when we are disabling varialbe balloons.
-
- * target.tcl: Add a "runlist" parameter to all gdb_target entries. This list
- controls the default behavior of the run button.
- (GdbLoadPref): Define the run preferences based on this target.
- (build_win): Add a "more options" dropdown pane to allow users to modify the
- behavior of the run button.
- (set_saved): Add run button preferences.
- (write_saved): Add run button preferences.
- (fill_targets): Add the "pretty name" to the combo box, not gdb's internal
- target name.
- (change_target): Use get_target to translate the "pretty-name" to the
- real target name.
- (save): Write out saved values, too.
- (get_target): New method to translate the "pretty-name" of a target into gdb's
- internal name/
- (toggle_more_options): New method to handle mapping and unmapping of the
- "more options" pane.
- (set_run): New method. Moved from src_pref.tcl.
- (valid_target): Moved here from main.tcl.
- (native_debugging): Moved here from main.tcl.
- (change_target): Don't write_saved here -- wait until dialog is closed.
-
- * src_pref.tcl (build_win): Use libgui's Labelledframe class instead of the
- Tix labeled frame.
- Remove the run button frame -- this has moved into the target selection dialog.
- (set_run): Moved to targets.tcl.
-
- * prefs.tcl (pref_set_defaults): Change default preferences for the run
- button to only do a run. Target selection will reset these as appropriate.
-
- * main.tcl (set_baud): Baud preferences are in TARGET-baud, not
- TARGET/baud.
- (run_executable): Remove special cases for exec targets.
- (native_debugging,valid_target): Move to target.tcl.
-
- * images/more.gif, images/less.gif: New images for drop frames.
-
- * tclIndex: Regenerate.
-
-Wed May 20 13:43:00 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * toolbar.tcl (create_menu_items): Remove register prefs.
-
- * images/stop.gif: Set transparent bit.
-
-Tue May 19 12:34:11 1998 Keith Seitz <keiths@cygnus.com>
-
- * bp.tcl (bp_add): Use source window's colors. Use "file tail" not
- "lindex [file split ] end".
- (bp_modify): Use source window's colors. Use "file tail" not
- "lindex [file split ] end".
- (bp_remove): Call bp_select before we delete the breakpoint.
-
- * main.tcl (run_executable): Encapsulate all calls to debugger
- based on new run preferences.
-
- * manage.tcl (manage_init): Change loadpref titles to "Target Selection"
-
- * pref.tcl (build_win): Disable Help button until it works.
-
- * prefs.tcl (pref_set_defaults): Define new run button preferences.
- Lose stack and bp window color preferences -- use the source window
- ones instead. Lose left_click, too.
-
- * src.tcl: Remove all references to _Source_Left_Click and replace with new
- protected variable Tracing. Define new protected variable UseVariableBalloons
- so that we don't follow the preferences blindly. Replace all preference calls
- for these two globals.
- (reconfig): Allow reconfiguration of variable balloons and popup menu colors.
- (config_win): Add binding for File Menu->Open.
- (do_key): Add open key.
-
- * src_pref.tcl (SrcPref): Save all newly added preferences.
- (build_win): Add new preferences for mode, variable balloons,
- lots of color choices.
- (cancel): Reset all new preferences.
- (pick): Allow passing of button in to make things a little easier.
- (reconfig): Keep empty -- no need for this to reconfigure itself.
- (set_run): New method to make sure someone does not try to run _and_
- continue a target with the run button.
-
- * stack.tcl (build_win): Use the source window's preferences to set colors.
-
- * target.tcl (build_win): Disable Help button until it works.
-
-Mon May 18 15:25:00 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * html_library.tcl (HMstack): Remove stray 'g' that was
- preventing autoloading.
-
-Mon May 18 13:17:30 1998 Keith Seitz <keiths@cygnus.com>
-
- * helpViewer.tcl (HtmlViewer): Initialize glossary.
- (glossaryPost): Fill in skeleton supplied by jingham.
- (glossaryUnpost): Ditto.
- (lookup): New method to lookup glossary definitions.
- (HMset_image): Add special image names.
-
-Fri May 15 00:30:06 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * memory.tcl (update_address): Source window was never being
- updated due to a faulty fencepost. I removed it. Was it
- useful?
-
-Tue May 12 11:47:11 PDT 1998 James Ingham <jingham@leda.cygnus.com>
-
- * helpViewer.tcl: Made the fonts for the viewer track the global
- font preferences
- *html_library.tcl: Use Tcl Font objects for the fonts rather than
- building up X Font Specs.
-
-
-Thu May 7 16:03:32 1998 Keith Seitz <keiths@cygnus.com>
-
- * toolbar.tcl (create_menu_items): Remove automatic stepping.
- (create_menu_items): "Cygnus on the Web..." should point to GNUPro page...
-
-Wed May 6 20:18:34 1998 Keith Seitz <keiths@cygnus.com>
-
- * main.tcl (set_target_name): Recognize d10v and m32r targets.
- (valid_target): Change test to recognize all tcp targets.
-
- * target.tcl: Add m32r and d10v tcp targets.
-
-Wed May 6 12:52:12 1998 Keith Seitz <keiths@cygnus.com>
-
- * srcbar.tcl (create_menu_items): Install a page setup menu item for
- non-ide debuggers.
-
- * src.tcl (print): Don't call idewindow_freeze and idewindow_thaw
- the ide is not running
-
-Wed May 6 10:41:30 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * bp.tcl (get_actions): set bpnum to be the real tracepoint number,
- not the selected row number.
-
-Tue May 5 04:07:12 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * target.tcl: Add D10V and M32R target.
-
- * prefs.tcl (pref_set_defaults): Set debugging off
- by default.
-
-Fri May 1 15:23:57 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * main.tcl (valid_target) make 'remotetcp' a valid
- target.
-
-Fri May 1 11:50:40 1998 Jim Ingham <jingham@leda.cygnus.com>
-
- * helpViewer.tcl: Added the skeleton for the Glossary entries.
- Fixed the zoom to top of page when rendering is complete nit.
- Added a reconfig method to refresh the current page.
- Compulsive reordering of methods.
-
-Thu Apr 30 00:04:52 1998 Martin M. Hunt <hunt@cygnus.com
-
- * global_pref.tcl (change_icons): Remove debug line.
-
- * toolbar.tcl: Change image names to end with _img
- so they don't conflist with command names.
- * srcbar.tcl: Same.
-
-Tue Apr 28 16:51:09 1998 Jim Ingham <jingham@leda.cygnus.com>
-
- * html_library.tcl: The redefinition of tkFocusOK in this file
- can cause an infinite recursion loop in autoloading tkFocusOK.
- Change proc -> ::proc to hide the definition from itcl_mkindex
- * tclIndex: remade without the reference to tkFocusOK.
-
-Tue Apr 28 16:51:09 1998 Jim Ingham <jingham@leda.cygnus.com>
-
- * helpViewer.tcl: The index page now shows up properly in the
- history list. Also added images for the fore, back and home
- buttons, and removed the close button.
-
- * manage.tcl: Moved the wm withdraw of a new toplevel before the
- constructor is run in manage_create. This avoids flashing.
-
- * main.tcl: Changed the tk application name of gdbtk from tk
- to gdbtk.
-
-Mon Apr 27 14:18:01 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * helpViewer.tcl: (constructor) Change 'Foreward' to 'Forward' and
- calls to 'foreward' method to calls to 'foreward' method.
- (forward) changed method name from 'foreward'.
-
-Thu Apr 23 19:02:25 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * toolbar.tcl (create_menu_items): Use the new help viewer when not
- using the IDE.
-
- * helpViewer.tcl (HtmlViewer::constructor): Set default values for
- previously passed-in variables.
- (HtmlViewer::destructor): Destroy the toplevel, too.
- (HMset_image): prepend the dir name "images" to the image path.
-
-Thu Apr 23 13:31:07 1998 Jim Ingham <jingham@leda.cygnus.com>
-
- * html_library.tcl: First checkin
- * helpViewer.tcl: First checkin
- * manage.tcl (manage): Added the help veiwer to the windows
- list. Aslo compulsively alphabetized the list...
- * tclIndex Rebuilt for the new procs.
-
-Mon Apr 20 11:14:17 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * global_pref.tcl (build_win): Add font selector for the status font.
-
- * main.tcl (run_executable): Exec targets are always "loaded".
-
-Sat Apr 18 02:11:04 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * prefs.tcl (pref_read): Remove debug line.
-
- * util.tcl (toggle_debug_mode): When enabling or
- disabling debugging, also enable or disable error
- reporting and stack traces.
-
-Sat Apr 18 01:13:03 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * srcbar.tcl (_toggle_updates): Cleanup.
-
- * src.tcl (do_popup): Fix problems with selections. While
- I'm messing with this code anyway, change how it works
- so that the popup will contain the word that is under the cursor
- if nothing is selected.
-
- * toolbar.tcl (create_buttons): Bind button 3 to create
- new windows when possible.
-
- * stack.tcl (StackWin): Fix broken deiconify call.
-
- * images/[console.gif, reg.gif]: Update.
-
-Fri Apr 17 10:34:23 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * src.tcl (location): Don't look up the full pathname
- of each file added to the combobox.
-
-Fri Apr 17 09:58:59 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * target.tcl (default_port): New proc. Returns a default port
- based on host os.
- (startup code): Use default port to determine the default port
- to use for all hosts.
- (build_win): Only set the target if it is valid.
- For unix, use port names that correspond to the OS running.
- Change gdb/load/$target-portnum to gdb/load/$target-port (typo?)
- (get_target_list): Do not allow "exec" for cross debugging.
- (save): Do not do dismiss dialog if the target is not valid.
- (cancel): If exportcancel is set, set gdb_target_cmd to "CANCEL". This
- will allow run_executable to cancel a run if the user cancels target
- selection.
- (exportcancel): New public data.
-
- * main.tcl (set_target_name): Return status to caller so that the user
- can cancel a run request when the target selection dialog is opened.
- Do not modify gdb_exe_changed -- it has already been set proprely.
- (set_target): If gdb_target_cmd is empty, call set_target_name to
- set it.
- Allow all set_target_name commands to cancel target selection.
- (run_executable): Allow all set_target_name commands to cancel
- target selection.
- Always clear bp's at main and exit, since this proc will set them
- for all targets now.
- Save the bp number for the breakpoint installed at main and exit so
- that we can reliably delete them if the user cancels any subsequent
- target selection.
- Whenever the run is canceled, delete the breakpoints at main and exit.
- Move setting of breakpoints at main and exit from download_it here.
- (valid_target): New proc. Returns true if the given target is a valid,
- runnable target.
- (native_debugging): New proc. Returns true if this gdb is not a cross
- gdb.
- (startup code): Do not call set_target_name here -- let run_executable
- do it.
-
- * interface.tcl (gdbtk_tcl_query): Update the display when this dialog
- is dismissed.
- (gdbtk_tcl_warning): Always show warnings in the debug window.
-
- * download.tcl (download_it): Move setting breaks at main,exit to
- run_executable in main.tcl.
-
-Thu Apr 16 11:28:01 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * main.tcl (set_target_name): Add "prompt" parameter
- which allows this function to be called without it always
- prompting for the target name. This allows it to quietly
- initialize variables from preferences.
- (set_target): Remove HACK_FIRST_HACK.
- (run_executable): Check the result of [set_target].
- If it fails, prompt for a new target and repeat.
- (startup code): Remove HACK_FIRST_HACK.
- Call set_target_name to initialize gdb_target_cmd from
- preferences.
-
- * toolbar.tcl (create_menu_items): Call set_target_name
- for the target menu item. This will open the dialog and
- then set the target command correctly.
-
- * target.tcl (save): Set default target preference.
-
-Wed Apr 15 11:29:47 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * src.tcl (reconfig): Tell toolbar to reconfig.
-
- * global_pref.tcl (build_win): Add support for changing
- icons. Put fonts in a labelled frame.
- (update_file): Removed.
- (change_icons): Callback for icon combobox.
-
- * srcbar.tcl (_load_src_images): Remove old target and
- load images. Add reconfig parameter which reloads images.
- Use global gdb_ImageDir.
- (reconfig): New method.
-
- * floatbar.tcl (create_buttons): Remove target image.
- Use global gdb_ImageDir.
-
- * toolbar.tcl (_load_images): Use global gdb_ImageDir.
- Add reconfig parameter which reloads images.
- (reconfig): Don't rebuild everything, just reload images.
- (create_menu_items): Change "Fonts" preferences menu
- item to "Global".
-
- * prefs.tcl (pref_set_defaults): Save only basename in
- gdb/ImageDir preference. Initialize global gdb_ImageDir.
- (pref_read): Set gdb_ImageDir.
-
- * memory.tcl (build_win): Use global gdb_ImageDir.
-
- * manage.tcl (make_icon_window): Use global gdb_ImageDir.
-
- * about.tcl (build_win): Use global gdb_ImageDir.
-
- * images/icons.txt: New file; icon descriptions.
- * images/vmake.gif: New file.
- * images/vars.gif: New file.
- * images/watch.gif: New file.
- * images/bp.gif: New file.
- * images/memory.gif: New file.
-
- * images2/icons.txt: New file; icon descriptions.
-
- * toolbar_pref.tcl: Removed.
-
- * main.tcl (run_executable): If target is "exec" don't
- show target dialog unless the run command fails.
-
-Wed Apr 15 13:15:22 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * interface.tcl: (gdbtk_tcl_warning) changed to selectively
- display warnings in the GUI.
- (show_warning) new procedure. Displays warning dialogs.
-
-Wed Apr 15 07:13:04 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * src.tcl (do_popup): Fix merge casualty -- revert to pre-3/22 version.
- Don't allow tracepoint ranges to be set unless in asynch mode.
-
-Mon Apr 13 16:00:06 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * warning.tcl: new file. Implements WarningDlg class, for warning
- dialogs.
-
- * tclIndex: regenerated
-
- * Makefile: added new file warning.tcl
-
- * manage.tcl: added new window warningdlg, for ignorable warnings.
-
- * interface.tcl: (gdbtk_tcl_warning) new procedure. Creates a warning
- dialog.
- (gdbtk_tcl_ignorable_warning) new procedure. Creates a warning dialog.
- The user can choose to not have this dialog pop up again during the
- same debugging session.
-
-Mon Apr 13 13:04:20 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * stack.tcl (StackWin::constructor): Withdraw toplevel before calling
- all busy hooks; then build the window, go idle and pop the window onto
- the screen.
-
- * main.tcl (set_target_name): Use a regexp to match target names.
- Add "sds" as a target.
- (run_executable): Use gdb_immediate to run executable.
-
-Fri Apr 10 10:27:42 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * bp.tcl: changed default value of public var tracepoints to be 0.
-
-Thu Apr 9 15:21:49 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * global_pref.tcl (destructor): Delete test fonts here instead of
- in ok and cancel. This fixes bug when dialog was closed by
- clicking on close gadget.
-
- * src_pref.tcl (pick): When colors are changed, immediately
- update the dialog.
-
-Thu Apr 9 04:03:27 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * target.tcl (build_win): Bind <Return> for cancel and help buttons.
-
-Wed Apr 8 10:57:14 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * tdump.tcl: (update): show stuff on window only if current
- trace frame is not null.
-
- * variables.tcl: (build_win): get the current output-radix
- (getVariables): decide the format to display a var based on Radix
- VariableWin class: added protected member Radix
- (value): decide display based on output-radix
-
-Wed Apr 8 06:17:42 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * bp.tcl (get_actions): Open the trace dialog based on a tracepoint's
- number.
-
- * tracedlg.tcl (title): New method to title window based on mode.
- (TraceDlg::constructor): After the interp is idle, title this window.
- (build_win): Add support to simply pass a tracepoint number for editing.
-
-Tue Apr 7 12:49:45 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * variables.tcl (VariableWin): We should deiconify after withdrawing...
-
- * tracedlg.tcl (gdb_edit_tracepoint): Make necessary gdb_cmd changes
- to support new API.
- (gdb_add_tracepoint): Make necessary gdb_cmd changes to support new
- API.
-
- * tdump.tcl (update): Make necessary gdb_cmd changes to support new
- API.
- (TdumpWin::constructor): We should deiconify after we withdraw...
- Change idle callback to an update callback.
- (TdumpWin::destructor): Change idle callback to update callback.
-
- * srcbar.tcl (_open_file): Make necessary gdb_cmd changes to support new
- API.
- (create_buttons): Change all tracing commands to use gdb_immediate.
-
- * main.tcl (set_target_name): Add simulator target.
-
- * src.tcl (mode): When changing modes, clear the line to pc mappings.
- (location): Do not set current_addr if we are not running and gdb_loc
- thinks we're at 0x0.
- Clear the text-window-line to pc mapping when appropriate.
- Revert display_breaks change for SRC+ASM mode.
- (bp): Make sure mapping of PC to src window line exists before
- attempting to set breakpoints/tracepoints.
-
-Fri Apr 3 13:57:42 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * src.tcl: (do_key): added actions for key bindings in trace mode.
- (config_win): added key bindings for trace mode.
-
- * srcbar.tcl: (_set_trace) changed balloon contents for tstart/
- tstop button.
-
- * toolbar.tcl: (create_menu_items): changed names of menu items
- tstart and tstop to 'Begin Collection' and 'End Collection'.
- Changed name of Preference menu item from 'GDB' to 'Fonts'.
- Changed name of File menu item from 'Debugger Preferences' to
- 'Target Settings'.
- Commented out Preference menu item 'Download'.
- (create_buttons): tdump button, inserted text 'Td' in place of missing
- icon.
-
-
-Tue Mar 31 17:20:59 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile (TCL): Add ide.tcl.
- * tclIndex: Rebuild.
-
-Sun Mar 29 18:50:46 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * tracedlg.tcl (build_win): Enable tracepoints at assembly addresses.
- (add_action): Enable tracepoints at assembly addresses.
- (ok): Enable tracepoints at assembly addresses.
- (edit): Enable tracepoints at assembly addresses.
- (gdb_add_tracepoint): Enable tracepoints at assembly addresses.
-
- * srcbar.tcl (_open_file): If main () exists, show it.
-
- * src.tcl (display_breaks): If we are displaying breaks in assembly,
- clear the line and file specs.
- (location): Use display_breaks to insert breaks and traces.
- (bp): Rewrite. Actions are based on mode of the source window.
- (bp_line): When setting a tracepoint in assembly, pass address
- to set_tracepoint.
- (set_tracepoint): Open trace dialog specifying either line or
- address at which to set trace.
- (tracepoint_range): Rewrite. Actions are based on the mode of the
- source window. Now able to insert ranges of traces in any mode.
-
- * actiondlg.tcl (ActionDlg::constructor): Enable widget via address
- specification.
- (ActionDlg::Line): Default to empty list.
- (ActionDlg::Address): Add new memeber to enable assembly operation.
-
-Sun Mar 29 21:21:37 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * bp.tcl: add tracepoint number to tracepoint window.
- (build_win)(bp_add)(bp_select)(bp_modify)(bp_delete)
-
- * manage.tcl: (manage_init) do not open windows not related to
- current mode
-
- * tdump.tcl: (reconfig) remove it
- (config) add toplevel window, show window after it has been built.
- (update) add calls to busy and idle hooks, add third argument to
- gdb_cmd call
-
-Sun Mar 29 15:01:03 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * srcbar.tcl (_set_trace): Use gdb_immediate to execute the "tstop".
- Call run_executable when requesting a tstart.
- (_open_file): Convert all paths under cygwin32 to a posix-compliant
- pathname. Add this path to the source search list.
-
- * src.tcl (set_execution_status): Change stop messages to support
- tracing.
- (tracepoint_range): Clear the selection when we set a range of
- tracepoints.
-
- * main.tcl (set_target): Use gdb_immediate so that the console gets
- output of target command.
- (run_executable): Use gdb_immediate for run command.
- Include trace support.
-
-Sat Mar 28 15:50:01 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * srcbar.tcl (create_menu_items): Put menu items in proper order.
- (_open_file): Add exe file's directory to the default source
- search path.
-
-Sat Mar 28 14:29:08 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * srcbar.tcl (GDBSrcBar: runstop trace): If running async'ly, set
- the run/stop button by calling _set_trace. Otherwise use _set_runstop.
- (create_menu_items): Add file command to open a new exe.
- (_open_file): New method to handle requests to open a new exe.
-
- * main.tcl (set_target): If this is the first time running,
- then show the download prefs dialog.
-
-Sat Mar 28 16:30:55 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * tracedlg.tcl: (build_win) reinserted 'update idletasks' to
- display Actions frame properly.
-
- * actiondlg.tcl: (sort) moved "All Registers", "All Locals",
- "All Arguments" to beginning of list.
-
- * src.tcl: (line_is_executable) new method. Used in
- tracepoint_range.
-
-Sat Mar 28 10:58:04 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * tracedlg.tcl (gdb_edit_tracepoint): Don't let gdb_cmd call busy and
- idle hooks.
- (gdb_add_tracepoint): Ditto.
-
- * src.tcl (config_win): Change exit key binding from 'q' to 'x.'
- (goto_func): That's "file tail", not "file split."
-
- * srcbar.tcl (_set_stepi): Don't do anything if we're debugging
- asynchronously.
-
-Sat Mar 28 10:09:21 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * toolbar.tcl (create_menu_items): Change "Close Debugger"
- menu item to "Exit".
-
-Sat Mar 28 02:38:51 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * src_pref.tcl (build_win): Fix Save and Apply buttons.
- Change "Save" to "OK". Use standard_button_box.
- (save): New method, save and exit.
- (apply): New method; save and don't exit.
- (cancel): New method; cancel all changes.
-
- * src.tcl (reconfig): Reconfigure colors, too.
-
- * global_pref.tcl (Globalpref): Fix deiconify call.
- (build_win): Use standard_button_box. Set default to OK.
- Remove unused stuff. Cleanup display.
-
- * Makefile: Removed toolbar_pref.tcl.
-
- * tclIndex: Rebuilt.
-
- * srcbar.tcl (create_buttons): Make toolbar always attached
- to source window.
-
- * toolbar.tcl (build_win): Always display toolbar and
- menubar attached to source window.
-
- * prefs.tcl (pref_set_defaults): Removed toolbar prefs.
-
- * manage.tcl (manage_init): Remove hack to change preferences
- names.
- (manage_init): Remove toolbar and toolbar prefs code.
- (manage_create): Remove toolbar code.
- (manage_open): Remove toolbar code.
- (manage_find): Remove toolbar code.
- (manage_delete): Remove toolbar code.
- (manage_restart): Remove toolbar code.
-
-Fri Mar 27 19:52:53 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * toolbar.tcl (create_menu_items): Do not disable preferences.
-
- * src.tcl (reconfig): Rewrite to not destroy window.
- Symbolic fonts are a blessing!
- Pass the image handles for our breakdots to makeBreakDots.
- (file): Move breakpoint/tracepoint insertion to a separate function...
- (display_breaks): .... this one.
- (location): Move the block which fills combo boxes to top in
- case an error causes us to exit early.
- (makeBreakDot): Accept an optional image handler so that it can be
- configured instead of created.
-
- * global_pref.tcl (build_win): Carry around a list of all changable
- fonts in case more granularity is needed. (Windows cannot change
- menu font...) Disable menu font for windows.
- (ok): Check the list of changable fonts.
- (cancel): Check the list of changable fonts.
- (apply): Check the list of changable fonts.
-
- * console.tcl (reconfig): New (empty) method to handle preference
- changes.
-
-Fri Mar 27 16:08:57 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * global_pref.tcl (ok): Must use preferences for comparison. Don't
- "manage restart" unless needed.
- (cancel): Don't configure the font -- changing the preference will do
- it automagically.
-
-Fri Mar 27 14:21:02 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * toolbar.tcl (create_menu_items): Use gdbtk_quit to initiate a quit.
-
- * src.tcl (do_key): Use gdbtk_quit to initiate a quit.
-
- * prefs.tcl (pref_save): Set a default value for WIN.
- Don't "manage restart".
- (pref_set_defaults): Register a quit hook to save preferences.
- (pref_quit): Call pref_save to save all preferences when we quit.
-
- * manage.tcl (manage): Add "quit".
- (manage_init): Register a gdb_quit_hook.
- (manage_delete): Instead of guessing when and what to ask to confirm
- a quit, call gdbtk_quit.
- (manage_quit): New procedure. This is called from the gdb_quit_hook to save
- window active'ness and geometries by calling manage_save.
-
- * interface.tcl: Define "gdb_quit_hook".
- (gdbtk_quit): New procedure to call whenever a quit is requested.
-
- * global_pref.tcl (ok): Do not save preferences here.
-
-Fri Mar 27 12:21:07 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * tracedlg.tcl (TraceDlg): Wait until idle to deiconify ourselves.
-
- * global_pref.tcl (Globalpref): Withdraw window before creating and
- deiconify it when idle.
- (cancel): Let the window manager destroy us.
- (ok): Let the window manager destroy us.
-
- * target.tcl (GdbLoadPref::constructor): Withdraw window before creating
- and deiconfiy it when idle.
-
- * memory.tcl (MemWin::constructor): Withdraw window before going
- busy.
-
- * register.tcl (RegWin::constructor): Withdraw window before going
- busy.
-
- * src.tcl (SrcWin::constructor): Withdraw window before creating and
- deiconify it when idle.
-
-Fri Mar 27 10:52:30 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * target.tcl: Fix entry for temotetcp.
-
- * main.tcl (set_target_name): Build correct gdb_target_cmd.
-
-Fri Mar 27 11:23:18 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * target.tcl: (build_win) added call to change_target to
- get the correct entry widgets when the dialog is opened.
-
-Fri Mar 27 01:43:41 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * target.tcl: Add simulator and remotetcp targets to
- target database. Change all the gdb/load/$target/foo
- preferences to gdb/load/$target-foo because the prefs
- code expects gdb/section/varname. The extra slash confuses
- it.
- (set_saved): Add saved_portname and saved_hostname for TCP.
- (write_saved): Add saved_portname and saved_hostname for TCP.
- (fill_rates): change states of hostname and portnum entry widgets.
- (fill_targets): Add fake remotetcp entry in target list.
- (change_baud): When switching between tcp and serial targets
- pack or forget the appropriate widgets.
- (build_win): Create hostname and port number entry widgets.
- (change_target): Update hostname and portnum widgets.
-
- * prefs.tcl (pref_save): Add 'load' as a section to be saved.
- Set gdb/load/target to 'exec'.
-
- * manage.tcl (_manage_null_handler): Deleted.
-
- * download.tcl (download_it): Don't call IDE functions
- unless GDTK_IDE is set.
-
- * main.tcl (gdbtk_tcl_preloop): Get name of executable
- if one was supplied on command line.
- (set_target_name): Save target name as preference.
- (run_executable): Call set_target.
-
-Fri Mar 27 00:23:46 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * src.tcl (location): Catch error of getting location of main.
-
- * prefs.tcl (pref_set_defaults): Add gdb/toolbar/active.
- Add trace for global/fixed font to update src-font.
- (pref_read): Add code to deal with global preferences.
- (pref_save): Add code to deal with global preferences.
- (pref_src-font_trace): Trace function which set src-font to global/fixed.
-
- * global_pref.tcl (build_win): Relayout font selectors and add a selections
- for menu and default fonts.
- Rename Save to OK and Quit to Cancel, renaming methods, too.
- (font_changed): Add arguments to facilitate multiple fonts.
- (reconfig): Define as empty.
- (ok): Rewrite to facilitate multiple fonts.
- (cancel): Rewrite to facilitate multiple fonts.
- (apply): Rewrite to facilitate multiple fonts.
-
- * manage.tcl (manage_restart): Call gdbtk_idle to reset the toolbar after
- it is recreated.
-
-Thu Mar 26 23:49:26 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * tdump.tcl, tfind_args.tcl: New files.
-
-Thu Mar 26 22:29:28 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * tracedlg.tcl: (config) commented out grab. Made window non-modal.
- (destructor) do not release grab.
- (done) do not reinstall grab.
-
- * toolbar.tcl: (create_buttons) changed buttons for the tracepoint
- case to open tdump window, and tracepoint window.
- (create_menu_items) change Run menu to do tstart, tstop for tracepoint
- case. Changed View menu to show tracepoint window for tracepoint case.
- Changed 'Control' menu to 'Trace' menu for tracepoint case, with
- tfind commands.
-
- * srcbar.tcl: (create_buttons) changed the buttons for the
- tracepoint case to do tfind commands.
- (_set_trace) new method. Toggles tstart/tstop button.
-
- * src.tcl: (config) decide defatul action for left click on
- source based on 'mode' preference.
- (bp_line) ditto.
- (config_win) modify pop upmenu on source window to display only
- 'set tracepoint'.
-
- * prefs.tcl: (pref_set_defaults) added preference gdb/mode for
- tracepoints or breakpoint display.
-
- * manage.tcl: (manage_init) added tracepoint window, args windows
- for tfind, tdump window.
- (manage_open) use eval in call to manage_create.
-
- * bp.tcl: (build_win) added PassCount to the display and modified
- the menus for the tracepoint case to display actions.
- (bp_add) display pass_count too in the tracepoint list.
- (bp_select) changed indexes of menu entries to be entries names.
- added field passcount to selection for tracepoints.
- (bp_modify) added passcount for tracepoints.
- (bp_delete) added passcount for tracepoints.
- (get_actions) new method
- Added new public member "tracepoints" to decide which kind of window
- needs to be displayed.
-
- * Makefile: added new files tfind_args.tcl and tdump.tcl.
-
- * tclIndex: regenerated
-
-Thu Mar 26 14:23:00 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * main.tcl (set_target_name): Make target dialog always
- on top.
-
- * target.tcl (build_win): Bind Return to save.
- (GdbLoadPref): Denter dialog on screen.
-
-Thu Mar 26 14:16:36 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * memory.tcl (update_address): Catch errors to update_addr so that
- we do not error and leave the GUI busy.
-
-Thu Mar 26 13:51:58 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * toolbar.tcl (create_menu_items): Remove "Cygnus
- Foundry Tour" and "Submit a PR" from the menu.
-
- * src.tcl (file): Set title to GDB.
-
- * manage.tcl (manage_init): Set About name.
-
- * main.tcl (set_target): Set title to GDB.
-
- * interface.tcl (gdbtk_tcl_query): Set title correctly.
-
- * Makefile: Remove download_pref.tcl.
-
-Thu Mar 26 11:33:02 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * Makefile: Add target.tcl to list of sources.
-
- * tclIndex: Rebuilt.
-
- * target.tcl (GdbLoadPref): Trace changes to gdb_loaded.
- (target_trace): New procedure. This is invoked by a write trace
- to gdb_loaded.
-
- * interface.tcl (gdbtk_busy): New procedure to run all busy hooks
- (gdbtk_update): New procedure to run all update hooks
- (gdbtk_idle): New procedure to run all idle hooks. Also runs the
- no inferior hooks if no inferior has been created.
- Rename old gdb_idle_hook to gdb_update_hook for clarity.
- Change all references of run_hooks to use gdbtk_busy, gdbtk_idle, and
- gdtk_update.
-
- * download.tcl: Make busy/update/idle hook changes.
-
- * main.tcl: Make busy/update/idle hook changes.
- (set_exe): Clear gdb_loaded whenever a new exec file is selected.
-
- * manage.tcl: Make busy/update/idle hook changes.
-
- * mem_pref.tcl: Make busy/update/idle hook changes.
-
- * memory.tcl: Make busy/update/idle hook changes.
-
- * register.tcl: Make busy/update/idle hook changes.
-
- * src.tcl: Make busy/update/idle hook changes.
-
- * stack.tcl: Make busy/update/idle hook changes.
-
- * variables.tcl: Make busy/update/idle hook changes.
-
- Merged with Foundry 1.0:
- Wed Mar 25 14:22:28 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * register.tcl (reconfig): Call busy and idle hooks.
-
- * memory.tcl (update_address): Call busy and idle hooks.
-
- Wed Mar 25 11:38:49 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * src.tcl (location): Fix typo.
-
- Tue Mar 24 21:03:01 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * src.tcl (location): If gdb_listfuncs returns an error, display
- an error message that says the file was either not found or contained
- no debugging information.
- (location): When disassembling, put busy and idle calls before
- and after. Set "NoRun" to indicate the busy hook should not
- display the stop sign because the target isn't running, GDB may
- just take a few seconds to do the disassembly.
- (busy): Hack to support NoRun mode.
-
- * srcbar.tcl (_set_runstop): Add another case to disable the
- Run icon instead of changing it to a stop sign.
-
- * main.tcl (set_exe): If the file has no debugging information,
- display an error message and exit. This should only happen with
- intentionally stripped files.
-
- Tue Mar 24 17:04:36 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * mem_pref.tcl (build_win): Keep track of all widgets that should be
- disabled when busy.
- (busy): New method which disables anything that could cause trouble.
- (idle): New method which re-enables anything that "busy" disables.
- (apply): Call busy and the busy hooks before doing update of memory
- window. Then call idle and the idle callbacks when we are done.
-
- Tue Mar 24 12:07:52 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * src.tcl (location): Filter out .s and .S files because
- Foundry does not yet support assembly source debugging.
-
- Tue Mar 24 08:50:46 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * register.tcl (but3): Don't pop up the right-click menu if we are
- running.
-
- * download.tcl (download_it): Force an update so that all windows
- are created and get their busy hooks called.
-
- * console.tcl (invoke): Make sure we are not running.
- (busy): New method.
- (idle): New method.
-
- Mon Mar 23 15:00:57 1998 Drew Moseley <dmoseley@cygnus.com>
-
- * src.tcl: (location): Assume we are locating main() if the target is
- not running and we can't figure out which function we are in.
-
- * main.tcl (run_executable): Change to assembly mode when we try to
- load a blank file. This usually means that source level debugging
- was not enabled when this file was compiled.
-
- Reverse the parameters to src method::location() method invocation so
- they are in the correct order
-
- Mon Mar 23 12:04:23 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * src.tcl (update): Comment out debug lines.
-
- * main.tcl (set_target_name): If the target name changes,
- force a new "file" command to be issued by setting
- gdb_exe_changed.
-
- Sat Mar 21 00:09:37 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * download.tcl (download_it): Remove call to run_idle_hooks.
-
- * src.tcl (no_inferior): Call set_execution_status.
-
- * bp.tcl (bp_modify, bp_delete): Change to take an entry
- number.
- (update): Sometimes "create" calls are for existing
- breakpoints and should be "modified" calls. Detect this
- and pass the entry number to bp_delete or bp_modify.
-
- Fri Mar 20 22:50:55 1998 Tom Tromey <tromey@cygnus.com>
-
- * console.tcl (insert): Remove all \r characters from string to be
- inserted.
-
- Fri Mar 20 01:55:14 1998 Keith Seitz <keiths@cygnus.com>
-
- * watch.tcl (validateEntry): Fencepost for running.
-
- * variables.tcl (VariableWin): Use "add_hook_before".
- (idle_done): New gdb_idle_done_hook for this object.
- (update): Don't call enable_ui here.
- (enable_ui): Change cursor for this object.
- (disable_ui): Ditto.
- (no_inferior): Ditto.
-
- * toolbar.tcl (GDBToolBar): Use "add_hook_before".
-
- * stack.tcl (StackWin): Use "add_hook_before".
- (StackWin): Encapsulate creation of this object with
- busy and idle hooks so that the user gets some feedback and to
- prevent other widgets from attempting to update.
- (update): Add some sanity checking so that we do not update with
- garbage in the window.
- (idle_done): New gdb_idle_done_hook for this object.
- (change_frame): Fencepost for running.
- (busy): New gdb_busy_hook for this object.
- (no_inferior): New gdb_no_inferior_hook for this object.
- (cursor): New helper method to set the cursor of all subwindows.
-
- * src.tcl (SrcWin): Use "add_hook_before".
- (toggle_updates): Use "add_hook_before".
- (stack): Encapsulate creation of the stack object with
- busy and idle hooks so that the user gets some feedback and to
- prevent other widgets from attempting to update.
- (idle_done): New gdb_idle_done_hook for this object.
- (set_execution_status): When Program is Terminated..., reset
- gdb_running.
- (config_win): Pull mouse pointer cursor assignments in text widget
- out into a separate function.
- (bind_src_tags): New method to set the cursor for the window's text
- widget tags.
- (disable_ui): Call bind_src_tags to change cursor to "watch".
- (enable_ui): Ditto.
- (no_inferior): Ditto.
- (cursor): New helper method to set the cursor of all subwindows.
-
- * register.tcl (RegWin): Encapsulate creation of this object with
- busy and idle hooks so that the user gets some feedback and to
- prevent other widgets from attempting to update.
- Use "add_hook_before".
- (reg_select_up): Fencepost for running.
- (reg_select_down): Fencepost for running.
- (reg_select_right): Fencepost for running.
- (reg_select_left): Fencepost for running.
- (reg_select): Fencepost for running.
- (edit): Fencepost for running.
- (idle_done): New gdb_idle_done_hook for this object.
- (busy): New gdb_busy_hook for this object.
-
- * memory.tcl (MemWin): Encapsulate creation of this object with
- busy and idle hooks so that the user gets some feedback and to
- prevent other widgets from attempting to update.
- Use "add_hook_before".
- (create_prefs): Fencepost for running.
- (idle_done): New gdb_idle_done_hook for this object.
- (edit): Fencepost for running.
- (newsize): Fencepost for running.
- (busy): New method to block UI while running inferior.
- (do_popup): Fencepost for running.
- (cursor): New method to change the cursor definition for this
- object.
-
- * manage.tcl (manage_init): Use "add_hook_before".
-
- * main.tcl (run_executable): Use "run_idle_hooks".
-
- * ide.tcl (gdbtk_ide_init): Don't create the source window here.
-
- * interface.tcl: Define new hook "gdb_idle_done_hook" -- to be called
- when the debugger does completely idle to allow input to objects
- again.
- (run_idle_hooks): New procedure to wrap the idle hooks.
- (gdbtk_tcl_idle): Split the idle callbacks into two parts: one that
- only updates widgets and one that tells widgets to accept input
- again.
-
- * download.tcl (Download): Use add_hook_before instead of add_hook.
- (download_it): Use run_idle_hooks instead running the idle hooks
- directly.
-
- * bp.tcl (BpWin): Use add_hook_before instead of add_hook.
-
- Wed Mar 18 18:59:00 1998 Sean Mahan <smahan@cygnus.com>
-
- * download.tcl (download_hash): Added an 'update' so the
- status bar would work on an MBX board.
-
- Wed Mar 18 01:50:19 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * prefs.tcl (pref_set_defaults): Define gdb/src/tab_size
- to default to a tab size of 4.
-
- * src.tcl (setTabs): Set up tabs correctly.
-
- * download.tcl (download_it): Set correct state after
- user cancels download.
-
- Tue Mar 17 12:30:23 1998 Tom Tromey <tromey@cygnus.com>
-
- * console.tcl (throttle): New public variable.
- (insert): Delete initial text when past the throttle limit.
-
- Tue Mar 17 13:31:38 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * ide.tcl (gdb_exit_check): Do not let gdb confirm the quit if we
- are downloading.
-
- Tue Mar 17 13:25:22 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * console.tcl (insert): Force update of screen.
-
- Mon Mar 16 10:22:00 1998 Sean Mahan <smahan@cygnus.com>
-
- * toolbar.tcl (create_menu_items): Added 'Submit PR' to the
- help menu. For PR15334
-
- Sun Mar 15 15:01:27 1998 Tom Tromey <tromey@cygnus.com>
-
- * interface.tcl (gdbtk_tcl_fputs): Don't call update.
-
- * src.tcl (build_win): Changed capitalization on balloon help.
-
- Fri Mar 13 10:01:48 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * src.tcl (mode): Add a horizontal scrollbar to the assembly pane
- of SRC+ASM mode when necessary.
-
- Fri Mar 13 00:47:59 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * main.tcl (run_executable): Don't force downloads for sim.
-
- * download.tcl (download_it): Don't bother calling calling set_baud
- for sim.
-
- * manage.tcl (manage_delete): Deregister the window before deleting
- it to prevent those annoying bgerror messages.
-
- Thu Mar 12 15:28:22 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * download.tcl (Download): Define a list of all sections.
- (update_download): Loop through the list of sections, updating the
- current section's progress and marking any previously loaded sections
- as done, if needed.
- (do_download_hooks): New procedure.
- (download_hash): Use a timer to force update of GUI at regular
- intervals -- GUI should not update 10,000 times a second.
-
- Tue Mar 10 06:32:24 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * interface.tcl (gdbtk_tcl_query): Allow caller to specify the default
- button. If none is specified, it is set to 'yes'.
-
- * manage.tcl (manage_delete): While inferior is running, gdb_cmd returns
- immediately, so we need to manually ask the user if he wants to quit.
-
- Tue Mar 10 10:52:09 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * download.tcl (download_it): Change where old breakpoints
- are cleared.
- (done): Set focus on "OK" or delete.
-
- Tue Mar 10 05:23:42 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * src.tcl (do_key): New method to wrap all keypresses.
- (mode): Use do_key method.
- (config_win): Use do_key method.
-
- Mon Mar 9 23:06:21 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * src.tcl (download_progress): Add an optional message
- parameter to the function for use with error messages.
- Don't set_status twice on cancel. Call update if
- load fails.
-
- * download.tcl (done): If 'msg' is set, it should be
- displayed and download has failed. Update all source
- windows.
- (cancel): Don't delete window here. Let it get deleted
- after call to method 'done'.
- (download_it): If download failed, call done method
- with error message. Force reissue of target command.
- Handle set_target failures.
-
- * main.tcl (set_target): Check result of target command
- to see if the user cancelled the command.
- (run_executable): Use gdb_program_has_run instead of
- gdb_app_running, which was removed everywhere. Force
- download when gdb_program_has_run. If user cancels download
- before the download starts, preserve previous state.
-
- Mon Mar 9 15:06:21 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * console.tcl (invoke): After gdb_immediate() finishes
- check to see if the window is still there.
-
- * main.tcl: Initialize gdbtk_state(console).
-
- * interface.tcl: Remove some unused globals. Replace gdb_console
- with gdbtk_state(console).
- (gdbtk_tcl_readline_*): Don't set gdbtk_state(console) every
- time. Let manage.tcl do it.
-
- * manage.tcl (manage_create): Replace gdb_console with
- gdbtk_state(console). Check for windows that were deleted,
- but not actually gone yet.
- (manage_delete): Replace gdb_console with gdbtk_state(console).
-
- Mon Mar 9 09:08:11 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * watch.tcl (build_win): Tweak layout of the entry and button,
- switching to grid geometry manager.
-
-Thu Mar 26 01:22:23 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * target.tcl: New file. Implements target dialog.
-
- * srcbar.tcl (_set_run): Remove because it was no longer used.
-
- * util.tcl (freeze): Only call idewindow_freeze when
- using the IDE.
-
- * prefs.tcl (pref_set_defaults): Set default tab size to 4.
-
- * src.tcl (location): If gdb_listfuncs cannot find
- functions, display error message.
- (setTabs): Set real tabs according to gdb/src/tab_size.
-
- * main.tcl (set_exe): Check to see if file was stripped.
- Cannot debug without some symbols.
- (set_target_name): If target changes, set gdb_exe_changed
- so new "file" command will be sent. When not using IDE,
- display target requester.
-
- * manage.tcl: Set loadpref to GdbLoadPref.
-
-Wed Mar 25 14:13:52 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * manage.tcl (manage_init) added tracedlg and actiondlg windows.
-
-Wed Mar 25 14:08:51 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * interface.tcl (gdbtk_tcl_pre_add_symbol): New procedure.
- (gdbtk_tcl_post_add_symbol): New procedure.
-
- * src.tcl (set_execution_status): Use "set_status" to write to the
- status bar, not "set Status".
-
-Mon Mar 23 13:41:39 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * memory.tcl: Changes to support new faster gdb_get_mem().
- (do_popup): Add "Go To" and Open New Window" to the popup
- menu.
-
-Sat Mar 21 21:18:06 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- Merged changes from Foundry (list follows in reverse chronological
- order)
-
- Sean Mahan <smahan@cygnus.com>
- * download_pref.tcl (help): Added method to display context
- sensitive help.
-
- Keith Seitz <keiths@onions.cygnus.com>
- * src.tcl (bp_line): Don't insert breakpoints if we're running.
- (disable_ui): Disable selections. Workaround for TkTextDisplay bug.
- (enable_ui): Enable selections.
- (no_inferior): Enable selections.
-
- Tom Tromey <tromey@cygnus.com>
- * toolbar.tcl (create_menu_items): Use gdb_immediate, not gdb_cmd,
- so that output appears in console window.
- * src.tcl (bp_line): Use gdb_immediate when running "continue".
- (mode): Use gdb_immediate, not gdb_cmd, so that output appears in
- console window.
- (config_win): Likewise.
- * srcbar.tcl (create_buttons): Use gdb_immediate, not gdb_cmd, so
- that output appears in console window.
- * console.tcl (lvarpush): Removed.
- (_insertion): New method.
- (_saved_insertion): New private variable.
- (constructor): Don't let user use mouse to put cursor outside
- command line.
- * src.tcl (build_win): Use global/status font on status bar.
- * interface.tcl (gdbtk_tcl_query): Moved vwait out of `if'
- statement -- must vwait in all cases, not just in case when
- question is actually asked.
-
- Keith Seitz <keiths@onions.cygnus.com>
- * variables.tcl (deleteTree): Reset Locals and ChangeList, too.
-
- Martin M. Hunt <hunt@cygnus.com>
- * toolbar.tcl (enable_ui): Don't always set stepi and nexti
- buttons on.
-
- Keith Seitz <keiths@onions.cygnus.com>
- * toolbar.tcl (no_inferior): Instead of enabling/disabling the
- individual menus on Windows, disable each menu's entries.
- (disable_ui): Ditto.
- (enable_ui): Ditto.
-
- Keith Seitz <keiths@onions.cygnus.com>
- * manage.tcl (manage_delete): Catch destruction of the src window when
- downloading and ask user if this is what he intends.
- (manage_init): Don't install idle, busy, and no_inferior hooks. Allow gdb
- to exit whenever the user wants to.
- * srcbar.tcl (cancel_download): download_cancel_ok is a global.
-
- Martin M. Hunt <hunt@cygnus.com>
- * ide.tcl (receive_file_changed): Minor fix when a new
- executable is built when GDB is running.
-
- Martin M. Hunt <hunt@cygnus.com>
- * bp.tcl (bp_delete): If a selected breakpoint is deleted,
- set "selected" to 0.
-
- Keith Seitz <keiths@onions.cygnus.com>
- * srcbar.tcl (cancel_download): New method to cancel downloads. Needed
- to cancel download dialog-enabled downloads.
- (_set_runstop): Call cancel_download.
- * download.tcl (Download::constructor): Make sure to set the toolbar
- properly so that the Stop/Cancel button cancels a download.
- (download_it): Force the CANCEL to all download_progress_hook's.
- * src.tcl (download_progress): Add special section identifier for
- canceled downloads.
- (SrcWin::destructor): Pass the state_hook's command to remove_hook.
-
- Sean Mahan <smahan@cygnus.com>
- * toolbar.tcl (create_menu_items): Help menu follows "Help Topics"
- standard (PR 15082).
-
- Tom Tromey <tromey@cygnus.com>
- * interface.tcl (gdbtk_tcl_query): Consolidate Windows case; must
- `vwait' even when question is already being asked.
-
- Martin M. Hunt <hunt@cygnus.com>
- * interface.tcl (gdbtk_tcl_query): Only use ide_messageBox
- on Windows.
-
- Martin M. Hunt <hunt@cygnus.com>
- * register.tcl: Catch several gdb_register commands
- so errors don't bother us.
- * variables.tcl (destructor): Remove all hooks.
-
- Martin M. Hunt <hunt@cygnus.com>
- * download.tcl (done): Don't let seconds be zero.
- * manage.tcl (manage_disable_all): Don't ever disable "."
-
- Martin M. Hunt <hunt@cygnus.com>
- * main.tcl (run_executable): Removed delete_breakpoints
- stuff.
- * download.tcl (download_it): Removed delete_breakpoints
- stuff. Clear any breakpoints at exit and main before
- restarting. They get set again automatically if the
- preferences say they should.
- (Download): Don't call freeze on download window, because
- it stops updating when we do.
- (update): Renamed to update_download to avoid confusion.
- * src.tcl (mode): When changing from SRC+ASM to another
- mode, unset "awin".
- (bp_line): On a "Continue to Here" don't try to
- restore breakpoints that didn't exist before.
-
- Tom Tromey <tromey@cygnus.com>
- * interface.tcl (gdbtk_tcl_query): Set -parent on dialog.
-
- Martin M. Hunt <hunt@cygnus.com>
- * src.tcl (build_win): Set mode combobox width to 10.
- (goto_func): If a function name is an unmangled one,
- it is a C++ method so don't prepend filename when
- setting location. This is a kludge, but we are limited
- by the symtax the GDB command line parser will accept.
- (location): When loading function combobox,
- remember which names are unmangled. Change width of
- function combobox dynamically to better accomodate
- those long C++ names.
-
- Martin M. Hunt <hunt@cygnus.com>
- * src.tcl (bp_line): When doing a "continue to here",
- first save states of all breakpoints then restore
- when finished.
- (config_win): Uncomment "Continue to Here" menu item.
-
- Martin M. Hunt <hunt@cygnus.com>
- * src.tcl (location): Use ide_cygwin_path on Windows
- to change project root to the right format.
-
- Drew Moseley <dmoseley@cygnus.com>
- * main.tcl: (run_executable): Modified to call download_it
- with the parameter indicating whether to delete breakpoints.
- If GDB is loaded ($gdb_loaded == 1) and the app is running
- ($gdb_app_running == 1) then we don't delete the breakpoints.
- All other situations will require deleting the breakpoints.
- This allows us to redownload and run the same executable w/o
- losing the breakpoint information.
- * download.tcl: (download_it): Modified this routine to
- take a boolean parameter indicating whether to delete
- the breakpoints before downloading.
-
- Sean Mahan <smahan@cygnus.com>
- * toolbar.tcl (create_menu_items): Couldn't use 'helpdir'
- variable so used Paths(prefix) and added help.
-
- Martin M. Hunt <hunt@cygnus.com>
- * src.tcl (set_state): Turn off debugging.
- (location): Map windows pathnames into form GDB uses
- internally.
- (bp_line): Use gdb_set_bp to set breakpoints on
- a specific line in a file.
-
- Martin M. Hunt <hunt@cygnus.com>
- * stack.tcl (update): Skip over any empty elements
- in parsing the stack line to get the correct PC.
-
- Keith Seitz <keiths@onions.cygnus.com>
- * download.tcl (download_it): Run gdb_busy_hook's.
- If anything fails, make sure that the no_inferior_hook's are run.
- Note errors that occur during downloading, ignoring the
- "cancelled download" message. If an error occurs, set the
- global gdb_download_error to the error message so that it can
- be shown to the user later. Don't run the idle hooks if nothing
- * src.tcl (download_progress): Do not rely on the value of
- "download_cancel_ok" -- it is cleared in download_it.
- Reorder code to take advantage of gdb_loaded and gdb_download_error
- to determine if a download was canceled, successful, or failed due
- to an error. Truncate the "DOWNLOAD FINISHED:" message so that it
- will fit into the status bar given the recent font changes.
- (busy): If gdb_loaded, set the status bar to read "Program is running."
- Otherwise, don't touch it.
- (config_win): Comment out "Continue to here" right-click menu item
- until it can properly preserve breakpoint state.
- (no_inferior): Configure the toolbar to -runstop 0. All of these
- toolbar references should be done via the busy hook by the SrcBar
- class itself someday...
-
- Sean Mahan <smahan@cygnus.com>
- * toolbar.tcl (create_menu_items): Added ability to launch
- the tour help file from the help menu.
-
- Martin M. Hunt <hunt@cygnus.com>
- * manage.tcl, ide.tcl: Disable some debugging messages.
-
- Martin M. Hunt <hunt@cygnus.com>
- * src.tcl (set_state): When loaded state changes, invalidate
- current file.
-
- Martin M. Hunt <hunt@cygnus.com>
- * src.tcl (SrcWin): Change default title to "Foundry Debugger".
- (build_win): Change name and function combobox heights to 0.
- Set status bar font to src-font.
- (name): Rewrite to use _files array. This array allows us
- to map full pathnames with short names that are easily displayed.
- (file): Call set_name to update name combobox.
- (location): Call set_name to update name combobox. When setting
- the function combobox, adjust height to a maximum of 10. CLear
- filename combobox if there is no valid filename. When setting the
- filename combobox, adjust height to a maximum of 10. Create
- _files array mapping full pathnames to short names. For IDE, use
- vmake/source-files and project-root to build full pathnames.
- When changing mode, save current line. Don't mark current line
- with PC_TAG if gdb_running is 0.
- (set_name): New function. Update the name combobox, using
- the short name from _files if available.
- * bp.tcl (bp_modify, bp_add): Use short file name from
- _files global array.
-
- Keith Seitz <keiths@onions.cygnus.com>
- * variables.tcl (VariableWin): Add idle, busy, and no inferior hooks.
- (selectionChanged): Use Running fencepost.
- (updateNow): Use Running fencepost.
- (editEntry): Use Running fencepost.
- (postMenu): Use Running fencepost.
- (setDisplay): Use Running fencepost.
- (open): Use Running fencepost.
- (close): Use Running fencepost.
- (enable_ui): Define new procedure to install fencepost.
- (disable_ui): Define new procedure to remove fencepost.
- (no_inferior): Define new procedure to remove fencepost and clear tree.
- (Running): New protected data. This is used as a fencepost in this object.
- * main.tcl: Run gdb_no_inferior_hook's when done initializing.
- * src.tcl (disable_ui): Disable the combo boxes, too.
- (enable_ui): Enable the combo boxes, too.
- * download.tcl (download_it): Run gdb_no_inferior_hooks, too.
-
- Martin M. Hunt <hunt@cygnus.com>
- * main.tcl: Move IDE help initialization to ide.tcl.
- * ide.tcl (gdbtk_ide_init): Move help system
- initialization here.
-
- Sean Mahan <smahan@cygnus.com>
- * main.tcl: Initialized help sub-system for the ide.
-
- Tomy Hudson <thudson@thudson5.cygnus.com>
- * prefs.tcl: Changed COM1 back to com1 per Martins request.
-
- Martin M. Hunt <hunt@cygnus.com>
- * src.tcl (file): Call gdb_loadfile to do most of the
- work.
-
- Tomy Hudson <thudson@thudson5.cygnus.com>
- * prefs.tcl: Changed "com1" to "COM1"
-
- <dmoseley@cygnus.com>
- * main.tcl: (run_executable): Added code to test for app_running.
- If the app has been started and the user requests a "run", then
- we must redownload to ensure that the global initialized data is
- handled properly.
- * download.tcl: (download_it): See above note.
-
- Sean Mahan <smahan@cygnus.com>
- * toolbar.tcl (create_menu_items): changed "Tutorial" to "Cygnus
- Foundry Tour" in the Help menu.
-
- Tom Tromey <tromey@cygnus.com>
- * memory.tcl (mem_del): "destroy forget" is invalid; use "destroy"
- instead.
- * interface.tcl (gdbtk_tcl_query): Only ask each question once.
-
- Martin M. Hunt <hunt@cygnus.com>
- * manage.tcl (manage_init): Initialize new global
- _manage_enabled_flag to 1.
- (manage_disable_all): Only disable if
- _manage_enabled_flag is 1.
- (manage_enable_all): Only enable if _manage_enabled_flag
- is not 1.
-
- Martin M. Hunt <hunt@cygnus.com>
- * manage.tcl (manage_iconify): Check for toplevel
- of "." before doing anything.
- * main.tcl (set_target_name): Use "pref getd" in
- case port is undefined.
-
- Keith Seitz <keiths@onions.cygnus.com>
- * toolbar.tcl (GDBToolBar::constructor): Add appropriate idle, busy, and
- no-inferior hooks for this class.
- (create_buttons): Add all buttons to two lists so we can disable or enable
- them according to the inferior's run state.
- (create_menu_items): Same with the menus.
- * srcbar.tcl (create_buttons): Add all buttons to two lists so we can disable
- or enable them according to the inferior's run state.
- (create_menu_items): Same with the menus.
- (_set_run): Don't do anything to disable UI elements: the idle, busy, and
- no_inferior hooks will take care of it.
- (_set_runstop): Don't do anything to disable UI elements: the idle, busy, and
- no_inferior hooks will take care of it.
- * manage.tcl (manage): Add two new manage protocols: enable_all and
- disable_all.
- (manage_disable_all): New procedure to disable window manager functions
- such as window deletions.
- (manage_enable_all): New procedure to undo any changes made by
- manage_disable_all.
- (_manage_set_property): New helper procedure for above.
- (manage_init): Install this module's idle, busy, and no_inferior hooks.
- * src.tcl (SrcWin::constructor): Add new no_inferior hook.
- (disable_ui): New procedure to disable ui elements.
- (enable_ui): New procedure to enable_ui elements.
- (no_inferior): New procedure to reset GUI.
- (SrcWin::Running): New protected variable. A fencepost for the above
- hooks.
- (do_popup): Use above fencepost.
- (showBalloon): Use above fencepost.
- * main.tcl: Define new hook " gdb_no_inferior_hook".
-
- Martin M. Hunt <hunt@cygnus.com>
- * src.tcl (SrcWin): Immediately set title name
- to "Debugger".
-
- Martin M. Hunt <hunt@cygnus.com>
- * download_pref.tcl (LoadPref): Make window transient.
-
- Martin M. Hunt <hunt@cygnus.com>
- * register.tcl (build_win): Set scrollbars to auto
- on Unix.
- * stack.tcl (build_win): Set scrollbars to auto
- on Unix.
- * memory.tcl (build_win): Restore proper resize
- functioning on Unix.
- * bp.tcl (build_win): Fix problem with merging Tom's
- sizebox change. Fix Tom's change so scrollbars aren't
- always on on Unix, at least.
- * interface.tcl (gdbtk_pc_changed): Called from GDB when
- the PC is changed with a "set $pc" command.
- (gdb_show_command, gdb_args, gdb_stack_trace,
- gdb_docstring,gdb_stack_depth, gdb_stack_frame): Removed.
-
- Martin M. Hunt <hunt@cygnus.com>
- * memory.tcl (destructor): Destroy memory prefs window
- if one exists.
- (create_prefs): Make prefs window transient.
- * util.tcl (freeze): Make keep_raised an option.
-
- Martin M. Hunt <hunt@cygnus.com>
- * ide.tcl (receive_file_changed): Ignore object file
- changes. On source file changes, put up a messagebox
- warning the user. Change both messageboxes to be system
- modal, which seems to just mean they will be on top.
-
- Martin M. Hunt <hunt@cygnus.com>
- * download.tcl (download_it): Reset download_cancel flag.
- * src.tcl: Create "tagtype" as a protected variable
- containing the current tag mode; PC, BROWSE, or STACK.
- Change all functions to use it.
- (mode): Fix problem with changing modes
- while browsing stack functions.
- (name): Add good filenames to the combobox history.
- (SrcWin): Turn off automatic history in name combobox.
- (file): If filename is not found, but is part of sources,
- put it in combobox followed by "(not found)"
- (location): Reorder and restructure this function to
- be more robust when files cannot be found or mode changes
- are required. When stack browsing, highlight PC if it is
- in the displayed area, and fix the off-by-1 problem
- with PCs saved on the stack.
- (update): Use lassign and new tagtype variable.
- (set_execution_status): Change message formats for MIXED
- and SRC+ASM modes.
- (mode): Update toolbar and mode display before calling
- location. Use tagtype so tag mode is preserved.
- * bp.tcl (bp_type): Deselect line before changing its
- type.
-
- Tom Tromey <tromey@cygnus.com>
- * bp.tcl (build_win): Use built-in sizebox of tixScrolledWindow.
- * watch.tcl (console): Set Sizebox to 0.
- * memory.tcl (build_win): Use built-in sizebox of
- tixScrolledWindow.
- * stack.tcl (build_win): Use built-in sizebox of
- tixScrolledWindow.
- * locals.tcl (build_win): Don't create sizebox.
- * variables.tcl (build_win): Use built-in sizebox of
- tixScrolledWindow.
- (Sizebox): New instance variable.
- * console.tcl (console): Use built-in sizebox of
- tixScrolledWindow.
- * register.tcl (build_win): Use built-in sizebox of
- tixScrolledWindow.
-
- Martin M. Hunt <hunt@cygnus.com>
- * main.tcl (set_target_name): Set port based on target
- name.
- (set_baud): Set baud rate based on target name.
- * srcbar.tcl: Change shortcuts to use () instead of <>.
- * download.tcl (download_it): Set download_verbose
- based on target name.
- * src.tcl (build_win): Set height to 0 for name and
- function comboboxes.
- (location): In IDE, use vmake/source-files property
- to fill name combobox.
-
- Keith Seitz <keiths@onions.cygnus.com>
- * variables.tcl (build_win): Set the variable window's
- default size to 40 chars.
-
- Martin M. Hunt <hunt@cygnus.com>
- * src.tcl (set_state): When loaded state changes,
- set program_has_run state to 0.
-
- Martin M. Hunt <hunt@cygnus.com>
- * src.tcl (set_status): Rewrite to handle temporary
- status messages.
- (set_execution_status): New function. Put a message
- about the current program status in the status bar.
- (trace_help): New function. Trace on changing ballon
- help messages. Write them in the status bar.
- * main.tcl (set_target): Comment out changing cursor.
-
- Martin M. Hunt <hunt@cygnus.com>
- * variables.tcl (changeValue): Trim string before
- comparing with "".
-
- Keith Seitz <keiths@onions.cygnus.com>
- * console.tcl (constructor): Set no wrap mode.
- * src.tcl (SrcWin::name): Make sure we ask gdb where the source file
- is before asking the source window to open it.
- (SrcWin::file): Do not ask gdb where the file is -- someone else
- already has. Set the file selector to the filename only once and
- only if successful finding the file.
- (SrcWin::location): Add flag idicating that a file load has failed.
- Resolves recursive loop with SrcWin::mode and SrcWin::location.
- Make sure the file and function selectors are filled only once.
- (SrcWin::mode): Add error flag to indicate that a file load failed.
- Resolves recursive loop with SrcWin::location.
- Make sure we exit with the proper mode set on the source window.
- (SrcWin::current_addr): Define a default value of 0x0.
- * console.tcl (invoke): Use new gdb_immediate command instead of
- gdb_cmd.
- (insert): Add all errors to the end of the text widget.
- Send errors to end of text widget, not insertion pt.
- (einsert): Send errors to end of text widget, not insertion pt.
- * interface.tcl (gdbtk_tcl_readline_begin): Insert message into
- command window so that the user sees messages like "Enter commands,
- one per line. Enter 'end' when finished."
- * main.tcl: Initialize gdbtk_state(readline).
-
- Tom Tromey <tromey@cygnus.com>
- * manage.tcl (manage_open): Force focus onto toplevel.
- * mem_pref.tcl (build_win): Don't put <Return> binding on
- toplevel; instead put focus on OK button.
-
- Martin M. Hunt <hunt@cygnus.com>
- * main.tcl (set_target_name): Replace "com1" with
- the port name we really want to use.
- * bp.tcl (build_win): Use place manager for sizebox
- so it doesn't go away when window is resized.
- * stack.tcl (build_win): Fix stack window.
- * memory.tcl: Back out previous changes.
- * locals.tcl (build_win): Use place manager for sizebox
- so it doesn't go away when window is resized.
-
- Tom Tromey <tromey@cygnus.com>
- * mem_pref.tcl (build_win): Make OK button default.
- * ide.tcl (gdbtk_ide_init): Set gdb_pretty_name. Track changes to
- target-pretty-name property.
- * src.tcl (update_title): Display pretty name for target.
- * main.tcl (set_target): Display pretty name for target.
- (gdb_pretty_name): New global.
- * ide.tcl (target_pretty_name_changed): New proc.
- (receive_file_changed): Display pretty name for target.
- * download.tcl (download_it): Display pretty name for target.
- (console): Likewise.
-
- Thomas Hudson <thudson@cygnus.com>
- * bp.tcl (build_win): Added frame and sizebox to bottom.
- Returned geometry management to previous packing style
- and window layout.
- * stack.tcl (build_win): ditto
- * memory.tcl (build_win): ditto
- * watch.tcl (build_win): ditto
- * locals.tcl (build_win): ditto
-
- Martin M. Hunt <hunt@cygnus.com>
- * manage.tcl (manage_iconify): Catch iconify command.
- * download.tcl (download_it): If set_target fails,
- set gdb_downloading to 0 and return.
- * main.tcl (set_target): Handle target command timeouts.
- Pop up messagebox. Set cursor to "watch". Set title
- on source window. Return 0 on error.
-
- Martin M. Hunt <hunt@cygnus.com>
- * manage.tcl (manage_find): Fix to return a list of windows.
- * console.tcl (Console): Fix sizebox so it doesn't create
- a whole blank line and it doesn't mess up Unix.
- * register.tcl (build_win): Change "Show" to "Display".
-
- Tomy Hudson <thudson@cygnus.com>
- * console.tcl (build_win) Added frame and ide_sizebox to
- bottom of window.
- * stack.tcl (build_win) Added frame and ide_sizebox to
- bottom of window.
- * watch.tcl (build_win) Added frame and ide_sizebox to
- bottom of window.
- * locals.tcl (build_win) Added frame and ide_sizebox to
- bottom of window.
-
- Tom Tromey <tromey@cygnus.com>
- * memory.tcl (build_win): Updated -underline values.
-
- Martin M. Hunt <hunt@cygnus.com>
- * memory.tcl (init_addr_exp): New function. Set the
- initial address expression to the location of .data
- if it is defined. Otherwise use $pc.
-
- Tom Tromey <tromey@cygnus.com>
- * bp.tcl (build_win): Changed packing so content fills window.
- Removed `g' and `a' frames. Changed gridding on labels.
- (bp_add): Changed gridding on new entries.
- * memory.tcl (build_win): Put spaces in front of all menu labels.
-
- Martin M. Hunt <hunt@cygnus.com>
- * download.tcl (download_it): Change error to messagebox.
-
- Tom Tromey <tromey@cygnus.com>
- * register.tcl (reg_display_list): Initialize to empty list.
- (init_reg_display_vars): Don't unset reg_display_list; set it to
- empty list.
- (delete_from_display_list): Likewise.
-
- Martin M. Hunt <hunt@cygnus.com>
- * ide.tcl (ide_run_server, ide_do_run_server): Take
- an optional argument to indicate if program should be
- run or simply downloaded.
- * console.tcl (Console): Enable scrollbars in both
- directions.
- * main.tcl: Moved keep_raised, sleep, and toggle_debug_mode
- to util.tcl.
- (set_exe): If exe changed, set gdb_target_changed
- to force new target command to be sent.
- (set_target_name): Check to see if gdb_target_changed.
- (run_executable): If exe or target changed, set gdb_loaded to
- 0, forcing a new download. If download only, try to
- display function main in source window.
- * util.tcl: New file.
- * hooks.tcl: Removed. Use version in libide.
- * Makefile: Add util.tcl.
- * download.tcl (Download): Call freeze to make modal window.
- (_map): Deleted.
- (download_it): Call set_baud, then set_exe then set_target.
- * mem_pref.tcl (build_win): Set default number of bytes
- to 128.
- * memory.tcl (build_win): Enable horizontal scrollbar
- when in resize mode. Anchor to top-left. Use "nb" to
- count actual number of bytes displayed, instead of "numbytes"
- which will be 0 when in resize mode.
- (delete_prefs): Deleted.
- * src.tcl (mode): Update mode combobox with new mode name.
- (location): In SRC+ASM mode if we step into a function without
- source code, unhighlight everything in the source pane and let
- the assembly pane show our current location.
- (build_win): Enable scrollbars in both directions.
- (set_state): Call update_title.
- (update_title): Don't set title if the target or exe has changed.
- (trace_variable): Couldn't figure out what this did that
- could be useful so delete it and everything that references it.
- * watch.tcl: Add description and copyright.
- * variables.tcl, interface.tcl, locals.tcl: Add copyright.
- * prefs.tcl, register.tcl: Add copyright.
-
- Tomy Hudson <thudson@cygnus.com>
- * register.tcl (reg_select_): Modified reg_select_* movement
- methods to use the register display list instead of
- a straight index.
-
- Tomy Hudson <thudson@cygnus.com>
- * register.tcl (unedit): Changed input focus to $ScrolledWin.$Editing
- in unedit. This allows arrow and tab key bindings to work
- after an edit.
-
- Tomy Hudson <thudson@cygnus.com>
- * register.tcl (build_win): Added key bindings and support
- for tab and arrow keys, including four new methods;
- reg_select_up,reg_select_down, reg_select_left, reg_select_right
- * register.tcl (build_win): Added spacing frame and ide_sizebox
- to window. Changed geometry manager to grid.
-
- Martin M. Hunt <hunt@cygnus.com>
- * stack.tcl (update): Only insert entries that have
- length. Break when matching entry in listbox is found.
- * src.tcl (config_win): Fix control-v binding so
- it doesn't paste on Windows. Cancel <Delete>
- binding.
-
- Martin M. Hunt <hunt@cygnus.com>
- * src.tcl (build_win): Force focus from toplevel
- down to text window.
- (mode): Restructure code to be clearer. Set focus
- when done.
-
- Tomy Hudson <thudson@cygnus.com>
- * src.tcl (mode): Modified key bindings for MIXED mode
- to be the same as ASSEMBLY mode
-
- Martin M. Hunt <hunt@cygnus.com>
- * manage.tcl (manage_init): set bp-save to 1.
- * variables.tcl (changeValue): If new value is null,
- cancel edit.
-
- Tomy Hudson <thudson@cygnus.com>
- * memory.tcl (do_popup): Added method do_popup. Changed binding of
- button-3 to invoke popup menu.
-
- Tomy Hudson <thudson@cygnus.com>
- * src.tcl (do_popup): Removed check for space in variable name
- that disabled popup menu items. Only check now is for "".
-
- Tomy Hudson <thudson@cygnus.com>
- * src.tcl (do_popup): Removed variable name from
- popup menu items. Added check for sane variable in selection
- to disable menu items when appropriate.
-
- Martin M. Hunt <hunt@cygnus.com>
- * bp.tcl (bp_delete): Destroy widgets in deleted
- line.
- * srcbar.tcl (_set_run): Enable View menu items
- when download is finished.
- * download_pref.tcl (LoadPref): Call loadprefs
- with gdbrunning set to 1.
-
- Tom Tromey <tromey@cygnus.com>
- * ide.tcl (gdbtk_ide_init): Use property vmake/exelist, not
- vmake-exelist.
-
- Martin M. Hunt <hunt@cygnus.com>
- * variables.tcl (build_menu_helper): Comment-out
- Update menu.
- (getVariables): Change variable name so it doesn't
- get confused with window variables.
- (postMenu): Comment-out Update entries.
- (UnEdit): Unbind keys when unediting.
- * memory.tcl (create_prefs): When prefs are already
- open, raise and focus the window.
- * bp.tcl (bp_type): Deselect current line when type changes.
-
- Martin M. Hunt <hunt@cygnus.com>
- * toolbar.tcl (create_menu_items): Call open_url for
- web connections.
- * src.tcl (name): When new file load fails, remove it
- from combobox. When load succeeds, clear status message.
- (location): Change how files are loaded into combobox.
- Call new gdb_listfiles function.
-
- Martin M. Hunt <hunt@cygnus.com>
- * manage.tcl (manage_create): Give newly created windows
- the focus on all platforms.
- * mem_pref.tcl (destructor): Notify parent when exiting.
- * srcbar.tcl (_set_run): Better state handling on
- pulldowns and icons.
- * src.tcl (build_win): Start with toolbar in right state.
- * memory.tcl (MemWin): Withdraw window until finished.
- (delete_prefs): New function.
-
- Martin M. Hunt <hunt@cygnus.com>
- * manage.tcl: For IDE, iconify all windows when source
- window is iconified.
- * mem_pref.tcl: Take out all the modal stuff.
- Leave this window non-modal.
- * download.tcl: Fix references to source window.
- (Download): Make window modal and always on top.
- * memory.tcl (destructor): Kill mem prefs window too.
- * variables.tcl (changeValue): Clean up.
- * register.tcl (acceptEdit): Change error messagebox.
-
- Martin M. Hunt <hunt@cygnus.com>
- * src.tcl (set_state): Disable items in breakpoint
- popups.
- (config_win): Change capitalization in popups.
-
- Martin M. Hunt <hunt@cygnus.com>
- * main.tcl: Major rewrite. Simplify. Move IDE
- functions to new file. Add state variables and
- hooks. Add copyright.
- * ide.tcl: New file. IDE functions.
- * download.tcl (download_it): Use new state variables.
- * src.tcl: Use new state variables.
- (constructor): Add state hook.
- (set_state): Hook to enable/disable menus and icons.
- * srcbar.tcl (runstop): Renamed from "running"
- (running): Public variable to control icons.
- (_set_runstop): Change Running man to stop sign.
- (_set_run): Enable/disable icons depending on debugger
- state.
- * manage.tcl (create_closed): Deleted function.
- (manage_create): Remove visibility argumnet.
- (manage_delete): Remove special case for debugger prefs.
- * prefs.tcl (pref_set_defaults): Remove gdb/advanced.
- * hooks.tcl: Add copyright.
- * Makefile: Add ide.tcl.
-
- Tom Tromey <tromey@cygnus.com>
- * download_pref.tcl (LoadPref): Inherit from GdbLoadPref.
- (constructor): Rewritten.
- (build_win): Removed.
- (change_baud): Removed.
- (save): Removed.
- (cancel): Removed.
- (config): Removed.
- (reconfig): Removed.
-
- Martin M. Hunt <hunt@cygnus.com>
- * main.tcl (target_name_changed): Append correct
- port name to target name.
- (gdbtk_ide_init): Don't initialize IDE preferences.
- Append port name to target name.
- * toolbar.tcl (create_menu_items): Add Debugger Preferences
- to File menu.
- * pref.tcl: Remove all ide preferences functions.
- * prefs.tcl (pref_set_defaults): Define gdb/load/port.
- * download_pref.tcl: Added serial port selection.
-
- Martin M. Hunt <hunt@cygnus.com>
- * register.tcl (acceptEdit): Remove leading spaces from
- values.
- * src.tcl (config_win): New tag bp_tag. Like break_tag
- except used when a bp is set on that line. Bind new menu
- to bp_tag.
- (insertBreakTag): Accept tag type. Remove old tag.
- (do_bp): When a breakpoint is set, use bp_tag.
-
- Tom Tromey <tromey@cygnus.com>
- * pref.tcl (pref_ide_proc): Withdraw the toplevel, not the
- window.
-
- Tom Tromey <tromey@cygnus.com>
- * tclIndex: Rebuilt.
- * mem_pref.tcl (build_win): Use standard_button_box.
- (_map): New method.
- (constructor): Run _map on <Map> event.
- * pref.tcl (pref_ide_proc): Use idewindow_check_freeze.
- (pref_modal_dialog): Use idewindow_freeze and idewindow_thaw.
- * hooks.tcl: Removed.
- * Makefile (TCL): Removed hooks.tcl.
-
- Tom Tromey <tromey@cygnus.com>
- * main.tcl (ide_run_server): Quote call to ide_do_run_server.
-
- Tom Tromey <tromey@cygnus.com>
- * download_pref.tcl (build_win): Make OK button default. Invoke
- when Return pressed.
- * download_pref.tcl (build_win): Don't allow pref window to
- resize. Use standard_button_box to lay out buttons.
- * pref.tcl (pref_ide_proc): Handle window freezing.
- (pref_modal_dialog): Freeze and thaw window around the grab.
- (build_win): Use standard_button_box to lay out buttons. Don't
- allow pref window to resize.
-
- Ian Lance Taylor <ian@cygnus.com>
- * src.tcl (src_ide_proc): Download the file in an idle callback.
- Execute the idewindow command even if the download was cancelled.
- * library/main.tcl (ide_run_server): Do everything in an idle
- callback.
- (ide_do_run_server): New procedure.
-
- Martin M. Hunt <hunt@cygnus.com>
- * src.tcl (bp_line): Use hasBP instead of validBPLine.
- Allow type TC even if BP set.
- (validBPLine): Renamed to hasBP.
-
- Tom Tromey <tromey@cygnus.com>
- * manage.tcl (manage_open): Special case "about" window when
- running under IDE.
-
- Martin M. Hunt <hunt@cygnus.com>
- * main.tcl (set_target): Set the target again if the
- executable has changed and executed a "file" command.
- * memory.tcl (update_address): Accept numerical entries
- and catch errors.
- * download.tcl (Download): Cancel button should call
- cancel method.
- * main.tcl (run_executable): Fixed messageBox.
-
- Tom Tromey <tromey@cygnus.com>
- * floatbar.tcl (constructor): Added.
- * srcbar.tcl (constructor): Added.
- * toolbar.tcl (_ide_title): New instance variable.
- (create_menu_items): Pass _ide_title to idewindmenu.
-
- Martin M. Hunt <hunt@cygnus.com>
- * main.tcl (toggle_debug_mode): Fix typo and print
- debug message before disabling it.
-
- Martin M. Hunt <hunt@cygnus.com>
- * manage.tcl (manage_delete): Don't remove a window
- from the active list until after it has already deleted
- itself.
- * toolbar.tcl (create_menu_items): Change Console shortcut
- to Ctrl+N.
- * src.tcl (config_win): Change Console shortcut to Ctrl+N.
-
- Martin M. Hunt <hunt@cygnus.com>
- * src.tcl: (do_bp): Catch errors.
- (validBPLine): Valid lines have a "-" or an image.
-
- Martin M. Hunt <hunt@cygnus.com>
- * main.tcl (ide_run_server): Don't run executable if
- download was cancelled. Reset cancelled flag.
- (run_executable): Call download_it.
- (download): Renamed download_it and moved to download.tcl.
- (set_target): Don't set target if the name hasn't changed
- from the last time.
- * register.tcl (reg_select): Catch errors.
- (delete_from_display_list): Enable menu item.
- * src.tcl (build_win): Add progress bar for downloads.
- (download_progress): New function. Callback to update
- progress meter.
- (src_ide_proc): Don't open src window if download
- cancelled.
- * toolbar.tcl (create_menu_items): Call download_it.
- * srcbar.tcl (_set_run): New mode. Sets run button to stop
- sign during downloads.
- * prefs.tcl (pref_set_defaults): Define gdb/load/verbose.
- * interface.tcl: Define new hook download_progress_hook.
- * floatbar.tcl (create_buttons): Call download_it.
- * download_pref.tcl: Add download dialog prefs.
- * download.tcl (Download): Change back to old dialog
- with each section listed seperately.
- (download_hash): Use a hook.
- (download_it): New function. Replaces old "download"
- from main.tcl. Now deletes all breakpoints before
- downloading and handles cancels correctly.
-
- Martin M. Hunt <hunt@cygnus.com>
- * main.tcl (download): Don't quote the executable name
- with single quotes.
-
- Tom Tromey <tromey@cygnus.com>
- * src.tcl (src_ide_proc): Exit gdb when destroy request seen.
-
- Ian Lance Taylor <ian@cygnus.com>
- * main.tcl (gdbtk_ide_init): Use src_ide_proc for the source
- window, rather than idewindow_proc. Remove extraneous line.
- * src.tcl (src_ide_proc): New procedure, replacing open_src. Only
- download if we are opening the source window.
- (src_no_save): New procedure.
- * main.tcl (gdbtk_ide_init): Initialize gdb_checking_for_exit.
- Register gdb_exit_check as the exit check procedure.
- (gdb_exit_check): New procedure.
- * interface.tcl (gdbtk_tcl_query): If gdb_checking_for_exit, use a
- system modal message box.
- * src.tcl (build_win): Create a FocusIn binding to push focus down
- from the top level.
- * console.tcl: Change all control, alt, and unadorned character
- bindings to use bind_plain_key.
- * memory.tcl: Likewise.
- * src.tcl: Likewise.
- * variables.tcl: Likewise.
- * src.tcl: Use bind_plain_key rather than explicitly ignoring Alt
- bindings.
- * src.tcl (print): Call idewindow_freeze and idewindow_thaw around
- call to print menu.
- * srcbar.tcl (create_menu_items): Likewise, around call to page
- setup menu.
- * main.tcl (gdbtk_ide_init): Use an underscore in generic window
- name, to set the accelerator key.
- (ide_run_server): Likewise.
- * toolbar.tcl (create_buttons): Likewise.
-
- Martin M. Hunt <hunt@cygnus.com>
- * register.tcl (acceptEdit): If no value is entered,
- set the cell to 0.
-
- Ian Lance Taylor <ian@cygnus.com>
- * src.tcl (config_win): Add ignored Alt bindings for all the
- unmodified key bindings.
- * download.tcl (constructor): Withdraw the window before doing
- anything. Set the width of the label. Don't try to center the
- window. Pass toplevels to wm transient. Run keep_raised after
- 500. Don't call update.
- (done): Use after rather than a busy loop.
- (destructor): Cancel the after if it is defined.
- (after_id): New protected variable.
- * main.tcl (download): If download is already running, don't do
- anything. If .load0.load exists, delete it before calling manage
- create.
- * main.tcl (gdbtk_ide_init): Use pref_ide_proc rather than
- idewindow_proc when registering the preference window.
- * download_pref.tcl (save, cancel): Call pref_ide_finished.
- * pref.tcl (save, cancel): Likewise.
- (pref_ide_proc): New procedure.
- (pref_no_save): New procedure.
- (pref_modal_dialog): New procedure.
- (pref_ide_finished): New procedure.
- * tclIndex: Rebuild.
- * main.tcl (gdbtk_ide_init): Initialize gdb_download_cancelled.
- (run_executable): Put a trace on gdb_download_cancelled. Change
- the dialog box message. If the user cancels the download, clear
- gdb_run_pending and just return without running.
- (ide_do_run): Remove the traces on gdb_download_cancelled. If the
- user cancelled the download, just clear gdb_run_pending.
- (target_name_changed): Clear gdb_download_cancelled. Call
- set_exe_name.
- (download): If the executable is not up to date, ask whether the
- user is really really sure. If the user cancels the download
- using the dialog button, set gdb_download_cancelled, and don't set
- the breakpoints or gdb_download_complete.
- (set_exe_name): Clear gdb_download_cancelled.
- (receive_file_changed): Ask whether we should download the new
- executable.
- * src.tcl (open_src): Don't download the file if
- gdb_download_cancelled is set.
- * interface.tcl (gdbtk_tcl_query): Pass -modal task to
- tk_messageBox.
- * main.tcl (set_exe_name): Tell the src window to go back to
- looking at main if the file changes.
- * src.tcl (update): Catch errors when calling gdb_loc.
- * main.tcl (gdbtk_ide_init): Handle file-created, file-changed,
- file-removed, and file-deleted events rather than process-ended
- events.
- (set_exe_name): Call gdb_clear_file even if the file does not
- exist. Likewise for setting gdb_download_complete to zero.
- (receive_file_changed): Rename from receive_process_ended. Only
- check the executable mtime if the tail of the file name matches
- the executable name.
-
- Ian Lance Taylor <ian@cygnus.com>
- * srcbar.tcl (create_menu_items): Change ``Print Setup...'' to
- ``Page Setup...''. Pass -parent to ide_winprint page_setup.
- * src.tcl (print): Pass -parent to send_printer.
-
- Ian Lance Taylor <ian@cygnus.com>
- * main.tcl: Move initialization code to end of file, after all
- procedures have been defined.
- (gdbtk_ide_init): New procedure to handle IDE initialization.
- (gdbtk_tcl_preloop): Don't do anything if using the IDE.
- (ide_run_server): Error if file does not exist. Use
- idewindow_activate_by_name, rather than manage open. Do
- everything after idle.
- (run_executable): Clean up a bit. Consistently use ide_do_run.
- (target_name_changed): Rename from target_name. Rename parameter
- num to propset.
- (download): Error if the file does not exist. Call set_exe_name.
- Don't set gdb_download_mtime. Don't check whether gdb_run_pending
- is 2.
- (exe_name_changed): Rename from exe_name.
- (set_exe_name): Set gdb_exe_mtime. Quote filename passed to
- gdb_cmd.
- (receive_process_ended): Don't check the data argument. Check
- gdb_exe_set rather than gdb_download_complete. Check
- gdb_exe_mtime rather than gdb_download_mtime.
- * src.tcl (open_src): Set the location to main as well as
- downloading the file. Don't set gdb_run_pending to 2.
-
-
-Tue Feb 10 17:50:37 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * bp.tcl (build_win): Do not set the disabled foreground for menus. Insert
- all tracepoints, too.
- (bp_add): Handle tracepoints.
- (bp_type): Handle tracepoints.
- (update): Handle tracepoints.
- (bp_all): Do tracepoints, too.
- (Index_to_bptype): New protected variable to index type of break (breakpoint
- or tracepoint) against index in window.
- (bp_select): Disable/Enable menu items based on type.
- (bp_able): Handle tracepoints.
-
- * src.tcl (do_bp): Handle disabled tracepoints.
-
- * actiondlg.tcl (change_other): Handle memranges and use info address to
- validate entries.
-
- * tracedlg.tcl (edit): Handle memranges when formatting data for
- action dialog.
-
-Mon Jan 26 11:44:39 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * src.tcl (fill_files): Don't check for file's existance -- let
- SrcWin::name do that.
-
- * actiondlg.tcl (change): Add everything that is specified, not
- just the things about which we know.
-
-Sun Jan 25 01:01:32 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * stack.tcl (update): Only insert entries that have
- length. Break when matching entry in listbox is found.
-
- * src.tcl (fill_files): Don't call lsort. New listfiles
- command sorts for us.
-
- * variables.tcl (changeValue): If new value is null,
- cancel edit.
- (build_menu_helper): Comment-out Update menu.
- (getVariables): Change variable name so it doesn't
- get confused with window variables.
- (postMenu): Comment-out Update entries.
- (UnEdit): Unbind keys when unediting.
-
-Thu Jan 22 10:38:19 1998 Keith Seitz <keiths@cygnus.com>
-
- * toolbar.tcl (create_menu_items): Disable preferences.
-
- * prefs.tcl (pref_set_defaults): Attach the toolbar to the source window
- by deafult.
- * src.tcl (SrcWin::build_win): Turn off history for the file selector.
- (SrcWin::name): Use SOURCEWIN_set_status to upate status.
- Make sure we ask gdb where the source file is before asking
- the source window to open it.
- (SrcWin::file): Do not ask gdb where the file is -- someone else already has.
- Set the file selector to the filename only once and only if
- successful finding the file.
- (SrcWin::fill_files): Sort the files before inserting into file selector.
- (SrcWin::location): Add flag idicating that a file load has failed. Resolves
- recursive loop with SrcWin::mode and SrcWin::location.
- Make sure the file and function selectors are filled only once.
- Use SOURCEWIN_set_status and SOURCEWIN_reset_status as appropriate.
- (SrcWin::set_status): Add verbatim flag to allow a generic message to be
- displayed.
- (SrcWin::mode): Add error flag to indicate that a file load failed. Resolves
- recursive loop with SrcWin::location.
- Make sure we exit with the proper mode set on the source window.
- (SrcWin::reset_status): New procedure.
- (SrcWin::current_addr): Define a default value of 0x0.
- (SrcWin::Status): New protected variable.
- (SrcWin::bp_line): Check if breakpoint set in assembly-mode, too.
- (SOURCEWIN_set_status): New procedure to temporarily set the status bar.
- (SOURCEWIN_reset_status): New procedure which is called after the status bar
- should be reset.
- (SOURCEWIN_reinit): New procedure to reinitialize the source window. (To be
- called when new symbol files are added and like).
-
- * interface.tcl (gdbtk_tcl_query): Properly set the name of the
- query dialog.
- (gdbtk_tcl_pre_add_symbol): Hook called from gdbtk.c to inform user that
- we are reading symbols.
- (gdbtk_tcl_post_add_symbol): Hook called from gdbtk.c to inform user that
- are finished reading symbols.
-
- * src.tcl (SOURCEWIN_reinit): New procedure which updates the source window with
- a default file, fills the file selectors, etc.
- (SOURCEWIN_set_status): New procedure which can be used to set the status bar
- on the source window.
- (set_status): Add flag for setting the status as-is.
-
- * main.tcl: Call SOURCEWIN_reinit to setup the source window on startup.
-
-
-Fri Jan 16 09:11:30 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * src.tcl (SOURCEWIN_set_status): New procedure to allow anyone to set the
- status bar text at the bottom of the source window.
- (fill_files): Use a little more full-proof method (if slower) for eliminating
- duplicates int the files combobox.
-
- * interface.tcl (gdbtk_tcl_pre_add_symbol): New procedure called prior to
- a symbol file is loaded.
- (gdbtk_tcl_post_add_symbol): New procedure called after a symbol file is
- loaded.
-
-Thu Jan 15 12:41:27 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * console.tcl (invoke): Use new gdb_immediate command instead of gdb_cmd.
-
-Wed Dec 31 16:50:26 1998 Keith Seitz (keiths@onions.cygnus.com)
-
- * actiondlg.tcl (change): handle '$' in register names.
-
diff --git a/gdb/gdbtk/library/ChangeLog-1999 b/gdb/gdbtk/library/ChangeLog-1999
deleted file mode 100644
index 1494f6a54b5..00000000000
--- a/gdb/gdbtk/library/ChangeLog-1999
+++ /dev/null
@@ -1,1083 +0,0 @@
-1999-12-15 Fernando Nasser <fnasser@rtl.cygnus.com>
-
- * variables.tcl: UnEdit any fields open to edit before colapsing
- a tree branch (it was generating a Tcl exception and stack dump).
-
-1999-09-29 James Ingham <jingham@leda.cygnus.com>
-
- * prefs.tcl (pref_read): Convert env(HOME) to a win32 path BEFORE
- handing it to file join, so we won't look for a network drive.
-
-1999-09-23 James Ingham <jingham@leda.cygnus.com>
-
- * toolbar.tcl (GDBToolBar): Typo.
- (new_menu): Changed this to allow menus to be altered as well as
- added.
- (menu_exists): New method.
- (clear_menu): New method.
- (_load_src_images): Moved here from srcbar.tcl. Added Attach &
- Detach classes. This is all still kind of ill-factored.
- (In instance data): Made menu data arrays rather than dynamically
- constructed variables.
-
- * srcwin.itb (SrcWin::set_execution_status): Let gdb print the PC,
- since Tcl's conversion may not be wide enough.
-
- * srctextwin.ith: initialize the Cname variable.
-
- * srctextwin.itb (SrcTextWin::location):
- (SrcTextWin::location): Change address compare to a string
- compare. These are always both hex in the same format, but on a
- 64 bit host the conversion would fail.
- (SrcTextWin::showBalloon): Catch all errors in the balloon help
- but also report them to the debug window.
- (SrcTextWin::LoadFromCache): Erase and reload dirty cached windows.
-
- * srcbar.tcl (create_run_menu): Add "Attach", "Detach" and "Kill"
- for native targets.
- (do_attach): Attach to a native target.
- (do_detach): Detach from a native target.
- (do_kill): Kill a native target.
-
- * memwin.itb (MemWin::toggle_enabled): Toggle the state of the
- widget, as well as the color, so people can't edit when the window
- doesn't contain valid memory.
- (MemWin::update_address): Set the state to normal if we have
- loaded valid memory.
- (MemWin::BadExpr): Set the state to disabled on error.
- (MemWin::incr_addr): Set the state to normal if a step succeeds.
-
- * managedwin.itb (ManagedWin::open_dlg): New function. Preferred
- function when you know you are opening a dialog.
- (ManagedWin::_open): new function, contains the common bits of
- opening windows & dialogs.
- (ManagedWin::open): Use the _open function.
- (ManagedWin::_create): Don't use Icon windows with modal dialogs.
-
- * interface.tcl (gdbtk_cleanup): Set a shutting_down flag.
- (gdbtk_tcl_fputs): Restore the fputs hook. This is trivial to do,
- and ensures that no one will delete the hook behind our backs.
- (gdbtk_tcl_fputs_error): ditto.
- (_open_file): Make file parameter optional, and don't query if it
- is provided.
- (gdbtk_attached): New function. Called from attach hook.
- (gdbtk_detached): New function. Called from detach hook.
-
- * helpviewer.ith (HtmlViewer): Add the attach dialog to the list
- of topics.
-
- * srcbar.tcl (do_kill): Added the Kill menu item for killing the
- inferior on native targets.
-
-1999-09-16 James Ingham <jingham@leda.cygnus.com>
-
- * prefs.tcl (pref_set_defaults): define the wrap preference for
- the console window.
-
- * console.itb (Console::_paste): Add the "delete selection"
- semantics so we can use this for all the Paste events.
- (Console::_delete): New method, centralize delete handling so we
- can protect against things like delete deleting a selection up in
- the history region of the window.
- (Console::_build_win): Change bindings to use _paste & _delete.
- (Console::_build_win): wrap if told to by the wrap parameter.
-
- * console.ith: Declare _delete.
-
-1999-09-16 Stan Shebs <shebs@andros.cygnus.com>
-
- * targetselection.itb (TargetSelection::init_target_db): Remove
- references to D10V target, use only standard remote for D10V.
-
-1999-09-15 James Ingham <jingham@leda.cygnus.com>
-
- * console.itb (Console::_paste): Fix another "set foo [catch ...]"
- idiom.
- (Console::_build_win): Remove the extraneous posting of the
- <<Paste>> event in handling B2-Release. Just call _paste.
-
-1999-09-10 James Ingham <jingham@leda.cygnus.com>
- From Mumit Khan <khan@xraylith.wisc.edu>
-
- * prefs.tcl (pref_set_defaults): Add main_names preference.
- * interface.tcl (gdbtk_locate_main): New proc.
- (run_executable): Use.
- * srcwin.itb (SrcWin::_build_win): Use.
- (SrcWin::location): Likewise.
- (SrcWin::point_to_main): Likewise.
-
-1999-08-27 James Ingham <jingham@leda.cygnus.com>
-
- * srctextwin.itb (SrcTextWin::FillAssembly): Use the new
- gdb_load_disassembly.
- (SrcTextWin::FillMixed): Use the new gdb_load_disassembly.
-
- * interface.tcl (gdbtk_idle): Call gdbtk_restore_fputs at idle
- time. This puts the gdbtk_fputs hook back in place, just in case
- an error left it pointing to null.
-
-1999-08-11 Tom Tromey <tromey@cygnus.com>
-
- * kod.itb (KodWin::build_win): Don't use Tix.
- (Various): Changed as a result of build_win change.
- (KodWin::destructor): Unset new globals. Also unset
- kodActivePane.
-
- * kod.ith (labh): Removed variable.
-
- * kod.ith (set_os): Declare.
- * kod.itb (KodWin::build_win): Don't use Tix labelled frame
- widget or Tix paned widget. Removed size boxes from Windows
- code.
- (KodWin::constructor): Add `$this set' to gdb_set_hook.
- (KodWin::destructor): Remove from hook.
- (KodWin::set_os): New method.
-
- * toolbar.tcl (GDBToolBar::destructor): Remove from gdb_set_hook.
- (GDBToolBar::constructor): Add to gdb_set_hook.
- (set_hook): New method.
- (create_view_menu): Don't put kod onto menu.
-
- * kod.itb (KodWin::display_object): Don't put `Details' message in
- label; this messes up resize and doesn't really add anything.
-
- * images/kod.gif, images2/kod.gif: Removed.
- * toolbar.tcl (create_window_buttons): Removed kod button.
- (add_menu_command): Don't load kod image.
-
- * kod.itb: Renamed from kod.tcl. Restructured to follow new itcl
- conventions.
- * kod.ith: New file.
-
- * toolbar.tcl (create_window_buttons): Use gdb_kod_cmd, not
- gdb_kod_name.
- (create_view_menu): Likewise.
- * interface.tcl (initialize_gdbtk): Don't mention gdb_kod_name.
-
- * targetselection.itb (TargetSelection::init_target_db): Added
- Cisco targets. From Martin Hunt.
-
- * kod.tcl (build_win): Use correct capitalization for buttons.
-
-1999-08-10 James Ingham <jingham@leda.cygnus.com>
-
- * srctextwin.itb (SrcTextWin::constructor): Add the disassembly
- flavor hook.
- (SrcTextWin::disassembly_changed): New method, fix up all the
- windows when the disassembly flavor changes.
- (SrcTextWin::_mtime_changed): We were setting the filename:dirty
- to 1 regardless of the result of the mtime check... Doh!
- (SrcTextWin::reconfig): The setTabs call was assuming ALL windows
- were source windows.
- (SrcTextWin::do_tag_popup): Remove the balloon when the breakpoint
- popups are posted as well.
- (SrcTextWin::do_source_popup): Also handle the case where there is
- a selection, but the point is not over it.
-
- * srctextwin.itb (SrcTextWin::destructor): Remove it when the
- object goes away.
-
- * regwin.itb (RegWin::constructor): Add the disassembly_flavor_hook.
- (RegWin::destructor): Remove it when the widget is destroyed.
- (RegWin::disassembly_changed): New method, tell the widget it
- needs to redisplay itself with the new register names.
- (RegWin::reconfig): Actually do the reconstruction if the register
- set names have changed.
- * regwin.ith: Add declarations for the new methods.
-
- * interface.tcl (gdbtk_tcl_disassembly_hook): New hook to support
- changing the disassembly flavor.
-
- * srctextwin.itb (SrcTextWin::getVariable): Use a selection in
- preference to the word around the hit point, if there is one.
- (SrcTextWin::do_source_popup): Really dismiss the balloon when you
- popup a menu...
-
-1999-08-05 James Ingham <jingham@leda.cygnus.com>
-
- * srctextwin.itb (SrcTextWin::showBalloon): Fix ShowBalloon. We
- can't use "info line" to tell us whether we should post a balloon
- over the current line, since gdb only considers the first line of
- a statement executible, not the continuation lines. Instead, show
- any line in the currently selected function. Sigh...
-
-1999-08-06 Tom Tromey <tromey@cygnus.com>
-
- * interface.tcl (gdb_set_hook): New hook.
-
-1999-08-02 Tom Tromey <tromey@cygnus.com>
-
- * managedwin.ith (window_name): Removed extraneous comma.
-
-1999-07-27 Keith Seitz <keiths@cygnus.com>
-
- * variables.tcl: Rewrite to use new variable rewrite.
- * locals.tcl: Ditto.
- * watch.tcl: Ditto.
- * srctextwin.itb (updateBalloon): Use new variable rewrite.
- * blockframe.ith, blockframe.itb: New block and frame classes.
- * data.ith, data,itb: New stack and queue classes (data structures).
- * tclIndex: Rebuilt.
-
-1999-07-20 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * prefs.tcl (pref_set_defaults): Set tab_size to the univeral
- standard of 8, not 4.
-
-1999-07-16 Stan Shebs <shebs@andros.cygnus.com>
-
- * All files (*.tcl, *.itb, *.ith): Add GPL notices, regularize
- copyright and header comments.
-
-1999-06-29 James Ingham <jingham@leda.cygnus.com>
-
- * bpwin.itb (BpWin::bp_store): New proc, store away the current
- breakpoint list into a gdb command file.
- (BpWin::bp_restore): restore a breakpoint list from a command file.
- (BpWin::build_win): Add menu items for store & restore breakpoints.
-
-1999-06-24 Keith Seitz <keiths@cygnus.com>
-
- * srcwin.itb (SrcWin::destructor): Its "gdb_clear_file_hook",
- not "gdb_clear_file".
-
-1999-06-23 James Ingham <jingham@leda.cygnus.com>
-
- * srctextwin.itb (SrcTextWin::_mtime_changed): Catch the call to
- mtime. This will fail when you are in assembly mode, and the file
- is actually a function address.
- (SrcTextWin::motion): Catch the call to showBalloon. There are
- various things that can go wrong here, and we certainly don't want
- the user to hear about them.
-
-1999-06-15 Keith Seitz <keiths@cygnus.com>
-
- * interface.tcl (gdbtk_stop_idle_callback): Catch calls to
- remove hook, since it could already be gone if we got a signal.
-
- * srcwin.itb (busy): If there is no target and the
- debugger is native, we should also let the user know
- that his program is running.
-
-1999-06-11 James Ingham <jingham@leda.cygnus.com>
-
- * interface.tcl (gdbtk_tcl_exec_file_display): Only call clear
- file if there is a file loaded in the source window. This avoids
- some flashing at startup.
-
-1999-06-10 Keith Seitz <keiths@cygnus.com>
-
- * srctextwin.itb (do_source_popup): Clear the varBalloon tag
- before mapping a popup onto the screen.
- (showBalloon): The "-pc" option was removed from gdb_variable.
- Provide equivalent functionality, and display popups again.
-
- * interface.tcl (set_target): Don't call the target dialog
- if there gdb_target_cmd is empty and we are a native debugger.
- Don't set a default target -- force the gui to ask the first
- time!
- (run_executable): Set options after we have a target, not before.
-
- * watch.tcl (destructor): Don't call no_inferior -- the window's
- already been destroyed. Instead, run through our list of variables
- and delete them.
-
-1999-06-10 James Ingham <jingham@leda.cygnus.com>
-
- * srctextwin.itb (SrcTextWin::clear_file): Don't try to set the
- text view back to the gdbtk_scratch_widget, this is very fragile.
- (SrcTextWin::LoadFromCache): initialize the mtime correctly when
- you add a window to the cache.
- (SrcTextWin::LoadFromCache): don't add the ,asm,lib to the scratch
- widget pane name.
-
- * interface.tcl (gdbtk_tcl_exec_file_display): Only run
- gdbtk_clear_file if the filename is not null. This avoids source
- window flashing.
-
- * srctextwin.itb (SrcTextWin::_mtime_changed): Set a dirty flag
- when the mtime has changed so that you can know to reload the
- source.
- (SrcTextWin::LoadFromCache): Look at the dirty flag, and reload
- from disk if it is set.
-
-1999-06-10 Keith Seitz <keiths@cygnus.com>
-
- * watch.tcl (clear_file): New method.
- * variables.tcl (constructor): Register gdb_clear_file hook.
- (destructor): Unregister gdb_clear_file hook.
- (clear_file): New method.
- * targetselection.itb (init_target_db): Add Picobug monitor.
- (fill_targets): Don't explicitly list every TCP target: deduce
- it from the target database.
- (native_debugging): Compare host and target triples.
- * srcwin.ith (clear_file): Add declaration.
- * srcwin.itb (constructor): Register gdb_clear_file hook.
- (destructor): Unregister gdb_clear_file hook.
- (clear_file): New method.
- * srctextwin.ith (LoadFile): Add arg "mtime_changed".
- (clear_file): Add declaration.
- (_mtime_changed): Add declaration.
- (_initialize_srctextwin): Add declaration.
- (_clear_cache): Add declaration.
- * srctextwin.itb (constructor): Move all initialization
- to _intialize_srctextwin so that we can easily re-initialize.
- (Stwc): Change layout to explicitly list panes
- and mtimes.
- (ClearTags): Catch calls removing tags. Needed when
- loading new executables.
- (_mtime_changed): New method.
- (FillSource): Immitate command line gdb, checking
- if a file has changed since it was last used. If it has, load
- it into the cache.
- (LoadFile): Add parameter to inform whether a file's
- mtime has changed. Reload the cache if it has.
- (clear_file): New method.
- (_initialize_srctextwin): New method.
- (_clear_cache): New method. Stubbed.
- * main.tcl: Move initialization of state to initialize_gdbtk in
- interface.tcl
- * interface.tcl (gdbtk_tcl_exec_file_display): Don't reset source
- windows or globals here -- the clear file hook will do that.
- (set_exe_name): Always say the exe has changed, in case
- the user reloads the same exe (which he's recompiled).
- (set_exe): Don't call gdb_clear_file.
- (set_target): Return string result codes.
- (clear_file_hook): New hook.
- (gdbtk_clear_file): New proc.
- (initialize_gdbtk): New proc. Moved initialization of
- globals (yich) here from main.tcl
- * download.itb (download_it): When running set_target,
- use new string return codes.
-
- * interface.tcl (gdbtk_attach_target): New proc. Moved
- contents of run_executable dealing with attaching to
- a target here.
- (run_executable): Use gdbtk_attach_target.
- (connect): Remove and merge with gdbtk_attach_target.
- * srcbar.tcl (do_connect): Use gdbtk_attach_target to
- attach to the target.
-
- * tclIndex: Regenerate.
-
-1999-06-07 James Ingham <jingham@leda.cygnus.com>
-
- * memwin.ith (numbytes): Change the default to 0, which means
- "depends on window size". This is really the useful value.
-
- * memwin.itb (MemWin::newsize): Move getting the rheight to AFTER
- the update idletasks. Otherwise the bbox call will return "" when
- the window is being constructed.
- (MemWin::reconfig): Set rheight back to "" to force it to be
- recomputed. Both font changes and switch to "depends on window
- size" could invalidate this.
-
-1999-06-08 Keith Seitz <keiths@cygnus.com>
-
- * srcwin.itb (set_execution_status): Do not try to second
- guess gdb_target_has_execution with gdb_running. Make
- gdb_running follow it. We'll have to fix those targets
- that do not set inferior_pid as they crawl out of the woodwork.
-
-1999-06-07 James Ingham <jingham@leda.cygnus.com>
-
- * prefs.tcl (pref_set_defaults): Set the initial height and with
- of the browser to 0 so the packer & gridder can get this right on
- systems with different fonts. Fixes CR 100619.
-
- * browserwin.itb (BrowserWin::_build_win): Don't set the height
- and width of the file_box and func_box. This keeps them from
- floating correctly when there is not stored default.
-
-1999-06-04 James Ingham <jingham@leda.cygnus.com>
-
- * regwin.itb (RegWin::acceptEdit): Call gdbtk_update after
- changing the register value so that the locals and watch window
- will get updated if any of these variables are in registers. Fixes
- CR 100670.
-
-1999-05-25 Keith Seitz <keiths@cygnus.com>
-
- * variables.tcl (getLocals): Don't pass any args to
- gdb_get_{locals, args} so that the currently selected frame is used.
- (context_switch): New method.
- * locals.tcl (getVariablesBlankPath): Don't catch call to getLocals.
- getLocals will do it and return {} if an error occurs.
- Always pass the frame of the variable to the variable backend,
- assuming that the selected frame is the proper frame to use.
- (update): Recognize context switches a little better.
-
- * variables.tcl (cursor): New method.
- (enable_ui): Use "cursor".
- (disable_ui): Ditto.
- (no_inferior): Ditto.
- (open): Change toplevel's cursor when opening variables.
-
-1999-05-03 Martin Hunt <hunt@cygnus.com>
-
- * toolbar.tcl (create_help_menu): Open About window as transient.
-
- * main.tcl: Open About window as transient.
-
- * about.tcl (About): Set window title.
-
-1999-04-27 James Ingham <jingham@cygnus.com>
-
- * srcpref.itb (build_win): Pack the frame containing the
- disassembly flavor chooser. Redid some of the other packing to
- look a bit nicer too.
-
- * srcpref.itb (save): Call apply and then close rather than
- duplicating the apply code.
-
-1999-04-26 James Ingham <jingham@cygnus.com>
-
- * modal.tcl (ModalDialog): Add the "expire" variable, and cancel
- the dialog after the given time if set.
-
- * managedwin.ith (destructor): Use the new quit_if_last method to
- decide whether to quit the app or not. This way you can manage
- create a splash screen and not quit the app when you take it down.
- (quit_if_last): Add default implementation - returns 1.
-
- * about.tcl (quit_if_last): Add the quit_if_last to the About box,
- returning 0.
-
- * main.tcl: Added a line to open a splash screen, but commented it
- out for devo.
-
-1999-04-22 Keith Seitz <keiths@cygnus.com>
-
- * targetselection.itb (port_list): ManagedWin has a proc named
- "open". We really want the tcl command "::open" to open a port.
-
-1999-04-15 Martin Hunt <hunt@cygnus.com>
-
- * prefs.tcl (pref_set_defaults): New pref, gdb/use_icons.
- This is set if Unix should use gdbtk_icon.gif as an icon. Some
- window managers, such as olvwm, have problems with it.
- * managedwin.itb (ManagedWin::_create): Don't create icon
- for Unix, unless gdb/use_icons is set.
- * globalpref.itb (GlobalPref::build_win): Add a checkbutton to set
- pref gdb/use_icons.
-
- * managedwin.itb (ManagedWin::window_name): If iconname is
- not specified, use window name.
- (ManagedWin::_create): For Unix, call make_icon_window.
- (ManagedWin::make_icon_window): New function. Makes a unix
- icon.
-
- * main.tcl: Set initial target to "exec" if running in
- test mode.
-
- * bpwin.itb (BpWin::constructor): Set icon name to "BPs".
- * regwin.itb (BpWin::build_win): Set icon name to "Regs".
- * srcwin.itb (SrcWin::_update_title): Set icon name to basename
- of filename.
- * variables.tcl (VariableWin::build_win): Set icon name to "Locals".
-
-1999-04-12 Keith Seitz <keiths@cygnus.com>
-
- * variables.tcl (populate): Update the value of the parent variable's
- children before stuffing them into the window. This makes sure
- that the value of the variable is always current.
-
-1999-04-09 James Ingham <jingham@cygnus.com>
-
- * memwin.itb (MemWin::incr_addr): Fix the increment-decrement
- control. It would allow you to scroll into negative addresses,
- which causes some simulators to crash. It would also increment
- improperly in cases where the address value in hex corresponded to
- a negative signed int.
-
-1999-04-07 Martin Hunt <hunt@cygnus.com>
-
- * interface.tcl (gdbtk_signal): Don't set gdb_running to 0.
-
-1999-04-06 Martin Hunt <hunt@cygnus.com>
-
- * targetselection.itb (TargetSelection::getname): Call init_target_db.
- (TargetSelection::init_target_db): Add target mon2000. Set
- most remote targets to default to downloading. Add new
- baudrates for remote target. Other misc target fixes.
- (save) Use "pref setd" in case pref is not created yet.
- (TargetSelection::config_dialog): Gray out port number when
- in exec mode.
-
- * targetselection.ith: Add public proc init_target_db.
-
- * srcwin.itb (SrcWin::set_execution_status): Don't print anything
- if gdb_running is 0.
-
- * srctextwin.itb (SrcTextWin::motion): Show variable values
- even when not debugging. Needed so users can examine values after
- a segfault.
-
- * interface.tcl (set_target): If the target name is "",
- use the default target name.
- (run_executable): Set gdb_running correctly. Don't
- allow downloading to "exec".
- (gdbtk_signal): New function called from gdbtk_annotate_signal.
- Sets gdb_running to 0 and pops up a dialog with the
- signal name and description.
-
- * main.tcl: Set initial target name to "". Set gdb_target_changed
- so a dialog will always be forced the first time.
-
- * download.itb (Download::download_it): Set gdb_loaded before
- notifying src windows the download is done. Catch the notifications
- in case the dialog has been closed.
-
- * console.itb (Console::destructor): Set gdbtk_state(console)
- to "" instead of unsetting it.
-
-1999-04-02 James Ingham <jingham@cygnus.com>
-
- * memwin.itb (MemWin::build_win): Remove the -validate option from
- the memory spinner. It was not appropriate, since you can type
- expressions into the window.
-
-1999-04-02 Keith Seitz <keiths@cygnus.com>
-
- * tclIndex: Rebuilt.
- * toolbar.tcl (create_control_buttons): Use SrcWin's
- inferior method to centralize control of inferior state.
- (create_control_buttons): Ditto.
- (source): Move SrcBar's public variable "source" here,
- so that the toolbar can use that info, too.
- * srcwin.itb (SrcWin::inferior): New public method
- to consildate inferior control and dispatch to proper
- handlers.
- * srcwin.ith (SrcWin::inferior): Add declaration.
- * srctextwin.itb (SrcTextWin::do_key): Use parent SrcWin's inferior
- method to handle inferior state changes (run, step, next, etc).
- * interface.tcl: Add procs to centralize inferior control:
- gdbtk_step, gdbtk_next, gdbtk_stepi, gdbtk_nexti, gdbtk_run,
- gdbtk_continue, gdbtk_finish, gdbtk_stop.
- New stop button code (see comments before gdbtk_stop):
- (gdbtk_stop_idle_callback): Idle callback for stop button.
- (gdbtk_detach): New proc to forcibly detach from target.
- * main.tcl: Initialize data used by stop button.
- * srcbar.tcl (create_run_menu): Call SrcWin's inferior
- method with button commands.
- (source): Move "source" to Toolbar class.
-
-1999-03-29 Keith Seitz <keiths@cygnus.com>
-
- * browserwin.itb (BrowserWin::do_all_bp): Fix quoting of break
- command.
- (BrowserWin::_toggle_bp): Ditto.
-
-1999-03-19 Keith Seitz <keiths@cygnus.com>
-
- * download.itb (Download::download_it): Configure SrcWin's toolbar,
- too, to a downloading state.
- * srcbar.tcl (runstop): Change states from numbers to
- strings to avoid confusion.
- (_set_runstop): Change states from numbers to strings to
- avoid confusion.
- * srcwin.ith (toolbar): New public method.
- * srcwin.itb: Change all references of runstop to use new strings
- introduced into GDBSrcBar::_set_runstop.
- (SrcWin::toolbar): New public method to configure the state of the toolbar.
- * tclIndex: Regenerate.
-
-1999-03-18 Martin Hunt <hunt@cygnus.com>
-
- * interface.tcl (set_target_name): Remove first argument.
- If prompt is not set, still update gdb_target_cmd.
- (set_target): Call set_target_name with prompt argument
- set correctly.
- (run_executable): Check for no exe name. Catch problems
- with bad target names and prompt for new one.
-
- * main.tcl: Set target name from prefs. If it is "",
- the set "gdb_target_changed" to force it to be changed
- later.
-
- * prefs.tcl (pref_set_defaults): Don't set target default
- to "exec". Leave the default unset.
-
- * srcbar.tcl (create_menu_items): Update args to
- set_target_name.
-
-1999-03-18 Keith Seitz <keiths@cygnus.com>
-
- * prefs.tcl (pref_read): Change unix preference filename
- to ".gdbtkinit". This bogosity has been around long enough.
-
-1999-03-16 Martin Hunt <hunt@cygnus.com>
-
- * managedwin.itb (ManagedWin::_create): When running under
- testsuite, don't resize.
-
-1999-03-13 James Ingham <jingham@cygnus.com>
-
- * browserwin.itb (BrowserWin::search): If all the files are
- selected in the file box, then don't pass the files argument.
- This makes the function browser a little quicker. The main
- slowdown, however, is sorting the resultant list. Maybe do this
- in C to get this quicker?
-
- * memwin.itb (MemWin::edit): Comment out the line that reads back
- in the newly set memory value. Because of the chain of calls,
- on Windows this causes some evil race that results in GDBTk
- filling all the visible cells with the new value. I don't
- understand it yet, so this is just a temporary fix.
-
-1999-03-12 James Ingham <jingham@cygnus.com>
-
- * memwin.ith (MemWin): Add saved_addr to the class. This is where
- we store the old address before we change addresses, so that we
- can get back to a good state in case of errors.
-
- * memwin.itb (MemWin::update_addr): gdb_get_mem does not always
- return an error code when it hits an error. Catch that here.
- (MemWin::update_address): Store away the old address, so we can
- restore it if there is an error.
- (MemWin::BadExpr): Restore the saved address in case of errors.
-
-
-1999-03-09 James Ingham <jingham@cygnus.com>
-
- * Rebuilt tclIndex.
-
-1999-03-08 James Ingham <jingham@cygnus.com>
-
- * srctextwin.itb (SrcTextWin::constructor): pc(funcname) was
- changed to pc(func), but the initialization was not changed...
-
- * download.ith (dont_remember_size): Download window should not
- remember its size.
-
- * interface.tcl (connect): Handle the case where set_target
- returns 3...
-
- * debugwin.itb (DebugWinDOpts::build_win): Replace $this delete
- with delete object $this.
- * tfind_args.tcl (build_win): Ditto...
- * helpviewer.itb (HtmlViewer::_buildwin): Ditto...
-
- * srcbar.tcl (GDBSrcBar): Reorder the Source & the page setup &
- print menus...
-
-1999-03-04 Martin Hunt <hunt@cygnus.com>
-
- * download.ith: New file.
- * download.itb: New file. Implements itcl3 class and replaces
- download.tcl.
-
- * srcbar.tcl (create_menu_items): Call create_run_menu
- without arguments.
- (create_run_menu): Add Disconnect and Connect to Run menu
- instead of file menu. Change download_it to Download::download_it.
-
- * srctextwin.itb (do_key): Change binding to call
- Download::download_it.
-
- * debugwin.itb (DebugWinDOpts::build_win): Add ProcessWIn to list
- of classes for filter.
-
- * interface.tcl (set_target): No need to set window title.
- (run_executable): Change download_it to Download::download_it
-
-1999-03-04 James Ingham <jingham@cygnus.com>
-
- * modal.tcl (ModalDialog): Handle WM_DELETE_WINDOW by calling the
- cancel method. Also set unpost_notification to different values
- in unpost & the destructor, so if the object dies irregularly, you
- know not to try to double destruct it.
-
-1999-03-03 James Ingham <jingham@cygnus.com>
-
- * warning.tcl (WarningDlg::constructor):Destroy with unpost.
-
- * util.tcl (get_disassembly_flavor, set_disassembly_flavor,
- init_disassembly_flavor): Added these functions for the Intel P2
- disassembly flavors.
- (list_element_strcmp): New function for lsort -command on lists.
-
- * tracedlg.tcl (TraceDlg): Change combobox callback to reflect new
- after behavior.
-
- * targetselction.itb (TargetSelection::save): If the target
- is not valid, tell the user rather than simple refusing to go
- away.
- Also move stuff around to isolate the instance dependant stuff as
- much as possible
- Also replace delete with unpost.
-
- * targetselection.ith (TargetSelection): Make as much of the
- initialization stuff Class functions as possible. Then only
- initialize it once.
-
- * srcwin.ith (_update_title): initialize need_files.
-
- * srcwin.itb (SrcWin::_build_win): I changed the combobox so it
- ran its code in an idle handler, so we can take out all the after
- idle... cruft here.
-
- * srctextwin.ith (SrcTextWin): Added textheight variable so you
- can adjust the height of the text display.
-
- * srctextwin.itb (SrcTextWin::build_win): Don't hardcode the size
- of the text window, set it with the textheight option instead.
- Also replace childsite with "component text" wherever required.
-
- * srcpref.itb (SrcPref::build_win, set_flavor): Added the Intel
- disassembly flavor combobox. Added set_flavor method to support
- this.
- * srcpref.ith: Added declaration for set_flavor, and
- disassembly_flavor instance variable.
-
- * modal.tcl (ModalDialog::post, unpost): Added unpost method to
- provide a more regular way to dismiss the dialogs. Just
- destroying them was leading to funny destruction order bugs.
- Added cancel method, which is what client code should call to
- "force close" the dialog, so child classes can override, and do
- some cleanup.
-
- * memwin.itb (MemWin::destructor): Call the cancel method of the
- Preferences dialog (if it is posted) rather than just destroying
- it.
-
- * mempref.itb (MemPref::ok): call unpost, since this is a modal
- dialog.
-
- * managedwin.itb (ManagedWin::reveal): Used to be called raise.
- Don't reuse Tcl or Tk commands unless there is a really good
- reason to...
- (ManagedWin::destroy_toplevel): renamed from delete, which
- conflicts both with the Itcl1.5 delete method, and the Itcl3.0
- delete command... Also, don't use this as the way to destroy
- ManagedWins, rather destroy the object and let the object take
- care of removing its toplevel.
- (ManagedWin::_create): Group all the windows with
- . for WindowManagers that properly handle this.
- (ManagedWin::_create): Use dont_remember_size
- rather than the instance variable. Also, windows which don't
- remember size are not necessarily transient.
- (ManagedWin::_create): Only call post if the
- ManagedWin also isa ModalDialog. It is clearer what is going on.
- * managedwin.ith: Carry through the name changes.
-
- * main.tcl: call init_disassembly_flavor for Intel assembly
- flavors.
-
- *main.tcl: Group . with . This is half of the work required to
- play nice with WindowMaker. The other half waits till we can get
- gdb to pass the command-line arguments to Tcl.
-
- * interface.tcl: Add file_changed_hook to the hooks. The browser
- window watches this and refreshes the file box if it changes.
-
- * globalpref.ith (GlobalPref): This should be a modal dialog.
- * globalpref.itb (GlobalPref::build_win): call update idletasks,
- not update. Since we are calling update, there is no reason to
- delay calling resize_font_item_height.
- * globalpref.itb: Replace destroy toplevel with unpost.
-
- * debugwin.itb (DebugWin::build_win): Replace childsite with
- "component text"
-
- * console.itb (Console::_build_win): Replace childsite with
- "component text"
-
- * browserwin.itb: Rewritten pretty completely.
- * prefs.tcl (pref_set_defaults): add the browser preferences.
-
- * prefs.tcl (pref_set_defaults): add the intel disassembly flavor
- preference.
-
- * about.tcl (About): This should be a modal dialog.
-
-1999-03-02 James Ingham <jingham@cygnus.com>
-
- * globalpref.itb (GlobalPref::make_font_item): Don't do the
- resize_font_item_height here, since an update can cause the resize
- before all the windows are built. Delay to the end of build_win
- instead.
-
-1999-02-24 James Ingham <jingham@cygnus.com>
-
- * toolbar.tcl (remove_button): Specify the row in the toolbar from
- which you are removing the item. On Windows, there are two rows
- in the standard toolbar...
-
-1999-02-22 Martin Hunt <hunt@cygnus.com>
-
- * warning.tcl (WarningDlg::constructor): Remove extra quote
- that was causing loading of this module to fail.
-
- * managedwin.itb (ManagedWin::_create): If the pack fails
- (for example because the warning dialog reliazed it should
- ignore the warning) print a warning debug message and return.
- Also, while testing, tell the window manager to position
- the window without asking the user for the position.
-
-1999-02-18 Martin Hunt <hunt@cygnus.com>
-
- * srctextwin.itb (SrcTextWin::FillAssembly): As a last resort,
- if the disassembly fails for some reason, switch to the scratch
- pane and write in a message about not being able to disassemble.
-
-1999-02-18 Martin Hunt <hunt@cygnus.com>
-
- * helpviewer.ith (HtmlViewer): Add thread and function
- browser windows to help index.
-
- * help/index.toc: Removed.
-
-1999-02-18 Martin Hunt <hunt@cygnus.com>
-
- * help/thread.html: New file. Thread window online help.
- * help/index.html: Add thread.html, and alphabetize list.
- * help/source.html: Add index for thread_bp.
-
-1999-02-17 Martin Hunt <hunt@cygnus.com>
-
- * globalpref.itb (GlobalPref::build_win): Add a checkbutton to
- allow use of an internet browser to read help files.
-
- * prefs.tcl (pref_set_defaults): Add preference gdb/help/browser.
- Default is to use builtin html help.
-
- * helpviewer.itb (HtmlViewer::open_help): New public proc.
- Depending on preferences, opens help in external browser or
- internal htmlviewer.
-
- * toolbar.tcl (create_help_menu): Use HtmlViewer::open_help.
-
-1999-02-17 Martin Hunt <hunt@cygnus.com>
-
- * managedwin.itb (ManagedWin::_create): Restore some lines that
- were accidently checked in commented out.
-
-1999-02-17 Keith Seitz <keiths@cygnus.com>
-
- * help/index.html: Add function browser.
- * help/browser.html: New help file.
-
-1999-02-12 Martin Hunt <hunt@cygnus.com>
-
- * managedwin.itb (ManagedWin::_create): If a window class defines a
- public variable "nosize" the size will not be set, only the position.
- * browserwin.ith (toggle_all_bp): Add public variable "nosize".
-
-1999-02-12 Martin Hunt <hunt@cygnus.com>
-
- * process.ith: New file.
- * process.itb: New file. Converted process.tcl to new itcl class.
- * process.tcl: Deleted.
-
- * warning.tcl (WarningDlg::constructor): Set the window name.
-
-1999-02-11 Martin Hunt <hunt@cygnus.com>
-
- * variables.tcl (editEntry): Check that $variable is not empty.
-
- * warning.tcl (WarningDlg::constructor): Put focus on the
- "OK" button and bind it to <Return>.
-
- * watch.tcl (add): If the user attempts to add a non-existent
- variable to the watch-window, display an ignorable warning.
-
- * interface.tcl (gdbtk_tcl_ignorable_warning): -transient
- should not take an argument.
- (set_target_name): Ditto.
- * srcbar.tcl (create_menu_items): Ditto.
- * memwin.itb (MemWin::create_prefs): Ditto.
- * managedwin.itb (ManagedWin::_create): Ditto.
-
-1999-02-11 James Ingham <jingham@cygnus.com>
-
- Move the Intel disassembly mode changes into devo.
-
- * main.tcl: Init the disassembly flavor bits.
- * prefs.tcl: Define disassembly-flavor
- * srcpref.ith: Add current_disassembly_flavor instance variable
- and set_flavor method.
- * srcpref.itb (build_win): Add the disassembly_flavor combobox.
- (apply): set the flavor, if applicable.
- (set_flavor): New method.
- * util.tcl: Add 3 new functions - get_disassembly_flavor,
- list_disassembly_flavor and init_disassembly_flavor.
-
-1999-02-10 Martin Hunt <hunt@cygnus.com>
-
- * srcwin.itb, download.tcl, main.tcl, srcbar.tcl: Removed old
- IDE stuff.
-
- * toolbar.tcl (create_help_menu): Updated Cygnus URL and
- removed old IDE stuff.
- (create_ide_buttons): Removed.
-
-1999-02-10 Martin Hunt <hunt@cygnus.com>
-
- * managedwin.itb (ManagedWin::_create): Bind Alt-F4 to
- always close the window.
-
-1999-02-10 Martin Hunt <hunt@cygnus.com>
-
- * main.tcl: Removed old debugging preferences.
- * prefs.tcl (pref_set_defaults): Ditto.
-
-1999-02-09 Martin Hunt <hunt@cygnus.com>
-
- * managedwin.itb (ManagedWin::_create): Simplify raise
- and post now that all windows use new manager.
-
- * warning.tcl (WarningDlg): Rewrite of entire class to use
- new itcl 3.0 class. Also now uses a "class name" to keep
- track of which messages should be ignored. Uses tk_messageBox
- of the message doesn't have -ignorable set.
-
- * interface.tcl: Removed IDE stuff.
- (gdbtk_tcl_ignorable_warning): Accept "class" argument and
- use it when creating a WarningDlg. Use new ManagedWin::open.
-
- * srctextwin.itb (SrcTextWin::set_tp_at_line): Fix TraceDlg
- open command to use ManagedWin::open.
-
- * srcpref.itb (SrcPref::build_win): Comment out line number
- option. It wasn't very useful and did not become effective
- until GDBtk was restarted.
-
-1999-02-09 James Ingham <jingham@cygnus.com>
-
- * srctextwin.itb (build_win): Set the paned window background to
- white so it looks better when you switch windows.
-
- * mempref.itb (build_win): Use the libgui combobox for the bytes per
- line field.
-
- * mempref.itb: remove some global declarations that I missed when
- I converted all the variables to instance data.
-
- * variables.tcl (change_value): Catch one more place where $this
- was being passed as a window name.
-
- * TODO: Added some more items, and removed some that had been fixed.
-
-Mon Feb 8 12:27:16 1999 Keith Seitz <keiths@cygnus.com>
-
- * interface.tcl (set_target_name): Fix switch syntax
- error and getd the options preference in case it's not set.
-
-
-Thu Feb 4 11:55:43 1999 Keith Seitz <keiths@cygnus.com>
-
- * targetselection.itb (_init_db): Add MIPS target.
- (fill_targets): Ditto.
-
-Thu Feb 4 07:56:12 1999 Keith Seitz <keiths@cygnus.com>
-
- * targetselection.itb: Set "TargetSelection::target_trace"
- as the correct trace for gdb_loaded.
- * targetselection.ith: Make "target_trace" a public proc.
-
-1999-02-03 Martin Hunt <hunt@cygnus.com>
-
- * help/console.html: Cleaned up and added history and editing
- commands.
-
- * stackwin.itb (StackWin::build_win): Remove balloon help.
-
- * console.itb (Console::_search_history): New function.
- Does a pattern match on history buffer.
- (Console::_rsearch_history): New function. Does a pattern
- match on history buffer in the reverse direction.
- (Console::_build_win): Bind Control-Up, Control-Down,
- Shift-Up, and Shift-Down to search history instead of mess
- up the console window. Bind Control-o to break to disable it.
-
- * help/stack.html: Cleanup.
-
- * help/source.html: Add a bunch of missing quotation marks.
-
-1999-02-03 Martin Hunt <hunt@cygnus.com>
-
- * memwin.itb: Change from tixControl widget to iwidgets::spinint.
- Fix problems with error dialogs.
-
-1999-02-02 Martin Hunt <hunt@cygnus.com>
-
- * srctextwin.itb (SrcTextWin::do_source_popup): Even after fixing the
- obvious syntax errors in this function, it didn't work. So I
- simplified the logic. Now it will attempt to use whatever is selected.
- If multiple lines are selected and tracing is enabled, it will set
- tracepoints, otherwise it will try to extract a variable name from single
- lines only.
-
- * main.tcl: Only open debugwin if GDBTK_DEBUG > 1.
-
- * toolbar.tcl (create_view_menu): Only add "Debug WIndow" menu
- item if GDBTK_DEBUG is set.
-
-1999-02-02 Martin Hunt <hunt@cygnus.com>
-
- * browserwin.itb (BrowserWin::_fill_source): Add lib argument
- from gdb_loc to the call to $Source location.
- (BrowserWin::_goto_func): Ditto.
-
-1999-02-01 James Ingham <jingham@cygnus.com>
-
- * browserwin.itb (BrowserWin::_fill_source): Add a null lib
- argument to the call to $Source location.
-
-1999-02-01 Martin Hunt <hunt@cygnus.com>
-
- * prefs.tcl (pref_save): Change the list of sections back into
- a list.
-
-1999-02-01 Martin Hunt <hunt@cygnus.com>
-
- * srctextwin.itb (SrcTextWin::FillMixed): Simplify line formatting.
- (SrcTextWin::continue_to_here): Call gdb_set_bp with new type arg.
- (SrcTextWin::set_bp_at_line): Call gdb_set_bp with new type arg.
- Use "catch" command and display error if there is one.
-
-1999-02-01 Martin Hunt <hunt@cygnus.com>
-
- * srcwin.itb (SrcWin::goto_func): Dont attach filename if
- there isn't a valid one.
-
-Fri Jan 29 20:01:30 1999 Fernando Nasser <fnasser@rtl.cygnus.com>
-
- * main.tcl: Restored kod code lost with merge
- * prefs.tcl: Ditto.
- * srctextwin.tcl: Ditto.
- * toolbar.tcl: Ditto
- * kod.tcl: Adapted to the new branch.
-
-1999-01-28 Martin Hunt <hunt@cygnus.com>
-
- * srcwin.itb (SrcWin::_build_win): Only call gdb_loc once.
- (SrcWin::location): Update linespec for gdb_loc to include
- the "lib" arg.
-
- * srctextwin.itb (SrcTextWin::LoadFromCache): Add "lib"
- argument. This is used to create a unique cache key so
- we don't confuse the disassembly of a function in a shared
- lib with the disassembly of its trampoline. Also updated
- UnLoadFromCache, LoadFIle, FillSource, FillMixed, and FillAssembly
- to pass this argument around.
-
- * helpviewer.ith (HtmlViewer::constructor): Declare we have a
- constructor.
- (PageStack::constructor): Delete this declaration.
-
- * helpviewer.itb (HtmlViewer::constructor): initialize args before
- calling _buildwin
-
- * main.tcl: Only open initial debug window if GDBTK_DEBUG
- is set.
-
- * help/debug.html: Add help for GDBTK_DEBUG
-
-Wed Jan 27 07:18:05 1999 Keith Seitz <keiths@cygnus.com>
-
- * interface.tcl (gdbtk_pc_changed): Removed.
- (gdbtk_register_changed): New procedure.
- (gdbtk_memory_changed): New procedure.
-
diff --git a/gdb/gdbtk/library/ChangeLog-2000 b/gdb/gdbtk/library/ChangeLog-2000
deleted file mode 100644
index 5d16d82673d..00000000000
--- a/gdb/gdbtk/library/ChangeLog-2000
+++ /dev/null
@@ -1,409 +0,0 @@
-2000-12-13 Fernando Nasser <fnasser@redhat.com>
-
- * variables.tcl (constructor): Use the file_changed_hook to remove
- all variables if the exec file changes. This prevents the Watch
- Window to dump core because the "types" are not valid anymore.
-
-2000-12-13 Fernando Nasser <fnasser@redhat.com>
-
- * session.tcl (session_save): Save target name.
- (session_load): Restore target name.
-
-2000-12-08 Tom Tromey <tromey@redhat.com>
-
- * managedwin.itb (ManagedWin::startup): Only open source window
- if it doesn't already exist.
-
- * toolbar.tcl (create_help_menu): Remove `Cygnus' item.
-
- * console.itb (Console::invoke): Trim trailing newlines from
- text.
-
-2000-12-07 Tom Tromey <tromey@redhat.com>
-
- * managedwin.itb (ManagedWin::reveal): Don't set focus.
-
- * tclIndex: Rebuilt.
- * interface.tcl (set_exe_name): Save session.
- (gdbtk_quit_check): Save session.
- * session.tcl: New file.
- * srcbar.tcl (create_menu_items): Add menu items to recall old
- sessions.
-
- * bpwin.itb (BpWin::goto_bp): Handle multiple source windows.
- * srctextwin.itb (SrcTextWin::get_file): New method.
- (SrcTextWin::set_tag_to_stack): New method.
- * srctextwin.ith (get_file): Declare.
- * srcwin.ith (update_hook_init, window_list, pc_window): New
- common variables.
- (_choose_window, choose_and_update, is_fixed, get_file): Declare.
- * srcwin.itb (SrcWin::_choose_window): New method.
- (SrcWin::choose_and_update): Likewise.
- (SrcWin::_update): Renamed from update. Now private. Added `loc'
- argument.
- (SrcWin::get_file): New method.
- (SrcWin::is_fixed): Likewise.
- (SrcWin::constructor): Only add update hook once. Append this
- object to window list.
- (SrcWin::destructor): Don't add update hook. Remove this object
- from window list. Clear pc_window if necessary.
- (SrcWin::get_top): New method.
- (SrcWin::_set_tag_to_stack): New method.
- (SrcWin::choose_and_display): New method.
-
- * srctextwin.itb (SrcTextWin::do_source_popup): Added "Set
- Breakpoint" to popup menu.
-
- * srcwin.itb (SrcWin::edit): Use uplevel, not eval, to evaluate
- external editor expression.
-
-2000-12-06 Tom Tromey <tromey@redhat.com>
-
- * targetselection.itb (TargetSelection::build_win): Add option to
- start xterm.
- * interface.tcl (run_executable): Call tty::create if requested.
- * tty.tcl: New file.
-
-2000-12-02 Tom Tromey <tromey@redhat.com>
-
- * console.ith (_set_wrap): Declare.
- (_update_option): Likewise.
- * console.itb (Console::constructor): Install preference hooks
- (commented out pending a bug fix).
- (Console::destructor): Remove preference hooks.
- (Console::_set_wrap): New method.
- (Console::_update_option): New method.
- (Console::_build_win): Use _set_wrap.
-
-2000-12-01 Larry Smith <lsmith@redhat.com>
-
- * console.itb (invoke): Added logic to allow user to build
- up multiline "tk" commands based on results from checking
- command with [info complete $cmd]s.
-
-2000-11-30 Tom Tromey <tromey@cygnus.com>
-
- * srctextwin.ith (enable_disable_at_line): Declare.
- * srctextwin.itb (SrcTextWin::build_popups): Create popup for
- disabled breakpoint. Add "disable" to breakpoint menu.
- (enable_disable_at_line): New method.
- (SrcTextWin::do_bp): Don't remove the tag we are adding -- remove
- the "opposite" tag.
-
-2000-11-30 Tom Tromey <tromey@cygnus.com>
-
- * prefs.tcl (pref_save): Put version number into file. Added
- `session' to list of top-level keys. Allow keys with many `/'s.
- (pref_read): Recognize version number.
- (escape_value): Generate URL-style encoding.
- (unescape_value): Added `version' argument. Handle URL decoding.
-
-2000-11-29 Larry Smith <lsmith@redhat.com>
-
- * regwin.itb (build_win,but3): Added "Double" menu entry to
- permit selection of "f" format for register display.
-
-2000-11-06 Fernando Nasser <fnasser@cygnus.com>
-
- * interface.tcl (show_warning): Add missing argument to ide_messageBox
- and add comments explaining why we use it for windows.
-
-2000-11-01 Larry Smith <lsmith@redhat.com>
-
- * console.itb (_build_win): Added code to remove horizontal
- scrollbar by setting -hscrollmode none, which enables the
- console widget to wrap text properly.
- * globalpref.itb (build_win): added checkbutton to enable
- wrapping text in the console window.
-
-2000-10-31 Larry Smith <lsmith@redhat.com>
-
- * targetselection.ith (run_method): Add variable for
- "Run Program" and "Continue..." buttons
- * targetselection.itb (build_win): put "Run Program" and
- "Continue From..." buttons into a frame and save them in new
- run_method variable.
- * change targetselection.itb (change_target) disables "Run
- Program" and "Continue..." buttons when the target is "exec",
- enables them for all others.
-
-2000-10-26 Larry Smith <lsmith@redhat.com>
-
- * targetselection.itb: Run Program and Continue From Last Stop
- are now radio buttons rather than checkbuttons
-
-2000-10-26 Mo DeJong <mdejong@redhat.com>
-
- * attachdlg.itb (list_pids): Use "ps axw" to get pid list
- when running under Linux. Use string match instead of
- regexp match is ps filter entry.
- * attachdlg.ith (list_pids): Change default argument to "*".
-
-2000-10-23 Fernando Nasser <fnasser@cygnus.com>
-
- * util.tcl (find_iwidgets_library): Use the directories that were
- actually searched in the error message.
-
-2000-10-13 Fernando Nasser <fnasser@cygnus.com>
-
- With Steven Johnson <sbjohnson@ozemail.com.au>
- This change fixes part of the possible scenarios where a race condition
- would cause core dumps if there were commands changing registers or
- other target resources in a startup script.
- The remaining scenarios are fixed by a patch to generic/gdbtk-hooks.c
- * interface.tcl (gdbtk_update_safe): New function. Like gdbtk_update
- but does nothing if target is running.
- (gdbtk_register_changed): Call the above safe version.
- (gdbtk_memory_changed): Likewise.
-
-2000-10-11 Fernando Nasser <fnasser@cygnus.com>
-
- * srctextwin.itb (build_popups): Fix typos that caused duplicate
- "Jump to Here" menu entries in the breakpoint-set right-click pop-up
- menu.
-
-2000-10-04 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * download.itb (download_it): Fix previous changes for non-windows
- hosts.
- * srctextwin.itb (LoadFromCache): Ditto.
-
-2000-10-04 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * download.itb (download_it): Convert filename to native before
- passing it to a Tcl command.
- * srctextwin.itb (_mtime_changed): Ditto.
- (LoadFromCache): Ditto.
-
-2000-09-18 Fernando Nasser <fnasser@cygnus.com>
-
- * watch.tcl (build_win): Use code when setting callback.
-
-2000-08-10 Fernando Nasser <fnasser@cygnus.com>
-
- * targetselection.itb (change_baud): Fix typo (ETH, not ETX).
-
-2000-08-10 Fernando Nasser <fnasser@cygnus.com>
-
- * targetselection.itb (init_target_db): Add 115200 baud option to
- target remote.
-
-2000-08-10 Fernando Nasser <fnasser@cygnus.com>
-
- * targetselection.itb (change_baud): Don't set baud for ETX.
-
-2000-08-10 Fernando Nasser <fnasser@cygnus.com>
-
- * srctextwin.itb (jump_to_here): New method. Implements the
- "Jump to Here" popup menu option.
- (build_popups): Add the "Jump to Here" option to the popup menu.
- * srctextwin.ith: Add declaration of jump_to_here().
-
-2000-08-09 Fernando Nasser <fnasser@cygnus.com>
-
- * srctextwin.itb (FillSource): Add comments.
- * srcwin.itb (set_execution_status): Fix typo in SRC+ASM message.
- It is gdb_cmd, not gb_cmd.
-
-2000-08-08 Fernando Nasser <fnasser@cygnus.com>
-
- * srctextwin.itb (LoadFromCache): Do not cache if cannot stat the file.
- This lead to problems trying to access a incomplete cache entry later.
-
-2000-06-06 Fernando Nasser <fnasser@cygnus.com>
-
- * util.tcl (find_iwidgets_library): Add missing global declaration
- which caused a stack trace instead of the proper error message.
-
-2000-05-04 Fernando Nasser <fnasser@cygnus.com>
-
- * regwin.itb (build_win, update): Safer test for editable.
-
-2000-05-01 Fernando Nasser <fnasser@cygnus.com>
-
- * variables.tcl (edit): Make changes to a variable which is a register
- to be reflected on the register window by running the update hook.
-
-2000-05-01 Fernando Nasser <fnasser@cygnus.com>
-
- * regwin.itb (build_win): Adjust size of columns independently, force
- typed registers to raw mode and check if values can be edited.
- Also, add "Add to Watch" option to the menu.
- (update): Similar changes to similar code.
- (init_reg_display_vars): Initialize new variables used above.
- (reg_select): Deactivate menu options when action is not possible.
- (but3): Ditto.
- (edit): Do not edit if it is not editable.
- (acceptEdit): Fix bug is error message box display.
- (addToWatch): New mwthod. Add a register to the Watch window.
- * regwin.ith: Add addToWatch to the class.
- * tclIndex: Regenerate.
-
-2000-04-27 James Ingham <jingham@leda.cygnus.com>
-
- These changes allow Insight to handle the case where there are
- symbols for the source files, but the source files are not in the
- location pointed to by the symbol.
-
- * srctextwin.itb (SrcTextWin::setTabs): Make the "asm" type for
- the source display "S" not "", which is not very clear.
- (SrcTextWin::configWin): ditto.
- (SrcTextWin::FillAssembly): Handle all return values from
- LoadFromCache.
- * (SrcTextWin::LoadFile): Handle "couldn't find file" return from
- LoadFromCache.
- * (SrcTextWin::LoadFromCache): If the source file could not be
- found, return -1 rather than choking.
- Also change "asm" type for source from "" to "S".
- * srctextwin.ith: Change the defaults for the "asm" type from ""
- to "S" for Source display. This is just cosmetic, but clearer.
-
-2000-04-13 Tom Tromey <tromey@cygnus.com>
-
- * console.itb (Console::_complete): Dequoted first argument to
- switch. Window name is `$_twin', not `_twin'.
-
-2000-04-10 Tom Tromey <tromey@cygnus.com>
-
- * srctextwin.itb (SrcTextWin::build_popups): Don't set actibe
- background on popup menu item.
-
-2000-04-08 Tom Tromey <tromey@cygnus.com>
-
- * console.itb (Console::_build_win): Make Control-a, Control-u,
- and Control-w bindings show the insertion point.
-
-2000-04-05 James Ingham <jingham@leda.cygnus.com>
-
- * regwin.itb (RegWin::build_win): Enable the "Display all
- registers" menu at startup if any registers have been removed.
- (RegWin::save_reg_display_vars): Handle cases where the register
- set is not contiguous.
- (RegWin::destructor): Actually save away the removed registers.
- The latter two are Steve Johnson's change.
-
- * regwin.ith (RegWin): Added "all_regs_shown" and
- "disp_all_menu_item" to handle tracking whether any registers have
- been removed from the display.
-
-
-2000-04-03 Steve Johnson <sbjohnson@ozemail.com.au>
-
- * regwin.itb (dimensions): Use rows from preference file rather
- than hard-coding a preference.
- * prefs.tcl (pref_set_defaults): Add gdb/reg/rows preference.
-
-2000-04-03 James Ingham <jingham@leda.cygnus.com>
-
- * util.tcl (find_iwidgets_library): Follow links in determining
- the location of the executable.
-
-2000-03-30 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * variables.tcl (edit): Remove call to close, which caused editing
- of variables to fail.
- Note: I don't know why we would need to do this here as it seems
- that the "delete entry" operation will do that.
- Perhaps this was to account to some old widget bug.
- But we cannot call close here because it calls UnEdit,
- which unsets some of the edit state.
- (open): Make sure to abort any ongoing edit. This was causing problems
- when someone tried to expand an structure while editing its pointer.
-
-2000-03-28 James Ingham <jingham@leda.cygnus.com>
-
- * managedwin.itb (ManagedWin::startup): Open the SrcWin, this does
- two things, 1) Makes sure that there IS a SrcWin, and 2) brings
- the first such window to the foreground...
-
-2000-03-28 Jim Blandy <jimb@redhat.com>
-
- Handle the fact that there are holes in the register numbering.
- * regwin.itb (RegWin::init_reg_display_vars): Ask gdb_regnames to
- provide the register numbers, too; don't just assume that the Nth
- element is register N.
-
-2000-03-27 James Ingham <jingham@leda.cygnus.com>
-
- * interface.tcl (gdbtk_quit): Let the window manager store away
- the list of active windows before quitting.
- (gdbtk_tcl_preloop): Open all the windows that were active in the
- former session.
- * prefs.tcl (pref_set_defaults): Set the default value of the
- "gdb/window/active" pref. Stores the list of active windows.
- * managedwin.itb (ManagedWin::pickle): New method - store away
- instructions to recreate this window.
- (ManagedWin::shutdown): New Method - run through the active windows
- pickling them all.
- (ManagedWin::startup): Restore all the saved active windows.
- * managedwin.ith: Declare pickle, shutdown & startup.
- * tclIndex: regenerate.
-
-2000-03-10 James Ingham <jingham@leda.cygnus.com>
-
- * targetselection.ith (get_target_list): Should be a proc, since
- it does nothing instance-specific.
-
- * util.tcl (keep_raised): For some reason raising a window, then
- deiconifying it is MUCH faster on "e" & WindowMaker under XFree.
- Go figure. Other WM's don't seem to care, so do it this way...
- * managedwin.itb (ManagedWin::reveal): Ditto...
-
-2000-03-10 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * srcbar.tcl (do_attach): Just call gdbtk_attach_native.
- (do_connect): Replace gdbtk_attach_target call with
- gdbtk_attach_remote call.
-
- * interface.tcl (gdbtk_attach_native): Renamed from do_attach method
- and moved from srcbar.tcl.
- (gdbtk_attach_remote): New proc. Renamed from gdb_attach_target,
- to better distinguish from the native version.
- (run_executable): Change gdbtk_attach_target call into
- gdbtk_attach_remote.
-
- * srctextwin.itb: Add keyboard accelerator for Attach command.
-
- * tclIndex: Rebuild.
-
-2000-03-09 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- From: James Ingham <jingham@leda.cygnus.com>:
- * attachdlg.itb (build_win): Pack the dialog better, so that when
- window is resized components are not hidden.
-
-2000-03-02 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * attachdlg.itb: Give a name to the window.
-
-2000-03-01 James Ingham <jingham@leda.cygnus.com>
-
- * interface.tcl (_open_file): The window which had the focus could
- get deleted by the vwait implicit in the tk_getOpenFile call. So
- check and make sure it is still around before raising it...
-
-2000-02-23 Keith R Seitz <kseitz@nwlink.com>
-
- * srctextwin.ith (_highlightAsmLine): Define new method.
- * srctextwin.itb (_highlightAsmLine): New method.
- (FillAssembly, FillMixed): Use _highlightAsmLine to highlight
- the current assembly line.
-
-Fri Feb 4 23:19:03 2000 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdb/gdbtcl2: Directory renamed to gdb/gdbtk/library.
-
-2000-01-12 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * targetselection.itb (init_target_db): Add the word "serial" to
- the Angel target to make the distinction clear from the UDP connection.
-
-2000-01-05 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- From Dave Vogel (dave@lightsurf.com):
- * targetselection.itb (init_target_db, config_dialog): Add support
- for selecting a target running the Angel monitor (RDI protocol)
- over an UDP connection.
- * interface.tcl (set_target_name): Set hostname when target is RDI
- over UDP (see previous entry).
-
diff --git a/gdb/gdbtk/library/Makefile b/gdb/gdbtk/library/Makefile
deleted file mode 100644
index c1e653b7944..00000000000
--- a/gdb/gdbtk/library/Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-
-TCL := $(wildcard *.tcl *.itcl *.ith *.itb)
-
-TCLSH = tclsh
-
-tclIndex: $(TCL) Makefile
- echo "package require Itcl; auto_mkindex `pwd` $(TCL)" | $(TCLSH)
-
-tags: TAGS
-TAGS: $(TCL)
- etags --lang=none --regex='/[ \t]*\(proc\|method\|itcl_class\)[ \t]+\([^ \t]+\)/\1/' $(TCL)
diff --git a/gdb/gdbtk/library/about.tcl b/gdb/gdbtk/library/about.tcl
deleted file mode 100644
index 937b48051c8..00000000000
--- a/gdb/gdbtk/library/about.tcl
+++ /dev/null
@@ -1,43 +0,0 @@
-# About window for GDBtk.
-# Copyright (C) 1997, 1998, 1999, 2000, 2001 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-# ----------------------------------------------------------------------
-# Implements About window
-# ----------------------------------------------------------------------
-
-itcl::class About {
- inherit ManagedWin ModalDialog
- constructor {args} {
- global gdb_ImageDir
- set f [frame $itk_interior.f]
- label $f.image1 -bg #ee0000 -image \
- [image create photo -file [file join $gdb_ImageDir insight.gif]]
- message $f.m -bg #ee0000 -fg white -text [gdb_cmd {show version}] \
- -aspect 500 -relief flat
- pack $f.image1 $f.m $itk_interior.f -fill both -expand yes
- pack $itk_interior
- bind $f.image1 <1> [code $this unpost]
- bind $f.m <1> [code $this unpost]
- window_name "About Red Hat Insight"
- }
-
- # Don't quit if this is the last window. The only way that this can
- # happen is if we are the splash screen.
-
- method quit_if_last {} {
- return 0
- }
-
-}
-
diff --git a/gdb/gdbtk/library/actiondlg.tcl b/gdb/gdbtk/library/actiondlg.tcl
deleted file mode 100644
index 20314bfabf9..00000000000
--- a/gdb/gdbtk/library/actiondlg.tcl
+++ /dev/null
@@ -1,810 +0,0 @@
-# Tracepoint actions dialog for Insight.
-# Copyright (C) 1997, 1998, 1999, 2001 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-itcl::class ActionDlg {
- inherit ManagedWin
-
- # ------------------------------------------------------------------
- # CONSTRUCTOR
- # ------------------------------------------------------------------
- constructor {args} {
- global _TStepCount _TOtherVariable
-
- eval itk_initialize $args
-
- set Registers [gdb_reginfo name]
- if {$Line != ""} {
- set Locals [gdb_get_locals "$File:$Line"]
- set Args [gdb_get_args "$File:$Line"]
- } else {
- set Locals [gdb_get_locals "*$Address"]
- set Args [gdb_get_args "*$Address"]
- }
- set Variables [concat $Locals $Args]
- foreach a $Registers {
- lappend Variables "\$$a"
- }
-
- if {[llength $Args] > 0} {
- lappend Variables "All Arguments"
- }
- if {[llength $Locals] > 0} {
- lappend Variables "All Locals"
- }
- lappend Variables "All Registers"
- lappend Variables "Collect Stack"
-
- build_win
-
- # Set a default return status, in case we are destroyed
- set _TOtherVariable {}
-
- # Fill the listboxes with any default data
- if {"$Data" != {}} {
- change 1 $Data
- }
- }
-
- # ------------------------------------------------------------------
- # DESTRUCTOR - destroy window containing widget
- # ------------------------------------------------------------------
- destructor {
-
- # Remove this window and all hooks
- # grab release $this
-
- # Note that this is okay: the callback (TraceDlg::done, usually) will
- # ignore stray "cancel" callbacks
- eval $Callback cancel
- }
-
- # ------------------------------------------------------------------
- # METHOD: build_win - build the Trace dialog box (cache this?)
- # ------------------------------------------------------------------
- method build_win {} {
- global _TStepCount _TOtherVariable
-
- set f $itk_interior
-
- # The two frames of this dialog
- set bbox [frame $f.bbox]; # for holding OK,CANCEL buttons
- set data [frame $f.data]; # for everything else
-
- # Setup the button box
- button $bbox.ok -text OK -command "$this ok"
- button $bbox.cancel -text CANCEL -command "$this cancel"
- pack $bbox.ok $bbox.cancel -side left -padx 10 -expand yes
-
- # The "Data Collection" Frame
- set top [frame $data.top]
- set bot [frame $data.bot]
-
- set boxes [frame $top.boxes]
- set cFrame [frame $boxes.cFrame]
- set vFrame [frame $boxes.vFrame]
- set bFrame [frame $boxes.bframe]
- set oFrame [frame $top.uFrame]
- pack $cFrame $bFrame $vFrame -side left -expand yes -padx 5
-
- # While stepping
- if {$WhileStepping} {
- set step_frame [frame $top.stepf]
- label $step_frame.whilelbl -text {While Stepping, Steps:}
- set WhileSteppingEntry [entry $step_frame.steps \
- -textvariable _TStepCount \
- -width 5]
- pack $step_frame.whilelbl $WhileSteppingEntry -side left
- }
-
- # The Collect listbox
- label $cFrame.lbl -text {Collect:}
- set CollectLB [iwidgets::scrolledlistbox $cFrame.lb -hscrollmode dynamic \
- -vscrollmode dynamic \
- -selectioncommand [code $this toggle_button_state 0] \
- -dblclickcommand [code $this change 0] \
- -selectmode extended \
- -exportselection false]
- [$CollectLB component listbox] configure -background gray92
- pack $cFrame.lbl $cFrame.lb -side top -expand yes -pady 2
-
- # The Variables listbox
- label $vFrame.lbl -text {Variables:}
- set VariablesLB [iwidgets::scrolledlistbox $vFrame.lb -hscrollmode dynamic \
- -vscrollmode dynamic \
- -selectioncommand [code $this toggle_button_state 1] \
- -dblclickcommand [code $this change 1] \
- -selectmode extended \
- -exportselection false]
- [$VariablesLB component listbox] configure -background gray92
- pack $vFrame.lbl $vFrame.lb -side top -expand yes -pady 2
-
- # The button frame
- set AddButton [button $bFrame.add -text {<<< Collect} \
- -command "$this change 1" -state disabled]
- set RemoveButton [button $bFrame.del -text {Ignore >>>} \
- -command "$this change 0" -state disabled]
- pack $bFrame.add $bFrame.del -side top -expand yes -pady 5
-
- # The other frame (type-in)
- label $oFrame.lbl -text {Other:}
- set OtherEntry [entry $oFrame.ent -textvariable _TOtherVariable]
- pack $oFrame.lbl $OtherEntry -side left
- bind $OtherEntry <Return> "$this change_other"
-
- # Pack these frames
- if {$WhileStepping} {
- pack $step_frame -side top
- }
-
- pack $boxes $oFrame -side top -padx 5 -pady 5
- pack $top $bot -side top
-
- # Fill the list boxes
- fill_listboxes
-
- # Pack the main frames
- # after idle
- pack $f.data $bbox -side top -padx 4 -pady 2 \
- -expand yes -fill x
-
- # !!???
- if {$WhileStepping} {
- $WhileSteppingEntry delete 0 end
- $WhileSteppingEntry insert 0 $Steps
- }
- }
-
- method toggle_button_state {add} {
-
- # This is invoked whenever a <1> event is generated in
- # the listbox...
- if {$add} {
- set a [$VariablesLB getcurselection]
- if {"$a" != ""} {
- $AddButton configure -state normal
- $RemoveButton configure -state disabled
- }
- } else {
- set a [$CollectLB getcurselection]
- if {"$a" != ""} {
- $AddButton configure -state disabled
- $RemoveButton configure -state normal
- }
- }
- }
-
-
- # ------------------------------------------------------------------
- # METHOD: fill_listboxes - fills the two listboxes
- # ------------------------------------------------------------------
- method fill_listboxes {{last {}}} {
-
- # Fill the Collect listbox with the variables being collected
- if {[info exists Collect]} {
- fill_collect $last
- }
-
- fill_variables $last
- }
-
- # ------------------------------------------------------------------
- # METHOD: change - change a selected variable
- # ------------------------------------------------------------------
- method change {add {select {}}} {
- if {"$select" == {}} {
- set selections [get_selections $add]
- set lb [lindex $selections 0]
- set last [lindex $selections 1]
- set selection [lindex $selections 2]
- set noname 1
- } else {
- # This usually (only) occurs when we open this dialog for editing
- # some existing action.
- set lb {}
- set last {}
- set noname 0
- set selection $select
- }
-
- $RemoveButton configure -state disabled
- $AddButton configure -state disabled
-
- # Remove all the selections from one list
- # and add them to the other list
- if {$add} {
- set list1 $Variables
- set list2 $Collect
- } else {
- set list1 $Collect
- set list2 $Variables
- }
-
- foreach a $selection {
- if {$noname} {
- set name [$lb get $a]
- } else {
- set name $a
- }
-
- if {"$name" == "All Locals" || "$name" == {$loc}} {
- set name "All Locals"
- set lists [all_locals $add]
- set list1 [lindex $lists 0]
- set list2 [lindex $lists 1]
- } elseif {"$name" == "All Registers" || "$name" == {$reg}} {
- set name "All Registers"
- set lists [all_regs $add]
- set list1 [lindex $lists 0]
- set list2 [lindex $lists 1]
- } elseif {"$name" == "All Arguments" || "$name" == {$arg}} {
- set name "All Arguments"
- set lists [all_args $add]
- set list1 [lindex $lists 0]
- set list2 [lindex $lists 1]
- } else {
- set i [lsearch -exact $list1 $name]
- set list1 [lreplace $list1 $i $i]
-
- # Check if this is something we want to keep on a list
- if {[lsearch $Args $name] != -1 || [lsearch $Registers [string trim $name \$]] != -1 || [lsearch $Locals $name] != -1 || $add} {
- lappend list2 $name
- }
- }
-
- if {$add} {
- set Collect $list2
- set Variables $list1
- } else {
- set Collect $list1
- set Variables $list2
- }
- }
-
- # Update boxes (!! SLOW !!)
- fill_collect $last
- fill_variables $last
- }
-
- # ------------------------------------------------------------------
- # METHOD: fill_collect - fill the collect box
- # ------------------------------------------------------------------
- method fill_collect {{last {}}} {
-
- $CollectLB delete 0 end
- set Collect [sort $Collect]
- foreach a $Collect {
- $CollectLB insert end $a
- }
- if {"$last" != ""} {
- $CollectLB see $last
- }
- }
-
- # ------------------------------------------------------------------
- # METHOD: fill_variables - fill the variables box
- # ------------------------------------------------------------------
- method fill_variables {{last {}}} {
-
- $VariablesLB delete 0 end
- set Variables [sort $Variables]
- foreach a $Variables {
- $VariablesLB insert end $a
- }
-
- if {"$last" != ""} {
- $VariablesLB see $last
- }
- }
-
- # ------------------------------------------------------------------
- # METHOD: sort - sort a list of variables, placing regs and
- # special identifiers (like "All Locals") at end
- # ------------------------------------------------------------------
- method sort {list} {
-
- set special_names {
- "All Arguments" args \
- "All Locals" locs \
- "All Registers" regs \
- "Collect Stack" stack
- }
-
- foreach {name var} $special_names {
- set i [lsearch $list $name]
- if {$i != -1} {
- set $var 1
- set list [lreplace $list $i $i]
- } else {
- set $var 0
- }
- }
-
- # Extract all the locals, regs, args, globals
- set types_list {Args Locals Registers }
- foreach type $types_list {
- set used_$type {}
-
- foreach a [set $type] {
- set i [lsearch $list $a]
- if {$i != -1} {
- lappend used_$type $a
- set list [lreplace $list $i $i]
- }
- }
- set used_$type [lsort [set used_$type]]
- }
-
- set globals [lsort $list]
-
- # Sort the remaining list in order: args, locals, globals, regs
- set list [concat $used_Args $used_Locals $globals $used_Registers]
-
- set list2 {}
-
- foreach {name var} $special_names {
- if {[set $var]} {
- lappend list2 $name
- }
- }
-
- set list [concat $list2 $list]
- return $list
- }
-
- # ------------------------------------------------------------------
- # METHOD: all_args - add/remove all args
- # ------------------------------------------------------------------
- method all_args {add} {
-
- if {$add} {
- set list1 $Variables
- set list2 $Collect
- } else {
- set list1 $Collect
- set list2 $Variables
- }
-
-# foreach var $Args {
-# set i [lsearch $list1 $var]
-# if {$i != -1} {
-# set list1 [lreplace $list1 $i $i]
-# lappend list2 $var
-# }
-# }
-
- lappend list2 "All Arguments"
- set i [lsearch $list1 "All Arguments"]
- if {$i != -1} {
- set list1 [lreplace $list1 $i $i]
- }
-
- return [list $list1 $list2]
- }
-
- # ------------------------------------------------------------------
- # METHOD: all_locals - add/remove all locals
- # ------------------------------------------------------------------
- method all_locals {add} {
-
- if {$add} {
- set list1 $Variables
- set list2 $Collect
- } else {
- set list1 $Collect
- set list2 $Variables
- }
-
-# foreach var $Locals {
-# set i [lsearch $list1 $var]
-# if {$i != -1} {
-# set list1 [lreplace $list1 $i $i]
-# lappend list2 $var
-# }
-# }
-
- lappend list2 "All Locals"
- set i [lsearch $list1 "All Locals"]
- if {$i != -1} {
- set list1 [lreplace $list1 $i $i]
- }
-
- return [list $list1 $list2]
- }
-
- # ------------------------------------------------------------------
- # METHOD: all_regs - add/remove all registers
- # ------------------------------------------------------------------
- method all_regs {add} {
-
- if {$add} {
- set list1 $Variables
- set list2 $Collect
- } else {
- set list1 $Collect
- set list2 $Variables
- }
-
-# foreach var $Registers {
-# set i [lsearch $list1 "\$$var"]
-# if {$i != -1} {
-# set list1 [lreplace $list1 $i $i]
-# lappend list2 "\$$var"
-# }
-# }
-
- lappend list2 "All Registers"
- set i [lsearch $list1 "All Registers"]
- if {$i != -1} {
- set list1 [lreplace $list1 $i $i]
- }
-
- return [list $list1 $list2]
- }
-
- # ------------------------------------------------------------------
- # METHOD: change_other - add/remove a user defined type
- # ------------------------------------------------------------------
- method change_other {} {
- set other [$OtherEntry get]
-
- if {"$other" != ""} {
- set added 0
-
- # Check if this is a local/register/arg
- set i [lsearch $Locals "$other"]
- if {$i != -1} {
- set i [lsearch $Collect "$other"]
- set added 1
- if {$i != -1} {
- # It's a local on the collection list
- debug "local on collection list"
- set add 0
- set list1 [lreplace $Collect $i $i]
- set list2 [concat $Variables "$other"]
- } else {
- # It's a local on the variables list
- debug "local on variable list"
- set add 1
- set i [lsearch $Variables "$other"]
- set list1 [lreplace $Variables $i $i]
- set list2 [concat $Collect "$other"]
- }
- }
-
- set i [lsearch $Registers [string trim "$other" \$]]
- if {$i != -1} {
- set i [lsearch $Collect "$other"]
- set added 1
- if {$i != -1} {
- # It's a register on the collection list
- debug "register on collection list"
- set add 0
- set list1 [lreplace $Collect $i $i]
- set list2 [concat $Variables "$other"]
- } else {
- # It's a register on the variables list
- debug "register on variable list"
- set add 1
- set i [lsearch $Variables "$other"]
- set list1 [lreplace $Variables $i $i]
- set list2 [concat $Collect "$other"]
- }
- }
-
- set i [lsearch $Args $other]
- if {$i != -1} {
- set i [lsearch $Collect "$other"]
- set added 1
- if {$i != -1} {
- # It's an arg on the collection list
- debug "arg on collection list"
- set add 0
- set list1 [lreplace $Collect $i $i]
- set list2 [concat $Variables "$other"]
- } else {
- # It's an arg on the variables list
- debug "arg on variable list"
- set add 1
- set i [lsearch $Variables "$other"]
- set list1 [lreplace $Variables $i $i]
- set list2 [concat $Collect "$other"]
- }
- }
-
- # Check for special tags
- if {!$added} {
- if {"[string tolower $other]" == "all locals"} {
- set i [lsearch $Variables "All Locals"]
- if {$i != -1} {
- # It's "All Locals" on the variables list
- set add 1
- set lists [all_locals 1]
- set list1 [lindex $lists 0]
- set list2 [lindex $lists 1]
- } else {
- # It's "All Locals" on the Collect list
- set add 0
- set lists [all_locals 0]
- set list1 [lindex $lists 0]
- set list2 [lindex $lists 1]
- }
- } elseif {"[string tolower $other]" == "all registers"} {
- set i [lsearch $Variables "All Registers"]
- if {$i != -1} {
- # It's "All Registers" on the Variables list
- set add 1
- set lists [all_regs 1]
- set list1 [lindex $lists 0]
- set list2 [lindex $lists 1]
- } else {
- set add 0
- set lists [all_regs 0]
- set list1 [lindex $lists 0]
- set list2 [lindex $lists 1]
- }
- } elseif {"[string tolower $other]" == "all arguments"} {
- set i [lsearch $Variables "All Arguments"]
- if {$i != -1} {
- # It's "All Arguments" on the Variables list
- set add 1
- set lists [all_args 1]
- set list1 [lindex $lists 0]
- set list2 [lindex $lists 1]
- } else {
- set add 0
- set lists [all_args 0]
- set list1 [lindex $lists 0]
- set list2 [lindex $lists 1]
- }
- } elseif {"[string tolower $other]" == "collect stack"} {
- set i [lsearch $Variables "Collect Stack"]
- if {$i != -1} {
- # It's "All Arguments" on the Variables list
- set add 1
- set lists [all_args 1]
- set list1 [lindex $lists 0]
- set list2 [lindex $lists 1]
- } else {
- set add 0
- set lists [all_args 0]
- set list1 [lindex $lists 0]
- set list2 [lindex $lists 1]
- }
- } else {
- # Check if this entry is on the Collect list
- set i [lsearch $Collect $other]
- if {$i != -1} {
- # It's on the list -- remove it
- set add 0
- set list1 [lreplace $Collect $i $i]
- set list2 $Variables
- } else {
- # It's not on the list -- add it
-
- set other [string trim $other \ \r\t\n]
-
- # accept everything, send to gdb to validate
- set ok 1
-
- # memranges will be rejected right here
-
- if {[string range $other 0 1] == "\$("} {
- tk_messageBox -type ok -icon error \
- -message "Expression syntax not supported"
- set ok 0
- }
-
- # do all syntax checking later
- if {$ok} {
- #debug "Keeping \"$other\""
- # We MUST string out all spaces...
- if {[regsub -all { } $other {} expression]} {
- set other $expression
- }
- set add 1
- set list1 $Variables
- set list2 [concat $Collect "$other"]
- } else {
- #debug "Discarding \"$other\""
- }
- }
- }
- }
-
- # Clear the entry
- $OtherEntry delete 0 end
-
- if {$add} {
- set Variables $list1
- set Collect $list2
- } else {
- set Variables $list2
- set Collect $list1
- }
- fill_listboxes
- }
- }
-
-
- # ------------------------------------------------------------------
- # METHOD: get_selections - get all the selected variables
- # pass 0 to get the selections from the collect box
- # Returns a list of: listbox in which the selections were
- # obtained, last element selected on the list, and all the
- # selected elements
- # ------------------------------------------------------------------
- method get_selections {vars} {
-
- if {$vars} {
- set widget $VariablesLB
- } else {
- set widget $CollectLB
- }
-
- set elements [$widget curselection]
- set list {}
- set i 0
- foreach i $elements {
- lappend list [$widget get $i]
- }
-
- return [list $widget $i $elements]
- }
-
- # ------------------------------------------------------------------
- # METHOD: cancel - cancel the dialog and do not set the trace
- # ------------------------------------------------------------------
- method cancel {} {
- ::delete object $this
- }
-
- method remove_special {list items} {
-
- foreach item $items {
- set i [lsearch $list $item]
- if {$i != -1} {
- set list [lreplace $list $i $i]
- } else {
- set i [lsearch $list \$$item]
- if {$i != -1} {
- set list [lreplace $list $i $i]
- }
- }
- }
-
- return $list
- }
-
- # ------------------------------------------------------------------
- # METHOD: ok - validate the tracepoint and install it
- # ------------------------------------------------------------------
- method ok {} {
- global _TStepCount
-
- # Add anything in the OtherEntry
- change_other
-
- # Check that we are collecting data
- if {[llength $Collect] == 0} {
- # No data!
- set msg "No data specified for the given action."
- set answer [tk_messageBox -type ok -title "Tracepoint Error" \
- -icon error \
- -message $msg]
- case $answer {
- cancel {
- cancel
- }
- ok {
- return
- }
- }
- }
-
- set i [lsearch $Collect "All Locals"]
- if {$i != -1} {
- set data [lreplace $Collect $i $i]
- set data [concat $data {$loc}]
-
- # Remove all the locals from the list
- set data [remove_special $data $Locals]
- } else {
- set data $Collect
- }
-
- set i [lsearch $data "All Registers"]
- if {$i != -1} {
- set data [lreplace $data $i $i]
- set data [concat $data {$reg}]
-
- # Remove all the locals from the list
- set data [remove_special $data $Registers]
- }
-
- set i [lsearch $data "All Arguments"]
- if {$i != -1} {
- set data [lreplace $data $i $i]
- set data [concat $data {$arg}]
-
- # Remove all the locals from the list
- set data [remove_special $data $Args]
- }
-
- set i [lsearch $data "Collect Stack"]
- if {$i != -1} {
- set data [lreplace $data $i $i]
- set data [concat $data [collect_stack]]
-
- }
-
- # Remove repeats
- set d {}
- foreach i $data {
- if {![info exists check($i)]} {
- set check($i) 1
- lappend d $i
- }
- }
-
- if {$WhileStepping} {
- set steps $_TStepCount
- } else {
- set steps 0
- }
-
- if {"$Data" != {}} {
- set command "modify"
- } else {
- set command "add"
- }
-
- debug "DATA = $data"
- eval $Callback $command $steps [list $data]
- ::delete object $this
- }
-
-
- method collect_stack {} {
- return $StackCollect
- }
-
- method cmd {line} {
- $line
- }
-
- # PUBLIC DATA
- public variable File
- public variable Line {}
- public variable WhileStepping 0
- public variable Number
- public variable Callback
- public variable Data {}
- public variable Steps {}
- public variable Address {}
-
- # PROTECTED DATA
- protected variable WhileSteppingEntry
- protected variable CollectLB
- protected variable VariablesLB
- protected variable Variables {}
- protected variable Collect {}
- protected variable Locals
- protected variable Args
- protected variable Registers
- protected variable Others {}
- protected variable AddButton
- protected variable RemoveButton
- protected variable OtherEntry
- protected variable StackCollect {*(char*)$sp@64}
-}
diff --git a/gdb/gdbtk/library/attachdlg.itb b/gdb/gdbtk/library/attachdlg.itb
deleted file mode 100644
index 405a6aafcb5..00000000000
--- a/gdb/gdbtk/library/attachdlg.itb
+++ /dev/null
@@ -1,232 +0,0 @@
-# Attach Dialog for Insight.
-# Copyright (C) 1999, 2002, 2003 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-itcl::body AttachDlg::constructor {args} {
- eval itk_initialize $args
- window_name "Attach To Process"
- build_win
-}
-
-itcl::body AttachDlg::build_win {} {
- # Frame
- itk_component add pid {
- iwidgets::labeledframe $itk_interior.f -labeltext "Choose Process" \
- -relief groove -borderwidth 2 -ipadx 6 -ipady 4
- }
-
- # Listbox of processes
- itk_component add choose_pid {
- iwidgets::scrolledlistbox [$itk_component(pid) childsite].pid \
- -visibleitems 30x15 -hscrollmode dynamic -vscrollmode dynamic\
- -exportselection 0 -selectioncommand [code $this select_pid] \
- -foreground $::Colors(textfg) -textbackground $::Colors(textbg) \
- -dblclickcommand [code $this doit]
- }
-
- # Filter entryfield
- itk_component add pid_filter {
- iwidgets::entryfield [$itk_component(pid) childsite].filt \
- -labeltext "Filter:" \
- -foreground $::Colors(textfg) -textbackground $::Colors(textbg) \
- -focuscommand [code $this clear_pid_selection] \
- -command [code $this filter_pid_selection]
- }
- $itk_component(pid_filter) insert 0 *
-
- # seperator
- itk_component add pid_sep {
- frame [$itk_component(pid) childsite].sep \
- -height 2 -borderwidth 1 -relief sunken
- }
-
- # PID_ENTRY: this is the PID entry box. You can enter the pid
- # by hand here, or click on the listbox to have it entered for you.
- itk_component add pid_entry {
- iwidgets::entryfield [$itk_component(pid) childsite].lab \
- -labeltext "PID:" -validate numeric \
- -foreground $::Colors(textfg) -textbackground $::Colors(textbg) \
- -focuscommand [code $this clear_pid_selection]
- }
- pack $itk_component(choose_pid) -fill x -side top -pady 4
- pack $itk_component(pid_filter) -fill x -side top -pady 4
- pack $itk_component(pid_sep) -fill x -side top -pady 8
- pack $itk_component(pid_entry) -fill x -side bottom -pady 4
-
- itk_component add symbol_label {
- iwidgets::labeledframe $itk_interior.sym -labeltext "Choose Exec file" \
- -labelpos nw -relief groove -borderwidth 2 \
- -ipadx 8 -ipady 6
- }
-
- itk_component add symbol_file {
- iwidgets::entryfield [$itk_interior.sym childsite].f -labeltext "File:" \
- -foreground $::Colors(textfg) -textbackground $::Colors(textbg)
- }
- pack $itk_component(symbol_file) -pady 4 -padx 4 -fill x
-
- # can't use the -state in the entryfield, 'cause that affects the
- # label as well...
- #$itk_component(symbol_file) component entry configure -state disabled
- $itk_component(symbol_file) configure -state normal
- $itk_component(symbol_file) insert 0 $::gdb_exe_name
- #$itk_component(symbol_file) configure -state disabled
-
- itk_component add symbol_browse {
- button [$itk_component(symbol_file) childsite].br -text "Choose..." \
- -command [code $this choose_symbol_file]
- }
- pack $itk_component(symbol_browse) -pady 4 -padx 4 -ipadx 4
-
- itk_component add button_box {
- frame $itk_interior.b
- }
-
- itk_component add cancel {
- button $itk_component(button_box).cancel -text "Cancel" \
- -command [code $this cancel]
- }
-
- itk_component add ok {
- button $itk_component(button_box).ok -text "OK" -command [code $this doit]
- }
-
-# if {$::gdb_exe_name == ""} {
-# $itk_component(ok) configure -state disabled
-# }
-
- ::standard_button_box $itk_component(button_box)
-
- pack $itk_component(button_box) -side bottom -fill x -pady 4 -padx 4
- pack $itk_component(symbol_label) -side bottom -fill x -pady 4 -padx 4
- pack $itk_component(pid) -fill both -expand 1 -pady 4 -padx 4
-
- after idle [list update idletasks; $this list_pids]
-}
-
-# ------------------------------------------------------------------
-# METHOD: doit - This accepts the attach command.
-# ------------------------------------------------------------------
-
-itcl::body AttachDlg::doit {} {
- set AttachDlg::last_button 1
- set AttachDlg::last_pid [$itk_component(pid_entry) get]
- set AttachDlg::symbol_file [$itk_component(symbol_file) get]
- unpost
-}
-
-# ------------------------------------------------------------------
-# METHOD: cancel - unpost the dialog box without attaching.
-# ------------------------------------------------------------------
-
-itcl::body AttachDlg::cancel {} {
- set AttachDlg::last_button 0
- set AttachDlg::last_pid {}
- unpost
-}
-
-# ------------------------------------------------------------------
-# METHOD: choose_symbol_file - Query for a new symbol file.
-# ------------------------------------------------------------------
-
-itcl::body AttachDlg::choose_symbol_file {} {
- set file [tk_getOpenFile -parent . -title "Load New Executable"]
- if {$file != ""} {
- $itk_component(symbol_file) configure -state normal
- $itk_component(symbol_file) clear
- $itk_component(symbol_file) insert 0 $file
-# $itk_component(symbol_file) configure -state disabled
- $itk_component(ok) configure -state active
- }
-}
-
-
-# ------------------------------------------------------------------
-# METHOD: list_pids - List the available processes. Right now,
-# this just spawns ps, which means we have to deal with
-# all the different ps flags & output formats. At some
-# point we should steal some C code to do it by hand.
-# ------------------------------------------------------------------
-
-itcl::body AttachDlg::list_pids {{pattern *}} {
- global tcl_platform
-
- switch $tcl_platform(os) {
- Linux {
- set ps_cmd "ps axw"
- }
- default {
- set ps_cmd "ps w"
- }
- }
- if {[catch {::open "|$ps_cmd" r} psH]} {
- set errTxt "Could not exec ps: $psH
-You will have to enter the PID by hand."
- ManagedWin::open WarningDlg -message [list $errTxt]
- return
- }
- gets $psH header
-
- set nfields [llength $header]
- set nfields_m_1 [expr {$nfields - 1}]
- set regexp {^ *([^ ]*) +}
- for {set i 1} {$i < $nfields_m_1} {incr i} {
- append regexp {[^ ]* +}
- }
- append regexp {(.*)$}
-
- $itk_component(choose_pid) clear
- set pid_list {}
-
- while {[gets $psH line] >= 0} {
- regexp $regexp $line dummy PID COMMAND
- if {[string match $pattern $COMMAND]} {
- lappend pid_list [list $PID $COMMAND]
- $itk_component(choose_pid) insert end $COMMAND
- }
- }
-
- close $psH
- $itk_component(choose_pid) selection set 0
- select_pid
-}
-
-# ------------------------------------------------------------------
-# METHOD: select_pid - Grab the selected element from the PID listbox
-# and insert the associated PID into the entry form.
-# ------------------------------------------------------------------
-
-itcl::body AttachDlg::select_pid {} {
- set hit [$itk_component(choose_pid) curselection]
- if {$hit != ""} {
- $itk_component(pid_entry) clear
- $itk_component(pid_entry) insert 0 [lindex [lindex $pid_list $hit] 0]
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: clear_pid_selection - Clear the current PID selection.
-# ------------------------------------------------------------------
-
-itcl::body AttachDlg::clear_pid_selection {} {
- $itk_component(choose_pid) selection clear 0 end
- $itk_component(pid_entry) selection range 0 end
-}
-
-# ------------------------------------------------------------------
-# METHOD: filter_pid_selection - Filters the pid box.
-# ------------------------------------------------------------------
-
-itcl::body AttachDlg::filter_pid_selection {} {
- list_pids [$itk_component(pid_filter) get]
-}
diff --git a/gdb/gdbtk/library/attachdlg.ith b/gdb/gdbtk/library/attachdlg.ith
deleted file mode 100644
index 71ee4876eb0..00000000000
--- a/gdb/gdbtk/library/attachdlg.ith
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# attachdlg.ith - itcl declarations for class AttachDlg
-# ----------------------------------------------------------------------
-# Implements Attach to process window
-#
-# ----------------------------------------------------------------------
-# Copyright (C) 1999 Cygnus Solutions
-#
-itcl::class AttachDlg {
- inherit ModalDialog ManagedWin
-
- public {
- method constructor {args}
- proc last_button {} {return $last_button}
- proc pid {} {return $last_pid}
- proc symbol_file {} {return $symbol_file}
- }
-
- protected {
- method build_win {args}
- method cancel {}
- method choose_symbol_file {}
- method doit {}
- method list_pids {{pattern *}}
- method select_pid {}
- method clear_pid_selection {}
- method filter_pid_selection {}
-
- variable pid_list
-
- common last_button 0
- common last_pid {}
- common symbol_file
- }
-}
diff --git a/gdb/gdbtk/library/blockframe.itb b/gdb/gdbtk/library/blockframe.itb
deleted file mode 100644
index 6819c1f3847..00000000000
--- a/gdb/gdbtk/library/blockframe.itb
+++ /dev/null
@@ -1,227 +0,0 @@
-# Block and frame class implementations for GDBtk.
-# Copyright (C) 1997, 1998, 1999 Cygnus Solutions
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# ------------------------------------------------------------------
-# Block
-# ------------------------------------------------------------------
-itcl::body Block::constructor {start end args} {
-
- # Record runtime info about this block
- set _start $start
- set _end $end
- set _variables [_findVariables]
- eval configure $args
-}
-
-# Destroy ourself.
-itcl::body Block::destructor {} {
-
- # Each block is responsible for destroying its
- # variables and removing them from the list of
- # of all variables for this frame
- foreach var $_variables {
- $var delete
- }
-}
-
-# Return a list of variables defined in this block
-# This list is determined when we are created.
-itcl::body Block::variables {} {
- return $_variables
-}
-
-# Find the new variables for this block.
-itcl::body Block::_findVariables {} {
-
- # Find the new variables for this block.
- set variables [gdb_block_variables $_start $_end]
-
- # Create variables.
- set vars {}
- foreach variable $variables {
- # Be paranoid: catch errors constructing variable.
- set err [catch {gdb_variable create -expr $variable} obj]
- if {!$err} {
- lappend vars $obj
- }
- }
-
- return $vars
-}
-
-itcl::body Block::update {} {
-
- set changed {}
- foreach var $_variables {
- set changed [concat $changed [$var update]]
- }
-
- return $changed
-}
-
-itcl::body Block::info {} {
-
- return [list $_start $_end]
-}
-
-# ------------------------------------------------------------------
-# Frame
-# ------------------------------------------------------------------
-itcl::body Frame::constructor {addr} {
-
- set _addr $addr
-
- # Create all blocks in the selected frame
- set _blocks {}
- _createBlocks [gdb_get_blocks]
-
-}
-
-itcl::body Frame::destructor {} {
- # destroy our own blocks
- foreach block $_blocks {
- _removeBlock $block
- }
-}
-
-itcl::body Frame::_removeBlock {blockObj} {
-
- set i [lsearch $_blocks $blockObj]
- if {$i != -1} {
- set _blocks [lreplace $_blocks $i $i]
- delete object $blockObj
- }
-}
-
-itcl::body Frame::_addBlock {block} {
-
- set start [lindex $block 0]
- set end [lindex $block 1]
- set b [Block \#auto $start $end]
- lappend _blocks $b
-
- return $b
-}
-
-itcl::body Frame::_createBlocks {blocks} {
-
- foreach block $blocks {
- set b [_addBlock $block]
- }
-}
-
-itcl::body Frame::update {} {
-
- set vars {}
- foreach block $_blocks {
- set vars [concat $vars [$block update]]
- }
-
- return $vars
-}
-
-itcl::body Frame::variables {} {
-
- set vars {}
- foreach block $_blocks {
- set vars [concat $vars [$block variables]]
- }
-
- return $vars
-}
-
-itcl::body Frame::new {} {
- # find any new variables. So get a list of all blocks,
- # eliminate duplicates, and get those variables.
-
- set blocks [gdb_get_blocks]
- set new {}
-
- foreach block $blocks {
- set b [_findBlock $block]
- if {$b == ""} {
- # Found a new block. Create it get its variables
- set b [_addBlock $block]
- set new [concat $new [$b variables]]
- }
- }
-
- return $new
-}
-
-itcl::body Frame::deleteOld {} {
-
- foreach block [_oldBlocks] {
- _removeBlock $block
- }
-}
-
-itcl::body Frame::_oldBlocks {} {
-
- set blocks [gdb_get_blocks]
- set oldObjs $_blocks
-
- foreach block $blocks {
- set obj [_findBlock $block]
- if {$obj != ""} {
- # Found it.. Remove it from old
- set i [lsearch $oldObjs $obj]
- set oldObjs [lreplace $oldObjs $i $i]
- }
- }
-
- return $oldObjs
-}
-
-itcl::body Frame::old {} {
-
- # All the variables in the blocks in old are now gone...
- # We don't remove blocks here, since the frontend viewer
- # might want to keep these variables around for a little while
- # longer.
- set vars {}
- set old [_oldBlocks]
- foreach block $old {
- set vars [concat $vars [$block variables]]
- }
-
- return $vars
-}
-
-itcl::body Frame::_findBlock {block} {
-
- foreach b $_blocks {
- set info [$b info]
- if {$info == $block} {
- return $b
- }
- }
-
- return ""
-}
-
-itcl::body Frame::_findBlockIndex {block} {
-
- set i 0
- foreach b $_blocks {
- set info [$b info]
- if {$info == $block} {
- return $i
- }
- incr i
- }
-
- return -1
-}
-
-
diff --git a/gdb/gdbtk/library/blockframe.ith b/gdb/gdbtk/library/blockframe.ith
deleted file mode 100644
index 2a2457820d9..00000000000
--- a/gdb/gdbtk/library/blockframe.ith
+++ /dev/null
@@ -1,63 +0,0 @@
-# Class definitions for blocks and frames for GDBtk.
-# Copyright (C) 1997, 1998, 1999 Cygnus Solutions
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-itcl::class Block {
-
- public {
- method constructor {start end args}
- method destructor {}
- method variables {}
- method update {}
- method info {}
- }
-
- private {
- # Start and end address for this block
- variable _start
- variable _end
-
- # List of variables (new) variables defined in this block
- variable _variables
-
- method _findVariables {}
- }
-}
-
-itcl::class Frame {
-
- public {
- method constructor {addr}
- method destructor {}
- method variables {}
- method update {}
- method new {}
- method old {}
- method deleteOld {}
- method address {} { return $_addr }
- }
-
- private {
- method _createBlocks {blocks}
- method _addBlock {block}
- method _findBlock {block}
- method _findBlockIndex {block}
- method _removeBlock {blockObj}
- method _oldBlocks {}
-
- # Our address
- variable _addr
-
- # A list of all blocks
- variable _blocks
- }
-}
diff --git a/gdb/gdbtk/library/bpwin.itb b/gdb/gdbtk/library/bpwin.itb
deleted file mode 100644
index 6df38b01f25..00000000000
--- a/gdb/gdbtk/library/bpwin.itb
+++ /dev/null
@@ -1,728 +0,0 @@
-# Breakpoint window for Insight.
-# Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-# ------------------------------------------------------------------
-# CONSTRUCTOR: create the main breakpoint window
-# ------------------------------------------------------------------
-itcl::body BpWin::constructor {args} {
- window_name "Breakpoints" "BPs"
-
- if {[pref getd gdb/bp/menu] != ""} {
- set mbar 0
- }
- set show_threads [pref get gdb/bp/show_threads]
- debug "Ready to build"
- build_win
- eval itk_initialize $args
-
- # The scrolledframe uses a canvas, which doesn't properly
- # calculate an initial size, so we must set a default
- # window size here. ManagedWin could override this still
- # if there is a user preference for the geometry.
- wm geometry $_top 350x165
- debug "done building"
-}
-
-# ------------------------------------------------------------------
-# DESTRUCTOR: destroy the breakpoint window
-# ------------------------------------------------------------------
-itcl::body BpWin::destructor {} {}
-
-
-# ------------------------------------------------------------------
-# METHOD: build_win - build the main breakpoint window
-# ------------------------------------------------------------------
-itcl::body BpWin::build_win {} {
- global _bp_en _bp_disp tcl_platform
- set bg1 $::Colors(bg)
-
- set hsmode dynamic
- set vsmode dynamic
-
- # FIXME: The iwidgets scrolled frame is pretty useless.
- # When we get BLT, use its hiertable to do this.
- itk_component add sframe {
- iwidgets::scrolledframe $itk_interior.sf \
- -hscrollmode $hsmode -vscrollmode $vsmode
- }
-
- set twin [$itk_component(sframe) childsite]
-
- # write header
- if {$tracepoints} {
- label $twin.num0 -text "Num" -relief raised -bd 2 -anchor center \
- -font global/fixed
- }
- label $twin.thread0 -text "Thread" -relief raised -bd 2 -anchor center \
- -font global/fixed
- label $twin.addr0 -text "Address" -relief raised -bd 2 -anchor center \
- -font global/fixed
- label $twin.file0 -text "File" -relief raised -bd 2 -anchor center \
- -font global/fixed
- label $twin.line0 -text "Line" -relief raised -bd 2 -anchor center \
- -font global/fixed
- label $twin.func0 -text "Function" -relief raised -bd 2 -anchor center \
- -font global/fixed
-
- if {$tracepoints} {
- label $twin.pass0 -text "PassCount" -relief raised -borderwidth 2 \
- -anchor center -font global/fixed
- grid x $twin.num0 $twin.addr0 $twin.file0 $twin.line0 $twin.func0 $twin.pass0 \
- -sticky new
- } else {
- if {$show_threads} {
- grid x $twin.thread0 $twin.addr0 $twin.file0 $twin.line0 $twin.func0 -sticky new
- # Let the File and Function columns expand; no others.
- grid columnconfigure $twin 3 -weight 1
- grid columnconfigure $twin 5 -weight 1
- } else {
- grid x $twin.addr0 $twin.file0 $twin.line0 $twin.func0 -sticky new
- # Let the File and Function columns expand; no others.
- grid columnconfigure $twin 2 -weight 1
- grid columnconfigure $twin 4 -weight 1
- }
- }
-
-
- # The last row must always suck up all the leftover vertical
- # space.
- set next_row 1
- grid rowconfigure $twin $next_row -weight 1
-
- if { $mbar } {
- menu $itk_interior.m -tearoff 0
- [winfo toplevel $itk_interior] configure -menu $itk_interior.m
- if { $tracepoints == 0 } {
- $itk_interior.m add cascade -menu $itk_interior.m.bp -label "Breakpoint" -underline 0
- } else {
- $itk_interior.m add cascade -menu $itk_interior.m.bp -label "Tracepoint" -underline 0
- }
- set m [menu $itk_interior.m.bp]
- if { $tracepoints == 0 } {
- $m add radio -label "Normal" -variable _bp_disp($selected) \
- -value donttouch -underline 0 -state disabled
- $m add radio -label "Temporary" -variable _bp_disp($selected) \
- -value delete -underline 0 -state disabled
- } else {
- $m add command -label "Actions" -underline 0 -state disabled
- }
-
- $m add separator
- $m add radio -label "Enabled" -variable _bp_en($selected) -value 1 \
- -underline 0 -state disabled
- $m add radio -label "Disabled" -variable _bp_en($selected) -value 0 \
- -underline 0 -state disabled
- $m add separator
- $m add command -label "Remove" -underline 0 -state disabled
- $itk_interior.m add cascade -menu $itk_interior.m.all -label "Global" \
- -underline 0
- set m [menu $itk_interior.m.all]
- $m add check -label " Show Threads" \
- -variable [pref varname gdb/bp/show_threads] \
- -underline 1 -command "$this toggle_threads"
- $m add separator
- $m add command -label "Disable All" -underline 0 \
- -command "$this bp_all disable"
- $m add command -label "Enable All" -underline 0 \
- -command "$this bp_all enable"
- $m add separator
- $m add command -label "Remove All" -underline 0 \
- -command "$this bp_all delete"
- $m add separator
- $m add command -label "Store Breakpoints..." -underline 0 \
- -command [code $this bp_store]
- $m add command -label "Restore Breakpoints..." -underline 3 \
- -command [code $this bp_restore]
- }
-
- set Menu [menu $itk_interior.pop -tearoff 0]
-
- if { $tracepoints == 0 } {
- $Menu add radio -label "Normal" -variable _bp_disp($selected) \
- -value donttouch -underline 0
- $Menu add radio -label "Temporary" -variable _bp_disp($selected) \
- -value delete -underline 0
- } else {
- $Menu add command -label "Actions" -underline 0
- }
- $Menu add separator
- $Menu add radio -label "Enabled" -variable _bp_en($selected) -value 1 -underline 0
- $Menu add radio -label "Disabled" -variable _bp_en($selected) -value 0 -underline 0
- $Menu add separator
- $Menu add command -label "Remove" -underline 0
- $Menu add cascade -menu $Menu.all -label "Global" -underline 0
- set m [menu $Menu.all]
- $m add check -label " Show Threads" -variable [pref varname gdb/bp/show_threads] \
- -underline 1 -command "$this toggle_threads"
- $m add separator
- $m add command -label "Disable All" -underline 0 -command "$this bp_all disable"
- $m add command -label "Enable All" -underline 0 -command "$this bp_all enable"
- $m add separator
- $m add command -label "Remove All" -underline 0 -command "$this bp_all delete"
-
- if { $tracepoints == 0 } {
- # insert all breakpoints
- foreach i [gdb_get_breakpoint_list] {
- set e [BreakpointEvent \#auto -action create -number $i]
- bp_add $e
- delete object $e
- }
- } else {
- # insert all tracepoints
- foreach i [gdb_get_tracepoint_list] {
- set e [TracepointEvent \#auto -action create -number $i]
- bp_add $e 1
- delete object $e
- }
- }
-
- pack $itk_component(sframe) -side left -expand true -fill both
-}
-
-# ------------------------------------------------------------------
-# METHOD: bp_add - add a breakpoint entry
-# ------------------------------------------------------------------
-itcl::body BpWin::bp_add {bp_event {tracepoint 0}} {
- global _bp_en _bp_disp tcl_platform _files
-
- set number [$bp_event get number]
- set thread [$bp_event get thread]
- set disposition [$bp_event get disposition]
- set file [$bp_event get file]
-
- if {$tracepoint} {
- set diposition tracepoint
- set bptype tracepoint
- } else {
- set bptype breakpoint
- }
-
- debug "bp_add bpnum=$number thread=$thread show=$show_threads"
- set i $next_row
- set _bp_en($i) [$bp_event get enabled]
- set _bp_disp($i) $disposition
- set temp($i) ""
- switch $disposition {
- donttouch { set color [pref get gdb/src/bp_fg] }
- delete {
- set color [pref get gdb/src/temp_bp_fg]
- set temp($i) delete
- }
- tracepoint {
- set color [pref get gdb/src/trace_fg]
- }
- default { set color yellow }
- }
-
- if {$thread != "-1"} {set color [pref get gdb/src/thread_fg]}
-
- if {$tcl_platform(platform) == "windows"} {
- checkbutton $twin.en$i -relief flat -variable _bp_en($i) \
- -activebackground $bg1 -command "$this bp_able $i" -fg $color
- } else {
- checkbutton $twin.en$i -relief flat -variable _bp_en($i) \
- -command "$this bp_able $i" -activebackground $bg1 \
- -selectcolor $color -highlightbackground $bg1
- }
-
- if {$tracepoints} {
- label $twin.num$i -text "$number " -relief flat -anchor w -font global/fixed
- }
- label $twin.addr$i -text "[gdb_CA_to_TAS [$bp_event get address]] " -relief flat -anchor w -font global/fixed -bg $bg1
- if {[info exists _files(short,$file)]} {
- set file $_files(short,$file)
- } else {
- # FIXME. Really need to do better than this.
- set file [::file tail $file]
- }
- if {$show_threads} {
- if {$thread == "-1"} {set thread "ALL"}
- label $twin.thread$i -text "$thread " -relief flat -anchor w -font global/fixed
- }
- label $twin.file$i -text "$file " -relief flat -anchor w -font global/fixed
- label $twin.line$i -text "[$bp_event get line] " -relief flat -anchor w -font global/fixed
- label $twin.func$i -text "[$bp_event get function] " -relief flat -anchor w -font global/fixed
- if {$tracepoints} {
- label $twin.pass$i -text "[$bp_event get pass_count] " -relief flat -anchor w -font global/fixed
- }
-
- if {$mbar} {
- set zz [list addr file func line]
- if {$tracepoints} {lappend zz num pass}
- if {$show_threads} {lappend zz thread}
- foreach thing $zz {
- bind $twin.${thing}${i} <1> "$this bp_select $i"
- bind $twin.${thing}${i} <Double-1> "$this goto_bp $i"
- bind $twin.${thing}${i} <3> [code $this _select_and_popup $i %X %Y]
- }
- }
-
- if {$tracepoints} {
- grid $twin.en$i $twin.num$i $twin.addr$i $twin.file$i $twin.line$i \
- $twin.func$i $twin.pass$i -sticky new -ipadx 4 -ipady 2
- } else {
- if {$show_threads} {
- grid $twin.en$i $twin.thread$i $twin.addr$i $twin.file$i $twin.line$i \
- $twin.func$i -sticky new -ipadx 4 -ipady 2
- } else {
- grid $twin.en$i $twin.addr$i $twin.file$i $twin.line$i \
- $twin.func$i -sticky new -ipadx 4 -ipady 2
- }
- }
-
- # This used to be the last row. Fix it vertically again.
- grid rowconfigure $twin $i -weight 0
-
- set index_to_bpnum($i) $number
- set Index_to_bptype($i) $bptype
- incr i
- set next_row $i
- grid rowconfigure $twin $i -weight 1
-}
-
-# ------------------------------------------------------------------
-# METHOD: bp_store - stores away the breakpoints in a file of gdb
-# commands
-# ------------------------------------------------------------------
-itcl::body BpWin::bp_store {} {
- set out_file [tk_getSaveFile]
- if {$out_file == ""} {
- return
- }
- if {[catch {::open $out_file w} outH]} {
- tk_messageBox -message "Could not open $out_file: $outH"
- return
- }
- foreach breakpoint [gdb_get_breakpoint_list] {
- # This is an lassign
- foreach {file function line_no address type \
- enable_p disp ignore cmds cond thread hit_count user_spec} \
- [gdb_get_breakpoint_info $breakpoint] {
- break
- }
-
- if {$user_spec != ""} {
- set bp_specifier $user_spec
- } elseif {$file != ""} {
- set filename [file tail $file]
- set bp_specifier $filename:$line_no
- } else {
- set bp_specifier *$address
- }
-
- # FIXME: doesn't handle watchpoints.
- if {[string compare $disp "delete"] == 0} {
- puts $outH "tbreak $bp_specifier"
- } else {
- puts $outH "break $bp_specifier"
- }
-
- if {!$enable_p} {
- puts $outH "disable \$bpnum"
- }
- if {$ignore > 0} {
- puts $outH "ignore \$bpnum $ignore"
- }
- }
- close $outH
-}
-
-# ------------------------------------------------------------------
-# METHOD: bp_restore - restore the breakpoints from a file of gdb
-# commands
-# ------------------------------------------------------------------
-itcl::body BpWin::bp_restore {} {
- set inH [tk_getOpenFile]
- if {$inH == ""} {
- return
- }
- bp_all delete
- if {[catch {gdb_cmd "source $inH"} err]} {
- tk_messageBox -message "Error sourcing in BP file $inH: \"$err\""
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: bp_select - select a row in the grid
-# ------------------------------------------------------------------
-itcl::body BpWin::bp_select { r } {
- global _bp_en _bp_disp
-
- set zz [list addr file func line]
- if {$tracepoints} {lappend zz num pass}
- if {$show_threads} {lappend zz thread}
-
- if {$selected} {
- set i $selected
-
- foreach thing $zz {
- $twin.${thing}${i} configure -fg $::Colors(fg) -bg $bg1
- }
- }
-
- # if we click on the same line, unselect it and return
- if {$selected == $r} {
- set selected 0
-
- if {$tracepoints == 0} {
- $itk_interior.m.bp entryconfigure "Normal" -state disabled
- $itk_interior.m.bp entryconfigure "Temporary" -state disabled
- } else {
- $itk_interior.m.bp entryconfigure "Actions" -state disabled
- }
- $itk_interior.m.bp entryconfigure "Enabled" -state disabled
- $itk_interior.m.bp entryconfigure "Disabled" -state disabled
- $itk_interior.m.bp entryconfigure "Remove" -state disabled
-
- return
- }
-
- foreach thing $zz {
- $twin.${thing}${r} configure -fg $::Colors(sfg) -bg $::Colors(sbg)
- }
-
- if {$tracepoints == 0} {
- $itk_interior.m.bp entryconfigure "Normal" -variable _bp_disp($r) \
- -command "$this bp_type $r" -state normal
- $itk_interior.m.bp entryconfigure "Temporary" -variable _bp_disp($r) \
- -command "$this bp_type $r" -state normal
- $Menu entryconfigure "Normal" -variable _bp_disp($r) \
- -command "$this bp_type $r" -state normal
- $Menu entryconfigure "Temporary" -variable _bp_disp($r) \
- -command "$this bp_type $r" -state normal
- } else {
- $itk_interior.m.bp entryconfigure "Actions" -command "$this get_actions $r" -state normal
- $Menu entryconfigure "Actions" -command "$this get_actions $r" -state normal
- }
- $itk_interior.m.bp entryconfigure "Enabled" -variable _bp_en($r) \
- -command "$this bp_able $r" -state normal
- $itk_interior.m.bp entryconfigure "Disabled" -variable _bp_en($r) \
- -command "$this bp_able $r" -state normal
- $itk_interior.m.bp entryconfigure "Remove" -command "$this bp_remove $r" -state normal
- $Menu entryconfigure "Enabled" -variable _bp_en($r) \
- -command "$this bp_able $r" -state normal
- $Menu entryconfigure "Disabled" -variable _bp_en($r) \
- -command "$this bp_able $r" -state normal
- $Menu entryconfigure "Remove" -command "$this bp_remove $r" -state normal
-
- set selected $r
-}
-
-# ------------------------------------------------------------------
-# NAME: private method BpWin::_select_and_popup
-# DESCRIPTION: Select the given breakpoint and popup the options
-# menu at the given location.
-#
-# ARGUMENTS: None
-# RETURNS: Nothing
-# ------------------------------------------------------------------
-itcl::body BpWin::_select_and_popup {bp X Y} {
- if {$selected != $bp} {
- bp_select $bp
- }
- tk_popup $Menu $X $Y
-}
-
-# ------------------------------------------------------------------
-# METHOD: bp_modify - modify a breakpoint entry
-# ------------------------------------------------------------------
-itcl::body BpWin::bp_modify {bp_event {tracepoint 0}} {
- global _bp_en _bp_disp tcl_platform _files
-
- set number [$bp_event get number]
- set thread [$bp_event get thread]
- set disposition [$bp_event get disposition]
- set file [$bp_event get file]
-
- if {$tracepoint} {
- set disposition tracepoint
- set bptype tracepoint
- } else {
- set bptype breakpoint
- }
-
- set found 0
- for {set i 1} {$i < $next_row} {incr i} {
- if { $number == $index_to_bpnum($i)
- && "$Index_to_bptype($i)" == "$bptype"} {
- incr found
- break
- }
- }
-
- if {!$found} {
- debug "ERROR: breakpoint number $number not found!"
- return
- }
-
- if {$_bp_en($i) != [$bp_event get enabled]} {
- set _bp_en($i) [$bp_event get enabled]
- }
-
- if {$_bp_disp($i) != $disposition} {
- set _bp_disp($i) $disposition
- }
-
- switch $disposition {
- donttouch { set color [pref get gdb/src/bp_fg] }
- delete {
- set color [pref get gdb/src/temp_bp_fg]
- }
- tracepoint { set color [pref get gdb/src/trace_fg] }
- default { set color yellow}
- }
-
- if {$thread != "-1"} {set color [pref get gdb/src/thread_fg]}
-
- if {$tcl_platform(platform) == "windows"} then {
- $twin.en$i configure -fg $color
- } else {
- $twin.en$i configure -selectcolor $color
- }
- if {$tracepoints} {
- $twin.num$i configure -text "$number "
- }
- $twin.addr$i configure -text "[gdb_CA_to_TAS [$bp_event get address]] "
- if {[info exists _files(short,$file)]} {
- set file $_files(short,$file)
- } else {
- # FIXME. Really need to do better than this.
- set file [::file tail $file]
- }
- if {$show_threads} {
- if {$thread == "-1"} {set thread "ALL"}
- $twin.thread$i configure -text "$thread "
- }
- $twin.file$i configure -text "$file "
- $twin.line$i configure -text "[$bp_event get line] "
- $twin.func$i configure -text "[$bp_event get function] "
- if {$tracepoints} {
- $twin.pass$i configure -text "[$bp_event get pass_count] "
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: bp_able - enable/disable a breakpoint
-# ------------------------------------------------------------------
-itcl::body BpWin::bp_able { i } {
- global _bp_en
-
- bp_select $i
-
- switch $Index_to_bptype($i) {
- breakpoint {set type {}}
- tracepoint {set type "tracepoint"}
- }
-
- if {$_bp_en($i) == "1"} {
- set command "enable $type $temp($i) "
- } else {
- set command "disable $type "
- }
-
- append command "$index_to_bpnum($i)"
- gdb_cmd "$command"
-}
-
-# ------------------------------------------------------------------
-# METHOD: bp_remove - remove a breakpoint
-# ------------------------------------------------------------------
-itcl::body BpWin::bp_remove { i } {
-
- bp_select $i
-
- switch $Index_to_bptype($i) {
- breakpoint { set type {} }
- tracepoint { set type "tracepoint" }
- }
-
- gdb_cmd "delete $type $index_to_bpnum($i)"
-}
-
-# ------------------------------------------------------------------
-# METHOD: bp_type - change the breakpoint type (disposition)
-# ------------------------------------------------------------------
-itcl::body BpWin::bp_type { i } {
-
- if {$Index_to_bptype($i) != "breakpoint"} {
- return
- }
-
- set bpnum $index_to_bpnum($i)
- #debug "bp_type $i $bpnum"
- set bpinfo [gdb_get_breakpoint_info $bpnum]
- lassign $bpinfo file func line pc type enabled disposition \
- ignore_count commands cond thread hit_count user_spec
- bp_select $i
- switch $disposition {
- delete {
- gdb_cmd "delete $bpnum"
- gdb_cmd "break *$pc"
- }
- donttouch {
- gdb_cmd "delete $bpnum"
- gdb_cmd "tbreak *$pc"
- }
- default { debug "Unknown breakpoint disposition: $disposition" }
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: bp_delete - delete a breakpoint
-# ------------------------------------------------------------------
-itcl::body BpWin::bp_delete {bp_event} {
- set number [$bp_event get number]
- for {set i 1} {$i < $next_row} {incr i} {
- if { $number == $index_to_bpnum($i) } {
- if {$tracepoints} {
- grid forget $twin.en$i $twin.num$i $twin.addr$i $twin.file$i \
- $twin.line$i $twin.func$i $twin.pass$i
- destroy $twin.en$i $twin.num$i $twin.addr$i $twin.file$i \
- $twin.line$i $twin.func$i $twin.pass$i
- } else {
- if {$show_threads} {
- grid forget $twin.thread$i
- destroy $twin.thread$i
- }
- grid forget $twin.en$i $twin.addr$i $twin.file$i $twin.line$i $twin.func$i
- destroy $twin.en$i $twin.addr$i $twin.file$i $twin.line$i $twin.func$i
- }
- if {$selected == $i} {
- set selected 0
- }
- return
- }
- }
-}
-
-# ------------------------------------------------------------------
-# PUBLIC METHOD: breakpoint - Update widget when a breakpoint
-# event is received from the backend.
-# ------------------------------------------------------------------
-itcl::body BpWin::breakpoint {bp_event} {
-
- set action [$bp_event get action]
- #debug "bp update $action [$bp_event get number] [$bp_event get type]"
-
- switch $action {
- modify { bp_modify $bp_event 0 }
- create { bp_add $bp_event 0 }
- delete { bp_delete $bp_event }
- default { dbug E "Unknown breakpoint action: $action" }
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: tracepoint - Update widget when a tracepoint event
-# is received from the backend.
-# ------------------------------------------------------------------
-itcl::body BpWin::tracepoint {tp_event} {
-
- set action [$tp_event get action]
- #debug "tp update $action [$tp_event get number]"
-
- switch $action {
- modify { bp_modify $tp_event 1 }
- create { bp_add $tp_event 1 }
- delete { bp_delete $tp_event }
- default { dbug E "Unknown tracepoint action: $action" }
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: bp_all - perform a command on all breakpoints
-# ------------------------------------------------------------------
-itcl::body BpWin::bp_all { command } {
-
- if {!$tracepoints} {
- # Do all breakpoints
- foreach bpnum [gdb_get_breakpoint_list] {
- if { $command == "enable"} {
- for {set i 1} {$i < $next_row} {incr i} {
- if { $bpnum == $index_to_bpnum($i)
- && "$Index_to_bptype($i)" == "breakpoint"} {
- gdb_cmd "enable $temp($i) $bpnum"
- break
- }
- }
- } else {
- gdb_cmd "$command $bpnum"
- }
- }
- } else {
- # Do all tracepoints
- foreach bpnum [gdb_get_tracepoint_list] {
- if { $command == "enable"} {
- for {set i 1} {$i < $next_row} {incr i} {
- if { $bpnum == $index_to_bpnum($i)
- && "$Index_to_bptype($i)" == "tracepoint"} {
- gdb_cmd "enable tracepoint $bpnum"
- break
- }
- }
- } else {
- gdb_cmd "$command tracepoint $bpnum"
- }
- }
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: get_actions - pops up the add trace dialog on a selected
-# tracepoint
-# ------------------------------------------------------------------
-itcl::body BpWin::get_actions {bpnum} {
- set bpnum $index_to_bpnum($bpnum)
- set bpinfo [gdb_get_tracepoint_info $bpnum]
- lassign $bpinfo file func line pc enabled pass_count \
- step_count thread hit_count actions
-
- set filename [::file tail $file]
- ManagedWin::open TraceDlg -File $filename -Lines $line
-}
-
-# ------------------------------------------------------------------
-# METHOD: toggle_threads - callback when show_threads is toggled
-# ------------------------------------------------------------------
-itcl::body BpWin::toggle_threads {} {
- set show_threads [pref get gdb/bp/show_threads]
- reconfig
-}
-
-# ------------------------------------------------------------------
-# METHOD: reconfig - used when preferences change
-# ------------------------------------------------------------------
-itcl::body BpWin::reconfig {} {
- if {[winfo exists $itk_interior.f]} { destroy $itk_interior.f }
- if {[winfo exists $itk_interior.m]} { destroy $itk_interior.m }
- if {[winfo exists $itk_interior.sbox]} { destroy $itk_interior.sbox }
- if {[winfo exists $itk_interior.sf]} { destroy $itk_interior.sf }
- if {[winfo exists $itk_interior.pop]} { destroy $itk_interior.pop }
- build_win
-}
-
-# ------------------------------------------------------------------
-# METHOD: goto_bp - show bp in source window
-# ------------------------------------------------------------------
-itcl::body BpWin::goto_bp {r} {
- set bpnum $index_to_bpnum($r)
- if {$tracepoints} {
- set bpinfo [gdb_get_tracepoint_info $bpnum]
- } else {
- set bpinfo [gdb_get_breakpoint_info $bpnum]
- }
- set pc [lindex $bpinfo 3]
-
- SrcWin::choose_and_display BROWSE_TAG [gdb_loc *$pc]
-}
diff --git a/gdb/gdbtk/library/bpwin.ith b/gdb/gdbtk/library/bpwin.ith
deleted file mode 100644
index fa005a65c62..00000000000
--- a/gdb/gdbtk/library/bpwin.ith
+++ /dev/null
@@ -1,59 +0,0 @@
-# Breakpoint window class definition for Insight
-# Copyright (C) 1997, 1998, 1999, 2001 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-itcl::class BpWin {
- inherit EmbeddedWin GDBWin
-
- public {
- variable tracepoints 0
-
- method constructor {args}
- method destructor {}
- method bp_select {r}
- method bp_able { i }
- method bp_remove { i }
- method bp_restore {}
- method bp_store {}
- method bp_type { i }
- method bp_all { command }
- method get_actions {bpnum}
- method toggle_threads {}
- method reconfig {}
- method goto_bp {r}
-
- # GDB Events
- method breakpoint {event}
- method tracepoint {event}
- }
-
- private {
- variable twin
- variable next_row 0
- variable index_to_bpnum
- variable Index_to_bptype
- variable temp
- variable mbar 1
- variable selected 0
- variable bg1
- variable Menu
- variable show_threads ;#cached copy of [pref get gdb/bp/show_threads]
-
- method build_win {}
- method bp_add {bp_event {tracepoint 0}}
- method bp_modify {bp_event {tracepoint 0}}
- method bp_delete {bp_event}
- method _select_and_popup {bp X Y}
- }
-
-}
diff --git a/gdb/gdbtk/library/browserwin.itb b/gdb/gdbtk/library/browserwin.itb
deleted file mode 100644
index d8f42db6faa..00000000000
--- a/gdb/gdbtk/library/browserwin.itb
+++ /dev/null
@@ -1,731 +0,0 @@
-# Browswer window for Insight.
-# Copyright (C) 1998, 1999, 2001, 2002, 2003 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-# ----------------------------------------------------------------------
-# Implements Browser window for Insight
-#
-# ----------------------------------------------------------------------
-
-option add *BrowserWin.textBackground $::Colors(textbg)
-
-# ------------------------------------------------------------------
-# CONSTRUCTOR - create new browser window
-# ------------------------------------------------------------------
-itcl::body BrowserWin::constructor {args} {
- debug
- #eval itk_initialize $args
- window_name "Function Browser"
-
- set _layout [pref get gdb/browser/layout]
- set Current(filename) {}
- set Current(function) {}
- _build_win
-
- eval itk_initialize $args
- add_hook file_changed_hook [code $this _fill_file_box]
-}
-
-# ------------------------------------------------------------------
-# DESTRUCTOR - destroy window containing widget
-# ------------------------------------------------------------------
-itcl::body BrowserWin::destructor {} {
- debug
- if {$filter_trace_after != ""} {
- after cancel $filter_trace_after
- }
-
- remove_hook file_changed_hook [code $this _fill_file_box]
- trace vdelete [pref varname gdb/search/last_symbol] \
- w [code $this _filter_trace_proc]
-}
-
-# ------------------------------------------------------------------
-# METHOD: _build_win - build the main browser window
-# ------------------------------------------------------------------
-itcl::body BrowserWin::_build_win {} {
- debug
-
- # popup menu
- itk_component add popup {
- menu $itk_interior.pop -tearoff 0
- } {}
- set pop $itk_component(popup)
- $pop add command -label "Toggle Layout" -command [code $this _switch_layout]
- $pop add command -label "Help" -command "open_help browser.html"
- $pop add separator
- $pop add command -label "Close" -command "destroy [winfo toplevel $itk_interior]"
- bind [winfo toplevel $itk_interior] <3> "tk_popup $itk_component(popup) %X %Y"
-
- # Four Main Frames: filter, files, functions, and view (source)
- # Their layout depends on _layout
-
- if {$_layout == 1} {
- set p [cyg::panedwindow $itk_interior.p -orient vertical -height 5i \
- -width 5i]
- $p add left
- set p2 [cyg::panedwindow [$p childsite left].p]
-
- $p2 add file
- _build_file_frame [$p2 childsite file]
-
- $p2 add filter
- set f [frame [$p2 childsite filter].f]
- _build_filter_frame $f
- _build_function_frame $f
- pack $f -fill both -expand yes
- pack $p2 -fill both -expand yes
-
- $p add view
- _build_view_frame [$p childsite view]
-
- } else {
- set p [cyg::panedwindow $itk_interior.p -height 5i -width 5i]
- $p add top
- set f [frame [$p childsite top].f]
- _build_filter_frame $f
-
- set browser [cyg::panedwindow $f.p -orient vertical]
- $browser add file
- _build_file_frame [$browser childsite file]
- $browser add function
- _build_function_frame [$browser childsite function]
-
- pack $browser -fill both -expand yes
- pack $f -fill both -expand yes
-
- $p add view
- _build_view_frame [$p childsite view]
- }
-
- # Fill file box
- _fill_file_box
-
- pack $p -fill both -expand yes
-}
-
-# ------------------------------------------------------------------
-# METHOD: _filter_trace_proc
-# This is called when something is entered in the filter
-# box. The actual filtering is done in an after to avoid
-# flashing too much if the user is typing quickly.
-# ------------------------------------------------------------------
-itcl::body BrowserWin::_filter_trace_proc {v1 v2 mode} {
- if {$filter_trace_after != ""} {
- after cancel $filter_trace_after
- }
- set filter_trace_after [after 100 [code $this _filter_trace_after]]
-}
-
-# ------------------------------------------------------------------
-# METHOD: _filter_trace_after
-# This is a wrapper around search, needed to pass to trace
-# ------------------------------------------------------------------
-itcl::body BrowserWin::_filter_trace_after {} {
- set filter_trace_after ""
- search
-}
-
-# ------------------------------------------------------------------
-# METHOD: _search_src
-# Search for text or jump to a specific line
-# in source window, going in the specified DIRECTION.
-# ------------------------------------------------------------------
-itcl::body BrowserWin::_search_src {direction} {
- set exp [$itk_component(view_search) get]
- $itk_component(view_src) search $exp $direction
-}
-
-# ------------------------------------------------------------------
-# METHOD: search
-# Search for functions matching regexp/pattern
-# in specified files
-# ------------------------------------------------------------------
-itcl::body BrowserWin::search {} {
-
- set files [$itk_component(file_box) getcurselection]
-
- if {[llength $files] == 0} {
- return
- }
-
- _freeze_me
-
- set filt_pat [format $filter_regexp($cur_filter_mode) \
- [pref get gdb/search/last_symbol]]
-
- if {[llength $files] == [$itk_component(file_box) size]} {
- set err [catch {gdb_search functions $filt_pat \
- -filename 1} matches]
- } else {
- set err [catch {gdb_search functions $filt_pat \
- -files $files -filename 1} matches]
- }
-
- if {$err} {
- debug "ERROR searching for [pref get gdb/search/last_symbol]: $matches"
- _thaw_me
- return
- }
-
- $itk_component(func_box) delete 0 end
-
- set i -1
- catch {unset index_to_file}
-
- foreach func [lsort -command "list_element_strcmp 0" $matches] {
- $itk_component(func_box) insert end [lindex $func 0]
- set index_to_file([incr i]) [lindex $func 1]
- }
- _thaw_me
-}
-
-# ------------------------------------------------------------------
-# METHOD: _process_file_selection
-# This fills the func combo, and the more window if it
-# is currently open with the hit in the File combobox.
-# ------------------------------------------------------------------
-itcl::body BrowserWin::_process_file_selection {y} {
-
- set curIndex [$itk_component(file_box) nearest $y]
- set curSelection [$itk_component(file_box) curselection]
-
- # We got a button-release - First make sure the click selected the item...
-
- if {[lsearch $curIndex $curSelection] >= 0} {
- _fill_source [$itk_component(file_box) get $curIndex] 0
- } else {
- # If the item was deselected, go back to the first one in the list...
- # It would be better to keep a stack of the clicked items, and go to the
- # last one on the stack. But in extended mode, this is tricky. FIXME
-
- if {[llength $curSelection] > 0} {
- _fill_source [$itk_component(file_box) get [lindex $curSelection 0]] 0
- } else {
- _fill_source ""
- }
- }
-
- search
-}
-
-# ------------------------------------------------------------------
-# METHOD: _process_func_selection
-# This points the more window to the hit in the Func combobox
-# if it is currently open.
-# ------------------------------------------------------------------
-itcl::body BrowserWin::_process_func_selection {y} {
-
- set curIndex [$itk_component(func_box) nearest $y]
- set curSelection [$itk_component(func_box) curselection]
-
- # We got a button-release - First make sure the click selected the item...
-
- if {[lsearch $curIndex $curSelection] >= 0} {
- set funcName [$itk_component(func_box) get $curIndex]
- set fileName $index_to_file($curIndex)
- _fill_source $funcName 1 $fileName
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: do_all_bp
-# Toggle a bp at every selected function in FuncLB
-# ------------------------------------------------------------------
-itcl::body BrowserWin::do_all_bp {onp} {
-
- set funcs [$itk_component(func_box) getcurselection]
- _freeze_me
-
- foreach f $funcs {
- if {[catch {gdb_loc $f} linespec]} {
- dbug W "Could not gdb_loc \"$f\""
- return
- }
- set bpnum [bp_exists $linespec]
- if {$bpnum == -1 && $onp} {
-
- # FIXME: gdb_set_bp is the preferred method, but it requires
- # a file and line number. This doesn't work very well for
- # templates...
- gdb_cmd "break $f"
- } elseif {!$onp} {
- catch {gdb_cmd "delete $bpnum"}
- }
- }
- _thaw_me
-}
-
-# ------------------------------------------------------------------
-# METHOD: _toggle_bp
-# Toggle bp at function specified by the given Y
-# coordinate in the listbox
-# ------------------------------------------------------------------
-itcl::body BrowserWin::_toggle_bp {y} {
-
- set f [$itk_component(func_box) get [$itk_component(func_box) nearest $y]]
- if {$f != ""} {
- if {[catch {gdb_loc $f} linespec]} {
- return
- }
- set bpnum [bp_exists $linespec]
- if {$bpnum == -1} {
- # FIXME: gdb_set_bp is the preferred method, but it requires
- # a file and line number. This doesn't work very well for
- # templates...
- gdb_cmd "break $f"
- } else {
- catch {gdb_cmd "delete $bpnum"}
- }
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: _select
-# Un/Highlight all files in the files list
-# ------------------------------------------------------------------
-itcl::body BrowserWin::_select {highlight} {
- if {$highlight} {
- $itk_component(file_box) selection set 0 end
- } else {
- $itk_component(file_box) selection clear 0 end
- }
- search
-}
-
-# ------------------------------------------------------------------
-# METHOD: _set_filter_mode
-# React to changes in the filter mode
-# ------------------------------------------------------------------
-itcl::body BrowserWin::_set_filter_mode {w mode} {
- if {[string compare $mode $cur_filter_mode] != 0} {
- set cur_filter_mode $mode
- pref set gdb/search/filter_mode $mode
- search
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: _file_hide_h
-# Run when the "Hide .h files" preference is chosen.
-# ------------------------------------------------------------------
-itcl::body BrowserWin::_file_hide_h {} {
- _fill_file_box
- search
-}
-
-# ------------------------------------------------------------------
-# METHOD: _fill_source
-# Helper function to fill the srctextwin
-# when needed.
-# ------------------------------------------------------------------
-itcl::body BrowserWin::_fill_source {f {funcp 1} {filename ""}} {
- if {($funcp && [string compare $f $Current(function)]) \
- || [string compare $f $Current(filename)]} {
- if {!$funcp} {
- if {$filename == ""} {
- set f $f:1
- } else {
- set f $f:$filename
- }
- }
-
- if {[catch {gdb_loc $f} linespec]} {
- return
- }
-
- lassign $linespec foo funcname name line addr pc_addr lib
- set file_changed [string compare $Current(filename) $name]
-
- if {$file_changed} {
- # Set the file name label:
- $itk_component(view_name) configure -text $name:
- _freeze_me
- }
-
- # fill srctextwin
- $itk_component(view_src) location BROWSE_TAG $name $funcname \
- $line $addr $pc_addr lib
-
- if {$file_changed} {
- _thaw_me
- }
-
- set Current(function) $funcname
- # fill func combo
- if {$file_changed} {
- set Current(filename) $name
- _fill_funcs_combo $name
- }
- # Set current function in combo box
- $itk_component(view_func) entryset $f
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: mode
-# Function called by srctextwin when the display
-# mode changes
-# ------------------------------------------------------------------
-itcl::body BrowserWin::mode {w {mode ""} {go 1}} {
- if {$mode != ""} {
- $itk_component(view_src) mode_set $mode $go
- $itk_component(view_mode) entryset $mode
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: _goto_func
-# Callback for the function combo box which
-# sets the srctextwin looking at the given function (VAL)
-# ------------------------------------------------------------------
-itcl::body BrowserWin::_goto_func {w {val ""}} {
- if {$val != ""} {
- set mang 0
- if {[info exists _mangled_func($val)]} {
- set mang $_mangled_func($val)
- }
- if {$mang} {
- set loc $val
- } else {
- set fn [lindex [::file split $Current(filename)] end]
- set loc $fn:$val
- }
- debug "GOTO \"$loc\""
- if {![catch {gdb_loc $loc} result]} {
- lassign $result foo funcname name line addr pc_addr lib
- $itk_component(view_src) location BROWSE_TAG $name $funcname \
- $line $addr $pc_addr lib
- } else {
- dbug W "gdb_loc returned \"$result\""
- }
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: _fill_file_box
-# This private method fills the file listbox
-# ------------------------------------------------------------------
-itcl::body BrowserWin::_fill_file_box {} {
- # It would be cool if gdb_listfiles took a regexp to match,
- # but it doesn't...
-
- $itk_component(file_box) clear
- set allFiles [gdb_listfiles]
-
- if {[pref get gdb/browser/hide_h]} {
- foreach file $allFiles {
- if {[string compare [file extension $file] ".h"]} {
- $itk_component(file_box) insert end $file
- }
- }
- } else {
- foreach file $allFiles {
- $itk_component(file_box) insert end $file
- }
- }
- search
-}
-
-# ------------------------------------------------------------------
-# METHOD: _fill_funcs_combo
-# This private method fills the functions combo box
-# with all the functions in NAME.
-# ------------------------------------------------------------------
-itcl::body BrowserWin::_fill_funcs_combo {name} {
-
- $itk_component(view_func) list delete 0 end
- if {$name != ""} {
- set maxlen 10
- if {[catch {gdb_listfuncs $name} listfuncs]} {
- tk_messageBox -icon error -default ok \
- -title "GDB" -type ok \
- -message "This file can not be found or does not contain\ndebugging information."
- return
- }
- foreach f [lsort $listfuncs] {
- lassign $f func mang
- if {$func == "global constructors keyed to main"} {continue}
- set _mangled_func($func) $mang
- $itk_component(view_func) list insert end $func
- if {[string length $func] > $maxlen} {
- set maxlen [string length $func]
- }
- }
- # limit size to 40 chars because if we don't set a reasonable limit
- # then the combobox can be wider than the screen
- if {$maxlen > 40} {set maxlen 40}
-
- $itk_component(view_func) configure -width [expr {$maxlen + 1}]
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: _build_filter_frame
-# This private method builds the filter frame
-# ------------------------------------------------------------------
-itcl::body BrowserWin::_build_filter_frame {parent} {
-
- itk_component add filter {
- iwidgets::labeledframe $parent.filter -labeltext "Function Filter" \
- -relief groove -borderwidth 2 -ipadx 6 -ipady 4
- }
-
- # Set up the contents of the Filter frame
- if {$_layout == 2} {
- itk_component add filt_label {
- label [$itk_component(filter) childsite].lbl -text "Show if function " \
- -font global/fixed
- }
- }
-
- itk_component add filt_type {
- combobox::combobox [$itk_component(filter) childsite].type -height 4 \
- -width 15 -editable 0 \
- -command [code $this _set_filter_mode] \
- -font global/fixed
- } {
- rename -background -textbackground textBackground Background
- }
-
- # Fill the filter mode combo-box
- foreach elem $filter_modes {
- $itk_component(filt_type) list insert end $elem
- }
-
- set cur_filter_mode [pref get gdb/search/filter_mode]
- if {[lsearch $filter_modes $cur_filter_mode] < 0} {
- set cur_filter_mode [lindex $filter_modes 0]
- }
- $itk_component(filt_type) entryset $cur_filter_mode
-
- itk_component add filt_entry {
- entry [$itk_component(filter) childsite].ent -font global/fixed \
- -textvariable [pref varname gdb/search/last_symbol]
- } {}
- bind_plain_key $itk_component(filt_entry) Return [list $this search]
-
- # Watch keystrokes into the entry box and filter on them...
- trace variable [pref varname gdb/search/last_symbol] w \
- [code $this _filter_trace_proc]
-
- if {$_layout == 2} {
- pack $itk_component(filt_label) -side left
- }
- pack $itk_component(filt_type) -side left -padx 4 -fill y -pady 5
- pack $itk_component(filt_entry) -side right -fill both -expand 1 \
- -padx 6 -pady 5
-
- pack $itk_component(filter) -fill x -anchor n -pady 3
-}
-
-# ------------------------------------------------------------------
-# METHOD: _build_file_frame
-# This private method builds the files frame
-# ------------------------------------------------------------------
-itcl::body BrowserWin::_build_file_frame {parent} {
-
- # Labeled Frame
- itk_component add file_frame {
- iwidgets::labeledframe $parent.file -labeltext "Files" \
- -relief groove -borderwidth 2 -ipadx 6 -ipady 4
- }
-
- # Listbox with files
- itk_component add file_box {
- iwidgets::scrolledlistbox [$itk_component(file_frame) childsite].listbox \
- -selectmode extended -exportselection false \
- -hscrollmode dynamic -vscrollmode dynamic -foreground $::Colors(textfg) \
- -textbackground $::Colors(textbg)
- } {}
-
- bind [$itk_component(file_box) component listbox] <ButtonRelease-1> \
- [code $this _process_file_selection %y]
-
- itk_component add file_sep {
- frame [$itk_component(file_frame) childsite].sep -relief raised -height 2 \
- -borderwidth 1
- }
-
- itk_component add file_hide {
- checkbutton [$itk_component(file_frame) childsite].hide \
- -text "Hide .h files" \
- -variable [pref varname gdb/browser/hide_h] \
- -command [code $this _file_hide_h]
- }
-
- itk_component add file_all {
- button [$itk_component(file_frame) childsite].sel \
- -text "Select All" \
- -command [code $this _select 1]
- }
-
- # pack all the pieces
- grid $itk_component(file_box) -column 0 -row 0 -columnspan 2 \
- -sticky news
- grid $itk_component(file_sep) -column 0 -row 1 -columnspan 2 \
- -sticky ew -pady 8
- grid $itk_component(file_hide) -column 0 -row 2 -padx 5 -sticky w
- grid $itk_component(file_all) -column 1 -row 2 -padx 5 -sticky e
-
- grid columnconfigure [$itk_component(file_frame) childsite] 0 -weight 1
- grid rowconfigure [$itk_component(file_frame) childsite] 0 -weight 1
-
- # finally pack the main frame
- pack $itk_component(file_frame) -side left -fill both -expand yes
-}
-
-# ------------------------------------------------------------------
-# METHOD: _build_function_frame
-# This private method builds the functions frame
-# ------------------------------------------------------------------
-itcl::body BrowserWin::_build_function_frame {parent} {
-
- # Labeled Frame
- itk_component add func_frame {
- iwidgets::labeledframe $parent.file -labeltext "Function" \
- -relief groove -borderwidth 2 -ipadx 6 -ipady 4
- }
-
- # Functions Listbox
- itk_component add func_box {
- iwidgets::scrolledlistbox [$itk_component(func_frame) childsite].listbox \
- -selectmode extended -hscrollmode dynamic -vscrollmode dynamic \
- -exportselection false -foreground $::Colors(textfg) \
- -textbackground $::Colors(textbg)
- } {}
-
- bind [$itk_component(func_box) component listbox] <ButtonRelease-1> \
- [code $this _process_func_selection %y]
- bind $itk_component(func_box) <3> [code $this _toggle_bp %y]
-
- itk_component add func_sep {
- frame [$itk_component(func_frame) childsite].sep -relief raised \
- -height 2 -borderwidth 1
- }
-
- itk_component add func_add_bp {
- button [$itk_component(func_frame) childsite].abp -text "Set BP" \
- -command [code $this do_all_bp 1]
- }
-
- itk_component add func_remove_bp {
- button [$itk_component(func_frame) childsite].rbp -text "Delete BP" \
- -command [code $this do_all_bp 0]
- }
-
- # pack all the pieces
- grid $itk_component(func_box) -column 0 -row 0 -columnspan 2 -sticky news
- grid $itk_component(func_sep) -row 1 -column 0 -columnspan 2 \
- -sticky ew -pady 8
- grid $itk_component(func_remove_bp) -row 2 -column 0 -padx 5 -sticky w
- grid $itk_component(func_add_bp) -row 2 -column 1 -padx 5 -sticky e
-
- grid columnconfigure [$itk_component(func_frame) childsite] 0 -weight 1
- grid rowconfigure [$itk_component(func_frame) childsite] 0 -weight 1
-
- # finally pack the main frame
- pack $itk_component(func_frame) -fill both -expand yes
-}
-
-# ------------------------------------------------------------------
-# METHOD: _build_view_frame
-# This private method builds the view frame
-# ------------------------------------------------------------------
-itcl::body BrowserWin::_build_view_frame {parent} {
- itk_component add view {
- frame $parent.view
- }
-
- itk_component add view_src {
- SrcTextWin $itk_component(view).src -Tracing 0 \
- -parent $this -ignore_var_balloons 0
- } {
- rename -background -textbackground textBackground Background
- }
-
- itk_component add view_bottom {
- frame $itk_component(view).bottom
- }
-
- itk_component add view_name {
- label $itk_component(view).name -font global/fixed
- }
-
- itk_component add view_func {
- combobox::combobox $itk_component(view_bottom).combo -maxheight 15\
- -font global/fixed -command [code $this _goto_func]
- } {
- rename -background -textbackground textBackground Background
- }
-
- itk_component add view_mode {
- combobox::combobox $itk_component(view_bottom).mode -width 9 \
- -font global/fixed -command [code $this mode]
- } {
- rename -background -textbackground textBackground Background
- }
-
- itk_component add view_search {
- entry $itk_component(view_bottom).search -borderwidth 2 \
- -font global/fixed -width 10 -background $::Colors(textbg)
- } {}
-
- # Pack all the components of view into the frame:
- pack $itk_component(view_func) -side left -anchor w
- pack $itk_component(view_mode) -side left -padx 5
- pack $itk_component(view_search) -side right -padx 5 -expand 1 -anchor e
- pack $itk_component(view_name) -side top -fill x -padx 5 -pady 3
- pack $itk_component(view_bottom) -side bottom -fill x -pady 3 -padx 5
- pack $itk_component(view_src) -fill both -expand 1 -padx 5 -pady 3
-
- # Fill combo boxes
- $itk_component(view_mode) list insert end SOURCE
- $itk_component(view_mode) list insert end ASSEMBLY
- $itk_component(view_mode) list insert end MIXED
- # don't allow SRC+ASM mode... $itk_component(view_mode) insert end SRC+ASM
- $itk_component(view_mode) entryset [$itk_component(view_src) mode_get]
-
- # Key bindings
- bind_plain_key $itk_component(view_search) Return \
- [code $this _search_src forwards]
- bind_plain_key $itk_component(view_search) Shift-Return \
- [code $this _search_src backwards]
-
- pack $itk_component(view) -fill both -expand yes
-}
-
-# ------------------------------------------------------------------
-# METHOD: _switch_layout
-# Switch between different layouts
-#
-# ------------------------------------------------------------------
-itcl::body BrowserWin::_switch_layout {} {
- # only 2 right now, so toggle
- if {$_layout == 1} {
- set _layout 2
- } else {
- set _layout 1
- }
- pref set gdb/browser/layout $_layout
- destroy $itk_interior.p
- destroy $itk_component(popup)
- set Current(filename) {}
- set Current(function) {}
- if {$filter_trace_after != ""} {
- after cancel $filter_trace_after
- }
- trace vdelete [pref varname gdb/search/last_symbol] \
- w [code $this _filter_trace_proc]
- _build_win
-}
diff --git a/gdb/gdbtk/library/browserwin.ith b/gdb/gdbtk/library/browserwin.ith
deleted file mode 100644
index 8e36a70707f..00000000000
--- a/gdb/gdbtk/library/browserwin.ith
+++ /dev/null
@@ -1,77 +0,0 @@
-# Browser window class definition for Insight.
-# Copyright (C) 1998, 1999, 2003 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-itcl::class BrowserWin {
- inherit EmbeddedWin
-
- public {
- method constructor {args}
- method destructor {}
- method mode {w {mode ""} {go 1}}
- method search {}
- method test_get {var}
- method do_all_bp {onp}
-
- }
-
- private {
- method _build_win {}
- method _file_hide_h {}
- method _fill_file_box {}
- method _fill_funcs_combo {name}
- method _fill_source {f {funcp 1} {filename ""}}
- method _filter_trace_proc {v1 v2 mode}
- method _filter_trace_after {}
- method _goto_func {w {val ""}}
- method _process_file_selection {y}
- method _process_func_selection {y}
- method _search_src {direction}
- method _select {highlight}
- method _set_filter_mode {w mode}
- method _toggle_bp {y}
- method _build_filter_frame {parent}
- method _build_file_frame {parent}
- method _build_function_frame {parent}
- method _build_view_frame {parent}
- method _switch_layout
-
- variable cur_filter_mode
- variable Current;
- variable labelUpdateCode ""
- variable index_to_file
- variable _mangled_func
- variable filter_trace_after ""
- variable _layout
-
- common componentToRow
- array set componentToRow {
- filter 0
- browser 1
- view 2
- view_hidden 3
- }
-
- common filter_modes [list "starts with" \
- "contains" \
- "ends with" \
- "matches regexp"]
- common filter_regexp
- array set filter_regexp {
- "starts with" ^%s
- "contains" %s
- "ends with" %s$
- "matches regexp" %s
- }
- }
-}
-
diff --git a/gdb/gdbtk/library/console.itb b/gdb/gdbtk/library/console.itb
deleted file mode 100644
index 63a2baf44a1..00000000000
--- a/gdb/gdbtk/library/console.itb
+++ /dev/null
@@ -1,747 +0,0 @@
-# Console window for Insight
-# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-itcl::body Console::constructor {args} {
- global gdbtk_state
- window_name "Console Window"
-
- debug "$args"
- _build_win
- eval itk_initialize $args
- add_hook gdb_no_inferior_hook [list $this idle dummy]
-
- # There are a bunch of console prefs that have no UI
- # for the user to modify them. In the event that the user
- # really wants to change them, they will have to be modified
- # in prefs.tcl or by editing .gdbtkinit. When these prefs
- # gain a prefs UI, the user may change them dynamically
- # and the console window will need notification that they
- # have changed. Add them to the following list and
- # Console::_update_option.
- foreach option {gdb/console/wrap} {
- pref add_hook $option [code $this _update_option]
- }
-
- set gdbtk_state(console) $this
-}
-
-itcl::body Console::destructor {} {
- global gdbtk_state
- set gdbtk_state(console) ""
- remove_hook gdb_no_inferior_hook [list $this idle dummy]
-}
-
-itcl::body Console::_build_win {} {
- iwidgets::scrolledtext $itk_interior.stext \
- -vscrollmode dynamic -textbackground white
-
- set _twin [$itk_interior.stext component text]
-
- _set_wrap [pref get gdb/console/wrap]
-
- $_twin tag configure prompt_tag -foreground [pref get gdb/console/prompt_fg]
- $_twin tag configure err_tag -foreground [pref get gdb/console/error_fg]
- $_twin tag configure log_tag -foreground [pref get gdb/console/log_fg]
- $_twin tag configure target_tag -foreground [pref get gdb/console/target_fg]
- $_twin configure -font [pref get gdb/console/font] \
- -bg $::Colors(textbg) -fg $::Colors(textfg)
-
- #
- # bind editing keys for console window
- #
- bind $_twin <Return> "$this invoke; break"
- bind_plain_key $_twin Control-m "$this invoke; break"
- bind_plain_key $_twin Control-j "$this invoke; break"
-
- # History control.
- bind_plain_key $_twin Control-p "[code $this _previous]; break"
- bind $_twin <Up> "[code $this _previous]; break"
- bind_plain_key $_twin Control-n "[code $this _next]; break"
- bind $_twin <Down> "[code $this _next]; break"
- bind $_twin <Meta-less> "[code $this _first]; break"
- bind $_twin <Home> "[code $this _first]; break"
- bind $_twin <Meta-greater> "[code $this _last]; break"
- bind $_twin <End> "[code $this _last]; break"
- bind_plain_key $_twin Control-o "[code $this _operate_and_get_next]; break"
-
- # Tab completion
- bind_plain_key $_twin KeyPress-Tab "[code $this _complete]; break"
-
- # Don't let left arrow or ^B go over the prompt
- bind_plain_key $_twin Control-b {
- if {[%W compare insert <= {cmdmark + 1 char}]} {
- break
- }
- }
- bind $_twin <Left> [bind $_twin <Control-b>]
-
- # Don't let Control-h, Delete, or Backspace back up over the prompt.
- bind_plain_key $_twin Control-h "[code $this _delete]; break"
-
- bind $_twin <BackSpace> "[code $this _delete]; break"
-
- bind $_twin <Delete> "[code $this _delete 1]; break"
-
- # Control-a moves to start of line.
- bind_plain_key $_twin Control-a {
- %W mark set insert {cmdmark + 1 char}
- %W see {insert linestart}
- break
- }
-
- # Control-u deletes to start of line.
- bind_plain_key $_twin Control-u {
- %W delete {cmdmark + 1 char} insert
- %W see {insert linestart}
- }
-
- # Control-w deletes previous word.
- bind_plain_key $_twin Control-w {
- if {[%W compare {insert -1c wordstart} > cmdmark]} {
- %W delete {insert -1c wordstart} insert
- %W see insert
- }
- }
-
- bind $_twin <Control-Up> "[code $this _search_history]; break"
- bind $_twin <Shift-Up> "[code $this _search_history]; break"
- bind $_twin <Control-Down> "[code $this _rsearch_history]; break"
- bind $_twin <Shift-Down> "[code $this _rsearch_history]; break"
-
- # Don't allow key motion to move insertion point outside the command
- # area. This is done by fixing up the insertion point after any key
- # movement. We only need to do this after events we do not
- # explicitly override. Note that since the edit line is always the
- # last line, we can't possibly go past it, so we don't bother
- # checking that. Note also that we check for a binding which is
- # simply `;'; this lets us handle keys already bound via
- # bind_plain_key.
- foreach event [bind Text] {
- if {[string match *Key* $event]
- && ([bind $_twin $event] == ""
- || [bind $_twin $event] == ";")} {
- bind $_twin $event [bind Text $event]
- bind $_twin $event {+
- if {[%W compare insert <= {cmdmark + 1 char}]} {
- %W mark set insert {cmdmark + 1 char}
- }
- break
- }
- }
- }
-
- # Don't allow mouse to put cursor outside command line. For some
- # events we do this by noticing when the cursor is outside the
- # range, and then saving the insertion point. For others we notice
- # the saved insertion point.
- set pretag pre-$_twin
- bind $_twin <1> [format {
- if {[%%W compare [tk::TextClosestGap %%W %%x %%y] <= cmdmark]} {
- %s _insertion [%%W index insert]
- } else {
- %s _insertion {}
- }
- } $this $this]
- bind $_twin <B1-Motion> [format {
- if {[%s _insertion] != ""} {
- %%W mark set insert [%s _insertion]
- }
- } $this $this $this]
- # FIXME: has inside information.
- bind $_twin <ButtonRelease-1> [format {
- tk::CancelRepeat
- if {[%s _insertion] != ""} {
- %%W mark set insert [%s _insertion]
- }
- %s _insertion {}
- break
- } $this $this $this]
-
- # Don't allow inserting text outside the command line. FIXME:
- # requires inside information.
- # Also make it a little easier to paste by making the button
- # drags a little "fuzzy".
- bind $_twin <B2-Motion> {
- if {!$tk_strictMotif} {
- if {($tk::Priv(x) - 2 < %x < $tk::Priv(x) + 2) \
- || ($tk::Priv(y) - 2 < %y < $tk::Priv(y) + 2)} {
- set tk::Priv(mouseMoved) 1
- }
- if {$tk::Priv(mouseMoved)} {
- %W scan dragto %x %y
- }
- }
- break
- }
- bind $_twin <ButtonRelease-2> [format {
- if {!$tk::Priv(mouseMoved) || $tk_strictMotif} {
- %s
- break
- }
- } [code $this _paste 1]]
- bind $_twin <<Paste>> "[code $this _paste 0]; break"
- bind $_twin <<PasteSelection>> "[code $this _paste 0]; break"
- bind_plain_key $_twin Control-c "event generate $_twin <<Copy>>"
- bind_plain_key $_twin Control-v "[code $this _paste 1]; break"
-
- _setprompt
- pack $itk_interior.stext -expand yes -fill both
-
- focus $_twin
-
-}
-
-itcl::body Console::idle {event} {
- set _running 0
- $_top configure -cursor {}
-}
-
-# ------------------------------------------------------------------
-# METHOD: busy - busy event handler
-# ------------------------------------------------------------------
-itcl::body Console::busy {event} {
- set _running 1
- $_top configure -cursor watch
-}
-
-# ------------------------------------------------------------------
-# METHOD: insert - insert new text in the text widget
-# ------------------------------------------------------------------
-itcl::body Console::insert {line {tag ""}} {
- if {$_needNL} {
- $_twin insert {insert linestart} "\n"
- }
- # Remove all \r characters from line.
- set line [join [split $line \r] {}]
- $_twin insert {insert -1 line lineend} $line $tag
-
- set nlines [lindex [split [$_twin index end] .] 0]
- if {$nlines > $throttle} {
- set delta [expr {$nlines - $throttle}]
- $_twin delete 1.0 ${delta}.0
- }
-
- $_twin see insert
- set _needNL 0
- ::update idletasks
-}
-
-# ------------------------------------------------------------------
-# NAME: ConsoleWin::_operate_and_get_next
-# DESCRIPTION: Invokes the current command and, if this
-# command came from the history, arrange for
-# the next history command to be inserted once this
-# command is finished.
-#
-# ARGUMENTS: None
-# RETURNS: Nothing
-# ------------------------------------------------------------------
-itcl::body Console::_operate_and_get_next {} {
- if {$_histElement >= 0} {
- # _pendingHistElement will be used after the new history element
- # is pushed. So we must increment it.
- set _pendingHistElement [expr {$_histElement + 1}]
- }
- invoke
-}
-
-#-------------------------------------------------------------------
-# METHOD: _previous - recall the previous command
-# ------------------------------------------------------------------
-itcl::body Console::_previous {} {
- if {$_histElement == -1} {
- # Save partial command.
- set _partialCommand [$_twin get {cmdmark + 1 char} {cmdmark lineend}]
- }
- incr _histElement
- set text [lindex $_history $_histElement]
- if {$text == ""} {
- # No dice.
- incr _histElement -1
- # FIXME flash window.
- } else {
- $_twin delete {cmdmark + 1 char} {cmdmark lineend}
- $_twin insert {cmdmark + 1 char} $text
- }
-}
-
-#-------------------------------------------------------------------
-# METHOD: _search_history - search history for match
-# ------------------------------------------------------------------
-itcl::body Console::_search_history {} {
- set str [$_twin get {cmdmark + 1 char} {cmdmark lineend}]
-
- if {$_histElement == -1} {
- # Save partial command.
- set _partialCommand $str
- set ix [lsearch $_history ${str}*]
- } else {
- set str $_partialCommand
- set num [expr $_histElement + 1]
- set ix [lsearch [lrange $_history $num end] ${str}*]
- incr ix $num
- }
-
- set text [lindex $_history $ix]
- if {$text != ""} {
- set _histElement $ix
- $_twin delete {cmdmark + 1 char} {cmdmark lineend}
- $_twin insert {cmdmark + 1 char} $text
- }
-}
-
-#-------------------------------------------------------------------
-# METHOD: _rsearch_history - search history in reverse for match
-# ------------------------------------------------------------------
-itcl::body Console::_rsearch_history {} {
- if {$_histElement != -1} {
- set str $_partialCommand
- set num [expr $_histElement - 1]
- set ix $num
- while {$ix >= 0} {
- if {[string match ${str}* [lindex $_history $ix]]} {
- break
- }
- incr ix -1
- }
-
- set text ""
- if {$ix >= 0} {
- set text [lindex $_history $ix]
- set _histElement $ix
- } else {
- set text $_partialCommand
- set _histElement -1
- }
- $_twin delete {cmdmark + 1 char} {cmdmark lineend}
- $_twin insert {cmdmark + 1 char} $text
- }
-}
-
-#-------------------------------------------------------------------
-# METHOD: _next - recall the next command (scroll forward)
-# ------------------------------------------------------------------
-itcl::body Console::_next {} {
- if {$_histElement == -1} {
- # FIXME flash window.
- return
- }
- incr _histElement -1
- if {$_histElement == -1} {
- set text $_partialCommand
- } else {
- set text [lindex $_history $_histElement]
- }
- $_twin delete {cmdmark + 1 char} {cmdmark lineend}
- $_twin insert {cmdmark + 1 char} $text
-}
-
-#-------------------------------------------------------------------
-# METHOD: _last - get the last history element
-# ------------------------------------------------------------------
-itcl::body Console::_last {} {
- set _histElement 0
- _next
-}
-
-#-------------------------------------------------------------------
-# METHOD: _first - get the first (earliest) history element
-# ------------------------------------------------------------------
-itcl::body Console::_first {} {
- set _histElement [expr {[llength $_history] - 1}]
- _previous
-}
-
-
-
-#-------------------------------------------------------------------
-# METHOD: _setprompt - put a prompt at the beginning of a line
-# ------------------------------------------------------------------
-itcl::body Console::_setprompt {{prompt {}}} {
- if {$prompt == ""} {
- #set prompt [pref get gdb/console/prompt]
- set prompt [gdb_prompt]
- } elseif {$prompt == "none"} {
- set prompt ""
- }
-
- $_twin delete {insert linestart} {insert lineend}
- $_twin insert {insert linestart} $prompt prompt_tag
- $_twin mark set cmdmark "insert -1 char"
- $_twin see insert
-
- if {$_pendingHistElement >= 0} {
- set _histElement $_pendingHistElement
- set _pendingHistElement -1
- _next
- }
-}
-
-#-------------------------------------------------------------------
-# METHOD: gets - get a line of input from the console
-# ------------------------------------------------------------------
-itcl::body Console::gets {} {
- set _input_mode 1
-# _setprompt "(input) "
- _setprompt none
- $_twin delete insert end
- $_twin mark set cmdmark {insert -1 char}
-
- bind_plain_key $_twin Control-d "$this invoke 1; break"
- bind_plain_key $_twin Control-c "[code $this _cancel]; break"
-
- vwait [scope _input_result]
- set _input_mode 0
- bind_plain_key $_twin Control-c "event generate $_twin <<Copy>>"
- activate
- if {$_input_error} {
- set _input_error 0
- return -code error ""
- }
- return $_input_result
-}
-
-#-------------------------------------------------------------------
-# METHOD: cancel - cancel input when ^C is hit
-# ------------------------------------------------------------------
-itcl::body Console::_cancel {} {
- if {$_input_mode} {
- set _needNL 1
- $_twin mark set insert {insert lineend}
- $_twin insert {insert lineend} "^C\n"
- incr _invoking
- set _input_error 1
- set _input_result ""
- }
-}
-
-#-------------------------------------------------------------------
-# METHOD: activate - run this after a command is run
-# ------------------------------------------------------------------
-itcl::body Console::activate {{prompt {}}} {
- if {$_invoking > 0} {
- incr _invoking -1
- _setprompt $prompt
- }
-}
-
-#-------------------------------------------------------------------
-# METHOD: invoke - invoke a command
-# ------------------------------------------------------------------
-itcl::body Console::invoke {{controld 0}} {
- global gdbtk_state
-
- set text [$_twin get {cmdmark + 1 char} end ]
-
- if { "[string range $text 0 1]" == "tk" } {
- if {! [info complete $text] } {
- $_twin insert {insert lineend} " \\\n"
- $_twin see insert
- return
- }
- }
-
- incr _invoking
-
- set text [string trimright $text \n]
- if {$text == ""} {
- set text [lindex $_history 0]
- $_twin insert {insert lineend} $text
- }
- $_twin mark set insert {insert lineend}
- $_twin insert {insert lineend} "\n"
-
- set ok 0
- if {$_running} {
- if {[string index $text 0] == "!"} {
- set text [string range $text 1 end]
- set ok 1
- }
- }
-
- if {$_input_mode} {
- if {!$controld} {append text \n}
- set _input_result $text
- set _needNL 1
- return
- }
-
- # Only push new nonempty history items.
- if {$text != "" && [lindex $_history 0] != $text} {
- lvarpush _history $text
- }
-
- set index [$_twin index insert]
-
- # Clear current history element, and current partial element.
- set _histElement -1
- set _partialCommand ""
-
- # Need a newline before next insert.
- set _needNL 1
-
- # run command
- if {$gdbtk_state(readline)} {
- set gdbtk_state(readline_response) $text
- return
- }
-
- if {!$_running || $ok} {
- set result [catch {gdb_immediate "$text" 1} message]
- } else {
- set result 1
- set message "The debugger is busy."
- }
-
- # gdb_immediate may take a while to finish. Exit if
- # our window has gone away.
- if {![winfo exists $_twin]} { return }
-
- if {$result} {
- global errorInfo
- dbug W "Error: $errorInfo\n"
- $_twin insert end "Error: $message\n" err_tag
- } elseif {$message != ""} {
- $_twin insert $index "$message\n"
- }
-
- # Make the prompt visible again.
- activate
-
- # Make sure the insertion point is visible.
- $_twin see insert
-}
-
-#-------------------------------------------------------------------
-# PRIVATE METHOD: _delete - Handle a Delete of some sort.
-# ------------------------------------------------------------------
-itcl::body Console::_delete {{right 0}} {
-
- # If we are deleting to the right, and we have this turned off,
- # delete to the right.
-
- if {$right && ![pref get gdb/console/deleteLeft]} {
- set right 0
- }
-
- if {!$right} {
- set insert_valid [$_twin compare insert > {cmdmark + 1 char}]
- set delete_loc "insert-1c"
- } else {
- set insert_valid [$_twin compare insert > cmdmark]
- set delete_loc "insert"
- }
-
- # If there is a selection on the command line, delete it,
- # If there is a selection above the command line, do a
- # regular delete, but don't delete the prompt.
- # If there is no selection, do the delete.
-
- if {![catch {$_twin index sel.first}]} {
- if {[$_twin compare sel.first <= cmdmark]} {
- if {$insert_valid} {
- $_twin delete $delete_loc
- }
- } else {
- $_twin delete sel.first sel.last
- }
- } elseif {$insert_valid} {
- $_twin delete $delete_loc
- }
-}
-
-#-------------------------------------------------------------------
-# PRIVATE METHOD: _insertion - Set or get saved insertion point
-# ------------------------------------------------------------------
-itcl::body Console::_insertion {args} {
- if {! [llength $args]} {
- return $_saved_insertion
- } else {
- set _saved_insertion [lindex $args 0]
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: _paste - paste the selection into the console window
-# ------------------------------------------------------------------
-itcl::body Console::_paste {{check_primary 1}} {
- set sel {}
-
- if {!$check_primary || [catch {selection get} sel] || $sel == ""} {
- if {[catch {selection get -selection CLIPBOARD} sel] || $sel == ""} {
- return
- }
- }
-
- #if there is a selection, insert over it:
- if {![catch {$_twin index sel.first}]
- && [$_twin compare sel.first > {cmdmark + 1 char}]} {
- set point [$_twin index sel.first]
- $_twin delete sel.first sel.last
- $_twin insert $point $sel
- } else {
- $_twin insert insert $sel
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: _find_lcp - Return the longest common prefix in SLIST.
-# Can be empty string.
-# ------------------------------------------------------------------
-itcl::body Console::_find_lcp {slist} {
- # Handle trivial cases where list is empty or length 1
- if {[llength $slist] <= 1} {return [lindex $slist 0]}
-
- set prefix [lindex $slist 0]
- set prefixlast [expr [string length $prefix] - 1]
-
- foreach str [lrange $slist 1 end] {
- set test_str [string range $str 0 $prefixlast]
- while {[string compare $test_str $prefix] != 0} {
- incr prefixlast -1
- set prefix [string range $prefix 0 $prefixlast]
- set test_str [string range $str 0 $prefixlast]
- }
- if {$prefixlast < 0} break
- }
- return $prefix
-}
-
-# ------------------------------------------------------------------
-# METHOD: _find_completion - Look through COMPLETIONS to generate
-# the suffix needed to do command
-# ------------------------------------------------------------------
-itcl::body Console::_find_completion {cmd completions} {
- # Get longest common prefix
- set lcp [_find_lcp $completions]
- set cmd_len [string length $cmd]
- # Return suffix beyond end of cmd
- return [string range $lcp $cmd_len end]
-}
-
-# ------------------------------------------------------------------
-# METHOD: _complete - Command line completion
-# ------------------------------------------------------------------
-itcl::body Console::_complete {} {
-
- set command_line [$_twin get {cmdmark + 1 char} {cmdmark lineend}]
- set choices [gdb_cmd "complete $command_line" 1]
- set choices [string trimright $choices \n]
- set choices [split $choices \n]
-
- # Just do completion if this is the first tab
- if {!$_saw_tab} {
- set _saw_tab 1
- set completion [_find_completion $command_line $choices]
-
- # Here is where the completion is actually done. If there
- # is one match, complete the command and print a space.
- # If two or more matches, complete the command and beep.
- # If no match, just beep.
- switch [llength $choices] {
- 0 {}
- 1 {
- $_twin insert end "$completion "
- set _saw_tab 0
- return
- }
-
- default {
- $_twin insert end $completion
- }
- }
- bell
- $_twin see end
- bind $_twin <KeyPress> [code $this _reset_tab]
- } else {
- # User hit another consecutive tab. List the choices.
- # Note that at this point, choices may contain commands
- # with spaces. We have to lop off everything before (and
- # including) the last space so that the completion list
- # only shows the possibilities for the last token.
- set choices [lsort $choices]
- if {[regexp ".* " $command_line prefix]} {
- regsub -all $prefix $choices {} choices
- }
- if {[llength choices] != 0} {
- insert "\nCompletions:\n[join $choices \ ]\n"
- $_twin see end
- bind $_twin <KeyPress> [code $this _reset_tab]
- }
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: _reset_tab - Helper method for tab completion. Used
-# to reset the tab when a key is pressed.
-# ------------------------------------------------------------------
-itcl::body Console::_reset_tab {} {
- bind $_twin <KeyPress> {}
- set _saw_tab 0
-}
-
-
-# ------------------------------------------------------------------
-# METHOD: _set_wrap - Set wrap mode
-# ------------------------------------------------------------------
-itcl::body Console::_set_wrap {wrap} {
- if { $wrap } {
- set hsm none
- set wv char
- } else {
- set hsm dynamic
- set wv none
- }
-
- $itk_interior.stext configure -hscrollmode $hsm
- $_twin configure -wrap $wv
-}
-
-# ------------------------------------------------------------------
-# METHOD: _update_option - Update in response to preference change
-# ------------------------------------------------------------------
-itcl::body Console::_update_option {name value} {
- switch -- $name {
- gdb/console/wrap {
- _set_wrap $value
- }
-
- gdb/console/prompt_fg {
- $_twin tag configure prompt_tag -foreground $value
- }
-
- gdb/console/error_fg {
- $_twin tag configure err_tag -foreground $value
- }
- }
-}
-
-# ------------------------------------------------------------------
-# NAME: public method Console::test
-# DESCRIPTION: Executes the given command
-#
-# ARGUMENTS: Command to run
-# RETURNS: Return value of command
-#
-# NOTES: This will only run if env(GDBTK_TEST_RUNNING)==1.
-# FOR TESTING ONLY
-# ------------------------------------------------------------------
-itcl::body Console::test {args} {
- global env
-
- if {[info exists env(GDBTK_TEST_RUNNING)] && $env(GDBTK_TEST_RUNNING) == 1} {
- return [eval $args]
- }
-}
-
diff --git a/gdb/gdbtk/library/console.ith b/gdb/gdbtk/library/console.ith
deleted file mode 100644
index bf834f3223e..00000000000
--- a/gdb/gdbtk/library/console.ith
+++ /dev/null
@@ -1,77 +0,0 @@
-# Console window class definition for GDBtk.
-# Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-# ----------------------------------------------------------------------
-# Implements a console display widget using primitive widgets as the building
-# blocks.
-# ----------------------------------------------------------------------
-
-itcl::class Console {
- inherit EmbeddedWin GDBEventHandler
-
- public {
- #Approximate maximum number of lines allowed in widget
- variable throttle 2000
-
- method constructor {args}
- method destructor {}
- method insert {line {tag ""}}
- method invoke {{controld 0}}
- method _insertion {args}
- method activate {{prompt {}}}
- method test {args}
- method gets {}
-
- #
- # GDB Events
- #
- method busy {event}
- method idle {event}
- }
-
- private {
- variable _twin
- variable _invoking 0
- variable _needNL 1
- variable _history {}
- variable _histElement -1
- variable _partialCommand ""
- variable _saved_insertion ""
- variable _running 0
- variable _saw_tab 0
- variable _pendingHistElement -1
- variable _input_mode 0
- variable _input_result ""
- variable _input_error 0
-
- method _build_win {}
- method _cancel {}
- method _complete {}
- method _delete {{left 0}}
- method _find_completion {cmd completions}
- method _find_lcp {slist}
- method _first {}
- method _last {}
- method _next {}
- method _operate_and_get_next {}
- method _paste {{check_primary 1}}
- method _previous {}
- method _reset_tab {}
- method _search_history {}
- method _rsearch_history {}
- method _setprompt {{prompt {}}}
- method _set_wrap {wrap}
- method _update_option {name value}
- }
-}
diff --git a/gdb/gdbtk/library/cspref.itb b/gdb/gdbtk/library/cspref.itb
deleted file mode 100644
index 551992c9f65..00000000000
--- a/gdb/gdbtk/library/cspref.itb
+++ /dev/null
@@ -1,152 +0,0 @@
-# Color Scheme preferences dialog for Insight.
-# Copyright (C) 2004 Red Hat
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-# ------------------------------------------------------------------
-# CONSTRUCTOR - create new source preferences window
-# ------------------------------------------------------------------
-itcl::body CSPref::constructor {args} {
- window_name "Color Scheme Preferences"
- _init_var
- _build_win
-}
-
-# ------------------------------------------------------------------
-# METHOD: init_var - initialize preference variables
-# ------------------------------------------------------------------
-itcl::body CSPref::_init_var {} {
- for {set i 0} {$i < 16} {incr i} {
- lappend vlist gdb/bg/$i
- }
-
- foreach var $vlist {
- set _saved($var) [pref get $var]
- set _new($var) $_saved($var)
- }
-}
-
-
-# ------------------------------------------------------------------
-# METHOD: build_win - build the dialog
-# ------------------------------------------------------------------
-itcl::body CSPref::_build_win {} {
- frame $itk_interior.f
- frame $itk_interior.f.a
- frame $itk_interior.f.b
- set f $itk_interior.f.a
-
- # Description frame
- set d [labelframe $f.desc -text "Description"]
- label $d.txt -justify left -wraplength 6i -background $::Colors(textbg) \
- -text "There are many situations where multiple instances\
-of Insight may be running. Some examples are when debugging itself, when debugging\
-client and server programs, or multiprocessor systems. In these situations, it is easy\
-to get confused by the many different windows. Insight provides a simple way to have\
-all the windows belonging to a particular Insight instance use the same background color.\
-\n\nClick on a color below to edit it. This is a text background color. Other colors are\
-computed based on it."
- pack $d.txt -side top
- pack $f.desc -expand yes -fill both
-
- set w [labelframe $f.colors -text "Text Backgrounds"]
- for {set i 0} {$i < 16} {incr i} {
- set color $_new(gdb/bg/$i)
- button $w.$i -text [format "%X" $i] -activebackground $color -bg $color \
- -command [code $this _pick $color $w.$i $i]
- }
-
- grid $w.0 $w.1 $w.2 $w.3 $w.4 $w.5 $w.6 $w.7 -padx 10 -pady 10 -sticky we
- grid $w.8 $w.9 $w.10 $w.11 $w.12 $w.13 $w.14 $w.15 -padx 10 -pady 10 -sticky we
-
- pack $w -fill both -expand yes
- pack $f.colors -fill both -expand yes
-
- button $itk_interior.f.b.ok -text OK -width 7 -underline 0 -command [code $this _save]
- button $itk_interior.f.b.apply -text Apply -width 7 -underline 0 -command [code $this _apply]
- button $itk_interior.f.b.quit -text Cancel -width 7 -underline 0 -command [code $this _cancel]
- standard_button_box $itk_interior.f.b
- pack $itk_interior.f.a $itk_interior.f.b $itk_interior.f -expand yes -fill both -padx 5 -pady 5
-}
-
-# ------------------------------------------------------------------
-# METHOD: apply - apply changes
-# ------------------------------------------------------------------
-itcl::body CSPref::_apply {} {
- foreach var [array names _new] {
- if {$_new($var) != [pref get $var]} {
- pref set $var $_new($var)
- }
- }
- set_bg_colors
-}
-
-# ------------------------------------------------------------------
-# METHOD: _cancel
-# ------------------------------------------------------------------
-itcl::body CSPref::_cancel {} {
- set bg_changed 0
-
- if {[string compare [pref get gdb/bg/$::gdb_bg_num] $_saved(gdb/bg/$::gdb_bg_num)] != 0} {
- set bg_changed 1
- }
-
- foreach elem [array names _saved] {
- set cur_val [pref get $elem]
- if {[string compare $cur_val $_saved($elem)] != 0} {
- pref set $elem $_saved($elem)
- }
- }
-
- if {$bg_changed} {
- set_bg_colors
- } else {
- ManagedWin::restart
- }
- unpost
-}
-
-# ------------------------------------------------------------------
-# METHOD: save - apply changes and quit
-# ------------------------------------------------------------------
-itcl::body CSPref::_save {} {
- _apply
- unpost
-}
-
-# ------------------------------------------------------------------
-# METHOD: reconfig - called when windows are reconfigured
-# ------------------------------------------------------------------
-
-itcl::body CSPref::reconfig {} {
- # Unfortunately, r_setcolors recolors buttons if we do an Apply,
- # so fix them up here.
-
- for {set i 0} {$i < 10} {incr i} {
- set color $_new(gdb/bg/$i)
- $w.$i configure -activebackground $color -bg $color
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: pick - pick colors
-# ------------------------------------------------------------------
-itcl::body CSPref::_pick {color win num} {
- #debug "$color $win $num"
- set new_color [tk_chooseColor -initialcolor $color -title "Choose color"]
- if {$new_color != $color && $new_color != {}} {
- $win configure -activebackground $new_color -bg $new_color \
- -command [code $this _pick $new_color $w.${num}b $num]
- set _new(gdb/bg/$num) $new_color
- pref set gdb/bg/$num $new_color
- }
-}
diff --git a/gdb/gdbtk/library/cspref.ith b/gdb/gdbtk/library/cspref.ith
deleted file mode 100644
index 587fd2aa401..00000000000
--- a/gdb/gdbtk/library/cspref.ith
+++ /dev/null
@@ -1,36 +0,0 @@
-# Color Scheme preferences dialog class definition for GDBtk.
-# Copyright (C) 2004, Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-itcl::class CSPref {
- inherit ManagedWin ModalDialog
-
- private {
- variable _saved ;# These are the saved values...
- variable _new ;# These are the changed values
- variable w
- method _apply {}
- method _build_win {}
- method _cancel {}
- method _init_var {}
- method _pick {color win num}
- method _save {}
- method _setcolors {}
- }
-
- public {
- method constructor {args}
- method reconfig {}
- }
-}
-
diff --git a/gdb/gdbtk/library/debugwin.itb b/gdb/gdbtk/library/debugwin.itb
deleted file mode 100644
index 623f044dafd..00000000000
--- a/gdb/gdbtk/library/debugwin.itb
+++ /dev/null
@@ -1,483 +0,0 @@
-# Debug window for GDBtk.
-# Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-# -----------------------------------------------------------------------------
-# NAME: DebugWin::constructor
-#
-# SYNOPSIS: constructor::args
-#
-# DESC: Creates the debug window
-#
-# ARGS: None are used yet.
-# -----------------------------------------------------------------------------
-itcl::body DebugWin::constructor {args} {
- debug $args
- window_name "Insight Debug" "Debug"
-
- build_win
-}
-
-# -----------------------------------------------------------------------------
-# NAME: DebugWin::destructor
-#
-# SYNOPSIS: Not called by hand
-#
-# DESC: Destroys the debug window
-#
-# ARGS: None
-# -----------------------------------------------------------------------------
-itcl::body DebugWin::destructor {} {
- # notify debug code that window is going away
- ::debug::debugwin ""
-}
-
-# -----------------------------------------------------------------------------
-# NAME: DebugWin::reconfig
-#
-# SYNOPSIS: Reconfigure callback
-#
-# DESC: Fixes up window colors
-#
-# ARGS: None
-# -----------------------------------------------------------------------------
-itcl::body DebugWin::reconfig {} {
- # This keeps the Debug window using its unique black background.
- # Otherwise, a reconfigure event will color it to match the other windows
- $itk_interior.s configure -textbackground black
-}
-
-# -----------------------------------------------------------------------------
-# NAME: DebugWin::build_win
-#
-# SYNOPSIS: build_win
-#
-# DESC: Creates the Debug Window. Reads the contents of the debug log
-# file, if it exists. Notifies the debug functions in ::debug
-# to send output here.
-# -----------------------------------------------------------------------------
-itcl::body DebugWin::build_win {} {
- global gdb_ImageDir GDBTK_LIBRARY
-
- set top [winfo toplevel $itk_interior]
-
- # initialize the gdbtk_de array
- if {![info exists ::gdbtk_de]} {
- set ::gdbtk_de(ALL) 1
- set ::gdbtk_de(ERRORS_ONLY) 0
- set ::gdbtk_de(others) 0
- set ::gdbtk_de(filter_var) ALL
- }
-
- # create menubar
- set menu [menu $itk_interior.m -tearoff 0]
- $menu add cascade -menu $menu.file -label "File" -underline 0
- set m [menu $menu.file]
- $m add command -label "Clear" -underline 1 \
- -command [code $this _clear]
- $m add command -label "Mark Old" -underline 1 \
- -command [code $this _mark_old]
- $m add separator
- $m add command -label "Save" -underline 0 \
- -command [code $this _save_contents]
- $m add separator
- $m add command -label "Close" -underline 0 \
- -command "::debug::debugwin {};delete object $this"
- $menu add cascade -menu $menu.trace -label "Trace"
- set m [menu $menu.trace]
- $m add radiobutton -label Start -variable ::debug::tracing -value 1
- $m add radiobutton -label Stop -variable ::debug::tracing -value 0
- $menu add cascade -menu $menu.rs -label "ReSource"
- set m [menu $menu.rs]
- foreach f [lsort [glob [file join $GDBTK_LIBRARY *.itb]]] {
- $m add command -label "Source [file tail $f]"\
- -command [list source $f]
- }
- $m add separator
- $m add command -label "Source ALL" -command [code $this _source_all]
-
- $menu add cascade -menu $menu.opt -label "Options"
- set m [menu $menu.opt]
- $m add command -label "Display" -underline 0 \
- -command [list ManagedWin::open DebugWinDOpts -over $this]
- if {!$::debug::initialized} {
- $menu entryconfigure 1 -state disabled
- $menu add cascade -label " Tracing Not Initialized" -foreground red \
- -activeforeground red
- }
- $menu add cascade -menu $menu.help -label "Help" -underline 0
- set m [menu $menu.help]
- $m add command -label "Debugging Functions" -underline 0 \
- -command {open_help debug.html}
-
- $top configure -menu $menu
-
- iwidgets::scrolledtext $itk_interior.s -hscrollmode static \
- -vscrollmode static -wrap none -textbackground black -foreground white
- set _t [$itk_interior.s component text]
- pack $itk_interior.s -expand 1 -fill both
-
- # define tags
- foreach color $_colors {
- $_t tag configure [lindex $color 0] -foreground [lindex $color 1]
- }
- $_t tag configure trace -foreground gray
- $_t tag configure args -foreground blue
- $_t tag configure marked -background grey20
-
- loadlog
-
- # now notify the debug functions to use this window
- ::debug::debugwin $this
-
- # override the window delete procedure so the messages are
- # turned off first.
- wm protocol $top WM_DELETE_WINDOW "::debug::debugwin {};destroy $top"
-}
-
-# -----------------------------------------------------------------------------
-# NAME: DebugWin::puts
-#
-# SYNOPSIS: puts {level cls func msg}
-#
-# DESC: Writes debugging information into the DebugWin. A filter
-# will be applied to determine if the message should be
-# displayed or not.
-#
-# ARGS: level - priority level. See debug::dbug for details.
-# cls - class name of caller, for example "SrcWin"
-# func - function name of caller
-# msg - message to display
-# -----------------------------------------------------------------------------
-itcl::body DebugWin::puts {level cls func msg} {
- # filter. check if we should display this message
- # for now we always let high-level messages through
- if {$level == "I"} {
-
- # errors and warnings only
- if {$::gdbtk_de(ERRORS_ONLY)} { return }
-
- # ALL classes except those set
- if {$::gdbtk_de(ALL)} {
- if {[info exists ::gdbtk_de($cls)]} {
- if {$::gdbtk_de($cls)} {
- return
- }
- } elseif {$::gdbtk_de(others)} {
- return
- }
- }
-
- # ONLY the classes set
- if {!$::gdbtk_de(ALL)} {
- if {[info exists ::gdbtk_de($cls)]} {
- if {!$::gdbtk_de($cls)} {
- return
- }
- } elseif {!$::gdbtk_de(others)} {
- return
- }
- }
- }
-
- if {$func != ""} {
- append cls ::$func
- }
- $_t insert end "($cls) " {} "$msg\n" $level
- $_t see insert
-}
-
-# -----------------------------------------------------------------------------
-# NAME: DebugWin::put_trace
-#
-# SYNOPSIS: put_trace {enter level func ar}
-#
-# DESC: Writes trace information into the DebugWin. A filter
-# will be applied to determine if the message should be
-# displayed or not.
-#
-# ARGS: enter - 1 if this is a function entry, 0 otherwise.
-# level - stack level
-# func - function name
-# ar - function arguments
-# -----------------------------------------------------------------------------
-itcl::body DebugWin::put_trace {enter level func ar} {
- set x [expr {$level * 2 - 2}]
- if {$enter} {
- $_t insert end "[string range $_bigstr 0 $x]$func " trace "$ar\n" args
- } else {
- $_t insert end "[string range $_bigstr 0 $x]<- $func " trace "$ar\n" args
- }
- $_t see insert
-}
-
-# -----------------------------------------------------------------------------
-# NAME: DebugWin::loadlog
-#
-# SYNOPSIS: loadlog
-#
-# DESC: Reads the contents of the debug log file, if it exists, into
-# the DebugWin.
-# -----------------------------------------------------------------------------
-itcl::body DebugWin::loadlog {} {
- $_t delete 0.0 end
- # Now load in log file, if possible.
- # this is rather rude, using the logfile variable in the debug namespace
- if {$::debug::logfile != "" && $::debug::logfile != "stdout"} {
- flush $::debug::logfile
- seek $::debug::logfile 0 start
- while {[gets $::debug::logfile line] >= 0} {
- while {[catch {set f [lindex $line 0]} f]} {
- # If the lindex failed its because the remainder of the
- # list is on the next line. Get it.
- if {[gets $::debug::logfile line2] < 0} {
- break
- }
- append line \n $line2
- }
- if {$f == "T"} {
- put_trace [lindex $line 1] [lindex $line 2] [lindex $line 3] \
- [lindex $line 4]
- } else {
- puts $f [lindex $line 1] [lindex $line 2] [lindex $line 3]
- }
- }
- }
-}
-
-# -----------------------------------------------------------------------------
-# NAME: DebugWin::_source_all
-#
-# SYNOPSIS: _source_all
-#
-# DESC: Re-sources all the .itb files.
-# -----------------------------------------------------------------------------
-itcl::body DebugWin::_source_all {} {
- foreach f [glob [file join $::GDBTK_LIBRARY *.itb]] {
- source $f
- }
-}
-
-# -----------------------------------------------------------------------------
-# NAME: DebugWin::_clear
-#
-# SYNOPSIS: _clear
-#
-# DESC: Clears out the content of the debug window.
-# -----------------------------------------------------------------------------
-itcl::body DebugWin::_clear {} {
- $_t delete 1.0 end
-}
-
-# -----------------------------------------------------------------------------
-# NAME: DebugWin::_mark_old
-#
-# SYNOPSIS: _mark_old
-#
-# DESC: Changes the background of the current contents of the window.
-# -----------------------------------------------------------------------------
-itcl::body DebugWin::_mark_old {} {
- $_t tag add marked 1.0 "end - 1c"
-}
-
-# -----------------------------------------------------------------------------
-# NAME: DebugWin::_save_contents
-#
-# SYNOPSIS: _save_contents
-#
-# DESC: Changes the background of the current contents of the window.
-# -----------------------------------------------------------------------------
-itcl::body DebugWin::_save_contents {} {
- set file [tk_getSaveFile -title "Choose debug window dump file" \
- -parent [winfo toplevel $itk_interior]]
- if {$file == ""} {
- return
- }
-
- if {[catch {::open $file w} fileH]} {
- tk_messageBox -type ok -icon error -message \
- "Can't open file: \"$file\". \n\nThe error was:\n\n\"$fileH\""
- return
- }
- ::puts $fileH [$_t get 1.0 end]
-
-}
-
-###############################################################################
-# -----------------------------------------------------------------------------
-# NAME: DebugWinDOpts::constructor
-#
-# SYNOPSIS: constructor
-#
-# DESC: Creates the Debug Window Options Dialog.
-# -----------------------------------------------------------------------------
-itcl::body DebugWinDOpts::constructor {args} {
- window_name "Debug Window Options"
- build_win
- eval itk_initialize $args
-}
-
-###############################################################################
-# -----------------------------------------------------------------------------
-# NAME: DebugWinDOpts::destructor
-#
-# SYNOPSIS: Not called by hand
-#
-# DESC: Destroys the Debug Window Options Dialog.
-# -----------------------------------------------------------------------------
-itcl::body DebugWinDOpts::destructor {} {
-}
-
-
-# -----------------------------------------------------------------------------
-# NAME: DebugWinDOpts::build_win
-#
-# SYNOPSIS: build_win
-#
-# DESC: Creates the Debug Window Options Dialog. This dialog allows the
-# user to select which information is displayed in the debug
-# window and (eventually) how it looks.
-# -----------------------------------------------------------------------------
-itcl::body DebugWinDOpts::build_win {} {
- wm title [winfo toplevel $itk_interior] "Debug Display Options"
- # initialize here so we can resource this file and update the list
- set _classes {DebugWin RegWin SrcBar SrcWin ToolBar WatchWin EmbeddedWin \
- ManagedWin GDBWin StackWin SrcTextWin global \
- BpWin TargetSelection ModalDialog ProcessWin \
- GDBEventHandler MemWin VarTree}
- set _classes [concat [lsort $_classes] others]
-
- set f [frame $itk_interior.f]
- set btns [frame $itk_interior.buttons]
-
- iwidgets::Labeledframe $f.display -labelpos nw -labeltext {Classes}
- set fr [$f.display childsite]
- radiobutton $fr.0 -text "Messages from ALL classes EXCEPT those selected below" \
- -variable ::gdbtk_de(filter_var) -value ALL -command [code $this _all]
- radiobutton $fr.1 -text "Messages from ONLY those classes selected below" \
- -variable ::gdbtk_de(filter_var) -value ONLY -command [code $this _all]
- radiobutton $fr.2 -text "Only WARNINGS and ERRORS" \
- -variable ::gdbtk_de(filter_var) -value ERRORS -command [code $this _all]
-
- grid $fr.0 -sticky w -padx 5 -pady 5
- grid $fr.1 -sticky w -padx 5 -pady 5
- grid $fr.2 -sticky w -padx 5 -pady 5
-
- iwidgets::Labeledframe $f.classes
- set fr [$f.classes childsite]
-
- set i 0
- foreach cls $_classes {
- if {![info exists ::gdbtk_de($cls)]} {
- set ::gdbtk_de($cls) 0
- }
- checkbutton $fr.$i -text $cls -variable ::gdbtk_de($cls)
- incr i
- }
-
- set k [expr 3*(int($i/3))]
- set more [expr $i - $k]
- set j 0
- while {$j < $k} {
- grid $fr.$j $fr.[expr $j+1] $fr.[expr $j+2] -sticky w -padx 5 -pady 5
- incr j 3
- }
- switch $more {
- 1 { grid $fr.$j x x -sticky w -padx 5 -pady 5}
- 2 { grid $fr.$j $fr.[expr $j+1] x -sticky w -padx 5 -pady 5}
- }
-
- pack $f.display -side top -expand 1 -fill both
- pack $f.classes -side top -expand 1 -fill both
-
- button $btns.ok -text [gettext OK] -width 7 -command [code $this _apply 1] \
- -default active
- button $btns.apply -text "Apply to All" -width 7 \
- -command [code $this _apply 0]
- if {$::debug::logfile == "" || $::debug::logfile == "stdout"} {
- $btns.apply configure -state disabled
- }
- button $btns.help -text [gettext Help] -width 10 -command [code $this help] \
- -state disabled
- standard_button_box $btns
- bind $btns.ok <Return> "$btns.ok flash; $btns.ok invoke"
- bind $btns.apply <Return> "$btns.apply flash; $btns.apply invoke"
- bind $btns.help <Return> "$btns.help flash; $btns.help invoke"
-
- pack $btns $f -side bottom -expand 1 -fill both -anchor e
- focus $btns.ok
-}
-
-# -----------------------------------------------------------------------------
-# NAME: DebugWinDOpts::_all
-#
-# SYNOPSIS: _all
-#
-# DESC: Callback for selecting ALL classes. If the user selects ALL,
-# deselect all the individual class checkbuttons.
-# -----------------------------------------------------------------------------
-itcl::body DebugWinDOpts::_all {} {
- switch $::gdbtk_de(filter_var) {
- ALL {
- set ::gdbtk_de(ALL) 1
- set ::gdbtk_de(ERRORS_ONLY) 0
- #enable class buttons
- set num 0
- foreach class $_classes {
- [$itk_interior.f.classes childsite].$num configure -state normal
- incr num
- }
- }
- ONLY {
- set ::gdbtk_de(ALL) 0
- set ::gdbtk_de(ERRORS_ONLY) 0
- #enable class buttons
- set num 0
- foreach class $_classes {
- [$itk_interior.f.classes childsite].$num configure -state normal
- incr num
- }
- }
- ERRORS {
- set ::gdbtk_de(ALL) 0
- set ::gdbtk_de(ERRORS_ONLY) 1
- # disable class buttons
- set num 0
- foreach class $_classes {
- [$itk_interior.f.classes childsite].$num configure -state disabled
- incr num
- }
- }
- }
-}
-
-
-# -----------------------------------------------------------------------------
-# NAME: DebugWinDOpts::_apply
-#
-# SYNOPSIS: _apply
-#
-# DESC: Callback for the "Apply" button. Loads the contents of the
-# log file through the new filter into the debug window. The
-# button is disabled if there is no log file.
-# -----------------------------------------------------------------------------
-itcl::body DebugWinDOpts::_apply { done } {
- set dw [ManagedWin::find DebugWin]
- debug $dw
- if {$dw != ""} {
- $dw loadlog
- }
- if {$done} {
- delete object $this
- }
-}
diff --git a/gdb/gdbtk/library/debugwin.ith b/gdb/gdbtk/library/debugwin.ith
deleted file mode 100644
index b6a961d6c5b..00000000000
--- a/gdb/gdbtk/library/debugwin.ith
+++ /dev/null
@@ -1,93 +0,0 @@
-# Debug window class definition for GDBtk.
-# Copyright (C) 1998, 1999 Cygnus Solutions
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-# -----------------------------------------------------------------------------
-# NAME:
-# class DebugWin
-#
-# DESC:
-# This class implements a debug output window to display internal
-# debugging information. It can handle debugging messages, tracing,
-# and eventually profiling.
-#
-# NOTES:
-# This window is for developers.
-#
-# -----------------------------------------------------------------------------
-itcl::class DebugWin {
- inherit ManagedWin
-
- private {
- variable _t
- variable _colors {
- {I green}
- {W yellow}
- {E orange}
- {X red}
- }
- variable _bigstr " "
- method build_win {}
- method _source_all {}
- method _clear {}
- method _mark_old {}
- method _save_contents {}
- method reconfig {}
- }
-
- protected {
- method _ignore_on_save {} { return 1 }
- }
-
- public {
- method constructor {args}
- method destructor {}
- method puts {level cls func msg}
- method put_trace {enter level func ar}
- method loadlog {}
- }
-}
-
-# -----------------------------------------------------------------------------
-# NAME:
-# class DebugWinDOpts
-#
-# DESC:
-# This class implements a debug options dialog for the DebugWin.
-# Currently this consists os a selection dialog to choose which
-# messages to print. Eventually it could also include a filter
-# for different priorities and color selections.
-#
-# NOTES:
-# This window is for developers.
-#
-# -----------------------------------------------------------------------------
-itcl::class DebugWinDOpts {
- inherit ManagedWin
-
- public {
- method constructor {args} {}
- method destructor {}
- }
-
- protected {
- method _ignore_on_save { return 1 }
- }
-
- private {
- variable _classes
- method build_win {}
- method _all {}
- method _apply {done}
- }
-}
diff --git a/gdb/gdbtk/library/download.itb b/gdb/gdbtk/library/download.itb
deleted file mode 100644
index 29d9f464bcb..00000000000
--- a/gdb/gdbtk/library/download.itb
+++ /dev/null
@@ -1,304 +0,0 @@
-# Download class implementation for Insight.
-# Copyright (C) 1999, 2001 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-# ----------------------------------------------------------------------
-# Download window and associated procs
-#
-# ----------------------------------------------------------------------
-
-itcl::body Download::constructor {args} {
- global gdb_pretty_name
- debug $args
- eval itk_initialize $args
- window_name "Download Status" "Download"
- add_hook download_progress_hook "$this update_download"
-
- label $itk_interior.dload -text "Downloading $filename to $gdb_pretty_name"
-
- label $itk_interior.stat
- set f [frame $itk_interior.f]
-
- set i 0
- while {$i <$num_sections} {
- iwidgets::feedback $f.meter$i -steps $num_steps
- grid forget [$f.meter$i component percentage]
- label $f.sec$i -text [lindex $section(names) $i] -anchor w
- label $f.num$i -text $bytes($i) -anchor e
- grid $f.sec$i $f.meter$i $f.num$i -padx 4 -pady 4 -sticky news
- incr i
- }
- grid columnconfigure $f 1 -weight 1
-
- button $itk_interior.cancel -text Cancel -command "$this cancel" \
- -state active -width 10
-
- pack $itk_interior.dload -padx 5 -pady 5 -side top -fill x -expand yes
- pack $itk_interior.stat -padx 5 -pady 5 -expand yes
- pack $itk_interior.f -padx 5 -pady 5 -fill x -expand yes
-
- pack $itk_interior.cancel -padx 5 -pady 5 -side bottom
- ::update idletasks
-}
-
-# ------------------------------------------------------------------
-# METHOD: update_download - update the download meters
-# ------------------------------------------------------------------
-itcl::body Download::update_download { sec num tot } {
-
- # Loop through all the sections, marking each as either done or
- # updating its meter. This will mark all previous sections prior to
- # SEC as complete.
- foreach s $section(names) {
- set i $section($s)
-
- if {$s == $sec} {
- # Advance feedback meter. The iwidgets meter leaves a lot to
- # be desired. No way to query the current setting. No way to
- # set the state of the meter by percentage. It only understands
- # steps, and we must be careful not to step the widget past the
- # the configured number of steps, or else the meter will be
- # set wrong. How lame.
- set steps [expr {$num / $bytes($i) * $num_steps}]
- if {[expr {$completed_steps($s) + $steps}] > $num_steps} {
- set steps [expr {$num_steps - $completed_steps($s)}]
- }
- incr completed_steps($s) $steps
- $itk_interior.f.meter$i step $steps
- break
- } else {
- # Section already loaded. Make sure meter is at 100%.
- if {$completed_steps($s) < $num_steps} {
- set steps [expr {$num_steps - $completed_steps($s)}]
- set completed_steps($s) $num_steps
- $itk_interior.f.meter$i step $steps
- }
- }
- }
-
- ::update
-}
-
-# ------------------------------------------------------------------
-# METHOD: done - notification that the download is really complete
-# ------------------------------------------------------------------
-itcl::body Download::done { {msg ""} } {
- bell
-
- if {$msg == ""} {
- # download finished
- set secs [expr {[clock seconds] - $::download_start_time}]
- if {$secs == 0} { incr secs }
- $itk_interior.cancel config -state disabled
- set bps [expr {8 * $total_bytes / $secs / 1000}]
- $itk_interior.stat config -text "$total_bytes bytes in $secs seconds ($bps kbps)"
-
- # set all indicators to FULL
- foreach sec $section(names) {
- set i $section($sec)
- if {$completed_steps($sec) < $num_steps} {
- set steps [expr {$num_steps - $completed_steps($sec)}]
- set completed_steps($sec) $num_steps
- $itk_interior.f.meter$i step $steps
- }
- }
- } else {
- # download failed
- if {$msg != "CANCEL"} {
- $itk_interior.stat config -text $msg
- }
- }
-
- # enable OK button
- $itk_interior.cancel config -state active -text OK -command "delete object $this"
- ::update
-}
-
-# ------------------------------------------------------------------
-# METHOD: cancel - cancel the download
-# ------------------------------------------------------------------
-itcl::body Download::cancel {} {
- debug "canceling the download"
- set ::download_cancel_ok 1
-}
-
-# ------------------------------------------------------------------
-# DESTRUCTOR - destroy window containing widget
-# ------------------------------------------------------------------
-itcl::body Download::destructor {} {
- remove_hook download_progress_hook "$this update_download"
-}
-
-itcl::body Download::do_download_hooks {} {
- set ::download_timer(ok) 1
-}
-
-itcl::body Download::download_hash { section num } {
- global download_timer
- debug "sec=$section num=$num tot=$total_bytes ok=$::download_cancel_ok"
- ::update
- # Only run the timer at discrete times...
- if {[info exists download_timer(timer)]} {
- after cancel $download_timer(timer)
- }
-
- set download_timer(timer) [after 100 Download::do_download_hooks]
- if {![info exists download_timer(ok)] || $download_timer(ok)} {
- run_hooks download_progress_hook $section $num $total_bytes
- ::update
- unset download_timer(timer)
- set download_timer(ok) 0
- }
-
- return $::download_cancel_ok
-}
-
-# Download the executable. Return zero for success, and non-zero for error.
-itcl::body Download::download_it { } {
- global gdb_exe_name gdb_downloading gdb_loaded
- global gdb_target_name gdb_pretty_name
- global gdb_running
- global tcl_platform
-
- debug "exe=$gdb_exe_name downloading=$gdb_downloading"
- debug " loaded=$gdb_loaded target=$gdb_target_name running=$gdb_running"
-
- if {$gdb_downloading || $gdb_exe_name == ""} {
- return 0
- }
-
- set gdb_downloading 1
- set gdb_loaded 0
- # Make sure the source window has had time to be created
- ::update
-
- gdbtk_busy
-
- # Only places that load files should do set_exe
- #set_exe
- switch [set_target] {
- ERROR {
- # target command failed
- set gdb_downloading 0
- gdbtk_idle
- return 0
- }
- CANCELED {
- # command cancelled by user
- set gdb_downloading 0
- if {$gdb_running} {
- # Run the idle hooks (free the UI)
- gdbtk_update
- gdbtk_idle
- } else {
- gdbtk_idle
- }
- return 1
- }
- }
-
- if {[string compare $tcl_platform(platform) "windows"] == 0} {
- set f [ide_cygwin_path to_win32 $gdb_exe_name]
- } else {
- set f $gdb_exe_name
- }
- if {! [file exists $f]} {
- tk_messageBox -icon error -title GDB -type ok \
- -message "Request to download non-existent executable $gdb_exe_name"
- set gdb_downloading 0
- gdbtk_idle
- return 0
- }
-
- debug "downloading $gdb_exe_name"
-
- set target $gdb_target_name
-
- # get load info and total up number of bytes
- if {[catch {gdb_load_info $gdb_exe_name} val]} {
- set result "$gdb_exe_name: $val"
- tk_dialog .load_warn "" "$result" error 0 Ok
- return 0
- }
- set i 0
- set total_bytes 0
- set section(names) {}
- foreach x $val {
- set s [lindex $x 0]
- lappend section(names) $s
- set section($s) $i
- set b [lindex $x 1]
- set bytes($i) [expr {double($b)}]
- incr total_bytes $b
- set completed_steps($s) 0
- incr i
- }
- set num_sections $i
-
- set ::download_cancel_ok 0
- set ::download_start_time [clock seconds]
-
- if {[pref getd gdb/load/$target-verbose] == "1"} {
- # open a detailed download dialog window
- set download_dialog [ManagedWin::open Download -transient -filename $gdb_exe_name]
- } else {
- # raise source windows
- foreach src [ManagedWin::find SrcWin] {
- $src reveal
- $src toolbar downloading
- }
- set download_dialog ""
- }
-
- set download_error ""
- debug "starting load"
- ::update idletasks
- if {[catch {gdb_cmd "load $gdb_exe_name"} errTxt]} {
- debug "load returned $errTxt"
- if {[regexp -nocase cancel $errTxt]} {
- set download_error "CANCEL"
- } else {
- set download_error $errTxt
- }
- set ::download_cancel_ok 1
- }
-
- debug "Done loading"
-
- set gdb_downloading 0
- if {$::download_cancel_ok} {
- set gdb_loaded 0
- if {$download_dialog != ""} {
- catch {$download_dialog done $download_error}
- }
- } else {
- set gdb_loaded 1
- if {$download_dialog != ""} {
- catch {$download_dialog done}
- }
- }
-
- foreach src [ManagedWin::find SrcWin] {
- if {$download_error == "CANCEL"} {
- $src download_progress CANCEL 1 1
- } else {
- $src download_progress DONE 0 $total_bytes $download_error
- }
- }
-
- set ::download_cancel_ok 0
- set download_dialog ""
-
- gdbtk_idle
- return 0
-}
diff --git a/gdb/gdbtk/library/download.ith b/gdb/gdbtk/library/download.ith
deleted file mode 100644
index a7ac2ad0fc9..00000000000
--- a/gdb/gdbtk/library/download.ith
+++ /dev/null
@@ -1,45 +0,0 @@
-# Download class definition for Insight
-# Copyright (C) 1999, 2001 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-itcl::class Download {
- inherit ManagedWin
-
- protected {
- common total_bytes
- common section
- common bytes
- common num_sections
- common num_steps 100
-
- # completed steps in feedback meter (iwidget::feedback is lame)
- common completed_steps
-
- method _ignore_on_save {} { return 1 }
- proc dont_remember_size {} { return 1}
- }
- public {
- variable filename
-
- method constructor {args}
- method destructor {}
- method update_download { sec num tot }
- method done { {msg ""} }
- method cancel {}
-
- proc download_it { }
- proc do_download_hooks {}
- proc download_hash { section num }
-
- }
-}
diff --git a/gdb/gdbtk/library/editor.tcl b/gdb/gdbtk/library/editor.tcl
deleted file mode 100644
index 12d291e0527..00000000000
--- a/gdb/gdbtk/library/editor.tcl
+++ /dev/null
@@ -1,47 +0,0 @@
-# Editor
-# Copyright (C) 2001 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# ----------------------------------------------------------------------
-# Implements a set of editor commands
-# ----------------------------------------------------------------------
-
-namespace eval Editor {
- namespace export edit
-
- proc edit {loc_info} {
- global external_editor_command
-
- if {[info exists external_editor_command]} {
- if {[catch {uplevel \#0 "$external_editor_command edit $loc_info"} \
- err]} {
- tk_dialog .warn-sn "Edit" $err error 0 Ok
- }
- return
- }
-
- lassign $loc_info baseName fnName fileName lineNum addr pc
-
- set newCmd [pref get gdb/editor]
- if {! [string compare $newCmd ""]} {
- tk_dialog .warn "Edit" "No editor command specified" error 0 Ok
- }
-
- # Replace %s with file name and %d with line number.
- regsub -all -- %s $newCmd $fileName newCmd
- regsub -all -- %d $newCmd $lineNum newCmd
-
- if {[catch "exec $newCmd &" err]} {
- tk_dialog .warn "Edit" $err error 0 Ok
- }
- }
-}
diff --git a/gdb/gdbtk/library/ehandler.itb b/gdb/gdbtk/library/ehandler.itb
deleted file mode 100644
index ca3e370791b..00000000000
--- a/gdb/gdbtk/library/ehandler.itb
+++ /dev/null
@@ -1,31 +0,0 @@
-# GDBEventHandler class implementation for Insight.
-# Copyright (C) 2001 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# ------------------------------------------------------------
-# PUBLIC PROC: dispatch - Dispatch the given event to all
-# event handlers. The name of the handler
-# method to call is stored in the event's
-# "handler" method.
-# ------------------------------------------------------------
-itcl::body GDBEventHandler::dispatch {event} {
-
- set handler [$event handler]
-
- # invoke event handlers
- foreach w [itcl_info objects -isa GDBEventHandler] {
- dbug I "posting event \"$handler\" to \"$w\""
- if {[catch {$w $handler $event}]} {
- dbug E "On $handler event, $w errored:\n$::errorInfo"
- }
- }
-}
diff --git a/gdb/gdbtk/library/ehandler.ith b/gdb/gdbtk/library/ehandler.ith
deleted file mode 100644
index f66a1239ae1..00000000000
--- a/gdb/gdbtk/library/ehandler.ith
+++ /dev/null
@@ -1,48 +0,0 @@
-# GDBEventHandler class definition for Insight.
-# Copyright (C) 2001 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-itcl::class GDBEventHandler {
-
- constructor {args} {}
- destructor {}
-
- # Dispatching proc. ALL events should be funneled through this
- # procedure.
- public proc dispatch {event}
-
- #
- # Events
- #
-
- # See gdbevent.ith for descriptions of event
- public {
- # Breakpiont/tracepoint events
- method breakpoint {event} {}
- method tracepoint {event} {}
-
- # Set variable
- method set_variable {event} {}
-
- # Busy event
- method busy {event} {}
-
- # Idle event
- method idle {event} {}
-
- # Update event
- method update {event} {}
-
- # Architecture changed event
- method arch_changed {event} {}
- }
-}
diff --git a/gdb/gdbtk/library/embeddedwin.ith b/gdb/gdbtk/library/embeddedwin.ith
deleted file mode 100644
index 2cda6af6e08..00000000000
--- a/gdb/gdbtk/library/embeddedwin.ith
+++ /dev/null
@@ -1,25 +0,0 @@
-# EmbeddedWin class definition for GDBtk.
-# Copyright (C) 1998, 1999, 2001 Red Hat
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-itcl::class EmbeddedWin {
- inherit ManagedWin
-
- constructor {args} {
- debug "$args"
- }
-
- destructor {
- debug
- }
-}
diff --git a/gdb/gdbtk/library/gdbevent.itb b/gdb/gdbtk/library/gdbevent.itb
deleted file mode 100644
index 630f4604569..00000000000
--- a/gdb/gdbtk/library/gdbevent.itb
+++ /dev/null
@@ -1,205 +0,0 @@
-# GDB event class implementations for Insight.
-# Copyright (C) 2001 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# ------------------------------------------------------------
-# PUBLIC METHOD: get - Retrieve data about the event
-# ------------------------------------------------------------
-itcl::body BreakpointEvent::get {what} {
-
- switch $what {
- action { return $action }
- number { return $number }
- file { return $_file }
- function { return $_function }
- line { return $_line }
- address { return $_address }
- type { return $_type }
- enabled { return $_enabled }
- disposition { return $_disposition }
- ignore_count { return $_ignore_count }
- commands { return $_commands }
- condition { return $_condition }
- thread { return $_thread }
- hit_count { return $_hit_count }
- user_specification { return $_user_specification }
-
- default { error "unknown event data \"$what\": should be: action|number|file|function|line|address|type|enabled|disposition|ignore_count|commands|condition|thread|hit_count|user_specification" }
- }
-}
-
-# ------------------------------------------------------------
-# PRIVATE METHOD: _init - Initialize all private data
-# ------------------------------------------------------------
-itcl::body BreakpointEvent::_init {} {
- if {[catch {gdb_get_breakpoint_info $number} bpinfo]} {
- set _file {}
- set _function {}
- set _line {}
- set _address {}
- set _type {}
- set _enabled {}
- set _disposition {}
- set _ignore_count {}
- set _commands {}
- set _condition {}
- set _thread {}
- set _hit_count {}
- set _user_specification {}
- } else {
- lassign $bpinfo \
- _file \
- _function \
- _line \
- _address \
- _type \
- _enabled \
- _disposition \
- _ignore_count \
- _commands \
- _condition \
- _thread \
- _hit_count \
- _user_specification
- }
-}
-
-# When the breakpoint number for the event changes,
-# update the private data in the event.
-itcl::configbody BreakpointEvent::number {
- _init
-}
-
-# ------------------------------------------------------------
-# PUBLIC METHOD: get - Retrieve data about the event
-# ------------------------------------------------------------
-itcl::body TracepointEvent::get {what} {
-
- switch $what {
- action { return $action }
- number { return $number }
- file { return $_file }
- function { return $_function }
- line { return $_line }
- address { return $_address }
- enabled { return $_enabled }
- pass_count { return $_pass_count }
- step_count { return $_step_count }
- thread { return $_thread }
- hit_count { return $_hit_count }
- actions { return $_actions }
-
- default { error "unknown event data \"$what\": should be: action|number|file|function|line|address|pass_count|step_count|thread|hit_count|actions" }
- }
-}
-
-# ------------------------------------------------------------
-# PRIVATE METHOD: _init - Initialize all private data
-# ------------------------------------------------------------
-itcl::body TracepointEvent::_init {} {
- if {[catch {gdb_get_tracepoint_info $number} tpinfo]} {
- set _file {}
- set _function {}
- set _line {}
- set _address {}
- set _enabled {}
- set _pass_count {}
- set _step_count {}
- set _thread {}
- set _hit_count {}
- set _actions {}
- } else {
- lassign $tpinfo \
- _file \
- _function \
- _line \
- _address \
- _enabled \
- _pass_count \
- _step_count \
- _thread \
- _hit_count \
- _actions
- }
-}
-
-# When the tracepoint number for the event changes,
-# update the private data in the event.
-itcl::configbody TracepointEvent::number {
- _init
-}
-
-# ------------------------------------------------------------
-# PUBLIC METHOD: get - Retrieve data about the event
-# ------------------------------------------------------------
-itcl::body TracepointEvent::get {what} {
-
- switch $what {
- action { return $action }
- number { return $number }
- file { return $_file }
- function { return $_function }
- line { return $_line }
- address { return $_address }
- enabled { return $_enabled }
- pass_count { return $_pass_count }
- step_count { return $_step_count }
- thread { return $_thread }
- hit_count { return $_hit_count }
- actions { return $_actions }
-
- default { error "unknown event data \"$what\": should be: action|number|file|function|line|address|pass_count|step_count|thread|hit_count|actions" }
- }
-}
-
-# ------------------------------------------------------------
-# PUBLIC METHOD: get - Retrieve data about the event
-# ------------------------------------------------------------
-itcl::body SetVariableEvent::get {what} {
-
- switch $what {
- variable { return $variable }
- value { return $value }
-
- default { error "unknown event data \"$what\": should be: variable|value" }
- }
-}
-
-# ------------------------------------------------------------
-# CONSTRUCTOR: Create an UpdateEvent
-# ------------------------------------------------------------
-itcl::body UpdateEvent::constructor {args} {
- if {[catch {gdb_loc} loc]} {
- dbug E "could not get current location: $loc"
- } else {
- lassign $loc _compile_filename _function _full_filename \
- _line _frame_pc _pc _shlib
- }
-}
-
-# ------------------------------------------------------------
-# PUBLIC METHOD: get - Retrieve data about the event
-# ------------------------------------------------------------
-itcl::body UpdateEvent::get {what} {
-
- switch $what {
- compile_filename { return $_compile_filename }
- full_filename { return $_full_filename }
- function { return $_function }
- line { return $_line }
- frame_pc { return $_frame_pc }
- pc { return $_pc }
- shlib { return $_shlib }
-
- default { error "unknown event data \"$what\": should be: variable|value" }
- }
-}
diff --git a/gdb/gdbtk/library/gdbevent.ith b/gdb/gdbtk/library/gdbevent.ith
deleted file mode 100644
index 2d1e16a4124..00000000000
--- a/gdb/gdbtk/library/gdbevent.ith
+++ /dev/null
@@ -1,220 +0,0 @@
-# GDBEvent class definitions for Insight.
-# Copyright (C) 2001 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# For reasons unknown to me, I cannot put any of the constructors
-# in the implementation files. The very first instance of the class
-# will call the (empty) constructor in here instead of the one
-# defined in the implementation file. Sigh.
-
-itcl::class GDBEvent {
- public method get {what} { return "" }
- public method handler {} { return "unknown" }
-}
-
-# BREAKPOINT EVENT
-#
-# This event is created/dispatched whenever a breakpoint is created,
-# deleted, or modified.
-#
-# action ....... what type of BP event ("create", "delete", "modify")
-# number ....... gdb's internal token for the BP
-# file ......... filename in which event occurred
-# function ..... function in which event occurred
-# line ......... line number in file
-# address ...... address of BP
-# type ......... breakpoint type ("breakpoint", "hw breakpoint", "step resume", etc)
-# enabled ...... BP enabled?
-# disposition .. BP's disposition ("delete", "delstop", "disable", "donttouch")
-# ignore_count . BP's ignore count
-# commands ..... list of commands to run when BP hit
-# condition .... BP condition
-# thread ....... thread in which BP is set (or -1 for all threads)
-# hit_count .... number of times BP has been hit
-# user_specification
-# .. text the user initially used to set this breakpoint
-itcl::class BreakpointEvent {
- inherit GDBEvent
-
- public variable action {}
- public variable number {}
-
- #constructor {args} {}
- constructor {args} {
- eval configure $args
-
- # If creating/modifying a breakpoint, then get
- # all info about it and save it away.
- _init
- }
- #destructor { dbug I "" }
-
- public method get {what}
- public method handler {} { return "breakpoint" }
-
- private variable _file {}
- private variable _function {}
- private variable _line {}
- private variable _address {}
- private variable _type {}
- private variable _enabled {}
- private variable _disposition {}
- private variable _ignore_count {}
- private variable _commands {}
- private variable _condition {}
- private variable _thread {}
- private variable _hit_count {}
- private variable _user_specification {}
-
- private method _init {}
-}
-
-# TRACEPOINT EVENT
-#
-# This event is created/dispatched whenever a tracepoint is created,
-# deleted, or modified.
-#
-# action ....... what type of BP event ("create", "delete", "modify")
-# number ....... gdb's internal token for the BP
-# file ......... filename in which event occurred
-# function ..... function in which event occurred
-# line ......... line number in file
-# address ...... address of BP
-# enabled ...... BP enabled?
-# pass_count ...
-# step_count ...
-# thread ....... thread in which BP is set (or -1 for all threads)
-# hit_count .... number of times BP has been hit
-# actions ...... a list of actions to be performed when the tracepoint is hit
-itcl::class TracepointEvent {
- inherit GDBEvent
-
- public variable action {}
- public variable number {}
-
- # For reasons unknown to me, I cannot put this in the implementation
- # file. The very first instance of the class will call this empty
- # constructor instead of the one defined in the implementation file.
- #constructor {args} {}
- constructor {args} {
- eval configure $args
-
- # If creating/modifying a tracepoint, then get
- # all info about it and save it away.
- _init
- }
- #destructor { dbug I "" }
- public method get {what}
- public method handler {} { return "tracepoint" }
-
- private variable _file {}
- private variable _function {}
- private variable _line {}
- private variable _address {}
- private variable _enabled {}
- private variable _pass_count {}
- private variable _step_count {}
- private variable _thread {}
- private variable _hit_count {}
- private variable _actions {}
-
- private method _init {}
-}
-
-# SET VARIABLE EVENT
-#
-# This event is created/dispatched whenever a "set" command successfully
-# completes in gdb's command interpreter.
-#
-# variable ..... the variable that was changed
-# value ........ the variable's new value
-itcl::class SetVariableEvent {
- inherit GDBEvent
-
- public variable variable
- public variable value
-
- constructor {args} {
- eval configure $args
- }
- #destructor { dbug I "" }
- public method get {what}
- public method handler {} { return "set_variable" }
-}
-
-# BUSY EVENT
-#
-# This event is created/dispatched whenever the GUI or GDB is "busy".
-# This could happen when the inferior is executing or when the GUI
-# is, for example, fetching memory from the target.
-
-itcl::class BusyEvent {
- inherit GDBEvent
-
- public method handler {} { return "busy" }
-}
-
-# IDLE EVENT
-#
-# This event is created/dispatched whenever the GUI and GDB is not
-# "busy". Receipt of this event means that the GUI should be put into
-# a state to accept input by the user.
-
-itcl::class IdleEvent {
- inherit GDBEvent
-
- public method handler {} { return "idle" }
-}
-
-# UPDATE EVENT
-#
-# This event is created/dispatched whenever the target's state
-# has changed. When an UpdateEvent is received, widgets should
-# update their contents to reflect the inferior's new state.
-#
-# Right now, this just holds the output of gdb_loc...
-#
-# compile_filename - Filename stored in the symtab
-# full_filename - Full filename of file, if found in source search dir
-# function - Function name
-# line - Line number
-# frame_pc - Frame's PC
-# pc - Real stop PC
-# shlib - Shared library stopped in
-#
-# FIXME: Should probably put frame_pc and pc into different
-# types of update events...
-itcl::class UpdateEvent {
- inherit GDBEvent
-
- constructor {args} {}
- public method get {what}
- public method handler {} { return "update" }
-
- private variable _compile_filename {}
- private variable _function {}
- private variable _full_filename {}
- private variable _line {}
- private variable _frame_pc {}
- private variable _pc {}
- private variable _shlib {}
-}
-
-# ARCHITECTURE CHANGED EVENT
-#
-# This event is posted whenever the target architecture changes
-
-itcl::class ArchChangedEvent {
- inherit GDBEvent
-
- public method handler {} { return "arch_changed" }
-}
diff --git a/gdb/gdbtk/library/gdbmenubar.itcl b/gdb/gdbtk/library/gdbmenubar.itcl
deleted file mode 100644
index cdeecff29e5..00000000000
--- a/gdb/gdbtk/library/gdbmenubar.itcl
+++ /dev/null
@@ -1,332 +0,0 @@
-# GDBMenuBar
-# Copyright (C) 2000, 2004 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# ----------------------------------------------------------------------
-# Implements a GDB menubar.
-#
-# PUBLIC ATTRIBUTES:
-#
-#
-# METHODS:
-#
-# configure ....... used to change public attributes
-#
-# PRIVATE METHODS
-#
-# X11 OPTION DATABASE ATTRIBUTES
-#
-#
-# ----------------------------------------------------------------------
-
-itcl::class GDBMenuBar {
- inherit itk::Widget
-
- # ------------------------------------------------------------------
- # CONSTRUCTOR - create widget
- # ------------------------------------------------------------------
- constructor {args} {
-
- set Menu [menu $itk_interior.m -tearoff 0]
-
- eval itk_initialize $args
- }
-
- # ------------------------------------------------------------------
- # DESTRUCTOR - destroy window containing widget
- # ------------------------------------------------------------------
- destructor {
-
- #destroy $this
- }
-
- # ------------------------------------------------------------------
- # METHOD: show - attach menu to the toplevel window
- # ------------------------------------------------------------------
- public method show {} {
- [winfo toplevel $itk_interior] configure -menu $Menu
- }
-
- # ------------------------------------------------------------------
- # METHOD: set_class_state - standard method to control state by class
- # ------------------------------------------------------------------
- public method set_class_state {enable_list} {
- debug "Enable list is: $enable_list"
-
- foreach {type state} $enable_list {
- # debug $type
- if {[info exists menu_classes($type)]} {
- set class_list $menu_classes($type)
- if {[llength $class_list]} {
- # debug "$type $state \{$class_list\}"
- foreach menu $class_list {
- # debug "$type $menu $state"
- menubar_change_menu_state $menu $state
- }
- }
- }
- }
- }
-
- ####################################################################
- # Methods that deal with menus.
- #
- # The next set of methods control the menubar associated with the
- # toolbar. Currently, only sequential addition of submenu's and menu
- # entries is allowed. Here's what you do. First, create a submenu
- # with the "new_menu" command. This submenu is the targeted menu.
- # Subsequent calls to add_menu_separator, and add_menu_command add
- # separators and commands to the end of this submenu.
- # If you need to edit a submenu, call clear_menu and then add all the
- # items again.
- #
- # Each menu command also has a class list. Transitions between states
- # of gdb will enable and disable different classes of menus.
- #
- # FIXME - support insert_command, and also cascade menus, whenever
- # we need it...
- ####################################################################
-
- # ------------------------------------------------------------------
- # METHOD: add - Add something.
- # It can be a menubutton for the main menu,
- # a separator or a command.
- #
- # type - what we want to add
- # args - arguments appropriate to what is being added
- #
- # RETURNS: the cascade menu widget path.
- # ------------------------------------------------------------------
- method add {type args} {
-
- switch $type {
- menubutton {
- eval menubar_new_menu $args
- }
- command {
- eval menubar_add_menu_command $args
- }
- separator {
- menubar_add_menu_separator
- }
- cascade {
- eval menubar_add_cascade $args
- }
- default {
- error "Invalid item type: $type"
- }
- }
-
- return $current_menu
- }
-
- # ------------------------------------------------------------------
- # NAME: private method GDBMenuBar::menubar_add_cascade
- # DESCRIPTION: Create a new cascading menu in the current menu
- #
- # ARGUMENTS: menu_name - the name of the menu to be created
- # label - label to be displayed for the menu
- # underline - which element to underline for shortcuts
- # RETURNS: Nothing
- # ------------------------------------------------------------------
- private method menubar_add_cascade {menu_name class label underline} {
- set m [menu $current_menu.$menu_name -tearoff false]
- $current_menu add cascade -menu $m -label $label \
- -underline $underline
- incr item_number
- switch $class {
- None {}
- default {
- foreach elem $class {
- lappend menu_classes($elem) [list $current_menu $item_number]
- }
- }
- }
- set current_menu $m
- }
-
- # ------------------------------------------------------------------
- # PRIVATE METHOD: menubar_new_menu - Add a new menu to the main
- # menu.
- # Also target this menu for subsequent
- # menubar_add_menu_command calls.
- #
- # name - the token for the new menu
- # label - The label used for the label
- # underline - the index of the underlined character for this menu item.
- #
- # ------------------------------------------------------------------
- private method menubar_new_menu {name label underline args} {
-
- set current_menu $Menu.$name
- $Menu add cascade -menu $current_menu -label $label \
- -underline $underline
- eval menu $current_menu -tearoff 0 $args
-
- # Save the index number of this menu. It is always the last one.
- set menu_list($name) [$Menu index end]
- set menu_list($name,label) $label
- set item_number -1
- }
-
- # ------------------------------------------------------------------
- # PRIVATE METHOD: menubar_add_menu_command - Adds a menu command item
- # to the currently targeted submenu of the main menu.
- #
- # class - The class of the command, used for disabling entries.
- # label - The text for the command.
- # command - The command for the menu entry
- # args - Passed to the menu entry creation command (eval'ed)
- # ------------------------------------------------------------------
- private method menubar_add_menu_command {class label command args} {
-
- eval $current_menu add command -label \$label -command \$command \
- $args
-
- incr item_number
-
- switch $class {
- None {}
- default {
- foreach elem $class {
- lappend menu_classes($elem) [list $current_menu $item_number]
- }
- }
- }
- }
-
- # ------------------------------------------------------------------
- # PRIVATE METHOD: menubar_add_menu_separator - Adds a menu separator
- # to the currently targeted submenu of the main menu.
- #
- # ------------------------------------------------------------------
- private method menubar_add_menu_separator {} {
- incr item_number
- $current_menu add separator
- }
-
- # ------------------------------------------------------------------
- # METHOD: exists - Report whether a menu keyed by NAME exists.
- #
- # name - the token for the menu sought
- #
- # RETURNS: 1 if the menu exists, 0 otherwise.
- # ------------------------------------------------------------------
- method exists {name} {
- return [info exists menu_list($name)]
-
- }
-
- # ------------------------------------------------------------------
- # METHOD: clear - Deletes the items from one of the
- # main menu cascade menus. Also makes this menu
- # the target menu.
- #
- # name - the token for the new menu
- #
- # RETURNS: then item number of the menu, or "" if the menu is not found.
- #
- # FIXME: Does not remove the deleted menus from their class lists.
- # ------------------------------------------------------------------
- method clear {name} {
- if {[info exists menu_list($name)]} {
- set current_menu [$Menu entrycget $menu_list($name) -menu]
- $current_menu delete 0 end
- set item_number -1
- return $current_menu
- } else {
- return ""
- }
- }
-
- # ------------------------------------------------------------------
- # METHOD: delete - Deletes one of the main menu
- # cascade menus. Also makes the previous menu the
- # target menu.
- #
- # name - the token for the new menu
- #
- # RETURNS: then item number of the menu, or "" if the menu is not found.
- #
- # FIXME: Does not remove the deleted menus from their class lists.
- # ------------------------------------------------------------------
- method delete {name} {
- if {[info exists menu_list($name)]} {
- $Menu delete $menu_list($name,label)
- set current_menu {}
- unset menu_list($name,label)
- unset menu_list($name)
- }
- }
-
- # ------------------------------------------------------------------
- # PRIVATE METHOD: menubar_change_menu_state - Does the actual job of
- # enabling menus...
- #
- # INPUT: Pass normal or disabled for the state.
- # ------------------------------------------------------------------
- private method menubar_change_menu_state {menu state} {
-
- [lindex $menu 0] entryconfigure [lindex $menu 1] -state $state
- }
-
- # ------------------------------------------------------------------
- # METHOD: menubar_set_current_menu - Change the current_menu pointer.
- # Returns the current value so it can be restored.
- # ------------------------------------------------------------------
- method menubar_set_current_menu {menup} {
- set saved_menu $current_menu
- set current_menu $menup
- return $saved_menu
- }
-
- # ------------------------------------------------------------------
- # METHOD: menubar_get_current_menu - Get the current_menu pointer.
- # Returns the current value so it can be restored.
- # ------------------------------------------------------------------
- method menubar_get_current_menu {} {
- return $current_menu
- }
-
- ####################################################################
- #
- # PRIVATE DATA
- #
- ####################################################################
-
- # This array holds the menu classes. The key is the class name,
- # and the value is the list of menus belonging to this class.
- private variable menu_classes
-
- # This array holds the pathname that corresponds to a menu name
- private variable menu_list
-
- private variable item_number -1
- private variable current_menu {}
-
- ####################################################################
- #
- # PROTECTED DATA
- #
- ####################################################################
-
- # The menu Tk widget
- protected variable Menu
-
- ####################################################################
- #
- # PUBLIC DATA
- #
- ####################################################################
-
- # None
-}
diff --git a/gdb/gdbtk/library/gdbtoolbar.itcl b/gdb/gdbtk/library/gdbtoolbar.itcl
deleted file mode 100644
index 1e164b82b1c..00000000000
--- a/gdb/gdbtk/library/gdbtoolbar.itcl
+++ /dev/null
@@ -1,396 +0,0 @@
-# GDBToolBar
-# Copyright (C) 2000 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# ----------------------------------------------------------------------
-# Implements a toolbar.
-#
-# PUBLIC ATTRIBUTES:
-#
-#
-# METHODS:
-#
-# configure ....... used to change public attributes
-#
-# PRIVATE METHODS
-#
-# X11 OPTION DATABASE ATTRIBUTES
-#
-#
-# ----------------------------------------------------------------------
-
-itcl::class GDBToolBar {
- inherit itk::Widget
-
- # ------------------------------------------------------------------
- # CONSTRUCTOR - create widget
- # ------------------------------------------------------------------
- constructor {args} {
-
- # Make a subframe so that the menu can't accidentally conflict
- # with a name created by some subclass.
- set ButtonFrame [frame $itk_interior.t]
-
- pack $ButtonFrame $itk_interior -fill both -expand true
-
- eval itk_initialize $args
- }
-
- # ------------------------------------------------------------------
- # DESTRUCTOR - destroy window containing widget
- # ------------------------------------------------------------------
- destructor {
-
- #destroy $this
- }
-
- # ------------------------------------------------------------------
- # METHOD: show - show the toolbar
- # ------------------------------------------------------------------
- public method show {} {
-
- if {[llength $button_list]} {
- eval standard_toolbar $ButtonFrame $button_list
- }
- }
-
- # ------------------------------------------------------------------
- # METHOD: set_class_state - standard method to control state by class
- # ------------------------------------------------------------------
- public method set_class_state {enable_list} {
- debug "Enable list is: $enable_list"
-
- foreach {type state} $enable_list {
- # debug $type
- if {[info exists button_classes($type)]} {
- set class_list $button_classes($type)
- if {[llength $class_list]} {
- # debug "$type $state \{$class_list\}"
- foreach button $class_list {
- # debug "$type $button $state"
- itemconfigure $button -state $state
- }
- }
- }
- }
- }
-
- ####################################################################
- # Methods that deal with buttons.
- ####################################################################
-
- # ------------------------------------------------------------------
- # METHOD: add - Add something.
- # It can be a button a separator or a label.
- #
- # type - what we want to add
- # args - arguments appropriate to what is being added
- #
- # ------------------------------------------------------------------
- method add {type args} {
-
- switch $type {
- button {
- eval toolbar_add_button $args
- }
- label {
- eval toolbar_add_label $args
- }
- separator {
- toolbar_add_button_separator
- }
- custom {
- eval toolbar_add_custom $args
- }
- default {
- error "Invalid item type: $type"
- }
- }
- }
-
- # ------------------------------------------------------------------
- # PRIVATE METHOD: toolbar_add_button - Creates a button, and inserts
- # it at the end of the button list. Call this when
- # the toolbar is being set up, but has not yet been
- # made.
- # ------------------------------------------------------------------
- private method toolbar_add_button {name class command balloon args} {
-
- lappend button_list \
- [eval _register_button 1 \$name \$class \$command \$balloon $args]
-
- }
-
- # ------------------------------------------------------------------
- # PRIVATE METHOD: toolbar_add_label - Create a label to be inserted
- # in the toolbar.
- # ------------------------------------------------------------------
-
- private method toolbar_add_label {name text balloon args} {
- set lname $ButtonFrame.$name
- set Buttons($name) $lname
- set Buttons($lname,align) $button_align
- eval label $lname -text \$text $args
- balloon register $lname $balloon
- lappend button_list $lname
- }
-
- # ------------------------------------------------------------------
- # PRIVATE METHOD: toolbar_add_custom - Create a user defined widget
- # to be inserted in the toolbar.
- # ------------------------------------------------------------------
-
- private method toolbar_add_custom {name createCmd balloon args} {
- set wname $ButtonFrame.$name
- set Buttons($name) $wname
- set Buttons($wname,align) $button_align
-
- eval $createCmd $wname $args
- balloon register $wname $balloon
-
- lappend button_list $wname
- }
-
- # ------------------------------------------------------------------
- # PRIVATE METHOD: toolbar_add_button_separator -
- # ------------------------------------------------------------------
-
- private method toolbar_add_button_separator {} {
- lappend button_list -
- }
-
- # ------------------------------------------------------------------
- # PRIVATE METHOD: _register_button - Creates all the bookkeeping
- # for a button, without actually inserting it in the toolbar.
- # If the button will not be immediately inserted (INS == 0),
- # sets its bindings and appearences to the same of a
- # standard_toolbar button.
- # ------------------------------------------------------------------
- private method _register_button {ins name class command balloon args} {
- set bname $ButtonFrame.$name
- set Buttons($name) $bname
- set Buttons($bname,align) $button_align
-
- eval button $bname -command \$command $args
- balloon register $bname $balloon
- foreach elem $class {
- switch $elem {
- None {}
- default {
- lappend button_classes($elem) $name
- }
- }
- }
-
- # If the button is not going to be inserted now...
- if {! $ins} {
- # This is a bit of a hack, but I need to bind the standard_toolbar bindings
- # and appearances to these externally, since I am not inserting them in
- # the original toolbar...
- # FIXME: Have to add a method to the libgui toolbar to do this.
-
- # Make sure the button acts the way we want, not the default Tk way.
- $bname configure -takefocus 0 -highlightthickness 0 \
- -relief flat -borderwidth 1
- set index [lsearch -exact [bindtags $bname] Button]
- bindtags $bname [lreplace [bindtags $bname] $index $index ToolbarButton]
- }
-
- return $bname
- }
-
- # ------------------------------------------------------------------
- # METHOD: create - Creates all the bookkeeping for a button,
- # without actually inserting it in the toolbar.
- # ------------------------------------------------------------------
- method create {name class command balloon args} {
-
- return [eval _register_button 0 \$name \$class \$command \$balloon $args]
- }
-
- # ------------------------------------------------------------------
- # METHOD: itemconfigure -
- # ------------------------------------------------------------------
-
- method itemconfigure {button args} {
- eval $Buttons($button) configure $args
- }
-
- # ------------------------------------------------------------------
- # METHOD: itembind -
- # ------------------------------------------------------------------
-
- method itembind {button key cmd} {
- eval [list bind $Buttons($button) $key $cmd]
- }
-
- # ------------------------------------------------------------------
- # METHOD: itemballoon -
- # ------------------------------------------------------------------
-
- method itemballoon {button text} {
- eval [list balloon register $Buttons($button) $text]
- }
-
- # ------------------------------------------------------------------
- # PRIVATE METHOD: toolbar_insert_button - Inserts button "name" before
- # button "before".
- # The toolbar must be made, and the buttons must have been
- # created before you run this.
- # ------------------------------------------------------------------
- private method toolbar_insert_button {name before} {
-
- if {[string first "-" $name] == 0} {
- set name [string range $name 1 end]
- set add_sep 1
- } else {
- set add_sep 0
- }
-
- if {![info exists Buttons($name)] || ![info exists Buttons($before)]} {
- error "toolbar_insert_buttons called with non-existant button"
- }
-
- set before_col [gridCGet $Buttons($before) -column]
- set before_row [gridCGet $Buttons($before) -row]
-
- set slaves [grid slaves $ButtonFrame]
-
- set incr [expr 1 + $add_sep]
- foreach slave $slaves {
- set slave_col [gridCGet $slave -column]
- if {$slave_col >= $before_col} {
- grid configure $slave -column [expr $slave_col + $incr]
- }
- }
- if {$add_sep} {
- grid $Buttons(-$name) -column $before_col -row $before_row
- }
-
- # Now grid our button. Have to put in the pady since this button
- # may not have been originally inserted by the libgui toolbar
- # proc.
-
- grid $Buttons($name) -column [expr $before_col + $add_sep] \
- -row $before_row -pady 2
-
- }
-
- # ------------------------------------------------------------------
- # PRIVATE METHOD: toolbar_remove_button -
- # ------------------------------------------------------------------
-
- private method toolbar_remove_button {name} {
-
- if {[string first "-" $name] == 0} {
- set name [string range $name 1 end]
- set remove_sep 1
- } else {
- set remove_sep 0
- }
-
- if {![info exists Buttons($name)] } {
- error "toolbar_remove_buttons called with non-existant button $name"
- }
-
- set name_col [gridCGet $Buttons($name) -column]
- set name_row [gridCGet $Buttons($name) -row]
-
- grid remove $Buttons($name)
- if {$remove_sep} {
- set Buttons(-$name) [grid slaves $ButtonFrame \
- -column [expr $name_col - 1] \
- -row $name_row]
- grid remove $Buttons(-$name)
- }
-
- set slaves [grid slaves $ButtonFrame -row $name_row]
- foreach slave $slaves {
- set slave_col [gridCGet $slave -column]
- if {($slave_col > $name_col)
- && ! ([info exists Buttons($slave,align)]
- && $Buttons($slave,align) == "right")} {
- grid configure $slave -column [expr $slave_col - 1 - $remove_sep]
- }
- }
- }
-
- # ------------------------------------------------------------------
- # METHOD: toolbar_button_right_justify -
- # ------------------------------------------------------------------
-
- method toolbar_button_right_justify {} {
- lappend button_list --
- set button_align "right"
- }
-
- # ------------------------------------------------------------------
- # METHOD: toolbar_swap_button_lists -
- # ------------------------------------------------------------------
-
- method toolbar_swap_button_lists {in_list out_list} {
- # Now swap out the buttons...
- set first_out [lindex $out_list 0]
- if {[info exists Buttons($first_out)] && [grid info $Buttons($first_out)] != ""} {
- foreach button $in_list {
- toolbar_insert_button $button $first_out
- }
- foreach button $out_list {
- toolbar_remove_button $button
- }
- } elseif {[info exists Buttons($first_out)]} {
- debug "Error in swap_button_list - $first_out not gridded..."
- } else {
- debug "Button $first_out is not in button list"
- }
- }
-
- ####################################################################
- #
- # PRIVATE DATA
- #
- ####################################################################
-
- # This is the list of buttons that are being built up
- #
- private variable button_list {}
-
- # This is an array of buttons names -> Tk Window names
- # and also of Tk Window names -> column position in grid
- private variable Buttons
-
- # This array holds the button classes. The key is the class name,
- # and the value is the list of buttons belonging to this class.
- private variable button_classes
-
- # Tell if we are inserting buttons left or right justified
- private variable button_align "left"
-
- #The frame to contain the buttons:
- private variable ButtonFrame
-
- ####################################################################
- #
- # PROTECTED DATA
- #
- ####################################################################
-
- # None.
-
- ####################################################################
- #
- # PUBLIC DATA
- #
- ####################################################################
-
- # None.
-}
diff --git a/gdb/gdbtk/library/gdbwin.ith b/gdb/gdbtk/library/gdbwin.ith
deleted file mode 100644
index 99895a09ab6..00000000000
--- a/gdb/gdbtk/library/gdbwin.ith
+++ /dev/null
@@ -1,25 +0,0 @@
-# GDBwin class definition for Insight.
-# Copyright (C) 1998, 1999, 2001 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-itcl::class GDBWin {
- inherit GDBEventHandler
-
- constructor {args} {
- debug "$args"
- }
-
- destructor {
- debug
- }
-}
diff --git a/gdb/gdbtk/library/globalpref.itb b/gdb/gdbtk/library/globalpref.itb
deleted file mode 100644
index c3b4e65b050..00000000000
--- a/gdb/gdbtk/library/globalpref.itb
+++ /dev/null
@@ -1,481 +0,0 @@
-# Global preference class implementation for Insight.
-# Copyright (C) 1997, 1998, 1999, 2002, 2003, 2004 Red Hat
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-# ----------------------------------------------------------------------
-# Implements Global preferences dialog
-#
-# ----------------------------------------------------------------------
-
-# ------------------------------------------------------------------
-# METHOD: _init - set up the tracing labels info
-# ------------------------------------------------------------------
-itcl::body GlobalPref::_init {} {
- if {$inited} {
- return
- }
-
- set inited 1
-
- array set tracing_labels {
- 0 "Tracing features disabled"
- 1 "Tracing features enabled"
- max_len 0
- }
-
- foreach elem [array names tracing_labels] {
- set len [string length $tracing_labels($elem)]
- set tracing_labels(max_len) \
- [expr $len > $tracing_labels(max_len) ? $len : $tracing_labels(max_len) ]
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: init_var - initialize preference variables
-# ------------------------------------------------------------------
-itcl::body GlobalPref::_init_var {} {
- set vlist {gdb/ImageDir gdb/console/wrap gdb/mode gdb/use_icons gdb/compat gdb/use_color_schemes}
-
- foreach var $vlist {
- set _saved($var) [pref get $var]
- set _new($var) $_saved($var)
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: constructor - create the Global Preferences object
-# ------------------------------------------------------------------
-itcl::body GlobalPref::constructor {args} {
- window_name "Global Preferences"
- _init
- _init_var
- _build_win
- eval itk_initialize $args
-}
-
-# ------------------------------------------------------------------
-# METHOD: destructor - destroy the Global Preferences object
-# ------------------------------------------------------------------
-itcl::body GlobalPref::destructor {} {
- foreach thunk $_fonts {
- font delete test-$thunk-font
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: _build_win - build the dialog
-# ------------------------------------------------------------------
-itcl::body GlobalPref::_build_win {} {
- global tcl_platform GDBTK_LIBRARY
- debug
- frame $itk_interior.f
- frame $itk_interior.x
- set frame $itk_interior.f
-
- # Icons
- frame $frame.icons
- label $frame.icons.lab -text "Icons "
- combobox::combobox $frame.icons.cb -editable 0 -maxheight 10\
- -command [code $this _change_icons] -bg $::Colors(textbg)
-
- # get list of icon directories
- set curdir [pwd]
- set _icondirlist ""
- cd $GDBTK_LIBRARY
- foreach foo [glob -- *] {
- if {[file isdirectory $foo] && [file exists [file join $foo "icons.txt"]]} {
- lappend _icondirlist $foo
- }
- }
-
- set width 14
- # load combobox
- foreach dir $_icondirlist {
- if {![string compare $dir $_saved(gdb/ImageDir)]} {
- set cdir 1
- } else {
- set cdir 0
- }
- set foo [file join $dir "icons.txt"]
- if {[catch {::open $foo r} fid]} {
- # failed
- dbug E "couldn't open $foo:$fid"
- if {$cdir} {$frame.icons.cb entryset "unknown icons"}
- $frame.icons.cb list insert end "unknown icons"
- } else {
- if {[gets $fid txt] >= 0} {
- if {$cdir} {$frame.icons.cb entryset $txt}
- if {[string length $txt] > $width} {set width [string length $txt]}
- $frame.icons.cb list insert end $txt
- } else {
- if {$cdir} {$frame.icons.cb entryset "unknown icons"}
- $frame.icons.cb list insert end "unknown icons"
- }
- close $fid
- }
- }
- $frame.icons.cb configure -width $width
- cd $curdir
-
- # searching for fixed font families take a long time
- # therefore, we cache the font names. The font cache
- # can be saved in the init file. A way should be provided
- # to rescan the font list, without deleting the entry from the
- # init file.
- set font_cache [pref get gdb/font_cache]
-
- # get list of fonts, removing some that typically
- # are not useful or cause tk problems
- set fam [lremove [font families] "open look glyph"]
- set fam [lremove $fam "open look cursor"]
- set fam [lremove $fam "song ti"]
- set fam [lremove $fam "clearlyu"]
- set fam [lremove $fam "clearlyu alternate glyphs"]
- set fam [lremove $fam "clearlyu arabic extra"]
- set fam [lremove $fam "clearlyu ligature"]
- set fam [lremove $fam "clearlyu pua"]
- set fam [lremove $fam "fangsong ti"]
- set fam [lremove $fam "newspaper"]
- set fam [lremove $fam "palatino linotype"]
- set fam [lsort $fam]
-
- if {$font_cache == ""} {
- if {$tcl_platform(platform) == "unix"} {
- toplevel .c
- wm title .c "Scanning for fonts"
- message .c.m -width 3i -text "Scanning system for fonts\n\nPlease wait..." \
- -relief flat -padx 30 -pady 30 \
- -bg [pref get gdb/global_prefs/message_bg] \
- -fg [pref get gdb/global_prefs/message_fg]
- ::update
- pack .c.m
- focus .c
- ::raise .c
- ::update
- }
-
- foreach fn $fam {
- if {[font metrics [list $fn] -fixed] == 1} {
- lappend font_cache $fn
- }
- }
- pref set gdb/font_cache $font_cache
- if {[winfo exists .c]} { destroy .c }
- }
-
- Labelledframe $frame.d -text "Fonts"
- set f [$frame.d get_frame]
-
- _make_font_item $f fixed "Fixed Font:" $font_cache
-
- if {$tcl_platform(platform) != "windows"} {
- # Cannot change the windows menu font ourselves
- _make_font_item $f menu "Menu Font:" $fam
- }
-
- _make_font_item $f default "Default Font:" $fam
- _make_font_item $f status "Status Bar Font:" $fam
-
-
- iwidgets::Labeledframe $frame.misc -labelpos nw -labeltext "Misc"
- set f [$frame.misc childsite]
-
- # This is the tracing preference
- set tracing_cb [pref get gdb/mode]
- if { ![info exists tracing_labels($tracing_cb)]} {
- dbug E "Got unknown mode value: $tracing_cb"
- set tracing_labels($tracing_cb) "Unknown gdb mode..."
- }
-
- checkbutton $f.tracing -variable [scope _new(gdb/mode)] \
- -text $tracing_labels($tracing_cb) \
- -command [code $this _toggle_tracing $f.tracing] \
- -width $tracing_labels(max_len) -anchor w
-
- # use_icons
- if {$tcl_platform(platform) == "unix"} {
- checkbutton $f.use_icons \
- -text "Use builtin image as icon." -variable [scope _new(gdb/use_icons)]
- }
-
- # console wrap
- checkbutton $f.consolewrap -text "Wrap text in console window" \
- -variable [scope _new(gdb/console/wrap)]
-
- # colored backgrounds
- checkbutton $f.use_cs -text "Enable Color Schemes" \
- -variable [scope _new(gdb/use_color_schemes)]
-
- grid $f.tracing -sticky w -padx 5 -pady 5
-
- if {$tcl_platform(platform) == "unix"} {
- grid $f.use_icons -sticky w -padx 5 -pady 5
- }
- grid $f.consolewrap -sticky w -padx 5 -pady 5
- grid $f.use_cs -sticky w -padx 5 -pady 5
-
- if {$tcl_platform(platform) == "unix"} {
- # Compatibility frame
- iwidgets::Labeledframe $frame.compat -labelpos nw -labeltext "OS Compatibility"
- set fc [$frame.compat childsite]
- radiobutton $fc.0 -text "GNOME" -value "GNOME" -variable [scope _new(gdb/compat)]
- radiobutton $fc.1 -text "KDE" -value "KDE" -variable [scope _new(gdb/compat)]
- radiobutton $fc.2 -text "default" -value "default" -variable [scope _new(gdb/compat)]
- grid $fc.0 -sticky w -padx 5 -pady 5
- grid $fc.1 -sticky w -padx 5 -pady 5
- grid $fc.2 -sticky w -padx 5 -pady 5
- grid [label $fc.warn -text "Restart required for all\nchanges to take effect"] -sticky w
- }
-
- # pack it all
- pack $frame.icons.lab $frame.icons.cb -side left
- grid $frame.icons x -sticky w -pady 10
- grid $frame.d -columnspan 2 -sticky w
- if {$tcl_platform(platform) == "unix"} {
- grid $frame.compat $frame.misc -sticky we
- } else {
- grid $frame.misc x -sticky we
- }
-
- # make buttons
- button $itk_interior.x.ok -text OK -underline 0 -width 7 -command [code $this _ok]
- button $itk_interior.x.apply -text Apply -width 7 -underline 0 -command [code $this _apply]
- button $itk_interior.x.cancel -text Cancel -width 7 -underline 0 -command [code $this _cancel]
- pack $itk_interior.x.ok $itk_interior.x.apply $itk_interior.x.cancel -side left
- standard_button_box $itk_interior.x
-
- pack $itk_interior.x -fill x -padx 5 -pady 5 -side bottom
- pack $itk_interior.f -fill both -expand yes -padx 5 -pady 5
-
- bind $itk_interior.x.ok <Return> \
- "$itk_interior.x.ok flash; $itk_interior.x.ok invoke"
- focus $itk_interior.x.ok
-
- # We don't want the window flashing around as we change the fonts...
-
- ::update idletasks
-
- _resize_font_item_height
- pack propagate $itk_interior.f 0
-
-}
-# ------------------------------------------------------------------
-# PRIVATE METHOD: _make_font_item
-# ------------------------------------------------------------------
-itcl::body GlobalPref::_make_font_item {f name label font_list} {
-
- # create ComboBox with font name
- lappend _fonts $name
-
- set _original($name,family) [font actual global/$name -family]
- set _original($name,size) [font actual global/$name -size]
- font create test-$name-font -family $_original($name,family) \
- -size $_original($name,size)
- label $f.${name}x -text $label
-
- combobox::combobox $f.${name}n -editable 0 -value $_original($name,family) \
- -command [code $this _change_font $name] -bg $::Colors(textbg)
-
- foreach a $font_list {
- $f.${name}n list insert end $a
- }
-
- itk_component add $name-size {
- iwidgets::spinint $f.${name}s -labeltext "Size:" -range {6 18} -step 1 \
- -fixed 2 -width 2 -textvariable [scope _size($name)] -wrap 0 \
- -increment [code $this _change_size up $name] \
- -decrement [code $this _change_size down $name] \
- -textbackground $::Colors(textbg)
- } {}
- label $f.${name}l -text ABCDEFabcdef0123456789 -font test-$name-font
- set _size($name) $_original($name,size)
-
- grid $f.${name}x $f.${name}n $f.${name}s $f.${name}l -sticky we -padx 5 -pady 5
- grid columnconfigure $f 3 -weight 1
-}
-
-# ------------------------------------------------------------------
-# PRIVATE METHOD: _resize_font_item_height
-# ------------------------------------------------------------------
-itcl::body GlobalPref::_resize_font_item_height {} {
- foreach font $_fonts {
- set master [$itk_interior.f.d get_frame]
- set row [gridCGet $master.${font}l -row]
- grid rowconfigure $master $row -minsize [lindex [grid bbox $master 0 $row 3 $row ] 3]
- }
-}
-
-# ------------------------------------------------------------------
-# PRIVATE METHOD: _change_icons
-# ------------------------------------------------------------------
-itcl::body GlobalPref::_change_icons {w args} {
- set index [$w curselection]
- if {$index != ""} {
- set _new(gdb/ImageDir) [lindex $_icondirlist $index]
- }
-}
-
-# ------------------------------------------------------------------
-# NAME: private method GlobalPref::_change_font
-# DESCRIPTION: Change the given font's family
-#
-# ARGUMENTS:
-# font - the font whose family is to be
-# changed
-# stupid - the comobox widget which changed
-# implementation - the new value of the combobox
-# RETURNS: Nothing
-#
-# NOTES: The combobox has a really non-standard callback
-# mechanism: it always adds two args to the callback.
-# ------------------------------------------------------------------
-itcl::body GlobalPref::_change_font {font stupid implementation} {
- font configure test-$font-font -family $implementation
-}
-
-# ------------------------------------------------------------------
-# NAME: private method GlobalPref::_change_size
-# DESCRIPTION: Change the given font's size
-#
-# ARGUMENTS:
-# direction - the direction of the change (up/down)
-# font - the font that is changing
-# RETURNS: Nothing
-#
-# NOTES: See comments for purpose of "direction". Sigh.
-# ------------------------------------------------------------------
-itcl::body GlobalPref::_change_size {direction font} {
-
- # Almost as stupid as the comobox, the iwidgets::spinint class
- # will not treat its -increment and -decrement commands
- # as command callbacks. Instead it OVERRIDES all behavior.
- # Thus, we need to call the stupid spinint's callback.
- $itk_component($font-size) $direction
- font configure test-$font-font -size $_size($font)
-}
-
-
-itcl::body GlobalPref::_toggle_tracing {win} {
- debug
- $win configure -text $tracing_labels($_new(gdb/mode))
-}
-
-# ------------------------------------------------------------------
-# METHOD: _ok - called to accept settings and close dialog
-# ------------------------------------------------------------------
-itcl::body GlobalPref::_ok {} {
- _apply 1
-}
-
-# ------------------------------------------------------------------
-# METHOD: _apply - apply current settings to the screen
-# ------------------------------------------------------------------
-itcl::body GlobalPref::_apply {{deleteMe 0}} {
- debug
- set changed_something 0
-
- # If you are not destroying the window, then make sure to
- # propagate the geometry info from the font frame, so that changing
- # the fonts IN the window don't cause some of the buttons to
- # get obscured...
-
- if {!$deleteMe} {
- pack propagate $itk_interior.f 1
- }
-
- foreach thunk $_fonts {
- set font [font configure test-$thunk-font]
- if {[pref get global/font/$thunk] != $font} {
- pref set global/font/$thunk $font
- }
- }
-
- foreach var [array names _new] {
- if {$_new($var) != [pref get $var]} {
- debug "$var = $_new($var)"
-
- if {$var == "gdb/mode"} {
- if {!$_new(gdb/mode)} { pref set gdb/B1_behavior 1 }
- } elseif {$var == "gdb/ImageDir"} {
- set ::gdb_ImageDir [file join $::GDBTK_LIBRARY $_new($var)]
- }
- pref set $var $_new($var)
- set changed_something 1
- }
- }
-
- if {$changed_something} {
- if {$deleteMe} { unpost }
- ManagedWin::restart
- return
- }
- if {$deleteMe} {
- unpost
- } else {
- after idle "
- update idletasks
- [code $this _resize_font_item_height]
- pack propagate $itk_interior.f 0
- "
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: _cancel - forget current settings -- reset to original
-# state and close preferences
-# ------------------------------------------------------------------
-itcl::body GlobalPref::_cancel {} {
- debug
- set changed_something 0
-
- # Reset fonts if different
- foreach thunk $_fonts {
- set family [font configure global/$thunk -family]
- set size [font configure global/$thunk -size]
- if {$_original($thunk,family) != $family || $_original($thunk,size) != $size} {
- pref set global/font/$thunk \
- [list -family $_original($thunk,family) -size $_original($thunk,size)]
- set changed_something 1
- }
- }
-
- foreach var [array names _saved] {
- if {$_saved($var) != [pref get $var]} {
- debug "$var = $_saved($var)"
-
- if {$var == "gdb/mode"} {
- if {!$_saved(gdb/mode)} { pref set gdb/B1_behavior 1 }
- } elseif {$var == "gdb/ImageDir"} {
- set ::gdb_ImageDir [file join $::GDBTK_LIBRARY $_saved($var)]
- }
- pref set $var $_saved($var)
- set changed_something 1
- }
- }
-
- if {$changed_something} {
- ManagedWin::restart
- }
- unpost
-}
-
-# ------------------------------------------------------------------
-# METHOD: cancel - override modal dialog cancel method.
-# The cancel method is actually called when
-# the window is closed. Name needs fixed.
-# ------------------------------------------------------------------
-itcl::body GlobalPref::cancel {} {
- # when the window is closed, we want the preferences selected to
- # be applied.
- _apply 1
-}
diff --git a/gdb/gdbtk/library/globalpref.ith b/gdb/gdbtk/library/globalpref.ith
deleted file mode 100644
index 2f89a70ce88..00000000000
--- a/gdb/gdbtk/library/globalpref.ith
+++ /dev/null
@@ -1,47 +0,0 @@
-# Global preference class definition for GDBtk.
-# Copyright (C) 1998, 1999 Cygnus Solutions
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-itcl::class GlobalPref {
- inherit ManagedWin ModalDialog
-
- private {
- variable _new
- variable _saved
- variable _icondirlist ""
- variable _original ;# Original font settings
- variable _size ;# Array tracking spinint values
- variable _fonts ;# List of all available fonts for editing
- common tracing_labels
- common inited 0
-
- method _init {}
- method _init_var {}
- method _build_win {}
- method _make_font_item {f name label font_list}
- method _resize_font_item_height {}
- method _change_icons {w args}
- method _change_font {font stupid implementation}
- method _change_size {direction font}
- method _ok {}
- method _apply {{deleteMe 0}}
- method _cancel {}
- method cancel {}
- method _toggle_tracing {win}
- }
-
- public {
- method constructor {args}
- method destructor {}
- }
-}
diff --git a/gdb/gdbtk/library/help/breakpoint.html b/gdb/gdbtk/library/help/breakpoint.html
deleted file mode 100644
index 443237a6970..00000000000
--- a/gdb/gdbtk/library/help/breakpoint.html
+++ /dev/null
@@ -1,107 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<HTML>
-<HEAD>
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
- <META NAME="GENERATOR" CONTENT="Mozilla/4.06 [en] (X11; I; Linux 2.0.35 i686) [Netscape]">
- <TITLE>Breakpoint Window Help</TITLE>
-</HEAD>
-<BODY>
-
-<H1>The Breakpoint Window</H1>
-The Breakpoint Window lists all the various breakpoints that exist in the
-program. It facilitates modifying breakpoints (make them temporary or normal,
-disabled or enabled) and removing breakpoints.
-<UL>
-<LI><A HREF="#menus_bp">Breakpoint Menu</A></LI>
-<LI><A HREF="#menus_global">Global Menu</A></LI>
-<LI><A HREF="#display">Breakpoint Display</A></LI>
-</UL>
-
-<HR SIZE=4 WIDTH="100%">
-
-<H2>
-<A NAME="menus_bp"></A>Breakpoint Menu</H2>
-The Breakpoint Menu operates on the selected breakpoint only.&nbsp; If
-no breakpoint is selected the menu items will be disabled. The type and
-state of a breakpoint may be changed by selecting the desired type or state
-from the menu.
-<DL>
-<DT>Normal</DT>
-<DD>The selected breakpoint is a normal breakpoint</DD>
-<DT>Temporary</DT>
-<DD>Indicates that the breakpoint is temporary</DD>
-<DT>Enabled</DT>
-<DD>The breakpoint is active and will stop the debugger when it is hit.</DD>
-<DT>Disabled</DT>
-<DD>The breakpoint is being ignored. A disabled breakpoint will never get hit.</DD>
-<DT>Remove</DT>
-<DD>Deletes the breakpoint</DD>
-</DL>
-
-<HR SIZE=4 WIDTH="100%">
-<H2>
-<A NAME="menus_global"></A>Global Menu</H2>
-Items on the Global Menu affect all defined breakpoints. Users may:
-<DL>
-<DT>Show Threads</DT>
-<DD>Toggle on/off the thread column</DD>
-<DT>Enable All</DT>
-<DD>Enable all breakpoints</DD>
-<DT>Disable All</DT>
-<DD>Disable all breakpoints</DD>
-<DT>Remove All</DT>
-<DD>Delete all breakpoints</DD>
-</DL>
-
-<HR SIZE=4 WIDTH="100%">
-
-<H2><A NAME="display"></A>Breakpoint Display</H2>
-The Breakpoint Display is a table of breakpoints. The first column of the
-table (unlabeled) shows a checkbutton, indicating whether the breakpoint
-is enabled (checked) or disabled (unchecked). Disabled breakpoints are
-ignored and will not cause the program to stop.
-<P>To use the Breakpoint Menu or the Breakpoint Pop-up Menu, first use
-the left mouse button to select a breakpoint from the list, then make the
-menu selection.
-
-<H4>Modifying Breakpoints</H4>
-To&nbsp;<A NAME="display_state"></A>enable a breakpoint, simply click the
-checkbutton in the first column of the desired breakpoint so that it is
-selected (checked). To disable a breakpoint, "uncheck" the checkbutton.
-<P>To change a breakpoint's&nbsp;<A NAME="display_temp"></A>type, select
-the desired type from either the Breakpoint Menu or the Breakpoint Pop-up
-Menu.
-<P>To remove a&nbsp;<A NAME="display_remove"></A>breakpoint, use the left
-mouse button to select the breakpoint to remove and use either the Breakpoint
-Menu or the Breakpoint Pop-up Menu to select "remove". To re-install a
-breakpoint, use the <A HREF="source.html#setting_a_breakpoint">Source Window
-Display</A>.
-
-<H4><A NAME="display_popup"></A>Breakpoint Pop-up Menu</H4>
-The Breakpoint Pop-up Menu is accessed by using the mouse cursor to select
-a breakpoint from the Breakpoint Display and then clicking the right button
-on the mouse. The Pop-up allows expert users quicker access to the functions
-of the Breakpoint Menu:
-<DL>
-<DT>Normal</DT>
-<DD>The selected breakpoint is a normal breakpoint</DD>
-<DT>Temporary</DT>
-<DD>Indicates that the breakpoint is temporary</DD>
-<DT>Enabled</DT>
-<DD>The breakpoint is active and will stop the debugger when it is hit.</DD>
-<DT>Disabled</DT>
-<DD>The breakpoint is being ignored. A disabled breakpoint will never get hit.</DD>
-<DT>Remove</DT>
-<DD>Deletes the breakpoint</DD>
-<DT>Global, Show Threads</DT>
-<DD>Toggle on/off the thread column</DD>
-<DT>Global, Enable All</DT>
-<DD>Enable all breakpoints</DD>
-<DT>Global, Disable All</DT>
-<DD>Disable all breakpoints</DD>
-<DT>Global, Remove All</DT>
-<DD>Delete all breakpoints</DD>
-</DL>
-
-</BODY>
-</HTML>
diff --git a/gdb/gdbtk/library/help/browser.html b/gdb/gdbtk/library/help/browser.html
deleted file mode 100644
index df9203beedc..00000000000
--- a/gdb/gdbtk/library/help/browser.html
+++ /dev/null
@@ -1,77 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>Function Browser Help</TITLE>
-</HEAD>
-<BODY>
-<H1>The Function Browser</H1>
-<img src="images/browser1.png" alt="layout1" width=164 height=171 align="right" border=0>
-<img src="images/browser2.png" alt="layout2" width=164 height=170 align="right" border=0>
-
-<h2>Overview</h2>
-<p>The Function Browser may be used to search for specific functions
-in the executable, allowing the user to easily browse through source
-code and set and clear breakpoints at anywhere in the executable
-with ease. Its powerful regular expression searches allow the user
-to easily set breakpoints on multiple functions at once.</p>
-<p>The Function Browser has two different layouts. Both layouts contain the same four sections;
-Files, Function Filter, Functions, and Source Display.</p>
-
-<h3>Files</h3>
-<p>The Files section displays a list of all the source files. The files are
-read from the debug information in the program being debugged. To see
-the list of functions in a file, click on it. The function list should appear
-in the Functions Display and the source should appear in the Source Display.
-You can select multiple files by using the Control or Shift keys while
-clicking the left mouse button. When multiple files are selected, all the functions in those files
-are displayed in the Functions Display.
-</p>
-<p>At the bottom of the Files Display, you should see a checkbutton labelled "Hide .h files"
-and a button labelled "Select All". Checking "Hide .h files" will remove all
-files ending in ".h" from the Files Display. Clicking "Select All" will select all files
-in the Files Display.</p>
-
-<h3>Function Filter</h3>
-<p>Above the Function Display you should see a section labelled "Function Filter".
-The purpose of this section is to apply a filter to the list of functions in the Functions Display.
-For example, if you click "Select All" in the Files Display, then many hundreds of functions
-could appear in the Functions Display. To see all functions containing the string "print", for example, click on the combobox in the Function Filter and select "contains".
-Then type "print" into the box to the right and hit the enter or return key. You should see the Function
-Display updated with a list of all functions containing "print".</p>
-
-<p>Insight remember what the last filter you used was and will always open the Function
-Browser window with the last filter settings.
-</p>
-
-<h3>Function Display</h3>
-<p>The Function Display contains the list of functions in the files that have been
-selected in the Files Display, after running them through any filter settings in the Filter Display.
-There are two buttons at the bottom of the display that allow you so set or delete breakpoints on every function
-in the Function Display in one operation.
-</p>
-<p>For example, to set a breakpoint of every function name containing "print", follow the example in the Function Filter section to
-get a list of all functions containing "print". Then simply click the "Set BP" button.</p>
-
-<h3>Source Display</h3>
-<p>The Source Display shows the source code for any file selected in the File Display. If a function
-is selected in the Function Display, the first line of that function containing
-executable code will be highlighted. If no source file is found, then the function will be
-displayed disassembled.</p>
-
-<p>At the bottom of the window are two comboboxes and a text field. The combobox on the far left
-contains the function name or file location to display. Normally this is just output for your information, however
-you can type the name of any function into this box to see its source.
-</p>
-<p>To the right of this is another combobox that allows you to toggle between source and assembly.
-</p>
-<p>To the far right is an empty field. You can type a string in it and hit enter to
-search the current source file for any string.</p>
-<p>In the source window itself, you can set breakpoints just like the source window.</p>
-<h3>Popup Menu</h3>
-<p>If you click the right mouse button while over the File Browser, you should get a simple menu
-with three options; <i>Toggle Layout</i>, <i>Help</i>, and <i>Close</i>. <i>Toggle Layout</i>
-switches you between the two different Browser Window layouts. Choose the one you like best;
-Insight will remember it between sessions. <i>Help</i> pops up this help window. <i>Close</i> closes the Function Browser.
-</p>
-
-</BODY>
-</HTML>
diff --git a/gdb/gdbtk/library/help/console.html b/gdb/gdbtk/library/help/console.html
deleted file mode 100644
index d0fdfba52e1..00000000000
--- a/gdb/gdbtk/library/help/console.html
+++ /dev/null
@@ -1,74 +0,0 @@
-<HTML>
- <HEAD>
- <TITLE>Console Window Help</TITLE>
- </HEAD>
- <BODY>
- <CENTER><H2>The Console Window</H2></CENTER>
-
- <P>The Console Window provides the traditional command-line interface to GDB.
- It is very similar to the command-line you get when GDB is run with "-nw".</P>
-
- <UL>
- <LI><A HREF="#display">Console Display</A></LI>
- <LI><A HREF="#editing">Editing Commands</A></LI>
- <LI><A HREF="#history">History Commands</A></LI>
- <LI><A HREF="#display_hlp">Getting Help</A></LI>
- </UL>
-
- <H4><A NAME="display">Console Display</A></H4>
- The Console Display is simply a scrolled window in which the debugger prompt
- appears. By default, the prompt is set to "(gdb) ", but it may be changed via a
- command line option.
-
- <P>To execute commands in the console window, simply enter
- the command in the display. If the debugger is busy, the message "Error: The
- debugger is busy." appears informing the user that the command was not accepted.</P>
-
- <P>Whenever a command is executed, the debugger's windows will update to display
- any new state information. Any output from the command is also echoed to the Console
- Window for ease of use. If an error occurs, an error message is printed to the Console
- Window. All error messages appear in the Console Window using a red typeface.
- </P>
-
- <BR>
-
- <H4><A NAME="editing">Editing Commands</A></H4>
- <P>The Console Window shell has many powerful features to help edit commands.</P>
- <UL>
- <LI> Return or Enter causes the command to be executed.
-
- <LI> Control-A moves the cursor to the beginning of the line.</LI>
- <LI> Control-E moves the cursor to the end of the line.</LI>
- <LI> Control-D or DELETE delete the character to the right of the cursor.</LI>
- <LI> BACKSPACE deletes the character to the left of the cursor.</LI>
- <LI> Control-B or LeftArrow moves the cursor to the left.</LI>
- <LI> Control-F or RightArrow moves the cursor to the right.</LI>
- <LI> Control-K deletes everything to the right of the cursor.</LI>
- <LI> Control-U deletes the text between the cursor and the start of the line.</LI>
- <LI> Control-W deletes the previous word</LI>
- <LI> END deletes the whole line.</LI>
- <LI> The mouse may also be used to position the cursor and cut and paste.</LI>
- </UL>
-
- <H4><A NAME="history">History Commands</A></H4>
- <UL>
- <LI> Conrol-P or UpArrow recalls the previous command.</LI>
- <LI> Conrol-N or DownArrow recalls the next command.</LI>
- <LI> Shift-UpArrow or Control-UpArrow will search through previous commands
- for commands that start with the same characters as the current line. For
- example, if you type "pr" and hit Shift-UpArrow, it may find commands in the
- history such as "print foo" or "print sol[x]". Each time you search it will
- go back further in the history. If nothing is on the current line, it
- acts just like Control-P or UpArrow.</LI>
- <LI> Shift-DownArrow or Control-DownArrow work in the opposite direction of
- Shift-UpArrow and Control-DownArrow. </LI>
- </UL>
-
- <BR>
-
- <H4><A NAME="display_hlp">Getting Help</A></H4>
- The Console Window has its own online help system. To access the help system, enter
- "help" at the prompt and follow the on-screen instructions. For more help, please
- consult the <!-- What is this really called? --> <I>GDB User's Guide</I>.
- </BODY>
-</HTML>
diff --git a/gdb/gdbtk/library/help/debug.html b/gdb/gdbtk/library/help/debug.html
deleted file mode 100644
index 528a868ff5f..00000000000
--- a/gdb/gdbtk/library/help/debug.html
+++ /dev/null
@@ -1,133 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>Internal Debugging Help</TITLE>
-</HEAD>
-<BODY>
-<H2>Insight Internal Debugging Functions</H2>
-<H3>Overview</H3>
-<P> This describes the basic internal functions for debugging Insight.
-This information is for Insight developers trying to debug Insight,
-not for users trying to debug other programs.</P>
-
-<H3>Environment Variables</H3>
-<P><b>GDBTK_DEBUG</b> - Setting this variable controls the Debug
-window.</P>
-<P><b>GDBTK_DEBUG</b> may have the following values:</P>
-<DL>
-<DT>0 or unset</DT>
-<DD>The Debug window is not opened and not listed on the menu. (You
-may still open it by typing Ctrl-U in the source window.)</DD>
-<DT>1</DT>
-<DD>The Debug window is listed on the menu, but not opened.</DD>
-<DT>2</DT>
-<DD>The Debug window is opened at startup.</DD>
-</DL>
-
-<HR>
-<P><b>GDBTK_TRACE</b> - This variable determines if tracing is enabled.
-Tracing may only be enabled at GDBTK startup. Changing <b>GDBTK_TRACE</b>
-while GDBTK is running has no effect.</P>
-<P><b>GDBTK_TRACE</b> may have the following values:</P>
-<DL>
-<DT>0 or unset</DT>
-<DD>Tracing is not enabled.</DD>
-<DT>1</DT>
-<DD>Tracing is enabled, but not started. To start tracing, you need to do
-so in the Debug Window or from the console. (The command to do this is "tk
-::debug::trace_start).</DD>
-<DT>2</DT>
-<DD>Tracing is enabled and started immediately.</DD>
-</DL>
-
-<P><b>GDBTK_DEBUGFILE</b> - This variable contains an optional filename
-where GDBTK will write all debugging information. This information will include
-the output of all "debug" and "dbug" commands, as well as tracing, if it is
-enabled. The value of
-<b>GDBTK_DEBUGFILE</b> will not change what is displayed in the Debug
-Window, with one exception; when the Debug Window is opened, it will read
-the contents of <b>GDBTK_DEBUGFILE</b> (if it is set and not "stdout").
-<P><b>GDBTK_DEBUGFILE</b> may have the following values:</P>
-<DL>
-<DT>unset</DT>
-<DD>No information will be logged.</DD>
-<DT><i>filename</i></DT>
-<DD>Debugging information will be logged to <i>filename</i>.
-<DT>"stdout"</DT>
-<DD>Debugging information will be written to stdout</DD>
-</DL>
-<HR>
-<H3>Tcl Debugging Functions</H3>
-<P> All debugging functions have been moved into debug.tcl in the ::debug
-namespace. "debug" and "dbug" are imported into the global namespace.</P>
-<P> The following are the standard debug message functions.</P>
-<pre>
-# -----------------------------------------------------------------------------
-# NAME: debug::debug
-#
-# SYNOPSIS: debug { {msg ""} }
-#
-# DESC: Writes a message to the proper output. The priority of the
-# message is assumed to be "I" (informational). This function
-# is provided for compatibility with the previous debug function.
-# For higher priority messages, use dbug.
-#
-# ARGS: msg - Message to be displayed.
-# -----------------------------------------------------------------------------
-
-# -----------------------------------------------------------------------------
-# NAME: debug::dbug
-#
-# SYNOPSIS: dbug { level msg }
-#
-# DESC: Writes a message to the proper output. Unlike debug, this
-# function take a priority level.
-#
-# ARGS: msg - Message to be displayed.
-# level - One of the following:
-# "I" - Informational only
-# "W" - Warning
-# "E" - Error
-# "X" - Fatal Error
-# ----------------------------------------------------------------------------
-</pre>
-<P> These next functions are used to trace variables, which should not be
-confused with the functions tracing.<P>
-<pre>
-# ----------------------------------------------------------------------------
-# NAME: debug::trace_var
-# SYNOPSIS: debug::trace_var {varName mode}
-# DESC: Sets up variable trace. When the trace is activated,
-# debugging messages will be displayed.
-# ARGS: varName - the variable name
-# mode - one of more of the following letters
-# r - read
-# w - write
-# u - unset
-# ----------------------------------------------------------------------------
-# ----------------------------------------------------------------------------
-# NAME: debug::remove_trace
-# SYNOPSIS: debug::remove_trace {var mode}
-# DESC: Removes a trace set up with "trace_var".
-# ----------------------------------------------------------------------------
-# ----------------------------------------------------------------------------
-# NAME: debug::remove_all_traces
-# SYNOPSIS: debug::remove_all_traces
-# DESC: Removes all traces set up with "trace_var".
-# ----------------------------------------------------------------------------
-</pre>
-<P> The following two functions may be used to start and stop tracing
-programmatically.</P>
-<pre>
-# -----------------------------------------------------------------------------
-# NAME: ::debug::trace_start
-# SYNOPSIS: ::debug::trace_start
-# DESC: Starts logging of function trace information.
-# -----------------------------------------------------------------------------
-# -----------------------------------------------------------------------------
-# NAME: ::debug::trace_stop
-# SYNOPSIS: ::debug::trace_stop
-# DESC: Stops logging of function trace information.
-# -----------------------------------------------------------------------------
-</pre>
-</BODY>
-</HTML>
diff --git a/gdb/gdbtk/library/help/gbl_pref.html b/gdb/gdbtk/library/help/gbl_pref.html
deleted file mode 100644
index 2760750c4e9..00000000000
--- a/gdb/gdbtk/library/help/gbl_pref.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>Global Preferences Help</TITLE>
-</HEAD>
-<BODY>
-<H1>Global Preferences</H1>
-<H3>Overview</H3>
-<P>Not yet done.</P>
-
-<P>Global Preferences topics:
-<UL>
- <LI><UL><A HREF="#">stuff</A>
- <LI><A HREF="#">stuff</A>
- <LI><A HREF="#">stuff</A>
- </UL>
-</UL></P>
-
-<H3><A NAME="">stuff</A></H3>
-</BODY>
-</HTML>
diff --git a/gdb/gdbtk/library/help/help.html b/gdb/gdbtk/library/help/help.html
deleted file mode 100644
index 7cf93c3cedd..00000000000
--- a/gdb/gdbtk/library/help/help.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>Help Window Help</TITLE>
-</HEAD>
-<BODY>
-<H1>The Help Window</H1>
-<H2>Overview</H2>
-<P>This is some nice text which describes the help window, its role
-in deugging, and perhaps some of the nifty things people can do with
-this window.</P>
-
-<P>Help Window topics:
-<UL>
- <LI><A HREF="#menus">Menus</A>
- <UL>
- <LI><A HREF="#menus_file">File Menu</A></LI>
- <LI><A HREF="#menus_topics">Topics Menu</A></LI>
- </LI>
- <LI><A HREF="#display">Help Display</A>
- <UL>
- <LI><A HREF="#display_nav">Navigating the Help Window</A></LI>
- <LI><A HREF="#display_link">Definition and Page Links</A></LI>
- </UL></LI>
-</UL></P>
-
-<H2><A NAME="menus">Menus</A></H2>
-<H3><A NAME="menus_file">File Menu</A></H3>
-<H3><A NAME="menus_topics">Topics Menu</A></H3>
-
-<H3><A NAME="display">Help Display</A></H3>
-<H3><A NAME="display_nav">Navigating the Help Window</A></H3>
-<H3><A NAME="display_link">Definition and Page Links</A></H3>
-</BODY>
-</HTML>
diff --git a/gdb/gdbtk/library/help/images/browser1.png b/gdb/gdbtk/library/help/images/browser1.png
deleted file mode 100644
index c005cc3fce3..00000000000
--- a/gdb/gdbtk/library/help/images/browser1.png
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/help/images/browser2.png b/gdb/gdbtk/library/help/images/browser2.png
deleted file mode 100644
index 8fdddf8c307..00000000000
--- a/gdb/gdbtk/library/help/images/browser2.png
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/help/images/frame_info.gif b/gdb/gdbtk/library/help/images/frame_info.gif
deleted file mode 100644
index 3da109f84b6..00000000000
--- a/gdb/gdbtk/library/help/images/frame_info.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/help/images/insightbwr.png b/gdb/gdbtk/library/help/images/insightbwr.png
deleted file mode 100644
index 67618b56fef..00000000000
--- a/gdb/gdbtk/library/help/images/insightbwr.png
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/help/images/mem_menu.gif b/gdb/gdbtk/library/help/images/mem_menu.gif
deleted file mode 100644
index bf874f3d4ff..00000000000
--- a/gdb/gdbtk/library/help/images/mem_menu.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/help/images/mem_popup.gif b/gdb/gdbtk/library/help/images/mem_popup.gif
deleted file mode 100644
index a1387146934..00000000000
--- a/gdb/gdbtk/library/help/images/mem_popup.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/help/images/mem_pref.gif b/gdb/gdbtk/library/help/images/mem_pref.gif
deleted file mode 100644
index 4fc8a5aaa6e..00000000000
--- a/gdb/gdbtk/library/help/images/mem_pref.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/help/images/reg.png b/gdb/gdbtk/library/help/images/reg.png
deleted file mode 100644
index 251227da79e..00000000000
--- a/gdb/gdbtk/library/help/images/reg.png
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/help/images/reg_menu.png b/gdb/gdbtk/library/help/images/reg_menu.png
deleted file mode 100644
index 54e117b948e..00000000000
--- a/gdb/gdbtk/library/help/images/reg_menu.png
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/help/images/src_bal.gif b/gdb/gdbtk/library/help/images/src_bal.gif
deleted file mode 100644
index 51871bcc7f1..00000000000
--- a/gdb/gdbtk/library/help/images/src_bal.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/help/images/src_bp_bal.gif b/gdb/gdbtk/library/help/images/src_bp_bal.gif
deleted file mode 100644
index 1f6205ac2e5..00000000000
--- a/gdb/gdbtk/library/help/images/src_bp_bal.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/help/images/src_bpop.gif b/gdb/gdbtk/library/help/images/src_bpop.gif
deleted file mode 100644
index c9e4d099d28..00000000000
--- a/gdb/gdbtk/library/help/images/src_bpop.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/help/images/src_menu.gif b/gdb/gdbtk/library/help/images/src_menu.gif
deleted file mode 100644
index 8fba6aea810..00000000000
--- a/gdb/gdbtk/library/help/images/src_menu.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/help/images/src_pop.gif b/gdb/gdbtk/library/help/images/src_pop.gif
deleted file mode 100644
index 8794c0a5908..00000000000
--- a/gdb/gdbtk/library/help/images/src_pop.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/help/images/src_stat.gif b/gdb/gdbtk/library/help/images/src_stat.gif
deleted file mode 100644
index eab58188edc..00000000000
--- a/gdb/gdbtk/library/help/images/src_stat.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/help/images/src_thread.gif b/gdb/gdbtk/library/help/images/src_thread.gif
deleted file mode 100644
index 99203ccd8c8..00000000000
--- a/gdb/gdbtk/library/help/images/src_thread.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/help/images/src_toolbar.gif b/gdb/gdbtk/library/help/images/src_toolbar.gif
deleted file mode 100644
index d6801b3edf5..00000000000
--- a/gdb/gdbtk/library/help/images/src_toolbar.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/help/images/watch.png b/gdb/gdbtk/library/help/images/watch.png
deleted file mode 100644
index 3145de979ec..00000000000
--- a/gdb/gdbtk/library/help/images/watch.png
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/help/index.html b/gdb/gdbtk/library/help/index.html
deleted file mode 100644
index 9d7177cf259..00000000000
--- a/gdb/gdbtk/library/help/index.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
- <title>Insight Index</title>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Quanta Plus">
-</head>
-<body>
-<img src="images/insightbwr.png" width=300 height=120 border=0>
-<UL>
-<LI><A HREF="breakpoint.html">Breakpoint Window</A></LI>
-<LI><A HREF="console.html">Console Window</A></LI>
-<LI><A HREF="browser.html">Function Browser</A></LI>
-<LI><A HREF="locals.html">Locals Window</A></LI>
-<LI><A HREF="memory.html">Memory Window</A></LI>
-<LI><A HREF="register.html">Register Window</A></LI>
-<LI><A HREF="session.html">Sessions</A></LI>
-<LI><A HREF="source.html">Source Window</A></LI>
-<LI><A HREF="stack.html">Stack Window</A></LI>
-<LI><A HREF="target.html">Target Window</A></LI>
-<LI><A HREF="thread.html">Thread Window</A></LI>
-<LI><A HREF="watch.html">Watch Window</A></LI>
-</UL>
-<hr>
-<h2>For Developers Only</h2>
-<ul>
-<li><a href="debug.html">"Internal Debugging Functions</a></li>
-</ul>
-<hr>
-<br>
-<a href="http://sources.redhat.com/insight/" name="Insight Home Page">Insight Home Page</a>
-<br><br><hr><br>
-<A HREF="license.html">GNU General Public License</A>
-</body>
-</html>
diff --git a/gdb/gdbtk/library/help/license.html b/gdb/gdbtk/library/help/license.html
deleted file mode 100644
index 6ce6c431ca3..00000000000
--- a/gdb/gdbtk/library/help/license.html
+++ /dev/null
@@ -1,305 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>GNU General Public License</TITLE>
-</HEAD><BODY>
-<B>The GNU General Public License
-<P></P>
-</B>Version 2, June 1991
-<P></P>
-Copyright © 1989, 1991 Free Software Foundation, Inc.
-<BR>59 Temple Place / Suite 330, Boston, MA 02111-1307, USA
-<P></P>
-Everyone is permitted to copy and distribute verbatim copies of this license
-document, but changing it is not allowed.
-<P></P>
-<B>Preamble
-<P></P>
-</B>The licenses for most software are designed to take away your freedom to share
-and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and
-change free software to make sure the software is free for all its users. This General Public
-License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some
-other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs,
-too.
-<P></P>
-When we speak of free software, we are referring to freedom, not price. Our
-General Public Licenses are designed to make sure that you have the freedom to
-distribute copies of free software (and charge for this service if you wish),
-that you receive source code or can get it if you want it, that you can change the
-software or use pieces of it in new free programs; and that you know you can
-do these things.
-<P></P>
-To protect your rights, we need to make restrictions that forbid anyone to
-deny you these rights or to ask you to surrender the rights. These restrictions
-translate to certain responsibilities for you if you distribute copies of the
-software, or if you modify it.
-<P></P>
-For example, if you distribute copies of such a program, whether gratis or for
-a fee, you must give the recipients all the rights that you have. You must
-make sure that they, too, receive or can get the source code. And you must show
-them these terms so they know their rights.
-<P></P>
-We protect your rights with two steps: (1) copyright the software, and (2)
-offer you this license which gives you legal permission to copy, distribute and/or
-modify the software.
-<P></P>
-Also, for each author's protection and ours, we want to make certain that everyone understands that
-there is no warranty for this free software. If the software is modified by
-someone else and passed on, we want its recipients to know that what they have is
-not the original, so that any problems introduced by others will not reflect on
-the original authors' reputations.
-<P></P>
-Finally, any free program is threatened constantly by software patents. We
-wish to avoid the danger that redistributors of a free program will individually
-obtain patent licenses, in effect making the program proprietary. To prevent
-this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for
-copying, distribution and modification follow.
-<P></P>
-<B>TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-<P></P>
-</B>0. This License applies to any program or other work which contains a notice
-placed by the copyright holder saying it may be distributed under the terms of this
-General Public License. The `Program”, below, refers to any such program or work, and a `work based on the Program' means either the Program or any derivative work under copyright law: that is
-to say, a work containing the Program or a portion of it, either verbatim or
-with modifications and/or translated into another language. (Hereinafter,
-translation is included without limitation in the term `modification'.) Each licensee is addressed as `you'.
-<P></P>
-Activities other than copying, distribution and modification are not covered
-by this License; they are outside its scope. The act of running the Program is
-not restricted, and the output from the Program is covered only if its contents
-constitute a work based on the Program (independent of having been made by
-running the Program). Whether that is true depends on what the Program does.
-<P></P>
-<OL><LI> You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate copyright notice and
-disclaimer of warranty; keep intact all the notices that refer to this License
-and to the absence of any warranty; and give any other recipients of the Program
-a copy of this License along with the Program.
-<P></P>
-</OL>You may charge a fee for the physical act of transferring a copy, and you may
-at your option offer warranty protection in exchange for a fee.
-<P></P>
-<OL START="2"><LI> You may modify your copy or copies of the Program or any portion of it, thus
-forming a work based on the Program, and copy and distribute such modifications
-or work under the terms of Section 1 above, provided that you also meet all of
-these conditions:
-<P></P>
-</OL>a) You must cause the modified files to carry prominent notices stating that you
-changed the files and the date of any change.
-<P></P>
-b) You must cause any work that you distribute or publish, that in whole or in
-part contains or is derived from the Program or any part thereof, to be licensed
-as a whole at no charge to all third parties under the terms of this License.
-<P></P>
-c) If the modified program normally reads commands interactively when run, you
-must cause it, when started running for such interactive use in the most ordinary
-way, to print or display an announcement including an appropriate copyright
-notice and a notice that there is no warranty (or else, saying that you provide a
-warranty) and that users may redistribute the program under these conditions,
-and telling the user how to view a copy of this License. (Exception: if the
-Program itself is interactive but does not normally print such an announcement,
-your work based on the Program is not required to print an announcement.)
-<P></P>
-These requirements apply to the modified work as a whole. If identifiable
-sections of that work are not derived from the Program, and can be reasonably
-considered independent and separate works in themselves, then this License, and its
-terms, do not apply to those sections when you distribute them as separate
-works. But when you distribute the same sections as part of a whole which is a work
-based on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the entire whole,
-and thus to each and every part regardless of who wrote it.
-<P></P>
-Thus, it is not the intent of this section to claim rights or contest your
-rights to work written entirely by you; rather, the intent is to exercise the
-right to control the distribution of derivative or collective works based on the
-Program.
-<P></P>
-In addition, mere aggregation of another work not based on the Program with
-the Program (or with a work based on the Program) on a volume of a storage or
-distribution medium does not bring the other work under the scope of this License.
-<P></P>
-<OL START="3"><LI> You may copy and distribute the Program (or a work based on it, under Section
-2) in object code or executable form under the terms of Sections 1 and 2 above
-provided that you also do one of the following:
-<P></P>
-</OL>a) Accompany it with the complete corresponding machine-readable source code,
-which must be distributed under the terms of Sections 1 and 2 above on a medium
-customarily used for software interchange; or,
-<P></P>
-b) Accompany it with a written offer, valid for at least three years, to give any
-third party, for a charge no more than your cost of physically performing
-source distribution, a complete machine-readable copy of the corresponding source
-code, to be distributed under the terms of Sections 1 and 2 above on a medium
-customarily used for software interchange; or,
-<P></P>
-c) Accompany it with the information you received as to the offer to distribute
-corresponding source code. (This alternative is allowed only for noncommercial
-distribution and only if you received the program in object code or executable
-form with such an offer, in accord with Subsection b above.)
-<P></P>
-The source code for a work means the preferred form of the work for making
-modifications to it. For an executable work, complete source code means all the
-source code for all modules it contains, plus any associated interface definition
-files, plus the scripts used to control compilation and installation of the
-executable. However, as a special exception, the source code distributed need not
-include anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the operating
-system on which the executable runs, unless that component itself accompanies the
-executable.
-<P></P>
-If distribution of executable or object code is made by offering access to
-copy from a designated place, then offering equivalent access to copy the source
-code from the same place counts as distribution of the source code, even though
-third parties are not compelled to copy the source along with the object code.
-<P></P>
-<OL START="4"><LI> You may not copy, modify, sublicense, or distribute the Program except as
-expressly provided under this License. Any attempt otherwise to copy, modify,
-sublicense or distribute the Program is void, and will automatically terminate your
-rights under this License. However, parties who have received copies, or
-rights, from you under this License will not have their licenses terminated so long
-as such parties remain in full compliance.
-<P></P>
-<LI> You are not required to accept this License, since you have not signed it.
-However, nothing else grants you permission to modify or distribute the Program or
-its derivative works. These actions are prohibited by law if you do not accept
-this License. Therefore, by modifying or distributing the Program (or any work
-based on the Program), you indicate your acceptance of this License to do so,
-and all its terms and conditions for copying, distributing or modifying the
-Program or works based on it.
-<P></P>
-<LI> Each time you redistribute the Program (or any work based on the Program), the
-recipient automatically receives a license from the original licensor to copy,
-distribute or modify the Program subject to these terms and conditions. You
-may not impose any further restrictions on the recipients' exercise of the rights granted herein.
-<P></P>
-</OL>You are not responsible for enforcing compliance by third parties to this
-License.
-<P></P>
-<OL START="7"><LI> If, as a consequence of a court judgment or allegation of patent infringement
-or for any other reason (not limited to patent issues), conditions are imposed
-on you (whether by court order, agreement or otherwise) that contradict the
-conditions of this License, they do not excuse you from the conditions of this
-License. If you cannot distribute so as to satisfy simultaneously your obligations
-under this License and any other pertinent obligations, then as a consequence
-you may not distribute the Program at all. For example, if a patent license
-would not permit royalty-free redistribution of the Program by all those who
-receive copies directly or indirectly through you, then the only way you could
-satisfy both it and this License would be to refrain entirely from distribution of
-the Program.
-<P></P>
-</OL>If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply and the
-section as a whole is intended to apply in other circumstances.
-<P></P>
-It is not the purpose of this section to induce you to infringe any patents or
-other property right claims or to contest validity of any such claims; this
-section has the sole purpose of protecting the integrity of the free software
-distribution system, which is implemented by public license practices. Many people
-have made generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that system; it is up
-to the author/donor to decide if he or she is willing to distribute software
-through any other system and a licensee cannot impose that choice.
-<P></P>
-This section is intended to make thoroughly clear what is believed to be a
-consequence of the rest of this License.
-<P></P>
-<OL START="8"><LI> If the distribution and/or use of the Program is restricted in certain
-countries either by patents or by copyrighted interfaces, the original copyright
-holder who places the Program under this License may add an explicit geographical
-distribution limitation excluding those countries, so that distribution is
-permitted only in or among countries not thus excluded. In such case, this License
-incorporates the limitation as if written in the body of this License.
-<P></P>
-<LI> The Free Software Foundation may publish revised and/or new versions of the
-General Public License from time to time. Such new versions will be similar in
-spirit to the present version, but may differ in detail to address new problems
-or concerns.
-<P></P>
-</OL>Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and `any later version', you have the option of following the terms and conditions either of that
-version or of any later version published by the Free Software Foundation. If the
-Program does not specify a version number of this License, you may choose any
-version ever published by the Free Software Foundation.
-<P></P>
-<OL><LI> If you wish to incorporate parts of the Program into other free programs whose
-distribution conditions are different, write to the author to ask for
-permission. For software which is copyrighted by the Free Software Foundation, write to
-the Free Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status of all
-derivatives of our free software and of promoting the sharing and reuse of software
-generally.
-<P></P>
-</OL>NO WARRANTY
-<P></P>
-<OL><LI> BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE
-PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED
-IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM `AS IS' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
-NECESSARY SERVICING, REPAIR OR CORRECTION.
-<P></P>
-<LI> IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY
-COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE
-PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL,
-SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
-INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF
-THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
-PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-<P></P>
-</OL>END OF TERMS AND CONDITIONS
-<P></P>
-<B>How to Apply These Terms to Your New Programs
-<P></P>
-</B>If you develop a new program, and you want it to be of the greatest possible
-use to the public, the best way to achieve this is to make it free software
-which everyone can redistribute and change under these terms.
-<P></P>
-To do so, attach the following notices to the program. It is safest to attach
-them to the start of each source file to most effectively convey the exclusion
-of warranty; and each file should have at least the `copyright' line and a pointer to where the full notice is found.
-<P></P>
-<I>one line for the program's name and a brief idea of what it does.
-<BR></I>Copyright (C) 19<I>yy</I> <I>name of author</I>
-<BR>
-<BR>This program is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free Software
-Foundation; either version 2 of the License, or (at your option) any later
-version.
-<BR>
-<BR>This program is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-<BR>
-<BR>You should have received a copy of the GNU General Public License along with
-this program; if not, write to the Free Software Foundation, Inc., 59 Temple
-Place - Suite 330, Boston, MA 02111-1307, USA.
-<P></P>
-Also add information on how to contact you by electronic and paper mail.
-<P></P>
-If the program is interactive, make it output a short notice like the
-following example when it starts in an interactive mode:
-<P></P>
-Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes
-with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain
-conditions; type `show c' for details.
-<P></P>
-The hypothetical commands <B>show w</B> and <B>show c</B> should show the appropriate parts of the General Public License. Of course,
-the commands you use may be called something other than show w and show c; they can be mouse clicks or menu items—whatever suits your program.
-<P></P>
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a `copyright disclaimer' for the program, if necessary. The following is a sample (when copying, alter
-the names).
-<P></P>
-Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker.
-<BR>
-<BR>signature of Ty Coon, 1 April 1989
-<BR>Ty Coon, President of Vice
-<P></P>
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may consider
-it more useful to permit linking proprietary applications with the library. If
-this is what you want to do, use the GNU Library General Public License instead of this License.
-<P></P>
-</BODY>
-</HTML>
diff --git a/gdb/gdbtk/library/help/locals.html b/gdb/gdbtk/library/help/locals.html
deleted file mode 100644
index 5612b7de296..00000000000
--- a/gdb/gdbtk/library/help/locals.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>Local Variables Help</TITLE>
-</HEAD>
-<BODY>
-<H1>The Local Variables Window</H1>
-<H2>Overview</H2>
-<p>The Local Variables Window displays all local variables in scope. It may be used to
-visualize and edit local variables. To open the Local Variables window, click on
-small house icon on the toolbar, or select "Local Variables" under the View
-pulldown menu.</p>
-
-<H3>Locals Display</H3>
-
-<p>Pointers, structures, and classes appear in the display with small expansion
-box before their names. To dereference pointers or
-view the members of classes or structures, click
-the closed expansion box (which appears as a small plus sign, "+") to "expand"
-the listing. The expansion box changes to a minus sign, "-", indicating that the
-display is now open. Pointers, structures and classes may be expanded recursively
-to allow multiple pointer dereferences and embedded structure viewing.</p>
-
-<P>The Locals Display updates after every execution of the program and highlights
-in green those variables whose values have changed.</P>
-
-<P>The Locals Window will, by default, display all pointers in hexadecimal and all
-other variables in decimal. To change the display format for a variable, select
-the Format option from the popup-menu.</P>
-
-<H3>Editing a Variable</H3>
-<p>To edit a variable, either double-click the left mouse button on the value of the variable in
-the display or select the Edit option from the pop-up menu. To abort editing a variable's value,
-simply press the escape key on the keyboard. The variable's original value is restored.</p>
-
-<H3>Local Variable Pop-up Menu</H3>
-<p>The pop-up menu provides quick access to the functions of the Local Variables Window.
-To use the pop-up menu, click the right mouse button while over a variable.</p>
-<DL>
- <dt>Format<dd>Change the display format of the variable.</dd></dt>
- <dt>Edit<dd>Edit the variable's value.</dd></dt>
- <dt>Delete<dd>Remove the variable from the display.</dd></dt>
- <dt>Dump Memory<dd>Open a Memory Window with the variable's value as an aaddress.</dd></dt>
- <dt>Help<dd>Open this help page.</dd></dt>
- <dt>Close<dd>Close the Local Variables Window.</dd></dt>
-</DL>
-</BODY>
-</HTML>
diff --git a/gdb/gdbtk/library/help/memory.html b/gdb/gdbtk/library/help/memory.html
deleted file mode 100644
index afa2fe8fb47..00000000000
--- a/gdb/gdbtk/library/help/memory.html
+++ /dev/null
@@ -1,240 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<HTML>
-<HEAD>
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
- <META NAME="GENERATOR" CONTENT="Mozilla/4.06 [en] (X11; I; Linux 2.0.35 i686) [Netscape]">
- <TITLE>Memory Window Help</TITLE>
-</HEAD>
-<BODY>
-
-<H1>
-The Memory Window</H1>
-The Memory Window allows users to display and edit the contents of memory.
-The Memory Window Preferences controls all of the display characteristics
-of the Memory Window.
-<BR>&nbsp;
-<LI>
-<A HREF="#menus">Address Menu</A></LI>
-
-<LI>
-<A HREF="#display">Memory Display</A></LI>
-
-<LI>
-<A HREF="#prefs">Memory Window Preferences</A></LI>
-
-<H2>
-
-<HR WIDTH="100%"></H2>
-
-<H2>
-<A NAME="menus"></A>Address Menu</H2>
-<IMG SRC="images/mem_menu.gif" HEIGHT=66 WIDTH=160>
-<P>This pulldown menu contains the following three items.
-<DL>
-<DT>
-<A NAME="menus_auto"></A>Auto Update</DT>
-
-<DD>
-When selected, causes the Memory Window to update the display every.&nbsp;
-If it is not selected, the display will be frozen until it is selected
-or "Update Now" is selected.</DD>
-
-<DT>
-<A NAME="menus_now"></A>Update Now</DT>
-
-<DD>
-Forces the Memory Window to update the display immediately.</DD>
-
-<DT>
-<A NAME="menus_prefs"></A>Preferences</DT>
-
-<DD>
-Opens the <A HREF="#prefs">Memory Window Preferences</A> dialog.</DD>
-</DL>
-
-<H2>
-
-<HR WIDTH="100%"></H2>
-
-<H2>
-<A NAME="display"></A>Memory Display</H2>
-Like the <A HREF="register.html">Register Window</A>, the Memory Window
-display is organized into a spreadsheet. The address of any cell in the
-Display can be determined by appending the row and column headers for the
-cell. Optionally, an ASCII display of the memory appears at the right.
-Any non-ASCII-representable byte in memory will appear in the ASCII Display
-as a control character (a dot, ".", by default). The <A HREF="#pref">Memory
-Preferences Dialog</A> may be used to alter the appearance of the Memory
-Window.
-<P><A NAME="display_nav"></A>To navigate the Memory Window, use the mouse
-and click the cell of interest. As an alternative, pressing the arrow keys
-on the keyboard will focus successive cells, from left to right, top to
-bottom. The focus will wrap from left to right, so hitting the right arrow
-key will keep advancing the address of the cell selected.
-<H4>
-<A NAME="display_edit"></A>Editing Memory</H4>
-To edit memory, simply enter the new value of the memory into the cell
-and press the enter key on the keyboard. As with the
-<A HREF="register.html">Register
-Window</A>, be careful of the input format used to enter data -- the debugger
-is capable of parsing binary, octal, decimal, and hexadecimal values. All
-entries will be padded with leading zeroes, if necessary.&nbsp; After you
-hit enter, the memory window will automatically shift focus to the next
-cell.
-<P>To edit part of the value of a cell, you can use the mouse to poistion
-the cursor to the exact part of the value you want to change.&nbsp; You
-can also use the backspace key to delete part of the value without deleting
-the whole value.
-<P>Another way to edit memory is to edit the ASCII window.&nbsp; To do
-this, select a cell using the mouse.&nbsp; Then type in a new string.
-<H4>
-<A NAME="display_popup"></A>Memory Pop-up Menu</H4>
-Clicking the right mouse button while the mouse cursor lies within the
-bounds of any cell brings up the following menu:
-<P><IMG SRC="images/mem_popup.gif" HEIGHT=100 WIDTH=220>
-<DL>
-<DT>
-Auto Update</DT>
-
-<DL>
-<DT>
-When selected, the Memory Window will track changes in memory shown in
-the Display.&nbsp; When not selected, the Memory Window is "frozen", representing
-a "snapshot" of memory.</DT>
-</DL>
-
-<DT>
-Update Now</DT>
-
-<DL>
-<DT>
-&nbsp;Forces the Memory Window to update the display immediately.</DT>
-</DL>
-
-<DT>
-Go To <I>address</I></DT>
-
-<DD>
-The Memory Window Display is updated to show memory starting at address
-<I>address</I>.</DD>
-
-<DT>
-Open New Window at <I>address</I></DT>
-
-<DD>
-A new Memory Window is opened, displaying memory at address <I>address</I></DD>
-
-<DT>
-Preferences...</DT>
-
-<DD>
-Opens the Memory Window Preferences for editing the appearance of the Memory
-Window Display.</DD>
-</DL>
-
-<H2>
-
-<HR WIDTH="100%"></H2>
-
-<H2>
-<A NAME="prefs"></A>Memory Window Preferences</H2>
-Memory Window Preference Dialog governs the appearance of the Memory Window:
-the total number of bytes displayed, the size of each cell, ASCII control
-character.
-<P><IMG SRC="images/mem_pref.gif" HEIGHT=417 WIDTH=330>
-<H4>
-<A NAME="prefs_size"></A>Size of the Display Cells</H4>
-This attribute controls how many bytes appear in each cell. Valid cell
-sizes in the Memory Window may be:
-<DL>
-<DT>
-Byte</DT>
-
-<DD>
-Each cell is exactly one byte</DD>
-
-<DT>
-Half Word</DT>
-
-<DD>
-Cells are displayed with two bytes</DD>
-
-<DT>
-Word</DT>
-
-<DD>
-Each cell contains four bytes</DD>
-
-<DT>
-Double Word</DT>
-
-<DD>
-Cells contain eight bytes</DD>
-
-<DT>
-Float</DT>
-
-<DD>
-Each cell contains four bytes, displayed as a floating point number</DD>
-
-<DT>
-Double Float</DT>
-
-<DD>
-Cells are displayed as floating point, eight bytes each</DD>
-</DL>
-
-<H4>
-<A NAME="prefs_fmt"></A>Format of the Display Cells</H4>
-The Format option of the Memory Preferences Dialog governs how the debugger
-represents the memory. Possible representations include:
-<DL>
-<DT>
-Binary</DT>
-
-<DD>
-The values are shown as binary numbers</DD>
-
-<DT>
-Signed Decimal</DT>
-
-<DD>
-The values are shown as signed decimal numbers</DD>
-
-<DT>
-Octal</DT>
-
-<DD>
-Each cell is represented as an octal number</DD>
-
-<DT>
-Unsigned Decimal</DT>
-
-<DD>
-Values are displayed as unsigned decimals</DD>
-
-<DT>
-Hex</DT>
-
-<DD>
-Memory is displayed as a hexadecimal number. This is the default.</DD>
-</DL>
-
-<H4>
-<A NAME="prefs_bytes"></A>Size of the Memory Window</H4>
-The size of the memory window determines how much memory is actually presented
-to the user. The total number of bytes shown can either be determined by
-the size of the window, in which case resizing the Memory Window will cause
-more or less memory to be displayed, or fixed at some specified number
-of bytes. By default, the Memory Window shows 128 bytes of memory.
-<H4>
-<A NAME="prefs_misc"></A>Miscellaneous</H4>
-Miscellaneous memory preferences include the option to display the ASCII
-representation of the memory, including what character to use for non-ASCII
-bytes (the "control" character). Additionally, users may specify the number
-of bytes per row, either by typing a number into the box or by choosing one
-from the list. The default is sixteen bytes per row. If the entered value is
-not a multiple of the cell size then it will be automatically rounded up. The
-maximum permitted value is 150 (before rounding).
-</BODY>
-</HTML>
diff --git a/gdb/gdbtk/library/help/register.html b/gdb/gdbtk/library/help/register.html
deleted file mode 100644
index 06513445eee..00000000000
--- a/gdb/gdbtk/library/help/register.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>Register Window Help</TITLE>
-</HEAD>
-<BODY>
-<H1>The Register Window</H1>
-<P>The Register Window lists registers and their contents for
-the selected stack frame. It permits viewing the contents of registers
-in different formats, editing register values, and some display
-customizations.</P>
-
-<img src="images/reg.png" alt="register window" width=387 height=370 align="middle" border=0>
-
-<p>In the image above, you can see all the registers on the left and their values on the right.
-At the top is an option menu to allow you to choose what group of registers to display.
-The groups names are preset according to the architecture being debugged. The default is "all".
-Registers highlighted in green have recently changed.
-</p>
-<P>The Register Window will update the register contents in the display
-to match the stack frame currently being viewed in the <A HREF="source.html">
-Source Window</A> and <A HREF="stack.html">Stack Window</A>.</P>
-<p>Each time the program stops, the register window will automatically update.
-Registers that have changed since the last stop will be displayed in green.</p>
-
-
-
-<H3>The Register Pop-up Menu</H3>
-<img src="images/reg_menu.png" alt="register popup menu" width=396 height=388 border=0>
-<P>
-To activate the pop-up menu, click the right mouse button over a register.
-This will allow you change the way the register is displayed, or to remove
-it from the display. Or you can add the register to the watch window.
-For integer registers, you can also open a memory window at the
-location pointed to by the register.</P>
-
-<H3>Editing a Register</H3>
-<P>
-To edit a register, simply click on it with the left mouse button. Type
-in the new value and hit enter. You can enter a decimal, hex, or float number and
-the type will be converted if possible. You may also enter an expression to be evaluated.
-For example, to set $r3 to the same as $r4, edit $r3 and enter "$r4" as the value. In the same
-way, you can set $pc to "main".
-The value of the register is set to the current value of the expression; it will not be reevaluated
-if the expression's value later changes.
-</P>
-<P>Press the escape key on the keyboard to cancel your edit.</P>
-</BODY>
-</HTML>
diff --git a/gdb/gdbtk/library/help/session.html b/gdb/gdbtk/library/help/session.html
deleted file mode 100644
index 6c770e8f022..00000000000
--- a/gdb/gdbtk/library/help/session.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<html>
-<head>
-<title>Sessions</title>
-</head>
-<body>
-
-<center><h2>Sessions</h2></center>
-
-Insight will save your session for you automatically. The ``session''
-is essentially a group of settings which are keyed by the name of the
-inferior which you are debugging.<p>
-
-Insight will show a list of the five most recent previous sessions on
-the <tt>File</tt> menu. Choosing an item from this list will cause
-Insight to load the indicated executable and restore all the settings
-saved in the session.<p>
-
-The settings stored in a session are:
-<ul>
-<li> The name of the executable.
-
-<li> The inferior's command-line arguments.
-
-<li> The target.
-
-<li> The path used when searching for source files.
-
-<li> The current working directory.
-
-<li> The breakpoints and watchpoints, including conditions, actions,
- and the like.
-</ul>
-<p>
-
-More items may be added to this list as the need arises.<p>
-
-At present there is no way to disable session saving.<p>
-
-</body>
-</html>
diff --git a/gdb/gdbtk/library/help/source.html b/gdb/gdbtk/library/help/source.html
deleted file mode 100644
index 0e04eac6579..00000000000
--- a/gdb/gdbtk/library/help/source.html
+++ /dev/null
@@ -1,424 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<HTML>
-<HEAD>
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
- <META NAME="GENERATOR" CONTENT="Mozilla/4.06 [en] (X11; I; Linux 2.0.35 i686) [Netscape]">
- <TITLE>Source Window Help</TITLE>
-</HEAD>
-<BODY>
-
-<CENTER>
-<H1>The Source Window</H1></CENTER>
-
-<BR>The Source Window is the primary interface between the user and
-the debugger; it is automatically opened when the debugger starts. The
-Source Window displays the status of the program, controls execution of
-the program, and allows visualization of the program execution.
-
-<H3><A HREF="#menus">Menus</A></H3>
-
-<UL>
-<LI><A HREF="#menus_file">File Menu</A></LI>
-<LI><A HREF="#menus_run">Run Menu</A></LI>
-<LI><A HREF="#menus_view">View Menu</A></LI>
-<LI><A HREF="#menus_control">Control Menu</A></LI>
-<LI><A HREF="#menus_prefs">Preferences Menu</A></LI>
-</UL>
-
-<H3><A HREF="#toolbar">Toolbar</A></H3>
-
-<UL>
-<LI><A HREF="#toolbar_exec">Execution Control Buttons</A></LI>
-<LI><A HREF="#toolbar_window">Window Buttons</A></LI>
-<LI><A HREF="#toolbar_frame">Frame Control</A></LI>
-</UL>
-
-<H3><A HREF="#display">Source Window Display</A></H3>
-
-<UL>
-<LI><A HREF="#setting_a_breakpoint">Setting a Breakpoint</A></LI>
-<LI><A HREF="#viewing_breakpoints">Viewing Breakpoints</A></LI>
-<LI><A HREF="#display_balloon">Variable Balloons</A></LI>
-<LI><A HREF="#display_popup">Source Pop-up Menus</A></LI>
-</UL>
-
-<H3><A HREF="#status">Source Window Status Bars</A></H3>
-
-<UL>
-<LI><A HREF="#status_bar">Program Status Bar</A></LI>
-<LI><A HREF="#status_mode">Source Display Status Bar</A></LI>
-</UL>
-
-<H3><A HREF="#search">Search Entry</A></H3>
-
-<HR>
-<H2><A NAME="menus"></A>Menus</H2>
-
-<IMG SRC="images/src_menu.gif">
-<H4><A NAME="menus_file"></A>File Menu</H4>
-
-<DL>
-<DT>Open</DT>
-<DD>Opens a file selection dialog to select the executable to debug</DD>
-<DT>Close</DT>
-<DD>Closes a previously opened executable file</DD>
-<DT>Source</DT>
-<DD>Reads and executes GDB commands from a text file</DD>
-<DT>Target Settings...</DT>
-<DD>Opens the <A HREF="target.html">Target Selection Dialog</A> to edit target
-settings</DD>
-<DT>Page Setup</DT>
-<DD>(Windows only) Opens the Windows Page Setup dialog to configure printing</DD>
-<DT>Print</DT>
-<DD>Print the contents of the Source Window Display</DD>
-<DT>Exit</DT>
-<DD>Exits the debugger</DD>
-</DL>
-
-<H4><A NAME="menus_run"></A>Run Menu</H4>
-<DL>
-<DT>Connect to target</DT>
-<DD>Connect to the target specified in the <A HREF="target.html">Target Selection Dialog</A>. Open the dialog if there are no current settings.</DD>
-<DT>Download</DT>
-<DD>Initiates download of the executable onto the target via the protocol specified
-in the <A HREF="target.html">Target Selection Dialog</A></DD>
-<DT>Run</DT>
-<DD>Runs or re-runs the program</DD>
-<DT>Disconnect</DT>
-<DD>Close a previously opened connection</DD>
-</DL>
-
-<H4><A NAME="menus_view"></A>View Menu</H4>
-<DL>
-<DT>Stack</DT>
-<DD>Open a <A HREF="stack.html">Stack Window</A></DD>
-<DT>Registers</DT>
-<DD>Open a <A HREF="register.html">Register Window</A></DD>
-<DT>Memory</DT>
-<DD>Open a <A HREF="memory.html">Memory Window</A></DD>
-<DT>Watch Expressions</DT>
-<DD>Open a <A HREF="watch.html">Watch Window</A></DD>
-<DT>Local Variables</DT>
-<DD>Open a <A HREF="locals.html">Locals Window</A></DD>
-<DT>Breakpoints</DT>
-<DD>Open a <A HREF="breakpoint.html">Breakpoint Window</A></DD>
-<DT>Console</DT>
-<DD>Open a <A HREF="console.html">Console Window</A></DD>
-<DT>Function Browser</DT>
-<DD>Open a window allowing the user to easily search for functions and
-set breakpoints.</DD>
-<DT>Thread List</DT>
-<DD>Open a window that displays all current threads and allows the user
-to change active threads</DD>
-</DL>
-
-<H4><A NAME="menus_control"></A>Control Menu</H4>
-<DL>
-<DT><A HREF="#step_button">Step</A></DT>
-<DD>Step program until it reaches a different source line</DD>
-<DT><A HREF="#next_button">Next</A></DT>
-<DD>Step program, proceeding through subroutine calls</DD>
-<DT><A HREF="#finish_button">Finish</A></DT>
-<DD>Execute until the current stack frame returns</DD>
-<DT><A HREF="#continue_button">Continue</A></DT>
-<DD>Continue program being debugged, after signal or breakpoint</DD>
-<DT><A HREF="#stepi_button">Step Asm Inst</A></DT>
-<DD>Step one instruction exactly</DD>
-<DT><A HREF="#nexti_button">Next Asm Inst</A></DT>
-<DD>Step one instruction, but proceed through subroutine calls</DD>
-<DT>Automatic Step</DT>
-<DD>Automatically step the program every two seconds</DD>
-</DL>
-
-<H4><A NAME="menus_prefs"></A>Preferences Menu</H4>
-<DL>
-<DT>Global</DT>
-<DD>Opens the <A HREF="gbl_pref.html">Global Preferences Dialog</A> and allows
-editing of global settings</DD>
-<DT>Source</DT>
-<DD>Opens the <A HREF="src_pref.html">Source Preferences Dialog</A> and allows
-editing of Source Window settings</DD>
-</DL>
-
-<HR>
-
-<H2><A NAME="toolbar"></A>Toolbar</H2>
-<IMG SRC="images/src_toolbar.gif">
-The Source Window toolbar consists of three functional sections: execution
-control buttons, debugger window buttons, and stack frame control buttons.
-
-<BR>
-<H4><A NAME="toolbar_exec"></A>Execution Control Buttons</H4>
-These convenience buttons provide on-screen access to the most important
-debugger execution control functions:
-<DL>
-<DT><A NAME="run_button"></A><IMG SRC="../images/run.gif"> or
-<IMG SRC="../images2/run.gif"> Run </DT>
-<DD>The Run Button will start execution of the program, including target selection
-and downloading, if necessary. If the program is already running, the Run
-Button will start the program from the beginning (re-run it).</DD>
-
-<DT><A NAME="stop_button"></A><IMG SRC="../images/stop.gif"> or
-<IMG SRC="../images2/stop.gif"> Stop</DT>
-<DD>The Stop Button will interrupt execution of the program (provided this
-feature is supported by the underlying debugging protocol and hardware)
-or cancel downloads. It is also used as an indication that the debugger
-is busy.</DD>
-<DT><A NAME="step_button"></A><IMG SRC="../images/step.gif"> or <IMG SRC="../images2/step.gif">Step</DT>
-<DD>Step the program until it reaches a different source line</DD>
-<DT><A NAME="next_button"></A><IMG SRC="../images/next.gif"> or <IMG SRC="../images2/next.gif">Next</DT>
-<DD>Step the program, proceeding through subroutine calls</DD>
-<DT><A NAME="finish_button"></A><IMG SRC="../images/finish.gif"> or <IMG SRC="../images2/finish.gif"> Finish</DT>
-<DD>Execute until the current stack frame returns</DD>
-<DT><A NAME="continue_button"></A><IMG SRC="../images/continue.gif"> or <IMG SRC="../images2/continue.gif"> Continue</DT>
-<DD>Continue the program being debugged, after signal or breakpoint</DD>
-<DT><A NAME="stepi_button"></A><IMG SRC="../images/stepi.gif"> or <IMG SRC="../images2/stepi.gif"> Step Asm Inst</DT>
-<DD>Step one instruction exactly. This function is only available when the
-Source Window is displaying assembler code.</DD>
-<DT><A NAME="nexti_button"></A><IMG SRC="../images/nexti.gif"> or <IMG SRC="../images2/nexti.gif"> Next Asm Inst</DT>
-<DD>Step one instruction, but proceed through subroutine calls. This function
-is only available when the Source Window is displaying assembler code.</DD>
-</DL>
-
-<H4>
-<A NAME="toolbar_window"></A>Window Buttons</H4>
-The Debugger Window buttons give instant access to the Debugger's auxiliary
-windows:
-<DL>
-<DT><A NAME="register_button"></A><IMG SRC="../images/reg.gif"> or <IMG SRC="../images2/reg.gif"> Registers</DT>
-<DD>Open a <A HREF="register.html">Register Window</A></DD>
-<DT><A NAME="memory_button"></A><IMG SRC="../images/memory.gif"> or <IMG SRC="../images2/memory.gif"> Memory</DT>
-<DD>Open a <A HREF="memory.html">Memory Window</A></DD>
-<DT><A NAME="stack_button"></A><IMG SRC="../images/stack.gif"> or <IMG SRC="../images2/stack.gif"> Stack</DT>
-<DD>Open a <A HREF="stack.html">Stack Window</A></DD>
-<DT><A NAME="watch_button"></A><IMG SRC="../images/watch.gif"> or <IMG SRC="../images2/watch.gif"> Watch Expressions</DT>
-<DD>Open a <A HREF="watch.html">Watch Window</A></DD>
-<DT><A NAME="locals_button"></A><IMG SRC="../images/vars.gif"> or <IMG SRC="../images2/vars.gif"> Local Variables</DT>
-<DD>Open a <A HREF="locals.html">Locals Window</A></DD>
-<DT><A NAME="breakpoints_button"></A><IMG SRC="../images/bp.gif"> or <IMG SRC="../images2/bp.gif"> Breakpoints</DT>
-<DD>Open a <A HREF="breakpoint.html">Breakpoint Window</A></DD>
-<DT><A NAME="console_button"></A><IMG SRC="../images/console.gif"> or <IMG SRC="../images2/console.gif"> Console</DT>
-<DD>Open a <A HREF="console.html">Console Window</A></DD>
-</DL>
-
-<H4><A NAME="toolbar_frame"></A>Frame Control</H4>
-The Frame Control area of the toolbar displays information about the PC
-of the current frame, and the frame control buttons may be used to navigate
-through the call stack. Whenever any of these buttons are used, both the
-Source Window Display and the <A HREF="stack.html">Stack Window</A> will
-show the selected frame.
-<DL>
-<DT><IMG SRC="images/frame_info.gif" > Frame Information Display</DT>
-<DD>The left half of the frame information display shows the value of the PC
-in the current frame. The right half shows the line number of the PC in
-the source file, if available.</DD>
-
-<DT><A NAME="up_button"></A><IMG SRC="../images/up.gif"> or <IMG SRC="../images2/up.gif"> Up</DT>
-<DD>Select and view the stack frame that called this one</DD>
-
-<DT><A NAME="down_button"></A><IMG SRC="../images/down.gif"> or <IMG SRC="../images2/down.gif"> Down</DT>
-<DD>Select and view the stack frame called by this one</DD>
-
-<DT><A NAME="bottom_button"></A><IMG SRC="../images/bottom.gif"> or <IMG SRC="../images2/bottom.gif"> Bottom</DT>
-<DD>Select and view the bottom-most stack frame</DD>
-</DL>
-
-<HR>
-
-<H2><A NAME="display"></A>Source Display</H2>
-The Source Display is used for many things: browsing source code, setting
-and clearing breakpoints, and a few other special functions. Executable
-lines (those for which executable code was generated by the compiler) are
-denoted with a marker (a dash, "-") in the first column of the display.
-<P>The debugger highlights the PC in the current frame in either green,
-indicating that the PC is in the bottom-most frame (i.e., it is being executed)
-or gold, indicating that the PC is contained in a frame that is not currently
-executing (because it has called another function). A blue highlight is
-used by the debugger to indicate a browsing position: the PC is contained
-in a frame that is not executing or on the call stack. All highlight colors
-are user selectable in the <A HREF="src_pref.html">Source Preferences</A>.
-
-<BR>
-<H4><A NAME="setting_a_breakpoint"></A>Setting a Breakpoint</H4>
-Moving the mouse pointer over the "hot spot" of an executable line will
-change the mouse cursor to a large dot. Clicking the left mouse button
-will then toggle a breakpoint at this line. If no breakpoint exists, one
-will be installed and the dash in the left margin will change into a red
-breakdot. If a breakpoint exists, it will be removed and the red breakdot
-will revert back to a dash. The executable line marker shows the status
-of each line: an empty marker (the dash) indicates that no breakpoints
-are set at the line. A colored breakdot indicates that a breakpoint exists
-at the line (see <A HREF="#display_popup">Source Pop-up Menus</A> for more
-information on setting different types of breakpoints and their representations
-in the Source Display).
-<P>Black breakdots in the Source Window display indicate that the breakpoint
-has been disabled. To re-enable the breakpoint, click the enable/disable
-checkbox in the Breakpoint Window (see <A HREF="breakpoint.html#display_state">
-Enabling/Disabling Breakpoints</A>).
-
-<BR>
-<H4><A NAME="viewing_breakpoints"></A>Viewing Breakpoints</H4>
-You can find out more information about a breakpoint by moving the cursor
-over a breakpoint. A balloon window will pop up with additional information.
-To get a list of all the active breakpoints, you will need to open a
-<A HREF="breakpoint.html">breakpoint window</A>.
-<IMG SRC="images/src_bp_bal.gif">
-
-<BR>
-<H4><A NAME="display_balloon"></A>Variable Balloons</H4>
-If the program to be debugged has started and is stopped, the display
-will show the value of variables in variable
-balloons. To activate a variable balloon, simply hold the mouse cursor
-over the name of a variable in the Source Display for a second or two:
-the debugger displays the name of the variable, its type, and its value
-in a pop-up balloon.
-<IMG SRC="images/src_bal.gif">
-
-<BR>
-<H4><A NAME="display_popup"></A>Source Pop-up Menus</H4>
-The Source Display has two pop-up menus. One is activated by clicking the
-right mouse button when the mouse cursor is over an executable line marker's
-hot spot. This pop-up menu looks like this:
-<P><IMG SRC="images/src_bpop.gif">
-<DL>
-<DT>Continue to Here</DT>
-<DD>Continue program execution until it reaches this point. All breakpoints
-will be ignored. Be aware that if the program never executes the line you selected,
-it will run until completion.</DD>
-<DT>Set Breakpoint</DT>
-<DD>Set a breakpoint at this line. This has the same effect as left clicking
-on this line. Breakpoints are shown as red breakdots in the Source Window
-Display.</DD>
-<DT>Set Temporary Breakpoint</DT>
-<DD>Set a temporary breakpoint at this line. Temporary breakpoints are shown
-as orange breakdots in the Source Window Display. The remove themselves automatically
-the first time they are hit.</DD>
-<A NAME="thread_bp"></A>
-<DT>Set Breakpoint on Thread(s)...</DT>
-<DD>GDB allows the user to set a breakpoint on a particular thread or threads. This
-menu item will display a dialog with a list of threads. The user can select a list
-of threads that will have breakpoints set at the selected line number. A warning
-will be displayed if there are no active threads.</DD>
-<IMG SRC="images/src_thread.gif">
-</DL>
-
-The other pop-up menu is activated by clicking the right mouse button anywhere
-else in the Source Display. It is only available when a variable or number
-in the display lies below the mouse cursor or is selected (by clicking
-the left mouse button and dragging the mouse to highlight the variable/number).
-The pop-up menu looks like this:
-<P><IMG SRC="images/src_pop.gif">
-<DL>
-<DT><A NAME="add_to_watch"></A>Add <I>expr</I> to Watch</DT>
-<DD>Adds the selected expression to the <A HREF="watch.html">Watch Window</A>,
-opening it, if necessary.</DD>
-<DT>Dump Memory at <I>expr</I></DT>
-<DD>Opens a new <A HREF="memory.html">Memory Window</A> at the selected expression.
-If the expression is a variable, then the Memory Window is opened with
-memory addresses starting at the value of the variable.</DD>
-<DT>Open Another SOurce Window</DT>
-<DD>GDB allows multiple source windows to co-exist. You can, for example, have
-one window in source mode and one in assembly mode. Or you can use one window
-to browse the stack or other files.</DD>
-</DL>
-
-<H4><A NAME="status"></A>Source Window Status Bars</H4>
-The Source Window has two status bars which inform the user of the status
-of the program (the "status bar") and the status of the Source Window.
-<P>The&nbsp;<A NAME="status_bar"></A>Program Status Bar (or simply "Status
-Bar") displays the status of the program. Common messages seen here include:
-<DL>
-<DT>No program loaded.</DT>
-<DD>No program has been loaded into target memory.</DD>
-<DT>Program is ready to run.</DT>
-<DD>A program has been loaded into target memory and may be executed. Start
-the program by hitting <A HREF="#run_button">Run</A>.</DD>
-<DT>Program stopped at <I>line/address</I></DT>
-<DD>The program stopped at line <I>line</I> or address <I>address</I>. Execution
-may continue by hitting any of the <A HREF="#toolbar_exec">execution control
-buttons</A> on the toolbar.</DD>
-<DT>Program terminated. 'Run' will restart.</DT>
-<DD>The program exited. Pressing <A HREF="#run_button">Run</A> will restart
-it.</DD>
-</DL>
-
-The Status Bar also displays some help information. For instance, the Status
-Bar will show the function of a button on the toolbar or the Source Display
-Status Bar as well as any keyboard shortcut for any button in the Source
-Window.
-
-<BR>
-<H4><A NAME="status_mode"></A>Source Display Status Bar</H4>
-<IMG SRC="images/src_stat.gif">
-The Source Display Status Bar shows the current state of the Source Window:
-the name of the file displayed in the Display, the name of the function
-in the Display which contains the PC for the current frame (if any), and
-the display mode.
-<P>The <A NAME="file_selector"></A>Source File Selector is a dropdown
-menu which contains the names of all the files that were compiled into
-the program being debugged.
-<P>Normally, the File Selector displays the name of the file currently
-being viewed, but any file from the dropdown menu may be selected for browsing.
-Simply select the file to view from the available choices (or type it directly
-into the File Selector) and the Source Window will load that file into
-the Display. To return to the PC of the program, simply press the
-<A HREF="#bottom_button">Bottom
-Frame Control Button</A>.
-<P>The <A NAME="function_selector"></A>Source Function Selector displays
-the name of the function containing the Source Window's PC, if one exists,
-but it may be used to browse any function in the current file. Simply type
-the name of the desired function into the Function Selector or select it
-from the dropdown menu. The Source Window's PC is updated to point at this
-function. To return to the PC of the program, simply press the
-<A HREF="#bottom_button">Bottom
-Frame Control Button</A>.
-<P>The <A NAME="mode_selector"></A>Source Display Mode Selector displays
-the viewing mode of the current file/function shown in the Source Window
-Display.
-<P>The function of the "step" keyboard shortcut will differ depending on
-the mode the Source Window Display. "Stepping" in Source Mode (or in the
-Source Pane of SRC+ASM Mode) will cause a source-level step. "Stepping"
-in Assembly or Mixed Mode (or in the Assembly Pane of the SRC+ASM Mode)
-will cause the debugger to step exactly one machine instruction. This also
-applies to the shortcut for "next".
-<P>The Display Mode Selector may be used to change the view of the current
-source file. The available display modes are
-<DL>
-<DT>SOURCE</DT>
-<DD>The contents of the Display are shown as source code. If source code is
-not available (either because no debugging information is available or
-the source file is not found), the Source Window will temporarily set the Display
-Mode to "ASSEMBLY".</DD>
-<DT>ASSEMBLY</DT>
-<DD>A disassembly of the target's memory is shown in the Display. Even assembly
-source files show a disassembly of target memory; to see the assembly source
-code, use the SOURCE mode. Note that the debugger can only display assembly
-code on a function-by-function basis. It cannot display all the instructions
-generated from a single source file.</DD>
-<DT>MIXED</DT>
-<DD>The Display shows source code mixed with the assembler instructions which
-were generated for those lines by the compiler for the current function.
-Note that the addresses of the assembly lines is not necessarily monotonically
-increasing. If the source file associated with the function cannot be found,
-the Source Window will revert to ASSEMBLY mode.</DD>
-<DT>SRC+ASM</DT>
-<DD>The Source Window Display is divided into two panes: an assembly pane and
-a source pane. Breakpoints may be set/cleared in either pane.</DD>
-</DL>
-
-<HR>
-
-<H2><A NAME="search"></A>Search Entry</H2>
-The Search Entry facilitates searching for text in the Source Window Display.
-Simply enter the text to be found into the Search Entry and press the Enter
-key on the keyboard to search forwards in the Source Window Display (hold
-down the Shift key to search backwards). If a match is found, it is highlighted
-in the Source Window and the Program Status Bar displays information about
-where the match was found.
-<P>The Search Entry can also jump the Source Window to a specific line.
-Enter the line number preceded by an "at" sign (@) into the Search Entry
-and press enter. If entered line number is greater than the total number
-of lines in the Source Window Display, the Display will jump to the end
-of the current file.
-</BODY>
-</HTML>
diff --git a/gdb/gdbtk/library/help/src_pref.html b/gdb/gdbtk/library/help/src_pref.html
deleted file mode 100644
index e8547964653..00000000000
--- a/gdb/gdbtk/library/help/src_pref.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>Source Window Preferences Help</TITLE>
-</HEAD>
-<BODY>
-<H1>Source Window Preferences</H1>
-<H3>Overview</H3>
-<P>Not yet done.</P>
-
-<P>Source Preferences topics:
-<UL>
- <LI><UL><A HREF="#">stuff</A>
- <LI><A HREF="#">stuff</A>
- <LI><A HREF="#">stuff</A>
- </UL>
-</UL></P>
-
-<H3><A NAME="">stuff</A></H3>
-</BODY>
-</HTML>
diff --git a/gdb/gdbtk/library/help/stack.html b/gdb/gdbtk/library/help/stack.html
deleted file mode 100644
index 9229c17fa12..00000000000
--- a/gdb/gdbtk/library/help/stack.html
+++ /dev/null
@@ -1,50 +0,0 @@
-<HTML>
- <HEAD>
- <TITLE>Stack Window Help</TITLE>
- </HEAD>
- <BODY>
-
- <CENTER>
- <H2>The Stack Window</H2>
- </CENTER>
-
-
- <BR>The Stack Window allows users to view the call stack and jump between
- levels of the stack.
-
- <UL>
- <LI><A HREF="#display">Stack Display</A></LI>
- <LI><A HREF="#display_nav">Navigating the Stack Window</A></LI>
- <LI><A HREF="#display_lvl">Changing the Stack Level</A></LI>
- </UL>
-
- <H2><A NAME="display">Stack Display</A></H2>
- The Stack Display consists of a listbox which displays levels of the call stack
- on per line. Each line contains the level number (useful when using the
- <A HREF="console.html">Console Window</A>) and a description of the function executing
- in that level. Typically, the function name and either the address of the function
- or the file and line number where the function is defined are displayed. The
- Stack Window may also be used to jump between levels of the stack.
- <BR>
-
- <H2><A NAME="display_nav">Navigating the Stack Window</A></H2>
- Navigation of the Stack Window is accomplished by clicking on the desired level
- with the left mouse button. The <A HREF="source.html#display">Source Window
- Display</A> updates to show the selected frame. All other secondary windows,
- <A HREF="register.html">Registers</A>, <A HREF="watch.html">Watch</A>, and
- <A HREF="locals.html">Locals</A> update their displays for the selected frame.
- <BR>
-
- <H2><A NAME="display_lvl">Changing Stack Levels</A></H2>
- To switch frames, simply click the left mouse button on the desired frame and the
- debugger will switch contexts, updating all windows. The selected frame is highlighted
- (in gold, by default).
-
- <P>As an alternative, changing stack levels may be accomplished via the
- <A HREF="source.html#toolbar_frame">Frame Control Buttons</A> on the Source Window's
- Toolbar. These buttons may be used to change frames one level at a time (either
- immediately up or immediately down) or to jump to the bottom-most stack frame.
- See <A HREF="source.html#toolbar_frame">Source Frame Control Buttons</A> for more
- information.</P>
- </BODY>
-</HTML>
diff --git a/gdb/gdbtk/library/help/target.html b/gdb/gdbtk/library/help/target.html
deleted file mode 100644
index b56821b0cff..00000000000
--- a/gdb/gdbtk/library/help/target.html
+++ /dev/null
@@ -1,110 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>Target Selection Help</TITLE>
-</HEAD>
-<BODY>
-<H1>The Target Selection Dialog</H1>
-<h2>Overview</h2>
-<P>The Target Selection Dialog allows users to specify the debug target,
-the interface used to connect to the target, and some useful run
-options.</P>
-
-<P>
-<h3><A HREF="#select">Selecting a Target</A></h3>
-<UL>
-<LI><A HREF="#select">Specifying a Target</A></LI>
-<LI><A HREF="#select_int">Choosing a Connection Interface</A></LI>
-</UL>
-
-<h3><A HREF="#options">Options</A></h3>
-<UL>
-<LI><A HREF="#options_run_until_main">Run until 'main'</A></LI>
-<LI><A HREF="#options_bp_at_exit">Set breakpoint at 'exit'</A></LI>
-<LI><A HREF="#options_set_bp_at">Set user-specifid breakpoint</A></LI>
-<LI><A HREF="#options_download_dialog">Display Download Dialog</A></LI>
-<LI><A HREF="#options_use_xterm">Use xterm for inferior's tty (unix only)
- </A></LI>
-</UL>
-
-<h3><A HREF="#more_options">More Options</A></h3>
-<UL>
-<LI><A HREF="#more_options_attach">Attach to Target</A></LI>
-<LI><A HREF="#more_options_load">Download Program</A></LI>
-<LI><A HREF="#more_options_run">Run Program</A></LI>
-<LI><A HREF="#more_options_cont">Continue from Last Stop</A></LI>
-</UL></P>
-
-<H3><A NAME="select">Selecting a Target</A></H3>
-Selecting a target involves choosing a target for debugging and setting connection
-interface options for the target.
-
-<P>Common targets include: "Exec" for native debuggers, "Remote/Serial" for establishing
-a connection to a target board via a serial line, "Remote/TCP" for TCP connections,
-and "Simulator" for connections to the simulator. There may be more depending on the
-configuration of the debugger being used.</P>
-
-<P>In general, "remote" targets are always serial connections which require the user
-to specify the serial port and baud rate to be used for the connection and
-"remote/tcp" targets are always TCP connections which require specifying the hostname
-and port number of the machine to which to connect. Depending upon configuration,
-there may be numerous serial- and TCP-based connections. These always follow the
-naming convention <I>target</I>/Serial and <I>target</I>/TCP.</P>
-
-<P>To select a target, choose one of the available targets
-from the dropdown menu in the Connection Frame. Then <A NAME="#select_int">specify
-the interface options</A> for this target: selecting the baudrate and serial port
-from the dropdown menus (serial targets only) or entering the hostname and port number
-(TCP targets only).</P>
-
-<H3><A NAME="options">Options</A></H3>
-Three run options which may be selected include:
-<DL>
- <DT><A NAME="options_run_until_main">Run until 'main'</A>
- <DD>Sets a breakpoint at main()
- <DT><A NAME="options_bp_at_exit">Set breakpoint at 'exit'</A>
- <DD>Sets a breakpoint at exit()
- <DT><A NAME="options_set_bp_at">Set breakpoint at</A>
- <DD>Sets a breakpoint at a user-specified locaiton</A>
- <DT><A NAME="options_download_dialog">Display Download Dialog</A>
- <DD>Displays a dialog showing the progress of the download to
- the target section by section
- <DT><A NAME="options_use_xterm">Use xterm as inferior's tty</A>
- <DD>Causes insight to open a tty for inferior I/O (unix versions
- only)
-</DL>
-<BR>
-<H3><A NAME="more_options">More Options</A></H3>
-Several additional run options may be set for each target from the Target Selection
-Dialog. These options govern the behavior of the debugger's
-<A NAME="source.html#run_button">Run Button</A>. The debugger automatically selects
-default values for these options whenever a target is selected with the dropdown menu
-in the Connection Frame. To modify this default behavior, click the small triangle
-next to "More Options" at the bottom of the dialog. The Run Options for the current
-target are displayed, allowing modification of the actions for the target. When the
-"OK" button is selected, these settings are saved and will be used as the default
-for the target in future sessions.
-
-<DL>
- <DT><A NAME="more_options_attach">Attach to Target</A>
- <DD>Establish a connection to the target board.
- <DT><A NAME="more_options_load">Download Program</A>
- <DD>Download the program to the target board.
- <DT><A NAME="more_options_run">Run Program</A>
- <DD>Run the program on the target board, creating a new
- "process". This option may not be specified along with
- the continue option. See note below.
- <DT><A NAME="more_options_cont">Continue from Last Stop</A>
- <DD>Continue the program on the target board from where
- it last stopped. This option may not be specified
- along with the "run" option. See note below.
-</DL>
-
-<P>Note that all remote targets typically do not "run" programs. Since target
-boards are usually incapable of creating a new "process", these targets
-seldom "Run". The defaults for all remote targets reflect this distinction: they
-are all set to "Continue".</P>
-
-<P>Only one of the options "Run Program" and "Continue from Last Stop" may be used.
-Typically, the default behavior of this setting should not be altered.</P>
-</BODY>
-</HTML>
diff --git a/gdb/gdbtk/library/help/thread.html b/gdb/gdbtk/library/help/thread.html
deleted file mode 100644
index dacc0646125..00000000000
--- a/gdb/gdbtk/library/help/thread.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<HTML>
- <HEAD>
- <TITLE>Thread Window Help</TITLE>
- </HEAD>
- <BODY>
-
- <CENTER>
- <H2>The Thread Window</H2>
- </CENTER>
-
-
- <BR>The Thread Window displays a list of threads and/or processes. The exact
- contents are OS-specific.
-
- <UL>
- <LI><A HREF="#display">Thread Display</A></LI>
- <LI><A HREF="#current">Changing the Current Thread</A></LI>
- <LI><A HREF="#bp">Setting Breakpoints on Thread(s)</A></LI>
- </UL>
-
- <H2><A NAME="display">Thread Display</A></H2>
- The Thread Display consists of a listbox which displays information on
- threads and/or processes that are part of the executable being debugged.
- The first column is the GDB thread number, which is used internally by GDB
- to track the thread. The rest of the columns are OS-dependent. The output is identical
- to the output of the console command "info threads".
- <BR>
-
- <H2><A NAME="current">Changing the Current Thread</A></H2>
- The source window can only display the current location and source for one thread
- at a time. That thread is called the "current thread".
- To change the current thread, simply click the left mouse button on the desired
- line and the
- debugger will switch contexts, updating all windows. The current thread will
- be highlighted.
- <BR>
-
- <H2><A NAME="bp">Setting Breakpoints on Thread(s)</A></H2>
- Normally if you set a breakpoint on a line or function, every thread that hits
- that location will stop execution and return to the debugger. To set a breakpoint
- or a specific thread or threads, you need to use the source window. See
- <A HREF="source.html#thread_bp">Set Breakpoint on Threads</A>
-
-
- </BODY>
-</HTML>
diff --git a/gdb/gdbtk/library/help/trace/console.html b/gdb/gdbtk/library/help/trace/console.html
deleted file mode 100644
index fdce956afec..00000000000
--- a/gdb/gdbtk/library/help/trace/console.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>Console Window Help</TITLE>
-</HEAD>
-<BODY>
-<H1>The Console Window</H1>
-<H3>Overview</H3>
-<P>The Console Window is perhaps the most powerful tool in the debugger. It
-provides functionality equivalent to almost all of the debugger's secondary
-windows, macro definitions, and other more advanced features.</P>
-
-<P>Console Window topics:
-<UL>
- <LI><UL><A HREF="#display">Console Display</A>
- <LI><A HREF="#display_cmd">Executing Commands</A>
- <LI><A HREF="#display_hlp">Getting Help</A>
- </UL>
-</UL></P>
-
-<H3><A NAME="display">Console Display</A></H3>
-The Console Display is simply a scrolled window in which the debugger prompt
-appears. By default, the prompt is set to "(gdb) ", but it may be changed via a
-command line option.
-
-<P>To <A NAME="display_cmd">execute commands</A> in the console window, simply enter
-the command in the display. If the debugger is busy, the message "Error: The
-debugger is busy." appears informing the user that the command was not accepted.</P>
-
-<P>Whenever a command is executed, the debugger's windows will update to display
-any new state information. Any output from the command is also echoed to the Console
-Window for ease of use. If an error occurs, an error message is printed to the Console
-Window. All error messages appear in the Console Window using a red colored typeface.
-</P>
-
-<P>The Console Window responds to special character commands just as a shell window
-does: it has a history mechanism which allows the user to scan previously used commands
-by pressing the up and down arrow keys on the keyboard, jumping to the beginning or
-end of a line by entering Ctrl-A or Ctrl-E, erasing a line by pressing Ctrl-K, and
-more. Users familiar with GNU Emacs will recognize these keys as commonly used
-keystrokes from that editor.</P>
-
-<H3><A NAME="display_hlp">Getting Help</A></H3>
-The Console Window has its own online help system. To access the help system, enter
-"help" at the prompt and follow the on-screen instructions. For more help, please
-consult the <!-- What is this really called? --> <I>GDB User's Guide</I>.
-</BODY>
-</HTML>
diff --git a/gdb/gdbtk/library/help/trace/gbl_pref.html b/gdb/gdbtk/library/help/trace/gbl_pref.html
deleted file mode 100644
index 2760750c4e9..00000000000
--- a/gdb/gdbtk/library/help/trace/gbl_pref.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>Global Preferences Help</TITLE>
-</HEAD>
-<BODY>
-<H1>Global Preferences</H1>
-<H3>Overview</H3>
-<P>Not yet done.</P>
-
-<P>Global Preferences topics:
-<UL>
- <LI><UL><A HREF="#">stuff</A>
- <LI><A HREF="#">stuff</A>
- <LI><A HREF="#">stuff</A>
- </UL>
-</UL></P>
-
-<H3><A NAME="">stuff</A></H3>
-</BODY>
-</HTML>
diff --git a/gdb/gdbtk/library/help/trace/help.html b/gdb/gdbtk/library/help/trace/help.html
deleted file mode 100644
index 3a3640da1a1..00000000000
--- a/gdb/gdbtk/library/help/trace/help.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>Help Window Help</TITLE>
-</HEAD>
-<BODY>
-<H1>The Help Window</H1>
-<H2>Overview</H2>
-<P>This is some nice text which describes the help window, its role
-in deugging, and perhaps some of the nifty things people can do with
-this window.</P>
-
-<P>Help Window topics:
-<UL>
- <LI><UL><A HREF="#menus">Menus</A>
- <LI><A HREF="#menus_file">File Menu</A>
- <LI><A HREF="#menus_topics">Topics Menu</A>
- </UL>
- <LI><UL><A HREF="#display">Help Display</A>
- <LI><A HREF="#display_nav">Navigating the Help Window</A>
- <LI><A HREF="#display_link">Definition and Page Links</A>
- </UL>
-</UL></P>
-
-<H2><A NAME="menus">Menus</A></H2>
-<H3><A NAME="menus_file">File Menu</A></H3>
-<H3><A NAME="menus_topics">Topics Menu</A></H3>
-
-<H3><A NAME="display">Help Display</A></H3>
-<H3><A NAME="display_nav">Navigating the Help Window</A></H3>
-<H3><A NAME="display_link">Definition and Page Links</A></H3>
-</BODY>
-</HTML>
diff --git a/gdb/gdbtk/library/help/trace/index.toc b/gdb/gdbtk/library/help/trace/index.toc
deleted file mode 100644
index 3559d66350e..00000000000
--- a/gdb/gdbtk/library/help/trace/index.toc
+++ /dev/null
@@ -1,10 +0,0 @@
-{Source Window} {source.html} {The Source Window}
-{Register Window} {register.html} {The Register Window}
-{Memory Window} {memory.html} {The Memory Window}
-{Locals Window} {locals.html} {The Locals Window}
-{Watch Window} {watch.html} {The Watch Window}
-{Tracepoint Window} {tp.html} {The Tracepoint Window}
-{Console Window} {console.html} {The Console Window}
-{Stack Window} {stack.html} {The Stack Window}
-{TDump Window} {tdump.html} {The Tracepoint Dump Window}
-{GPL} {license.html} {The GNU Public License}
diff --git a/gdb/gdbtk/library/help/trace/license.html b/gdb/gdbtk/library/help/trace/license.html
deleted file mode 100644
index b43da4cb3a4..00000000000
--- a/gdb/gdbtk/library/help/trace/license.html
+++ /dev/null
@@ -1,305 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>GNU General Public License</TITLE>
-</HEAD><BODY>
-<B>The GNU General Public License
-<P></P>
-</B>Version 2, June 1991
-<P></P>
-Copyright © 1989, 1991 Free Software Foundation, Inc.
-<BR>59 Temple Place / Suite 330, Boston, MA 02111-1307, USA
-<P></P>
-Everyone is permitted to copy and distribute verbatim copies of this license
-document, but changing it is not allowed.
-<P></P>
-<B>Preamble
-<P></P>
-</B>The licenses for most software are designed to take away your freedom to share
-and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and
-change free software to make sure the software is free for all its users. This General Public
-License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some
-other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs,
-too.
-<P></P>
-When we speak of free software, we are referring to freedom, not price. Our
-General Public Licenses are designed to make sure that you have the freedom to
-distribute copies of free software (and charge for this service if you wish),
-that you receive source code or can get it if you want it, that you can change the
-software or use pieces of it in new free programs; and that you know you can
-do these things.
-<P></P>
-To protect your rights, we need to make restrictions that forbid anyone to
-deny you these rights or to ask you to surrender the rights. These restrictions
-translate to certain responsibilities for you if you distribute copies of the
-software, or if you modify it.
-<P></P>
-For example, if you distribute copies of such a program, whether gratis or for
-a fee, you must give the recipients all the rights that you have. You must
-make sure that they, too, receive or can get the source code. And you must show
-them these terms so they know their rights.
-<P></P>
-We protect your rights with two steps: (1) copyright the software, and (2)
-offer you this license which gives you legal permission to copy, distribute and/or
-modify the software.
-<P></P>
-Also, for each author's protection and ours, we want to make certain that everyone understands that
-there is no warranty for this free software. If the software is modified by
-someone else and passed on, we want its recipients to know that what they have is
-not the original, so that any problems introduced by others will not reflect on
-the original authors' reputations.
-<P></P>
-Finally, any free program is threatened constantly by software patents. We
-wish to avoid the danger that redistributors of a free program will individually
-obtain patent licenses, in effect making the program proprietary. To prevent
-this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for
-copying, distribution and modification follow.
-<P></P>
-<B>TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-<P></P>
-</B>0. This License applies to any program or other work which contains a notice
-placed by the copyright holder saying it may be distributed under the terms of this
-General Public License. The `Program”, below, refers to any such program or work, and a `work based on the Program' means either the Program or any derivative work under copyright law: that is
-to say, a work containing the Program or a portion of it, either verbatim or
-with modifications and/or translated into another language. (Hereinafter,
-translation is included without limitation in the term `modification'.) Each licensee is addressed as `you'.
-<P></P>
-Activities other than copying, distribution and modification are not covered
-by this License; they are outside its scope. The act of running the Program is
-not restricted, and the output from the Program is covered only if its contents
-constitute a work based on the Program (independent of having been made by
-running the Program). Whether that is true depends on what the Program does.
-<P></P>
-<OL><LI> You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate copyright notice and
-disclaimer of warranty; keep intact all the notices that refer to this License
-and to the absence of any warranty; and give any other recipients of the Program
-a copy of this License along with the Program.
-<P></P>
-</OL>You may charge a fee for the physical act of transferring a copy, and you may
-at your option offer warranty protection in exchange for a fee.
-<P></P>
-<OL START="2"><LI> You may modify your copy or copies of the Program or any portion of it, thus
-forming a work based on the Program, and copy and distribute such modifications
-or work under the terms of Section 1 above, provided that you also meet all of
-these conditions:
-<P></P>
-</OL>a) You must cause the modified files to carry prominent notices stating that you
-changed the files and the date of any change.
-<P></P>
-b) You must cause any work that you distribute or publish, that in whole or in
-part contains or is derived from the Program or any part thereof, to be licensed
-as a whole at no charge to all third parties under the terms of this License.
-<P></P>
-c) If the modified program normally reads commands interactively when run, you
-must cause it, when started running for such interactive use in the most ordinary
-way, to print or display an announcement including an appropriate copyright
-notice and a notice that there is no warranty (or else, saying that you provide a
-warranty) and that users may redistribute the program under these conditions,
-and telling the user how to view a copy of this License. (Exception: if the
-Program itself is interactive but does not normally print such an announcement,
-your work based on the Program is not required to print an announcement.)
-<P></P>
-These requirements apply to the modified work as a whole. If identifiable
-sections of that work are not derived from the Program, and can be reasonably
-considered independent and separate works in themselves, then this License, and its
-terms, do not apply to those sections when you distribute them as separate
-works. But when you distribute the same sections as part of a whole which is a work
-based on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the entire whole,
-and thus to each and every part regardless of who wrote it.
-<P></P>
-Thus, it is not the intent of this section to claim rights or contest your
-rights to work written entirely by you; rather, the intent is to exercise the
-right to control the distribution of derivative or collective works based on the
-Program.
-<P></P>
-In addition, mere aggregation of another work not based on the Program with
-the Program (or with a work based on the Program) on a volume of a storage or
-distribution medium does not bring the other work under the scope of this License.
-<P></P>
-<OL START="3"><LI> You may copy and distribute the Program (or a work based on it, under Section
-2) in object code or executable form under the terms of Sections 1 and 2 above
-provided that you also do one of the following:
-<P></P>
-</OL>a) Accompany it with the complete corresponding machine-readable source code,
-which must be distributed under the terms of Sections 1 and 2 above on a medium
-customarily used for software interchange; or,
-<P></P>
-b) Accompany it with a written offer, valid for at least three years, to give any
-third party, for a charge no more than your cost of physically performing
-source distribution, a complete machine-readable copy of the corresponding source
-code, to be distributed under the terms of Sections 1 and 2 above on a medium
-customarily used for software interchange; or,
-<P></P>
-c) Accompany it with the information you received as to the offer to distribute
-corresponding source code. (This alternative is allowed only for noncommercial
-distribution and only if you received the program in object code or executable
-form with such an offer, in accord with Subsection b above.)
-<P></P>
-The source code for a work means the preferred form of the work for making
-modifications to it. For an executable work, complete source code means all the
-source code for all modules it contains, plus any associated interface definition
-files, plus the scripts used to control compilation and installation of the
-executable. However, as a special exception, the source code distributed need not
-include anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the operating
-system on which the executable runs, unless that component itself accompanies the
-executable.
-<P></P>
-If distribution of executable or object code is made by offering access to
-copy from a designated place, then offering equivalent access to copy the source
-code from the same place counts as distribution of the source code, even though
-third parties are not compelled to copy the source along with the object code.
-<P></P>
-<OL START="4"><LI> You may not copy, modify, sublicense, or distribute the Program except as
-expressly provided under this License. Any attempt otherwise to copy, modify,
-sublicense or distribute the Program is void, and will automatically terminate your
-rights under this License. However, parties who have received copies, or
-rights, from you under this License will not have their licenses terminated so long
-as such parties remain in full compliance.
-<P></P>
-<LI> You are not required to accept this License, since you have not signed it.
-However, nothing else grants you permission to modify or distribute the Program or
-its derivative works. These actions are prohibited by law if you do not accept
-this License. Therefore, by modifying or distributing the Program (or any work
-based on the Program), you indicate your acceptance of this License to do so,
-and all its terms and conditions for copying, distributing or modifying the
-Program or works based on it.
-<P></P>
-<LI> Each time you redistribute the Program (or any work based on the Program), the
-recipient automatically receives a license from the original licensor to copy,
-distribute or modify the Program subject to these terms and conditions. You
-may not impose any further restrictions on the recipients' exercise of the rights granted herein.
-<P></P>
-</OL>You are not responsible for enforcing compliance by third parties to this
-License.
-<P></P>
-<OL START="7"><LI> If, as a consequence of a court judgment or allegation of patent infringement
-or for any other reason (not limited to patent issues), conditions are imposed
-on you (whether by court order, agreement or otherwise) that contradict the
-conditions of this License, they do not excuse you from the conditions of this
-License. If you cannot distribute so as to satisfy simultaneously your obligations
-under this License and any other pertinent obligations, then as a consequence
-you may not distribute the Program at all. For example, if a patent license
-would not permit royalty-free redistribution of the Program by all those who
-receive copies directly or indirectly through you, then the only way you could
-satisfy both it and this License would be to refrain entirely from distribution of
-the Program.
-<P></P>
-</OL>If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply and the
-section as a whole is intended to apply in other circumstances.
-<P></P>
-It is not the purpose of this section to induce you to infringe any patents or
-other property right claims or to contest validity of any such claims; this
-section has the sole purpose of protecting the integrity of the free software
-distribution system, which is implemented by public license practices. Many people
-have made generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that system; it is up
-to the author/donor to decide if he or she is willing to distribute software
-through any other system and a licensee cannot impose that choice.
-<P></P>
-This section is intended to make thoroughly clear what is believed to be a
-consequence of the rest of this License.
-<P></P>
-<OL START="8"><LI> If the distribution and/or use of the Program is restricted in certain
-countries either by patents or by copyrighted interfaces, the original copyright
-holder who places the Program under this License may add an explicit geographical
-distribution limitation excluding those countries, so that distribution is
-permitted only in or among countries not thus excluded. In such case, this License
-incorporates the limitation as if written in the body of this License.
-<P></P>
-<LI> The Free Software Foundation may publish revised and/or new versions of the
-General Public License from time to time. Such new versions will be similar in
-spirit to the present version, but may differ in detail to address new problems
-or concerns.
-<P></P>
-</OL>Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and `any later version', you have the option of following the terms and conditions either of that
-version or of any later version published by the Free Software Foundation. If the
-Program does not specify a version number of this License, you may choose any
-version ever published by the Free Software Foundation.
-<P></P>
-<OL START="a"><LI> If you wish to incorporate parts of the Program into other free programs whose
-distribution conditions are different, write to the author to ask for
-permission. For software which is copyrighted by the Free Software Foundation, write to
-the Free Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status of all
-derivatives of our free software and of promoting the sharing and reuse of software
-generally.
-<P></P>
-</OL>NO WARRANTY
-<P></P>
-<OL START="b"><LI> BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE
-PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED
-IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM `AS IS' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
-NECESSARY SERVICING, REPAIR OR CORRECTION.
-<P></P>
-<LI> IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY
-COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE
-PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL,
-SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
-INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF
-THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
-PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-<P></P>
-</OL>END OF TERMS AND CONDITIONS
-<P></P>
-<B>How to Apply These Terms to Your New Programs
-<P></P>
-</B>If you develop a new program, and you want it to be of the greatest possible
-use to the public, the best way to achieve this is to make it free software
-which everyone can redistribute and change under these terms.
-<P></P>
-To do so, attach the following notices to the program. It is safest to attach
-them to the start of each source file to most effectively convey the exclusion
-of warranty; and each file should have at least the `copyright' line and a pointer to where the full notice is found.
-<P></P>
-<I>one line for the program's name and a brief idea of what it does.
-<BR></I>Copyright (C) 19<I>yy</I> <I>name of author</I>
-<BR>
-<BR>This program is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free Software
-Foundation; either version 2 of the License, or (at your option) any later
-version.
-<BR>
-<BR>This program is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-<BR>
-<BR>You should have received a copy of the GNU General Public License along with
-this program; if not, write to the Free Software Foundation, Inc., 59 Temple
-Place - Suite 330, Boston, MA 02111-1307, USA.
-<P></P>
-Also add information on how to contact you by electronic and paper mail.
-<P></P>
-If the program is interactive, make it output a short notice like the
-following example when it starts in an interactive mode:
-<P></P>
-Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes
-with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain
-conditions; type `show c' for details.
-<P></P>
-The hypothetical commands <B>show w</B> and <B>show c</B> should show the appropriate parts of the General Public License. Of course,
-the commands you use may be called something other than show w and show c; they can be mouse clicks or menu items—whatever suits your program.
-<P></P>
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a `copyright disclaimer' for the program, if necessary. The following is a sample (when copying, alter
-the names).
-<P></P>
-Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker.
-<BR>
-<BR>signature of Ty Coon, 1 April 1989
-<BR>Ty Coon, President of Vice
-<P></P>
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may consider
-it more useful to permit linking proprietary applications with the library. If
-this is what you want to do, use the GNU Library General Public License instead of this License.
-<P></P>
-</BODY>
-</HTML> \ No newline at end of file
diff --git a/gdb/gdbtk/library/help/trace/locals.html b/gdb/gdbtk/library/help/trace/locals.html
deleted file mode 100644
index d0b1d2940e0..00000000000
--- a/gdb/gdbtk/library/help/trace/locals.html
+++ /dev/null
@@ -1,83 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>Locals Window Help</TITLE>
-</HEAD>
-<BODY>
-<H1>The Locals Window</H1>
-<H2>Overview</H2>
-<P>The Locals Window displays all local variables in scope. It may be used to
-visualize local variables. Local variables need to be collected
-before they can be viewed. See <A HREF="tracedlg.html#t_actions_add">Adding
-an Action</A> in the Tracepoint Dialog for more information.</P>
-
-<P>Locals Window topics:
-<UL>
- <LI><UL><A HREF="#menus">Variable Menu</A>
- <LI><A HREF="#menus_fmt">Format</A>
- </UL>
- <LI><UL><A HREF="#display">Locals Display</A>
- <LI><A HREF="#display_deref">Dereferencing Pointers</A>
- <LI><A HREF="#display_struct">Viewing a Structure or Class</A>
- <LI><A HREF="#display_popup">Locals Pop-up Menu</A>
- </UL>
-</UL></P>
-
-<H3><A NAME="menus">Variable Menu</A></H3>
-The Variable Menu gives on-screen access to the funtions of the Locals Window.
-To use any of these functions, first use the left mouse button to select a
-variable from the display. Then select:
-
-<DL>
- <DT><A NAME="menus_fmt">Format</A>
- <DD>Change the display format of the variable
-</DL>
-
-<H3><A NAME="display">Locals Display</A></H4>
-The Locals Window Display consists of a scrolled listbox which contains all
-local variables, one per line. Locals which were not collected at the current
-tracepoint will display a memory-access error. To use any of the functions of
-the Locals Window, use the left mouse button to select any element from the
-Display.
-
-<P>Pointers, structures, and classes appear in the display with small exapansion
-box before their names. To <A NAME="display_deref">dereference pointers</A> or
-<A NAME="display_struct">view the members of classes or structures</A>, click
-the closed expansion box (which appears as a small plus sign, "+") to "expand"
-the listing. The expansion box changes to a minus sign, "-", indicating that the
-display is now open. Pointers, structures and classes may be expanded recursively
-to allow multiple pointer dereferences and embedded structure viewing.
-
-<P>The Locals Display updates as the trace buffer is navigated, highlighting
-in blue those variables whose values have changed.</P>
-
-<P>The Locals Window will, by default, display all pointers in hexadecimal and all
-other variables in decimal. To change the default display of variables, use the
-"set output-radix" command in the console window. (Type "help set output-radix" in the
-console window for help. To make this change permanent, it must be added to the user's
-init file -- .gdbinit under unix and gdb.ini under Windows.) To change the display
-format for a variable, select the Format option from either the Variable Menu or the
-<A HREF="#display_popup">Locals Pop-up Menu</A>.
-<BR>
-
-<H4><A NAME="display_popup">Locals Pop-up Menu</A></H4>
-The Locals Pop-up Menu provides quick access to the functions of the Locals Window.
-To use the Locals Pop-up Menu, first select a variable from the Display (by clicking
-the left mouse button on it) and click the right mouse button, choosing from the
-pop-up:
-<DL>
- <DT>Format
- <DD>Change the display format of the variable. The variable may be displayed
- as:
- <DL>
- <DT>Hex
- <DD>hexadecimal (base 16)
- <DT>Decimal
- <DD>decimal (base 10)
- <DT>Binary
- <DD>binary (base 2)
- <DT>Octal
- <DD>octal (base 8)
- </DL>
-</DL>
-</BODY>
-</HTML>
diff --git a/gdb/gdbtk/library/help/trace/memory.html b/gdb/gdbtk/library/help/trace/memory.html
deleted file mode 100644
index ad1cb36b9d1..00000000000
--- a/gdb/gdbtk/library/help/trace/memory.html
+++ /dev/null
@@ -1,142 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>Memory Window Help</TITLE>
-</HEAD>
-<BODY>
-<H1>The Memory Window</H1>
-<H2>Overview</H2>
-<P>The Memory Window allows users to display the contents of collected
-memory. The Memory Window Preferences controls all of the display
-characteristics of the Memory Window.</P>
-
-<P>Memory Window topics:
-<UL>
- <LI><UL><A HREF="#menus">Address Menu</A>
- <LI><A HREF="#menus_auto">Auto Update</A>
- <LI><A HREF="#menus_now">Update Now</A>
- <LI><A HREF="#menus_prefs">Preferences</A>
- </UL>
- <LI><UL><A HREF="#display">Memory Display</A>
- <LI><A HREF="#display_nav">Navigating the Memory Window</A>
- <LI><A HREF="#display_popup">Memory Pop-up Menu</A>
- </UL>
- <LI><UL><A HREF="#prefs">Memory Window Preferences</A>
- <LI><A HREF="#prefs_size">Size of the Display Cell</A>
- <LI><A HREF="#prefs_fmt">Format of the Display Cell</A>
- <LI><A HREF="#prefs_bytes">Size of the Memory Window</A>
- <LI><A HREF="#prefs_misc">Miscellaneous</A>
- </UL>
-</UL></P>
-
-<H3><A NAME="menus">Address Menu</A></H3>
-<DL>
- <DT><A NAME="menus_auto">Auto Update</A>
- <DD>When selected, casues the Memory Window to update the Display.
- <DT><A NAME="menus_now">Update Now</A>
- <DD>Forces the Memory Window to update the Display.
- <DT><A NAME="menus_prefs">Preferences</A>
- <DD>Opens the Memory Window Preferences dialog.
-</DL>
-
-<H3><A NAME="display">Memory Display</A></H3>
-Like the <A HREF="register.html">Register Window</A>, the Memory Window
-Display is organized into a spreadsheet. The address of any cell in the
-Display can be determined by appeding the row and column headers for the
-cell. Optionally, an ASCII display of the memory appears at the right.
-Any non-ASCII-representable byte in memory will appear in the ASCII Display
-as a control character (a dot, ".", by default). The <A HREF="#pref">Memory
-Preferences Dialog</A> may be used to alter the appearance of the
-Memory Window. Any uncollected memory will appear as "N/A", indicating that
-this memory was not collected when the trace experiment was run.
-
-<P><A NAME="display_nav">To navigate the Memory Window</A>, use the mouse
-and click the cell of interest. As an alternative, pressing the TAB key on
-the keyboard will focus successive cells, from left to right, top to bottom.
-The focus will wrap from the bottom of the Display to the top.</P>
-<BR>
-
-<H4><A NAME="display_popup">Memory Pop-up Menu</A></H4>
-Clicking the right mouse button while the mouse cursor lies within the
-bounds of any cell will allow users to:
-<DL>
- <DT>Auto Update
- <DD>When selected, the Memory Window will track changes in
- memory shown in the Display. Cells in which changes have
- occured will be highlighted. When not selected, the Memory
- Window is "frozen", representing a "snapshot" of memory.
- <DT>Update Now
- <DD>Causes the Memory Window to update all the cells shown.
- <DT>Go To <I>address</I>
- <DD>The Memory Window Display is updated to show memory starting
- at address <I>address</I>.
- <DT>Open New Window at <I>address</I>
- <DD>A new Memory Window is opened, displaying memory at address
- <I>address</I>
- <DT>Memory Preferences...
- <DD>Opens the Memory Window Preferences for editing the appearance
- of the Memory Window Display.
-</DL>
-<BR>
-
-<H3><A NAME="prefs">Memory Window Preferences</A></H3>
-Memory Window Preference Dialog governs the appearance of the Memory Window:
-the total number of bytes displayed, the size of each cell, ASCII control
-character.
-<BR>
-
-<H4><A NAME="prefs_size">Size of the Display Cells</A></H4>
-This attribute controls how many bytes appear in each cell. Valid cell
-sizes in the Memory Window may be:
-<DL>
- <DT>Byte
- <DD>Each cell is exactly one byte
- <DT>Half Word
- <DD>Cells are displayed with two bytes
- <DT>Word
- <DD>Each cell contains four bytes
- <DT>Double Word
- <DD>Cells contain eight bytes
- <DT>Float
- <DD>Each cell contains four bytes, displayed as a floating point
- number
- <DT>Double Float
- <DD>Cells are displayed as floating point, eight bytes each
-</DL>
-<BR>
-
-<H4><A NAME="prefs_fmt">Format of the Display Cells</A></H4>
-The Format option of the Memory Preferences Dialog governs how the debugger
-represents the memory. Possible representations include:
-
-<DL>
- <DT>Binary
- <DD>The values are shown as binary numbers
- <DT>Signed Decimal
- <DD>The values are shown as signed decimal numbers
- <DT>Octal
- <DD>Each cell is represented as an octal number
- <DT>Unsigned Decimal
- <DD>Values are displayed as unsigned decimals
- <DT>Hex
- <DD>Memory is displayed as a hexadecimal number. This is
- the default.
-</DL>
-<BR>
-
-<H4><A NAME="prefs_bytes">Size of the Memory Window</A></H4>
-The size of the memory window determines how much memory is actually
-presented to the user. The total number of bytes shown can either be
-determined by the size of the window, in which case resizing the Memory
-Window will cause more or less memory to be displayed, or fixed at some
-specified number of bytes. By default, the Memory Window shows 128 bytes
-of memory.
-<BR>
-
-<H4><A NAME="prefs_misc">Miscellaneous</A></H4>
-Miscellaneous memory preferences include the option to display the ASCII
-representation of the memory, including what character to use for non-ASCII
-bytes (the "control" character). Additionally, users may specify the number
-of bytes per row, either four, eight, sixteen, or thirty-two. The default is
-sixteen bytes per row.
-</BODY>
-</HTML>
diff --git a/gdb/gdbtk/library/help/trace/reg_pref.html b/gdb/gdbtk/library/help/trace/reg_pref.html
deleted file mode 100644
index b21a5747df2..00000000000
--- a/gdb/gdbtk/library/help/trace/reg_pref.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>Register Window Preferences Help</TITLE>
-</HEAD>
-<BODY>
-<H1>Register Window Preferences</H1>
-<H3>Overview</H3>
-<P>Not yet done.</P>
-
-<P>Register Window Preferences topics:
-<UL>
- <LI><UL><A HREF="#">stuff</A>
- <LI><A HREF="#">stuff</A>
- <LI><A HREF="#">stuff</A>
- </UL>
-</UL></P>
-
-<H3><A NAME="">stuff</A></H3>
-</BODY>
-</HTML>
diff --git a/gdb/gdbtk/library/help/trace/register.html b/gdb/gdbtk/library/help/trace/register.html
deleted file mode 100644
index d0735593a12..00000000000
--- a/gdb/gdbtk/library/help/trace/register.html
+++ /dev/null
@@ -1,105 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>Register Window Help</TITLE>
-</HEAD>
-<BODY>
-<H1>The Register Window</H1>
-<H2>Overview</H2>
-<P>The Register Window lists all the registers and their contents for
-the selected stack frame. It permits viewing the contents of registers
-in different formats and some display customizations.</P>
-
-<P>Any register that was not collected will be displayed as having a value
-of "0x0". To collect registers, add them to the collection action in the
-<A HREF="tracedlg.html">Tracepoint Dialog</A>.
-
-<P>The Register Window will update the register contents in the display
-to match the stack frame currently being viewed in the <A HREF="source.html">
-Source Window</A> and <A HREF="stack.html">Stack Winodw</A>.</P>
-
-<P>Register Window topics:
-<UL>
- <LI><UL><A HREF="#menus">Register Menu</A>
- <LI><A HREF="#menus_fmt">Format</A>
- <LI><A HREF="#menus_remove">Remove from Display</A>
- <LI><A HREF="#menus_all">Display All Registers</A>
- </UL>
- <LI><UL><A HREF="#display">Register Display</A>
- <LI><A HREF="#display_nav">Navigating the Register Display</A>
- <LI><A HREF="#display_popup">Register Pop-up Menu</A>
- <LI><A HREF="#display_format">Changing the Display Format of
- a Register</A>
- <LI><A HREF="#display_remove">Removing a Register
- from the display</A>
- <LI><A HREF="#display_all">Displaying all Registers</A>
- </UL>
-</UL></P>
-
-<H3><A NAME="menus">Register Menu</A></H3>
-The Register Menu provides on-screen access to the functionality of the
-Register Window. To use any item from this menu, first use the mouse and
-select (click the left mouse button) on any register cell. Users may then
-select:
-<BR>
-<DL>
- <DT><A NAME="menus_fmt"><A HREF="#display_format">Format</A></A>
- <DD>Change the display format of the selected register
- <DT><A NAME="menus_remove"><A HREF="#display_remove">Remove
- from Display</A></A>
- <DD>Remove the selected register from the Register
- Window Display
- <DT><A NAME="menus_all"><A HREF="#display_all">Display All
- Registers</A></A>
- <DD>Display all registers in the Display. This item
- is only available when a register was previously
- removed from the Display.
-</DL>
-
-<H3><A NAME="display">Register Display</A></H3>
-The Register Display contains name and value pairs for each register
-available on the target hardware. These "cells" are layed out as a
-spreadsheet for ease of use.
-
-<P><A NAME="display_nav"></A>To navigate the Register Display, use either
-the mouse and left mouse button or the arrow keys on the keyboard to
-highlight the appropriate cell. Users may then use the <A HREF="#menus">
-Register Menu</A> or use the Register Pop-up Menu to access special display
-options for the Register Window.</P>
-<BR>
-
-<H4><A NAME="display_popup">The Register Pop-up Menu</A></H4>
-All of the special functions of the register window are accessed through
-the Register Pop-up Menu. To use the Menu, simply select a register (see
-<A HREF="#display_nav">Navigating the Register Display</A>) and click the
-right mouse button. The Menu offers:
-<DL>
- <DT><A NAME="display_format">Format</A>
- <DD><DL>Change the display format of the register. Valid display types
- are:
- <DT>Hex
- <DD>The register's contents are displayed in
- hexadecimal (base 16).
- <DT>Decimal
- <DD>The value is shown as
- a decimal number (base 10).
- <DT>Natural
- <DD>The register is displayed in its natural format.
- <DT>Binary
- <DD>The contents of the register are displayed
- as a binary number (base 2).
- <DT>Octal
- <DD>The register's contents are shown in octal (base 8).
- <DT>Raw
- <DD>The raw contents of the register are shown.
- </DL>
- <DT><A NAME="display_remove">Remove</A>
- <DD>Remove the selected register from the display. To display
- the removed register again, select the "Display All Registers"
- option from the Register Menu or the Register Pop-up Menu.
- <DT><A NAME="display_all">Display All Registers</A>
- <DD>Causes the Register Window Display to show all registers,
- including those which were previously "removed". This menu
- item is only available when removed registers exist.
-</DL>
-</BODY>
-</HTML>
diff --git a/gdb/gdbtk/library/help/trace/source.html b/gdb/gdbtk/library/help/trace/source.html
deleted file mode 100644
index 9ec0005227b..00000000000
--- a/gdb/gdbtk/library/help/trace/source.html
+++ /dev/null
@@ -1,371 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>Source Window Help</TITLE>
-</HEAD>
-<BODY>
-<CENTER><H1>The Source Window</H1></CENTER>
-<H3>Overview</H3>
-<BR>
-The Source Window is the primary interface between the user and the
-debugger; it is automatically opened when the debugger starts.
-The Source Window displays the status of the trace experiment, controls
-navigation of the trace buffer, and allows visualization of the program
-execution.
-
-<P>Source Window topics:
-<UL>
- <LI><UL><A HREF="#menus">Menus</A>
- <LI><A HREF="#menus_file">File Menu</A>
- <LI><A HREF="#menus_run">Run Menu</A>
- <LI><A HREF="#menus_view">View Menu</A>
- <LI><A HREF="#menus_trace">Trace Menu</A>
- <LI><A HREF="#menus_prefs">Preferences Menu</A>
- </UL>
- <LI><UL><A HREF="#toolbar">Toolbar</A>
- <LI><A HREF="#toolbar_exec">Trace Control Buttons</A>
- <LI><A HREF="#toolbar_window">Window Buttons</A>
- <LI><A HREF="#toolbar_frame">Frame Control</A>
- </UL>
- <LI><UL><A HREF="#display">Source Window Display</A>
- <LI><A HREF="#display_balloon">Variable Balloons</A>
- <LI><A HREF="#display_popup">Source Pop-up Mens</A>
- </UL>
- <LI><UL><A HREF="#status">Source Window Status Bars</A>
- <LI><A HREF="#status_bar">Program Status Bar</A>
- <LI><A HREF="#status_mode">Source Display Status Bar</A>
- </UL>
- <LI><A HREF="#search">Search Entry</A>
-</UL></P>
-
-<H3><A NAME="menus">Menus</A></H3>
-<H4><A NAME="menus_file">File Menu</A></H4>
-The File menu contains the following items:
-<DL>
- <DT>Open
- <DD>Opens a file selection dialog to select the executable to debug
- <DT>Target Settings...
- <DD>Opens the <A HREF="target.html">Target Selection Dialog</A>
- to edit target settings
- <DT>Page Setup
- <DD>(Windows only) Opens the Windows Page Setup dialog to
- configure printing
- <DT>Print
- <DD>(Windows only) Print the contents of the Source Window Display
- <DT>Exit
- <DD>Exits the debugger
-</DL>
-
-<H4><A NAME="menus_run">Run Menu</A></H4>
-The Run menu contains the following items:
-<DL>
- <DT>Connect to target
- <DD>Establish a connection to a target. This option will open
- the <A HREF="target.html">Target Selection Dialog</A> if no
- previous connection has been established in the current
- session.
- <DT>Begin Collection
- <DD>Start collecting trace data on the target
- <DT>End Collection
- <DD>Stop collecting trace data on the target
- <DT>Disconnect
- <DD>Disconnect the debugger from the target
-</DL>
-
-<H4><A NAME="menus_view">View Menu</A></H4>
-The View menu contains the following items:
-<DL>
- <DT>Stack
- <DD>Open a <A HREF="stack.html">Stack Window</A>
- <DT>Registers
- <DD>Open a <A HREF="register.html">Register Window</A>
- <DT>Memory
- <DD>Open a <A HREF="memory.html">Memory Window</A>
- <DT>Watch Expressions
- <DD>Open a <A HREF="watch.html">Watch Window</A>
- <DT>Local Variables
- <DD>Open a <A HREF="locals.html">Locals Window</A>
- <DT>Tracepoints
- <DD>Open a <A HREF="tp.html">Tracepoint Window</A>
- <DT>Tdump
- <DD>Open a <A HREF="tdump.html">Tracepoint Dump Window</A>
- <DT>Console
- <DD>Open a <A HREF="console.html">Console Window</A>
-</DL>
-
-<H4><A NAME="menus_trace">Trace Menu</A></H4>
-The Trace Menu contains the following items:
-<DL>
- <DT>Next Hit
- <DD>Update all displays with the next tracepoint in the
- tracepoint buffer
- <DT>Previous Hit
- <DD>Go to the previous tracepoint in the buffer
- <DT>First Hit
- <DD>View the first tracepoint in the buffer
- <DT>Next Line Hit
- <DD>Go to the next tracepoint in the buffer in the same
- frame as the current tracepoint
- <DT>Next Hit Here
- <DD>Jump to the next reference of the current tracepoint
- in the buffer
- <DT>Tfind Line...
- <DD>Opens a dialog allowing the user to specify which source
- line to inpect in the tracepoint buffer
- <DT>Tfind PC...
- <DD>Opens a dialog allowing the user to specify the PC of the
- tracepoint to view
- <DT>Tfind Tracepoint...
- <DD>Opens a dialog allowing the user to specify which tracepoint
- to view (by number). This option is most commonly used in
- conjunction with the <A HREF="console.html">Console Window</A>.
-</DL>
-
-<H4><A NAME="menus_prefs">Preferences Menu</A></H4>
-The Preferences menu contains the following items:
-<DL>
- <DT>Global
- <DD>Opens the <A HREF="gbl_pref.html">Global Preferences Dialog</A>
- and allows editing of global settings
- <DT>Source
- <DD>Opens the <A HREF="src_pref.html">Source Preferences Dialog</A>
- and allows editing of Source Window settings
- <DT>Register
- <DD>Opens the <A HREF="reg_pref.html">Register Preferences Dialog</A>
- and allows editing of Register Window settings
-</DL>
-
-<H3><A NAME="toolbar">Toolbar</A></H3>
-The Source Window toolbar consists of three functional sections: trace
-control buttons, debugger window buttons, and stack frame control buttons.
-<BR>
-
-<H4><A NAME="toolbar_exec">Tracing Control Buttons</A></H4>
-These convenience buttons provide on-screen access to the most important
-debugger tracing control functions:
-<DL>
- <DT><A NAME="run_button"><IMG SRC="%run"> TStart</A> or
- <A NAME="stop_button"><IMG SRC="%stop"></A> TStop
- <DD>The TStart Button causes the target to start collecting trace data
- <DD>The TStop Button causes the target to stop collecting trace data
- <DT>Next Hit
- <DD>Update all displays with the next tracepoint in the
- tracepoint buffer
- <DT>Previous Hit
- <DD>Go to the previous tracepoint in the buffer
- <DT>First Hit
- <DD>View the first tracepoint in the buffer
- <DT>Next Line Hit
- <DD>Go to the next tracepoint in the buffer in the same
- frame as the current tracepoint
- <DT>Next Hit Here
- <DD>Jump to the next reference of the current tracepoint
- in the buffer
-</DL>
-
-<H4><A NAME="toolbar_window">Window Buttons</A></H4>
-The Debugger Window buttons give instant access to the Debugger's
-auxillary windows:
-<DL>
- <DT><A NAME="register_button"><IMG SRC="%register"></A> Registers
- <DD>Open a <A HREF="register.html">Register Window</A>
- <DT><A NAME="memory_button"><IMG SRC="%memory"></A> Memory
- <DD>Open a <A HREF="memory.html">Memory Window</A>
- <DT><A NAME="stack_button"><IMG SRC="%stack"></A> Stack
- <DD>Open a <A HREF="stack.html">Stack Window</A>
- <DT><A NAME="watch_button"><IMG SRC="%watch"></A> Watch Expressions
- <DD>Open a <A HREF="watch.html">Watch Window</A>
- <DT><A NAME="locals_button"><IMG SRC="%locals"></A> Local Variables
- <DD>Open a <A HREF="locals.html">Locals Window</A>
- <DT><A NAME="tracepoints_button">Tracepoints</A>
- <DD>Open a <A HREF="tp.html">Tracepoint Window</A>
- <DT>Tracepoint Dump Window
- <DD>Open a <A HREF="tdump.html">Tdump Window</A>
- <DT><A NAME="console_button"><IMG SRC="%console"></A> Console
- <DD>Open a <A HREF="console.html">Console Window</A>
-</DL>
-
-<H4><A NAME="toolbar_frame">Frame Control</A></H4>
-The Frame Control area of the toolbar displays information about the PC of
-the current frame, and the frame control buttons may be used to navigate
-through the call stack. Whenever any of these buttons are used, both the
-Source Window Display and the <A HREF="stack.html">Stack Window</A> will
-show the selected frame. In order to use the Stack Window in tracing mode,
-the stack pointer must be collected.
-<DL>
- <!-- is this a problem for windows? no file join? -->
- <DT><IMG SRC="images/frame_info.gif"> Frame Information Display
- <DD>The left half of the frame information display shows the
- value of the PC in the current frame. The right half shows
- the line number of the PC in the source file, if available.
- <DT><A NAME="up_button"><IMG SRC="%up"></A> Up
- <DD>Select and view the stack frame that called this one
- <DT><A NAME="down_button"><IMG SRC="%down"></A> Down
- <DD>Select and view the stack frame called by this one
- <DT><A NAME="bottom_button"><IMG SRC="%bottom"></A> Bottom
- <DD>Select and view the bottom-most stack frame
-</DL>
-
-<H3><A NAME="display">Source Display</A></H3>
-The Source Display is used for many things: browsing source code, setting,
-editing, and deleting tracepoints, and a few other special functions.
-Executable lines (those for which executable code was generated by the
-compiler) are denoted with a marker (a dash, "-") in the first column of
-the display.
-
-<P>The debugger highlights the PC in the current frame in either green,
-indicating that the PC is in the current tracepoint, or gold, indicating
-that the PC is contained in a frame that is not the current tracepoint, i.e.,
-as part of a stack backtrace. A blue highlight is used by the debugger to
-indicate a browsing position. All highlight colors
-are user-selectable in the <A HREF="src_pref.html">Source Preferences</A>.</P>
-<BR>
-
-<H4><A NAME="setting_a_tracepoint">Setting a Tracepoint</A></H4>
-Moving the mouse pointer over the "hot spot" of an executable line will change
-the mouse cursor to a large dot. Clicking the left mouse button will then allow
-tracepoint to be inserted at this line. If no tracepoint exists, the
-<A HREF="tracedlg.html">Add Tracepoint Dialog</A> will appear. If a tracepoint
-is installed, the dash in the left margin will change into a magenta breakdot.
-If a tracepoint exists, the <A HREF="tracedlg.html">Edit Tracepoint Dialog</A>
-appears, allowing either modification of the tracepoint or deletion of the
-tracepoint. If the tracepoint is deleted, the breakdot will revert to a dash.</P>
-
-<P>The executable line marker shows the status of each line: an empty marker
-(the dash) indicates that no tracepoint is set at the line. A colored breakdot
-indicates that a tracepoint exists at the line.</P>
-
-<P>The display will attempt to show the value of variables in
-<A NAME="display_balloon">variable balloons</A>. To activate a
-variable balloon, simply hold the mouse cursor over the name of
-a variable in the Source Display for a second or two: the debugger displays the
-name of the variable, its type, and its value in a pop-up balloon. If the
-variable was not collected, the Variable Balloon will show a memory-access error.</P>
-<BR>
-
-<H4><A NAME="display_popup">Source Pop-up Menus</A></H4>
-The Source Display has two pop-up menus. One is activated by clicking the
-right mouse button when the mouse cursor is over an executable line marker's
-hot spot. This pop-up menu provides access to:
-<DL>
- <DT>Set Tracepoint
- <DD>Opens the <A HREF="#tracedlg">Add/Edit Tracepoint Dialog</A>,
- which allows new tracepoints to be set and modification and
- deletion of existing tracepoints.
-</DL>
-
-<P>The other pop-up menu is activated by clicking the right mouse button
-anywhere else in the Source Display. It is only available when a variable
-or number in the display lies below the mouse cursor or is selected
-(by clicking the left mouse button and dragging the mouse to highlight
-the variable/number). The pop-up menu allows users to:
-<DL>
- <DT><A NAME="add_to_watch">Add <I>expr</I> to Watch</A>
- <DD>Adds the selected expression to the <A HREF="watch.html">Watch
- Window</A>, opening it, if necessary.
- <DT>Dump Memory at <I>expr</I>
- <DD>Opens a new <A HREF="memory.html">Memory Window</A> at the
- selected expression. If the expression is a variable, then
- the Memory Window is opened with memory addresses starting
- at the value of the variable.
- <DT>Set Tracepoint Range
- <DD>This option is only available when a range of lines is highlighted
- in the Source Display. It allows tracepoints with the same
- properties to be set at every executable line in the range. If
- any tracepoints exist in the range already, the debugger will
- ask if the properties of the existing tracepoint should be
- replaced with the properties of the range.
-</DL>
-</P>
-
-<H4><A NAME="status">Source Window Status Bars</A></H4>
-The Source Window has two status bars which inform the user of the
-status of the program (the "status bar") and the status of the Source
-Window.
-
-<P>The <A NAME="status_bar">Program Status Bar</A> (or simply "Status Bar")
-displays the status of the program. Common messages seen here include:
-<DL>
- <DT>No program loaded.
- <DD>No program has been loaded into target memory.
- <DT>Inspecting trace at <I>line/address</I>
- <DD>The debugger is inspecting the tracepoint at line
- <I>line</I> or address <I>address</I>. Use the
- <A HREF="#toolbar_exec">Tracing Control Buttons</A>
- to navigate through the trace buffer.
-</DL>
-<P>The Status Bar also displays some help information. For instance,
-the Status Bar will show the function of a button on the toolbar or
-the Source Display Status Bar as well as any keyboard shortcut for this
-button.</P>
-<BR>
-
-<H4><A NAME="status_mode">Source Display Status Bar</A></H4>
-current state of the Source Window: the name of the file displayed in
-the Display, the name of the function in the Display which contains
-the PC for the current frame (if any), and the display mode.
-
-<P>The <A NAME="file_selector">Source File Selector</A> is a dropdown
-menu which contains the names of all the files that were compiled into
-the program being debugged.</P>
-
-<P>Normally, the File Selector displays the name of the file currently being
-viewed, but any file from the dropdown menu may be selected for browsing.
-Simply select the file to view from the available choices (or type it directly
-into the File Selector) and the Source Window will load that file into
-the Display. To return to the current tracepoint, simply press the
-<A HREF="#bottom_button">Bottom Frame Control Button</A>.</P>
-
-<P>The <A NAME="function_selector">Source Function Selector</A> displays the
-name of the function containing the Source Window's PC, if one exists, but it
-may be used to browse any function in the current file. Simply type the name
-of the desired function into the Function Selector or select it from the
-dropdown menu. The Source Window's PC is updated to point at this function.
-To return to the current tracepoint, simply press the
-<A HREF="#bottom_button">Bottom Frame Control Button</A>.</P>
-
-<P>The <A NAME="mode_selector">Source Display Mode Selector</A> displays
-the viewing mode of the current file/function shown in the Source
-Window Display.</P>
-
-<P>The Display Mode Selector may be used to change the view of the current
-source file. The available display modes are
-<DL>
- <DT>SOURCE
- <DD>The contents of the Display are shown as source code.
- If source code is not available (either because no debugging
- information is available or the source file is not found),
- the Source Window will revert the Display Mode to "ASSEMBLY".
- <DT>ASSEMBLY
- <DD>A disassembly of the target's memory is shown in the Display.
- Even assembly source files show a disassembly of target memory;
- to see the assembly source code, use the SOURCE mode. Note that the
- debugger can only display assmebly code on a function-by-function
- basis. It cannot display all the instructions generated from a single
- source file.
- <DT>MIXED
- <DD>The Display shows source code mixed with the assembler
- instructions which were generated for those lines by the
- compiler for the current funtion. Note that the addresses
- of the assembly lines is not necessarily monotonically
- increasing. If the source file associated with the function
- cannot be found, the Source Window will revert to ASSEMBLY mode.
- <DT>SRC+ASM
- <DD>The Source Window Display is divided into two panes: an
- assembly pane and a source pane. Tracepoints may be set/cleared
- in either pane.
-</DL>
-<BR>
-
-<H3><A NAME="search">Search Entry</A></H3>
-The Search Entry facilitates searching for text in the Source Window Display. Simply enter the
-text to be found into the Search Entry and press the Enter key on the keyboard to search
-forwards in the Source Window Display (hold down ths Shift key to search backwards). If
-a match is found, it is highlighted in the Source Window and the Program Status Bar
-displays information about where the match was found.
-
-<P>The Search Entry can also jump the Source Window to a specific line. Enter the line
-number preceeded by an at-sign (@) into the Search Entry and press enter. If entered
-line number is greater than the total number of lines in the Source Window Display,
-the Display will jump to the end of the current file.</P>
-</BODY>
-</HTML>
diff --git a/gdb/gdbtk/library/help/trace/src_pref.html b/gdb/gdbtk/library/help/trace/src_pref.html
deleted file mode 100644
index e8547964653..00000000000
--- a/gdb/gdbtk/library/help/trace/src_pref.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>Source Window Preferences Help</TITLE>
-</HEAD>
-<BODY>
-<H1>Source Window Preferences</H1>
-<H3>Overview</H3>
-<P>Not yet done.</P>
-
-<P>Source Preferences topics:
-<UL>
- <LI><UL><A HREF="#">stuff</A>
- <LI><A HREF="#">stuff</A>
- <LI><A HREF="#">stuff</A>
- </UL>
-</UL></P>
-
-<H3><A NAME="">stuff</A></H3>
-</BODY>
-</HTML>
diff --git a/gdb/gdbtk/library/help/trace/stack.html b/gdb/gdbtk/library/help/trace/stack.html
deleted file mode 100644
index 25bbf0b54f4..00000000000
--- a/gdb/gdbtk/library/help/trace/stack.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>Stack Window Help</TITLE>
-</HEAD>
-<BODY>
-<H1>The Stack Window</H1>
-<H3>Overview</H3>
-<P>The Stack Window allows users to view the call stack and jump between
-levels of the stack. To use the Stack Window in tracepoint mode, the
-stack pointer must be collected. See
-<A HREF="tracedlg.html#t_actions_add">Adding an Action</A> in the Tracepoint
-Dialog for more information on collecting registers.</P>
-
-<P>Stack Window topics:
-<UL>
- <LI><UL><A HREF="#display">Stack Display</A>
- <LI><A HREF="#display_nav">Navigating the Stack Window</A>
- <LI><A HREF="#display_lvl">Changing the Stack Level</A>
- </UL>
-</UL></P>
-
-<H3><A NAME="display">Stack Display</A></H3>
-The Stack Display consists of a listbox which displays levels of the call stack
-one per line. Each line contains the level number (useful when using the <A
-HREF="console.html">Console Window</A>) and a description of the function executing
-in that level. Typically, the function name and either the address of the function
-or the file and line number where the function is defined are displayed. The
-Stack Window may also be used to jump between levels of the stack.
-<BR>
-
-<H4><A NAME="display_nav">Navigating the Stack Window</A></H4>
-Navigation of the Stack Window is accomplished by clicking on the desired level
-with the left mouse button. The <A HREF="source.html#display">Source Window
-Display</A> updates to show the selected frame. All other secondary windows,
-<A HREF="register.html">Registers</A>, <A HREF="watch.html">Watch</A>, and
-<A HREF="locals.html">Locals</A> update their displays for the selected frame.
-<BR>
-
-<H4><A NAME="display_lvl">Changing Stack Levels</A></H4>
-To switch frames, simply click the left mouse button on the desired frame and the
-debugger will switch contexts, updating all windows. The selected frame is highlighted
-(in gold, by default).
-
-<P>As an alternative, changing stack levels may be accomplished via the
-<A HREF="source.html#toolbar_frame">Frame Control Buttons</A> on the Source Window's
-Toolbar. These buttons may be used to change frames one level at a time (either
-immediately up or immediately down) or to jump to the bottom-most stack frame.
-See <A HREF="source.html#toolbar_frame">Source Frame Control Buttons</A> for more
-information.</P>
-</BODY>
-</HTML>
diff --git a/gdb/gdbtk/library/help/trace/target.html b/gdb/gdbtk/library/help/trace/target.html
deleted file mode 100644
index 83c6420a138..00000000000
--- a/gdb/gdbtk/library/help/trace/target.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>Target Selection Help</TITLE>
-</HEAD>
-<BODY>
-<H1>The Target Selection Dialog</H1>
-<H3>Overview</H3>
-<P>The Target Selection Dialog allows users to specify the debug target,
-the interface used to connect to the target, and some useful run
-options.</P>
-
-<P>Target Selection topics:
-<UL>
- <LI><UL><A HREF="#select">Selecting a Target</A>
- <LI><A HREF="#select_tar">Specifying a Target</A>
- <LI><A HREF="#select_int">Choosing a Connection Interface</A>
- </UL>
- <LI><UL><A HREF="#options">Run Options</A>
- <LI><A HREF="#options_run_until_main">Run until 'main'</A>
- <LI><A HREF="#options_bp_at_exit">Set breakpoint at 'exit'</A>
- <LI><A HREF="#options_download_dialog">Display Download Dialog</A>
- <LI><A HREF="#options_compare_to_remote_executable">Compare to
- remote executable</A>
- </UL>
-</UL></P>
-
-<H3><A NAME="select">Selecting a Target</A></H3>
-Selecting a target involves choosing a target for debugging and setting connection
-interface options for the target.
-
-<P>Common targets include: "exec" for native debuggers, "remote" for establishing
-a connection to a target board via a serial line, "remotetcp" for TCP connections,
-and "sim" for connections to the simulator. There may be more depending on the
-configuration of the debugger being used.</P>
-
-<P>In general, "remote" targets are always serial connections which require the user
-to specify the serial port and baud rate to be used for the connection and
-"remotetcp" targets are always TCP connections which require specifying the hostname
-and port number of the machine to which to connect. Depending upon configuration,
-there may be numerous serial- and TCP-based connections. These always follow the
-naming convention <I>target</I> and <I>target</I>tcp.</P>
-
-<P>To <A NAME="select_tar"> select a target</A>, choose one of the available targets
-from the dropdown menu in the Connection Frame. Then <A NAME="#select_int">specify
-the interface options</A> for this target: selecting the baudrate and serial port
-from the dropdown menus (serial targets only) or entering the hostname and port number
-(TCP targets only).</P>
-
-<H3><A NAME="options">Run Options</A></H3>
-Three run options which may be selected include:
-<DL>
- <DT><A NAME="options_run_until_main">Run until 'main'
- <DD>Sets a breakpoint at main(). This has no effect when using
- GDB in tracing mode.
- <DT><A NAME="options_bp_at_exit">Set breakpoint at 'exit'
- <DD>Sets a breakpoint at exit(). This has no effect when using
- GDB in tracing mode.
- <DT><A NAME="options_download_dialog">Display Download Dialog
- <DD>Displays a dialog showing the progress of the download to
- the target section by section. This has no effect when using
- GDB in tracing mode.
- <DT><A NAME="options_compare_to_remote_executable">
- Compare to remote executable</A>
- <DD>When attaching to a tracing target, compare the host's and target's
- executable by computing the checksum of each loadable section.
-</DL>
-</BODY>
-</HTML>
diff --git a/gdb/gdbtk/library/help/trace/tdump.html b/gdb/gdbtk/library/help/trace/tdump.html
deleted file mode 100644
index 1850cb00373..00000000000
--- a/gdb/gdbtk/library/help/trace/tdump.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>Trace Dump Window Help</TITLE>
-</HEAD>
-<BODY>
-<H1>The TDump Window</H1>
-<H3>Overview</H3>
-<P>The Tdump Window displays all of the information contained in the
-trace buffer for the current tracepoint. To view the contents of the
-trace buffer for a specific tracepoint, use the <A HREF="source.html#toolbar_exec">
-Tracing Control Buttons</A> on the <A HREF="source.html#toolbar">Source Window Toolbar
-</A>, or jump to the tracepoint using one of the Tfind Dialogs accessible
-through the Source Window's <A HREF="source.html#menus_trace">Trace Menu</A>.
-</P>
-</BODY>
-</HTML>
diff --git a/gdb/gdbtk/library/help/trace/tp.html b/gdb/gdbtk/library/help/trace/tp.html
deleted file mode 100644
index 471e1d545e9..00000000000
--- a/gdb/gdbtk/library/help/trace/tp.html
+++ /dev/null
@@ -1,111 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>Tracepoint Window Help</TITLE>
-</HEAD>
-<BODY>
-<H1>The Tracepoint Window</H1>
-<H3>Overview</H3>
-<P>The Tracepoint Window lists all the various tracepoints that exist in
-the program. It facilitates modifying tracepoints (make them
-temporary or normal, disabled or enabled) and removing tracepoints.</P>
-
-<P>Tracepoint Window topics:
-<UL>
- <LI><UL><A HREF="#menus">Menus</A>
- <LI><A HREF="#menus_bp">Tracepoint Menu</A>
- <LI><A HREF="#menus_global">Global Menu</A>
- </UL>
- <LI><UL><A HREF="#display">Tracepoint Display</A>
- <LI><A HREF="#display_state">Enabling/Disabling Tracepoints</A>
- <LI><A HREF="#display_remove">Removing Tracepoints</A>
- <LI><A HREF="#display_popup">Tracepoint Pop-up Menu</A>
- </UL>
-</UL></P>
-
-<H3><A NAME="menus">Menus</A></H3>
-The Tracepoint Window contains two menus, one which deals specifically with
-the individual tracepoints selected in the window, and one whose commands
-affect all tracepoints.
-<BR>
-
-<H4><A NAME="menus_bp">Tracepoint Menu</A></H4>
-The Tracepoint Menu operates on the selected tracepoint only. The
-state of a tracepoint may be changed by selecting the desired state
-from the menu:
-<DL>
- <DT>Actions
- <DD><A HREF="tracedlg.html">Display the Tracepoint Dialog</A> for
- this tracepoint.
- <DT>Enabled
- <DD>The tracepoint is active and will stop the debugger
- when it is hit.
- <DT>Disabled
- <DD>The tracepoint is being ignored. A disabled tracepoint
- will never get hit.
- <DT>Remove
- <DD>Deletes the tracepoint
-</DL>
-<BR>
-
-<H4><A NAME="menus_global">Global Menu</A></H4>
-Items on the Global Menu affect all defined tracepoints. Users may:
-<DL>
- <DT>Enable All
- <DD>Enable all tracepoints
- <DT>Disable All
- <DD>Disable all tracepoints
- <DT>Remove All
- <DD>Delete all tracepoints
-</DL>
-<BR>
-
-<H4><A NAME="display">Tracepoint Display</A></H4>
-The Tracepoint Display is a table of tracepoints. The first column of the
-table (unlabeled) shows a checkbutton, indicating whether the tracepoint
-is enabled (checked) or disabled (unchecked). Disabled tracepoints are
-ignored and will not cause any actions to be performed on the target.
-
-<P>To use the Tracepoint Menu or the Tracepoint Pop-up Menu, first use
-the left mouse button to select a tracepoint from the list, then make the
-menu selection.</P>
-
-<H3>Modifying Tracepoints</H3>
-To <A NAME="display_state">enable</A> a tracepoint, simply click the
-checkbutton in the first column of the desired tracepoint so that it is
-selected (checked). To disable a tracepoint, "uncheck" the checkbutton.
-
-<P>To remove a <A NAME="display_remove">tracepoint</A>, use the left mouse
-button to select the tracepoint to remove and use either the tracepoint Menu
-or the Tracepoint Pop-up Menu to select "remove". To re-install a tracepoint,
-use the <A HREF="source.html#setting_a_tracepoint">Source Window Display</A>.
-</P>
-<BR>
-
-<H4><A NAME="display_popup">Tracepoint Pop-up Menu</A></H4>
-The Tracepoint Pop-up Menu is accessed by using the mouse cursor to select
-a tracepoint from the Tracepoint Display and then clicking the right button
-on the mouse. The Pop-up allows expert users quicker access to the functions
-of the Tracepoint Menu:
-<DL>
- <DT>Actions
- <DD>Display the <A HREF="tracedlg.html">Tracepoint Dialog</A> for
- the selected tracepoint. This allows the tracepoint's actions
- to viewed or edited.
- <DT>Enabled
- <DD>The tracepoint is active and will causes actions to be
- performed on the target when it is hit
- <DT>Disabled
- <DD>The tracepoint is being ignored. A disabled tracepoint
- will never perform any actions or be recorded in the trace
- buffer.
- <DT>Remove
- <DD>Deletes the tracepoint
- <DT>Global, Enable All
- <DD>Enable all tracepoints
- <DT>Global, Disable All
- <DD>Disable all tracepoints
- <DT>Global, Remove All
- <DD>Delete all tracepoints
-</DL>
-</BODY>
-</HTML>
diff --git a/gdb/gdbtk/library/help/trace/tracedlg.html b/gdb/gdbtk/library/help/trace/tracedlg.html
deleted file mode 100644
index 0ad9504471b..00000000000
--- a/gdb/gdbtk/library/help/trace/tracedlg.html
+++ /dev/null
@@ -1,134 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>Tracepoint Dialogs Help</TITLE>
-</HEAD>
-<BODY>
-<H1>Tracepoint Dialogs</H1>
-<H3>Overview</H3>
-<P>There are two Tracepoint Dialogs which help users set tracepoints:
-The Tracepoint Dialog is used to view and add actions and The Actions
-Dialog is used to edit a particular action specified in the
-tracepoint's Action List.</P>
-
-<P>Tracepoint Dialogs topics:
-<UL>
- <LI><A HREF="#tracedlg">The Tracepoint Dialog</A>
- <UL>
- <LI><A HREF="#t_experiment">Experiment Frame</A>
- <LI><A HREF="#t_actions">Actions Frame</A>
- <UL>
- <LI><A HREF="#t_actions_passcount">Number of Passes</A>
- <LI><A HREF="#t_actions_add">Adding Actions</A>
- <LI><A HREF="#t_actions_modify">Modifying Actions</A>
- </UL>
- </UL>
- <LI><A HREF="#actionsdlg">The Actions Dialog</A>
- <UL>
- <LI><A HREF="#a_variables">Variables List</A>
- <LI><A HREF="#a_collect">Collection List</A>
- <LI><A HREF="#a_other">Other Entry</A>
- </UL>
-</UL></P>
-
-<H3><A NAME="tracedlg">The Tracepoint Dialog</H3>
-The Tracepoint Dialog is the gateway to viewing and editing
-the properties of any tracepoint. The same dialog is used
-to add new tracepoints and edit and delete existing tracepoints,
-for both single tracepoints and ranges of tracepoints.
-
-<H4><A NAME="t_experiment">Experiment Frame</A></H4>
-The Experiment Frame displays information about the tracepoint's
-location in the program and its status. Specifically,
-<DL>
- <DT>Number
- <DD>The internal number for this tracepoint. New tracepoints
- all have the number "-1". This number may be used to
- refer to specific tracepoints when using the
- <A HREF="console.html">Console Window</A>
- <DT>Hit Count
- <DD>The number of times the tracepoint has been hit
- <DT>Thread
- <DD>The thread in which the tracepoint exists. This
- feature is not currently implemented.
- <DT>Function
- <DD>The function in which the tracepoint is set
- <DT>File
- <DD>The file in which the tracepoint is set
- <DT>Line(s)
- <DD>The line at which the tracepoint is set or the
- lines which the tracepoint range affects
-</DL>
-<BR>
-
-<H4><A NAME="t_actions">Actions Frame</A></H4>
-The Actions Frame displays the user-settable properties of the
-tracepoint, including all actions and a pass count.
-
-<P>A pass count specifies the number of times that the tracepoint
-can be hit on the target before the tracing experiment ceases. A
-pass count of five means that this tracepoint will issue a silent
-"tstop" when it is hit the fifth time (after it has performed all
-it actions). A pass count of zero (0) means that the tracepoint
-will never causes the trace experiment to terminate on the target.</P>
-
-<P>To <A NAME="t_actions_add">add an action</A> for the tracepoint,
-select the appropriate action from the Action ComboBox and click
-"Add". The <A HREF="#actionsdlg">Action Dialog</A> appears to
-allow editing the action's properties.</P>
-
-<P>Currently, there are two actions: collect and while-stepping.
-Any number of collect actions may be added to specify that the
-target should collect variables, registers, and memory when
-it is hit. The while-stepping action may be used to collect
-data for a specified number of machine instructions. Only one
-while-stepping action may be specified for any tracepoint.</P>
-
-<P>To <A NAME="t_actions_modify">modify the actions</A> associated
-with a tracepoint, double-click the left mouse button on the action
-listed in the Action Frame, and the <A HREF="#actionsdlg">Actions
-Dialog</A> will appear.</P>
-
-<P>To accept the tracepoint as displayed, click the OK button. To abort
-installing or editing the tracepoint, click the CANCEL button. To delete
-the tracepoint (if it is not a new tracepoint), click the DELETE button.</P>
-
-<H3><A NAME="actionsdlg">The Actions Dialog</A></H3>
-The Actions Dialog is used to edit an action for the tracepoint. It
-consists of two lists, one containing all (uncollected) local variables
-(including function arguments) and registers, and one containing everything
-being collected.
-
-<P>The <A NAME="#a_variables">Variables List</A> lists all uncollected local variables,
-function arguments, and registers and may also display the special indentifiers
-"All Locals", "All Arguments", and "All Registers". Global variables (and file static
-variables) do not appear on the Variable List.</P>
-
-<P>To move a variable from the Variables List to the Collection List, double-click
-the variable in the Variables List or select the variable in the Variable
-List and press the "<<< Collect" button. To specify a range of variables to be
-collected, select them in the Variables list and click the "<<< Collect" button.</P>
-
-<P><A NAME="a_collect">The Collection List displays all data being collected
-by the action, including the special types "All Locals", "All Registers", and
-"All Arguments", which specify that every local variable, every register, and
-every function argument will be collected, respectively. Specifying a local
-variable, for example, and "All Locals" will cause only the special identifier
-"All Locals" to be sent to the target. Analogously, "All Registers" and "All
-Arguments" also override any register or function argument specifically listed
-in the Collection List.</P>
-
-<P>To remove data from the Collection List, double-click any of the entries listed
-in the List, or select a range of data to be removed and press the "Ignore >>>"
-button. All local variables, function arguments, registers, and special identifiers
-will be returned to the Variable List, while any expression (memory ranges, globals)
-will simply "disappear". To add these again, use the <A HREF="#a_other">Other Entry</A>
-at the bottom of the display.</P>
-
-<P>The <A NAME="#a_other">Other Entry</A> can be used to move any variable listed in
-either the Collection List or the Variable List to the other list. It can also
-be used to specify expressions for collection, such as memory ranges and global variables.
-Simply enter the name of the global variable or the expression and press the enter key on
-the keyboard. If the expression is valid, it will be added/removed from the Collection
-List.</P>
-</BODY>
-</HTML>
diff --git a/gdb/gdbtk/library/help/trace/watch.html b/gdb/gdbtk/library/help/trace/watch.html
deleted file mode 100644
index 373ad183a96..00000000000
--- a/gdb/gdbtk/library/help/trace/watch.html
+++ /dev/null
@@ -1,118 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>Watch Window Help</TITLE>
-</HEAD>
-<BODY>
-<H1>The Watch Window</H1>
-<H3>Overview</H3>
-<P>The Watch Window may be used to inspect any collected expression, including
-global variables, static variables, local variables, function arguments,
-and registers.</P>
-
-<P>Watch Window topics:
-<UL>
- <LI><UL><A HREF="#menus">Watch Menu</A>
- <LI><A HREF="#menus_fmt">Format</A>
- <LI><A HREF="#menus_remove">Remove</A>
- </UL>
- <LI><UL><A HREF="#new">Adding Watch Expressions</A>
- <LI><A HREF="#new_ent">In the Watch Window</A>
- <LI><A HREF="#new_src">In the Source Window</A>
- <LI><A HREF="#new_cast">Casting Pointers</A>
- </UL>
- <LI><UL><A HREF="#display">Watch Display</A>
- <LI><A HREF="#display_deref">Dereferencing Pointers</A>
- <LI><A HREF="#display_struct">Viewing a Structure or Class</A>
- <LI><A HREF="#display_popup">Watch Pop-up Menu</A>
- </UL>
-</UL></P>
-
-<H3><A NAME="menus">Watch Menu</A></H3>
-The Watch Menu gives on-screen access to the funtions of the Watch Window.
-To use any of these functions, first use the left mouse button to select an
-expression from the display. Then select:
-
-<DL>
- <DT><A NAME="menus_fmt">Format</A>
- <DD>Change the display format of the expression
- <DT><A NAME="menus_remove">Remove</A>
- <DD>Remove the expression from the Watch Window
-</DL>
-
-<H3><A NAME="new">Adding Watch Expressions</A></H3>
-<A NAME="new_ent">To add an expression to the Watch Window</A>, simply enter
-the expression into the entry at the bottom of the window and press return
-or click the "Add Watch" button. The expression is validated and added to the
-Watch Window Display.
-
-<P><A NAME="new_src">To add an expression to the Watch Window from the
-<A HREF="source.html">Source Window</A></A>, use the
-"<A HREF="source.html#add_to_watch">Add to Watch</A>" option of the
-<A HREF="source.html#display_popup">Source Window Pop-up Menu</A>.</P>
-
-<P>Any legal expression may be added to the Watch Window, which will
-evaluate each of its expressions everytime the program runs. Be cautious
-adding expressions which cause assignments, such as "<CODE>i++</CODE>".</P>
-
-<P>Adding a register to the Watch Window can be advantages when debugging
-via a slow serial line. In this case, keeping the entire Register Window open
-may be inefficient. Consider adding the register to the Watch Window. Simply
-enter the name of the register preceded with a dollar sign ($) into the
-Entry. For example, to watch the PC register, enter "<CODE>$pc</CODE>" into
-the Watch Window Entry. The program counter is added to the Display.</P>
-
-<P><A NAME="new_cast">To cast pointers</A>, simply enter the cast into the
-Watch Window Entry at the bottom of the window. Use the same syntax for the
-cast that the source file uses. If the source file uses C, the a simple
-cast of "<CODE>ptr</CODE>" of type "<CODE>void *</CODE>" can be cast to type
-"<CODE>my_struct</CODE>" by entering "<CODE>(my_struct *) ptr</CODE>" into
-the Entry.</P>
-
-<H3><A NAME="display">Watch Display</A></H3>
-The Watch Window Display consists of a scrolled listbox which contains all
-watch expressions, one per line. To use any of the functions of the Watch
-Window, use the left mouse button to select any element from the Display.
-
-<P>Pointers, structures, and classes appear in the display with a small
-exapansion box before their names. To <A NAME="display_deref">dereference
-pointers</A> or <A NAME="display_struct">view the members of classes or
-structures</A>, click the closed expansion box (which appears as a small
-plus sign, "+") to "expand" the listing. The expansion box changes to a
-minus sign, "-", indicating that the display is now open. Pointers,
-structures and classes may be expanded recursively to allow multiple pointer
-dereferences and embedded structure viewing.
-
-<P>The Locals Display updates as the trace buffer is navigated, highlighting
-in blue those variables whose values have changed.</P>
-
-<P>The Watch Window will, by default, display all pointers in hexadecimal and all
-other variables in decimal. To change the default display of variables, use the
-"set output-radix" command in the console window. (Type "help set output-radix" in the
-console window for help. To make this change permanent, it must be added to the user's
-init file -- .gdbinit under unix and gdb.ini under Windows.) To change the display
-format for a variable, select the Format option from either the Variable Menu or the
-<A HREF="#display_popup">Watch Pop-up Menu</A>.
-<BR>
-
-<H4><A NAME="display_popup">Watch Pop-up Menu</A></H4>
-The Watch Pop-up Menu provides quick access to the functions of the Watch Window.
-To use the Locals Pop-up Menu, first select an expression from the Display (by
-clicking the left mouse button on it) and click the right mouse button, choosing
-from the pop-up:
-<DL>
- <DT>Format
- <DD>Change the display format of the expression. The expression may be
- displayed as:
- <DL>
- <DT>Hex
- <DD>hexadecimal (base 16)
- <DT>Decimal
- <DD>decimal (base 10)
- <DT>Binary
- <DD>binary (base 2)
- <DT>Octal
- <DD>octal (base 8)
- </DL>
-</DL>
-</BODY>
-</HTML>
diff --git a/gdb/gdbtk/library/help/watch.html b/gdb/gdbtk/library/help/watch.html
deleted file mode 100644
index 01e253b1883..00000000000
--- a/gdb/gdbtk/library/help/watch.html
+++ /dev/null
@@ -1,86 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>Watch Window Help</TITLE>
-</HEAD>
-<BODY>
-<H1>The Watch Window</H1>
-<img src="images/watch.png" alt="Watch Window Image" width=545 height=308 border=0>
-<H2>Overview</H2>
-
-<P>The Watch Window may be used to inspect and edit any expression, including
-global variables, static variables, local variables, function arguments,
-and registers. All expressions in scope are displayed with the expression in
-blue, the expression type in red, and the expression value in black. When an
-expression value changes, it is displayed in green. Expressions that are not
-in scope are all gray.</P>
-
-
-<H3>Adding Watch Expressions</H3>
-<p>To add an expression to the Watch Window, simply enter
-the expression into the entry at the bottom of the window and press return
-or click the "Add Watch" button. The expression is validated and added to the
-Watch Window Display.</p>
-
-<P>To add an expression to the Watch Window from the
-<A HREF="source.html">Source Window</A>, use the
-"<A HREF="source.html#add_to_watch">Add to Watch</A>" option of the
-<A HREF="source.html#display_popup">Source Window Pop-up Menu</A>.</P>
-
-<P>Any legal expression may be added to the Watch Window, which will
-evaluate each of its expressions everytime the program runs. Be cautious
-adding expressions which cause assignments, such as "<CODE>i++</CODE>".</P>
-
-<P>Adding a register to the Watch Window can be advantages when debugging
-via a slow serial line. In this case, keeping the entire Register Window open
-may be inefficient. Consider adding the register to the Watch Window. Simply
-enter the name of the register preceded with a dollar sign ($) into the
-Entry. For example, to watch the PC register, enter "<CODE>$pc</CODE>" into
-the Watch Window Entry. The program counter is added to the Display.</P>
-
-<P>To cast pointers, simply enter the cast into the
-Watch Window Entry at the bottom of the window. Use the same syntax for the
-cast that the source file uses. If the source file uses C, the a simple
-cast of "<CODE>ptr</CODE>" of type "<CODE>void *</CODE>" can be cast to type
-"<CODE>my_struct</CODE>" by entering "<CODE>(my_struct *) ptr</CODE>" into
-the Entry.</P>
-
-<H3>Watch Display</H3>
-<p>The Watch Window Display consists of a scrolled listbox which contains all
-watch expressions, one per line. To use any of the functions of the Watch
-Window, use the left mouse button to select any element from the Display.</p>
-
-<P>Pointers, structures, and classes appear in the display with a small
-exapansion box before their names. To dereference
-pointers or view the members of classes or
-structures, click the closed expansion box (which appears as a small
-plus sign, "+") to "expand" the listing. The expansion box changes to a
-minus sign, "-", indicating that the display is now open. Pointers,
-structures and classes may be expanded recursively to allow multiple pointer
-derefernces and embedded structure viewing.</P>
-
-<P>The Watch Display updates after every execution of the program and
-highlights in green those expressions whose values have changed.</P>
-
-<P>The Watch Window will, by default, display all pointers and registers in
-hexadecimal and all other expressions in decimal. To change the display
-format for an expression, select the Format option from the pop-up menu.</P>
-
-<H3>Editing an Expression</H3>
-<p>To edit an expression, either double-click the left mouse button on the expression
-in the Display or select the Edit option from the popup-menu. To abort editing
-an expression's value, simply press
-the escape key on the keyboard. The expression's original value is restored.</p>
-
-<H3>Watch Pop-up Menu</H3>
-<p>The pop-up menu provides quick access to the functions of the Watch Window.
-To use the pop-up menu, click the right mouse button while over a variable.</p>
-<DL>
- <dt>Format<dd>Change the display format of the variable.</dd></dt>
- <dt>Edit<dd>Edit the variable's value.</dd></dt>
- <dt>Delete<dd>Remove the variable from the display.</dd></dt>
- <dt>Dump Memory<dd>Open a Memory Window with the variable's value as an aaddress.</dd></dt>
- <dt>Help<dd>Open this help page.</dd></dt>
- <dt>Close<dd>Close the Local Variables Window.</dd></dt>
-</DL>
-</BODY>
-</HTML>
diff --git a/gdb/gdbtk/library/helpviewer.tcl b/gdb/gdbtk/library/helpviewer.tcl
deleted file mode 100644
index 8597f5d5eba..00000000000
--- a/gdb/gdbtk/library/helpviewer.tcl
+++ /dev/null
@@ -1,98 +0,0 @@
-# Open a viewer for HTML help info
-# Copyright (C) 2002, Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# ------------------------------------------------------------------------------
-# NAME: public proc open_help
-# SYNOPSIS: open_help file
-# DESC: Opens html help file using an appropriate
-# browser.
-# ------------------------------------------------------------------------------
-
-proc open_help {hfile} {
- debug $hfile
- # create full pathname link
- set link file://[file join $::GDBTK_LIBRARY help $hfile]
-
- # windows is easy
- if {$::tcl_platform(platform) == "windows"} {
- ide_shell_execute open $link
- return
- }
-
- #
- # for Unix, we never know what is installed
- #
-
- # set list of viewer apps to try
- switch [pref get gdb/compat] {
- "KDE" {
- set apps {htmlview khelpcenter firefox opera mozilla}
- }
- "GNOME" {
- set apps {htmlview firefox opera mozilla gnome-help khelpcenter}
- }
- default {
- set apps {htmlview firefox opera mozilla gnome-help khelpcenter netscape}
- }
- }
-
- # If the user has previously entered a browser name, append it
- # to the list. Should it go first or last?
- set bname [pref get gdb/help/browsername]
- if {$bname != ""} {
- lappend apps $bname
- }
-
- # now loop through list checking each application
- foreach app $apps {
- debug "app=$app"
- if {[catch "exec $app $link &" result]} {
- debug "$app failed: $result"
- } else {
- return
- }
- }
-
- # if we reached here, nothing worked, so prompt for a name
- set text "No help browser was found on your system.\n\
-Please enter the name of an HTML viewer application."
- while {[set app [prompt_helpname $text]] != "0"} {
- if {$app != ""} {
- if {[catch "exec $app $link &" result]} {
- dbug W "$app failed: $result"
- set text "Could not run application $app.\n\
-Please enter the name of an HTML viewer application."
- } else {
- pref set gdb/help/browsername $app
- return
- }
- }
- }
-}
-
-# displays an entry dialog and asks for the name of an application
-# returns 0 on cancel
-# name on success
-proc prompt_helpname {text} {
- iwidgets::promptdialog .pd -title "Browser Query" -modality application \
- -labeltext $text
- if {[.pd activate]} {
- set app [string trim [.pd get]]
- destroy .pd
- return $app
- }
- destroy .pd
- debug "cancelled"
- return 0
-}
-
diff --git a/gdb/gdbtk/library/images/Movie_off.gif b/gdb/gdbtk/library/images/Movie_off.gif
deleted file mode 100644
index 7fce569189e..00000000000
--- a/gdb/gdbtk/library/images/Movie_off.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/Movie_on.gif b/gdb/gdbtk/library/images/Movie_on.gif
deleted file mode 100644
index 51e29d679b2..00000000000
--- a/gdb/gdbtk/library/images/Movie_on.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/bottom.gif b/gdb/gdbtk/library/images/bottom.gif
deleted file mode 100644
index 82fe7ab0d2a..00000000000
--- a/gdb/gdbtk/library/images/bottom.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/bp.gif b/gdb/gdbtk/library/images/bp.gif
deleted file mode 100644
index 55a153d3e94..00000000000
--- a/gdb/gdbtk/library/images/bp.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/check.gif b/gdb/gdbtk/library/images/check.gif
deleted file mode 100644
index 37ff7d3ce81..00000000000
--- a/gdb/gdbtk/library/images/check.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/console.gif b/gdb/gdbtk/library/images/console.gif
deleted file mode 100644
index e9412b20540..00000000000
--- a/gdb/gdbtk/library/images/console.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/continue.gif b/gdb/gdbtk/library/images/continue.gif
deleted file mode 100644
index c3babce52ee..00000000000
--- a/gdb/gdbtk/library/images/continue.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/down.gif b/gdb/gdbtk/library/images/down.gif
deleted file mode 100644
index 0a591f4ac29..00000000000
--- a/gdb/gdbtk/library/images/down.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/edit.gif b/gdb/gdbtk/library/images/edit.gif
deleted file mode 100644
index bc033dbc066..00000000000
--- a/gdb/gdbtk/library/images/edit.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/finish.gif b/gdb/gdbtk/library/images/finish.gif
deleted file mode 100644
index d717238c335..00000000000
--- a/gdb/gdbtk/library/images/finish.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/gdbtk_icon.gif b/gdb/gdbtk/library/images/gdbtk_icon.gif
deleted file mode 100644
index 46f69e62852..00000000000
--- a/gdb/gdbtk/library/images/gdbtk_icon.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/help.gif b/gdb/gdbtk/library/images/help.gif
deleted file mode 100644
index 061e2c600cc..00000000000
--- a/gdb/gdbtk/library/images/help.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/home.gif b/gdb/gdbtk/library/images/home.gif
deleted file mode 100644
index ac71cd53388..00000000000
--- a/gdb/gdbtk/library/images/home.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/icons.txt b/gdb/gdbtk/library/images/icons.txt
deleted file mode 100644
index 2a15b5b4994..00000000000
--- a/gdb/gdbtk/library/images/icons.txt
+++ /dev/null
@@ -1 +0,0 @@
-Basic Icon Set
diff --git a/gdb/gdbtk/library/images/insight.gif b/gdb/gdbtk/library/images/insight.gif
deleted file mode 100644
index fa5cfe19617..00000000000
--- a/gdb/gdbtk/library/images/insight.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/less.gif b/gdb/gdbtk/library/images/less.gif
deleted file mode 100644
index 045025a8062..00000000000
--- a/gdb/gdbtk/library/images/less.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/memory.gif b/gdb/gdbtk/library/images/memory.gif
deleted file mode 100644
index 1f62949d7d5..00000000000
--- a/gdb/gdbtk/library/images/memory.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/more.gif b/gdb/gdbtk/library/images/more.gif
deleted file mode 100644
index 67cb020014e..00000000000
--- a/gdb/gdbtk/library/images/more.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/next.gif b/gdb/gdbtk/library/images/next.gif
deleted file mode 100644
index 99d1ea62ea7..00000000000
--- a/gdb/gdbtk/library/images/next.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/next_check.gif b/gdb/gdbtk/library/images/next_check.gif
deleted file mode 100644
index 4488f04c76b..00000000000
--- a/gdb/gdbtk/library/images/next_check.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/next_frame.gif b/gdb/gdbtk/library/images/next_frame.gif
deleted file mode 100644
index 1bbc97932c5..00000000000
--- a/gdb/gdbtk/library/images/next_frame.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/next_hit.gif b/gdb/gdbtk/library/images/next_hit.gif
deleted file mode 100644
index d65295c099a..00000000000
--- a/gdb/gdbtk/library/images/next_hit.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/next_line.gif b/gdb/gdbtk/library/images/next_line.gif
deleted file mode 100644
index 96b374f65e3..00000000000
--- a/gdb/gdbtk/library/images/next_line.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/nexti.gif b/gdb/gdbtk/library/images/nexti.gif
deleted file mode 100644
index d2b65d4a551..00000000000
--- a/gdb/gdbtk/library/images/nexti.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/open.gif b/gdb/gdbtk/library/images/open.gif
deleted file mode 100644
index 173290a2b9d..00000000000
--- a/gdb/gdbtk/library/images/open.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/prev_hit.gif b/gdb/gdbtk/library/images/prev_hit.gif
deleted file mode 100644
index 17ed5686ff9..00000000000
--- a/gdb/gdbtk/library/images/prev_hit.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/reg.gif b/gdb/gdbtk/library/images/reg.gif
deleted file mode 100644
index 8efac2fd28f..00000000000
--- a/gdb/gdbtk/library/images/reg.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/rewind.gif b/gdb/gdbtk/library/images/rewind.gif
deleted file mode 100644
index 60b3d6135b1..00000000000
--- a/gdb/gdbtk/library/images/rewind.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/run.gif b/gdb/gdbtk/library/images/run.gif
deleted file mode 100644
index 6f45f3a2a4d..00000000000
--- a/gdb/gdbtk/library/images/run.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/run_expt.gif b/gdb/gdbtk/library/images/run_expt.gif
deleted file mode 100644
index 1c5c37cbef3..00000000000
--- a/gdb/gdbtk/library/images/run_expt.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/src.gif b/gdb/gdbtk/library/images/src.gif
deleted file mode 100644
index a1890ef8759..00000000000
--- a/gdb/gdbtk/library/images/src.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/stack.gif b/gdb/gdbtk/library/images/stack.gif
deleted file mode 100644
index e17824a3592..00000000000
--- a/gdb/gdbtk/library/images/stack.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/step.gif b/gdb/gdbtk/library/images/step.gif
deleted file mode 100644
index 776c8c3466a..00000000000
--- a/gdb/gdbtk/library/images/step.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/stepi.gif b/gdb/gdbtk/library/images/stepi.gif
deleted file mode 100644
index d721c13e548..00000000000
--- a/gdb/gdbtk/library/images/stepi.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/stop.gif b/gdb/gdbtk/library/images/stop.gif
deleted file mode 100644
index d863aba7859..00000000000
--- a/gdb/gdbtk/library/images/stop.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/tdump.gif b/gdb/gdbtk/library/images/tdump.gif
deleted file mode 100644
index 87db34c06c6..00000000000
--- a/gdb/gdbtk/library/images/tdump.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/tp.gif b/gdb/gdbtk/library/images/tp.gif
deleted file mode 100644
index 6ddf743a3fa..00000000000
--- a/gdb/gdbtk/library/images/tp.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/up.gif b/gdb/gdbtk/library/images/up.gif
deleted file mode 100644
index df280098ebd..00000000000
--- a/gdb/gdbtk/library/images/up.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/vars.gif b/gdb/gdbtk/library/images/vars.gif
deleted file mode 100644
index 608fa9337b8..00000000000
--- a/gdb/gdbtk/library/images/vars.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/watch.gif b/gdb/gdbtk/library/images/watch.gif
deleted file mode 100644
index 077444d5fe1..00000000000
--- a/gdb/gdbtk/library/images/watch.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images/watch_movie.gif b/gdb/gdbtk/library/images/watch_movie.gif
deleted file mode 100644
index 855f703ac3f..00000000000
--- a/gdb/gdbtk/library/images/watch_movie.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/Movie_off.gif b/gdb/gdbtk/library/images2/Movie_off.gif
deleted file mode 100644
index 7fce569189e..00000000000
--- a/gdb/gdbtk/library/images2/Movie_off.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/Movie_on.gif b/gdb/gdbtk/library/images2/Movie_on.gif
deleted file mode 100644
index 51e29d679b2..00000000000
--- a/gdb/gdbtk/library/images2/Movie_on.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/bottom.gif b/gdb/gdbtk/library/images2/bottom.gif
deleted file mode 100644
index 1190cd2d2ad..00000000000
--- a/gdb/gdbtk/library/images2/bottom.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/bp.gif b/gdb/gdbtk/library/images2/bp.gif
deleted file mode 100644
index 55a153d3e94..00000000000
--- a/gdb/gdbtk/library/images2/bp.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/check.gif b/gdb/gdbtk/library/images2/check.gif
deleted file mode 100644
index 37ff7d3ce81..00000000000
--- a/gdb/gdbtk/library/images2/check.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/console.gif b/gdb/gdbtk/library/images2/console.gif
deleted file mode 100644
index e9412b20540..00000000000
--- a/gdb/gdbtk/library/images2/console.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/continue.gif b/gdb/gdbtk/library/images2/continue.gif
deleted file mode 100644
index 99c0673cdec..00000000000
--- a/gdb/gdbtk/library/images2/continue.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/down.gif b/gdb/gdbtk/library/images2/down.gif
deleted file mode 100644
index 09ae742f225..00000000000
--- a/gdb/gdbtk/library/images2/down.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/edit.gif b/gdb/gdbtk/library/images2/edit.gif
deleted file mode 100644
index 6ff9082861e..00000000000
--- a/gdb/gdbtk/library/images2/edit.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/finish.gif b/gdb/gdbtk/library/images2/finish.gif
deleted file mode 100644
index 3e4a077185c..00000000000
--- a/gdb/gdbtk/library/images2/finish.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/function.gif b/gdb/gdbtk/library/images2/function.gif
deleted file mode 100644
index c61f38a2724..00000000000
--- a/gdb/gdbtk/library/images2/function.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/gdbtk_icon.gif b/gdb/gdbtk/library/images2/gdbtk_icon.gif
deleted file mode 100644
index 46f69e62852..00000000000
--- a/gdb/gdbtk/library/images2/gdbtk_icon.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/help.gif b/gdb/gdbtk/library/images2/help.gif
deleted file mode 100644
index 1e127d6c0bb..00000000000
--- a/gdb/gdbtk/library/images2/help.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/home.gif b/gdb/gdbtk/library/images2/home.gif
deleted file mode 100644
index ac71cd53388..00000000000
--- a/gdb/gdbtk/library/images2/home.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/icons.txt b/gdb/gdbtk/library/images2/icons.txt
deleted file mode 100644
index eefb6d2c6e3..00000000000
--- a/gdb/gdbtk/library/images2/icons.txt
+++ /dev/null
@@ -1 +0,0 @@
-Windows-style Icon Set
diff --git a/gdb/gdbtk/library/images2/insight.gif b/gdb/gdbtk/library/images2/insight.gif
deleted file mode 100644
index fa5cfe19617..00000000000
--- a/gdb/gdbtk/library/images2/insight.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/less.gif b/gdb/gdbtk/library/images2/less.gif
deleted file mode 100644
index 045025a8062..00000000000
--- a/gdb/gdbtk/library/images2/less.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/memory.gif b/gdb/gdbtk/library/images2/memory.gif
deleted file mode 100644
index 1f62949d7d5..00000000000
--- a/gdb/gdbtk/library/images2/memory.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/more.gif b/gdb/gdbtk/library/images2/more.gif
deleted file mode 100644
index 67cb020014e..00000000000
--- a/gdb/gdbtk/library/images2/more.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/next.gif b/gdb/gdbtk/library/images2/next.gif
deleted file mode 100644
index 9675812ce9c..00000000000
--- a/gdb/gdbtk/library/images2/next.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/next_check.gif b/gdb/gdbtk/library/images2/next_check.gif
deleted file mode 100644
index 4488f04c76b..00000000000
--- a/gdb/gdbtk/library/images2/next_check.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/next_frame.gif b/gdb/gdbtk/library/images2/next_frame.gif
deleted file mode 100644
index 1bbc97932c5..00000000000
--- a/gdb/gdbtk/library/images2/next_frame.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/next_hit.gif b/gdb/gdbtk/library/images2/next_hit.gif
deleted file mode 100644
index d65295c099a..00000000000
--- a/gdb/gdbtk/library/images2/next_hit.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/next_line.gif b/gdb/gdbtk/library/images2/next_line.gif
deleted file mode 100644
index 96b374f65e3..00000000000
--- a/gdb/gdbtk/library/images2/next_line.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/nexti.gif b/gdb/gdbtk/library/images2/nexti.gif
deleted file mode 100644
index d05248fc6e1..00000000000
--- a/gdb/gdbtk/library/images2/nexti.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/open.gif b/gdb/gdbtk/library/images2/open.gif
deleted file mode 100644
index 173290a2b9d..00000000000
--- a/gdb/gdbtk/library/images2/open.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/prev_hit.gif b/gdb/gdbtk/library/images2/prev_hit.gif
deleted file mode 100644
index 17ed5686ff9..00000000000
--- a/gdb/gdbtk/library/images2/prev_hit.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/reg.gif b/gdb/gdbtk/library/images2/reg.gif
deleted file mode 100644
index 9f314a9bcf8..00000000000
--- a/gdb/gdbtk/library/images2/reg.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/rewind.gif b/gdb/gdbtk/library/images2/rewind.gif
deleted file mode 100644
index 60b3d6135b1..00000000000
--- a/gdb/gdbtk/library/images2/rewind.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/run.gif b/gdb/gdbtk/library/images2/run.gif
deleted file mode 100644
index 3a91e8efd37..00000000000
--- a/gdb/gdbtk/library/images2/run.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/run_expt.gif b/gdb/gdbtk/library/images2/run_expt.gif
deleted file mode 100644
index 1c5c37cbef3..00000000000
--- a/gdb/gdbtk/library/images2/run_expt.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/src.gif b/gdb/gdbtk/library/images2/src.gif
deleted file mode 100644
index 2b78909b2e9..00000000000
--- a/gdb/gdbtk/library/images2/src.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/stack.gif b/gdb/gdbtk/library/images2/stack.gif
deleted file mode 100644
index e17824a3592..00000000000
--- a/gdb/gdbtk/library/images2/stack.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/step.gif b/gdb/gdbtk/library/images2/step.gif
deleted file mode 100644
index 00caaf8fccd..00000000000
--- a/gdb/gdbtk/library/images2/step.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/stepi.gif b/gdb/gdbtk/library/images2/stepi.gif
deleted file mode 100644
index a7217659018..00000000000
--- a/gdb/gdbtk/library/images2/stepi.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/stop.gif b/gdb/gdbtk/library/images2/stop.gif
deleted file mode 100644
index 92ce1afa7d8..00000000000
--- a/gdb/gdbtk/library/images2/stop.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/target.gif b/gdb/gdbtk/library/images2/target.gif
deleted file mode 100644
index 9aa9c3ac25c..00000000000
--- a/gdb/gdbtk/library/images2/target.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/tdump.gif b/gdb/gdbtk/library/images2/tdump.gif
deleted file mode 100644
index 87db34c06c6..00000000000
--- a/gdb/gdbtk/library/images2/tdump.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/tp.gif b/gdb/gdbtk/library/images2/tp.gif
deleted file mode 100644
index 6ddf743a3fa..00000000000
--- a/gdb/gdbtk/library/images2/tp.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/up.gif b/gdb/gdbtk/library/images2/up.gif
deleted file mode 100644
index 262dbbf21c8..00000000000
--- a/gdb/gdbtk/library/images2/up.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/vars.gif b/gdb/gdbtk/library/images2/vars.gif
deleted file mode 100644
index 608fa9337b8..00000000000
--- a/gdb/gdbtk/library/images2/vars.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/watch.gif b/gdb/gdbtk/library/images2/watch.gif
deleted file mode 100644
index 077444d5fe1..00000000000
--- a/gdb/gdbtk/library/images2/watch.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/images2/watch_movie.gif b/gdb/gdbtk/library/images2/watch_movie.gif
deleted file mode 100644
index 855f703ac3f..00000000000
--- a/gdb/gdbtk/library/images2/watch_movie.gif
+++ /dev/null
Binary files differ
diff --git a/gdb/gdbtk/library/interface.tcl b/gdb/gdbtk/library/interface.tcl
deleted file mode 100644
index e9093f70e44..00000000000
--- a/gdb/gdbtk/library/interface.tcl
+++ /dev/null
@@ -1,1829 +0,0 @@
-# Interface between GDB and Insight.
-# Copyright (C) 1997, 1998, 1999, 2001, 2002, 2004 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-# This variable is reserved for this module. Ensure it is an array.
-global gdbtk_state
-set gdbtk_state(busyCount) 0
-
-# *** DEPRECATED: Use GDBEventHandler::breakpoint instead.
-# This is run when a breakpoint changes. The arguments are the
-# action, the breakpoint number, and the breakpoint info.
-#define_hook gdb_breakpoint_change_hook
-
-# *** DEPRECATED: Use GDBEventHandler::set_variable instead.
-# This is run when a `set' command successfully completes in gdb. The
-# first argument is the gdb variable name (as a Tcl list). The second
-# argument is the new value.
-#define_hook gdb_set_hook
-
-# ------------------------------------------------------------
-# PROC: gdbtk_tcl_set_variable - A "set" command was issued
-# in gdb to change an internal variable. Notify
-# gui.
-# ------------------------------------------------------------
-proc gdbtk_tcl_set_variable {var val} {
- set e [SetVariableEvent \#auto -variable $var -value $val]
- GDBEventHandler::dispatch $e
- delete object $e
-}
-
-####################################################################
-# #
-# GUI STATE HOOKS #
-# #
-####################################################################
-# !!!!! NOTE !!!!!
-# For debugging purposes, please put debug statements at the very
-# beginning and ends of all GUI state hooks.
-
-# *** DEPRECATED: Use GDBEventHandler::busy instead.
-# GDB_BUSY_HOOK
-# This hook is used to register a callback when the UI should
-# be disabled because the debugger is either busy or talking
-# to the target.
-#
-# All callbacks should disable ALL user input which could cause
-# any state changes in either the target or the debugger.
-#define_hook gdb_busy_hook
-
-# *** DEPRECATED: Use GDBEventHandler::idle instead.
-# GDB_IDLE_HOOK
-# This hook is used to register a callback when the UI should
-# be enabled because the debugger is no longer busy.
-#
-# All callbacks should enable user input. These callbacks
-# should also be as fast as possible to avoid any significant
-# time delays when enabling the UI.
-define_hook gdb_idle_hook
-
-# *** DEPRECATED: Use GDBEventHandler::update instead.
-# GDB_UPDATE_HOOK
-# This hook is used to register a callback to update the widget
-# when debugger state has changed.
-#define_hook gdb_update_hook
-
-# GDB_NO_INFERIOR_HOOK
-# This hook is used to register a callback which should be invoked
-# whenever there is no inferior (either at startup time or when
-# an inferior is killed).
-#
-# All callbacks should reset their windows to a known, "startup"
-# state.
-define_hook gdb_no_inferior_hook
-
-# GDB_DISPLAY_CHANGE_HOOK
-# This is run when a display changes. The arguments are the action,
-# the breakpoint number, and (optionally) the value.
-define_hook gdb_display_change_hook
-
-# GDB_TRACE_FIND_HOOK
-# This hook is run by the trace find command. It is used to switch
-# from control to browse mode when the user runs tfind commands...
-#
-define_hook gdb_trace_find_hook
-
-# ------------------------------------------------------------------
-# gdbtk_tcl_preloop - This function is called after gdb is initialized
-# but before the mainloop is started. It sets the app name, and
-# opens the first source window.
-# ------------------------------------------------------------------
-
-proc gdbtk_tcl_preloop { } {
- global gdb_exe_name gdb_current_directory
-
- set_baud
-
- tk appname gdbtk
- # If there was an error loading an executible specified on the command line
- # then we will have called pre_add_symbol, which would set us to busy,
- # but not the corresponding post_add_symbol. Do this here just in case...
- after idle gdbtk_idle
- ManagedWin::startup
-
- if {$gdb_exe_name != ""} {
- # At startup, file_changed_hook is called too late for us, so we
- # must notice the initial session by hand. If the arguments exist
- # -- if the user used `gdb --args' -- then we want the new
- # arguments and pwd to override what is set in the session.
- set current_args [gdb_get_inferior_args]
- set current_dir $gdb_current_directory
- Session::notice_file_change
- set_baud
- if {[string length $current_args] > 0} {
- gdb_set_inferior_args $current_args
- gdb_cmd "cd $current_dir"
- }
- }
-
- gdbtk_update
-}
-
-
-# ------------------------------------------------------------------
-# PROCEDURE: gdbtk_busy - Dispatch a busy event
-#
-# Use this procedure from within GUI code to indicate that
-# the debugger is busy, either running the inferior or
-# talking to the target.
-# ------------------------------------------------------------------
-proc gdbtk_busy {} {
-
- set e [BusyEvent \#auto]
- GDBEventHandler::dispatch $e
- delete object $e
-
- # Force the screen to update
- update
-}
-
-# ------------------------------------------------------------------
-# PROCEDURE: gdbtk_update - run all update hooks
-#
-# Use this procedure to force all widgets to update
-# themselves. This hook is usually run after command
-# that could change target state.
-# ------------------------------------------------------------------
-proc gdbtk_update {} {
-
- set e [UpdateEvent \#auto]
- GDBEventHandler::dispatch $e
- delete object $e
-
- # Force the screen to update
- update
-}
-
-# ------------------------------------------------------------------
-# PROCEDURE: gdbtk_update_safe - run all update hooks in a safe way
-#
-# Use this procedure to force all widgets to update
-# themselves. This hook is usually run after command
-# that could change target state.
-# Like gdbtk_update but safe to be used in "after idle"
-# which is used in update hooks.
-# ------------------------------------------------------------------
-proc gdbtk_update_safe {} {
- global gdb_running
-
- # Fencepost: Do not update if we are running the target
- # We get here because script commands may have changed memory or
- # registers and "after idle" events registered as a consequence
- # If we try to update while the target is running we are doomed.
- if {!$gdb_running} {
- gdbtk_update
- }
-}
-
-# ------------------------------------------------------------------
-# PROCEDURE: gdbtk_idle - dispatch IdleEvent
-#
-# Use this procedure to free the UI for more user input.
-# This should only be run AFTER all communication with
-# the target has halted, otherwise the risk of two (or
-# more) widgets talking to the target arises.
-# ------------------------------------------------------------------
-proc gdbtk_idle {} {
- global gdb_running
-
- # Put the unfiltered hook back in place, just in case
- # somebody swapped it out, and then died before they
- # could replace it.
- gdb_restore_fputs
-
- set err [catch {run_hooks gdb_idle_hook}]
- if {$err} {
- dbug E "Error running gdb_idle_hook: $::errorInfo"
- }
-
- set e [IdleEvent \#auto]
- GDBEventHandler::dispatch $e
- delete object $e
-
- if {!$gdb_running} {
- set err [catch {run_hooks gdb_no_inferior_hook} txt]
- if {$err} {
- dbug E "no_inferior_hook error: $txt"
- }
- }
-
- # Force the screen to update
- update
-}
-
-define_hook download_progress_hook
-
-# ------------------------------------------------------------------
-# PROCEDURE: gdbtk_quit_check - Ask if the user really wants to quit.
-# ------------------------------------------------------------------
-proc gdbtk_quit_check {} {
- global gdb_downloading gdb_running gdb_exe_name
-
- if {$gdb_downloading} {
- set msg "Downloading to target,\n really close the debugger?"
- if {![gdbtk_tcl_query $msg no]} {
- return 0
- }
- } elseif {$gdb_running} {
- # While we are running the inferior, gdb_cmd is fenceposted and
- # returns immediately. Therefore, we need to ask here. Do we need
- # to stop the target, too?
- set msg "A debugging session is active.\n"
- append msg "Do you still want to close the debugger?"
- if {![gdbtk_tcl_query $msg no]} {
- return 0
- }
- }
-
- return 1
-}
-
-# ------------------------------------------------------------------
-# PROCEDURE: gdbtk_quit - Quit the debugger
-# Call this procedure anywhere the user can request to quit.
-# This procedure will ask all the right questions before
-# exiting.
-# ------------------------------------------------------------------
-proc gdbtk_quit {} {
- if {[gdbtk_quit_check]} {
- gdbtk_force_quit
- }
-}
-
-# ------------------------------------------------------------------
-# PROCEDURE: gdbtk_force_quit - Quit the debugger immediately
-# ------------------------------------------------------------------
-proc gdbtk_force_quit {} {
- # If we don't delete source windows, GDB hooks will
- # try to update them as we exit
- foreach win [ManagedWin::find SrcWin] {
- delete object $win
- }
- # Calling gdb_force_quit is probably not necessary here
- # because it should have been called when the source window(s)
- # were deleted, but just in case...
- gdb_force_quit
-}
-
-# ------------------------------------------------------------------
-# PROCEDURE: gdbtk_cleanup - called by GDB immediately
-# before exiting. Last chance to cleanup!
-# ------------------------------------------------------------------
-proc gdbtk_cleanup {} {
- global gdb_exe_name
-
- # Save the session
- if {$gdb_exe_name != ""} {
- Session::save
- }
-
- # This is a sign that it is too late to be doing updates, etc...
- set ::gdb_shutting_down 1
-
- # Shutdown the window manager and save all preferences
- # This way a "quit" in the console window will cause
- # preferences to be saved.
- ManagedWin::shutdown
- pref_save
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_tcl_query -
-# ------------------------------------------------------------------
-proc gdbtk_tcl_query {message {default yes}} {
- global gdb_checking_for_exit gdbtk_state tcl_platform
-
- # FIXME We really want a Help button here. But Tk's brain-damaged
- # modal dialogs won't really allow it. Should have async dialog
- # here.
-
- set title "GDB"
- set modal "task"
-
- # If we are checking whether to exit gdb, we want a system modal
- # box. Otherwise it may be hidden by some other program, and the
- # user will have no idea what is going on.
- if {[info exists gdb_checking_for_exit] && $gdb_checking_for_exit} {
- set modal "system"
- }
-
- if {$tcl_platform(platform) == "windows"} {
- # On Windows, we want to only ask each question once.
- # If we're already asking the question, just wait for the answer
- # to come back.
- set ans [list answer $message]
- set pending [list pending $message]
-
- if {[info exists gdbtk_state($pending)]} {
- incr gdbtk_state($pending)
- } else {
- set gdbtk_state($pending) 1
- set gdbtk_state($ans) {}
-
- ide_messageBox [list set gdbtk_state($ans)] -icon warning \
- -default $default -message $message -title $title \
- -type yesno -modal $modal -parent .
- }
-
- vwait gdbtk_state($ans)
- set r $gdbtk_state($ans)
- if {[incr gdbtk_state($pending) -1] == 0} {
- # Last call waiting for this answer, so clear it.
- unset gdbtk_state($pending)
- unset gdbtk_state($ans)
- }
- } else {
- # On Unix, apparently it doesn't matter how many times we ask a
- # question.
- set r [tk_messageBox -icon warning -default $default \
- -message $message -title $title \
- -type yesno -parent .]
- }
-
- update idletasks
- return [expr {$r == "yes"}]
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_tcl_warning -
-# ------------------------------------------------------------------
-proc gdbtk_tcl_warning {message} {
- debug "$message"
-
-# ADD a warning message here if the gui must NOT display it
-# add the message at the beginning of the switch followed by -
-
- switch -regexp $message {
- "Unable to find dynamic linker breakpoint function.*" {return}
- "Internal error.*" { gdbtk_tcl_fputs_error $message }
- "incomplete CFI.*" { gdbtk_tcl_fputs_error $message }
- "RTTI symbol not found for class.*" { gdbtk_tcl_fputs_error $message }
- default {show_warning $message}
- }
-}
-
-# ------------------------------------------------------------------
-# PROC: show_warning -
-# ------------------------------------------------------------------
-proc show_warning {message} {
- global tcl_platform
-
- # FIXME We really want a Help button here. But Tk's brain-damaged
- # modal dialogs won't really allow it. Should have async dialog
- # here.
- set title "GDB"
- set modal "task"
-
-# On Windows, we use ide_messageBox which runs the Win32 MessageBox function
-# in another thread. This permits a program which handles IDE requests from
-# other programs to not return from the request until the MessageBox completes.
-# This is not possible without using another thread, since the MessageBox
-# function call will be running its own event loop, and will be higher on the
-# stack than the IDE request.
-#
-# On Unix tk_messageBox runs in the regular Tk event loop, so
-# another thread is not required.
-
-
- if {$tcl_platform(platform) == "windows"} {
- ide_messageBox [list set r] -icon warning \
- -default ok -message $message -title $title \
- -type ok -modal $modal -parent .
- } else {
- set r [tk_messageBox -icon warning -default ok \
- -message $message -title $title \
- -type ok -parent .]
- }
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_tcl_ignorable_warning -
-# ------------------------------------------------------------------
-proc gdbtk_tcl_ignorable_warning {class message} {
- catch {ManagedWin::open WarningDlg -center -transient \
- -message [list $message] -ignorable $class}
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_tcl_fputs -
-# ------------------------------------------------------------------
-proc gdbtk_tcl_fputs {message} {
- global gdbtk_state
- # Restore the fputs hook, in case anyone forgot to put it back...
- gdb_restore_fputs
-
- if {[info exists gdbtk_state(console)] && $gdbtk_state(console) != ""} {
- $gdbtk_state(console) insert $message
- }
-}
-
-# ------------------------------------------------------------------
-# PROC: echo -
-# ------------------------------------------------------------------
-proc echo {args} {
- gdbtk_tcl_fputs [concat $args]\n
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_tcl_fputs_error - write an error message
-# ------------------------------------------------------------------
-proc gdbtk_tcl_fputs_error {message} {
- if {[info exists ::gdbtk_state(console)] && $::gdbtk_state(console) != ""} {
- $::gdbtk_state(console) insert $message err_tag
- update
- }
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_tcl_fputs_log - write a log message
-# ------------------------------------------------------------------
-proc gdbtk_tcl_fputs_log {message} {
- if {[info exists ::gdbtk_state(console)] && $::gdbtk_state(console) != ""} {
- $::gdbtk_state(console) insert $message log_tag
- update
- }
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_tcl_fputs_target - write target output
-# ------------------------------------------------------------------
-proc gdbtk_tcl_fputs_target {message} {
- if {$::gdbtk_state(console) == ""} {
- ManagedWin::open Console -force
- }
- $::gdbtk_state(console) insert $message target_tag
- update
-}
-
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_tcl_fputs_target_err - write target error output
-# ------------------------------------------------------------------
-proc gdbtk_tcl_fputs_target_err {message} {
- if {$::gdbtk_state(console) == ""} {
- ManagedWin::open Console -force
- }
- $::gdbtk_state(console) insert $message err_tag
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_tcl_flush -
-# ------------------------------------------------------------------
-proc gdbtk_tcl_flush {} {
- debug [info level 0]
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_tcl_start_variable_annotation -
-# ------------------------------------------------------------------
-proc gdbtk_tcl_start_variable_annotation {valaddr ref_type stor_cl
- cum_expr field type_cast} {
- debug [info level 0]
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_tcl_end_variable_annotation -
-# ------------------------------------------------------------------
-proc gdbtk_tcl_end_variable_annotation {} {
- debug [info level 0]
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_tcl_breakpoint - A breakpoint was changed -- notify
-# gui.
-# ------------------------------------------------------------------
-proc gdbtk_tcl_breakpoint {action bpnum} {
-# debug "BREAKPOINT: $action $bpnum"
- set e [BreakpointEvent \#auto -action $action -number $bpnum]
- GDBEventHandler::dispatch $e
- delete object $e
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_tcl_tracepoint - A tracepoint was changed -- notify
-# gui.
-# ------------------------------------------------------------------
-proc gdbtk_tcl_tracepoint {action tpnum} {
-# debug "TRACEPOINT: $action $tpnum"
- set e [TracepointEvent \#auto -action $action -number $tpnum]
- GDBEventHandler::dispatch $e
- delete object $e
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_tcl_trace_find_hook -
-# ------------------------------------------------------------------
-proc gdbtk_tcl_trace_find_hook {arg from_tty} {
-# debug "$arg $from_tty"
- run_hooks gdb_trace_find_hook $arg $from_tty
-}
-
-################################################################
-#
-# Handle `readline' interface.
-#
-
-# Run a command that is known to use the "readline" interface. We set
-# up the appropriate buffer, and then run the actual command via
-# gdb_cmd. Calls into the "readline" callbacks just return values
-# from our list.
-
-# ------------------------------------------------------------------
-# PROC: gdb_run_readline_command -
-# ------------------------------------------------------------------
-proc gdb_run_readline_command {command args} {
- global gdbtk_state
- debug "$command $args"
- set gdbtk_state(readlineArgs) $args
- set gdbtk_state(readlineShowUser) 1
- gdb_cmd $command
-}
-
-# ------------------------------------------------------------------
-# PROC: gdb_run_readline_command_no_output
-# Run a readline command, but don't show the commands to the user.
-# ------------------------------------------------------------------
-proc gdb_run_readline_command_no_output {command args} {
- global gdbtk_state
- debug "$command $args"
- set gdbtk_state(readlineArgs) $args
- set gdbtk_state(readlineShowUser) 0
- gdb_cmd $command
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_tcl_readline_begin -
-# ------------------------------------------------------------------
-proc gdbtk_tcl_readline_begin {message} {
- global gdbtk_state
-# debug
- set gdbtk_state(readline) 0
- if {$gdbtk_state(console) != "" && $gdbtk_state(readlineShowUser)} {
- $gdbtk_state(console) insert $message
- }
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_tcl_readline -
-# ------------------------------------------------------------------
-proc gdbtk_tcl_readline {prompt} {
- global gdbtk_state
-# debug "prompt=$prompt"
- if {[info exists gdbtk_state(readlineArgs)]} {
- # Not interactive, so pop the list, and print element.
- set cmd [lvarpop gdbtk_state(readlineArgs)]
- if {$gdbtk_state(console) != "" && $gdbtk_state(readlineShowUser)} {
- $gdbtk_state(console) insert $cmd
- }
- } else {
- # Interactive.
-# debug "interactive"
- set gdbtk_state(readline) 1
- $gdbtk_state(console) activate $prompt
- vwait gdbtk_state(readline_response)
- set cmd $gdbtk_state(readline_response)
-# debug "got response: $cmd"
- unset gdbtk_state(readline_response)
- set gdbtk_state(readline) 0
- }
- return $cmd
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_tcl_readline_end -
-# ------------------------------------------------------------------
-proc gdbtk_tcl_readline_end {} {
- global gdbtk_state
-# debug
- catch {unset gdbtk_state(readlineArgs)}
- catch {unset gdbtk_state(readlineActive)}
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_tcl_busy - this is called immediately before gdb
-# executes a command.
-#
-# ------------------------------------------------------------------
-proc gdbtk_tcl_busy {} {
- global gdbtk_state
- if {[incr gdbtk_state(busyCount)] == 1} {
- gdbtk_busy
- }
-}
-
-################################################################
-#
-#
-#
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_tcl_idle - this is called immediately after gdb
-# executes a command.
-# ------------------------------------------------------------------
-proc gdbtk_tcl_idle {} {
- global gdbtk_state
- if {$gdbtk_state(busyCount) > 0
- && [incr gdbtk_state(busyCount) -1] == 0} {
- gdbtk_update
- gdbtk_idle
- }
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_tcl_tstart -
-# ------------------------------------------------------------------
-proc gdbtk_tcl_tstart {} {
- set srcwin [lindex [manage find src] 0]
- $srcwin.toolbar do_tstop 0
-
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_tcl_tstop -
-# ------------------------------------------------------------------
-proc gdbtk_tcl_tstop {} {
- set srcwin [lindex [manage find src] 0]
- $srcwin.toolbar do_tstop 0
-
-}
-
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_tcl_display -
-#
-# A display changed. ACTION is `enable', `disable', `delete',
-# `create', or `update'. VALUE is only meaningful in the `update'
-# case.
-# ------------------------------------------------------------------
-proc gdbtk_tcl_display {action number {value {}}} {
- # Handle create explicitly.
- if {$action == "create"} {
- manage create_if_never data
- }
- run_hooks gdb_display_change_hook $action $number $value
-}
-
-# ------------------------------------------------------------------
-# PROCEDURE: gdbtk_register_changed
-# This hook is called from value_assign to inform us that
-# the user has changed the contents of a register.
-# ------------------------------------------------------------------
-proc gdbtk_register_changed {} {
- after idle gdbtk_update_safe
-}
-
-# ------------------------------------------------------------------
-# PROCEDURE: gdbtk_memory_changed
-# This hook is called from value_assign to inform us that
-# the user has changed the contents of memory (including
-# the program's variables).
-# ------------------------------------------------------------------
-proc gdbtk_memory_changed {} {
- after idle gdbtk_update_safe
-}
-
-####################################################################
-# #
-# FILE HOOKS #
-# #
-# There are a number of hooks that are installed in gdb to #
-# aid with file-like commands (selecting an exectuable and #
-# loading symbols): #
-# - exec_file_display_hook #
-# Called in exec_file_command. The tcl hook is #
-# "gdbtk_tcl_exec_file_display" #
-# - file_changed_hook #
-# Called in file_command. The tcl hook is #
-# "gdbtk_tcl_file_changed" #
-# - deprecated_pre_add_symbol_hook #
-# Called in symbol_file_add before loading. The tcl #
-# hook is "gdbtk_tcl_pre_add_symbol" #
-# - deprecated_post_add_symbol_hook #
-# Called in symbol_file_add when finished loading #
-# a symbol file. The tcl hook is #
-# "gdbtk_tcl_post_add_symbol" #
-# #
-# Together, these hooks should give the gui enough information #
-# to cover the two most common uses of file commands: #
-# 1. executable with symbols #
-# 2. separate executable and symbol file(s) #
-# #
-####################################################################
-define_hook file_changed_hook
-
-# ------------------------------------------------------------------
-# PROCEDURE: gdbtk_tcl_pre_add_symbol
-# This hook is called before any symbol files
-# are loaded so that we can inform the user.
-# ------------------------------------------------------------------
-proc gdbtk_tcl_pre_add_symbol {file} {
-
- gdbtk_busy
-
- # Display some feedback to the user
- set srcs [ManagedWin::find SrcWin]
- foreach w $srcs {
- $w set_status "Reading symbols from $file..."
- }
- update idletasks
-}
-
-# ------------------------------------------------------------------
-# PROCEDURE: gdbtk_tcl_post_add_symbol
-# This hook is called after we finish reading a symbol
-# file, so the source windows' combo boxes need filling.
-# ------------------------------------------------------------------
-proc gdbtk_tcl_post_add_symbol {} {
-
- set srcs [ManagedWin::find SrcWin]
- foreach w $srcs {
- $w fillNameCB
- }
- gdbtk_idle
-}
-
-# ------------------------------------------------------------------
-# PROCEDURE: gdbtk_tcl_file_changed
-# This hook is called whenever the exec file changes.
-# This is called AFTER symbol reading, so it is
-# ok to point to main when we get called.
-# ------------------------------------------------------------------
-proc gdbtk_tcl_file_changed {filename} {
-
- if {$filename == ""} {
- gdb_clear_file
- catch {run_hooks gdb_clear_file_hook}
- set ::gdb_exe_name ""
- set ::gdb_loaded 0
- set ::gdb_running 0
- gdbtk_update
- } else {
- SrcWin::point_to_main
- run_hooks file_changed_hook
- }
-}
-
-# ------------------------------------------------------------------
-# PROCEDURE: gdbtk_tcl_exec_file_display
-# This hook is called from exec_file_command. It's purpose
-# is to setup the gui for a new file. Note that we cannot
-# look for main, since this hook is called BEFORE we
-# read symbols. If the user used the "file" command,
-# gdbtk_tcl_file_changed will set the source window to
-# look at main. If the user used "exec-file" and "add-symbol"
-# commands, then we cannot look for main.
-# ------------------------------------------------------------------
-proc gdbtk_tcl_exec_file_display {filename} {
- global gdb_exe_changed
-
- # DO NOT CALL set_exe here!
-
- # Clear out the GUI, don't do it if filename is "" so that
- # you avoid distracting flashes in the source window.
-
- if {$filename != ""} {
- gdbtk_clear_file
- }
-
- # set_exe calls file command with the filename in
- # quotes, so we need to strip them here.
- # We need to make sure that we turn filename into
- # an absolute path or sessions won't work.
- if {[file tail $filename] == $filename} {
- # want full pathname
- set filename [file join $::gdb_current_directory $filename]
- }
- set_exe_name $filename
- set gdb_exe_changed 0
-
- SrcWin::point_to_main
-}
-
-# ------------------------------------------------------------------
-# PROCEDURE: gdbtk_locate_main
-# This proc tries to locate a suitable main function from
-# a list of names defined in the gdb/main_names preference;
-# returns the linespec (see below) if found, or a null string
-# if not.
-#
-# The return linespec looks like this:
-# 0: basename of the file
-# 1: function name
-# 2: full filename
-# 3: source line number
-# 4: address
-# 5: current PC - which will often be the same as address, but not when
-# we are browsing, or walking the stack.
-# 6: shared library name if the pc is in a shared lib
-#
-# ------------------------------------------------------------------
-proc gdbtk_locate_main {{init ""}} {
- global _main_cache gdb_exe_name
- debug
-
- if {$init == "" && $_main_cache != ""} {
- #debug "returning $_main_cache from cache"
- return $_main_cache
- }
- set _main_cache {}
-
- set main_names [pref get gdb/main_names]
- foreach main $main_names {
- if {![catch {gdb_loc $main} linespec]} {
- set _main_cache $linespec
- break
- }
- }
- if {$_main_cache == {}
- && ![catch gdb_entry_point entry_point]
- && ![catch {gdb_loc "*$entry_point"} linespec]} {
- set _main_cache $linespec
- }
-
- # need to see if result is valid
- lassign $_main_cache file func ffile line addr rest
- if {$addr == 0x0 && $func == {}} { set _main_cache {} }
-
- #debug "returning $_main_cache"
- return $_main_cache
-}
-
-##############################################
-# The rest of this file is an assortment of Tcl wrappers
-# for various bits of gdb functionality.
-#
-#############################################
-
-# ------------------------------------------------------------------
-# PROC: set_exe_name - Update the executable name
-# ------------------------------------------------------------------
-proc set_exe_name {exe} {
- global gdb_exe_name gdb_exe_changed
- #debug "exe=$exe gdb_exe_name=$gdb_exe_name"
-
- set gdb_exe_name $exe
- set gdb_exe_changed 1
-}
-
-
-# ------------------------------------------------------------------
-# PROC: set_exe -
-# ------------------------------------------------------------------
-proc set_exe {} {
- global gdb_exe_name gdb_exe_changed gdb_target_changed gdb_loaded file_done
-# debug "gdb_exe_changed=$gdb_exe_changed gdb_exe_name=$gdb_exe_name"
- if {$gdb_exe_changed} {
- set gdb_exe_changed 0
- if {$gdb_exe_name == ""} { return }
- set err [catch {gdb_cmd "file '$gdb_exe_name'" 1} msg]
- if {$err} {
- dbug E "$msg"
- set l [split $msg :]
- set errtxt [join [lrange $l 1 end] :]
- set msg "Error loading \"$gdb_exe_name\":\n"
- append msg $errtxt
- tk_messageBox -title "Error" -message $msg -icon error \
- -type ok
- set gdb_exe_name {}
- set file_done 0
- return
- } elseif {[string match {*no debugging symbols found*} $msg]} {
- tk_messageBox -icon error -default ok \
- -title "GDB" -type ok \
- -message "This executable has no debugging information."
- }
-
- # force new target command
- set gdb_target_changed 1
- set gdb_loaded 0
- set file_done 1
- }
-}
-
-# ------------------------------------------------------------------
-# _open_file - open a file dialog to select a file for debugging.
-# If filename is not "", then open this file.
-# ------------------------------------------------------------------
-
-proc _open_file {{file ""}} {
- global gdb_running gdb_downloading tcl_platform
-
- if {$gdb_running || $gdb_downloading} {
- # We are already running/downloading something..
- if {$gdb_running} {
- set msg "A debugging session is active.\nAbort session and load new file?"
- } else {
- set msg "A download is in progress.\nAbort download and load new file?"
- }
- if {![gdbtk_tcl_query $msg no]} {
- return 0
- }
- }
-
- if {[string compare $file ""] == 0} {
- set curFocus [focus]
-
- # Make sure that this is really a modal dialog...
- # FIXME: Add a disable_all to ide_grab_support.
-
- ide_grab_support disable_except {}
-
- set file [tk_getOpenFile -parent . -title "Load New Executable"]
-
- ide_grab_support enable_all
-
- # If no one had the focus before, leave it that way (since I
- # am not sure how this could happen... Also, the vwait in
- # tk_getOpenFile could have allowed the curFocus window to actually
- # be destroyed, so make sure it is still around.
-
- if {$curFocus != "" && [winfo exists $curFocus]} {
- raise [winfo toplevel $curFocus]
- focus $curFocus
- }
- } elseif {![file exists $file]} {
- tk_messageBox -message "File \"$file\" does not exist"
- return 0
- }
-
-
- if {$file == ""} {
- return 0
- }
- # Add the base dir for this file to the source search path.
- set root [file dirname $file]
- if {$tcl_platform(platform) == "windows"} {
- set root [ide_cygwin_path to_posix $root]
- set file [ide_cygwin_path to_posix $file]
- }
-
- catch {gdb_cmd "cd $root"}
-
- # Clear out gdb's internal state, so that it will allow us
- # (the gui) to ask the user questions.
- gdb_clear_file
-
- # The gui needs to set this...
- set_exe_name $file
-
- # set_exe needs to be called anywhere the gui does a file_command...
- if {[set_exe] == "cancel"} {
- gdbtk_update
- gdbtk_idle
- return 0
- }
-
- return 1
-}
-
-# ------------------------------------------------------------------
-# _close_file - close the current executable and prepare for
-# another executable.
-# ------------------------------------------------------------------
-proc _close_file {} {
-
- # If there is already an inferior, ask him if he wants to close
- # the file. If there is already an exec file loaded (and not run)
- # also ask, but don't ask twice.
- set okay 1
- if {[gdb_target_has_execution]} {
- set okay [gdbtk_tcl_query "Program is already running.\nClose file anyway?"]
- } elseif {$::gdb_exe_name != ""} {
- set okay [gdbtk_tcl_query "Program already loaded.\nClose file anyway?"]
- } else {
- # No exec file yet
- return
- }
-
- if {$okay} {
- Session::save
- gdb_clear_file
- gdbtk_tcl_file_changed ""
-
- # Print out a little message to all console windows
- foreach cw [ManagedWin::find Console] {
- $cw insert "No executable file now.\n"
- }
- }
-}
-
-# ------------------------------------------------------------------
-# PROC: set_target_name - Update the target name.
-#
-# This function will prompt for a new target and update
-# all variables.
-#
-# If $prompt is 0 it will just update gdb_target_cmd from gdb_target.
-#
-# RETURN:
-# 1 if successful,
-# 0 if the not (the user canceled the target selection dialog)
-# ------------------------------------------------------------------
-proc set_target_name {{prompt 1}} {
- global gdb_target_name gdb_target_changed gdb_exe_changed
- global gdb_target_cmd gdb_pretty_name
-# debug
- set cmd_tmp $gdb_target_cmd
- set name_tmp $gdb_target_name
-
-# debug "gdb_target_name=$gdb_target_name; name_tmp=$name_tmp"
- if {$prompt} {
- set win [ManagedWin::open TargetSelection -exportcancel 1 -center \
- -transient]
- # need to call update here so the target selection dialog can take over
- update idletasks
- }
-
-# debug "gdb_target_name=$gdb_target_name"
- if {$gdb_target_name == "CANCEL"} {
- set gdb_target_cmd $cmd_tmp
- set gdb_target_name $name_tmp
- return 0
- }
- set target $gdb_target_name
- set targ [TargetSelection::getname $target cmd]
- set gdb_target_cmd $cmd_tmp
- set gdb_pretty_name [TargetSelection::getname $target pretty-name]
-
-# debug "target=$target pretty_name=$gdb_pretty_name"
- set targ_opts ""
- switch -regexp -- $gdb_target_name {
- sim|ice {
- set targ $gdb_target_name
- set targ_opts [pref getd gdb/load/${gdb_target_name}-opts]
- }
- default {
- set port [pref getd gdb/load/$target-port]
- if {$port == ""} {
- set port [pref get gdb/load/default-port]
- }
- set portnum [pref getd gdb/load/$target-portname]
- if {$portnum == ""} {
- set portnum [pref get gdb/load/default-portname]
- }
- set hostname [pref getd gdb/load/$target-hostname]
- if {$hostname == ""} {
- set hostname [pref getd gdb/load/default-hostname]
- }
- # replace "com1" with the real port name
- set targ [lrep $targ "com1" $port]
- # replace "tcpX" with hostname:portnum
- set targ [lrep $targ "tcpX" ${hostname}:${portnum}]
- # replace "ethX" with hostname
- set targ [lrep $targ "ethX" e=${hostname}]
- }
- }
-
-# debug "targ=$targ gdb_target_cmd=$gdb_target_cmd"
- if {$gdb_target_cmd != $targ || $gdb_target_changed} {
- set gdb_target_changed 1
- set gdb_target_cmd "$targ $targ_opts"
- }
- return 1
-}
-
-# ------------------------------------------------------------------
-# PROC: set_target - Change the target
-# ------------------------------------------------------------------
-proc set_target {} {
- global gdb_target_cmd gdb_target_changed gdb_pretty_name gdb_target_name
- #debug "gdb_target_changed=$gdb_target_changed gdb_target_cmd=\"$gdb_target_cmd\""
- #debug "gdb_target_name=$gdb_target_name"
- if {$gdb_target_cmd == "" && ![TargetSelection::native_debugging]} {
- if {$gdb_target_name == ""} {
- set prompt 1
-
- # get the default
- #set gdb_target_name [pref getd gdb/load/target]
- } else {
- set prompt 0
- }
- if {![set_target_name $prompt]} {
- set gdb_target_name ""
- return CANCELED
- }
- }
-
- if {$gdb_target_changed} {
- set srcWin [lindex [ManagedWin::find SrcWin] 0]
-
- $srcWin set_status "Trying to communicate with target $gdb_pretty_name" 1
- update
- catch {gdb_cmd "detach"}
- debug "CONNECTING TO TARGET: $gdb_target_cmd"
- gdbtk_busy
- set err [catch {gdb_immediate "target $gdb_target_cmd"} msg ]
- $srcWin set_status
- gdbtk_idle
-
- if {$err} {
- if {[string first "Program not killed" $msg] != -1} {
- return CANCELED
- }
- update
- set dialog_title "GDB"
- set debugger_name "GDB"
- tk_messageBox -icon error -title $dialog_title -type ok \
- -message "$msg\n\n$debugger_name cannot connect to the target board\
-using [lindex $gdb_target_cmd 1].\nVerify that the board is securely connected and, if\
-necessary,\nmodify the port setting with the debugger preferences."
- return ERROR
- }
-
- if {![catch {pref get gdb/load/$gdb_target_name-after_attaching} aa] && $aa != ""} {
- if {[catch {gdb_cmd $aa} err]} {
- catch {[ManagedWin::find Console] insert $err err_tag}
- }
- }
- set gdb_target_changed 0
- return TARGET_CHANGED
- }
- return TARGET_UNCHANGED
-}
-
-# ------------------------------------------------------------------
-# PROC: run_executable -
-#
-# This procedure is used to run an executable. It is called when the
-# run button is used.
-# ------------------------------------------------------------------
-proc run_executable { {auto_start 1} } {
- global gdb_loaded gdb_downloading gdb_target_name
- global gdb_exe_changed gdb_target_changed gdb_program_has_run
- global gdb_running gdb_exe_name tcl_platform
-
-# debug "auto_start=$auto_start gdb_target_name=$gdb_target_name"
-
- set gdb_running_saved $gdb_running
- set gdb_running 0
-
- # No executable was specified. Prompt the user for one.
- if {$gdb_exe_name == ""} {
- if {[_open_file]} {
- run_executable $auto_start
- return
- } else {
- # The user canceled the load of a new executable.
- return
- }
- }
-
- if {$gdb_downloading} { return }
- if {[pref get gdb/control_target]} {
- # Breakpoint mode
- set_exe
-
- # Attach
- if {$gdb_target_name == "" || [pref get gdb/src/run_attach]} {
- set r [gdbtk_attach_remote]
- if {$r == "ATTACH_CANCELED" || $r == "ATTACH_ERROR"} {
- return
- }
- }
-
- # Download
- if {[pref get gdb/src/run_load] && $gdb_target_name != "exec"} {
- debug "Downloading..."
- set gdb_loaded 0
-
- # if the app has not been downloaded or the app has already
- # started, we need to redownload before running
- if {!$gdb_loaded} {
- if {[Download::download_it]} {
- # user cancelled the command
-# debug "user cancelled the command $gdb_running"
- set gdb_loaded 0
- gdbtk_update
- gdbtk_idle
- }
- if {!$gdb_loaded} {
- # The user cancelled the download after it started
-# debug "User cancelled the download after it started $gdb_running"
- gdbtk_update
- gdbtk_idle
- return
- }
- }
- }
-
- # _Now_ set/clear breakpoints
- if {[pref get gdb/load/exit] && ![TargetSelection::native_debugging]} {
- debug "Setting new BP at exit"
- catch {gdb_cmd "clear exit"}
- catch {gdb_cmd "break exit"}
- }
-
- if {[pref get gdb/load/main]} {
- set main "main"
- if {[set linespec [gdbtk_locate_main]] != ""} {
- set main [lindex $linespec 1]
- }
- debug "Setting new BP at $main"
- catch {gdb_cmd "clear $main"}
- catch {gdb_cmd "break $main"}
- }
-
- # set BP at user-specified function
- if {[pref get gdb/load/bp_at_func]} {
- foreach bp [pref get gdb/load/bp_func] {
- debug "Setting BP at $bp"
- catch {gdb_cmd "clear $bp"}
- catch {gdb_cmd "break $bp"}
- }
- }
-
- # This is a hack. If the target is "sim" the opts are appended
- # to the target command. Otherwise they are assumed to be command line
- # args. What about simulators that accept command line args?
- if {$gdb_target_name != "sim"} {
- # set args
- set gdb_args [pref getd gdb/load/$gdb_target_name-opts]
- if { $gdb_args != ""} {
- debug "set args $gdb_args"
- gdb_set_inferior_args $gdb_args
- }
- }
-
- # If the user requested it, start an xterm for use as the
- # inferior's tty.
- if {$tcl_platform(platform) != "windows"
- && [pref getd gdb/process/xtermtty] == "yes"} {
- tty::create
- }
-
- #
- # Run
-
- if {$auto_start} {
- if {[pref get gdb/src/run_run]} {
- debug "Runnning target..."
- set run run
- } else {
- debug "Continuing target..."
- set run cont
- }
- if {$gdb_target_name == "exec"} {
- set run run
- }
- if {[catch {gdb_immediate $run} msg]} {
- dbug W "msg=$msg"
- gdbtk_idle
- if {[string match "*help target*" $msg]} {
- set_target_name
- run_executable $auto_start
- return
- }
- if {[string match "No executable*" $msg]} {
- # No executable was specified. Prompt the user for one.
- if {[_open_file]} {
- run_executable $auto_start
- } else {
- debug "CANCELLED"
- }
- return
- }
- set gdb_running $gdb_running_saved
- } else {
- debug RUNNING
- set gdb_running 1
- }
- } else {
- SrcWin::point_to_main
- }
-
- gdbtk_update
- gdbtk_idle
- } elseif {[pref get gdb/mode]} {
- # tracepoint -- need to tstart
- set gdb_running 1
- tstart
- }
- return
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_attach_remote - attach to the target
-# This proc returns the following status messages:
-#
-# ATTACH_ERROR: An error occurred connecting to target.
-# ATTACH_CANCELED: The attach was canceled.
-# ATTACH_TARGET_CHANGED: Successfully attached, target changed.
-# ATTACH_TARGET_UNCHANGED: Successfully attached, target unchanged.
-# UNKNOWN: An unknown error occurred.
-# ------------------------------------------------------------------
-proc gdbtk_attach_remote {} {
- global gdb_loaded
-
- debug "Attaching...."
- set r UNKNOWN
- while {1} {
-
- switch [set_target] {
-
- ERROR {
- # target command failed, ask for a new target name
- if {![set_target_name]} {
- # canceled again
- set r ATTACH_ERROR
- break
- }
- }
-
- TARGET_CHANGED {
- # success -- target changed
- set gdb_loaded 0
- set r ATTACH_TARGET_CHANGED
- break
- }
-
- CANCELED {
- # command cancelled by user
- set r ATTACH_CANCELED
- break
- }
-
- TARGET_UNCHANGED {
- # success -- target NOT changed (i.e., rerun)
- set r ATTACH_TARGET_UNCHANGED
- break
- }
- }
- }
-
-# debug "Attach returning: \"$r\""
- return $r
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_connect: connect to a remote target
-# in asynch mode if async is 1
-# ------------------------------------------------------------------
-proc gdbtk_connect {{async 0}} {
- global file_done
-
- debug "async=$async"
-
- gdbtk_busy
-
- set result [gdbtk_attach_remote]
- switch $result {
- ATTACH_ERROR {
- set successful 0
- }
-
- ATTACH_TARGET_CHANGED {
- if {[pref get gdb/load/check] && $file_done} {
- set err [catch {gdb_cmd "compare-sections"} errTxt]
- if {$err} {
- set successful 0
- tk_messageBox -title "Error" -message $errTxt \
- -icon error -type ok
- break
- }
- }
-
- tk_messageBox -title "GDB" -message "Successfully connected" \
- -icon info -type ok
- set successful 1
- }
-
- ATTACH_CANCELED {
- tk_messageBox -title "GDB" -message "Connection Canceled" -icon info \
- -type ok
- set successful 0
- }
-
- ATTACH_TARGET_UNCHANGED {
- tk_messageBox -title "GDB" -message "Successfully connected" \
- -icon info -type ok
- set successful 1
- }
-
- default {
- dbug E "Unhandled response from gdbtk_attach_remote: \"$result\""
- set successful 0
- }
- }
-
- gdbtk_idle
-
- # Whenever we attach, we need to do an update
- if {$successful} {
- gdbtk_attached
- }
- return $successful
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_step - step the target
-# ------------------------------------------------------------------
-proc gdbtk_step {} {
- catch {gdb_immediate step}
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_next
-# ------------------------------------------------------------------
-proc gdbtk_next {} {
- catch {gdb_immediate next}
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_finish
-# ------------------------------------------------------------------
-proc gdbtk_finish {} {
- catch {gdb_immediate finish}
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_continue
-# ------------------------------------------------------------------
-proc gdbtk_continue {} {
- catch {gdb_immediate continue}
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_stepi
-# ------------------------------------------------------------------
-proc gdbtk_stepi {} {
- catch {gdb_immediate stepi}
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_nexti
-# ------------------------------------------------------------------
-proc gdbtk_nexti {} {
- catch {gdb_immediate nexti}
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_attached
-# ------------------------------------------------------------------
-#
-# This is called AFTER gdb has successfully done an attach. Use it to
-# bring the GUI up to a current state...
-proc gdbtk_attached {} {
- gdbtk_update
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_detached
-# ------------------------------------------------------------------
-#
-# This is called AFTER gdb has successfully done an detach. Use it to
-# bring the GUI up to a current state...
-proc gdbtk_detached {} {
- if {!$::gdb_shutting_down} {
- run_hooks gdb_no_inferior_hook
- }
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_stop
-# ------------------------------------------------------------------
-#
-# The stop button is tricky. In order to use the stop button,
-# the debugger must be able to keep gui alive while target_wait is
-# blocking (so that the user can interrupt or detach from it).
-#
-# The best solution for this is to capture gdb deep down where it can
-# block. For _any_ target board, this will be in either serial or
-# socket code. These places call deprecated_ui_loop_hook to keep us
-# alive. For native unix, we use an interval timer. Simulators either
-# call deprecated_ui_loop_hook directly (older sims, at least) or they
-# call gdb's os_poll_quit callback, where we insert a call to
-# deprecated_ui_loop_hook. Some targets (like v850ice and windows
-# native) require a call to deprecated_ui_loop_hook directly in
-# target_wait. See comments before gdb_stop and x_event to find out
-# more about how this is accomplished.
-#
-# The stop button's behavior:
-# Pressing the stop button should attempt to stop the target. If, after
-# some time (like 3 seconds), gdb fails to fall out of target_wait (i.e.,
-# the gui's idle hooks are run), then open a dialog asking the user if
-# he'd like to detach.
-proc gdbtk_stop {} {
- global _gdbtk_stop
-
- if {$_gdbtk_stop(timer) == ""} {
- add_hook gdb_idle_hook gdbtk_stop_idle_callback
- set _gdbtk_stop(timer) [after 15000 gdbtk_detach]
- catch {gdb_stop}
- }
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_stop_idle_callback
-# ------------------------------------------------------------------
-# This callback normally does nothing. When the stop button has
-# been pressed, though, and gdb has successfully stopped the target,
-# this callback will clean up after gdbtk_stop, removing the "Detach"
-# dialog (if it's open) and gettingg rid of any outstanding timers
-# and hooks.
-proc gdbtk_stop_idle_callback {} {
- global _gdbtk_stop gdbtk_state
-
- # Check if the dialog asking if user wants to detach is open
- # and unpost it if it exists.
- if {$_gdbtk_stop(msg) != ""} {
- set ans [list answer $_gdbtk_stop(msg)]
- set gdbtk_state($ans) no
- }
-
- if {$_gdbtk_stop(timer) != ""} {
- # Cancel the timer callback
- after cancel $_gdbtk_stop(timer)
- set _gdbtk_stop(timer) ""
- catch {remove_hook gdb_idle_hook gdbtk_stop_idle_callback}
- }
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_detach
-# ------------------------------------------------------------------
-# This proc is installed as a timer event when the stop button
-# is pressed. If target_wait doesn't return (we were unable to stop
-# the target), then this proc is called.
-#
-# Open a dialog box asking if the user would like to detach. If so,
-# try to detach. If not, do nothing and go away.
-proc gdbtk_detach {} {
- global _gdbtk_stop
-
- set _gdbtk_stop(msg) "No response from target. Detach from target\n(and stop debugging it)?"
- if {[gdbtk_tcl_query $_gdbtk_stop(msg) no]} {
- catch {gdb_stop detach}
- }
-
- set _gdbtk_stop(timer) ""
- set _gdbtk_stop(msg) ""
- remove_hook gdb_idle_hook gdbtk_stop_idle_callback
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_run
-# ------------------------------------------------------------------
-proc gdbtk_run {} {
- if {$::gdb_running == 1} {
- set msg "A program is currently being debugged.\n"
- append msg "Do you want to restart?"
- if {![gdbtk_tcl_query $msg no]} {
- # NO
- return
- }
- }
- run_executable
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_attach_native: attach to a running target
-# ------------------------------------------------------------------
-proc gdbtk_attach_native {} {
- ManagedWin::open_dlg AttachDlg ;#-transient
-
- debug "ManagedWin got [AttachDlg::last_button] [AttachDlg::pid]"
-
- if {[AttachDlg::last_button]} {
- set pid [AttachDlg::pid]
- set symbol_file [AttachDlg::symbol_file]
- if {$symbol_file != "" && ![_open_file $symbol_file]} {
- ManagedWin::open WarningDlg -transient \
- -message "Could not load symbols from $symbol_file."
- return
- }
-
- if {[catch {gdb_cmd "attach $pid"} result]} {
- ManagedWin::open WarningDlg -transient \
- -message [list "Could not attach to $pid:\n$result"]
- return
- }
- }
-}
-
-# ------------------------------------------------------------------
-# PROC: set_baud - Tell GDB the baud rate.
-# ------------------------------------------------------------------
-proc set_baud {} {
- global gdb_target_name
- #set target [ide_property get target-internal-name]
- set baud [pref getd gdb/load/${gdb_target_name}-baud]
- if {$baud == ""} {
- set baud [pref get gdb/load/baud]
- }
-# debug "setting baud to $baud"
- catch {gdb_cmd "set remotebaud $baud"}
-}
-
-# ------------------------------------------------------------------
-# PROC: do_state_hook -
-# ------------------------------------------------------------------
-proc do_state_hook {varname ind op} {
- run_hooks state_hook $varname
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_disconnect -
-# ------------------------------------------------------------------
-proc gdbtk_disconnect {{async 0}} {
- global gdb_loaded gdb_target_changed
- catch {gdb_cmd "detach"}
- # force a new target command to do something
- set gdb_loaded 0
- set gdb_target_changed 1
- set gdb_running 0
- gdbtk_idle
- gdbtk_update
- }
-
-# ------------------------------------------------------------------
-# PROC: tstart -
-# ------------------------------------------------------------------
-proc tstart {} {
- if {[catch {gdb_cmd "tstart"} errTxt]} {
- tk_messageBox -title "Error" -message $errTxt -icon error \
- -type ok
- gdbtk_idle
- return 0
- }
- return 1
-}
-
-# ------------------------------------------------------------------
-# PROC: tstop -
-# ------------------------------------------------------------------
-proc tstop {} {
-
- if {[catch {gdb_cmd "tstop"} errTxt]} {
- tk_messageBox -title "Error" -message $errTxt -icon error \
- -type ok
- gdbtk_idle
- return 0
- }
- return 1
- }
-
-# ------------------------------------------------------------------
-# PROC: source_file -
-# ------------------------------------------------------------------
-proc source_file {} {
- set file_name [tk_getOpenFile -title "Choose GDB Command file"]
- if {$file_name != ""} {
- gdb_cmd "source $file_name"
- }
-}
-
-
-# -----------------------------------------------------------------------------
-# NAME: gdbtk_signal
-#
-# SYNOPSIS: gdbtk_signal {name longname}
-#
-# DESC: This procedure is called from GDB when a signal
-# is generated, for example, a SIGSEGV.
-#
-# ARGS: name - The name of the signal, as returned by
-# target_signal_to_name().
-# longname - A description of the signal.
-# -----------------------------------------------------------------------------
-proc gdbtk_signal {name {longname ""}} {
- dbug W "caught signal $name $longname"
- set longname
- set message "Program received signal $name, $longname"
- set srcs [ManagedWin::find SrcWin]
- foreach w $srcs {
- $w set_status $message
- }
- gdbtk_tcl_ignorable_warning signal $message
- update idletasks
-}
-
-# Hook for clearing out executable state. Widgets should register a callback
-# for this hook if they have anything that may need cleaning if the user
-# requests to re-load an executable.
-define_hook gdb_clear_file_hook
-
-# -----------------------------------------------------------------------------
-# NAME: gdbtk_clear_file
-#
-# SYNOPSIS: gdbtk_clear_file
-#
-# DESC: This procedure is called when the user requests a new exec
-# file load. It runs the gdb_clear_file_hook, which tells
-# all widgets to clear state. It CANNOT call gdb_clear_file,
-# since this hook runs AFTER we load a new exec file (i.e.,
-# gdb_clear_file would clear the file name).
-#
-# ARGS: none
-# -----------------------------------------------------------------------------
-proc gdbtk_clear_file {} {
- global gdb_target_name
-
- debug
- # Give widgets a chance to clean up
- catch {run_hooks gdb_clear_file_hook}
-
- # Save the target name in case the user has already selected a
- # target. No need to force the user to select it again.
- set old_target $gdb_target_name
-
- # Finally, reset our state
- initialize_gdbtk
-
- set gdb_target_name $old_target
-}
-
-# ------------------------------------------------------------------
-# PROC: intialize_gdbtk - (re)initialize gdbtk's state
-# ------------------------------------------------------------------
-proc initialize_gdbtk {} {
- global gdb_exe_changed gdb_target_changed gdb_running gdb_downloading \
- gdb_loaded gdb_program_has_run file_done gdb_pretty_name gdb_exec \
- gdb_target_cmd download_dialog gdb_pretty_name gdb_exe_name _gdbtk_stop \
- gdb_target_name gdb_target_changed gdbtk_state gdb_kod_cmd gdb_shutting_down
-
- # initialize state variables
- set gdb_exe_changed 0
- set gdb_target_changed 0
- set gdb_running 0
- set gdb_downloading 0
- set gdb_loaded 0
- set gdb_program_has_run 0
- set file_done 0
- set gdb_pretty_name {}
- set gdb_exec {}
- set gdb_target_cmd ""
- set gdb_running 0
- set gdb_shutting_down 0
-
- set download_dialog ""
-
- # gdb_pretty_name is the name of the GDB target as it should be
- # displayed to the user.
- set gdb_pretty_name ""
-
- # gdb_exe_name is the name of the executable we are debugging.
- set gdb_exe_name ""
-
- # Initialize readline
- if {![info exists gdbtk_state(readline)]} {
- # Only do this once...
- set gdbtk_state(readline) 0
- set gdbtk_state(console) ""
- set gdbtk_state(readlineShowUser) 1
- }
-
- # flush cache for gdbtk_locate_main
- gdbtk_locate_main 1
-
- # check for existence of a kod command and get it's name and
- # text for menu entry
- set gdb_kod_cmd ""
- set msg ""
- if {![catch {gdb_cmd "show os"} msg] && ($msg != "")} {
- set line1 [string range $msg 0 [expr [string first \n $msg] -1]]
- if {[regexp -- \"(.*)\" $line1 dummy cmd]} {
- set gdb_kod_cmd $cmd
- }
- }
-# debug "kod_cmd=$gdb_kod_cmd"
-
- # setup stop button
- set _gdbtk_stop(timer) ""
- set _gdbtk_stop(msg) ""
-
- # gdb_target_name is the name of the GDB target; that is, the argument
- # to the GDB target command.
- set gdb_target_name ""
-
- # By setting gdb_target_changed, we force a target dialog
- # to be displayed on the first "run"
- set gdb_target_changed 1
-}
-
-# The architecture changed. Inform the UI.
-proc gdbtk_tcl_architecture_changed {} {
- set e [ArchChangedEvent \#auto]
- GDBEventHandler::dispatch $e
- delete object $e
-}
-
-proc gdbtk_console_read {} {
- if {$::gdbtk_state(console) == ""} {
- ManagedWin::open Console -force
- } else {
- raise [namespace tail $::gdbtk_state(console)]
- }
- set result [$::gdbtk_state(console) gets]
- debug "result=$result"
- return $result
-}
diff --git a/gdb/gdbtk/library/ipc.tcl b/gdb/gdbtk/library/ipc.tcl
deleted file mode 100755
index 10ce7765907..00000000000
--- a/gdb/gdbtk/library/ipc.tcl
+++ /dev/null
@@ -1,135 +0,0 @@
-# ipc.tcl
-# Copyright (C) 2004 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# ----------------------------------------------------------------------
-# Implements IPC for multiple Insight instances, allowing any Insight
-# to send commands to all other Insights on the same host.
-#
-# PUBLIC METHODS:
-#
-# send $cmd - sends $cmd to all Insights
-#
-# ----------------------------------------------------------------------
-
-itcl::class Iipc {
-
- private variable socklist
- private variable portnum 9909
- private variable serversock
-
- constructor {} {
- init
- }
-
- destructor {
- debug
- foreach sock $socklist {
- catch {::close $sock}
- }
-
- if {$serversock != "0"} {
- catch {::close $serversock}
- }
- set ::iipc 0
- }
-
- private method init {} {
- debug "iipc init"
- set socklist {}
- set serversock 0
- set portnum [pref get gdb/ipc/port]
- if {[catch {socket -server [code $this accept] $portnum} serversock]} {
- debug "server already exists. Connecting to it."
- set socklist [socket localhost $portnum]
- fconfigure $socklist -buffering line -blocking 0
- fileevent $socklist readable [code $this read $socklist]
- }
- set ::iipc 1
- }
-
- # accept new connection to server
- private method accept {sock addr port} {
- debug "accepting connecting from $sock -> $addr:$port"
- fconfigure $sock -buffering line -blocking 0
- lappend socklist $sock
- fileevent $sock readable [code $this sread $sock]
- }
-
- private method read {s} {
- if [eof $s] {
- debug "The server died on $s!!"
- catch {::close $s}
- init
- return
- }
- gets $s res
- debug "Server: $res"
- switch $res {
- quit { gdb_force_quit }
- stop { gdbtk_stop }
- run { gdbtk_run }
- default {
- catch {gdb_immediate "$res"}
- }
- }
- }
-
- # server read method. Reads data then forwards
- # it to all listening sockets.
- private method sread {s} {
- if [eof $s] {
- close $s
- return
- }
- gets $s res
- if {$res != ""} {
- debug "Got: $res"
- foreach sock $socklist {
- if {$s != $sock} {
- if {[catch {puts $sock $res}]} {
- close $sock
- }
- }
- }
- switch $res {
- quit { gdb_force_quit }
- stop { gdbtk_stop }
- run { gdbtk_run }
- default {
- catch {gdb_immediate "$res"}
- }
- }
- }
- }
-
- # send data to all sockets.
- public method send {cmd} {
- debug "send $cmd"
- foreach sock $socklist {
- if {[catch {puts $sock $cmd}]} {
- close $sock
- }
- }
- }
-
- private method close {s} {
- debug "closing socket $s"
- set socklist [lremove $socklist $s]
- catch {::close $s}
- }
-}
-
-
-
-
-
diff --git a/gdb/gdbtk/library/ipcpref.itb b/gdb/gdbtk/library/ipcpref.itb
deleted file mode 100644
index 6906b9ba47a..00000000000
--- a/gdb/gdbtk/library/ipcpref.itb
+++ /dev/null
@@ -1,135 +0,0 @@
-# IPC preferences dialog for Insight.
-# Copyright (C) 2004 Red Hat
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-# ------------------------------------------------------------------
-# CONSTRUCTOR - create new IPC preferences window
-# ------------------------------------------------------------------
-itcl::body IPCPref::constructor {args} {
- window_name "Insight IPC Preferences"
- _init_var
- _build_win
-}
-
-# ------------------------------------------------------------------
-# METHOD: init_var - initialize preference variables
-# ------------------------------------------------------------------
-itcl::body IPCPref::_init_var {} {
- set vlist [list gdb/ipc/enabled gdb/ipc/port gdb/ipc/step_button gdb/ipc/stop_button \
- gdb/ipc/cont_button gdb/ipc/exit gdb/ipc/run_button]
-
- foreach var $vlist {
- set _saved($var) [pref get $var]
- set _new($var) $_saved($var)
- }
-}
-
-
-# ------------------------------------------------------------------
-# METHOD: build_win - build the dialog
-# ------------------------------------------------------------------
-itcl::body IPCPref::_build_win {} {
- frame $itk_interior.f
- frame $itk_interior.f.a
- frame $itk_interior.f.b
- set f $itk_interior.f.a
-
- # Description frame
- set d [labelframe $f.desc -text "Description"]
- label $d.txt -justify left -wraplength 6i -background $::Colors(textbg) \
- -text "Some multiprocessor systems use multiple instances of Insight \
-for debugging different CPUs. In these cases it may be desirable to have \
-all the instances stop, start, or continue at the same time. The IPC \
-feature can do that and more.\n\nThe IPC uses local TCP connections to the\
-port number specified below."
-
- pack $d.txt -side top
-
- checkbutton $f.enabled -text "Enable IPC" -variable [scope _new(gdb/ipc/enabled)]
- frame $f.port
- spinbox $f.port.box -from 0 -to 65535 -wrap 0\
- -width 6 -textvariable [scope _new(gdb/ipc/port)] -validate key \
- -vcmd {string is integer %P}
- label $f.port.label -text "TCP Port Number"
- pack $f.desc -expand yes -fill both
- pack $f.enabled -anchor w -pady 10
- pack $f.port.box $f.port.label -side left -pady 10
- pack $f.port -anchor w -pady 10
-
- set w [labelframe $f.buttons -text "Enable IPC on these buttons"]
- checkbutton $w.0 -text "Run" -variable [scope _new(gdb/ipc/run_button)]
- checkbutton $w.1 -text "Stop" -variable [scope _new(gdb/ipc/stop_button)]
- checkbutton $w.2 -text "Continue" -variable [scope _new(gdb/ipc/cont_button)]
- checkbutton $w.3 -text "Step" -variable [scope _new(gdb/ipc/step_button)]
- checkbutton $w.4 -text "Exit" -variable [scope _new(gdb/ipc/exit)]
- grid $w.0 $w.1 -padx 10 -pady 10 -sticky w
- grid $w.2 $w.3 -padx 10 -pady 10 -sticky w
- grid $w.4 -padx 10 -pady 10 -sticky w
- pack $w -fill both -expand yes
- pack $f.buttons -fill both -expand yes
-
- button $itk_interior.f.b.ok -text OK -width 7 -underline 0 -command [code $this _save]
- button $itk_interior.f.b.quit -text Cancel -width 7 -underline 0 -command [code $this _cancel]
- standard_button_box $itk_interior.f.b
- pack $itk_interior.f.a $itk_interior.f.b $itk_interior.f -expand yes -fill both -padx 5 -pady 5
-}
-
-# ------------------------------------------------------------------
-# METHOD: apply - apply changes
-# ------------------------------------------------------------------
-itcl::body IPCPref::_apply {} {
- set enable_changed 0
- if {[pref get gdb/ipc/enabled] != $_new(gdb/ipc/enabled)} {
- set enable_changed 1
- }
- if {$_new(gdb/ipc/enabled) && [pref get gdb/ipc/port] != $_new(gdb/ipc/port)} {
- set enable_changed 1
- }
-
- foreach var [array names _new] {
- if {$_new($var) != [pref get $var]} {
- pref set $var $_new($var)
- }
- }
-
- if {$enable_changed} {
- if {$_new(gdb/ipc/enabled)} {
- # must start up ipc
- catch {delete object $::insight_ipc}
- set ::insight_ipc [Iipc \#auto]
- } else {
- delete object $::insight_ipc
- }
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: _cancel
-# ------------------------------------------------------------------
-itcl::body IPCPref::_cancel {} {
- foreach elem [array names _saved] {
- set cur_val [pref get $elem]
- if {[string compare $cur_val $_saved($elem)] != 0} {
- pref set $elem $_saved($elem)
- }
- }
- unpost
-}
-
-# ------------------------------------------------------------------
-# METHOD: save - apply changes and quit
-# ------------------------------------------------------------------
-itcl::body IPCPref::_save {} {
- _apply
- unpost
-}
diff --git a/gdb/gdbtk/library/ipcpref.ith b/gdb/gdbtk/library/ipcpref.ith
deleted file mode 100644
index b973c8905aa..00000000000
--- a/gdb/gdbtk/library/ipcpref.ith
+++ /dev/null
@@ -1,33 +0,0 @@
-# IPC preferences dialog class definition for Insight.
-# Copyright (C) 2004, Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-itcl::class IPCPref {
- inherit ManagedWin ModalDialog
-
- private {
- variable _saved ;# These are the saved values...
- variable _new ;# These are the changed values
- variable w
- method _apply {}
- method _build_win {}
- method _cancel {}
- method _init_var {}
- method _save {}
- }
-
- public {
- method constructor {args}
- method reconfig {}
- }
-}
diff --git a/gdb/gdbtk/library/kod.itb b/gdb/gdbtk/library/kod.itb
deleted file mode 100644
index 3140733d483..00000000000
--- a/gdb/gdbtk/library/kod.itb
+++ /dev/null
@@ -1,474 +0,0 @@
-# Kernel Object Display Window for Insight.
-# Copyright (C) 1998, 1999, 2001 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# AUTHOR: Fernando Nasser <fnasser@cygnus.com>
-#
-
-
-# ------------------------------------------------------------------
-# CONSTRUCTOR - create new process window
-# ------------------------------------------------------------------
-itcl::body KodWin::constructor {args} {
- #
- # Create a window with the same name as this object
- #
- global gdb_kod_cmd
-
- # initialize local variables
- set LevelCmd(0) "info $gdb_kod_cmd "
- debug "Level 0 kod command is $LevelCmd(0)"
-
- gdbtk_busy
- build_win
- gdbtk_idle
-}
-
-# ------------------------------------------------------------------
-# METHOD: build_win - build the main KOD window
-# ------------------------------------------------------------------
-itcl::body KodWin::build_win {} {
- # FIXME: rename this variable.
- global kodActivePane
-
- debug "Will build KOD window"
-
- cyg::PanedWindow $itk_interior.pw -orient horizontal
- $itk_interior.pw add titlepane
- # We would like to use a fixed pane for the buttons. However,
- # this feature of PanedWindow doesn't work.
- # $itk_interior.pw add buttonpane -resizable 0
- $itk_interior.pw add pane1
- $itk_interior.pw add pane2
-
- # Now a frame for what is being listed, headers and list
- set tp [$itk_interior.pw childsite titlepane]
- Labelledframe $tp.tf -text "No Kernel Objects Known" \
- -anchor nw
- set titl $tp.tf
- set lf [$tp.tf get_frame]
-
- set p1 [$itk_interior.pw childsite pane1]
- set p2 [$itk_interior.pw childsite pane2]
- $p1 configure -height 120 -bd 2
- $p2 configure -height 120 -bd 2
- Labelledframe $p1.d1 -text "Details" -anchor nw
- Labelledframe $p2.d2 -text "Details" -anchor nw
- set d1 [$p1.d1 get_frame]
- set d2 [$p2.d2 get_frame]
- pack $p1.d1 $p2.d2 -side top -expand yes -fill both -padx 5 -pady 5
- set pl1 $p1.d1
- set pl2 $p2.d2
-
- # Setup the button box
- set bf [frame $tp.bf]
- set BTop [button $bf.top -height 1 -text Top -command [code $this top]]
- set BUp [button $bf.up -height 1 -text Up -command [code $this up]]
- set BClear [button $bf.clear -height 1 -text Clear \
- -command [code $this clear]]
- set BDisplay [button $bf.display -height 1 -text Display \
- -command [code $this display]]
- set kodActivePane pane1
- set BPane1 [radiobutton $bf.pane1 -variable kodActivePane \
- -height 1 -text "Pane 1" -value pane1]
- set BPane2 [radiobutton $bf.pane2 -variable kodActivePane \
- -height 1 -text "Pane 2" -value pane2]
- balloon register $bf.top "Return to List of Kernel Objects"
- balloon register $bf.up "Return to previous List of Objects"
- balloon register $bf.clear "Clear Object Detail Panes\nand Active setting"
- balloon register $bf.display \
- "Display Object or\nList of Objects of this type"
- balloon register $bf.pane1 "Make Pane 1 Active"
- balloon register $bf.pane2 "Make Pane 2 Active"
- pack $bf.top $bf.up -side left -padx 5
- pack $bf.display $bf.clear -side right -padx 5
- pack $bf.pane2 $bf.pane1 -side bottom -padx 5 -fill both
-
- # The list of objects
- table $lf.s -titlerows 1 \
- -colstretch last -rowstretch last -selectmode single \
- -selecttype row -variable $this \
- -yscrollcommand "$lf.sb set" -resizeborders none \
- -state disabled
- scrollbar $lf.sb -orient vertical -command "$lf.s yview"
- bind $lf.s <Double-1> [code $this display]
- $lf.s tag configure coltag -anchor nw
-
- grid $lf.s -row 0 -column 0 -sticky nsew
- grid $lf.sb -row 0 -column 1 -sticky nsw
- grid columnconfigure $lf 0 -weight 1
- grid rowconfigure $lf 0 -weight 1
-
- # Areas to display object details
- set t1 [table $d1.t1 -titlerows 1 -colstretch last -rowstretch last \
- -selectmode single -selecttype row -variable $this-pane1 \
- -yscrollcommand "$d1.s1 set" -resizeborders none \
- -rows 1 -cols 1 -state disabled]
- scrollbar $d1.s1 -orient vertical -command "$d1.t1 yview"
- set t2 [table $d2.t2 -titlerows 1 -colstretch last -rowstretch last \
- -selectmode single -selecttype row -variable $this-pane2 \
- -yscrollcommand "$d2.s2 set" -resizeborders none \
- -rows 1 -cols 1 -state disabled]
- scrollbar $d2.s2 -orient vertical -command "$d2.t2 yview"
-
- grid $d1.t1 -row 0 -column 0 -sticky nsew
- grid $d1.s1 -row 0 -column 1 -sticky nsw
- grid columnconfigure $d1 0 -weight 1
- grid rowconfigure $d1 0 -weight 1
- grid $d2.t2 -row 0 -column 0 -sticky nsew
- grid $d2.s2 -row 0 -column 1 -sticky nsw
- grid columnconfigure $d2 0 -weight 1
- grid rowconfigure $d2 0 -weight 1
-
- debug "Will pack KOD window"
- pack $tp.tf -side top -expand yes -fill both -padx 5 -pady 5
- pack $tp.bf -side top -expand no -fill x -padx 5 -pady 5
- pack $itk_interior.pw -side bottom -expand yes -fill both
- wm minsize $_top 450 500
-
- # Initialize button state variables for idle (called before update)
- set BState(BDisplay) disabled
- set BState(BClear) disabled
- set BState(BTop) disabled
- set BState(BUp) disabled
-
- # window_name "Kernel Objects"
-
- update dummy
-}
-
-# ------------------------------------------------------------------
-# METHOD: update - update widget when something changes
-# ------------------------------------------------------------------
-itcl::body KodWin::update {event} {
-
- debug "updating kod window"
-
- _disable_buttons
-
- display_list
- display_object
-
- _restore_buttons
-
-}
-
-# ------------------------------------------------------------------
-# METHOD: display - update the display based on the selection
-# it can be a list or an actual object
-# We get here from a press on the Display button or
-# from a <Double-1> on a line of the list of objects
-# ------------------------------------------------------------------
-itcl::body KodWin::display {} {
- upvar \#0 $this table_vals
- if {!$Running && [$lf.s cget -rows] > 1} {
- gdbtk_busy
- set linenum [$lf.s index active row]
- set object $table_vals($linenum,0)
- debug "display selection on line $linenum $object"
- incr level
- set LevelCmd($level) $LevelCmd([expr $level-1])
- append LevelCmd($level) $object
- debug "kod command for level $level is now: $LevelCmd($level)"
- update dummy
- # Run idle hooks and cause all other widgets to update
- gdbtk_idle
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: display_list - display list of objects
-# ------------------------------------------------------------------
-itcl::body KodWin::display_list {} {
- upvar \#0 $this table_vals
-
- debug "displaying list of objects"
-
- $lf.s configure -state normal
- set cmd $LevelCmd($level)
- debug "new kod command is $cmd"
- if {[catch "gdb_cmd \"$cmd\"" objects]} {
- # failed. leave window blank
- $titl configure -text "Kernel Object Display Failed"
- $lf.s delete rows 0 [$lf.s index end row]
- $lf.s configure -state disabled
- set BState(BDisplay) disabled
- return
- }
-
- debug "KodWin update: \n$objects"
- if {[llength $objects] == 0} {
- $titl configure -text "No Kernel Objects Known"
- # no objects listed.
- $lf.s delete rows 0 [$lf.s index end row]
- $lf.s configure -state disabled
- set BState(BDisplay) disabled
- return
- }
-
- # insert each line one at a time
- set num_lines -1
- foreach line [split $objects \n] {
- if {$num_lines == -1} {
- if {![string match List* $line]} {
- if {($level > 0)} {
- display_object $cmd objects
- incr level -1
- $lf.s configure -state disabled
- return
- } else {
- # if level 0 first line does not start with List ignore it
- $titl configure -text "List of Kernel Objects"
- }
- } else {
- $titl configure -text $line
- }
- # Clear listbox and headers to get new stuff.
- $lf.s delete rows 0 [$lf.s index end row]
- } elseif {$line == ""} {
- break
- } else {
- set col 0
- set list [split [string trim $line] \t]
- if {$num_lines == 0} {
- $lf.s configure -cols [llength $list] -titlerows 1
- }
- foreach item $list {
- debug "inserting $item at $num_lines,$col"
- set table_vals($num_lines,$col) $item
- incr col
- }
- }
- incr num_lines
- }
- $lf.s configure -rows [expr {$num_lines + 1}]
-
- if {$num_lines > 0} {
- set BState(BDisplay) active
- }
-
- if {$level == 0} {
- set BState(BTop) disabled
- set BState(BUp) disabled
- } else {
- set BState(BTop) active
- set BState(BUp) active
- }
-
- $lf.s configure -state disabled
- $lf.s see 0,0
- $lf.s activate 1,0
-
- _restore_buttons
-}
-
-# ------------------------------------------------------------------
-# METHOD: display_object - display information about an object
-# When called from update we have to reissue the gdb
-# command to get fresh data
-# ------------------------------------------------------------------
-itcl::body KodWin::display_object {{cmd ""} {obj ""}} {
- debug "Displaying object details..."
- upvar $obj objects
- global kodActivePane
- debug "Active Pane is $kodActivePane"
-
- # Determine which frame to use
- if {$kodActivePane == "pane2"} {
- set curpan $t2
- upvar \#0 $this-pane2 pane_values
- if {$cmd != ""} {
- # save command for update
- set pane2command $cmd
- } else {
- # reuse saved command
- set cmd $pane2command
- }
- } else {
- set curpan $t1
- upvar \#0 $this-pane1 pane_values
- if {$cmd != ""} {
- # save command for update
- set pane1command $cmd
- } else {
- # reuse saved command
- set cmd $pane1command
- }
- }
- debug "curpan $curpan"
-
- # here we must take care of the case where the user has activated a window
- # but it does not have been filled yet. We just return.
- if {$cmd == ""} {
- return
- }
-
- $curpan configure -state normal
- $curpan delete rows 0 [$curpan index end row]
- if {$obj == ""} {
- debug "pane kod command is $cmd"
- if {[catch "gdb_cmd \"$cmd\"" objects]
- || $objects == ""} {
- # Failed. Tell user object no longer there.
- $curpan configure -state disabled
- return
- }
- }
-
- set num_lin 0
- foreach line [split $objects \n] {
- set col 0
- set list [split [string trim $line] \t]
- if {$num_lin == 0} {
- $curpan configure -cols [llength $list]
- }
- foreach item $list {
- set pane_values($num_lin,$col) $item
- incr col
- }
- incr num_lin
- }
- $curpan configure -rows $num_lin -state disabled
-}
-
-# ------------------------------------------------------------------
-# METHOD: clear - clear detail panes and reset pane selection
-# ------------------------------------------------------------------
-itcl::body KodWin::clear {} {
- debug "going to clear detail panes and pane selection"
- $t1 configure -state normal
- $t2 configure -state normal
- $t1 delete rows 0 [$t1 index end row]
- $t2 delete rows 0 [$t2 index end row]
- $t1 configure -state disabled
- $t2 configure -state disabled
- # Default to pane 1 again.
- global kodActivePane
- set kodActivePane pane1
- set pane1command ""
- set pane2command ""
-}
-
-# ------------------------------------------------------------------
-# METHOD: top - go to the list of types of objects (top level)
-# ------------------------------------------------------------------
-itcl::body KodWin::top {} {
- debug "going to top from level $level"
- if {$level > 0} {
- set level 0
- update dummy
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: up - go to the list of objects which led to the current one
-# ------------------------------------------------------------------
-itcl::body KodWin::up {} {
- debug "going up from level $level..."
- if {$level > 0} {
- incr level -1
- debug "...to level $level"
- update dummy
- }
-}
-
-# ------------------------------------------------------------------
-# DESTRUCTOR - destroy window containing widget
-# ------------------------------------------------------------------
-itcl::body KodWin::destructor {} {
- upvar \#0 $this table_vals $this-pane1 pane1_vals $this-pane2 pane2_vals
- global kodActivePane
-
- catch {unset table_vals}
- catch {unset pane1_vals}
- catch {unset pane2_vals}
- catch {unset kodActivePane}
-}
-
-# ------------------------------------------------------------------
-# PUBLIC METHOD: set_variable - called when user runs `set os'
-# command
-# ------------------------------------------------------------------
-itcl::body KodWin::set_variable {event} {
-
- set value [$event get value]
- if {[$event get variable] == "os" && $value != ""} {
- set LevelCmd(0) "info $value "
- set level 0
- update dummy
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: reconfig - used when preferences change
-# ------------------------------------------------------------------
-itcl::body KodWin::reconfig {} {
- destroy $itk_interior.bf
- destroy $titl
- build_win
-}
-
-# ------------------------------------------------------------------
-# METHOD: busy - BusyEvent handler
-#
-# This method should accomplish blocking
-# - clicks in the window
-# - change mouse pointer
-# ------------------------------------------------------------------
-itcl::body KodWin::busy {event} {
- set Running 1
- _disable_buttons
- cursor watch
-}
-
-# ------------------------------------------------------------------
-# METHOD: idle - idle event handler. Run when the target is not
-# running
-# ------------------------------------------------------------------
-itcl::body KodWin::idle {event} {
- set Running 0
- _restore_buttons
- cursor {}
-}
-
-# ------------------------------------------------------------------
-# METHOD: cursor - set the window cursor
-# This is a convenience method which simply sets the mouse
-# pointer to the given glyph.
-# ------------------------------------------------------------------
-itcl::body KodWin::cursor {glyph} {
- $_top configure -cursor $glyph
-}
-
-# ------------------------------------------------------------------
-# PRIVATE METHOD: _disable_buttons - disable all buttons
-# Used when we are busy and can't take another event
-# ------------------------------------------------------------------
-itcl::body KodWin::_disable_buttons {} {
- $BTop configure -state disabled
- $BUp configure -state disabled
- $BDisplay configure -state disabled
- $BClear configure -state disabled
-}
-
-# ------------------------------------------------------------------
-# PRIVATE METHOD: _restore_buttons - restore all buttons to their
-# previous states.
-# Used when we are busy and can't take another event
-# ------------------------------------------------------------------
-itcl::body KodWin::_restore_buttons {} {
- $BTop configure -state $BState(BTop)
- $BUp configure -state $BState(BUp)
- $BDisplay configure -state $BState(BDisplay)
- # CLEAR is always active, except when busy
- $BClear configure -state active
-}
diff --git a/gdb/gdbtk/library/kod.ith b/gdb/gdbtk/library/kod.ith
deleted file mode 100644
index f2dfefb3cdf..00000000000
--- a/gdb/gdbtk/library/kod.ith
+++ /dev/null
@@ -1,63 +0,0 @@
-# Kernel Object Display Window definition for Insight.
-# Copyright (C) 1999, 2001 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-itcl::class KodWin {
- inherit EmbeddedWin GDBWin
-
- private {
- variable bf
- variable lf
- variable titl
- variable BTop
- variable BUp
- variable BClear
- variable BDisplay
- variable lb
- variable t1
- variable t2
- variable pl1
- variable pl2
- variable pane1command ""
- variable pane2command ""
- variable BPane1
- variable BPane2
- variable level 0
- common LevelCmd
- variable BState
- variable Running 0
- method build_win {}
- method display {}
- method display_list {}
- method display_object {{cmd ""} {obj ""}}
- method clear {}
- method top {}
- method up {}
- method cursor {glyph}
- method _disable_buttons {}
- method _restore_buttons {}
- }
-
- public {
- method constructor {args}
- method destructor {}
- method reconfig {}
-
- #
- # Gdb Events
- #
- method set_variable {event}
- method busy {event}
- method idle {event}
- method update {event}
- }
-}
diff --git a/gdb/gdbtk/library/locals.tcl b/gdb/gdbtk/library/locals.tcl
deleted file mode 100644
index 9083b6ea85d..00000000000
--- a/gdb/gdbtk/library/locals.tcl
+++ /dev/null
@@ -1,179 +0,0 @@
-# Local Variable Window for Insight.
-# Copyright (C) 2002, 2003 Red Hat
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-# ----------------------------------------------------------------------
-# Implements local variables windows for gdb.
-# ----------------------------------------------------------------------
-
-itcl::class LocalsWin {
- inherit EmbeddedWin GDBWin
- # ------------------------------------------------------------------
- # CONSTRUCTOR - create new locals window
- # ------------------------------------------------------------------
- constructor {args} {
- debug
-
- gdbtk_busy
- build_win $itk_interior
- gdbtk_idle
-
- add_hook gdb_no_inferior_hook "$this no_inferior"
- add_hook gdb_clear_file_hook [code $this clear_file]
- add_hook file_changed_hook [code $this clear_file]
-
- update dummy
- }
-
-
- # ------------------------------------------------------------------
- # PUBLIC METHOD: busy - BusyEvent handler
- # Disable all ui elements that could affect gdb's state
- # ------------------------------------------------------------------
- method busy {event} {
- debug
- set Running 1
- cursor watch
- }
-
- # Re-enable the UI
- method idle {event} {
- debug
- set Running 0
- cursor {}
- }
-
- # ------------------------------------------------------------------
- # METHOD: no_inferior
- # Reset this object.
- # ------------------------------------------------------------------
- method no_inferior {} {
- debug
- cursor {}
- set Running 0
- set _frame {}
- }
-
- # ------------------------------------------------------------------
- # METHOD: cursor - change the toplevel's cursor
- # ------------------------------------------------------------------
- method cursor {what} {
- [winfo toplevel [namespace tail $this]] configure -cursor $what
- ::update idletasks
- }
-
-
- # ------------------------------------------------------------------
- # METHOD: build_win - build window for variables.
- # ------------------------------------------------------------------
- method build_win {f} {
- #debug "$f"
-
- set tree [VarTree $f.tree -type "local"]
- pack $f.tree -expand yes -fill both
- pack $f -expand yes -fill both
-
- window_name "Local Variables"
- ::update idletasks
- }
-
-
- # ------------------------------------------------------------------
- # METHOD: clear_file - Clear out state so that a new executable
- # can be loaded. For LocalWins, this means deleting
- # the Variables list.
- # ------------------------------------------------------------------
- method clear_file {} {
- debug
- set Variables {}
- }
-
- # ------------------------------------------------------------------
- # DESTRUCTOR - delete locals window
- # ------------------------------------------------------------------
- destructor {
- debug
- set tree {}
-
- # Remove this window and all hooks
- remove_hook gdb_no_inferior_hook "$this no_inferior"
- remove_hook gdb_clear_file_hook [code $this clear_file]
- remove_hook file_changed_hook [code $this clear_file]
-
- foreach var $Variables {
- $var delete
- }
- }
-
- method context_switch {} {
- debug
-
- set err [catch {gdb_selected_frame} current_frame]
- #debug "1: err=$err; _frame=\"$_frame\"; current_frame=\"$current_frame\""
-
- if {$err && $_frame != ""} {
- # No current frame
- debug "no current frame"
- catch {destroy $_frame}
- set _frame {}
- return 1
- } elseif {$current_frame == "" && $_frame == ""} {
- #debug "2"
- return 0
- } elseif {$_frame == "" || $current_frame != [$_frame address]} {
- # We've changed frames. If we knew something about
- # the stack layout, we could be more intelligent about
- # destroying variables, but we don't know that here (yet).
- debug "switching to frame at $current_frame"
-
- # Destroy the old frame and create the new one
- catch {destroy $_frame}
- set _frame [Frame ::\#auto $current_frame]
- debug "created new frame: $_frame at [$_frame address]"
- return 1
- }
-
- # Nothing changed
- #debug "3"
- return 0
- }
-
-
- method update {event} {
- debug
-
- # Check that a context switch has not occured
- if {[context_switch]} {
- debug "CONTEXT SWITCH"
-
- # delete variables in tree
- $tree remove all
- set Variables {}
-
- if {$_frame != ""} {
- $tree add [$_frame variables]
- }
- } else {
- if {$_frame == ""} {return}
- # check for any new variables in the same frame
- $tree add [$_frame new]
- }
- after idle [code $tree update]
- }
-
- protected variable Entry
- protected variable Variables {}
- protected variable tree
- protected variable Running
- protected variable _frame {}
-}
diff --git a/gdb/gdbtk/library/main.tcl b/gdb/gdbtk/library/main.tcl
deleted file mode 100644
index d8bd5cabacb..00000000000
--- a/gdb/gdbtk/library/main.tcl
+++ /dev/null
@@ -1,191 +0,0 @@
-# GDBtk (Insight) entry point
-# Copyright (C) 1997, 1998, 1999, 2002, 2003, 2004 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-# State is controlled by 5 global boolean variables.
-#
-# gdb_target_changed
-# gdb_exe_changed
-# gdb_running
-# gdb_downloading
-# gdb_loaded
-
-################### Initialization code #########################
-
-# If GDBtk fails to start at all, you might want to uncomment one or
-# both of these.
-#set tcl_traceExec 2
-#set tcl_traceCompile 1
-
-# Add gdb's Tcl library directory to the end of the auto-load search path, if
-# it isn't already on the path.
-# Also, add the plugins directory if it exists.
-# Note: GDBTK_LIBRARY will be set in tcl_findLibrary before main.tcl is called.
-
-set gdb_plugins ""
-if {[info exists auto_path]} {
- if {[lsearch -exact $auto_path $GDBTK_LIBRARY] < 0} {
- lappend auto_path $GDBTK_LIBRARY
- }
-
- # Add default plugins directory, which will be [name of exe]/../../lib/insight1.0
- set exename [info nameofexecutable]
- set dir [file join [file dirname [file dirname $exename]] lib insight1.0]
- if {[file exists $dir]} {
- lappend gdb_plugins $dir
- lappend auto_path $dir
- }
- # Add any user-specified plugins directories
- if {[info exists env(INSIGHT_PLUGINS)]} {
- set dirs [split $env(INSIGHT_PLUGINS) :]
- lappend gdb_plugins $dirs
- lappend auto_path $dirs
- }
-}
-
-
-# Require the packages we need. Most are loaded already, but this will catch
-# any odd errors... :
-
-foreach p {{Tcl 8.0} {Tk 8.0} {Itcl 3.0} {Itk 3.0} {Gdbtk 1.0} {combobox 2.2} {debug 1.0}} {
- if {[catch {package require [lindex $p 0] [lindex $p 1]} msg]} {
- if {![info exists ::env(GDBTK_TEST_RUNNING)] || $::env(GDBTK_TEST_RUNNING) == 0} {
- if {$::tcl_platform(platform) != "windows"} {
- puts stderr "Error: $msg"
- }
- catch {tk_messageBox -title Error -message $msg -icon error -type ok}
- }
- exit -1
- } else {
- #puts "Loaded [lindex $p 0] $msg"
- }
-}
-
-namespace import itcl::*
-namespace import debug::*
-
-# Finally, load Iwidgets
-if {[info exists IWIDGETS_LIBRARY]} {
- lappend auto_path $IWIDGETS_LIBRARY
-}
-if {[catch {package require Iwidgets} msg]} {
- if {![info exists ::env(GDBTK_TEST_RUNNING)] || $::env(GDBTK_TEST_RUNNING) == 0} {
- if {$::tcl_platform(platform) != "windows"} {
- puts stderr "Error: $msg"
- }
- catch {tk_messageBox -title Error -message $msg -icon error -type ok}
- }
- exit -1
-}
-
-
-# Environment variables controlling debugging:
-# GDBTK_TRACE
-# unset or 0 no tracing
-# 1 tracing initialized but not started
-# 2 tracing initialized and started
-#
-# GDBTK_DEBUGFILE - filename to write debugging messages and
-# trace information (if tracing is enabled).
-#
-if {[info exists env(GDBTK_TRACE)] && $env(GDBTK_TRACE) != 0} {
- # WARNING: the tracing code must not trace into itself or
- # infinite recursion will result. As currently configured
- # the tracing code will not trace basic tcl functions or anything defined
- # before debug::init. For this reason we must source the DebugWin
- # code before debug::init is called.
- source [file join $GDBTK_LIBRARY debugwin.ith]
- source [file join $GDBTK_LIBRARY debugwin.itb]
-
- # Calling this installs our hooks for tracing and profiling.
- # This WILL slow things down.
- ::debug::init
-
- if {$env(GDBTK_TRACE) == 2} {
- ::debug::trace_start
- }
-}
-
-if {[info exists env(GDBTK_DEBUG)] && $env(GDBTK_DEBUG) != 0} {
- if {[info exists env(GDBTK_DEBUGFILE)]} {
- ::debug::logfile $env(GDBTK_DEBUGFILE)
- } else {
- ::debug::logfile "insight.log"
- }
-}
-
-# For testing
-set _test(interactive) 0
-
-# set traces on state variables
-trace variable gdb_running w do_state_hook
-trace variable gdb_downloading w do_state_hook
-trace variable gdb_loaded w do_state_hook
-define_hook state_hook
-
-# set up preferences
-pref init
-
-# let libgui tell us how to feel
-standard_look_and_feel
-
-# now let GDB set its default preferences
-pref_set_defaults
-
-# read in preferences
-pref_read
-
-init_disassembly_flavor
-
-# initialize state variables
-initialize_gdbtk
-
-# Arrange for session code to notice when file changes.
-add_hook file_changed_hook Session::notice_file_change
-
-ManagedWin::init
-
-# This stuff will help us play nice with WindowMaker's AppIcons.
-# Can't do the first bit yet, since we don't get this from gdb...
-# wm command . [concat $argv0 $argv]
-wm group . .
-
-# some initial commands to get gdb in the right mode
-gdb_cmd {set height 0}
-gdb_cmd {set width 0}
-
-if {[info exists env(GDBTK_TEST_RUNNING)] && $env(GDBTK_TEST_RUNNING)} {
- set gdb_target_name "exec"
-} else {
- # gdb_target_name is the name of the GDB target; that is, the argument
- # to the GDB target command.
- set gdb_target_name ""
- # By setting gdb_target_changed, we force a target dialog
- # to be displayed on the first "run"
- set gdb_target_changed 1
-}
-
-update
-
-# Uncomment the next line if you want a splash screen at startup...
-# ManagedWin::open About -transient -expire 5000
-
-# initialize IPC to enable multiple Insight's to communicate
-# with each other.
-set iipc 0
-if {[pref get gdb/ipc/enabled]} {
- set ::insight_ipc [Iipc \#auto]
-}
-
-gdbtk_idle
-
diff --git a/gdb/gdbtk/library/managedwin.itb b/gdb/gdbtk/library/managedwin.itb
deleted file mode 100644
index e1c75669324..00000000000
--- a/gdb/gdbtk/library/managedwin.itb
+++ /dev/null
@@ -1,419 +0,0 @@
-# Managed window for Insight.
-# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-# ------------------------------------------------------------
-# PUBLIC METHOD: constructor
-# ------------------------------------------------------------
-itcl::body ManagedWin::constructor {args} {
- #debug "$this args=$args"
- set _top [winfo toplevel $itk_interior]
-}
-
-# ------------------------------------------------------------
-# PUBLIC METHOD: destructor
-# ------------------------------------------------------------
-itcl::body ManagedWin::destructor {} {
- # If no toplevels remain, quit. However, check the quit_if_last
- # flag since we might be doing something like displaying a
- # splash screen at startup...
-
- if {!$numTopWins && [quit_if_last]} {
- if {$::iipc && [pref get gdb/ipc/exit]} {
- $::insight_ipc send quit
- }
- gdb_force_quit
- } else {
- destroy_toplevel
- }
-}
-
-# ------------------------------------------------------------
-# PUBLIC METHOD: window_name - Set the name of the window
-# (and optionally its icon's name).
-# ------------------------------------------------------------
-itcl::body ManagedWin::window_name {wname {iname ""}} {
-
- if {$wname != ""} {
- set _wname $wname
- } else {
- set wname $_wname
- }
- if {$iname != ""} {
- set _iname $iname
- } else {
- set iname $_iname
- }
-
- if {$win_instance != ""} {
- append wname " \[$win_instance\]"
- if {$iname != ""} {
- append iname " \[$win_instance\]"
- }
- }
- wm title $_top $wname
- if {$iname != ""} {
- wm iconname $_top $iname
- } else {
- wm iconname $_top $wname
- }
-}
-
-# ------------------------------------------------------------
-# PUBLIC METHOD: window_instance - Set the string to be
-# appended to each window title for this instance of Insight
-# ------------------------------------------------------------
-itcl::body ManagedWin::window_instance {ins} {
- set win_instance $ins
- foreach obj [itcl_info objects -isa ManagedWin] {
- debug "$obj ManagedWin::_wname"
- $obj window_name ""
- }
-}
-
-# ------------------------------------------------------------
-# PUBLIC METHOD: pickle - This is the base class pickle
-# method. It returns a command that can be used to recreate
-# this particular window.
-# ------------------------------------------------------------
-itcl::body ManagedWin::pickle {} {
- return [list ManagedWin::open [namespace tail [info class]]]
-}
-
-# ------------------------------------------------------------
-# PUBLIC METHOD: reveal
-# ------------------------------------------------------------
-itcl::body ManagedWin::reveal {} {
- # Do this update to flush all changes before deiconifying the window.
- update idletasks
-
- raise $_top
- wm deiconify $_top
-
- # Some window managers (on unix) fail to honor the geometry unless
- # the window is visible.
- if {[info exists ::$_top._init_geometry]} {
- upvar ::$_top._init_geometry gm
- if {$::tcl_platform(platform) == "unix"} {
- wm geometry $_top $gm
- }
- unset ::$_top._init_geometry
- }
-
- # There used to be a `focus -force' here, but using -force is
- # unfriendly, so it was removed. It was then replaced with a simple
- # `focus $top'. However, this has no useful effect -- it just
- # resets the subwindow of $top which has the `potential' focus.
- # This can actually be confusing to the user.
-
- # NOT for Windows, though. Without the focus, we get, eg. a
- # register window on top of the source window, but the source window
- # will have the focus. This is not the proper model for Windows.
- if {$::tcl_platform(platform) == "windows"} {
- focus -force [focus -lastfor $_top]
- }
-}
-
-# ------------------------------------------------------------
-# PUBLIC PROC: restart
-# ------------------------------------------------------------
-itcl::body ManagedWin::restart {} {
- # This is needed in case we've called "gdbtk_busy" before the restart.
- # This will configure the stop/run button as necessary
- after idle gdbtk_idle
-
- # call the reconfig method for each object
- foreach obj [itcl_info objects -isa ManagedWin] {
- if {[catch {$obj reconfig} msg]} {
- dbug W "reconfig failed for $obj - $msg"
- }
- }
-}
-
-# ------------------------------------------------------------------
-# PUBLIC PROC: shutdown - This writes all the active windows to
-# the preferences file, so they can be restored at startup.
-# FIXME: Currently assumes only ONE window per type...
-# ------------------------------------------------------------------
-itcl::body ManagedWin::shutdown {} {
- set activeWins {}
- foreach win [itcl_info objects -isa ManagedWin] {
- if {![$win isa ModalDialog] && ![$win _ignore_on_save]} {
- set g [wm geometry [winfo toplevel [namespace tail $win]]]
- pref setd gdb/geometry/[namespace tail $win] $g
- lappend activeWins [$win pickle]
- }
- }
- pref set gdb/window/active $activeWins
-}
-
-# ------------------------------------------------------------------
-# PUBLIC PROC: startup - This restores all the windows that were
-# opened at shutdown.
-# FIXME: Currently assumes only ONE window per type...
-# ------------------------------------------------------------------
-itcl::body ManagedWin::startup {} {
- debug "Got active list [pref get gdb/window/active]"
-
- foreach cmd [pref get gdb/window/active] {
- eval $cmd
- }
- # If we open the source window, and a source window already exists,
- # then we end up raising it twice during startup. This yields an
- # annoying effect for the user: if the user tries the bury the
- # source window during startup, it will raise itself again. This
- # explains why we first check to see if a source window exists
- # before trying to create it -- raising the window is an inevitable
- # side effect of the creation process.
- if {[llength [find SrcWin]] == 0} {
- ManagedWin::open SrcWin
- }
-}
-
-# ------------------------------------------------------------
-# PUBLIC PROC: open_dlg
-# ------------------------------------------------------------
-itcl::body ManagedWin::open_dlg {class args} {
-
- set newwin [eval _open $class $args]
- if {$newwin != ""} {
- $newwin reveal
- $newwin post
- }
-}
-
-# ------------------------------------------------------------
-# PUBLIC PROC: open
-# ------------------------------------------------------------
-itcl::body ManagedWin::open {class args} {
-
- set newwin [eval _open $class $args]
- if {$newwin != ""} {
- if {[$newwin isa ModalDialog]} {
- parse_args [list {expire 0}]
- after idle "$newwin reveal; $newwin post 0 $expire"
- } else {
- after idle "$newwin reveal"
- }
- }
-
- return $newwin
-}
-
-# ------------------------------------------------------------
-# PRIVATE PROC: _open
-# ------------------------------------------------------------
-itcl::body ManagedWin::_open { class args } {
- debug "$class $args"
-
- parse_args force
-
- if {!$force} {
- # check all windows for one of this type
- foreach obj [itcl_info objects -isa ManagedWin] {
- if {[$obj isa $class]} {
- $obj reveal
- return $obj
- }
- }
-
- }
- # need to create a new window
- return [eval _create $class $args]
-}
-
-# ------------------------------------------------------------
-# PRIVATE PROC: _create
-# ------------------------------------------------------------
-itcl::body ManagedWin::_create { class args } {
-
- set win [string tolower $class]
- debug "win=$win args=$args"
-
- parse_args {center transient {over ""}}
-
- # increment window numbers until we get an unused one
- set i 0
- while {[winfo exists .$win$i]} { incr i }
-
- while { 1 } {
- set top [toplevel .$win$i]
- wm withdraw $top
- wm protocol $top WM_DELETE_WINDOW "destroy $top"
- wm group $top .
- set newwin $top.$win
- if {[catch {uplevel \#0 eval $class $newwin $args} msg]} {
- dbug E "object creation of $class failed: $msg"
- dbug E $::errorInfo
- if {[string first "object already exists" $msg] != -1} {
- # sometimes an object is still really around even though
- # [winfo exists] said it didn't exist. Check for this case
- # and increment the window number again.
- catch {destroy $top}
- incr i
- } else {
- return ""
- }
- } else {
- break
- }
- }
-
- if {[catch {pack $newwin -expand yes -fill both}]} {
- dbug W "packing of $newwin failed: $::errorInfo"
- return ""
- }
-
- wm maxsize $top $_screenwidth $_screenheight
- wm minsize $top 20 20
- update idletasks
-
- if {$over != ""} {
- # center new window
- center_window $top -over [winfo toplevel [namespace tail $over]]
- } elseif {$center} {
- center_window $top
- }
-
- if {$transient} {
- wm resizable $top 0 0
-
- # If a SrcWin is around, use its toplevel as the master for
- # the transient. Otherwise use ".". (The splash screen will
- # need ".", for example.)
- set srcs [ManagedWin::find SrcWin]
- if {[llength $srcs] > 0} {
- set w [winfo toplevel [namespace tail [lindex $srcs 0]]]
- } else {
- set w .
- }
- wm transient $top $w
- } elseif {$::tcl_platform(platform) == "unix"} {
- # Modal dialogs DONT get Icons...
- if {[pref get gdb/use_icons] && ![$newwin isa ModalDialog]} {
- set icon [_make_icon_window ${top}_icon]
- wm iconwindow $top $icon
- bind $icon <Double-1> "$newwin reveal"
- }
- }
-
- if {[info exists ::env(GDBTK_TEST_RUNNING)] && $::env(GDBTK_TEST_RUNNING)} {
- set g "+100+100"
- wm geometry $top $g
- wm positionfrom $top user
- } else {
- set g [pref getd gdb/geometry/$newwin]
- if {$g == "1x1+0+0"} {
- dbug E "bad geometry"
- set g ""
- }
- if {$g != ""} {
- # OK. We have a requested geometry. We know that it fits on the screen
- # because we set the maxsize. Now we have to make sure it will not be
- # displayed off the screen.
- set w 0; set h 0; set x 0; set y 0
- if {![catch {scan $g "%dx%d%d%d" w h x y} res]} {
- if {$x < 0} {
- set x [expr $_screenwidth + $x]
- }
- if {$y < 0} {
- set y [expr $_screenheight + $y]
- }
-
- # If the window is transient, then don't reset its size, since
- # the user didn't set this anyway, and in some cases where the
- # size can change dynamically, like the Global Preferences
- # dialog, this can hide parts of the dialog with no recourse...
-
- # if dont_remember_size is true, don't set size, just like
- # transients
-
- if {$transient || [dont_remember_size]} {
- set g "+${x}+${y}"
- } else {
- set g "${w}x${h}+${x}+${y}"
- }
- if {[expr $x+50] < $_screenwidth && [expr $y+20] < $_screenheight} {
- wm positionfrom $top user
- wm geometry $top $g
- set ::$top._init_geometry $g
- }
- }
- }
- }
-
- bind $top <Alt-F4> [list delete object $newwin]
-
- return $newwin
-}
-
-# ------------------------------------------------------------
-# PUBLIC PROC: find
-# ------------------------------------------------------------
-itcl::body ManagedWin::find { win } {
- debug "$win"
- set res ""
- foreach obj [itcl_info objects -isa ManagedWin] {
- if {[$obj isa $win]} {
- lappend res $obj
- }
- }
- return $res
-}
-
-# ------------------------------------------------------------
-# PUBLIC PROC: init
-# ------------------------------------------------------------
-itcl::body ManagedWin::init {} {
- wm withdraw .
- set _screenheight [winfo screenheight .]
- set _screenwidth [winfo screenwidth .]
-}
-
-# ------------------------------------------------------------
-# PUBLIC METHOD: destroy_toplevel
-# ------------------------------------------------------------
-itcl::body ManagedWin::destroy_toplevel {} {
- after idle "update idletasks;destroy $_top"
-}
-
-# ------------------------------------------------------------
-# PROTECTED METHOD: _freeze_me
-# ------------------------------------------------------------
-itcl::body ManagedWin::_freeze_me {} {
- $_top configure -cursor watch
- ::update idletasks
-}
-
-# ------------------------------------------------------------
-# PROTECTED METHOD: _thaw_me
-# ------------------------------------------------------------
-itcl::body ManagedWin::_thaw_me {} {
-
- $_top configure -cursor {}
- ::update idletasks
-}
-
-# ------------------------------------------------------------------
-# PRIVATE PROC: _make_icon_window - create a small window with an
-# icon in it for use by certain Unix window managers.
-# ------------------------------------------------------------------
-itcl::body ManagedWin::_make_icon_window {name {file "gdbtk_icon"}} {
- if {![winfo exists $name]} {
- toplevel $name
- label $name.im -image \
- [image create photo icon_photo -file [file join $::gdb_ImageDir $file.gif]]
- }
- pack $name.im
- return $name
-}
diff --git a/gdb/gdbtk/library/managedwin.ith b/gdb/gdbtk/library/managedwin.ith
deleted file mode 100644
index aae0a676108..00000000000
--- a/gdb/gdbtk/library/managedwin.ith
+++ /dev/null
@@ -1,72 +0,0 @@
-# Managed window class definition for GDBtk.
-# Copyright (C) 1998, 1999, 2000, 2001 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-itcl::class ManagedWin {
- inherit itk::Widget
-
- public {
- method constructor {args}
- method destructor {}
-
- method reconfig {} {}
- method destroy_toplevel {}
- method quit_if_last {} {return 1}
- method pickle {}
- method reveal {}
- method window_name {wname {iname ""}}
- proc window_instance {ins}
-
- proc find {win}
- proc open {class args}
- proc open_dlg {class args}
- proc init {}
- proc restart {}
- proc startup {}
- proc shutdown {}
-
- common win_instance ""
- }
-
- protected {
- # The Tk's toplevel window for this ManagedWin
- variable _top
-
- # Variable which holds the geometry of this window
- variable _geometry {}
-
- # this is the counter of TopLevelWins open
- # when it hits 0, exit.
- common numTopWins 0
-
- common _screenwidth
- common _screenheight
-
- method _freeze_me {}
- method _thaw_me {}
-
- # Should this window be reopened when we startup?
- method _ignore_on_save {} { return 0 }
-
- # Should this window's size be remembered?
- proc dont_remember_size {} { return 0 }
- }
-
- private {
- proc _create {class args}
- proc _open {class args}
- proc _make_icon_window {name {file "gdbtk_icon"}}
- variable _wname {}
- variable _iname {}
- }
-}
diff --git a/gdb/gdbtk/library/mempref.itb b/gdb/gdbtk/library/mempref.itb
deleted file mode 100644
index 85937c7aabd..00000000000
--- a/gdb/gdbtk/library/mempref.itb
+++ /dev/null
@@ -1,424 +0,0 @@
-# Memory display preferences window for Insight.
-# Copyright (C) 1998, 1999, 2002, 2003, 2006 Red Hat
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-# ------------------------------------------------------------------
-# METHOD: constructor - build the dialog
-# ------------------------------------------------------------------
-itcl::body MemPref::constructor {args} {
-
- window_name "Memory Preferences"
-
- eval itk_initialize $args
-
- if {$float_size == ""} {
- set float_size [gdb_eval sizeof(float)]
- set double_size [gdb_eval sizeof(double)]
- }
-
- if {[string compare $format f] == 0} {
- set gformat x
- set format_disabled 1
- if {$size == $float_size} {
- set gsize 3
- } elseif {$size == $double_size} {
- set gsize 5
- }
- } else {
- set gsize $size
- set gformat $format
- }
-
- set gnumbytes $numbytes
- set gbpr $bpr
- set gbprlist [list 4 8 16 32 64 128]
- set gascii $ascii
- set gascii_char $ascii_char
-
- build_win
-
- if {$format_disabled} {
- set format_disabled 0
- disable_format
- }
-
- wm resizable [winfo toplevel $itk_interior] 0 0
-}
-
-# ------------------------------------------------------------------
-# METHOD: destructor - destroy the dialog
-# ------------------------------------------------------------------
-itcl::body MemPref::destructor {} {
- trace vdelete [scope gnumbytes] w [code $this check_numbytes]
-}
-
-# ------------------------------------------------------------------
-# METHOD: build_win - build the dialog
-# ------------------------------------------------------------------
-itcl::body MemPref::build_win {} {
-
- frame $itk_interior.f
- set f [frame $itk_interior.f.a]
- frame $itk_interior.f.b
-
- # SIZE
- Labelledframe $f.f1 -anchor nw -text Size
- set fr [$f.f1 get_frame]
-
- set Widgets(rb-Byte) [radiobutton $fr.1 -variable [scope gsize] -text Byte \
- -value 1 -command [code $this enable_format]]
- set Widgets(rb-half_word) [radiobutton $fr.2 -variable [scope gsize] -text "Half Word" \
- -value 2 -command [code $this enable_format]]
- set Widgets(rb-word) [radiobutton $fr.4 -variable [scope gsize] -text Word \
- -value 4 -command [code $this enable_format]]
- set Widgets(rb-d_word) [radiobutton $fr.8 -variable [scope gsize] -text "Double Word" \
- -value 8 -command [code $this enable_format]]
- set Widgets(rb-float) [radiobutton $fr.f -variable [scope gsize] -text Float \
- -value 3 -command [code $this disable_format]]
- set Widgets(rb-d_float) [radiobutton $fr.d -variable [scope gsize] -text "Double Float" \
- -value 5 -command [code $this disable_format]]
- grid $fr.1 $fr.4 $fr.f -sticky w -padx 4
- grid $fr.2 $fr.8 $fr.d -sticky w -padx 4
-
- # FORMAT
- Labelledframe $f.f2 -anchor nw -text Format
- set fr [$f.f2 get_frame]
- set Widgets(rb-binary) [radiobutton $fr.1 -variable [scope gformat] \
- -text Binary -value t]
- set Widgets(rb-octal) [radiobutton $fr.2 -variable [scope gformat] \
- -text Octal -value o]
- set Widgets(rb-hex) [radiobutton $fr.3 -variable [scope gformat] \
- -text Hex -value x]
- set Widgets(rb-signed_dec) [radiobutton $fr.4 -variable [scope gformat] \
- -text "Signed Decimal" -value d]
- set Widgets(rb-unsign_dec) [radiobutton $fr.5 -variable [scope gformat] \
- -text "Unsigned Decimal" -value u]
-
- grid $fr.1 $fr.2 $fr.3 -sticky w -padx 4
- grid $fr.4 $fr.5 x -sticky w -padx 4
-
- # TOTAL BYTES
- Labelledframe $f.fx -anchor nw -text "Number of Bytes"
-
- if {$gnumbytes == 0} {
- set gnumbytes $default_numbytes
- set gvar 0
- } else {
- set gvar 1
- }
-
- set fr [$f.fx get_frame]
- set Widgets(rb-win_size) [radiobutton $fr.1 -variable [scope gvar] -text "Depends on window size" \
- -value 0 -command [code $this toggle_size_control]]
- frame $fr.2
- set Widgets(rb-fixed) [radiobutton $fr.2.b -variable [scope gvar] -text Fixed \
- -value 1 -command [code $this toggle_size_control]]
-
- set old_numbytes $default_numbytes
- set Widgets(e-numbytes) [entry $fr.2.e -textvariable [scope gnumbytes] -width 3]
- set normal_background [$Widgets(e-numbytes) cget -background]
-
- #
- # Trace gnumbytes so it will always be a +'ve integer... Have to set this
- # trace AFTER the widget's textvariable is set so this trace will fire
- # BEFORE the widget's trace.
- #
-
- trace variable [scope gnumbytes] w [code $this check_numbytes]
-
- label $fr.2.l -text bytes
- grid $fr.2.b $fr.2.e $fr.2.l -sticky we
- grid $fr.1 x -sticky w -padx 4
- grid $fr.2 x -sticky w -padx 4
- grid columnconfigure $fr 1 -weight 1
-
- # MISC
- Labelledframe $f.1 -anchor nw -text "Miscellaneous"
- set fr [$f.1 get_frame]
- frame $fr.1
- label $fr.1.plabel -height 1 -width 1 -bg $color -relief raised
- set Widgets(b-color) [button $fr.1.pc -text "Change color..." \
- -command [code $this pick $fr.1.plabel]]
- grid $fr.1.plabel $fr.1.pc
- frame $fr.2
- label $fr.2.l -text "Bytes Per Row "
- set Widgets(b-bytes_per_row) [::combobox::combobox $fr.2.c \
- -command [code $this set_bytes_per_row] \
- -width 4 -editable 1 -font global/fixed \
- -bg $::Colors(textbg)]
- foreach item $gbprlist {
- $fr.2.c list insert end $item
- }
- $fr.2.c configure -value $gbpr
-
- pack $fr.2.l -side left -anchor e
- pack $fr.2.c -side right
-
- set Widgets(cb-display_ascii) [checkbutton $fr.3 -variable [scope gascii] -text "Display ASCII"]
- frame $fr.4
- set Widgets(e-ascii_char) [entry $fr.4.e -textvariable [scope gascii_char] -width 1]
- label $fr.4.l -text "Control Char"
- grid $fr.4.e $fr.4.l -sticky we
- grid $fr.2 x $fr.3 -sticky w -padx 4
- grid $fr.4 -sticky w -padx 4
- grid columnconfigure $fr 1 -weight 1
-
- grid $f.f1 -padx 5 -pady 6 -sticky news
- grid $f.f2 -padx 5 -pady 6 -sticky news
- grid $f.fx -padx 5 -pady 6 -sticky news
- grid $f.1 -padx 5 -pady 6 -sticky we
-
-
- set Widgets(b-ok) [button $itk_interior.f.b.ok -text OK -command [code $this ok] -width 7 -default active]
- focus $Widgets(b-ok)
-
- # If there is an OK button, set Return in the entry field to invoke it...
-
- bind $Widgets(e-numbytes) <KeyPress-Return> "$Widgets(b-ok) flash ; $Widgets(b-ok) invoke"
-
- set Widgets(b-cancel) [button $itk_interior.f.b.quit -text Cancel -command [code $this cancel] -width 7]
- set Widgets(b-apply) [button $itk_interior.f.b.apply -text Apply -command [code $this apply] -width 7]
- standard_button_box $itk_interior.f.b
-
- grid $itk_interior.f.a
- grid $itk_interior.f.b -sticky news
- grid $itk_interior.f
-
- #
- # Set the state of the window size entry here...
- #
- toggle_size_control
-
-}
-
-# ------------------------------------------------------------------
-# METHOD: busy - make the widget unusable
-# ------------------------------------------------------------------
-itcl::body MemPref::busy {} {
- set top [winfo toplevel $itk_interior]
- $top configure -cursor watch
-
- # Disable all the radiobuttons and what not
- foreach w [array names Widgets] {
- set WidgetState($w) [$Widgets($w) cget -state]
- }
- foreach w [array names Widgets] {
- $Widgets($w) configure -state disabled
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: idle - make the widget useable
-# ------------------------------------------------------------------
-itcl::body MemPref::idle {} {
- set top [winfo toplevel $itk_interior]
- $top configure -cursor {}
-
- # Re-enable all widgets
- foreach w [array names Widgets] {
- $Widgets($w) configure -state $WidgetState($w)
- }
-}
-# ------------------------------------------------------------------
-# METHOD: ok - apply and quit
-# ------------------------------------------------------------------
-itcl::body MemPref::ok {} {
- apply
- unpost
-}
-
-# ------------------------------------------------------------------
-# METHOD: cancel - just close the dialog w/o saving changes
-# ------------------------------------------------------------------
-itcl::body MemPref::cancel {} {
- unpost
-}
-
-# ------------------------------------------------------------------
-# METHOD: check_numbytes - a trace to make sure gnumbytes is an int > 0
-# ------------------------------------------------------------------
-itcl::body MemPref::check_numbytes {var index mode} {
- upvar \#0 $var true
- if {($true != "") && ([catch {expr {(int($true) != double($true)) || $true <= 0}} val]
- || $val)} {
- bell
- set true $old_numbytes
- } else {
- set old_numbytes $true
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: set_bytes_per_row - combobox callback to set the bytes per row
-# ------------------------------------------------------------------
-itcl::body MemPref::set_bytes_per_row {w value} {
- if {[string is integer -strict $value] && [expr {$value != 0}]} {
- # The input is a value number.
- set gbpr $value
- set gbpr [string trim $gbpr]
-
- # Too high a number will cause a Segmentation fault.
- if {[expr {$gbpr > 150}]} {set gbpr 150}
-
- # Insert the value into the combo box list, if it isn't there already.
- set found [lsearch $gbprlist $gbpr]
-
- if {$found == -1} {
- lappend gbprlist $gbpr
- $Widgets(b-bytes_per_row) list insert end $gbpr
- }
-
- set s $gsize
- if {$s == 3} {set s 4}
- if {$s == 5} {set s 8}
- set rem [expr {$gbpr % $s}]
- if {$rem != 0} {
- # The bytes-per-row is not a multiple of the size.
- set gbpr [expr {$gbpr + ($s - $rem)}]
- }
- }
-
- # Set the display to the new value. This may be different if the input
- # was zero or not a number, or if the user entered any whitespace.
- $Widgets(b-bytes_per_row) delete 0 end
- $Widgets(b-bytes_per_row) insert end $gbpr
-}
-
-# ------------------------------------------------------------------
-# METHOD: toggle_size_control - toggle the state of the entry box as the
-# control method changes
-# ------------------------------------------------------------------
-itcl::body MemPref::toggle_size_control {} {
-
- if {$gvar} {
- $Widgets(e-numbytes) configure -state normal \
- -background $normal_background
- } else {
- $Widgets(e-numbytes) configure -state disabled -background lightgray
- if {[info exists Widgets(b-ok)]} {
- focus $Widgets(b-ok)
- }
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: apply - apply changes to the parent window
-# ------------------------------------------------------------------
-itcl::body MemPref::apply {} {
-
- busy
- gdbtk_busy
-
- if {$gvar == 0} {
- set numbytes 0
- } elseif {$gnumbytes == "" || $gnumbytes == 0} {
- # Protect against the case where someone sets the
- # entry field to an empty string, or pastes in a 0...
- bell
- set gnumbytes $default_numbytes
- set numbytes $gnumbytes
- } else {
- set numbytes $gnumbytes
- }
- switch $gsize {
- 3 {
- set size $float_size
- set format f
- }
- 5 {
- set size $double_size
- set format f
- }
- default {
- set size $gsize
- set format $gformat
- }
- }
-
- # Ensure the value has been read from the text field.
- set_bytes_per_row "" [$Widgets(b-bytes_per_row) get]
-
- # pass all the changed values back to parent
- debug "$win configChange -size $size -numbytes $numbytes \
- -format $format -ascii $gascii \
- -ascii_char $gascii_char -bytes_per_row $gbpr \
- -color $color"
- eval $win configure -size $size -numbytes $numbytes \
- -format $format -ascii $gascii \
- -ascii_char $gascii_char -bytes_per_row $gbpr \
- -color $color
-
- $win reconfig
-
- gdbtk_idle
- idle
-}
-
-# ------------------------------------------------------------------
-# METHOD: enable_format - turn on the format radio buttons
-# ------------------------------------------------------------------
-itcl::body MemPref::enable_format {} {
- # First ensure bytes per row is a multiple of the size.
- # Use the value of the widget, not $gbpr to ensure the typed value is kept.
- set_bytes_per_row "" [$Widgets(b-bytes_per_row) get]
-
- if {!$format_disabled} {
- return
- }
-
- foreach widget {rb-binary rb-octal rb-hex rb-signed_dec rb-unsign_dec} {
- $Widgets($widget) configure -state normal
- }
- set format_disabled 0
-}
-
-
-# ------------------------------------------------------------------
-# METHOD: disable_format - turn off the format radio buttons
-# ------------------------------------------------------------------
-itcl::body MemPref::disable_format {} {
- # First ensure bytes per row is a multiple of the size.
- # Use the value of the widget, not $gbpr to ensure the typed value is kept.
- set_bytes_per_row "" [$Widgets(b-bytes_per_row) get]
-
- if {$format_disabled} {
- return
- }
-
- foreach widget {rb-binary rb-octal rb-hex rb-signed_dec rb-unsign_dec} {
- $Widgets($widget) configure -state disabled
- }
- set format_disabled 1
-}
-
-# ------------------------------------------------------------------
-# METHOD: pick - pick colors
-# ------------------------------------------------------------------
-itcl::body MemPref::pick {lab} {
- set new_color [tk_chooseColor -initialcolor $color -title "Choose color"]
- if {$new_color != $color && $new_color != ""} {
- set color $new_color
- $lab configure -bg $color
- }
-}
-
-
-# ------------------------------------------------------------------
-# METHOD: reconfig - used when preferences change
-# ------------------------------------------------------------------
-itcl::body MemPref::reconfig {} {
- # for now, just delete and recreate
- destroy $itk_interior.f
- build_win
-}
-
diff --git a/gdb/gdbtk/library/mempref.ith b/gdb/gdbtk/library/mempref.ith
deleted file mode 100644
index d1f5f723949..00000000000
--- a/gdb/gdbtk/library/mempref.ith
+++ /dev/null
@@ -1,70 +0,0 @@
-# Memory display preferences window class definition for GDBtk.
-# Copyright (C) 1998, 1999 Cygnus Solutions
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-itcl::class MemPref {
- inherit ModalDialog ManagedWin
-
- public {
- variable win
- variable size
- variable format
- variable numbytes
- variable bpr
- variable ascii
- variable ascii_char
- variable color
-
- method constructor {args}
- method destructor {}
- method busy {}
- method idle {}
- method cancel {}
- method set_bytes_per_row {w value}
- method check_numbytes {var index mode}
- method toggle_size_control {}
- method apply {}
- method enable_format {}
- method disable_format {}
- method pick {lab}
- method reconfig {}
- }
-
- private {
- # The next seven variables are all used in the radio-buttons
- # and checkbuttons of the display.
- variable gsize
- variable gformat
- variable gnumbytes
- variable gbpr
- variable gbprlist
- variable gascii
- variable gascii_char
- variable gvar
-
- variable Widgets
- variable WidgetState
- variable format_disabled 0
- variable old_numbytes
- variable normal_background
- method build_win {}
- method ok {}
- }
-
- protected {
- common float_size ""
- common double_size ""
- common default_numbytes 128
- }
-
-}
diff --git a/gdb/gdbtk/library/memwin.itb b/gdb/gdbtk/library/memwin.itb
deleted file mode 100644
index 006c4fa9d36..00000000000
--- a/gdb/gdbtk/library/memwin.itb
+++ /dev/null
@@ -1,776 +0,0 @@
-# Memory display window class definition for Insight.
-# Copyright (C) 1998, 1999, 2001, 2002, 2005 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# ------------------------------------------------------------------
-# METHOD: constructor - build the dialog
-# ------------------------------------------------------------------
-itcl::body MemWin::constructor {args} {
- global _mem
- debug $args
- eval itk_initialize $args
-
- set top [winfo toplevel $itk_interior]
- gdbtk_busy
-
- set _mem($this,enabled) 1
-
- if {![info exists type(1)]} {
- set type(1) char
- set type(2) short
- set type(4) int
- set type(8) "long long"
- }
-
- if {[pref getd gdb/mem/menu] != ""} {
- set mbar 0
- }
-
- # Load defaults from preferences.
- set size [pref getd gdb/mem/size]
- set numbytes [pref getd gdb/mem/numbytes]
- set format [pref getd gdb/mem/format]
- set ascii [pref getd gdb/mem/ascii]
- set ascii_char [pref getd gdb/mem/ascii_char]
- set bytes_per_row [pref getd gdb/mem/bytes_per_row]
- set color [pref getd gdb/mem/color]
-
- init_addr_exp
- build_win
- gdbtk_idle
-}
-
-# ------------------------------------------------------------------
-# METHOD: destructor - destroy the dialog
-# ------------------------------------------------------------------
-itcl::body MemWin::destructor {} {
- if {[winfo exists $prefs_win]} {
- $prefs_win cancel
- }
-}
-
-
-# ------------------------------------------------------------------
-# METHOD: build_win - build the main memory window
-# ------------------------------------------------------------------
-itcl::body MemWin::build_win {} {
- global tcl_platform gdb_ImageDir _mem ${this}_memval
-
- set maxlen 0
- set maxalen 0
- set saved_value ""
-
- if { $mbar } {
- menu $itk_interior.m -tearoff 0
- $top configure -menu $itk_interior.m
- $itk_interior.m add cascade -menu $itk_interior.m.addr \
- -label "Addresses" -underline 0
- set m [menu $itk_interior.m.addr]
- $m add check -label " Auto Update" -variable _mem($this,enabled) \
- -underline 1 -command "after idle $this toggle_enabled"
- $m add command -label " Update Now" -underline 1 \
- -command [code $this _update_address 1] -accelerator {Ctrl+U}
- $m add separator
- $m add command -label " Preferences..." -underline 1 \
- -command "$this create_prefs"
- }
-
- # Numcols = number of columns of data
- # numcols = number of columns in table (data plus headings plus ASCII)
- # if numbytes are 0, then use window size to determine how many to read
- if {$numbytes == 0} {
- set Numrows 8
- } else {
- set Numrows [expr {$numbytes / $bytes_per_row}]
- }
- set numrows [expr {$Numrows + 1}]
-
- set Numcols [expr {$bytes_per_row / $size}]
- if {$ascii} {
- set numcols [expr {$Numcols + 2}]
- } else {
- set numcols [expr {$Numcols + 1}]
- }
-
- itk_component add table {
- ::table $itk_interior.t -titlerows 1 -titlecols 1 -variable ${this}_memval \
- -roworigin -1 -colorigin -1 -bg $::Colors(textbg) -fg $::Colors(textfg) \
- -browsecmd "$this changed_cell %s %S" -font global/fixed\
- -colstretch unset -rowstretch unset -selectmode single \
- -xscrollcommand "$itk_interior.sx set" -resizeborders none \
- -cols $numcols -rows $numrows -autoclear 1
- } {
- keep -foreground
- keep -insertbackground
- keep -highlightcolor
- keep -highlightbackground
- }
-
- if {$numbytes} {
- $itk_component(table) configure -yscrollcommand "$itk_interior.sy set"
- scrollbar $itk_interior.sy -command [list $itk_component(table) yview]
- } else {
- $itk_component(table) configure -rowstretchmode none
- }
- scrollbar $itk_interior.sx -command [list $itk_component(table) xview] -orient horizontal
- $itk_component(table) tag config sel -bg [$itk_component(table) cget -bg] -relief sunken
- $itk_component(table) tag config active -relief sunken -wrap 0 \
- -bg $::Colors(sbg) -fg $::Colors(sfg)
- $itk_component(table) tag config title -bg $::Colors(bg) -fg $::Colors(fg)
-
- # rebind all events that use tkTableMoveCell to our local version
- # because we don't want to move into the ASCII column if it exists
- bind $itk_component(table) <Up> "$this memMoveCell %W -1 0; break"
- bind $itk_component(table) <Down> "$this memMoveCell %W 1 0; break"
- bind $itk_component(table) <Left> "$this memMoveCell %W 0 -1; break"
- bind $itk_component(table) <Right> "$this memMoveCell %W 0 1; break"
- bind $itk_component(table) <Return> "$this memMoveCell %W 0 1; break"
- bind $itk_component(table) <KP_Enter> "$this memMoveCell %W 0 1; break"
-
- # bind button 3 to popup
- bind $itk_component(table) <3> "$this do_popup %X %Y"
-
- # bind Paste and button2 to the paste function
- # this is necessary because we want to not just paste the
- # data into the cell, but we also have to write it
- # out to real memory
- bind $itk_component(table) <ButtonRelease-2> [format {after idle %s paste %s %s} $this %x %y]
- bind $itk_component(table) <<Paste>> [format {after idle %s paste %s %s} $this %x %y]
-
- menu $itk_component(table).menu -tearoff 0
- bind_plain_key $top Control-u [code $this _update_address 1]
-
- # bind resize events
- bind $itk_interior <Configure> "$this newsize %h"
-
- frame $itk_interior.f
- iwidgets::spinint $itk_interior.f.cntl -labeltext " Address " -width 20 \
- -command "after idle $this update_address_cb" \
- -increment "after idle $this incr_addr -1" \
- -decrement "after idle $this incr_addr 1" -foreground $::Colors(textfg) \
- -validate {} -textbackground $::Colors(textbg)
- $itk_interior.f.cntl delete 0 end
- $itk_interior.f.cntl insert end $addr_exp
-
- label $itk_interior.f.endian -text "Target is [gdbtk_endian] endian"
-
- balloon register [$itk_interior.f.cntl childsite].uparrow \
- "Scroll Up (Decrement Address)"
- balloon register [$itk_interior.f.cntl childsite].downarrow \
- "Scroll Down (Increment Address)"
- if {!$mbar} {
- button $itk_interior.f.upd -command [code $this _update_address 1] \
- -image [image create photo -file [::file join $gdb_ImageDir check.gif]]
- balloon register $itk_interior.f.upd "Update Now"
- checkbutton $itk_interior.cb -variable _mem($this,enabled) -command "$this toggle_enabled"
- balloon register $itk_interior.cb "Toggles Automatic Display Updates"
- grid $itk_interior.f.upd $itk_interior.f.cntl $itk_interior.f.endian -sticky ew -padx 5
- } else {
- grid $itk_interior.f.cntl x $itk_interior.f.endian -sticky e
- grid columnconfigure $itk_interior.f 1 -weight 1
- }
-
- # draw top border
- set col 0
- for {set i 0} {$i < $bytes_per_row} { incr i $size} {
- set ${this}_memval(-1,$col) [format " %X" $i]
- incr col
- }
-
- if {$ascii} {
- set ${this}_memval(-1,$col) ASCII
- }
-
- # fill initial display
- if {$nb} {
- _update_address 0
- }
-
- if {!$mbar} {
- grid $itk_interior.f x -row 0 -column 0 -sticky nws
- grid $itk_interior.cb -row 0 -column 1 -sticky news
- } else {
- grid $itk_interior.f -row 0 -column 0 -sticky news
- }
- grid $itk_component(table) -row 1 -column 0 -sticky news
- if {$numbytes} { grid $itk_interior.sy -row 1 -column 1 -sticky ns }
- grid $itk_interior.sx -sticky ew
- grid columnconfig $itk_interior 0 -weight 1
- grid rowconfig $itk_interior 1 -weight 1
- focus $itk_interior.f.cntl
-
- window_name "Memory"
-}
-
-# ------------------------------------------------------------------
-# METHOD: paste - paste callback. Update cell contents after paste
-# ------------------------------------------------------------------
-itcl::body MemWin::paste {x y} {
- edit [$itk_component(table) index @$x,$y]
-}
-
-# ------------------------------------------------------------------
-# METHOD: validate - because the control widget wants this
-# ------------------------------------------------------------------
-itcl::body MemWin::validate {val} {
- return $val
-}
-
-# ------------------------------------------------------------------
-# METHOD: create_prefs - create memory preferences dialog
-# ------------------------------------------------------------------
-itcl::body MemWin::create_prefs {} {
- if {$Running} { return }
-
- # make sure row height is set
- if {$rheight == ""} {
- set rheight [lindex [$itk_component(table) bbox 0,0] 3]
- }
-
- set prefs_win [ManagedWin::open MemPref -force -over $this\
- -transient -win $this \
- -size $size -format $format -numbytes $numbytes \
- -bpr $bytes_per_row -ascii $ascii \
- -ascii_char $ascii_char -color $color]
-}
-
-# ------------------------------------------------------------------
-# METHOD: changed_cell - called when moving from one cell to another
-# ------------------------------------------------------------------
-itcl::body MemWin::changed_cell {from to} {
- #debug "moved from $from to $to"
- #debug "value = [$itk_component(table) get $from]"
- if {$saved_value != ""} {
- if {$saved_value != [$itk_component(table) get $from]} {
- edit $from
- }
- }
- set saved_value [$itk_component(table) get $to]
-}
-
-# ------------------------------------------------------------------
-# METHOD: edit - edit a cell
-# ------------------------------------------------------------------
-itcl::body MemWin::edit { cell } {
- global _mem ${this}_memval
-
- #debug "edit $cell"
-
- if {$Running || $cell == ""} { return }
- set rc [split $cell ,]
- set row [lindex $rc 0]
- set col [lindex $rc 1]
- set val [$itk_component(table) get $cell]
-
- if {$col == $Numcols} {
- # editing the ASCII field
- set addr [gdb_incr_addr $current_addr [expr {$bytes_per_row * $row}]]
- set start_addr $addr
-
- # calculate number of rows to modify
- set len [string length $val]
- set rows 0
- while {$len > 0} {
- incr rows
- set len [expr {$len - $bytes_per_row}]
- }
- set nb [expr {$rows * $bytes_per_row}]
-
- # now process each char, one at a time
- foreach c [split $val ""] {
- if {$c != $ascii_char} {
- scan $c %c char
- if {[catch {gdb_set_mem $addr [format %02x $char] 1} res]} {
- error_dialog $res
-
- # reset value
- set ${this}_memval($row,$col) $saved_value
- return
- }
- }
- set addr [gdb_incr_addr $addr]
- }
- set addr $start_addr
- set nextval 0
- # now read back the data and update the widget
- catch {gdb_update_mem ${this}_memval $addr $format $size $nb $bytes_per_row $ascii_char} vals
- return
- }
-
- # calculate address based on row and column
- set addr [gdb_incr_addr $current_addr [expr {$bytes_per_row * $row + $size * $col}]]
- #debug " edit $row,$col $addr = $val"
-
- # Pad the value with zeros, if necessary
- set s [expr {$size * 2}]
- set val [format "0x%0${s}x" $val]
-
- # set memory
- #debug "set_mem $addr $val $size"
- if {[catch {gdb_set_mem $addr $val $size} res]} {
- error_dialog $res
-
- # reset value
- set ${this}_memval($row,$col) $saved_value
- return
- }
-
- # read it back
- # FIXME - HACK ALERT - This call causes trouble with remotes on Windows.
- # This routine is in fact called from within an idle handler triggered by
- # memMoveCell. Something evil happens in that handler that causes gdb to
- # start writing this changed value into all the visible cells...
- # I have not figured out the cause of this, so for now I commented this
- # line out. It will only matter if the write did not succeed, and this was
- # not a very good way to tell the user about that anyway...
- #
- # catch {gdb_update_mem $addr $format $size $size $size ""} val
- # delete whitespace in response
- set val [string trimright $val]
- set val [string trimleft $val]
- set ${this}_memval($row,$col) $val
-}
-
-
-# ------------------------------------------------------------------
-# METHOD: toggle_enabled - called when enable is toggled
-# ------------------------------------------------------------------
-itcl::body MemWin::toggle_enabled {} {
- global _mem
-
- if {$Running} { return }
- if {$_mem($this,enabled)} {
- _update_address 1
- set state normal
- set bg $::Colors(textbg)
- } else {
- set bg $::Colors(bg)
- set state disabled
- }
- $itk_component(table) config -background $bg -state $state
-}
-
-# ------------------------------------------------------------------
-# METHOD: update - update widget after every PC change
-# ------------------------------------------------------------------
-itcl::body MemWin::update {event} {
- global _mem
- if {$_mem($this,enabled)} {
- _update_address 0
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: idle - memory window is idle, so enable menus
-# ------------------------------------------------------------------
-itcl::body MemWin::idle {event} {
- # Fencepost
- set Running 0
-
- # Cursor
- cursor {}
-
- if {[winfo exists $itk_interior.m.addr]} {
- # Enable menus
- if {$mbar} {
- for {set i 0} {$i <= [$itk_interior.m.addr index last]} {incr i} {
- if {[$itk_interior.m.addr type $i] != "separator"} {
- $itk_interior.m.addr entryconfigure $i -state normal
- }
- }
- }
-
- # Enable control
- $itk_interior.f.cntl configure -state normal
- }
-}
-
-
-# ------------------------------------------------------------------
-# METHOD: busy - BusyEvent handler
-# Disable menus 'cause we're busy updating things.
-# ------------------------------------------------------------------
-itcl::body MemWin::busy {event} {
- # Fencepost
- set Running 1
-
- # cursor
- cursor watch
-
- # go away if window is not finished drawing
- if {![winfo exists $itk_interior.f.cntl]} { return }
-
- # Disable menus
- if {$mbar} {
- for {set i 0} {$i <= [$itk_interior.m.addr index last]} {incr i} {
- if {[$itk_interior.m.addr type $i] != "separator"} {
- $itk_interior.m.addr entryconfigure $i -state disabled
- }
- }
- }
-
- # Disable control
- $itk_interior.f.cntl configure -state disabled
-}
-
-# ------------------------------------------------------------------
-# METHOD: newsize - calculate how many rows to display when the
-# window is resized.
-# ------------------------------------------------------------------
-itcl::body MemWin::newsize {height} {
-
- if {$dont_size || $Running} {
- return
- }
-
- # only add rows if numbytes is zero
- if {$numbytes == 0} {
- ::update idletasks
-
- # make sure row height is set
- if {$rheight == ""} {
- set rheight [lindex [$itk_component(table) bbox 0,0] 3]
- }
-
- set theight [winfo height $itk_component(table)]
- set Numrows [expr {$theight / $rheight}]
- $itk_component(table) configure -rows $Numrows
- _update_address 1
- }
-}
-
-itcl::body MemWin::_update_address {make_busy} {
- if {$make_busy} {
- gdbtk_busy
- }
- update_address [string trimleft [$itk_interior.f.cntl get]]
- if {$make_busy} {
- gdbtk_idle
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: update_address_cb - address entry widget callback
-# ------------------------------------------------------------------
-itcl::body MemWin::update_address_cb {} {
- set new_entry 1
- _update_address 1
-}
-
-# ------------------------------------------------------------------
-# METHOD: update_address - update address and data displayed
-# ------------------------------------------------------------------
-itcl::body MemWin::update_address {addr} {
-
- set bad_expr 0
- set saved_addr $current_addr
- if {[string match {[a-zA-Z_&0-9\*]*} $addr]} {
- # Looks like an expression
- set retVal [catch {gdb_eval "$addr" x} current_addr]
- #debug "retVal=$retVal current_addr=$current_addr"
- if {$retVal || [string match "No symbol*" $current_addr] || \
- [string match "Invalid *" $current_addr]} {
- BadExpr $current_addr
- return
- }
- if {[string match {\{*} $current_addr]} {
- set current_addr [lindex $current_addr 1]
- if {$current_addr == ""} {
- return
- }
- }
- } elseif {[regexp {\$[a-zA-Z_]} $addr]} {
- # Looks like a local variable
- set retVal [catch {gdb_eval "$addr" x} current_addr]
- #debug "retVal=$retVal current_addr=$current_addr"
- if {$retVal} {
- BadExpr $current_addr
- return
- }
- if {$current_addr == "void"} {
- BadExpr "No Local Variable Named \"$addr\""
- return
- }
- } else {
- # something really strange, like "0.1" or ""
- BadExpr "Can't Evaluate \"$addr\""
- return
- }
-
- # Check for spaces - this can happen with gdb_eval and $pc, for example.
- set index [string first \ $current_addr]
- if {$index != -1} {
- incr index -1
- set current_addr [string range $current_addr 0 $index]
- }
-
- set addr_exp $addr
-
- # set table background
- $itk_component(table) config -bg $::Colors(textbg) -state normal
- catch {update_addr}
-}
-
-# ------------------------------------------------------------------
-# METHOD: BadExpr - handle a bad expression
-# ------------------------------------------------------------------
-itcl::body MemWin::BadExpr {errTxt} {
- if {$new_entry} {
- tk_messageBox -type ok -icon error -message $errTxt
- set new_entry 0
- }
- # set table background to gray
- $itk_component(table) config -bg $::Colors(bg) -state disabled
- set current_addr $saved_addr
- set saved_addr ""
- set bad_expr 1
-}
-
-# ------------------------------------------------------------------
-# METHOD: incr_addr - callback from control widget to increment
-# the current address.
-# ------------------------------------------------------------------
-itcl::body MemWin::incr_addr {num} {
- if {$current_addr == ""} {
- return
- }
- set old_addr $current_addr
- set current_addr [gdb_incr_addr $current_addr [expr {$bytes_per_row * $num}]]
-
- # A memory address less than zero is probably not a good thing...
- #
-
- if {($num < 0 && [gdb_eval "$current_addr > $old_addr"]) \
- ||($num > 0 && [gdb_eval "$current_addr < $old_addr"]) } {
- bell
- set current_addr $old_addr
- return
- }
- $itk_component(table) config -bg $::Colors(textbg) -state normal
- $itk_interior.f.cntl clear
- $itk_interior.f.cntl insert 0 $current_addr
- _update_address 1
-}
-
-
-# ------------------------------------------------------------------
-# METHOD: update_addr - read in data starting at $current_addr
-# This is just a helper function for update_address.
-# ------------------------------------------------------------------
-itcl::body MemWin::update_addr {} {
- global _mem ${this}_memval
-
- set row 0
-
- if {$numbytes == 0} {
- set nb [expr {$Numrows * $bytes_per_row}]
- } else {
- set nb $numbytes
- }
- if {$ascii} {
- set retVal [catch {gdb_update_mem ${this}_memval $current_addr $format $size $nb $bytes_per_row $ascii_char} vals]
-
- } else {
- set retVal [catch {gdb_update_mem ${this}_memval $current_addr $format $size $nb $bytes_per_row} vals]
- }
-
-
- if {$retVal || [llength $vals] != 3} {
- BadExpr "Couldn't get memory at address: \"$addr\""
- debug "gdb_update_mem returned return code: $retVal and value: \"$vals\""
- return
- }
- # set default column width to the max in the data columns
- $itk_component(table) configure -colwidth [lindex $vals 1]
-
- # set border column width
- $itk_component(table) width -1 [lindex $vals 0]
-
- # set ascii column width
- if {$ascii} {
- $itk_component(table) width $Numcols [lindex $vals 2]
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: hidemb - hide the menubar. NOT CURRENTLY USED
-# ------------------------------------------------------------------
-itcl::body MemWin::hidemb {} {
- set mbar 0
- reconfig
-}
-
-# ------------------------------------------------------------------
-# METHOD: reconfig - used when preferences change
-# ------------------------------------------------------------------
-itcl::body MemWin::reconfig {} {
- debug
- set addr_exp [string trimright [string trimleft $addr_exp]]
- set wh [winfo height $top]
-
- if [winfo exists $itk_interior.m] { destroy $itk_interior.m }
- if [winfo exists $itk_interior.cb] { destroy $itk_interior.cb }
- if [winfo exists $itk_interior.f.upd] { destroy $itk_interior.f.upd }
- if [winfo exists $itk_interior.sy] { destroy $itk_interior.sy }
- destroy $itk_interior.f.cntl $itk_interior.f $itk_component(table) \
- $itk_interior.sx
-
- set dont_size 1
-
- # If the fonts change, then you will need to recompute the
- # row height. Ditto for switch from fixed number of rows to
- # depends on size.
-
- set rheight ""
-
- # Update preferences to reflect new reality
- pref setd gdb/mem/size $size
- pref setd gdb/mem/numbytes $numbytes
- pref setd gdb/mem/format $format
- pref setd gdb/mem/ascii $ascii
- pref setd gdb/mem/ascii_char $ascii_char
- pref setd gdb/mem/bytes_per_row $bytes_per_row
- pref setd gdb/mem/color $color
-
- build_win
- set dont_size 0
- ::update
-
- if {$numbytes == 0} {
- newsize $wh
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: do_popup - Display popup menu
-# ------------------------------------------------------------------
-itcl::body MemWin::do_popup {X Y} {
- if {$Running} { return }
- $itk_component(table).menu delete 0 end
- $itk_component(table).menu add check -label "Auto Update" -variable _mem($this,enabled) \
- -underline 0 -command "$this toggle_enabled"
- $itk_component(table).menu add command -label "Update Now" -underline 0 \
- -command [code $this _update_address 1]
- $itk_component(table).menu add command -label "Go To [$itk_component(table) curvalue]" -underline 0 \
- -command "$this goto [$itk_component(table) curvalue]"
- $itk_component(table).menu add command -label "Open New Window at [$itk_component(table) curvalue]" -underline 0 \
- -command [list ManagedWin::open MemWin -force -addr_exp [$itk_component(table) curvalue]]
- $itk_component(table).menu add separator
- $itk_component(table).menu add command -label "Preferences..." -underline 0 \
- -command "$this create_prefs"
- tk_popup $itk_component(table).menu $X $Y
-}
-
-# ------------------------------------------------------------------
-# METHOD: goto - change the address of the current memory window
-# ------------------------------------------------------------------
-itcl::body MemWin::goto { addr } {
- set current_addr $addr
- $itk_interior.f.cntl delete 0 end
- $itk_interior.f.cntl insert end $addr
- _update_address 1
-}
-
-# ------------------------------------------------------------------
-# METHOD: init_addr_exp - initialize address expression
-# On startup, if the public variable "addr_exp" was not set,
-# then set it to the start of ".data" if found, otherwise "$pc"
-# ------------------------------------------------------------------
-itcl::body MemWin::init_addr_exp {} {
- if {$addr_exp == ""} {
- set err [catch {gdb_cmd "info file"} result]
- if {!$err} {
- foreach line [split [string trim $result] \n] {
- if {[scan $line {%x - %x is %s} start stop section] == 3} {
- if {$section == ".data"} {
- set addr_exp [format "%#08x" $start]
- break
- }
- }
- }
- }
- if {$addr_exp == ""} {
- set addr_exp \$pc
- }
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: cursor - set the cursor
-# ------------------------------------------------------------------
-itcl::body MemWin::cursor {glyph} {
- # Set cursor for all labels
- # for {set i 0} {$i < $bytes_per_row} {incr i $size} {
- # $itk_component(table).h.$i configure -cursor $glyph
- # }
- $top configure -cursor $glyph
-}
-
-# memMoveCell --
-#
-# Moves the location cursor (active element) by the specified number
-# of cells and changes the selection if we're in browse or extended
-# selection mode.
-#
-# Don't allow movement into the ASCII column.
-#
-# Arguments:
-# w - The table widget.
-# x - +1 to move down one cell, -1 to move up one cell.
-# y - +1 to move right one cell, -1 to move left one cell.
-
-itcl::body MemWin::memMoveCell {w x y} {
- if {[catch {$w index active row} r]} return
- set c [$w index active col]
- if {$ascii && ($c == $Numcols)} {
- # we're in the ASCII column so behave differently
- if {$y == 1} {set x 1}
- if {$y == -1} {set x -1}
- incr r $x
- } else {
- incr r $x
- incr c $y
- if { $c < 0 } {
- if {$r == 0} {
- set c 0
- } else {
- set c [expr {$Numcols - 1}]
- incr r -1
- }
- } elseif { $c >= $Numcols } {
- if {$r >= [expr {$Numrows - 1}]} {
- set c [expr {$Numcols - 1}]
- } else {
- set c 0
- incr r
- }
- }
- }
- if { $r < 0 } { set r 0 }
- $w activate $r,$c
- $w see active
-}
-
-# ------------------------------------------------------------
-# PUBLIC METHOD: error_dialog - Open and error dialog.
-# Arguments:
-# msg - The message to display in the dialog
-# modality - The dialog modailty. Default: task
-# type - The dialog type (tk_messageBox).
-# Default: ok
-# ------------------------------------------------------------
-itcl::body MemWin::error_dialog {msg {modality task} {type ok}} {
- set parent [winfo toplevel [namespace tail $this]]
- tk_messageBox -icon error -title Error -type $type \
- -message $msg -parent $parent
-}
-
diff --git a/gdb/gdbtk/library/memwin.ith b/gdb/gdbtk/library/memwin.ith
deleted file mode 100644
index c7ec92d17c9..00000000000
--- a/gdb/gdbtk/library/memwin.ith
+++ /dev/null
@@ -1,85 +0,0 @@
-# Memory display window class definition for Insight.
-# Copyright (C) 1998, 1999, 2001, 2002 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-itcl::class MemWin {
- inherit EmbeddedWin GDBWin
-
- private {
- variable saved_addr ""
- variable bad_expr 0
- variable current_addr ""
- variable dont_size 0
- variable mbar 1
- variable bg
- variable top
- variable nb 128
- variable prefs_win ""
- variable Running 0
- variable Numrows 0
- variable Numcols 0
- variable saved_value
- variable maxlen
- variable maxalen
- variable rheight ""
- variable new_entry 0
-
- method build_win {}
- method init_addr_exp {}
- method cursor {glyph}
- method _update_address {make_busy}
- }
-
- public {
- variable addr_exp ""
- variable size 4
- variable format x
- variable bytes_per_row 16
- variable numbytes 0
- variable ascii 1
- variable ascii_char "."
- variable color green
- }
-
- protected common type
-
- public {
- method constructor {args}
- method destructor {}
- method paste {x y}
- method validate {val}
- method create_prefs {}
- method changed_cell {from to}
- method edit {cell}
- method toggle_enabled {}
- method newsize {height}
- method update_address_cb {}
- method update_address {addr_exp}
- method BadExpr {errTxt}
- method incr_addr {num}
- method update_addr
- method hidemb {}
- method reconfig {}
- method do_popup {x y}
- method goto {addr}
- method memMoveCell {w x y}
- method error_dialog {msg {modality task} {type ok}}
-
- #
- # GDB Events
- #
- method busy {event}
- method idle {event}
- method update {event}
- }
-}
diff --git a/gdb/gdbtk/library/modal.tcl b/gdb/gdbtk/library/modal.tcl
deleted file mode 100644
index ecaafe6928a..00000000000
--- a/gdb/gdbtk/library/modal.tcl
+++ /dev/null
@@ -1,105 +0,0 @@
-# Modal dialog class for GDBtk.
-# Copyright (C) 1998, 1999 Cygnus Solutions
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-# ----------------------------------------------------------------------
-# Implements the post and unpost behavior of a Modal Dialog.
-#
-# For now the point behind this is to control calling
-# ide_grab_support. If you call disable all the windows of an
-# application but one, destroy that window, THEN re-enable the
-# windows, Windows brings the last enabled window in the last
-# active application to the foreground (Doh!).
-#
-# ----------------------------------------------------------------------
-
-itcl::class ModalDialog {
- # This is the variable we vwait on when the dialog is posted.
- # It is set to 1 in the unpost method, and to -1 in the destructor.
-
- private variable unpost_notification 0
-
- destructor {
- debug " UNPOST $this"
- set unpost_notification -1
- }
-
- # ------------------------------------------------------------------
- # METHOD: unpost - unposts the dialog box...
- # ------------------------------------------------------------------
- public method unpost {} {
- after idle [list set [scope unpost_notification] 1]
- }
-
- # ------------------------------------------------------------------
- # METHOD: cancel - This just unposts the dialog box...
- # If you want to programatically cancel a dialog
- # selection, for instance if the app is going away
- # use this rather than unpost. That way a sub-class
- # that actually has to do some work can override it.
- # ------------------------------------------------------------------
- public method cancel {} {
- ModalDialog::unpost
- }
-
-
- # ------------------------------------------------------------------
- # METHOD: post - posts the dialog box...
- # ------------------------------------------------------------------
- public method post {{on_top 0} {expire 0}} {
-
- debug "POST $this"
- set top [winfo toplevel [namespace tail $this]]
- wm protocol $top WM_DELETE_WINDOW [code $this cancel]
-
- if {$on_top} {
- after 500 keep_raised $top
- }
-
- ide_grab_support disable_except $top
- focus $top
- grab set $top
-
- if {$expire > 0} {
- set afterID [after $expire [code $this cancel]]
- }
-
- vwait [scope unpost_notification]
-
- if {$afterID != ""} {
- after cancel $afterID
- set afterID ""
- }
-
- grab release $top
-
- # Enable all the windows in the application BEFORE
- # you destroy this one, or Windows will bring another
- # app to the foreground.
-
- ide_grab_support enable_all
-
- # We can get here either by someone calling unpost (if an OK button
- # is clicked or whatever), or by someone destroying the dialog (for
- # instance by using the Window Manager.) Only delete the object if
- # we are not already in the process of doing this.
-
- if {$unpost_notification == 1} {
- ::delete object $this
- }
- }
-
- public variable expire -1 ;# If this is set to a number > 0, the
- # dialog will time out after this interval.
- private variable afterID ""; # The id for the expiration after event.
-}
diff --git a/gdb/gdbtk/library/pluginwin.itcl b/gdb/gdbtk/library/pluginwin.itcl
deleted file mode 100644
index 57ecbc2ada8..00000000000
--- a/gdb/gdbtk/library/pluginwin.itcl
+++ /dev/null
@@ -1,185 +0,0 @@
-# PluginWindow
-# Copyright (C) 2001 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# ----------------------------------------------------------------------
-# Implements a menu and a toolbar that are attached to a source window.
-#
-# PUBLIC ATTRIBUTES:
-#
-#
-# METHODS:
-#
-# configure ....... used to change public attributes
-#
-# PRIVATE METHODS
-#
-# X11 OPTION DATABASE ATTRIBUTES
-#
-#
-# ----------------------------------------------------------------------
-
-itcl::class PluginWindow {
- inherit ManagedWin GDBEventHandler
-
- # ------------------------------------------------------------------
- # CONSTRUCTOR - create widget
- # ------------------------------------------------------------------
- constructor {args} {
-
- # Create a menu widget for the plug-in window
- set menubar [GDBMenuBar $itk_interior.menubar]
-
- # Create a toolbar widget for the plug-in window
- set toolbar [GDBToolBar $itk_interior.toolbar]
-
- # Pack the toolbar
- pack $toolbar -expand 1 -fill both
-
- # Create a frame for the subclass to use
- set child [frame $itk_interior.child]
-
- # Pack the childsite
- pack $child -expand 1 -fill both
-
- eval itk_initialize $args
- add_hook gdb_no_inferior_hook [code $this no_inferior]
- }
-
- # ------------------------------------------------------------------
- # DESTRUCTOR - destroy window containing widget
- # ------------------------------------------------------------------
- destructor {
- remove_hook gdb_no_inferior_hook [code $this no_inferior]
-
- #destroy $this
- }
-
- # ------------------------------------------------------------------
- # ACCESSOR METHOD - Retrieve childsite
- # ------------------------------------------------------------------
- public method childsite {} {
- return $child
- }
-
- # Don't automatically reload plugins.
- protected method _ignore_on_save {} { return 1 }
-
- ####################################################################
- #
- # State control methods used by both the menu and the toolbar
- #
- ####################################################################
-
- # ------------------------------------------------------------------
- # METHOD: idle - handle IdleEvent
- # ------------------------------------------------------------------
- protected method idle {event} {
- debug "PluginWindow::idle"
- enable_ui 1
- }
-
- # ------------------------------------------------------------------
- # METHOD: busy - BusyEvent handler
- # Invoked when gdb is going to run the inferior
- # ------------------------------------------------------------------
- public method busy {event} {
- debug "PluginWindow::busy"
- enable_ui 0
- }
-
- # ------------------------------------------------------------------
- # METHOD: no_inferior
- # Invoked when gdb detects the inferior is gone
- # ------------------------------------------------------------------
- protected method no_inferior {} {
- debug
- enable_ui 2
- }
-
- ####################################################################
- # The following method enables/disables both menus and buttons.
- ####################################################################
-
- # ------------------------------------------------------------------
- # METHOD: enable_ui - enable/disable the appropriate buttons and menus
- # Called from the busy, idle, and no_inferior hooks.
- #
- # on must be:
- # value Control Other State
- # 0 off off gdb is busy
- # 1 on on gdb has inferior, and is idle
- # 2 off on gdb has no inferior, and is idle
- # ------------------------------------------------------------------
- public method enable_ui {on} {
- global tcl_platform
- debug "$on"
-
- # Do the enabling so that all the disabling happens first, this way if a
- # button belongs to two groups, enabling takes precedence, which is
- # probably right.
-
- switch $on {
- 0 {
- # Busy
- set enable_list {Control disabled \
- Other disabled}
- }
- 1 {
- # Idle, with inferior
- set enable_list {Control normal \
- Other normal}
- }
- 2 {
- # Idle, no inferior
- set enable_list {Control disabled \
- Other normal}
- }
- default {
- debug "Unknown type: $on in enable_ui"
- return
- }
- }
-
- $menubar set_class_state $enable_list
- $toolbar set_class_state $enable_list
- }
-
- ####################################################################
- #
- # PRIVATE DATA
- #
- ####################################################################
-
- # The childsite
- private variable child
-
- ####################################################################
- #
- # PROTECTED DATA
- #
- ####################################################################
-
- # The GdbMenuBar component
- protected variable menubar
-
- # The GdbToolBar component
- protected variable toolbar
-
- ####################################################################
- #
- # PUBLIC DATA
- #
- ####################################################################
-
- # None.
-}
diff --git a/gdb/gdbtk/library/prefs.tcl b/gdb/gdbtk/library/prefs.tcl
deleted file mode 100644
index 7bd0885682c..00000000000
--- a/gdb/gdbtk/library/prefs.tcl
+++ /dev/null
@@ -1,763 +0,0 @@
-# Local preferences functions for Insight.
-# Copyright (C) 1997, 1998, 1999, 2002, 2003, 2004 Red Hat
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-# On STARTUP:
-# 1. Options database (.Xdefaults on Unix or ? on Windows) is read
-# 2. GDB prefs file is read ("gdbtk.ini" on Windows; ".gdbtkinit" on Unix)
-# 3. GDB init script is read
-#
-# Normally all preferences will be set in the prefs file, which is
-# a generated file. Hand-editing, if necessary, should be done to the
-# GDB init script.
-#
-# when "save options" is selected, the contents of the
-# preferences array is written out to the GDB prefs file.
-#
-# Usage:
-# pref_save
-# pref_read
-# ----------------------------------------------------------------------
-#
-
-proc pref_read {} {
- global prefs_init_filename env gdb_ImageDir GDBTK_LIBRARY GDBStartup
- global tcl_platform
-
- if {[info exists env(HOME)]} {
- if {$tcl_platform(platform) == "windows"} {
- set home [ide_cygwin_path to_win32 $env(HOME)]
- } else {
- set home $env(HOME)
- }
- } else {
- set home ""
- }
-
- if {$tcl_platform(platform) == "windows"} {
- set prefs_init_filename "gdbtk.ini"
- } else {
- set prefs_init_filename ".gdbtkinit"
- }
-
- if {!$GDBStartup(inhibit_prefs) \
- || [info exists env(INSIGHT_FORCE_READ_PREFERENCES)]} {
- set file_opened 0
- if {[file exists $prefs_init_filename]} {
- if {[catch {open $prefs_init_filename r} fd]} {
- dbug E "$fd"
- return
- }
- set file_opened 1
- } elseif {$home != ""} {
- set name [file join $home $prefs_init_filename]
- if {[file exists $name]} {
- if {[catch {open $name r} fd]} {
- dbug E "$fd"
- return
- }
- set prefs_init_filename $name
- set file_opened 1
- }
- }
-
- if {$file_opened == "1"} {
- set section gdb
- set version 0
- while {[gets $fd line] >= 0} {
- switch -regexp -- $line {
- {^[ \t\n]*#.*} {
- # Comment. We recognize one magic comment that includes
- # the version number.
- if {[regexp -- "^# GDBtkInitVersion: (\[0-9\]+)\$" $line \
- dummy v]} {
- set version $v
- }
- }
-
- {^[ \t\n]*$} {
- ;# empty line; ignore it
- }
-
- {^[ \t\n]*\[.*\]} {
- regexp {\[(.*)\]} $line match section
- }
-
- {^[ \t\n]*option.*} {
- set line [string trimleft $line]
- eval $line
- }
-
- default {
- set a ""
- set name ""
- set val ""
- regexp "\[ \t\n\]*\(.+\)=\(.+\)" $line a name val
- if {$a == "" || $name == ""} {
- dbug W "Cannot parse line: $line"
- } else {
- # Must unescape equal signs in val
- set val [unescape_value $val $version]
- if {$section == "gdb"} {
- pref setd gdb/$name $val
- } elseif {$section == "global" && [regexp "^font/" $name]} {
- set name [split $name /]
- set f global/
- append f [join [lrange $name 1 end] /]
- if {[lsearch [font names] $f] == -1} {
- # new font
- eval define_font $f $val
- } else {
- # existing font
- pref set global/font/[join [lrange $name 1 end] /] $val
- }
- } elseif {$section == "global"} {
- pref setd $section/$name $val
- } else {
- # backwards compatibility. recognize old src-font name
- if {$val == "src-font"} {set val "global/fixed"}
- pref setd gdb/$section/$name $val
- }
- }
- }
- }
- }
- close $fd
- } elseif {$home != ""} {
- set prefs_init_filename [file join $home $prefs_init_filename]
- }
-
- # now set global options
- set gdb_ImageDir [file join $GDBTK_LIBRARY [pref get gdb/ImageDir]]
-
- }
-
- # finally set colors, from system if possible
- if {[pref get gdb/use_color_schemes] != "1"} {
- pref_set_colors $home
- } else {
- global Colors
- # These colors are the same for all schemes
- set Colors(textfg) black
- set Colors(fg) black
- set Colors(sbg) \#4c59a5
- set Colors(sfg) white
- set_bg_colors
- }
-}
-
-# ------------------------------------------------------------------
-# PROC: pref_save - save preferences to a file and delete window
-# ------------------------------------------------------------------
-proc pref_save {{win {}}} {
- global prefs_init_filename GDBStartup
-
- if {!$GDBStartup(inhibit_prefs)} {
- debug "pref_save $prefs_init_filename"
-
- if {[catch {open $prefs_init_filename w} fd]} {
- debug "ERROR: $fd"
- return
- }
-
- puts $fd "\# GDBtk Init file"
- puts $fd {# GDBtkInitVersion: 1}
-
- set plist [pref list]
- # write out global options
- puts $fd "\[global\]"
- foreach var $plist {
- set t [split $var /]
- if {[lindex $t 0] == "global"} {
- set x [join [lrange $t 1 end] /]
- set v [escape_value [pref get $var]]
-
- if {$x != "" && $v != ""} {
- puts $fd "\t$x=$v"
- }
- }
- }
-
- # write out gdb-global options
- puts $fd "\[gdb\]"
- foreach var $plist {
- set t [split $var /]
- # We use the funny join/lreplace code because the session code
- # can generate a key where [lindex $t 2] is empty but there is
- # still stuff after that. This happens because the session code
- # uses filenames, which can start with `/'.
- if {[lindex $t 0] == "gdb"
- && [string compare [join [lreplace $t 0 1] /] ""] == 0} {
- set x [lindex $t 1]
- set v [escape_value [pref get $var]]
- if {$x != "" && $v != ""} {
- puts $fd "\t$x=$v"
- }
- }
- }
-
- # now loop through all sections writing out values
- # FIXME: this is broken. We should discover the list
- # dynamically.
- lappend secs load console src reg stack locals watch bp search \
- process geometry help browser kod window session mem bg ipc
-
- foreach section $secs {
- puts $fd "\[$section\]"
- foreach var $plist {
- set t [split $var /]
- if {[lindex $t 0] == "gdb" && [lindex $t 1] == $section} {
- set x [join [lrange $t 2 end] /]
- set v [escape_value [pref get $var]]
- if {$x != "" && $v != ""} {
- puts $fd "\t$x=$v"
- }
- }
- }
- }
- close $fd
- }
-
- if {$win != ""} {
- $win delete
- }
-}
-
-# -------------------------------------------------------
-# PROC: escape_value - escape all equal signs for saving
-# prefs to a file
-# -------------------------------------------------------
-proc escape_value {val} {
- # We use a URL-style quoting. We encode `=', `%', the `[]'
- # characters and newlines. We use a cute trick here: we regsub in
- # command expressions which we then expand using subst.
- if {[info tclversion] >= 8.1} {
- set expr {([\[\]=%\n])}
- } else {
- set expr "(\[\]\[=%\n\])"
- }
- regsub -all -- $expr $val \
- {[format "%%%02x" [scan {\1} %c x; set x]]} newval
- return [subst -nobackslashes -novariables $newval]
-}
-
-# -------------------------------------------------------
-# PROC: unescape_value - unescape all equal signs for
-# reading prefs from a file. VERSION is the version
-# number of the encoding.
-# version 0 only encoded `='.
-# version 1 correctly encoded more values
-# -------------------------------------------------------
-proc unescape_value {val version} {
- switch -exact -- $version {
- 0 {
- # Old-style encoding.
- if {[regsub -all -- {!%} $val = newval]} {
- return $newval
- }
- }
-
- 1 {
- # Version 1 uses URL encoding.
- regsub -all -- "%(..)" $val \
- {[format %c 0x\1]} newval
- return [subst -nobackslashes -novariables $newval]
- }
-
- default {
- error "Unknown encoding version $version"
- }
- }
-
- return $val
-}
-
-# ------------------------------------------------------------------
-# PROC: pref_set_defaults - set up default values
-# ------------------------------------------------------------------
-proc pref_set_defaults {} {
- global GDBTK_LIBRARY tcl_platform gdb_ImageDir
- debug
-
- # Gdb global defaults
- pref define gdb/ImageDir images2
- set gdb_ImageDir [file join $GDBTK_LIBRARY [pref get gdb/ImageDir]]
- pref define gdb/font_cache ""
- pref define gdb/mode 0; # 0 no tracing, 1 tracing enabled
- pref define gdb/control_target 1; # 0 can't control target (EMC), 1 can
- pref define gdb/B1_behavior 1; # 0 means set/clear breakpoints,
- # 1 means set/clear tracepoints.
- pref define gdb/use_icons 1; # For Unix, use gdbtk_icon.gif as an icon
- # some window managers can't deal with it.
-
- # OS compatibility. Valid values are "Windows", "GNOME", "KDE", and "default"
- if {$tcl_platform(platform) == "windows"} {
- pref define gdb/compat "Windows"
- } elseif {$tcl_platform(platform) == "unix"} {
- pref define gdb/compat "GNOME"
- } else {
- pref define gdb/compat "default"
- }
-
- # set download and execution options
- pref define gdb/load/verbose 0
- pref define gdb/load/main 1
- pref define gdb/load/exit 1
- pref define gdb/load/check 0
- pref define gdb/load/bp_at_func 0
- pref define gdb/load/bp_func ""
- pref define gdb/load/baud 38400
- if {$tcl_platform(platform) == "windows"} {
- pref define gdb/load/port com1
- } else {
- pref define gdb/load/port "/dev/ttyS0"
- }
-
- # The list of active windows:
- pref define gdb/window/active {}
-
- # Console defaults
- pref define gdb/console/prompt "(gdb) "
- pref define gdb/console/deleteLeft 1
- pref define gdb/console/wrap 0
- pref define gdb/console/prompt_fg DarkGreen
- pref define gdb/console/error_fg red
- pref define gdb/console/log_fg green
- pref define gdb/console/target_fg blue
- pref define gdb/console/font global/fixed
-
- # Source window defaults
- pref define gdb/src/PC_TAG green
- pref define gdb/src/STACK_TAG gold
- pref define gdb/src/BROWSE_TAG \#9595e2
- pref define gdb/src/handlebg red
- pref define gdb/src/bp_fg red
- pref define gdb/src/temp_bp_fg orange
- pref define gdb/src/disabled_fg black
- pref define gdb/src/font global/fixed
- pref define gdb/src/break_fg black
- pref define gdb/src/source2_fg navy
- pref define gdb/src/variableBalloons 1
- pref define gdb/src/trace_fg magenta
- pref define gdb/src/tab_size 8
- pref define gdb/src/linenums 1
- pref define gdb/src/thread_fg pink
- pref define gdb/src/top_control 1; # 1 srctextwin controls on top, 0 bottom
-
- # Define the run button's functions. These are defined here in case
- # we do a "run" with an exec target (which never causes target.tcl to
- # source)...
- pref define gdb/src/run_attach 0
- pref define gdb/src/run_load 0
- pref define gdb/src/run_run 1
- pref define gdb/src/run_cont 0
-
- # This is the disassembly flavor. For now this is only supported on x86
- # machines.
-
- pref define gdb/src/disassembly-flavor ""
-
- # Variable Window defaults
- pref define gdb/variable/font global/fixed
- pref define gdb/variable/disabled_fg gray
-
- # Stack Window
- pref define gdb/stack/font global/fixed
-
- # Register Window
- pref define gdb/reg/rows 16
-
- # Global Prefs Dialogs
- pref define gdb/global_prefs/save_fg red
- pref define gdb/global_prefs/message_fg white
- pref define gdb/global_prefs/message_bg red
-
- # Browser Window Search
- pref define gdb/search/last_symbol ""
- pref define gdb/search/filter_mode "starts with"
-
- pref define gdb/browser/hide_h 0
- pref define gdb/browser/layout 2
-
- # BP (breakpoint)
- pref define gdb/bp/show_threads 0
-
- # Help
- pref define gdb/help/browsername ""
-
- # Kernel Objects (kod)
- pref define gdb/kod/show_icon 0
-
- # Various possible "main" functions. What's for Java?
- pref define gdb/main_names [list main MAIN___ MAIN__ cyg_user_start cyg_start ]
-
- # These are the classes of warning dialogs, and whether the user plans
- # to ignore them.
- pref define gdb/warnings/signal 0
-
- # Memory window.
- pref define gdb/mem/size 4
- pref define gdb/mem/numbytes 0
- pref define gdb/mem/format x
- pref define gdb/mem/ascii 1
- pref define gdb/mem/ascii_char .
- pref define gdb/mem/bytes_per_row 16
- pref define gdb/mem/color green
-
- # External editor.
- pref define gdb/editor ""
-
- # background colors
- set ::gdb_bg_num 0
- pref define gdb/use_color_schemes 1
- pref define gdb/bg/0 \#ffffff
- pref define gdb/bg/1 \#ffffd0
- pref define gdb/bg/2 \#ffd0ff
- pref define gdb/bg/3 \#ffd0d0
- pref define gdb/bg/4 \#d0ffff
- pref define gdb/bg/5 \#d0ffd0
- pref define gdb/bg/6 \#d0d0ff
- pref define gdb/bg/7 \#d0d0d0
- pref define gdb/bg/8 \#ffffb0
- pref define gdb/bg/9 \#ffb0ff
- pref define gdb/bg/10 \#ffb0b0
- pref define gdb/bg/11 \#b0ffff
- pref define gdb/bg/12 \#b0ffb0
- pref define gdb/bg/13 \#b0b0ff
- pref define gdb/bg/14 \#b0b0b0
- pref define gdb/bg/15 \#d0b0d0
-
- # IPC prefs
- # set prefs based on GDB version?
- #set vers [lindex [split [lindex [split [gdb_cmd "show version"]] end-1 ] \"] 1]
- pref define gdb/ipc/enabled 1
- pref define gdb/ipc/port 9909
- pref define gdb/ipc/stop_button 1
- pref define gdb/ipc/step_button 1
- pref define gdb/ipc/cont_button 1
- pref define gdb/ipc/run_button 1
- pref define gdb/ipc/exit 1
-}
-
-
-##########################################################################
-#
-# Everything below this point is code to try to determine the current OS
-# color scheme and use that. It mostly works, but is not very compatible
-# with the use of multiple color schemes for different instances of Insight.
-#
-##########################################################################
-proc pref_set_colors {home} {
- # set color palette
-
- # In the past, tk widgets got their color information from Windows or
- # the X resource database. Unfortunately Insight is a mixture of widgets
- # from all over and was coded first in tcl and later in itcl. So lots of
- # color inheritance is broken or wrong. And Insight has some special color
- # requirements. We also have to deal with new Unix desktops that don't use the Xrdb.
- # To enable us to fix that without hardcoding colors, we create a color
- # array here and use it as needed to force widgets to the correct colors.
-
- global Colors tcl_platform
- debug
-
- # UNIX colors
-
- # For KDE3 (and probably earlier versions) when the user sets
- # a color scheme from the KDE control center, the appropriate color
- # information is set in the X resource database. Well, most of it
- # is there but it is missing some settings, so we will carefully
- # adjust things.
- #
- # For GNOME, we read .gtkrc or .gtkrc-1.2-gnome2 and parse it
- # for the color information. We cannot really get this right,
- # but with luck we can read enough to get the colors to mostly match.
-
- # If there is no information, we provide reasonable defaults.
-
- # If some theme sets the text foreground and background to something unusual
- # then Insight won't be able to display sources and highlight things properly.
- # Therefore we will not change the textfg and textbg.
-
- switch [pref get gdb/compat] {
-
- "Windows" {
- debug "loading OS colors for Windows"
- set Colors(fg) SystemButtonText
- set Colors(bg) SystemButtonFace
- #set Colors(textfg) SystemWindowText
- #set Colors(textbg) SystemWindow
- set Colors(textfg) black
- set Colors(textbg) white
- set Colors(sfg) SystemHighlightText
- set Colors(sbg) SystemHighlight
- pref_set_option_db 0
- }
-
- "KDE" {
- debug "loading OS colors for KDE"
-
- pref_load_default
- # try loading "~/.gtkrc-kde"
- if {[pref_load_gnome $home [list .gtkrc-kde]]} {
- debug "loaded gnome file"
- pref_set_option_db 0
- debug "loaded option file"
- } else {
- # no .gtkrc-kde so assume X defaults have been set
-
- # create an empty entry widget so we can query its colors
- entry .e
-
- # text background
- # set Colors(textbg) [option get .e background {}]
- set Colors(textbg) white
-
- # text foreground
- #set Colors(textfg) [option get .e foreground {}]
- set Colors(textfg) black
-
- # background
- set Colors(bg) [option get . background {}]
- if {$Colors(bg) == ""} {set Colors(bg) lightgray}
-
- # foreground
- set Colors(fg) [option get . foreground {}]
- if {$Colors(fg) == ""} {set Colors(fg) black}
-
- # selectBackground
- set Colors(sbg) [option get .e selectBackground {}]
- if {$Colors(sbg) == ""} {set Colors(sbg) blue}
-
- # selectForeground
- set Colors(sfg) [option get .e selectForeground {}]
- if {$Colors(sfg) == ""} {set Colors(sfg) white}
-
- destroy .e
- pref_set_option_db 1
- }
- }
-
- "GNOME" {
- pref_load_default
- pref_load_gnome $home
- pref_set_option_db 0
- }
-
- "default" {
- pref_load_default
- pref_set_option_db 1
- }
- }
-}
-
-proc pref_load_default {} {
- global Colors
- debug "loading default colors"
-
- set Colors(textbg) white
- set Colors(textfg) black
- set Colors(bg) lightgray
- set Colors(fg) black
-
- # selectBackground
- set Colors(sbg) blue
-
- # selectForeground
- set Colors(sfg) white
-}
-
-
-# load GNOME colors and fonts, if possible.
-proc pref_load_gnome {home {possible_names {}}} {
- debug "loading OS colors for GNOME"
-
- if {$possible_names == ""} {
- set possible_names {.gtkrc .gtkrc-1.2-gnome2}
- }
-
- set found 0
- foreach name $possible_names {
- debug "home=$home name=$name"
- set fname [file join $home $name]
- debug "fname=$fname"
- if {[file exists $fname]} {
- if {[catch {open $fname r} fd]} {
- dbug W "cannot open $fname: $fd"
- return 0
- }
- set found 1
- break
- }
- }
- if {$found} {
- set found [load_gnome_file $fd]
- close $fd
- }
- return $found
-}
-
-proc load_gnome_file {fd} {
- global Colors
- set found 0
-
- while {[gets $fd line] >= 0} {
- if {[regexp {include \"([^\"]*)} $line foo incname]} {
- debug "include $incname $found"
- if {$found == 0 && [file exists $incname]} {
- if {[catch {open $incname r} fd2]} {
- dbug W "cannot open $incname: $fd2"
- } else {
- set found [load_gnome_file $fd2]
- close $fd2
- if {$found} {
- return $found
- }
- }
- }
- continue
- } elseif {[regexp "\[ \t\n\]*\(.+\) = \(.+\)" $line a name val] == 0} {
- continue
- }
-
- if {[regexp "\"#......\"" $val a] == 1} {
- set val [lindex $a 0]
- } else {
- set res [scan $val "\{ %f, %f, %f \}" r g b]
- if {$res != 3} {
- continue
- }
- set r [expr int($r*255)]
- set g [expr int($g*255)]
- set b [expr int($b*255)]
- set val [format "\#%02x%02x%02x" $r $g $b]
- }
-
- debug "name=\"$name\" val=\"$val\""
-
- # This is a bit of a hack and probably only
- # works for trivial cases. Scan for colors and
- # use the first one found.
- switch [string trimright $name] {
- {bg[NORMAL]} {
- set found 1
- if {![info exists new(bg)]} {
- debug "setting bg to $val"
- set new(bg) $val
- }
- }
- {base[NORMAL]} {
- #if {![info exists new(textbg)]} {
- # set new(textbg) $val
- #}
- }
- {text[NORMAL]} {
- #if {![info exists new(textfg)]} {
- # set new(textfg) $val
- #}
- }
- {fg[NORMAL]} {
- if {![info exists new(fg)]} {
- set new(fg) $val
- }
- }
- {fg[ACTIVE]} {
- if {![info exists new(afg)]} {
- set new(afg) $val
- }
- }
- {bg[SELECTED]} {
- if {![info exists new(sbg)]} {
- set new(sbg) $val
- }
- }
- {base[SELECTED]} {
- if {![info exists new(sbg)]} {
- set new(sbg) $val
- }
- }
- {fg[SELECTED]} {
- if {![info exists new(sfg)]} {
- set new(sfg) $val
- }
- }
- {fg[INSENSITIVE]} {
- if {![info exists new(dfg)]} {
- set new(dfg) $val
- }
- }
- {bg[PRELIGHT]} {
- set Colors(prelight) $val
- }
- {base[PRELIGHT]} {
- set Colors(prelight) $val
- }
- }
- }
-
- foreach c {fg bg sfg sbg dfg} {
- if {[info exists new($c)]} {
- set Colors($c) $new($c)
- }
- }
- return 1
-}
-
-
-# load the colors into the tcl option database
-proc pref_set_option_db {makebg} {
- global Colors
-
- # The color of text that indicates changed items
- # We standardize on one color here so that changed
- # items don't blend into any OS color scheme
- set Colors(change) "green"
-
- option add *background $Colors(bg)
- option add *buttonBackground $Colors(bg)
- option add *Text*background $Colors(textbg)
- option add *Entry*background $Colors(textbg)
- option add *foreground $Colors(fg)
- option add *Text*foreground $Colors(textfg)
- option add *Entry*foreground $Colors(textfg)
-
- option add *highlightBackground $Colors(bg)
- option add *selectBackground $Colors(sbg)
-
- if {$::tcl_platform(platform) == "unix"} {
- option add *activeBackground $Colors(sbg)
- }
-
- option add *selectForeground $Colors(sfg)
- option add *Menu*activeForeground $Colors(sfg)
-
- if {[info exists Colors(prelight)]} {
- option add *Button*activeBackground $Colors(prelight)
- }
- if {[info exists Colors(dfg)]} {
- option add *disabledForeground $Colors(dfg)
- }
-
- if {$makebg} {
- # calculate trough and activebackground as 90% of background
- set dbg [recolor $::Colors(bg) 90]
- option add *activeBackground $dbg
- option add *troughColor $dbg
- }
-
- # Change the default select color for checkbuttons, etc to match
- # selectBackground.
- if {$::tcl_platform(platform) == "unix"} {
- option add *selectColor $Colors(sbg)
- }
-}
diff --git a/gdb/gdbtk/library/process.itb b/gdb/gdbtk/library/process.itb
deleted file mode 100644
index 8340996ab11..00000000000
--- a/gdb/gdbtk/library/process.itb
+++ /dev/null
@@ -1,162 +0,0 @@
-# Process window for Insight.
-# Copyright (C) 1998, 1999, 2001, 2002 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-# ----------------------------------------------------------------------
-# Implements a process window with a list of threads, tasks, and/or
-# processes to debug.
-#
-# ----------------------------------------------------------------------
-
-itcl::body ProcessWin::constructor {args} {
-
- window_name "Processes"
- gdbtk_busy
- build_win
- gdbtk_idle
-
- # Add hooks for this object
- add_hook gdb_no_inferior_hook [code $this idle]
-}
-
-
-# ------------------------------------------------------------------
-# METHOD: build_win - build the main process window
-# ------------------------------------------------------------------
-itcl::body ProcessWin::build_win {} {
- global tcl_platform
-
- itk_component add slbox {
- iwidgets::scrolledlistbox $itk_interior.slbox \
- -background $::Colors(bg) \
- -selectbackground $::Colors(sbg) -selectforeground $::Colors(sfg) \
- -textfont global/fixed \
- -exportselection false \
- -selectioncommand [code $this change_context]
- } {}
- [$itk_component(slbox) component listbox] configure \
- -bg $::Colors(textbg) -fg $::Colors(textfg)
- update dummy
-
- pack $itk_component(slbox) -side left -expand yes -fill both
-}
-
-
-# ------------------------------------------------------------------
-# METHOD: update - update widget when something changes
-# ------------------------------------------------------------------
-itcl::body ProcessWin::update {event} {
- if {!$protect_me} {
-
- $itk_component(slbox) delete 0 end
- if {[catch {gdb_cmd "info thread"} threads]} {
- # failed. leave window blank
- return
- }
-
- set threads [split $threads \n]
- debug "processWin update: \n$threads"
- if {[llength $threads] == 0} {
- # no processes/threads listed.
- return
- }
-
- # insert each line one at a time
- set active -1
- set num_threads 0
- foreach line $threads {
- # Active line starts with "*"
- if {[string index $line 0] == "*"} {
- # strip off leading "*"
- set line " [string trimleft $line "*"]"
- set active $num_threads
- }
- # scan for GDB ID number at start of line
- if {[scan $line "%d" id($num_threads)] == 1} {
- $itk_component(slbox) insert end $line
- incr num_threads
- }
- }
-
- # highlight the active thread
- if {$active >= 0} {
- set active_thread $id($active)
- $itk_component(slbox) selection set $active
- $itk_component(slbox) see $active
- }
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: change_context - change the current context (active thread)
-# This method is currently ONLY called from the mouse binding
-# ------------------------------------------------------------------
-itcl::body ProcessWin::change_context {} {
- if {!$Running && [$itk_component(slbox) size] != 0} {
- gdbtk_busy
- set sel [$itk_component(slbox) curselection]
- set idnum $id($sel)
- #debug "change_context to line $sel id=$idnum"
- catch {gdb_cmd "thread $idnum"}
- # Run idle hooks and cause all widgets to update
- set protect_me 1
- gdbtk_update
- set protect_me 0
- gdbtk_idle
- }
-}
-
-# ------------------------------------------------------------------
-# DESTRUCTOR - destroy window containing widget
-# ------------------------------------------------------------------
-itcl::body ProcessWin::destructor {} {
- remove_hook gdb_no_inferior_hook [code $this no_inferior]
-}
-
-# ------------------------------------------------------------------
-# METHOD: reconfig - used when preferences change
-# ------------------------------------------------------------------
-itcl::body ProcessWin::reconfig {} {
- destroy $itk_interior.s
- if {[winfo exists $itk_interior.slbox]} { destroy $itk_interior.slbox }
- build_win
-}
-
-# ------------------------------------------------------------------
-# METHOD: busy - BusyEvent handler
-#
-# This method should accomplish blocking
-# - clicks in the window
-# - change mouse pointer
-# ------------------------------------------------------------------
-itcl::body ProcessWin::busy {event} {
- set Running 1
- cursor watch
-}
-
-# ------------------------------------------------------------------
-# METHOD: idle - handle IdleEvent
-# ------------------------------------------------------------------
-itcl::body ProcessWin::idle {event} {
- set Running 0
- cursor {}
-}
-
-# ------------------------------------------------------------------
-# METHOD: cursor - set the window cursor
-# This is a convenience method which simply sets the mouse
-# pointer to the given glyph.
-# ------------------------------------------------------------------
-itcl::body ProcessWin::cursor {glyph} {
- $_top configure -cursor $glyph
-}
diff --git a/gdb/gdbtk/library/process.ith b/gdb/gdbtk/library/process.ith
deleted file mode 100644
index 5e1106ac92f..00000000000
--- a/gdb/gdbtk/library/process.ith
+++ /dev/null
@@ -1,41 +0,0 @@
-# Process window class definition for Insight.
-# Copyright (C) 1998, 1999, 2001 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-itcl::class ProcessWin {
- inherit EmbeddedWin GDBWin
-
- private {
- variable id
- variable Running 0
- variable protect_me 0
-
-
- method build_win {}
- method change_context {}
- method cursor {glyph}
- }
-
- public {
- method reconfig {}
- method constructor {args}
- method destructor {}
-
- #
- # GDB Events
- #
- method busy {event}
- method idle {event}
- method update {event}
- }
-}
diff --git a/gdb/gdbtk/library/regwin.itb b/gdb/gdbtk/library/regwin.itb
deleted file mode 100644
index 5b0ef46fca3..00000000000
--- a/gdb/gdbtk/library/regwin.itb
+++ /dev/null
@@ -1,1050 +0,0 @@
-# Register display window for Insight.
-# Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004 Red Hat, Inc.
-#
-# Written by Keith Seitz (keiths@redhat.com)
-# and Martin Hunt (hunt@redhat.com)
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# TODO
-#
-# Must fix:
-# o Edit menus -- weirdo interaction with tkTable. Seems okay on windows.
-# Needs more testing on unix (popup edit menu item).
-#
-# Want really badly:
-# o Multiple selections
-# o Multiple displays
-# o Better resizing
-# o Register groups (gdb and user-defined)
-# o format register values before inserting into table?
-# (Instead of displaying "0x0", we should use "0x00000000" on
-# machines with 32-bit regs, "0x0000000000000000" on machines
-# with 64-bit regs, etc. Maybe user-defined formats, i.e.,
-# "0x0000 0000 0000 0000 0000 0000"?)
-
-# ------------------------------------------------------------------
-# NAME: RegWin::constructor
-# DESCRIPTION: Create a new register window
-#
-# ARGUMENTS: None
-# RETURNS: Nothing
-# ------------------------------------------------------------------
-itcl::body RegWin::constructor {args} {
-
- eval itk_initialize $args
-
- gdbtk_busy
-
- window_name "Registers" "Regs"
- _build_win
- _layout_table
-
- # Clear gdb's changed list
- catch {gdb_reginfo changed}
-
- gdbtk_idle
-}
-
-# ------------------------------------------------------------------
-# NAME: RegWin::destructor
-# DESCRIPTION: Destroys the register window
-#
-# ARGUMENTS: None
-# RETURNS: Nothing
-# ------------------------------------------------------------------
-itcl::body RegWin::destructor {} {
- debug
-}
-
-# ------------------------------------------------------------------
-# NAME: RegWin::_load_prefs
-# DESCRIPTION: Load register preferences
-#
-# ARGUMENTS: None
-# RETURNS: Nothing
-# ------------------------------------------------------------------
-itcl::body RegWin::_load_prefs {} {
- debug
-
- # Find out largest register name length.
- set _max_label_width 0; # for reg labels
- set _reg_display_list {}
- set _register(hidden) {}
-
- set regs [gdb_reginfo group $_group]
- foreach r [gdb_reginfo name -numbers $regs] {
- set nm [lindex $r 0]
- set rn [lindex $r 1]
- set size [string length $nm]
- if {$size > $_max_label_width} {
- set _max_label_width $size
- }
-
- # Set type from prefs or default to first in list of types
- set _types($rn) [gdb_reginfo type $rn]
- set tp [pref getd gdb/reg/${nm}-type]
- set _type($rn,name) ""
- if {$tp != ""} {
- foreach t $_types($rn) {
- if {[lindex $t 0] == $tp} {
- set _type($rn,name) $tp
- set _type($rn,addr) [lindex $t 1]
- set _type($rn,code) [lindex $t 2]
- break
- }
- }
- }
- if {$_type($rn,name) == ""} {
- # either not set or couldn't find it in list of types
- set _type($rn,name) [lindex [lindex $_types($rn) 0] 0]
- set _type($rn,addr) [lindex [lindex $_types($rn) 0] 1]
- set _type($rn,code) [lindex [lindex $_types($rn) 0] 2]
- }
-
- # Check preferences for format
- set _format($rn) [pref getd gdb/reg/${nm}-format]
- if {$_format($rn) == ""} {
- # no preference set. Set it to hex or float
- if {$_type($rn,code) == "int"} {
- set _format($rn) "x"
- } else {
- set _format($rn) "f"
- }
- pref setd gdb/reg/${nm}-format $_format($rn)
- }
-
- gdb_reginfo format $rn $_type($rn,addr) $_format($rn)
-
- # Check if the user prefers not to show this register
- if {[pref getd gdb/reg/$nm] == "no"} {
- set _cell($rn) hidden
- lappend _register(hidden) $rn
- } else {
- lappend _reg_display_list $rn
- }
-
- # assume editable, for now
- set _editable($rn) 1
- }
-
- incr _max_label_width 2; # padding
-}
-
-
-#
-# Table layout/display methods
-#
-
-# ------------------------------------------------------------------
-# NAME: private method RegWin::_build_win
-# DESCRIPTION: Builds the register window from widgets
-#
-# ARGUMENTS: None
-# RETURNS: Nothing
-#
-# NOTES: This method should only be called once for
-# each RegWin. To change the layout of the table
-# in the window, use RegWin::_layout_table.
-# ------------------------------------------------------------------
-itcl::body RegWin::_build_win {} {
-
- # Create scrollbars and table
- itk_component add vscroll {
- scrollbar $itk_interior.vs -orient vertical
- }
- itk_component add hscroll {
- scrollbar $itk_interior.hs -orient horizontal
- }
-
- itk_component add table {
- ::table $itk_interior.tbl -variable [scope _data] \
- -browsecmd [code $this _select_cell %S] -font global/fixed \
- -colstretch unset -rowstretch unset -selectmode single \
- -resizeborders none -multiline false -colwidth 18 \
- -autoclear 0 -bg $::Colors(bg) \
- -padx 5 -xscrollcommand [code $itk_component(hscroll) set] \
- -yscrollcommand [code $itk_component(vscroll) set]
- } {
- keep -foreground
- keep -insertbackground
- keep -highlightcolor
- keep -highlightbackground
- }
- bind $itk_component(table) <Up> \
- [format "%s; break" [code $this _move up]]
- bind $itk_component(table) <Down> \
- [format "%s; break" [code $this _move down]]
- bind $itk_component(table) <Left> \
- [format "%s; break" [code $this _move left]]
- bind $itk_component(table) <Right> \
- [format "%s; break" [code $this _move right]]
- bind $itk_component(table) <3> \
- [code $this _but3 %x %y %X %Y]
- bind $itk_component(table) <Double-1> break
- bind $itk_component(table) <1> \
- [code $this _edit %x %y]
- bind $itk_component(table) <Return> \
- [format "%s; break" [code $this _accept_edit]]
- bind $itk_component(table) <KP_Enter> \
- [format "%s; break" [code $this _accept_edit]]
- bind $itk_component(table) <Escape> \
- [code $this _unedit]
-
- $itk_component(hscroll) configure -command [code $itk_component(table) xview]
- $itk_component(vscroll) configure -command [code $itk_component(table) yview]
-
-
- # Create/configure tags for various display styles
- # normal - the "normal" display style
- # highlight - changed registers are highlighted
- # sel - the selection fg/bg should conform to standard
- # header - used on the register name cells and empty cells
- # edit - used on a cell being edited
- $itk_component(table) tag configure normal \
- -state disabled -bg $::Colors(textbg) -fg $::Colors(textfg)
- $itk_component(table) tag configure sel -bg $::Colors(sbg) -fg $::Colors(sfg)
- $itk_component(table) tag configure highlight -bg $::Colors(change) -fg black
- $itk_component(table) tag raise highlight
- $itk_component(table) tag configure header \
- -anchor w -state disabled -relief raised
- $itk_component(table) tag configure disabled \
- -state disabled
- $itk_component(table) tag raise active
- $itk_component(table) tag configure edit \
- -state normal
- $itk_component(table) tag raise edit
- $itk_component(table) tag raise sel
-
- itk_component add frame {
- frame $itk_interior.m
- }
- iwidgets::optionmenu $itk_component(frame).opt -labeltext "Group:" \
- -labelpos w -command [code $this _select_group]
- eval $itk_component(frame).opt insert end [gdb_reginfo grouplist]
- $itk_component(frame).opt select "all"
-
- pack $itk_component(frame).opt -anchor nw
- grid $itk_component(frame) -row 0 -columnspan 2 -sticky news
- grid $itk_component(table) -row 1 -column 0 -sticky news
- grid $itk_component(vscroll) -row 1 -column 1 -sticky ns
- grid $itk_component(hscroll) -row 2 -column 0 -sticky ew
- grid columnconfigure $itk_interior 0 -weight 1
- grid rowconfigure $itk_interior 0 -weight 0
- grid rowconfigure $itk_interior 1 -weight 1
-
- # Add popup menu - we populate it in the event handler
- itk_component add popup {
- menu $itk_interior.pop -tearoff 0
- } {}
-}
-
-# ------------------------------------------------------------------
-# NAME: private method RegWin::_layout_table
-# DESCRIPTION: Configures and lays out the table
-#
-# ARGUMENTS: None
-# RETURNS: Nothing
-#
-# NOTES: Uses preferences to determine if/how a register
-# is displayed
-# ------------------------------------------------------------------
-itcl::body RegWin::_layout_table {} {
- debug
-
- if {[info exists _cell]} {
- unset _cell
- unset _register
- }
- # Clear any column spans
- foreach span [$itk_component(table) spans] {
- $itk_component(table) spans $span 0,0
- }
-
- _load_prefs
-
- # Fill data array with register names.
- #
- # The table is indexed by (row,col). All odd columns will contain
- # register values and all even columns will contain the labels.
- #
- set x 0
- set y 0
-
- # get register list
- set regs [gdb_reginfo name -numbers $_reg_display_list]
-
- # Set table dimensions
- set num [llength $regs]
- set _rows [pref get gdb/reg/rows]
- set _cols [expr $num / $_rows]
- if {[expr $num % $_rows] != 0} { incr _cols }
- set _cols [expr 2 * $_cols]
- $itk_component(table) configure -cols $_cols -rows $_rows
-
- # get values
- if {[catch {gdb_reginfo value $_reg_display_list} values]} {
- dbug W "values=$values"
- set values ""
- }
- set i 0
-
- # now build table
- foreach r $regs {
- set name [lindex $r 0]
- set rn [lindex $r 1]
-
- set _cell($rn) "$y,[expr {$x+1}]"
- set _register($_cell($rn)) $rn
- set _data($y,$x) $name
- set _data($_cell($rn)) [lindex $values $i]
- incr i
-
- # Go to next row/column
- incr y
- if {$y == $_rows} {
- set _col_size([expr {$x+1}]) 0
-
- # Size the column
- if {$::gdb_running} {
- _size_column [expr {$x+1}] 1
- }
-
- $itk_component(table) width $x $_max_label_width
- $itk_component(table) tag col header $x
- $itk_component(table) tag col normal [expr {$x+1}]
-
- set y 0
- incr x 2
- }
- }
-
- # Mark empty cells
- while {$y != $_rows && $x != $_cols} {
- set _data($y,$x) ""
- set _data($y,[expr {$x+1}]) ""
- $itk_component(table) spans $y,$x 0,1
- $itk_component(table) tag cell header $y,$x
- set _col_size([expr {$x+1}]) 0
-
- incr y
- if {$y == $_rows} {
- # Size the column
- if {$::gdb_running} {
- _size_column [expr {$x+1}] 1
- }
- $itk_component(table) width $x $_max_label_width
- $itk_component(table) tag col header $x
- $itk_component(table) tag col normal [expr {$x+1}]
-
- set y 0
- incr x 2
- }
- }
-}
-
-# ------------------------------------------------------------------
-# NAME: private method RegWin::_size_cell_column
-# DESCRIPTION: Resize the column for a given cell.
-#
-# ARGUMENTS:
-# cell - the cell whose column is to be resized
-# down - whether the resizing should size the column
-# down or just up.
-# RETURNS: Nothing
-#
-# NOTES: See _size_column for the reasoning for the "down"
-# option.
-# ------------------------------------------------------------------
-itcl::body RegWin::_size_cell_column {cell down} {
-
- set col [string trim [lindex [split $cell ,] 1] ()]
- _size_column $col $down
-}
-
-# ------------------------------------------------------------------
-# NAME: private method RegWin::_size_column
-# DESCRIPTION: Resize the given column
-#
-# ARGUMENTS:
-# col - the column to be resized
-# down - whether the resizing should size the column
-# RETURNS: down or just up.
-#
-# NOTES: The down option allows column sizes to change down
-# as well as up. For most cases, this is what is
-# wanted. However, when the user is stepping, it is
-# really annoying to see the column sizes changing.
-# It's bad enough we must size up, but going down
-# is just too much. Consequently, when updating the
-# contents of the table, we specify that the columns
-# should not downsize. This helps mitigate the
-# annoyance.
-# ------------------------------------------------------------------
-itcl::body RegWin::_size_column {col down} {
-
- set max 0
- foreach cell [array names _data *,$col] {
- set len [string length $_data($cell)]
- if {$len > $max} { set max $len }
- }
-
- if {($down && $max != $_col_size($col))
- || (!$down && $max > $_col_size($col))} {
- set _col_size($col) $max
- $itk_component(table) width $col [expr {$max + 2}]
-
- # Force the table to update itself
- after idle event generate $itk_component(table) <Configure> \
- -width [winfo width $itk_component(table)]
- }
-}
-
-# ------------------------------------------------------------------
-# NAME: private method RegWin::reconfig
-# DESCRIPTION: Reconfigures register window when a preference
-# changes.
-#
-# ARGUMENTS: None
-# RETURNS: Nothing
-#
-# ------------------------------------------------------------------
-itcl::body RegWin::reconfig {} {
- $itk_component(table) tag configure normal \
- -state disabled -bg $::Colors(textbg) -fg $::Colors(textfg)
-}
-
-
-#
-# Table event handlers and related methods
-#
-
-# ------------------------------------------------------------------
-# NAME: private method RegWin::_accept_edit
-# DESCRIPTION: Change a register's value
-#
-# ARGUMENTS: None
-# RETURNS: Nothing
-#
-# NOTES: Event handler for <Enter> and <KP_Enter>
-# in table
-# ------------------------------------------------------------------
-itcl::body RegWin::_accept_edit {} {
- debug
- set cell [$itk_component(table) tag cell edit]
- if {[llength $cell] == 1 && [info exists _register($cell)]} {
- # Select the same cell again. This forces the table
- # to keep this value. Otherwise, we'll never see it...
- _select_cell $cell
- set rn $_register($cell)
- set n [gdb_reginfo name $rn]
- if {[llength $_types($rn)] > 1} {
- append n ".$_type($rn,name)"
- }
- set v [string trim [$itk_component(table) curvalue] \ \r\n]
- debug "n=$n v=$v"
- if {$v != ""} {
- if {[catch {gdb_cmd "set \$${n}=$v"} result]} {
- tk_messageBox -icon error -type ok -message $result \
- -title "Error in Expression" -parent $_top
- }
- }
-
- # Always update the register, even for error conditions. This
- # will ensure that the cell's old value is restored to the table.
- _update_register $_register($cell)
- _size_cell_column $cell 1
- }
-
- _unedit
-}
-
-# ------------------------------------------------------------------
-# NAME: private method RegWin::_add_to_watch
-# DESCRIPTION: Add a register to the watch window
-#
-# ARGUMENTS: rn - the register number to add to the WatchWin
-# RETURNS: Nothing
-#
-# NOTES: Only works with one WatchWin...
-# ------------------------------------------------------------------
-itcl::body RegWin::_add_to_watch {rn} {
- [ManagedWin::open WatchWin] add "\$[gdb_reginfo name $rn]"
-}
-
-# ------------------------------------------------------------------
-# NAME: private method RegWin::_add_to_watch
-# DESCRIPTION: Add a register to the watch window
-#
-# ARGUMENTS: rn - the register number to add to the WatchWin
-# RETURNS: Nothing
-#
-# NOTES: Only works with one WatchWin...
-# ------------------------------------------------------------------
-itcl::body RegWin::_open_memory {rn} {
- ManagedWin::open MemWin -force -addr_exp $_data($_cell($rn))
-}
-
-# ------------------------------------------------------------------
-# NAME: private method RegWin::_but3
-# DESCRIPTION: Configure the popup menu before posting it
-#
-# ARGUMENTS: x - x-coordinate of buttonpress
-# y - y-coordinate
-# X - x-root coordinate
-# Y - y-root coordinate
-# RETURNS: Nothing
-# ------------------------------------------------------------------
-itcl::body RegWin::_but3 {x y X Y} {
-
- # Only post the menu when we're not executing the inferior,
- # the inferior is in a runnable state, and we're not in a disabled
- # cell.
- if {!$_running && $::gdb_running} {
-
- # Select the register
- set cell [_select_cell [$itk_component(table) index @$x,$y]]
- if {[info exists _register($cell)]} {
- set rn $_register($cell)
- set name [gdb_reginfo name $rn]
- $itk_component(popup) delete 0 end
- $itk_component(popup) add command -label $name -state disabled
- $itk_component(popup) add separator
- if {[llength $_types($rn)] > 1} {
- foreach t $_types($rn) {
- $itk_component(popup) add radio -label [lindex $t 0] \
- -variable [scope _type($rn,addr)] \
- -value [lindex $t 1] \
- -command [code $this _change_format $rn [lindex $t 0]]
- }
- $itk_component(popup) add separator
- }
-
- $itk_component(popup) add radio -label "Hex" \
- -variable [scope _format($rn)] -value x \
- -command [code $this _change_format $rn]
-
- if {$_type($rn,code) == "int"} {
- $itk_component(popup) add radio -label "Decimal" \
- -variable [scope _format($rn)] -value d \
- -command [code $this _change_format $rn]
- $itk_component(popup) add radio -label "Unsigned" \
- -variable [scope _format($rn)] -value u \
- -command [code $this _change_format $rn]
- } elseif {$_type($rn,code) == "float"} {
- $itk_component(popup) add radio -label "Floating Point" \
- -variable [scope _format($rn)] -value f \
- -command [code $this _change_format $rn]
- }
- $itk_component(popup) add separator
-
- if {$_editable($rn)} {
- set state normal
- } else {
- set state disabled
- }
-
- if {$_type($rn,code) == "int"} {
- $itk_component(popup) add command \
- -label "Open Memory Window" -command [code $this _open_memory $rn]
- }
- $itk_component(popup) add command \
- -label "Add to Watch" -command [code $this _add_to_watch $rn]
- $itk_component(popup) add separator
- $itk_component(popup) add command \
- -label "Remove from Display" \
- -command [code $this _delete_from_display $rn]
- if {[llength $_register(hidden)] != 0} {
- $itk_component(popup) add command -label "Display all Registers" \
- -command [code $this _display_all]
- }
-
- # Help
- $itk_component(popup) add separator
- $itk_component(popup) add command \
- -label "Help" -command {open_help register.html}
-
- # Close
- $itk_component(popup) add separator
- $itk_component(popup) add command -label "Close" \
- -underline 0 -command [code delete object $this]
-
- tk_popup $itk_component(popup) $X $Y
- }
- }
-}
-
-# ------------------------------------------------------------------
-# NAME: private method RegWin::_delete_from_display
-# DESCRIPTION: Remove a register from the display
-#
-# ARGUMENTS: rn - the register number to remove
-# RETURNS: Nothing
-# ------------------------------------------------------------------
-itcl::body RegWin::_delete_from_display {rn} {
-
- # Mark the cell as hidden
- set index [lsearch $_reg_display_list $rn]
- if {$index != -1} {
- pref setd gdb/reg/[gdb_reginfo name $rn] no
- set _reg_display_list [lreplace $_reg_display_list $index $index]
-
- # Relayout table
- _layout_table
- }
-}
-
-# ------------------------------------------------------------------
-# NAME: private method RegWin::_display_all
-# DESCRIPTION: Display all registers in the window
-#
-# ARGUMENTS: None
-# RETURNS: Nothing
-# ------------------------------------------------------------------
-itcl::body RegWin::_display_all {} {
-
- # Unhide all hidden registers
- foreach r $_register(hidden) {
- pref setd gdb/reg/[gdb_reginfo name $r] {}
- }
-
- # Note which register is active and restore it
- if {[catch {$itk_component(table) index active} cell]} {
- set active {}
- } else {
- set active $_register($cell)
- }
- _layout_table
- if {$active != ""} {
- $itk_component(table) activate $_cell($active)
- }
-}
-
-# ------------------------------------------------------------------
-# NAME: private method RegWin::_edit
-# DESCRIPTION: Enables a cell for editing
-#
-# ARGUMENTS:
-# x - the x coordinate of the button press
-# y - the y coordinate of the button press
-# RETURNS: Nothing
-#
-# NOTES: Event handler for <1> in table.
-#
-# ------------------------------------------------------------------
-itcl::body RegWin::_edit {x y} {
- _select_cell [$itk_component(table) index @$x,$y]
-}
-
-
-# ------------------------------------------------------------------
-# NAME: private method _move
-# DESCRIPTION: Handle arrow key events in table
-#
-# ARGUMENTS: direction - "up", "down", "left", "right"
-# RETURNS: Nothing
-#
-# NOTES: Event handler for <Up>, <Down>, <Left>, <Right>
-# in table. This is needed because the table
-# has some rather strange bindings for moving
-# the insertion cursor when editing a cell.
-# This method will move to the next cell when
-# we're not editing, or it will move the icursor
-# if we are editing.
-# ------------------------------------------------------------------
-itcl::body RegWin::_move {direction} {
-
- debug $direction
-
- # If there is no active cell, the table will call error
- if {[catch {$itk_component(table) index active row} row]} {
- return
- }
-
- if {[$itk_component(table) tag cell edit] != ""} {
- # Editing
-
- switch $direction {
- up {
- # Go to beginning
- $itk_component(table) icursor 0
- }
-
- down {
- # Go to end
- $itk_component(table) icursor end
- }
-
- left {
- # Go left one character
- set ic [$itk_component(table) icursor]
- if {$ic > 0} {
- $itk_component(table) icursor [expr {$ic - 1}]
- }
- }
-
- right {
- # Go right one character
- set ic [$itk_component(table) icursor]
- if {$ic < [$itk_component(table) icursor end] } {
- $itk_component(table) icursor [expr {$ic + 1}]
- }
- }
- }
-
- } else {
- # Not editing
-
- set col [$itk_component(table) index active col]
-
- switch $direction {
- up {
- incr row -1
- if {$row < 0} {
- # go to bottom
- set row $_rows
- }
- }
-
- down {
- incr row 1
- if {$row == $_rows} {
- # go to top
- set row 0
- }
- }
-
- left {
- incr col -2
- if {$col < 0} {
- # go to right
- set col [expr {$_cols -1}]
- }
- }
-
- right {
- incr col 2
- if {$col > $_cols} {
- # go to left
- set col 0
- }
- }
- }
-
- # clear the selection
- # FIXME: multiple selections?
- $itk_component(table) selection clear all
-
- _select_cell $row,$col
- }
-}
-
-
-# ------------------------------------------------------------------
-# NAME: private method RegWin::_select_cell
-# DESCRIPTION: Selects a given cell in the table
-#
-# ARGUMENTS:
-# cell - the table index to select
-# RETURNS: The actual cell selected
-#
-# NOTES: Adjusts the cell index so that it always
-# selects the value cell for a register
-# ------------------------------------------------------------------
-itcl::body RegWin::_select_cell {cell} {
-
- # Abort an edit
- _unedit
-
- # check if going to label. If so, highlight next
- set row [lindex [split $cell ,] 0]
- set col [lindex [split $cell ,] 1]
- if {[expr {$col % 2}] == 0} {
- # going onto a label
- incr col 1
- }
- set cell "$row,$col"
-
- # Make the selected cell the active one
- $itk_component(table) activate $row,$col
- $itk_component(table) see active
-
- # Select this cell and its label
- # FIXME: multiple selections?
- $itk_component(table) selection clear all
- $itk_component(table) selection set $cell $row,[expr {$col-1}]
-
- # Now mark the cell as being edited.
- if {$::gdb_running && [info exists _register($cell)]} {
- $itk_component(table) tag cell edit $cell
- }
-
- focus $itk_component(table)
-
- return $cell
-}
-
-# ------------------------------------------------------------------
-# NAME: private method RegWin::_unedit
-# DESCRIPTION: Cancels an edit
-#
-# ARGUMENTS: None
-# RETURNS: Nothing
-# ------------------------------------------------------------------
-itcl::body RegWin::_unedit {} {
-
- # clear the tag
- set cell [$itk_component(table) tag cell edit]
-
- if {$cell != ""} {
- $itk_component(table) selection clear all
- $itk_component(table) tag cell normal $cell
- focus $itk_component(table)
- }
-}
-
-#
-# Register operations
-#
-
-# ------------------------------------------------------------------
-# NAME: private method RegWin::_get_value
-# DESCRIPTION: Get the value of a register
-#
-# ARGUMENTS: rn - the register number whose value should be
-# fetched
-# RETURNS: The register's value or ""
-#
-# NOTES:
-# ------------------------------------------------------------------
-itcl::body RegWin::_get_value {rn} {
- if {[catch {gdb_reginfo value $rn} value]} {
- dbug W "\"gdb_reginfo value $rn\" returned $value"
- set value ""
- } else {
- set value [string trim $value \ ]
- }
- return $value
-}
-
-# ------------------------------------------------------------------
-# NAME: private method RegWin::_change_format
-# DESCRIPTION: Change the display format of the register
-#
-# ARGUMENTS: rn - the register number to change
-# newtype - type name (optional if just format changed)
-#
-# RETURNS: Nothing
-#
-# NOTES:
-# ------------------------------------------------------------------
-itcl::body RegWin::_change_format {rn {newtype {}}} {
-
- set name [gdb_reginfo name $rn]
-
- if {$newtype != ""} {
- set _type($rn,name) $newtype
- pref setd gdb/reg/${name}-type $newtype
- }
-
- gdb_reginfo format $rn $_type($rn,addr) $_format($rn)
-
- # Set the new format in prefs.
- pref setd gdb/reg/${name}-format $_format($rn)
-
- _update_register $rn
- _size_cell_column $_cell($rn) 1
-
- # Show the active cell in case it's moved as a result
- # of resizing the columns.
- $itk_component(table) see active
-}
-
-# ------------------------------------------------------------------
-# NAME: private_method RegWin::_update_register
-# DESCRIPTION: Updates the value of a register and refreshes
-# the table
-#
-# ARGUMENTS:
-# rn - the register number to update
-# RETURNS: Nothing
-# ------------------------------------------------------------------
-itcl::body RegWin::_update_register {rn} {
- set _data($_cell($rn)) [_get_value $rn]
-}
-
-# ------------------------------------------------------------------
-# NAME: private_method RegWin::_select_group
-# DESCRIPTION: Changes the register group. Callback
-#
-# ARGUMENTS:
-#
-# RETURNS: Nothing
-# ------------------------------------------------------------------
-itcl::body RegWin::_select_group {} {
- set gr [$itk_component(frame).opt get]
- debug $gr
- if {$gr == ""} {
- return
- }
-
- # Change anything on the old change list back to normal
- foreach r $_change_list {
- if {[info exists _cell($r)] && $_cell($r) != "hidden"} {
- $itk_component(table) tag cell normal $_cell($r)
- }
- }
-
- set _group $gr
- _layout_table
-
- # highlight changed registers if they still exist in the new group
- foreach r $_change_list {
- if {[info exists _cell($r)] && $_cell($r) != "hidden" && $_data($_cell($r)) != ""} {
- $itk_component(table) tag cell highlight $_cell($r)
- }
- }
-
- # Clear gdb's change list
- catch {gdb_reginfo changed}
-}
-
-
-#
-# Gdb Events
-#
-
-# ------------------------------------------------------------------
-# NAME: public method RegWin::arch_changed
-# DESCRIPTION: ArchChangedEvent handler
-#
-# ARGUMENTS: event - the ArchChangedEvent (not used)
-# RETURNS: Nothing
-# ------------------------------------------------------------------
-itcl::body RegWin::arch_changed {event} {
-
- # When the arch changes, gdb will callback into gdbtk-register.c
- # to swap out the old register set, so we need only redraw the
- # window, updating the register names and numbers.
- _layout_table
-
- # Clear gdb's change list
- catch {gdb_reginfo changed}
-}
-
-# ------------------------------------------------------------------
-# NAME: public method RegWin::busy
-# DESCRIPTION: BusyEvent handler
-#
-# ARGUMENTS: event - the BusyEvent (not used)
-# RETURNS: Nothing
-# ------------------------------------------------------------------
-itcl::body RegWin::busy {event} {
-
- # Abort any edit. Need to check if the table is constructed,
- # since we call gdbtk_busy when we're created...
- if {[info exists itk_component(table)]} {
- _unedit
- }
-
- # Set fencepost
- set _running 1
-
- # Set cursor
- $_top configure -cursor watch
-}
-
-# ------------------------------------------------------------------
-# NAME: public method RegWin::idle
-# DESCRIPTION: IdleEvent handler
-#
-# ARGUMENTS: event - the IdleEvent (not used)
-# RETURNS: Nothing
-# ------------------------------------------------------------------
-itcl::body RegWin::idle {event} {
-
- # Clear fencepost
- set _running 0
-
- # Reset cursor
- $_top configure -cursor {}
-}
-
-# ------------------------------------------------------------------
-# NAME: public method RegWin::set_variable
-# DESCRIPTION: SetVariableEvent handler
-#
-# ARGUMENTS: None
-# RETURNS: Nothing
-# ------------------------------------------------------------------
-itcl::body RegWin::set_variable {event} {
- switch [$event get variable] {
- disassembly-flavor {
- _layout_table
- }
- }
-}
-
-# ------------------------------------------------------------------
-# NAME: public method RegWin::update
-# DESCRIPTION: UpdateEvent handler
-#
-# ARGUMENTS: event - the UpdateEvent (not used)
-# RETURNS: Nothing
-# ------------------------------------------------------------------
-itcl::body RegWin::update {event} {
- debug
-
- # Change anything on the old change list back to normal
- foreach r $_change_list {
- if {[info exists _cell($r)] && $_cell($r) != "hidden"} {
- $itk_component(table) tag cell normal $_cell($r)
- }
- }
-
- # Now update and highlight the newly changed values
- set _change_list {}
- if {![catch {gdb_reginfo changed $_reg_display_list} changed]} {
- set _change_list $changed
- }
-
- # Problem: if the register was invalid (i.e, we were not running),
- # its old value will probably be "0x0". Now if we run and its real
- # value is "0x0", then it will appear as a blank in the register
- # window. Safegaurd against that here by adding any such register
- # which is not already in the change list.
- foreach r $_reg_display_list {
- if {$_data($_cell($r)) == "" && [lsearch $_change_list $r] == -1} {
- lappend _change_list $r
- }
- }
-
- # Tag the changed cells and resize the columns
- set cols {}
- foreach r $_change_list {
- _update_register $r
-
- if {$_data($_cell($r)) != ""} {
- $itk_component(table) tag cell highlight $_cell($r)
- }
- set col [lindex [split $_cell($r) ,] 1]
- if {[lsearch $cols $col] == -1} {
- lappend cols $col
- }
- }
-
- foreach col $cols {
- set col [string trim $col ()]
- _size_column $col 0
- }
-
- debug "END REGISTER UPDATE CALLBACK"
-}
diff --git a/gdb/gdbtk/library/regwin.ith b/gdb/gdbtk/library/regwin.ith
deleted file mode 100644
index 4a7faf81125..00000000000
--- a/gdb/gdbtk/library/regwin.ith
+++ /dev/null
@@ -1,103 +0,0 @@
-# Register display window class definition for Insight.
-# Copyright (C) 1998, 1999, 2001 Red Hat, Inc.
-#
-# Written by Keith Seitz (keiths@redhat.com)
-# based on work by Martin Hunt (hunt@redhat.com)
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-itcl::class RegWin {
- inherit EmbeddedWin GDBWin
-
- private {
- variable _change_list {}
- variable _menuitems
-
- # Display data for the table
- variable _data
-
- # Mapping of table cell index to register number
- variable _register
-
- # the register group that is displayed
- variable _group "all"
-
- # Mapping of register number to table cell index. "hidden" if
- # the register was "removed" from the display.
- variable _cell
-
- # Is REGNUM editable?
- variable _editable
-
- # List of possible display types for the registers (indexed by regnum)
- variable _types
- # The display type to use for each register (indexed by regnum)
- variable _type
- # The display format to use for each register (indexed by regnum)
- variable _format
-
- # The list of registers we're displaying
- variable _reg_display_list {}
-
- # Size of columns
- variable _col_size
- variable _max_label_width
-
- # Dimensions
- variable _rows
- variable _cols
-
- # Fencepost
- variable _running 0
-
-
- # Table layout/display methods
- method _build_win {}
- method _layout_table {}
- method _load_prefs {}
- method _size_cell_column {cell down}
- method _size_column {col down}
-
- # Table event handlers and related methods
- method _accept_edit {}
- method _add_to_watch {rn}
- method _but3 {x y X Y}
- method _delete_from_display {rn}
- method _display_all {}
- method _edit {x y}
- method _move {direction}
- method _open_memory {rn}
- method _select_group {}
- method _select_cell {cell}
- method _unedit {}
-
- # Register operations
- method _get_value {rn}
- method _change_format {rn {t {}}}
- method _update_register {rn}
- }
-
- public {
- method constructor {args}
- method destructor {}
-
- #
- # Gdb Events
- #
- method busy {event}
- method idle {event}
- method set_variable {event}
- method update {event}
- method arch_changed {event}
- method reconfig {}
- }
-}
diff --git a/gdb/gdbtk/library/session.tcl b/gdb/gdbtk/library/session.tcl
deleted file mode 100644
index 9a4b80f45cd..00000000000
--- a/gdb/gdbtk/library/session.tcl
+++ /dev/null
@@ -1,336 +0,0 @@
-# Local preferences functions for Insight.
-# Copyright (C) 2000, 2001, 2002, 2004 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-namespace eval Session {
- namespace export save load notice_file_change delete list_names
-
- # An internal function for canonicalizing path names. This probably
- # should use `realpath', but that is more work. So for now we neglect
- # the possibility of symlinks.
- proc _exe_name {path} {
- global tcl_platform
-
- # Get real directory.
- if {[string compare $tcl_platform(platform) "windows"] == 0} {
- set path [ide_cygwin_path to_win32 $path]
- }
- set save [pwd]
- cd [file dirname $path]
- set dir [pwd]
- cd $save
- return [file join $dir [file tail $path]]
- }
-
- # An internal function used when saving sessions. Returns a string
- # that can be used to recreate all pertinent breakpoint state.
- proc _serialize_bps {} {
- set result {}
-
- # HACK. When debugging gdb with itself in the build
- # directory, there is a ".gdbinit" file that will set
- # breakpoints on internal_error() and info_command().
- # If we then save and set them, they will accumulate.
- # Possible fixes are to modify GDB so we can tell which
- # breakpoints were set from .gdbinit, or modify
- # _recreate_bps to record which breakpoints were
- # set before it was called. For now, we simply detect the
- # most common case and fix it.
- set basename [string tolower [file tail $::gdb_exe_name]]
- if {[string match "gdb*" $basename]
- || [string match "insight*" $basename]} {
- set debugging_gdb 1
- } else {
- set debugging_gdb 0
- }
-
- foreach bp_num [gdb_get_breakpoint_list] {
- lassign [gdb_get_breakpoint_info $bp_num] file function line_number \
- address type enabled disposition ignore_count command_list \
- condition thread hit_count user_specification
-
- # These breakpoints are set when debugging GDB with itself.
- # Ignore them so they don't accumulate. They get set again
- # by .gdbinit anyway.
- if {$debugging_gdb} {
- if {$function == "internal_error" || $function == "info_command"} {
- continue
- }
- }
-
- switch -glob -- $type {
- "breakpoint" -
- "hw breakpoint" {
- if {$disposition == "delete"} {
- set cmd tbreak
- } else {
- set cmd break
- }
-
- append cmd " "
- if {$user_specification != ""} {
- append cmd "$user_specification"
- } elseif {$file != ""} {
- # BpWin::bp_store uses file tail here, but I think that is
- # wrong.
- append cmd "$file:$line_number"
- } else {
- append cmd "*$address"
- }
- }
- "watchpoint" -
- "hw watchpoint" {
- set cmd watch
- if {$user_specification != ""} {
- append cmd " $user_specification"
- } else {
- # There's nothing sensible to do.
- continue
- }
- }
-
- "catch*" {
- # FIXME: Don't know what to do.
- continue
- }
-
- default {
- # Can't serialize anything other than those listed above.
- continue
- }
- }
-
- lappend result [list $cmd $enabled $condition $command_list]
- }
-
- return $result
- }
-
- # An internal function used when loading sessions. It takes a
- # breakpoint string and recreates all the breakpoints.
- proc _recreate_bps {specs} {
- foreach spec $specs {
- lassign $spec create enabled condition commands
-
- # Create the breakpoint
- if {[catch {gdb_cmd $create} txt]} {
- dbug W $txt
- }
-
- # Below we use `\$bpnum'. This means we don't have to figure out
- # the number of the breakpoint when doing further manipulations.
-
- if {! $enabled} {
- gdb_cmd "disable \$bpnum"
- }
-
- if {$condition != ""} {
- gdb_cmd "cond \$bpnum $condition"
- }
-
- if {[llength $commands]} {
- lappend commands end
- eval gdb_run_readline_command_no_output [list "commands \$bpnum"] \
- $commands
- }
- }
- }
-
- #
- # This procedure decides what makes up a gdb `session'. Roughly a
- # session is whatever the user found useful when debugging a certain
- # executable.
- #
- # Eventually we should expand this procedure to know how to save
- # window placement and contents. That requires more work.
- #
- proc save {} {
- global gdb_exe_name gdb_target_name
- global gdb_current_directory gdb_source_path
-
- # gdb sessions are named after the executable.
- set name [_exe_name $gdb_exe_name]
- set key gdb/session/$name
-
- # We fill a hash and then use that to set the actual preferences.
-
- # Always set the exe. name in case we later decide to change the
- # interpretation of the session key. Use the full path to the
- # executable.
- set values(executable) $name
-
- # Some simple state the user wants.
- set values(args) [gdb_get_inferior_args]
- set values(dirs) $gdb_source_path
- set values(pwd) $gdb_current_directory
- set values(target) $gdb_target_name
- set values(hostname) [pref getd gdb/load/$gdb_target_name-hostname]
- set values(port) [pref getd gdb/load/$gdb_target_name-portname]
- set values(target_cmd) $::gdb_target_cmd
- set values(bg) $::gdb_bg_num
-
- # these prefs need to be made session-dependent
- set values(run_attach) [pref get gdb/src/run_attach]
- set values(run_load) [pref get gdb/src/run_load]
- set values(run_run) [pref get gdb/src/run_run]
- set values(run_cont) [pref get gdb/src/run_cont]
-
- # Breakpoints.
- set values(breakpoints) [_serialize_bps]
-
- # Recompute list of recent sessions. Trim to no more than 20 sessions.
- set recent [concat [list $name] \
- [lremove [pref getd gdb/recent-projects] $name]]
- if {[llength $recent] > 20} {
- set recent [lreplace $recent 20 end]
- }
- pref setd gdb/recent-projects $recent
-
- foreach k [array names values] {
- pref setd $key/$k $values($k)
- }
- pref setd $key/all-keys [array names values]
- }
-
- #
- # Load a session saved with Session::save. NAME is the pretty name of
- # the session, as returned by Session::list_names.
- #
- proc load {name} {
- # gdb sessions are named after the executable.
- set key gdb/session/$name
-
- # Fetch all keys for this session into an array.
- foreach k [pref getd $key/all-keys] {
- set values($k) [pref getd $key/$k]
- }
-
- if {[info exists values(executable)]} {
- gdb_clear_file
- set_exe_name $values(executable)
- set_exe
- }
- }
-
- #
- # This is called from file_changed_hook. It does all the work of
- # loading a session, if one exists with the same name as the current
- # executable.
- #
- proc notice_file_change {} {
- global gdb_exe_name gdb_target_name
-
- debug "noticed file change event for $gdb_exe_name"
-
- # gdb sessions are named after the executable.
- set name [_exe_name $gdb_exe_name]
- set key gdb/session/$name
-
- # Fetch all keys for this session into an array.
- foreach k [pref getd $key/all-keys] {
- set values($k) [pref getd $key/$k]
- }
-
- # reset these back to their defaults
- pref set gdb/src/run_attach 0
- pref set gdb/src/run_load 0
- pref set gdb/src/run_run 1
- pref set gdb/src/run_cont 0
-
- if {! [info exists values(executable)] || $values(executable) != $name} {
- # No such session.
- return
- }
-
- debug "reloading session for $name"
-
- if {[info exists values(dirs)]} {
- # FIXME: short-circuit confirmation.
- gdb_cmd "directory"
- gdb_cmd "directory $values(dirs)"
- }
-
- if {[info exists values(pwd)]} {
- catch {gdb_cmd "cd $values(pwd)"}
- }
-
- if {[info exists values(args)]} {
- gdb_set_inferior_args $values(args)
- }
-
- if {[info exists values(breakpoints)]} {
- _recreate_bps $values(breakpoints)
- }
-
- if {[info exists values(target)]} {
- #debug "Restoring Target: $values(target)"
- set gdb_target_name $values(target)
-
- if {[info exists values(hostname)]} {
- pref setd gdb/load/$gdb_target_name-hostname $values(hostname)
- #debug "Restoring Hostname: $values(hostname)"
- }
-
- if {[info exists values(port)]} {
- pref setd gdb/load/$gdb_target_name-portname $values(port)
- #debug "Restoring Port: $values(port)"
- }
-
- #debug "Restoring Target_Cmd: $values(target_cmd)"
- set ::gdb_target_cmd $values(target_cmd)
- set_baud
- }
-
- if {[info exists values(run_attach)]} {
- pref set gdb/src/run_attach $values(run_attach)
- pref set gdb/src/run_load $values(run_load)
- pref set gdb/src/run_run $values(run_run)
- pref set gdb/src/run_cont $values(run_cont)
- }
-
- if {[info exists values(bg)] && [pref get gdb/use_color_schemes]} {
- set_bg_colors $values(bg)
- }
- }
-
- #
- # Delete a session. NAME is the internal name of the session.
- #
- proc delete {name} {
- # FIXME: we can't yet fully define this because the libgui
- # preference code doesn't supply a delete method.
- set recent [lremove [pref getd gdb/recent-projects] $name]
- pref setd gdb/recent-projects $recent
- }
-
- #
- # Return a list of all known sessions. This returns the `pretty name'
- # of the session -- something suitable for a menu.
- #
- proc list_names {} {
- set newlist {}
- set result {}
- foreach name [pref getd gdb/recent-projects] {
- set exe [pref getd gdb/session/$name/executable]
- # Take this opportunity to prune the list.
- if {[file exists $exe]} then {
- lappend newlist $name
- lappend result $exe
- } else {
- # FIXME: if we could delete keys we would delete all keys
- # associated with NAME now.
- }
- }
- pref setd gdb/recent-projects $newlist
- return $result
- }
-}
diff --git a/gdb/gdbtk/library/srcbar.itcl b/gdb/gdbtk/library/srcbar.itcl
deleted file mode 100644
index b191ddb4d83..00000000000
--- a/gdb/gdbtk/library/srcbar.itcl
+++ /dev/null
@@ -1,1246 +0,0 @@
-# SrcBar
-# Copyright (C) 2001, 2002, 2004 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# ----------------------------------------------------------------------
-# Implements a menu and a toolbar that are attached to a source window.
-#
-# PUBLIC ATTRIBUTES:
-#
-#
-# METHODS:
-#
-# configure ....... used to change public attributes
-#
-# PRIVATE METHODS
-#
-# X11 OPTION DATABASE ATTRIBUTES
-#
-#
-# ----------------------------------------------------------------------
-
-itcl::class SrcBar {
- inherit itk::Widget GDBEventHandler
-
- # ------------------------------------------------------------------
- # CONSTRUCTOR - create widget
- # ------------------------------------------------------------------
- constructor {src args} {
- set source $src
-
- # Load the images to be used in toolbar buttons
- _load_images
- _load_src_images
-
- # Create a menu widget for the Source Window
- set Menu [GDBMenuBar $itk_interior.menubar]
-
- # Fill it with the initial set of entries
- if {! [create_menu_items]} {
- destroy $this
- } else {
- # We do not pack the menu, but make it the menu of the toplevel window
- $Menu show
- }
-
- # Create a toolbar widget for the Source Window
- set Tool [GDBToolBar $itk_interior.toolbar]
-
- # Now create the Source Window initial set of toolbar buttons
- # First give the necessary info about each button and their position
- create_buttons
- # Then effectively create the tollbar widget
- $Tool show
-
- # Pack the toolbar
- pack $Tool -expand 1 -fill both
-
- # Set the srcbar's initial state
- enable_ui 2
-
- eval itk_initialize $args
- add_hook gdb_no_inferior_hook "$this enable_ui 2"
- add_hook gdb_trace_find_hook "$this handle_trace_find_hook"
- }
-
- # ------------------------------------------------------------------
- # DESTRUCTOR - destroy window containing widget
- # ------------------------------------------------------------------
- destructor {
- global GDBSrcBar_state
-
- unset GDBSrcBar_state($this)
- remove_hook gdb_no_inferior_hook "$this enable_ui 2"
- remove_hook gdb_trace_find_hook "$this handle_trace_find_hook"
-
- #destroy $this
- }
-
- # ------------------------------------------------------------------
- # NAME: private method SrcBar::_post
- # DESCRIPTION: Post the given menu
- #
- # ARGUMENTS:
- # what - which menu to post
- # RETURNS: Nothing
- # ------------------------------------------------------------------
- private method _post {what} {
-
- switch $what {
- file {
- _update_file_menu
- }
- }
- }
-
-
- ####################################################################
- # The next set of functions create the common menu groupings that
- # are used in gdb menus.
- # Private. Used at contruction time.
- # These were previously at the GDBToolBar...
- ####################################################################
-
- # ------------------------------------------------------------------
- # METHOD: create_menu_items - Add some menu items to the menubar.
- # Returns 1 if any items added.
- # ------------------------------------------------------------------
- private method create_menu_items {} {
-
- create_file_menu
-
- create_run_menu
-
- create_view_menu
-
- if {[pref get gdb/control_target]} {
- create_control_menu
- }
-
- if {[pref get gdb/mode]} {
- create_trace_menu
- }
-
- create_plugin_menu
-
- create_pref_menu
-
- create_help_menu
-
- return 1
- }
-
- # ------------------------------------------------------------------
- # PRIVATE METHOD: _update_file_menu - update the file menu
- # Used really only to update the session list.
- # ------------------------------------------------------------------
- private method _update_file_menu {} {
- global enable_external_editor tcl_platform gdb_exe_name
-
- # Clear the File menu
- $Menu clear file
-
- if {[info exists enable_external_editor] && $enable_external_editor} {
- $Menu add command None "Edit Source" \
- [code $source edit]
- }
-
- $Menu add command Other "Open..." \
- "_open_file" -underline 0 -accelerator "Ctrl+O"
-
- if {$gdb_exe_name == ""} {
- set state disabled
- } else {
- set state normal
- }
- $Menu add command Other "Close" \
- "_close_file" -underline 0 -accelerator "Ctrl+W" -state $state
-
- $Menu add command Other "Source..." \
- "source_file" -underline 0
-
- set sessions [Session::list_names]
- if {[llength $sessions]} {
- $Menu add separator
- set i 1
- foreach item $sessions {
- $Menu add command Other "$i $item" \
- [list Session::load $item] \
- -underline 0
- incr i
- }
- }
-
- $Menu add separator
-
- if {$tcl_platform(platform) == "windows"} {
- $Menu add command None "Page Setup..." \
- [format {
- set top %s
- ide_winprint page_setup -parent $top
- } [winfo toplevel [namespace tail $this]]] \
- -underline 8
- }
-
- $Menu add command None "Print Source..." \
- [code $source print] \
- -underline 0 -accelerator "Ctrl+P"
-
- $Menu add separator
-
- $Menu add command Other "Target Settings..." \
- "set_target_name" -underline 0
-
- $Menu add separator
-
- $Menu add command None "Exit" gdbtk_quit -underline 1
- }
-
- # ------------------------------------------------------------------
- # METHOD: create_file_menu - Creates the standard file menu.
- # ------------------------------------------------------------------
-
- private method create_file_menu {} {
-
- $Menu add menubutton file "File" 0 -postcommand [code $this _post file]
- _update_file_menu
- }
-
- # ------------------------------------------------------------------
- # METHOD: create_run_menu - Creates the standard run menu,
- # or reconfigures it if it already exists.
- # ------------------------------------------------------------------
-
- private method create_run_menu {} {
-
- if {![$Menu exists Run]} {
- set run_menu [$Menu add menubutton run "Run" 0]
- } else {
- set run_menu [$Menu clear Run]
- }
-
- set is_native [TargetSelection::native_debugging]
-
- # If we are on a Unix target, put in the attach options. "ps" doesn't
- # give me the Windows PID yet, and the attach also seems flakey, so
- # I will hold off on the Windows implementation for now.
-
- if {$is_native} {
- if {[string compare $::tcl_platform(platform) windows] != 0} {
- $Menu add command Attach "Attach to process" \
- [code $this do_attach $run_menu] \
- -underline 0 -accelerator "Ctrl+A"
- }
- } else {
- $Menu add command Other "Connect to target" \
- "$this do_connect $run_menu" -underline 0
- }
-
- if {[pref get gdb/control_target]} {
- if {!$is_native} {
- $Menu add command Other "Download" Download::download_it \
- -underline 0 -accelerator "Ctrl+D"
- }
- $Menu add command Other "Run" [code $source inferior run] \
- -underline 0 -accelerator R
- }
-
- if {$is_native} {
- if {[string compare $::tcl_platform(platform) windows] != 0} {
- $Menu add command Detach "Detach" \
- [code $this do_detach $run_menu] \
- -underline 0 -state disabled
- }
- } else {
- $Menu add command Other "Disconnect" \
- [code $this do_disconnect $run_menu] -underline 0 -state disabled
- }
-
- if {$is_native} {
- $Menu add separator
- $Menu add command Control "Kill" \
- [code $this do_kill $run_menu] \
- -underline 0 -state disabled
- }
-
- if { [pref get gdb/mode] } {
- $Menu add separator
-
- $Menu add command Other "Start collection" "$this do_tstop" \
- -underline 0 -accelerator "Ctrl+B"
-
- $Menu add command Other "Stop collection" "$this do_tstop" \
- -underline 0 -accelerator "Ctrl+E" -state disabled
- }
- }
-
- # ------------------------------------------------------------------
- # METHOD: create_view_menu - Creates the standard view menu
- # ------------------------------------------------------------------
-
- private method create_view_menu {} {
-
- $Menu add menubutton view "View" 0
-
- $Menu add command Other "Stack" {ManagedWin::open StackWin} \
- -underline 0 -accelerator "Ctrl+S"
-
- $Menu add command Other "Registers" {ManagedWin::open RegWin} \
- -underline 0 -accelerator "Ctrl+R"
-
- $Menu add command Other "Memory" {ManagedWin::open MemWin} \
- -underline 0 -accelerator "Ctrl+M"
-
- $Menu add command Other "Watch Expressions" \
- {ManagedWin::open WatchWin} \
- -underline 0 -accelerator "Ctrl+T"
- $Menu add command Other "Local Variables" \
- {ManagedWin::open LocalsWin} \
- -underline 0 -accelerator "Ctrl+L"
-
- if {[pref get gdb/control_target]} {
- $Menu add command Other "Breakpoints" \
- {ManagedWin::open BpWin -tracepoints 0} \
- -underline 0 -accelerator "Ctrl+B"
- }
-
- if {[pref get gdb/mode]} {
- $Menu add command Other "Tracepoints" \
- {ManagedWin::open BpWin -tracepoints 1} \
- -underline 0 -accelerator "Ctrl+T"
- $Menu add command Other "Tdump" {ManagedWin::open TdumpWin} \
- -underline 2 -accelerator "Ctrl+U"
- }
-
- $Menu add command Other "Console" {ManagedWin::open Console} \
- -underline 2 -accelerator "Ctrl+N"
-
- $Menu add command Other "Function Browser" \
- {ManagedWin::open BrowserWin} \
- -underline 1 -accelerator "Ctrl+F"
- $Menu add command Other "Thread List" \
- {ManagedWin::open ProcessWin} \
- -underline 0 -accelerator "Ctrl+H"
- if {[info exists ::env(GDBTK_DEBUG)] && $::env(GDBTK_DEBUG)} {
- $Menu add separator
- $Menu add command Other "Debug Window" \
- {ManagedWin::open DebugWin} \
- -underline 3 -accelerator "Ctrl+U"
- }
- }
-
- # ------------------------------------------------------------------
- # METHOD: create_control_menu - Creates the standard control menu
- # ------------------------------------------------------------------
-
- private method create_control_menu {} {
-
- $Menu add menubutton cntrl "Control" 0
-
- $Menu add command Control "Step" [code $source inferior step] \
- -underline 0 -accelerator S
-
- $Menu add command Control "Next" [code $source inferior next] \
- -underline 0 -accelerator N
-
- $Menu add command Control "Finish" \
- [code $source inferior finish] \
- -underline 0 -accelerator F
-
- $Menu add command Control "Continue" \
- [code $source inferior continue] \
- -underline 0 -accelerator C
-
- $Menu add separator
- $Menu add command Control "Step Asm Inst" \
- [code $source inferior stepi] \
- -underline 1 -accelerator S
-
- $Menu add command Control "Next Asm Inst" \
- [code $source inferior nexti] \
- -underline 1 -accelerator N
-
- # $Menu add separator
- # $Menu add command Other "Automatic Step" auto_step
- }
-
- # ------------------------------------------------------------------
- # METHOD: create_trace_menu - Creates the standard trace menu
- # ------------------------------------------------------------------
-
- private method create_trace_menu {} {
-
- $Menu add menubutton trace "Trace" 0
-
- $Menu add command Other "Save Trace Commands..." \
- "save_trace_commands" \
- -underline 0
-
- $Menu add separator
-
- $Menu add command Trace "Next Hit" {tfind_cmd tfind} \
- -underline 0 -accelerator N
-
- $Menu add command Trace "Previous Hit" {tfind_cmd "tfind -"} \
- -underline 0 -accelerator P
-
- $Menu add command Trace "First Hit" {tfind_cmd "tfind start"} \
- -underline 0 -accelerator F
-
- $Menu add command Trace "Next Line Hit" \
- {tfind_cmd "tfind line"} \
- -underline 5 -accelerator L
-
- $Menu add command Trace "Next Hit Here" \
- {tfind_cmd "tfind tracepoint"} \
- -underline 9 -accelerator H
-
- $Menu add separator
- $Menu add command Trace "Tfind Line..." \
- "ManagedWin::open TfindArgs -Type LN" \
- -underline 9 -accelerator E
-
- $Menu add command Trace "Tfind PC..." \
- "ManagedWin::open TfindArgs -Type PC" \
- -underline 7 -accelerator C
-
- $Menu add command Trace "Tfind Tracepoint..." \
- "ManagedWin::open TfindArgs -Type TP" \
- -underline 6 -accelerator T
-
- $Menu add command Trace "Tfind Frame..." \
- "ManagedWin::open TfindArgs -Type FR" \
- -underline 6 -accelerator F
- }
-
- # ------------------------------------------------------------------
- # METHOD: create_plugin_menu - Creates the optional plugin menu
- # ------------------------------------------------------------------
- private method create_plugin_menu {} {
- global gdb_plugins
-
- $Menu add menubutton plugin "PlugIn" 4
- set plugins_available 0
- foreach plugin_dir $gdb_plugins {
- if {[catch {source [file join $plugin_dir plugins.tcl]} txt]} {
- dbug E $txt
- }
- }
-
- if {! $plugins_available} {
- # No plugins are available for this configuration,
- # so remove the menu
- debug "No plugins configured, go remove the PlugIn menu..."
- $Menu delete plugin
- }
- }
-
- # ------------------------------------------------------------------
- # METHOD: create_pref_menu - Creates the standard preferences menu
- # ------------------------------------------------------------------
- private method create_pref_menu {} {
-
- $Menu add menubutton pref "Preferences" 0
-
- $Menu add command Other "Global..." \
- "ManagedWin::open GlobalPref -transient" -underline 0
-
- $Menu add command Other "Source..." \
- "ManagedWin::open SrcPref -transient" -underline 0
-
- set save_menu [$Menu menubar_get_current_menu]
-
- set advanced_menu [$Menu add cascade adv Advanced "Advanced" 0]
-
- $advanced_menu add command -label "Edit Color Schemes..." -underline 0 \
- -command "ManagedWin::open CSPref -transient" -underline 0
-
- $advanced_menu add command -label "IPC Support..." -underline 0 \
- -command "ManagedWin::open IPCPref -transient" -underline 0
-
- $Menu menubar_set_current_menu $save_menu
-
- $Menu add separator
-
- set color_menu [$Menu add cascade use_cs Color "Use Color Scheme" 0]
- for {set i 0} {$i < 16} {incr i} {
- set dbg [recolor [pref get gdb/bg/$i] 80]
- $color_menu add command -label $i -background [pref get gdb/bg/$i] \
- -activebackground $dbg -command "set_bg_colors $i" -underline 0
- }
-
- if {[pref get gdb/use_color_schemes] == "1"} {
- set cs_state normal
- } else {
- set cs_state disabled
- }
- $Menu set_class_state "Color $cs_state"
- }
-
- # ------------------------------------------------------------------
- # METHOD: create_help_menu - Creates the standard help menu
- # ------------------------------------------------------------------
- private method create_help_menu {} {
- # KDE and GNOME like the help menu to be the last item in the menubar.
- # The default Unix behavior is to be at the far right of the menubar.
- set os [pref get gdb/compat]
- if {$os == "KDE" || $os == "GNOME"} {
- set helpmenu "_help"
- } else {
- set helpmenu "help"
- }
- $Menu add menubutton $helpmenu "Help" 0
- $Menu add command Other "Help Topics" {open_help index.html} \
- -underline 0
- $Menu add separator
- $Menu add command Other "About GDB..." \
- {ManagedWin::open About -transient} \
- -underline 0
- }
-
- ####################################################################
- # The next set of functions are the generic button groups that gdb uses.
- # Private. Used at contruction time.
- # These were previously at the GDBToolBar...
- ####################################################################
-
- # ------------------------------------------------------------------
- # METHOD: create_buttons - Add some buttons to the toolbar.
- # Returns list of buttons in form acceptable
- # to standard_toolbar.
- # ------------------------------------------------------------------
- private method create_buttons {} {
- global enable_external_editor
-
- $Tool add button stop None {} {}
- _set_runstop
-
- if {[pref get gdb/mode]} {
- $Tool add button tstop Control \
- [list $this do_tstop] "Start Collection" \
- -image Movie_on_img
-
- $Tool add button view Other [list $this set_control_mode 1] \
- "Switch to Browse Mode" -image watch_movie_img
-
- $Tool add separator
-
- }
-
- if {[pref get gdb/control_target]} {
- create_control_buttons
- if {[pref get gdb/mode]} {
- create_trace_buttons 0
- }
- } elseif {[get pref gdb/mode]} {
-
- #
- # If we don't control the target, then we might as well
- # put a copy of the trace controls on the source window.
- #
- create_trace_buttons 1
- }
-
- $Tool add separator
-
- create_window_buttons
-
- # Random bits of obscurity...
- $Tool itembind reg <Button-3> "ManagedWin::open RegWin -force"
- $Tool itembind mem <Button-3> "ManagedWin::open MemWin -force"
- $Tool itembind watch <Button-3> \
- "ManagedWin::open WatchWin -force"
- $Tool itembind vars <Button-3> \
- "ManagedWin::open LocalsWin -force"
-
- $Tool add separator
-
- if {[info exists enable_external_editor] && $enable_external_editor} {
- $Tool add button edit Other [code $source edit] "Edit Source" \
- -image edit_img
-
- $Tool add separator
- }
-
- # Add find in file entry box.
- $Tool add label findlabel "Find:" "" -anchor e -font global/fixed
- $Tool add custom searchbox entry "Search in editor" \
- -bd 3 -font global/fixed -width 10
-
- set callback [code $source search]
- $Tool itembind searchbox <Return> \
- "$callback forwards \[eval %W get\]"
- $Tool itembind searchbox <Shift-Return> \
- "$callback backwards \[eval %W get\]"
-
- $Tool add separator
-
- $Tool toolbar_button_right_justify
-
- create_stack_buttons
-
- # This feature has been disabled for now.
- # checkbutton $ButtonFrame.upd -command "$this _toggle_updates" \
- # -variable GDBSrcBar_state($this)
- # lappend button_list $ButtonFrame.upd
- # global GDBSrcBar_state
- # ::set GDBSrcBar_state($this) $updatevalue
- # balloon register $ButtonFrame.upd "Toggle Window Updates"
- }
-
- # ------------------------------------------------------------------
- # METHOD: create_control_buttons - Creates the step, continue, etc buttons.
- # ------------------------------------------------------------------
-
- private method create_control_buttons {} {
- $Tool add button step Control [code $source inferior step] \
- "Step (S)" -image step_img
-
- $Tool add button next Control [code $source inferior next] \
- "Next (N)" -image next_img
-
- $Tool add button finish Control [code $source inferior finish] \
- "Finish (F)" -image finish_img
-
- $Tool add button continue Control [code $source inferior continue] \
- "Continue (C)" -image continue_img
-
- # A spacer before the assembly-level items looks good. It helps
- # to indicate that these are somehow different.
- $Tool add separator
-
- $Tool add button stepi Control [code $source inferior stepi] \
- "Step Asm Inst (S)" -image stepi_img
-
- $Tool add button nexti Control [code $source inferior nexti] \
- "Next Asm Inst (N)" -image nexti_img
-
- _set_stepi
-
- set Run_control_buttons {step next finish continue -stepi nexti}
-
- }
-
- # ------------------------------------------------------------------
- # METHOD: create_trace_buttons - Creates the next hit, etc.
- # ------------------------------------------------------------------
-
- private method create_trace_buttons {{show 0}} {
-
- if {$show} {
- set command "add button"
- } else {
- set command "create"
- }
-
- $Tool $command tfindstart Trace {tfind_cmd "tfind start"} "First Hit <F>" \
- -image rewind_img
-
- $Tool $command tfind Trace {tfind_cmd tfind} "Next Hit <N>" -image next_hit_img
-
- $Tool $command tfindprev Trace {tfind_cmd "tfind -"} "Previous Hit <P>" \
- -image prev_hit_img
-
- $Tool $command tfindline Trace {tfind_cmd "tfind line"} "Next Line Hit <L>" \
- -image next_line_img
-
- $Tool $command tfindtp Trace { tfind_cmd "tfind tracepoint"} \
- "Next Hit Here <H>" -image next_check_img
-
- set Trace_control_buttons {tfindstart tfind tfindprev tfindline tfindtp}
- }
-
- # ------------------------------------------------------------------
- # METHOD: create_window_buttons - Creates the registers, etc, buttons
- # ------------------------------------------------------------------
-
- private method create_window_buttons {} {
- $Tool add button reg Other {ManagedWin::open RegWin} \
- "Registers (Ctrl+R)" -image reg_img
-
- $Tool add button mem Other {ManagedWin::open MemWin} \
- "Memory (Ctrl+M)" -image memory_img
-
- $Tool add button stack Other {ManagedWin::open StackWin} \
- "Stack (Ctrl+S)" -image stack_img
-
- $Tool add button watch Other {ManagedWin::open WatchWin} \
- "Watch Expressions (Ctrl+W)" -image watch_img
-
- $Tool add button vars Other {ManagedWin::open LocalsWin} \
- "Local Variables (Ctrl+L)" -image vars_img
-
- if {[pref get gdb/control_target]} {
- $Tool add button bp Other {ManagedWin::open BpWin} \
- "Breakpoints (Ctrl+B)" -image bp_img
- }
-
- if {[pref get gdb/mode]} {
- $Tool add button tp Other \
- {ManagedWin::open BpWin -tracepoints 1} \
- "Tracepoints (Ctrl+T)" -image tp_img
-
- $Tool add button tdump Trace {ManagedWin::open TdumpWin} \
- "Tdump (Ctrl+D)" -image tdump_img
- }
-
- $Tool add button con Other {ManagedWin::open Console} \
- "Console (Ctrl+N)" -image console_img
- }
-
- # ------------------------------------------------------------------
- # METHOD: create_stack_buttons - Creates the up down bottom stack buttons
- # ------------------------------------------------------------------
-
- private method create_stack_buttons {} {
-
- $Tool add button down {Trace Control} \
- [code $source stack down] \
- "Down Stack Frame" -image down_img
-
- $Tool add button up {Trace Control} \
- [code $source stack up] \
- "Up Stack Frame" -image up_img
-
- $Tool add button bottom {Trace Control} \
- [code $source stack bottom] \
- "Go to Bottom of Stack" -image bottom_img
-
- }
-
- ####################################################################
- #
- # Auxiliary methods used by the toolbar
- #
- ####################################################################
-
- # ------------------------------------------------------------------
- # METHOD: _load_images - Load standard images. Private method.
- # ------------------------------------------------------------------
- public method _load_images { {reconfig 0} } {
- global gdb_ImageDir
- if {!$reconfig && $_loaded_images} {
- return
- }
- set _loaded_images 1
-
- lappend imgs console reg stack vars watch memory bp
- foreach name $imgs {
- image create photo ${name}_img -file [file join $gdb_ImageDir ${name}.gif]
- }
- }
-
- # ------------------------------------------------------------------
- # METHOD: _load_src_images - Load standard images. Private method.
- # ------------------------------------------------------------------
- method _load_src_images { {reconf 0} } {
- global gdb_ImageDir
-
- if {!$reconf && $_loaded_src_images} {
- return
- }
- set _loaded_src_images 1
-
- foreach name {run stop step next finish continue edit \
- stepi nexti up down bottom Movie_on Movie_off \
- next_line next_check next_hit rewind prev_hit \
- watch_movie run_expt tdump tp} {
- image create photo ${name}_img -file [file join $gdb_ImageDir ${name}.gif]
- }
- }
-
- # ------------------------------------------------------------------
- # METHOD: _set_runstop - Set state of run/stop button.
- #
- # busy - Run button becomes disabled
- # running - Stop button appears, allowing user to stop executing target
- # downloading - Stop button appears, allowing user to interrupt downloading
- # normal - Run button appears, allowing user to run/re-run exe
- # ------------------------------------------------------------------
- public method _set_runstop {} {
- dbug I $runstop
-
- switch $runstop {
- busy {
- $Tool itemconfigure stop -state disabled
- }
- downloading {
- $Tool itemconfigure stop -state normal -image stop_img \
- -command [code $this cancel_download]
- $Tool itemballoon stop "Stop"
- }
- running {
- $Tool itemconfigure stop -state normal -image stop_img \
- -command [code $source inferior stop]
- $Tool itemballoon stop "Stop"
- }
- normal {
- $Tool itemconfigure stop -state normal -image run_img \
- -command [code $source inferior run]
- $Tool itemballoon stop "Run (R)"
- }
- default {
- dbug W "unknown state $runstop"
- }
- }
- }
-
-
- # ------------------------------------------------------------------
- # METHOD: _set_stepi - Set state of stepi/nexti buttons.
- # ------------------------------------------------------------------
- public method _set_stepi {} {
-
- # Only do this in synchronous mode
- if {!$Tracing} {
- # In source-only mode, disable these buttons. Otherwise, enable
- # them.
- if {$displaymode == "SOURCE"} {
- set state disabled
- } else {
- set state normal
- }
- $Tool itemconfigure stepi -state $state
- $Tool itemconfigure nexti -state $state
- }
- }
-
-
- ####################################################################
- #
- # State control methods used by both the menu and the toolbar
- #
- ####################################################################
-
- # ------------------------------------------------------------------
- # METHOD: handle_trace_find_hook - response to the tfind command.
- # If the command puts us in a new mode, then switch modes...
- # ------------------------------------------------------------------
- method handle_trace_find_hook {mode from_tty} {
- debug "mode: $mode, from_tty: $from_tty, Browsing: $Browsing"
- if {[string compare $mode -1] == 0} {
- if {$Browsing} {
- set_control_mode 0
- }
- } else {
- if {!$Browsing} {
- set_control_mode 1
- }
- }
- }
-
- # ------------------------------------------------------------------
- # METHOD: set_control_mode - sets up the srcbar for browsing
- # a trace experiment.
- # mode: 1 => browse mode
- # 0 => control mode
- # ------------------------------------------------------------------
- method set_control_mode {mode} {
- debug "set_control_mode called with mode $mode"
- if {$mode} {
- set Browsing 1
- $Tool itemconfigure view -image run_expt_img \
- -command "$this set_control_mode 0"
- $Tool itemballoon view "Switch to Control mode"
- # Now swap out the buttons...
- $Tool toolbar_swap_button_lists $Trace_control_buttons \
- $Run_control_buttons
- enable_ui 1
- } else {
- if {$Browsing} {
- tfind_cmd {tfind none}
- }
- set Browsing 0
- $Tool itemconfigure view -image watch_movie_img \
- -command "$this set_control_mode 1"
- $Tool itemballoon view "Switch to Browse mode"
- # Now swap out the buttons...
- $Tool toolbar_swap_button_lists $Run_control_buttons \
- $Trace_control_buttons
- enable_ui 1
- }
- }
-
- # ------------------------------------------------------------------
- # METHOD: reconfig - reconfigure the srcbar
- # used when preferences change
- # ------------------------------------------------------------------
- public method reconfig {} {
- debug
- _load_src_images 1
- _load_images 1
-
- if {[pref get gdb/use_color_schemes] == "1"} {
- set cs_state normal
- } else {
- set cs_state disabled
- }
- $Menu set_class_state "Color $cs_state"
- for {set i 0} {$i < 16} {incr i} {
- set dbg [recolor [pref get gdb/bg/$i] 80]
- $color_menu entryconfigure $i -activebackground $dbg -background [pref get gdb/bg/$i]
- }
- # FIXME: Must Check if we are Tracing and set the buttons accordingly.
- }
-
- # ------------------------------------------------------------------
- # METHOD: set_variable - run when user enters a `set' command.
- #
- # FIXME: Should not be accessing the base class internal data
- # As the spec says, one must clear the menu and recreate it.
- # ------------------------------------------------------------------
- public method set_variable {event} {
- set varname [$event get variable]
- set value [$event get value]
- debug "Got $varname = $value"
-
- if {$varname == "os"} {
- # Make current_menu pointer point to the View Menu.
- # FIXME: Should not be accessing the base class internal data directly
- set view_menu [menu_find View]
- # Restore the current_menu pointer.
- set save_menu [$Menu menubar_set_current_menu $view_menu]
- set title "Kernel Objects"
-
- # Look for the KOD menu entry...
- if {[catch {$view_menu index $title} index]} {
- set index none
- }
-
- # FIXME: This assumes that the KOD menu is the last one as it does not
- # adjust the index information kept by the GDBMenuBar class.
- if {$value == ""} {
- # No OS, so remove KOD from View menu.
- if {$index != "none"} {
- # FIXME: Should not be accessing the base class internal data
- $view_menu delete $index
- }
- } else {
- # Add KOD to View menu, but only if it isn't already there.
- if {$index == "none"} {
- $Menu add command Other $title \
- {ManagedWin::open KodWin} \
- -underline 0 -accelerator "Ctrl+K"
- }
- }
-
- # Restore the current_menu pointer.
- $Menu menubar_set_current_menu $save_menu
-
- global gdb_kod_cmd
- set gdb_kod_cmd $value
- }
- }
-
- ####################################################################
- # The following method enables/disables both menus and buttons.
- ####################################################################
-
- # ------------------------------------------------------------------
- # METHOD: enable_ui - enable/disable the appropriate buttons and menus
- # Called from the busy, idle, and no_inferior hooks.
- #
- # on must be:
- # value Control Other Trace State
- # 0 off off off gdb is busy
- # 1 on on off gdb has inferior, and is idle
- # 2 off on off gdb has no inferior, and is idle
- # ------------------------------------------------------------------
- public method enable_ui {on} {
- global tcl_platform
- debug "$on - Browsing=$Browsing"
-
- # Do the enabling so that all the disabling happens first, this way if a
- # button belongs to two groups, enabling takes precedence, which is
- # probably right.
-
- switch $on {
- 0 {
- # Busy
- set enable_list {Control disabled \
- Other disabled \
- Trace disabled \
- Attach disabled \
- Detach disabled}
- }
- 1 {
- # Idle, with inferior
- if {!$Browsing} {
- set enable_list {Trace disabled \
- Control normal \
- Other normal \
- Attach disabled \
- Detach normal }
- # set the states of stepi and nexti correctly
- _set_stepi
- } else {
- set enable_list {Control disabled Other normal Trace normal}
- }
-
- }
- 2 {
- # Idle, no inferior
- set enable_list {Control disabled \
- Trace disabled \
- Other normal \
- Attach normal \
- Detach disabled }
- }
- default {
- debug "Unknown type: $on in enable_ui"
- return
- }
- }
-
- $Menu set_class_state $enable_list
- $Tool set_class_state $enable_list
- }
-
- ####################################################################
- #
- # Execute actions corresponding to menu events
- #
- ####################################################################
-
- # ------------------------------------------------------------------
- # METHOD: do_attach: attach to a running target
- # ------------------------------------------------------------------
- method do_attach {menu} {
- gdbtk_attach_native
- }
-
- # ------------------------------------------------------------------
- # METHOD: do_detach: detach from a running target
- # ------------------------------------------------------------------
- method do_detach {menu} {
- gdbtk_disconnect
- gdbtk_idle
- }
-
- # ------------------------------------------------------------------
- # METHOD: do_kill: kill the current target
- # ------------------------------------------------------------------
- method do_kill {menu} {
- gdb_cmd "kill"
- run_hooks gdb_no_inferior_hook
- }
-
- # ------------------------------------------------------------------
- # METHOD: do_connect: connect to a remote target
- # in asynch mode if async is 1
- # ------------------------------------------------------------------
- method do_connect {menu {async 0}} {
-
- set successful [gdbtk_connect $async]
-
- if {$successful} {
- $menu entryconfigure "Connect to target" -state disabled
- $menu entryconfigure "Disconnect" -state normal
- } else {
- $menu entryconfigure "Connect to target" -state normal
- $menu entryconfigure "Disconnect" -state disabled
- }
-
- # Make the menu reflect this change
- ::update idletasks
- }
-
- # ------------------------------------------------------------------
- # METHOD: do_disconnect: disconnect from a remote target
- # in asynch mode if async is 1.
- #
- # ------------------------------------------------------------------
- method do_disconnect {menu {async 0}} {
- debug "$menu $async"
- #
- # For now, these are the same, but they might be different...
- #
-
- gdbtk_disconnect $async
-
- $menu entryconfigure "Connect to target" -state normal
- $menu entryconfigure "Disconnect" -state disabled
- }
-
- ####################################################################
- #
- # Execute actions corresponding to toolbar events
- #
- ####################################################################
-
- # ------------------------------------------------------------------
- # METHOD: _toggle_updates - Run when the update checkbutton is
- # toggled. Private method.
- # ------------------------------------------------------------------
- public method _toggle_updates {} {
- global GDBSrcBar_state
- if {$updatecommand != ""} {
- uplevel \#0 $updatecommand $GDBSrcBar_state($this)
- }
- }
-
- # ------------------------------------------------------------------
- # METHOD: cancel_download
- # ------------------------------------------------------------------
- public method cancel_download {} {
- global download_dialog download_cancel_ok
-
- if {"$download_dialog" != ""} {
- $download_dialog cancel
- } else {
- set download_cancel_ok 1
- }
- }
-
- ####################################################################
- #
- # Execute actions that can be activated by both menu entries and
- # toolbar buttons
- #
- ####################################################################
-
- # ------------------------------------------------------------------
- # METHOD: do_tstop: Change the GUI state, then do the tstop or
- # tstart command, whichever is appropriate.
- #
- # ------------------------------------------------------------------
- method do_tstop {} {
- debug "do_tstop called... Collecting is $Collecting"
-
- if {!$Collecting} {
- #
- # Start the trace experiment
- #
-
- if {$Browsing} {
- set ret [tk_messageBox -title "Warning" -message \
-"You are currently browsing a trace experiment.
-This command will clear the results of that experiment.
-Do you want to continue?" \
- -icon warning -type okcancel -default ok]
- if {[string compare $ret cancel] == 0} {
- return
- }
- set_control_mode 1
- }
- if {[tstart]} {
- # FIXME: Must enable the Stop Collection menu item and
- # disable the Start Collection item
- $Tool itemconfigure tstop -image Movie_off_img
- $Tool itemballoon tstop "End Collection"
- set Collecting 1
- } else {
- tk_messageBox -title Error \
- -message "Error downloading tracepoint info" \
- -icon error -type ok
- }
- } else {
- #
- # Stop the trace experiment
- #
-
- if {[tstop]} {
- # FIXME: Must enable the Stop Collection menu item and
- # disable the Start Collection item
- $Tool itemconfigure tstop -image Movie_on_img
- $Tool itemballoon tstop "Start Collection"
- set Collecting 0
- }
- }
- }
-
- # ------------------------------------------------------------------
- # METHOD: busy - BusyEvent handler
- # ------------------------------------------------------------------
- method busy {event} {
- enable_ui 0
- }
-
- # ------------------------------------------------------------------
- # METHOD: idle - IdleEvent handler
- # ------------------------------------------------------------------
- method idle {event} {
- enable_ui 1
- }
-
- ####################################################################
- #
- # PRIVATE DATA
- #
- ####################################################################
-
- # This is a handle on our parent source window.
- private variable source {}
-
- # The GdbMenuBar component
- private variable Menu
- private variable color_menu
-
- # The GdbToolBar component
- private variable Tool
-
- # FIXME - Need to break the images into the sets needed for
- # each button group, and load them when the button group is
- # created.
-
- # This is set if we've already loaded the standard images.
- private common _loaded_images 0
-
- # This is set if we've already loaded the standard images. Private
- # variable.
- private common _loaded_src_images 0
-
- # These buttons go in the control area when we are browsing
- protected variable Trace_control_buttons
-
- # And these go in the control area when we are running
- protected variable Run_control_buttons
-
- ####################################################################
- #
- # PUBLIC DATA
- #
- ####################################################################
-
- # This is the command that should be run when the `update'
- # checkbutton is toggled. The current value of the checkbutton is
- # appended to the command.
- public variable updatecommand {}
-
- # This controls whether the `update' checkbutton is turned on or
- # off.
- public variable updatevalue 0 {
- global GDBSrcBar_state
- ::set GDBSrcBar_state($this) $updatevalue
- }
-
- # This holds the source window's display mode. Valid values are
- # SOURCE, ASSEMBLY, SRC+ASM, and MIXED.
- public variable displaymode SOURCE {
- _set_stepi
- }
-
- # This indicates what is the inferior state.
- # Possible values are: {busy running downloading normal}
- public variable runstop normal {
- dbug I "configuring runstop $runstop"
-
- # Set the Run/Stop button accordingly
- _set_runstop
- }
-
- # The next three determine the state of the application when Tracing is enabled.
-
- public variable Tracing 0 ;# Is tracing enabled for this gdb?
- public variable Browsing 0 ;# Are we currently browsing a trace experiment?
- public variable Collecting 0 ;# Are we currently collecting a trace experiment?
-}
diff --git a/gdb/gdbtk/library/srcpref.itb b/gdb/gdbtk/library/srcpref.itb
deleted file mode 100644
index 6b7499351c4..00000000000
--- a/gdb/gdbtk/library/srcpref.itb
+++ /dev/null
@@ -1,278 +0,0 @@
-# Source preferences dialog for Insight.
-# Copyright (C) 1998, 1999, 2002, 2003 Red Hat
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-# ------------------------------------------------------------------
-# CONSTRUCTOR - create new source preferences window
-# ------------------------------------------------------------------
-itcl::body SrcPref::constructor {args} {
- window_name "Source Preferences"
- _init_var
- _build_win
-}
-
-# ------------------------------------------------------------------
-# METHOD: init_var - initialize preference variables
-# ------------------------------------------------------------------
-itcl::body SrcPref::_init_var {} {
- set vlist {gdb/src/PC_TAG gdb/src/STACK_TAG gdb/src/BROWSE_TAG
- gdb/src/run_attach gdb/src/run_load gdb/src/run_run
- gdb/src/run_cont gdb/src/bp_fg gdb/src/temp_bp_fg
- gdb/src/trace_fg gdb/src/thread_fg gdb/src/variableBalloons
- gdb/src/source2_fg gdb/src/tab_size gdb/mode gdb/editor
- gdb/B1_behavior}
-
- foreach var $vlist {
- set _saved($var) [pref get $var]
- set _new($var) $_saved($var)
- }
-}
-
-
-# ------------------------------------------------------------------
-# METHOD: build_win - build the dialog
-# ------------------------------------------------------------------
-itcl::body SrcPref::_build_win {} {
- frame $itk_interior.f
- frame $itk_interior.f.a
- frame $itk_interior.f.b
- set f $itk_interior.f.a
-
- # Colors frame
- Labelledframe $f.colors -anchor nw -text {Colors}
- set w [$f.colors get_frame]
-
- set color [pref get gdb/src/PC_TAG]
- label $w.pcl -text {PC}
- button $w.pcb -text { } -activebackground $color -bg $color \
- -command [code $this _pick $color $w.pcb PC_TAG]
-
- set color [pref get gdb/src/STACK_TAG]
- label $w.stl -text {Stack}
- button $w.stb -text { } -activebackground $color -bg $color \
- -command [code $this _pick $color $w.stb STACK_TAG]
-
- set color [pref get gdb/src/BROWSE_TAG]
- label $w.brl -text {Browse}
- button $w.brb -text { } -activebackground $color -bg $color\
- -command [code $this _pick $color $w.brb BROWSE_TAG]
-
- set color [pref get gdb/src/source2_fg]
- label $w.s2l -text {Mixed Source}
- button $w.s2b -text { } -activebackground $color -bg $color \
- -command [code $this _pick $color $w.s2b source2_fg]
-
- set color [pref get gdb/src/bp_fg]
- label $w.nbpl -text {Normal Breakpoint}
- button $w.nbpb -text { } -activebackground $color -bg $color\
- -command [code $this _pick $color $w.nbpb bp_fg]
-
- set color [pref get gdb/src/temp_bp_fg]
- label $w.tbpl -text {Temporary Breakpoint}
- button $w.tbpb -text { } -activebackground $color -bg $color \
- -command [code $this _pick $color $w.tbpb temp_bp_fg]
-
- set color [pref get gdb/src/thread_fg]
- label $w.dbpl -text {Thread Breakpoint}
- button $w.dbpb -text { } -activebackground $color -bg $color \
- -command [code $this _pick $color $w.dbpb thread_fg]
-
- set color [pref get gdb/src/trace_fg]
- label $w.tpl -text {Tracepoint}
- button $w.tpb -text { } -activebackground $color -bg $color \
- -command [code $this _pick $color $w.tpb trace_fg]
-
- grid $w.pcl $w.pcb $w.nbpl $w.nbpb -padx 10 -pady 2 -sticky w
- grid $w.stl $w.stb $w.tbpl $w.tbpb -padx 10 -pady 2 -sticky w
- grid $w.brl $w.brb $w.dbpl $w.dbpb -padx 10 -pady 2 -sticky w
- grid $w.s2l $w.s2b $w.tpl $w.tpb -padx 10 -pady 2 -sticky w
-
- frame $f.rmv
-
- # Debug Mode frame
- Labelledframe $f.rmv.mode -anchor nw -text "Mouse Button-1 Behavior"
- set w [$f.rmv.mode get_frame]
-
- if {[pref get gdb/mode]} {
- set state normal
- } else {
- pref set gdb/B1_behavior 1
- set state disabled
- }
-
- radiobutton $w.async -text "Set/Clear Tracepoints" \
- -variable [scope _new(gdb/B1_behavior)] -value 0 -state $state
- radiobutton $w.sync -text "Set/Clear Breakpoints" \
- -variable [scope _new(gdb/B1_behavior)] -value 1 -state $state
-
- pack $w.async $w.sync -side top
-
- # Variable Balloons
- Labelledframe $f.rmv.var -anchor nw -text "Variable Balloons"
- set w [$f.rmv.var get_frame]
- set var _new(gdb/src/variableBalloons)
- radiobutton $w.var_on -text "On " -variable [scope $var] -value 1
- radiobutton $w.var_off -text "Off" -variable [scope $var] -value 0
- pack $w.var_on $w.var_off -side top
- grid $f.rmv.mode -sticky nsew -pady 5 -row 0 -column 0
- grid $f.rmv.var -sticky nsew -pady 5 -row 0 -column 2
- grid columnconfigure $f.rmv 0 -weight 1
- grid columnconfigure $f.rmv 1 -minsize 4
- grid columnconfigure $f.rmv 2 -weight 1
- grid rowconfigure $f.rmv 0 -weight 1
-
-
- frame $f.x
- # Tab size
- itk_component add size {
- iwidgets::spinint $f.x.size -labeltext "Tab Size" -range {1 16} \
- -step 1 -fixed 2 -width 2 -textvariable [scope _new(gdb/src/tab_size)] \
- -wrap 0 -textbackground $::Colors(textbg)
- }
- $f.x.size delete 0 end
- $f.x.size insert end $_saved(gdb/src/tab_size)
-
- # Linenumbers
- # commented out because this option isn't really useful
-# checkbutton $f.x.linenum -text "Line Numbers" \
-# -variable [pref varname gdb/src/linenums]
-# pack $f.x.size $f.x.linenum -side left -padx 5 -pady 5
- pack $f.x.size -side left -padx 5 -pady 5
-
- # Disassembly flavor - We tell whether this architecture supports
- # the flag by checking whether the flag exists.
-
- set have_disassembly_flavor 0
- set vals [list_disassembly_flavors]
- if {[llength $vals] != 0} {
- set have_disassembly_flavor 1
- frame $f.dis
- label $f.dis.l -text "Disassembly Flavor: "
- combobox::combobox $f.dis.combo -maxheight 15 -width 15 \
- -font global/fixed -editable 0 -command [code $this _set_flavor] \
- -bg $::Colors(textbg)
-
- foreach elem $vals {
- $f.dis.combo list insert end $elem
- }
-
- set _saved_disassembly_flavor [get_disassembly_flavor]
- $f.dis.combo entryset $_saved_disassembly_flavor
-
- pack $f.dis.l -side left
- pack $f.dis.combo -side left -padx 4
-
- } else {
- set _saved_disassembly_flavor ""
- }
-
- # External editor.
- frame $f.exted
- label $f.exted.l -text "External Editor: "
- entry $f.exted.e -width 40 -textvariable [scope _new(gdb/editor)]
- pack $f.exted.l -side left
- pack $f.exted.e -side left -padx 4
-
- pack $f.colors -fill both -expand 1
- pack $f.rmv -fill both -expand yes
- pack $f.x -fill x -expand yes
-
- if {$have_disassembly_flavor} {
- pack $f.dis -side top -fill x -padx 4
- }
-
- pack $f.exted -side top -fill x -padx 4 -pady 4
-
- button $itk_interior.f.b.ok -text OK -width 7 -underline 0 -command [code $this _save]
- button $itk_interior.f.b.apply -text Apply -width 7 -underline 0 -command [code $this _apply]
- button $itk_interior.f.b.quit -text Cancel -width 7 -underline 0 -command [code $this _cancel]
- standard_button_box $itk_interior.f.b
- pack $itk_interior.f.a $itk_interior.f.b $itk_interior.f -expand yes -fill both -padx 5 -pady 5
-}
-
-# ------------------------------------------------------------------
-# METHOD: apply - apply changes
-# ------------------------------------------------------------------
-itcl::body SrcPref::_apply {} {
- foreach var [array names _new] {
- if {$_new($var) != [pref get $var]} {
- #debug "$var = $_new($var)"
- pref set $var $_new($var)
- }
- }
- if {$_new_disassembly_flavor != ""} {
- gdb_cmd "set disassembly-flavor $_new_disassembly_flavor"
- pref set gdb/src/disassembly-flavor $_new_disassembly_flavor
- }
- ManagedWin::restart
-}
-
-itcl::body SrcPref::cancel {} {
- _save
-}
-
-# ------------------------------------------------------------------
-# METHOD: _cancel
-# ------------------------------------------------------------------
-itcl::body SrcPref::_cancel {} {
- set any_changed 0
-
- foreach elem [array names _saved] {
- set cur_val [pref get $elem]
- if {[string compare $cur_val $_saved($elem)] != 0} {
- set any_changed 1
- pref set $elem $_saved($elem)
- }
- }
-
- if {$_new_disassembly_flavor != ""} {
- set any_changed 1
- gdb_cmd "set disassembly-flavor $_saved_disassembly_flavor"
- pref set gdb/src/disassembly-flavor $_saved_disassembly_flavor
- }
-
- if {$any_changed} {
- ManagedWin::restart
- }
- unpost
-}
-
-# ------------------------------------------------------------------
-# METHOD: save - apply changes and quit
-# ------------------------------------------------------------------
-itcl::body SrcPref::_save {} {
- _apply
- unpost
-}
-
-# ------------------------------------------------------------------
-# METHOD: _set_flavor - sets the disassembly flavor. The set disassembly-flavor
-# gdb command is already known to exist, so I don't have to check...
-# ------------------------------------------------------------------
-itcl::body SrcPref::_set_flavor {w new_mode} {
- $w entryset $new_mode
- set _new_disassembly_flavor $new_mode
-}
-
-
-# ------------------------------------------------------------------
-# METHOD: pick - pick colors
-# ------------------------------------------------------------------
-itcl::body SrcPref::_pick {color win tag} {
- set new_color [tk_chooseColor -initialcolor $color -title "Choose color"]
- if {$new_color != $color && $new_color != {}} {
- set _new(gdb/src/$tag) $new_color
- $win configure -activebackground $new_color -bg $new_color
- }
-}
-
diff --git a/gdb/gdbtk/library/srcpref.ith b/gdb/gdbtk/library/srcpref.ith
deleted file mode 100644
index a42f7ba7fde..00000000000
--- a/gdb/gdbtk/library/srcpref.ith
+++ /dev/null
@@ -1,38 +0,0 @@
-# Source preferences dialog class definition for GDBtk.
-# Copyright (C) 1998, 1999 Cygnus Solutions
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-itcl::class SrcPref {
- inherit ManagedWin ModalDialog
-
- private {
- variable _saved ;# These are the saved values...
- variable _new ;# These are the changed values
- variable _saved_disassembly_flavor
- variable _new_disassembly_flavor ""
-
- method _apply {}
- method _build_win {}
- method _cancel {}
- method _init_var {}
- method _pick {color win tag}
- method _save {}
- method _set_flavor {w new_mode}
- method cancel {}
- }
-
- public {
- method constructor {args}
- }
-}
-
diff --git a/gdb/gdbtk/library/srctextwin.itb b/gdb/gdbtk/library/srctextwin.itb
deleted file mode 100644
index 7e743b13ce1..00000000000
--- a/gdb/gdbtk/library/srctextwin.itb
+++ /dev/null
@@ -1,2971 +0,0 @@
-# Paned text widget for source code, for Insight
-# Copyright (C) 1997, 1998, 1999, 2001, 2002 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-# ----------------------------------------------------------------------
-# Implements the paned text widget with the source code in it.
-# This widget is typically embedded in a SrcWin widget.
-#
-# ----------------------------------------------------------------------
-
-# ------------------------------------------------------------------
-# CONSTRUCTOR - create new source text window
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::constructor {args} {
- eval itk_initialize $args
- set top [winfo toplevel $itk_interior]
- if {$parent == {}} {
- set parent [winfo parent $itk_interior]
- }
-
- if {![info exists break_images(bp)]} {
- set size [font measure [pref get gdb/src/font] "W"]
- set break_images(bp) [makeBreakDot $size \
- [pref get gdb/src/bp_fg]]
- set break_images(temp_bp) [makeBreakDot $size \
- [pref get gdb/src/temp_bp_fg]]
- set break_images(disabled_bp) [makeBreakDot $size \
- [pref get gdb/src/disabled_fg]]
- set break_images(tp) [makeBreakDot $size \
- [pref get gdb/src/trace_fg]]
- set break_images(thread_bp) [makeBreakDot $size \
- [pref get gdb/src/thread_fg]]
- set break_images(bp_and_tp) [makeBreakDot $size \
- [list [pref get gdb/src/trace_fg] \
- [pref get gdb/src/bp_fg]]]
- }
-
- if {$ignore_var_balloons} {
- set UseVariableBalloons 0
- } else {
- set UseVariableBalloons [pref get gdb/src/variableBalloons]
- }
-
- set Linenums [pref get gdb/src/linenums]
-
- #Initialize state variables
- _initialize_srctextwin
-
- build_popups
- build_win
-
- # add hooks
- if {$Tracing} {
- add_hook control_mode_hook "$this set_control_mode"
- add_hook gdb_trace_find_hook "$this trace_find_hook"
- }
-
- if {$UseVariableBalloons} {
- add_hook gdb_idle_hook "$this updateBalloon"
- }
- global ${this}_balloon
- trace variable ${this}_balloon w "$this trace_help"
-
-}
-
-# ------------------------------------------------------------------
-# DESTRUCTOR - destroy window containing widget
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::destructor {} {
- if {$Tracing} {
- remove_hook control_mode_hook "$this set_control_mode"
- }
- if {$UseVariableBalloons} {
- remove_hook gdb_idle_hook "$this updateBalloon"
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: trace_find_hook - response to the tfind command. All we
-# need to do here is to remove the trace tags, if we are exiting
-# trace mode
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::trace_find_hook {mode from_tty} {
- if {[string compare $mode -1] == 0} {
- if {$Browsing} {
- $twin tag remove STACK_TAG 1.0 end
- }
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: set_control_mode- switches the src window between
-# browsing -> mode = 1
-# controlling -> mode = 0
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::set_control_mode {mode} {
-# debug "Setting control mode of $twin to $mode"
- if {$mode} {
- set Browsing 1
- } else {
- set Browsing 0
- }
-
- switch $current(mode) {
- SOURCE {
- config_win $twin
- }
- ASSEMBLY {
- config_win $twin A
- }
- MIXED {
- config_win $twin M
- }
- SRC+ASM {
- config_win $twin
- config_win $bwin A
- }
- }
-
-}
-
-# ------------------------------------------------------------------
-# METHOD: build_popups - build the popups for the source window(s)
-# ------------------------------------------------------------------
-#
-# The popups array holds the data for the breakpoint & tracepoint popup menus.
-# The elements are:
-# Menus:
-# break_rgn - the popup for clicking in a bare break region
-# bp - the popup for clicking on a set breakpoint
-# tp - the popup for clicking on a set tracepoint
-# bp_and_tp - the popup for clicking on the break_region when the
-# line contains both a bp & a tp
-# source - the popup for clicking on the source region of the window
-#
-# State:
-# saved_y - the y value of the mouse click that posted the popup
-# saved_win- the Tk window which recieved the posting click
-#
-# Disable info:
-# run_disabled - a list of {menu entry} pairs for all the menus that
-# should be disabled when you are not running
-# browse_disabled - a similar list for menus that should be disabled
-# when you are browsing a trace expt.
-#
-itcl::body SrcTextWin::build_popups {} {
-
- set popups(bp) $itk_interior.bp_menu
- set popups(tp) $itk_interior.tp_menu
- set popups(bp_and_tp) $itk_interior.tp_bp_menu
- set popups(tp_browse) $itk_interior.tp_browse_menu
- set popups(break_rgn) $itk_interior.break_menu
- set popups(source) $itk_interior.src_menu
- set popups(disabled_bp) $itk_interior.disabled_bp_menu
-
- # This is a scratch popup menu we use when we are not over a bp...
- if {![winfo exists $popups(source)]} {
- menu $popups(source) -tearoff 0
- }
-
- if {![winfo exists $popups(break_rgn)]} {
- # breakpoint popup menu
- # don't enable hardware or conditional breakpoints until they are tested
- menu $popups(break_rgn) -tearoff 0
-
- set bp_fg [pref get gdb/src/bp_fg]
- set tp_fg [pref get gdb/src/trace_fg]
-
- if {[pref get gdb/control_target]} {
-
- addPopup break_rgn "Continue to Here" "$this continue_to_here" \
- [pref get gdb/src/PC_TAG] 0 0
- addPopup break_rgn "Jump to Here" "$this jump_to_here" \
- [pref get gdb/src/PC_TAG] 0 0
- $popups(break_rgn) add separator
-
- addPopup break_rgn "Set Breakpoint" "$this set_bp_at_line" $bp_fg
-
- lappend popups(break_rgn-browse) 1
- lappend popups(break_rgn-control) 1
-
- addPopup break_rgn "Set Temporary Breakpoint" "$this set_bp_at_line T" \
- [pref get gdb/src/temp_bp_fg]
-
- addPopup break_rgn "Set Breakpoint on Thread(s)..." \
- "$this ask_thread_bp" [pref get gdb/src/thread_fg] 0 0
- }
-
- if {$Tracing} {
- $popups(break_rgn) add separator
- addPopup break_rgn "Set Tracepoint" "$this set_tp_at_line" $tp_fg
- }
-
- }
-
- if {![winfo exists $popups(bp)]} {
- # this popup is used when the line contains a set breakpoint
- menu $popups(bp) -tearoff 0
-
- if {!$Browsing && [pref get gdb/control_target]} {
- addPopup bp "Continue to Here" "$this continue_to_here" {} 0 0
- addPopup bp "Jump to Here" "$this jump_to_here" {} 0 0
- $popups(bp) add separator
-
- addPopup bp "Disable Breakpoint" "$this enable_disable_at_line disable" \
- $bp_fg
- $popups(bp) add separator
- }
-
- addPopup bp "Delete Breakpoint" "$this remove_bp_at_line"
-
- # Currently you cannot set a tracepoint and a breakpoint at the same line...
- #
- # if {$Tracing} {
- # addPopup bp "Set Tracepoint" "$this set_tp_at_line" $tp_fg
- # }
- }
-
- if {![winfo exists $popups(tp)]} {
- # This is the popup to use when the line contains a set tracepoint
-
- menu $popups(tp) -tearoff 0
-
- if {[pref get gdb/control_target]} {
-
- addPopup tp "Continue to Here" "$this continue_to_here" green 0 0
- addPopup tp "Jump to Here" "$this jump_to_here" {} 0 0
- # $popups(tp) add separator
-
- # Currently you cannot set a tracepoint and a breakpoint at the same line...
- #
- # addPopup tp "Set Breakpoint" "$this set_bp_at_line" $bp_fg
-
- # addPopup tp "Set Temporary Breakpoint" "$this set_bp_at_line T" \
- # [pref get gdb/src/temp_bp_fg]
-
- # addPopup tp "Set Breakpoint on Thread(s)..." \
- # "$this ask_thread_bp" \
- # [pref get gdb/src/thread_fg] 0 0
- }
-
- if {$Tracing} {
- $popups(tp) add separator
- addPopup tp "Modify Tracepoint" "$this set_tp_at_line" $tp_fg
- addPopup tp "Delete Tracepoint" "$this remove_tp_at_line" $tp_fg
- }
- }
-
- # This is not currently used, since you can't set a bp & a tp on the same line.
- # N.B. however, we don't exclude this on the command line, but...
-
- if {![winfo exists $popups(bp_and_tp)]} {
-
- # this popup is used when the line contains a set breakpoint & tracepoint
- menu $popups(bp_and_tp) -tearoff 0
-
- if {!$Browsing && [pref get gdb/control_target]} {
- addPopup bp_and_tp "Continue to Here" "$this continue_to_here" \
- green 0 0
- addPopup bp_and_tp "Jump to Here" "$this jump_to_here" \
- green 0 0
- $popups(bp_and_tp) add separator
- }
-
- addPopup bp_and_tp "Delete Breakpoint" "$this remove_bp_at_line" $bp_fg
- if {$Tracing} {
- addPopup bp_and_tp "Modify Tracepoint" "$this set_tp_at_line" $tp_fg
- addPopup bp_and_tp "Delete Tracepoint" \
- "$this remove_tp_at_line" $tp_fg
- }
- }
-
- if {![winfo exists $popups(disabled_bp)]} {
- menu $popups(disabled_bp) -tearoff 0
-
- addPopup disabled_bp "Enable Breakpoint" \
- "$this enable_disable_at_line enable" $bp_fg
-
- $popups(disabled_bp) add separator
- addPopup disabled_bp "Delete Breakpoint" "$this remove_bp_at_line"
- }
-
- if {![winfo exists $popups(tp_browse)]} {
-
- # this popup is on a tracepoint when browsing.
-
- menu $popups(tp_browse) -tearoff 0
- addPopup tp_browse "Next hit Here" "$this next_hit_at_line" \
- green
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: build_win - build the main source paned window
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::build_win {} {
- cyg::panedwindow $itk_interior.p
-
- set _tpane pane$filenum
- incr filenum
-
- $itk_interior.p add $_tpane
- set pane1 [$itk_interior.p childsite $_tpane]
- set Stwc(gdbtk_scratch_widget:pane) $_tpane
- set Stwc(gdbtk_scratch_widget:dirty) 0
-
- set twinp [iwidgets::scrolledtext $pane1.st \
- -hscrollmode dynamic -vscrollmode dynamic]
- set twin [$twinp component text]
- pack $twinp -fill both -expand yes
- pack $itk_interior.p -fill both -expand yes
- config_win $twin
-}
-
-# ------------------------------------------------------------------
-# METHOD: SetRunningState - set state based on if GDB is running or not.
-# This disables the popup menus when GDB is not running yet.
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::SetRunningState {state} {
-# debug "$state"
- foreach elem $popups(run_disabled) {
- $popups([lindex $elem 0]) entryconfigure [lindex $elem 1] -state $state
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: enable - enable or disable bindings and change cursor
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::enable {on} {
- if {$on} {
- set Running 0
- set glyph ""
- set bnd ""
- set status normal
- } else {
- set Running 1
- set glyph watch
- set bnd "break"
- set status disabled
- }
-
- if {[winfo exists $twin]} {
- bind $twin <B1-Motion> $bnd
- bind $twin <Double-1> $bnd
- bind $twin <Triple-1> $bnd
- enable_disable_src_tags $twin $status
- $twin configure -cursor $glyph
- }
-
- if {$bwin != ""} {
- bind $bwin <B1-Motion> $bnd
- bind $bwin <Double-1> $bnd
- bind $bwin <Triple-1> $bnd
- enable_disable_src_tags $bwin $status
- $bwin configure -cursor $glyph
- }
-}
-
-# ------------------------------------------------------------------
-# PROC: makeBreakDot - make the break dot for the screen
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::makeBreakDot {size colorList {image {}}} {
- if {$size > 32} {
- set size 32
- } elseif {$size < 1} {
- set size 1
- }
-
- if {$image == ""} {
- set image [image create photo -width $size -height $size]
- } else {
- $image blank
- $image configure -width $size -height $size
- }
-
- if {[llength $colorList] == 1} {
- set x1 1
- set x2 [expr {1 + $size}]
- set y1 1
- set y2 $x2
- $image put $colorList -to 1 1 $x2 $y2
- } else {
- set x1 1
- set x3 [expr {1 + $size}]
- set x2 [expr int((1 + $size)/2)]
- set y1 1
- set y2 $x3
- $image put [lindex $colorList 0] -to 1 1 $x2 $y2
- $image put [lindex $colorList 1] -to [expr $x2 + 1] 1 $x3 $y2
- }
-
- return $image
-}
-
-# ------------------------------------------------------------------
-# METHOD: setTabs - set the tabs for the assembly/src windows
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::setTabs {win {asm S}} {
- set fsize [font measure [pref get gdb/src/font] "W"]
- set tsize [pref get gdb/src/tab_size]
- set rest ""
-
- if {[string compare $asm "S"] != 0} {
- set first [expr {$fsize * 12}]
- set second [expr {$fsize * 13}]
- set third [expr {$fsize * 34}]
- for {set i 1} {$i < 8} {incr i} {
- lappend rest [expr {(34 + ($i * $tsize)) * $fsize}] left
- }
- set tablist [concat [list $first right $second left $third left] $rest]
- } else {
- # SOURCE window
- # The first tab right-justifies the line numbers and the second
- # tab is the left margin for the start on the source code. The remaining
- # tabs should be regularly spaced depending on prefs.
- if {$Linenums} {
- set first [expr {$fsize * 6}] ;# "- " plus 4 digit line number
- set second [expr {$fsize * 7}] ;# plus a space after the number
- for {set i 1} {$i < 8} {incr i} {
- lappend rest [expr {(7 + ($i * $tsize)) * $fsize}] left
- }
- set tablist [concat [list $first right $second left] $rest]
- } else {
- set first [expr {$fsize * 2}]
- for {set i 1} {$i < 8} {incr i} {
- lappend rest [expr {(2 + ($i * $tsize)) * $fsize}] left
- }
- set tablist [concat [list $first left] $rest]
- }
- }
- $win configure -tabs $tablist
-}
-
-itcl::body SrcTextWin::enable_disable_src_tags {win how} {
-
- switch $how {
- normal {
- set cur1 dot
- set cur2 xterm
- }
- disabled {
- set cur1 watch
- set cur2 $cur1
- }
- browse {
- set cur1 dot
- set cur2 xterm
- }
- }
-
- if {[string compare $how browse] == 0} {
-
- $win tag bind break_rgn_tag <Enter> { }
- $win tag bind break_rgn_tag <Leave> { }
-
- foreach type $bp_types {
- $win tag bind ${type}_tag <Enter> { }
- $win tag bind ${type}_tag <Motion> { }
- $win tag bind ${type}_tag <Leave> { }
- }
-
- } else {
-
- $win tag bind break_rgn_tag <Enter> "$win config -cursor $cur1"
- $win tag bind break_rgn_tag <Leave> "$win config -cursor $cur2"
-
- foreach type $bp_types {
- $win tag bind ${type}_tag <Enter> "$win config -cursor $cur1"
- $win tag bind ${type}_tag <Motion> "$this motion bp %W %x %y"
- $win tag bind ${type}_tag <Leave> \
- "$this cancelMotion;$win config -cursor $cur2"
- }
- }
-
- $win tag bind tp_tag <Enter> "$win config -cursor $cur1"
- $win tag bind tp_tag <Motion> "$this motion bp %W %x %y"
- $win tag bind tp_tag <Leave> "$this cancelMotion;$win config -cursor $cur2"
-}
-
-# ------------------------------------------------------------------
-# METHOD: config_win - configure the source or assembly text window
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::config_win {win {asm S}} {
-# debug "$win $asm Tracing=$Tracing Browsing=$Browsing"
-
- $win config -borderwidth 2 -insertwidth 0 -wrap none
-
- # font
- set font [pref get gdb/src/font]
- $win configure -font $font -bg $::Colors(textbg) -fg $::Colors(textfg)
-
- setTabs $win $asm
-
- # set up some tags. should probably be done differently
- # !! change bg?
-
- $win tag configure break_rgn_tag
- foreach type $bp_types {
- $win tag configure ${type}_tag
- }
- $win tag configure tp_tag
- $win tag configure source_tag2 -foreground [pref get gdb/src/source2_fg]
- $win tag configure PC_TAG -background [pref get gdb/src/PC_TAG]
- $win tag configure STACK_TAG -background [pref get gdb/src/STACK_TAG]
- $win tag configure BROWSE_TAG -background [pref get gdb/src/BROWSE_TAG]
-
- # search tag used to highlight searches
- foreach option [$win tag configure sel] {
- set op [lindex $option 0]
- set val [lindex $option 4]
- eval $win tag configure search $op $val
- }
-
- # bind mouse button 3 to the popup men
- $win tag bind source_tag <Button-3> "$this do_source_popup %X %Y %x %y"
- $win tag bind source_tag2 <Button-3> "$this do_source_popup %X %Y %x %y"
-
- # bind mouse button 3 to the popup menus
- if {!$Browsing} {
-
- $win tag bind break_rgn_tag <Button-3> \
- "$this do_tag_popup break_rgn %X %Y %y; break"
- foreach type $bp_types {
- if {$type == "disabled_bp"} then {
- set tag disabled_bp
- } else {
- set tag bp
- }
- $win tag bind ${type}_tag <Button-3> \
- "$this do_tag_popup $tag %X %Y %y; break"
- }
- $win tag bind tp_tag <Button-3> "$this do_tag_popup tp %X %Y %y; break"
- $win tag bind bp_and_tp_tag <Button-3> "$this do_tag_popup bp_and_tp %X %Y %y; break"
- } else {
- $win tag bind tp_tag <Button-3> "$this do_tag_popup tp_browse %X %Y %y; break"
- $win tag bind break_rgn_tag <Button-3> { }
- foreach type $bp_types {
- $win tag bind ${type}_tag <Button-3> { }
- }
- $win tag bind bp_and_tp_tag <Button-3> "$this do_tag_popup tp_browse %X %Y %y; break"
-
- }
-
- # Disable printing and cut and paste keys; makes the window readonly
- # We do this so we don't have to enable and disable the
- # text widget everytime we want to modify it.
-
- bind $win <Key> {if {"%A" != "{}"} {break}}
- bind $win <Delete> break
- bind $win <ButtonRelease-2> {break}
-
- # GDB key bindings
- # We need to explicitly ignore keys with the Alt modifier, since
- # otherwise they will interfere with selecting menus on Windows.
-
- if {!$Browsing && [pref get gdb/control_target]} {
- bind_plain_key $win c "$this do_key continue; break"
- bind_plain_key $win r "$this do_key run; break"
- bind_plain_key $win f "$this do_key finish; break"
- } else {
- bind_plain_key $win n "$this do_key tfind_next; break"
- bind_plain_key $win p "$this do_key tfind_prev; break"
- bind_plain_key $win f "$this do_key tfind_start; break"
- bind_plain_key $win l "$this do_key tfind_line; break"
- bind_plain_key $win h "$this do_key tfind_tp; break"
- }
- bind_plain_key $win u "$this do_key up; break"
- bind_plain_key $win d "$this do_key down; break"
- bind_plain_key $win x "$this do_key quit; break"
-
- if {!$Browsing && [pref get gdb/control_target]} {
- if {[string compare $asm "S"] != 0} {
- bind_plain_key $win s "$this do_key stepi; break"
- bind_plain_key $win n "$this do_key nexti; break"
- } else {
- bind_plain_key $win s "$this do_key step; break"
- bind_plain_key $win n "$this do_key next; break"
- }
- }
-
- bind_plain_key $win Control-h "$this do_key thread_list; break"
- bind_plain_key $win Control-f "$this do_key browser; break"
- bind_plain_key $win Control-d "$this do_key download; break"
- bind_plain_key $win Control-p "$this do_key print"
- bind_plain_key $win Control-u "$this do_key debug; break"
- bind_plain_key $win Control-o [list $this do_key open]
- bind_plain_key $win Control-a [list $this do_key attach]
- bind_plain_key $win Control-w [code $this do_key close]
-
- if {!$Browsing && [pref get gdb/control_target]} {
- # Ctrl+F5 is another accelerator for Run
- bind_plain_key $win Control-F5 "$this do_key run"
- }
-
- bind_plain_key $win Control-F11 "$this do_key debug"
- bind_plain_key $win Alt-v "$win yview scroll -1 pages"
- bind_plain_key $win Control-v [format {
- %s yview scroll 1 pages
- break
- } $win]
-
- # bind mouse button 1 to the breakpoint method or tracepoint,
- # depending on the settings of the B1_behavior setting. We don't
- # have to bind to bp_and_tp because that will fall through to either
- # the tp or the bp tag. We have to put in the break so that we don't
- # both remove & reinsert a BP when we have both a tp & a bp on the same line.
- # If we are browsing, then disable Button-1
-
- if {!$Browsing} {
- if {[pref get gdb/B1_behavior]} {
- $win tag bind break_rgn_tag <Button-1> "$this set_bp_at_line N $win %y; break"
- foreach type $bp_types {
- $win tag bind ${type}_tag <Button-1> "$this remove_bp_at_line $win %y; break"
- }
- $win tag bind tp_tag <Button-1> "$this set_bp_at_line N $win %y; break"
- } else {
- $win tag bind break_rgn_tag <Button-1> "$this set_tp_at_line $win %y; break"
- foreach type $bp_types {
- $win tag bind ${type}_tag <Button-1> "$this set_tp_at_line $win %y; break"
- }
- $win tag bind tp_tag <Button-1> "$this set_tp_at_line $win %y; break"
- }
- } else {
- $win tag bind break_rgn_tag <Button-1> { }
- foreach type $bp_types {
- $win tag bind ${type}_tag <Button-1> { }
- }
- $win tag bind tp_tag <Button-1> { }
- }
-
-
- # avoid special handling of double and triple clicks in break area
- bind $win <Double-1> [format {
- if {[lsearch [%s tag names @%%x,%%y] break_rgn_tag] >= 0} {
- break
- }
- } $win $win]
- bind $win <Triple-1> [format {
- if {[lsearch [%s tag names @%%x,%%y] break_rgn_tag] >= 0} {
- break
- }
- } $win $win]
-
- # bind window shortcuts
- bind_plain_key $win Control-s "$this do_key stack"
- bind_plain_key $win Control-r "$this do_key registers"
- bind_plain_key $win Control-m "$this do_key memory"
- bind_plain_key $win Control-t "$this do_key watch"
- bind_plain_key $win Control-l "$this do_key locals"
- bind_plain_key $win Control-k "$this do_key kod"
- if { !$Tracing } {
- bind_plain_key $win Control-b "$this do_key breakpoints"
- } else {
- bind_plain_key $win Control-t "$this do_key tracepoints"
- bind_plain_key $win Control-u "$this do_key tdump"
- }
- bind_plain_key $win Control-n "$this do_key console"
-
- if {$Browsing} {
- enable_disable_src_tags $win browse
- } else {
- enable_disable_src_tags $win normal
- }
-
- if {$UseVariableBalloons} {
- $win tag bind source_tag <Motion> "$this motion var %W %x %y"
- $win tag bind source_tag <Leave> "$this cancelMotion"
- }
-
- # Up/Down arrow key bindings
- bind_plain_key $win Up [list %W yview scroll -1 units]
- bind_plain_key $win Down [list %W yview scroll +1 units]
-
- # After loading a new file, focus sometimes gets lost
- # so point it back to this window if it doesn't already
- # point elsewhere.
- if {[focus -displayof $win] == ""} {focus $win}
-}
-
-# ------------------------------------------------------------------
-# METHOD: addPopup - adds a popup to one of the source popup menus
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::addPopup {menu label command {abg {}} {browse 1} {run 1}} {
-
- if {$abg == ""} {
- $popups($menu) add command -label $label -command $command
- } else {
- $popups($menu) add command -label $label -command $command \
- -activebackground $abg
- }
-
- set index [$popups($menu) index last]
- if {!$run} {
- lappend popups(run_disabled) [list $menu $index]
- }
- if {!$browse} {
- lappend popups(browse_disabled) [list $menu $index]
- }
-
-}
-
-# ------------------------------------------------------------------
-# PUBLIC METHOD: set_variable - Handle changes in the gdb variables
-# changed through the "set" gdb command.
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::set_variable {event} {
- set var [$event get variable]
- set val [$event get value]
- debug "Set hook got called with $var $val"
- switch $var {
- disassembly-flavor {
- disassembly_changed
- }
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: disassembly_changed - The disassembly flavor has changed,
-# mark all the cached assembly windows dirty, and force the
-# visible window to be redisplayed.
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::disassembly_changed {} {
- foreach name [array names Stwc *:pane] {
- debug "Looking at $name"
- set vals [split $name ,]
- if {([string compare [lindex $vals 1] "A"] == 0)
- || ([string compare [lindex $vals 1] "M"] == 0)} {
- debug "Setting $name to dirty"
- set Stwc([lindex $vals 0]:dirty) 1
- }
- }
-
- if {[string compare $current(mode) "SOURCE"] != 0} {
- location $current(tag) $current(filename) $current(funcname) $current(line) \
- $current(addr) $pc(addr) $current(lib)
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: reconfig - used when preferences change
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::reconfig {} {
-# debug
-
- # Make sure we redo the break images when we reconfigure
- set size [font measure [pref get gdb/src/font] "W"]
- makeBreakDot $size [pref get gdb/src/bp_fg] $break_images(bp)
- makeBreakDot $size [pref get gdb/src/temp_bp_fg] $break_images(temp_bp)
- makeBreakDot $size [pref get gdb/src/disabled_fg] $break_images(disabled_bp)
- makeBreakDot $size [pref get gdb/src/trace_fg] $break_images(tp)
- makeBreakDot $size \
- [list [pref get gdb/src/trace_fg] [pref get gdb/src/bp_fg]] \
- $break_images(bp_and_tp)
- makeBreakDot $size [pref get gdb/src/thread_fg] $break_images(thread_bp)
-
- # Tags
- $twin tag configure PC_TAG -background [pref get gdb/src/PC_TAG]
- $twin tag configure STACK_TAG -background [pref get gdb/src/STACK_TAG]
- $twin tag configure BROWSE_TAG -background [pref get gdb/src/BROWSE_TAG]
- switch $current(mode) {
- SOURCE {
- setTabs $twin
- }
- SRC+ASM {
- setTabs $twin
- setTabs $bwin A
- }
- default {
- setTabs $twin A
- }
- }
-
- # Variable Balloons
- if {$ignore_var_balloons} {
- set balloons 0
- } else {
- set balloons [pref get gdb/src/variableBalloons]
- }
- if {$UseVariableBalloons != $balloons} {
- set UseVariableBalloons $balloons
- if {$UseVariableBalloons} {
- $twin tag bind source_tag <Motion> "$this motion var %W %x %y"
- $twin tag bind source_tag <Leave> "$this cancelMotion"
- add_hook gdb_idle_hook [list $this updateBalloon]
- } else {
- cancelMotion
- $twin tag bind source_tag <Motion> {}
- $twin tag bind source_tag <Leave> {}
- $twin tag remove _show_variable 1.0 end
- remove_hook gdb_idle_hook [list $this updateBalloon]
- }
- }
-
- # Tracing Hooks
- catch {remove_hook control_mode_hook "$this set_control_mode"}
- catch {remove_hook gdb_trace_find_hook "$this trace_find_hook"}
- if {$Tracing} {
- add_hook control_mode_hook "$this set_control_mode"
- add_hook gdb_trace_find_hook "$this trace_find_hook"
- }
-
- # Popup colors
-
- # need to rewrite because of the new addPopup function
- # if {$Tracing} {
- # $twin.bmenu entryconfigure 0 -activebackground [pref get gdb/src/trace_fg]
- # } else {
- # $twin.bmenu entryconfigure 0 -activebackground [pref get gdb/src/PC_TAG]
- # $twin.bmenu entryconfigure 1 -activebackground [pref get gdb/src/bp_fg]
- # $twin.bmenu entryconfigure 2 -activebackground \
- # [pref get gdb/src/temp_bp_fg]
- # $twin.bmenu entryconfigure 3 -activebackground \
- # [pref get gdb/src/thread_fg]
- # }
-}
-
-# ------------------------------------------------------------------
-# METHOD: updateBalloon - we have gone idle, update the balloon
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::updateBalloon {} {
-
- set err [catch {$_balloon_var update} changed]
- catch {$_balloon_var name} var
-
- if {!$err} {
- if {$changed != ""} {
- # The variable's value has changed, so update the
- # balloon with its new value
- balloon register $twin "$var=[balloon_value $_balloon_var]" _show_variable
- }
- }
- }
-
-itcl::body SrcTextWin::balloon_value {variable} {
-
- catch {$variable value} value
- set value [string trim $value \ \r\t\n]
-
- # Insert the variable's type for things like ptrs, etc.
- catch {$variable type} type
- if {$value == "{...}"} {
- set val "$type $value"
- } elseif {[regexp -- {0x([0-9a-fA-F]+) <[a-zA-Z_].*} $value str]} {
- set val $str
- } elseif {[string first * $type] != -1} {
- set val "($type) $value"
- } elseif {[string first \[ $type] != -1} {
- set val "$type"
- } else {
- set val "$value"
- }
-
- return $val
-}
-
-# ------------------------------------------------------------------
-# METHOD: ClearTags - clear all tags
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::ClearTags {} {
- foreach tag {PC_TAG BROWSE_TAG STACK_TAG} {
- catch {
- $twin tag remove $tag $current(line).2 $current(line).end
- $twin tag remove $tag $pc(line).2 $pc(line).end
- $twin tag remove $tag $current(asm_line).2 $current(asm_line).end
- if {$bwin != ""} {
- $bwin tag remove $tag $current(asm_line).2 $current(asm_line).end
- }
- }
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: _mtime_changed - check if the modtime for a file
-# has changed.
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::_mtime_changed {filename} {
- global tcl_platform
-
- if [catch {gdb_find_file $filename} f] {
- set r 1
- } elseif {$f == ""} {
- set r 1
- } else {
- if {[string compare $tcl_platform(platform) "windows"] == 0} {
- set f [ide_cygwin_path to_win32 $f]
- }
- if {[catch {file mtime $f} mtime]} {
- debug "Could not stat file \"$f\" - \"$mtime\""
- # The return code is not of much significance in this case
- return 1
- }
- if {![info exists Stwc($filename:mtime)]} {
- debug "no mtime. resetting to zero"
- set Stwc($filename:mtime) 0
- }
- # debug "Stwc($filename:mtime)=$Stwc($filename:mtime); mtime=$mtime"
-
- if {$mtime == $Stwc($filename:mtime)} {
- set r 0
- } else {
- set r 1
- set Stwc($filename:mtime) $mtime
- set Stwc($filename:dirty) 1
- }
- }
-
- return $r
-}
-
-# ------------------------------------------------------------------
-# METHOD: FillSource - fill a window with source
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::FillSource {w tagname filename funcname line addr pc_addr lib} {
- global gdb_running
- upvar ${w}win win
-
-# debug "$gdb_running $tagname line=$line pc(line)=$pc(line)"
-# debug "current(filename)=$current(filename) filename=$filename"
-
- if {$filename != ""} {
- # load new file if necessary
- set mtime [_mtime_changed $filename]
- if {[string compare $filename $current(filename)] != 0 \
- || $mode_changed || $mtime} {
- if {![LoadFile $w $filename $lib $mtime]} {
- # failed to find source file
- dbug W "Changing to ASSEMBLY"
-
- # We have to update this data here (it is also done by the caller)
- # because we want to call mode, which calls mode_set, which calls
- # location using these values.
- set current(line) $line
- set current(tag) $tagname
- set current(addr) $addr
- set current(funcname) $funcname
- set current(filename) $filename
- set current(lib) $lib
-
- set oldmode SOURCE
- $parent mode "" ASSEMBLY
- return
- }
- if {$current(mode) != "SRC+ASM"} {
- # reset this flag in FillAssembly for SRC+ASM mode
- set mode_changed 0
- }
- }
-
-# debug "cf=$current(filename) pc=$pc(filename) filename=$filename"
- if {$current(filename) != ""} {
- if {$gdb_running && $pc(filename) == $filename} {
- # set the PC tag in this file
- $win tag add PC_TAG $pc(line).2 $pc(line).end
- }
- if {$tagname != "PC_TAG"} {
- if {$gdb_running && ($pc(filename) == $filename) \
- && ($pc(line) == $line)} {
- # if the tag is on the same line as the PC, set a PC tag
- $win tag add PC_TAG $line.2 $line.end
- } else {
- $win tag add $tagname $line.2 $line.end
- }
- }
- if {$pc(filename) == $filename && $line == 0} {
- # no line specified, so show line with PC
- display_line $win $pc(line)
- } else {
- display_line $win $line
- }
- }
- return
- }
- # no source; switch to assembly
- dbug W "no source file; switch to assembly"
-
- # We have to update this data here (it is also done by the caller)
- # because we want to call mode, which calls mode_set, which calls
- # location using these values.
- set current(line) $line
- set current(tag) $tagname
- set current(addr) $addr
- set current(funcname) $funcname
- set current(filename) $filename
- set current(lib) $lib
-
- set oldmode $current(mode)
- $parent mode "" ASSEMBLY
-}
-
-# ------------------------------------------------------------------
-# METHOD: FillAssembly - fill a window with disassembled code
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::FillAssembly {w tagname filename funcname line addr pc_addr lib} {
- global gdb_running
- upvar ${w}win win
- upvar _${w}pane pane
-# debug "$win $tagname $filename $funcname $line $addr $pc_addr"
-# debug "mode_changed=$mode_changed"
-# debug "funcname=$funcname"
-# debug "current(funcname)=$current(funcname)"
- if {$funcname == ""} {
- set oldpane $pane
- set pane $Stwc(gdbtk_scratch_widget:pane)
- set win [[$itk_interior.p childsite $pane].st component text]
- $win delete 0.0 end
- $win insert 0.0 "Select function name to disassemble"
- if {$oldpane != "" && $oldpane != $pane} {
- $itk_interior.p replace $oldpane $pane
- } else {
- $itk_interior.p show $pane
- }
- return
- } elseif {$funcname != $current(funcname) || $mode_changed
- || ([info exists Stwc($addr:dirty)] && $Stwc($addr:dirty))} {
- set mode_changed 0
- set oldpane $pane
- set result [LoadFromCache $w $addr A $lib]
- if {$result == 1} {
- #debug "Disassembling at $addr"
- #debug "cf=$current(filename) name=$filename"
- if {[catch {gdb_load_disassembly $win nosource \
- [scope _map] $Cname $addr} mess]} {
- # print some intelligent error message?
- dbug E "Disassemble failed: $mess"
- UnLoadFromCache $w $oldpane $addr A $lib
- set pane $Stwc(gdbtk_scratch_widget:pane)
- set win [[$itk_interior.p childsite $pane].st component text]
- $win delete 0.0 end
- $win insert 0.0 "$mess"
- if {$oldpane != "" && $oldpane != $pane} {
- $itk_interior.p replace $oldpane $pane
- } else {
- $itk_interior.p show $pane
- }
- } else {
- debug "address range is $mess"
- }
- } elseif {$result == 0} {
- debug "LoadFromCache returned 0"
- } else {
- # This branch should not ever happen. In assembly mode, there
- # are no checks in LoadFromCache that can fail.
- debug "LoadFromCache returned -1"
- }
- set current(filename) $filename
- set do_display_breaks 1
- }
-
- # highlight proper line number
- _highlightAsmLine $win $addr $pc_addr $tagname $filename $funcname
-
- display_line $win $current(asm_line)
-}
-
-
-# ------------------------------------------------------------------
-# METHOD: FillMixed - fill a window with mixed source and assembly
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::FillMixed {w tagname filename funcname line addr pc_addr lib} {
- global gdb_running
- upvar ${w}win win
- upvar _${w}pane pane
-# debug "$win $tagname $filename $funcname $line $addr $pc_addr"
-
- if {$funcname == ""} {
- set oldpane $pane
- set pane $Stwc(gdbtk_scratch_widget:pane)
- set win [[$itk_interior.p childsite $pane].st component text]
- $win delete 0.0 end
- $win insert 0.0 "Select function name to disassemble"
- if {$oldpane != ""} {
- $itk_interior.p replace $oldpane $pane
- } else {
- $itk_interior.p show $pane
- }
- } elseif {$funcname != $current(funcname) || $mode_changed
- || ([info exists Stwc($funcname:dirty)] && $Stwc($funcname:dirty))} {
- set mode_changed 0
- set oldpane $pane
- if {[LoadFromCache $w $funcname M $lib]} {
- # debug "Disassembling at $addr"
- if {[catch {gdb_load_disassembly $win source \
- [scope _map] $Cname $addr} mess] } {
- # print some intelligent error message
- dbug W "Disassemble Failed: $mess"
- UnLoadFromCache $w $oldpane $funcname M $lib
- set current(line) $line
- set current(tag) $tagname
- set current(addr) $addr
- set current(funcname) $funcname
- set current(filename) $filename
- set current(lib) $lib
- set oldmode MIXED
- $parent mode "" ASSEMBLY
- return
- } else {
- debug "address range is $mess"
- }
- }
- set current(filename) $filename
- # now set the breakpoints
- set do_display_breaks 1
- }
-
- # highlight proper line number
- _highlightAsmLine $win $addr $pc_addr $tagname $filename $funcname
- display_line $win $current(asm_line)
-}
-
-# ------------------------------------------------------------------
-# METHOD: _highlightAsmLine - highlight the current execution line
-# in one of the assembly modes
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::_highlightAsmLine {win addr pc_addr \
- tagname filename funcname} {
- global gdb_running
-
- # Some architectures allow multiple instructions in each asm source
- # line...
- if {[info exists _map($Cname,pc=$addr)]} {
- set current(asm_line) $_map($Cname,pc=$addr)
- } else {
- set x [gdb_incr_addr $current(addr) -2]
- if {[info exists _map($Cname,pc=$x)]} {
- set current(asm_line) $_map($Cname,pc=$x)
- }
- }
-
- # if current file has PC, highlight that too
- if {$gdb_running && $tagname != "PC_TAG" && $pc(filename) == $filename
- && $pc(func) == $funcname} {
- set pc(asm_line) $_map($Cname,pc=$pc_addr)
- $win tag add PC_TAG $pc(asm_line).2 $pc(asm_line).end
- }
-
- # don't set browse tag if it is at PC
- if {$pc_addr != $addr || $tagname == "PC_TAG"} {
- # HACK. In STACK mode we usually want the previous instruction
- # but not when we are browsing a trace experiment.
- if {[string compare $tagname "STACK_TAG"] == 0 && !$Browsing} {
- incr current(asm_line) -1
- }
- $win tag add $tagname $current(asm_line).2 $current(asm_line).end
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: set_tag - update tag to STACK without making other changes
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::set_tag_to_stack {} {
- foreach window [list $twin $bwin] {
- if {$window == ""} then {
- continue
- }
- foreach {start end} [$window tag ranges PC_TAG] {
- $window tag remove PC_TAG $start $end
- $window tag add STACK_TAG $start $end
- }
- }
- set current(tag) STACK_TAG
-}
-
-# ------------------------------------------------------------------
-# METHOD: location - display a location in a file
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::location {tagname filename funcname line addr pc_addr lib} {
-# debug "$tagname $filename $line $addr $pc_addr, mode=$current(mode) oldmode=$oldmode cf=$current(filename) lib=$lib"
-
- ClearTags
-
- # It seems odd to do this as a string compare, but on the Alpha,
- # where ints are 32 bit but addresses are 64, a numerical compare
- # will overflow Tcl's ints.
-
- if {$tagname == "PC_TAG" && [string compare $addr $pc_addr] == 0} {
- set pc(filename) $filename
- set pc(line) $line
- set pc(addr) $addr
- set pc(func) $funcname
- set pc(lib) $lib
- }
-
- if {$oldmode != "" \
- && [string compare $filename $current(filename)] != 0} {
-
- if [catch {gdb_find_file $filename} fullname] {
- dbug W "$filename: $fullname"
- set fullname ""
- }
-
- if {$fullname != ""} {
- set tmp $oldmode
- set oldmode ""
- $parent mode "" $tmp 0
- }
- }
-
- set oldpane $_tpane
-
- switch $current(mode) {
- SOURCE {
- FillSource t $tagname $filename $funcname $line $addr $pc_addr $lib
- }
- ASSEMBLY {
- FillAssembly t $tagname $filename $funcname $line $addr $pc_addr $lib
- }
- MIXED {
- FillMixed t $tagname $filename $funcname $line $addr $pc_addr $lib
- }
- SRC+ASM {
- FillSource t $tagname $filename $funcname $line $addr $pc_addr $lib
- # This may seem redundant, but it is NOT. FillSource can change
- # the mode from SOURCE to ASSEMBLY if sources were not found. If
- # this happens, then MIXED mode is pointless, so forget the bottom
- # pane.
- if {$current(mode) == "SRC+ASM"} {
- FillAssembly b $tagname $filename $funcname $line $addr $pc_addr $lib
- }
- }
- }
-
- # After switching panes, clear the previous pane's cursor so that it isn't
- # used as the default when no other cursors are set.
- if { "$oldpane" != "$_tpane" } {
- $twin configure -cursor ""
- }
-
- set current(line) $line
- set current(tag) $tagname
- set current(addr) $addr
- set current(funcname) $funcname
- set current(filename) $filename
- set current(lib) $lib
- if {$do_display_breaks} {
- display_breaks
- set do_display_breaks 0
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: LoadFile - loads in a new source file
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::LoadFile {w name lib mtime_changed} {
- debug "$name $current(filename) $current(mode)"
- upvar ${w}win win
- upvar _${w}pane pane
-
- set oldpane $pane
- set result [LoadFromCache $w $name "S" $lib]
- if {$result == -1} {
- # This is a source file we could not find the source for...
- return 0
- } elseif {$result == 1 || $mtime_changed} {
- $win delete 0.0 end
- debug "READING $name"
- if {[catch {gdb_loadfile $win $name $Linenums} msg]} {
- dbug W "Error opening $name: $msg"
- #if {$msg != ""} {
- # tk_messageBox -icon error -title "GDB" -type ok \
- # -modal task -message $msg
- #}
- UnLoadFromCache $w $oldpane $name "" $lib
- return 0
- }
- }
- set current(filename) $name
- # Display all breaks/traces
- set do_display_breaks 1
- return 1
-}
-
-# ------------------------------------------------------------------
-# METHOD: display_line - make sure a line is displayed and near the center
-# ------------------------------------------------------------------
-
-itcl::body SrcTextWin::display_line { win line } {
- ::update idletasks
- # keep line near center of display
- set pixHeight [winfo height $win]
- set topLine [lindex [split [$win index @0,0] .] 0]
- set botLine [lindex [split [$win index @0,${pixHeight}] .] 0]
- set margin [expr {int(0.2*($botLine - $topLine))}]
- if {$line < [expr {$topLine + $margin}]} {
- set num [expr {($topLine - $botLine) / 2}]
- } elseif {$line > [expr {$botLine - $margin}]} {
- set num [expr {($botLine - $topLine) / 2}]
- } else {
- set num 0
- }
- $win yview scroll $num units
- $win see $line.0
-}
-
-# ------------------------------------------------------------------
-# METHOD: display_breaks - insert all breakpoints and tracepoints
-# uses current(filename) in SOURCE mode
-# ------------------------------------------------------------------
-
-itcl::body SrcTextWin::display_breaks {} {
-# debug
-
- # clear any previous breakpoints
- foreach type "$bp_types tp" {
- foreach {start stop} [$twin tag ranges ${type}_tag] {
- scan $start "%d." linenum
- removeBreakTag $twin $linenum ${type}_tag
- }
- }
-
- # now do second pane if it exists
- if {[info exists bwin]} {
- foreach type "$bp_types tp" {
- foreach {start stop} [$twin tag ranges ${type}_tag] {
- scan $start "%d." linenum
- removeBreakTag $twin $linenum ${type}_tag
- }
- }
- }
-
- # Display any existing breakpoints.
- foreach bpnum [gdb_get_breakpoint_list] {
- set info [gdb_get_breakpoint_info $bpnum]
- set addr [lindex $info 3]
- set line [lindex $info 2]
- set file [lindex $info 0]
- set type [lindex $info 6]
- set enabled [lindex $info 5]
- bp create $bpnum $addr $line $file $type $enabled
- }
- # Display any existing tracepoints.
- foreach bpnum [gdb_get_tracepoint_list] {
- set info [gdb_get_tracepoint_info $bpnum]
- set addr [lindex $info 3]
- set line [lindex $info 2]
- set file [lindex $info 0]
- bp create $bpnum $addr $line $file tracepoint
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: insertBreakTag - insert the right amount of tag chars
-# into the text window WIN, at line linenum.
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::insertBreakTag {win linenum tag} {
-# debug "$win $linenum $tag"
-
- # Get the tags at the current line.
-
- # If there is a "break_rgn_tag", then there are currently no other
- # break/trace points at this line. So replace the break_rgn_tag
- # with this tag. Otherwise, add the new tag, and then the joint
- # tag. We will query the length of the previous tag, so we don't have
- # to hard code it here.
-
- set tag_list [$win tag names $linenum.0]
- set img_name [string range $tag 0 [expr [string length $tag] - 5]]
-
- if {[lsearch $tag_list break_rgn_tag] != -1} {
- set stop [lindex [$win tag nextrange break_rgn_tag \
- $linenum.0 "$linenum.0 lineend"] 1]
- $win tag remove break_rgn_tag $linenum.0 "$linenum.0 lineend"
- $win delete $linenum.0
-
- # Strip the "_tag" off the end of the tag to get the image name.
- $win image create $linenum.0 -image $break_images($img_name)
- $win tag add $tag $linenum.0 $stop
- } else {
- set other_tag [lindex $tag_list \
- [lsearch -glob $tag_list {*[bt]p_tag}]]
- if {$other_tag == ""} {
- set stop 4
- } else {
- set stop [lindex [$win tag nextrange $other_tag \
- $linenum.0 "$linenum.0 lineend"] 1]
- }
-
- $win tag add $tag $linenum.0 $stop
- $win image configure $linenum.0 -image $break_images($img_name)
-
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: removeBreakTag - remove a break tag (breakpoint or tracepoint)
-# from the given line. If this is the last break tag on the
-# line reinstall the break_rgn_tag
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::removeBreakTag {win linenum tag } {
-# debug "$win $linenum $tag"
-
- set tag_list [$win tag names $linenum.0]
-
- if {[set pos [lsearch -exact $tag_list $tag]] == -1} {
- debug "Tried to remove non-existant tag $tag"
- return
- } else {
- set tag_list [lreplace $tag_list $pos $pos]
- }
-
- # Use the range of the removed tag for any insertions, so we don't
- # have to hard code it here.
-
- set stop [lindex [$win tag nextrange $tag \
- $linenum.0 "$linenum.0 lineend"] 1]
-
- $win tag remove $tag $linenum.0 "$linenum.0 lineend"
-
- # Now check what other tags are on this line. If there are both bp & tp
- # tags, also remove the joint tag, otherwise install the break_rgn_tag.
-
- switch -glob $tag {
- *bp_tag {
- set only_one_tag [expr [set next_tag_index \
- [lsearch -glob $tag_list tp_tag]] == -1]
- }
- tp_tag {
- # Got to find out what kind of tag is here...
- set only_one_tag [expr [set next_tag_index \
- [lsearch -glob $tag_list *bp_tag]] == -1]
- }
- }
-
- if {$only_one_tag} {
- catch {$win image configure $linenum.0 -image {}}
- $win delete $linenum.0
- $win insert $linenum.0 "-"
- $win tag add break_rgn_tag $linenum.0 $stop
- } else {
- set other_tag [lindex $tag_list $next_tag_index]
- set img_name [string range $other_tag 0 \
- [expr [string length $other_tag] - 5]]
- $win image configure $linenum.0 -image $break_images($img_name)
- $win tag remove bp_and_tp_tag $linenum.0 "$linenum.0 lineend"
- }
-}
-
-# ------------------------------------------------------------------
-# PUBLIC METHOD: breakpoint - Handle a breakpoint create, delete,
-# or modify event from the backend.
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::breakpoint {bp_event} {
-
- bp [$bp_event get action] [$bp_event get number] [$bp_event get address] \
- [$bp_event get line] [$bp_event get file] [$bp_event get disposition] \
- [$bp_event get enabled] [$bp_event get thread]
-}
-
-# ------------------------------------------------------------------
-# PUBLIC METHOD: tracepoint - Handle a tracepoint create, delete,
-# modify event from the backend.
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::tracepoint {tp_event} {
-
- bp [$tp_event get action] [$tp_event get number] [$tp_event get address] \
- [$tp_event get line] [$tp_event get file] tracepoint \
- [$tp_event get pass_count]
-}
-
-# ------------------------------------------------------------------
-# METHOD: bp - set and remove breakpoints
-#
-# if $addr is valid, the breakpoint will be set in the assembly or
-# mixed window at that address. If $line and $file are valid,
-# a breakpoint will be set in the source window if appropriate.
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::bp {action bpnum addr {linenum {}} {file {}} {type 0} {enabled 0} {thread -1}} {
-# debug "$action addr=$addr line=$linenum file=$file type=$type current(filename)=$current(filename)"
-
- switch $current(mode) {
- SOURCE {
- if {[string compare $file $current(filename)] == 0 && $linenum != {}} {
- do_bp $twin $action $linenum $type $bpnum $enabled $thread 0
- }
- }
-
- SRC+ASM {
- if {$addr != {} && [info exists _map($Cname,pc=$addr)]} {
- do_bp $bwin $action $_map($Cname,pc=$addr) $type $bpnum \
- $enabled $thread 1
- }
- if {[string compare $file $current(filename)] == 0 && $linenum != {}} {
- do_bp $twin $action $linenum $type $bpnum $enabled $thread 0
- }
- }
-
- ASSEMBLY {
- if {$addr != {} &&[info exists _map($Cname,pc=$addr)]} {
- do_bp $twin $action $_map($Cname,pc=$addr) $type $bpnum \
- $enabled $thread 1
- }
- }
-
- MIXED {
- if {$addr != {} && [info exists _map($Cname,pc=$addr)]} {
- do_bp $twin $action $_map($Cname,pc=$addr) $type $bpnum \
- $enabled $thread 1
- }
- }
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: do_bp - bp helper function
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::do_bp { win action linenum type bpnum enabled thread asm} {
-# debug "$action line=$linenum type=$type bpnum=$bpnum enabled=$enabled thread=$thread"
-
- if {$dont_change_appearance} {
- return
- }
-
- if {$action == "delete" && [string compare $type tracepoint] != 0} {
- # make sure there are no more breakpoints on
- # this line.
- if {!$asm} {
- set bps [gdb_find_bp_at_line $current(filename) $linenum]
- } else {
- if {[info exists _map($Cname,line=$linenum)]} {
- set bps [gdb_find_bp_at_addr $_map($Cname,line=$linenum)]
- } else {
- set bps {}
- }
- }
- if {[llength $bps] > 0} {
- foreach b $bps {
- if {$b != $bpnum} {
- # OK we found another BP on this line.
- # So we really just want to modify whats
- # displayed on the line instead of deleting it.
- # Also, for lack of a better solution, we will
- # just display an image corresponding to the
- # first found BP. If you have a temporary and
- # a perm BP on the same line, the image for the one
- # with the lower bpnum will be displayed.
- set inf [gdb_get_breakpoint_info $b]
- set action "modify"
- set type [lindex $inf 6]
- set bpnum $b
- break
- }
- }
- }
- }
-
- if {[string compare $type "tracepoint"] == 0} {
- if {[string compare $action "delete"] != 0
- && [lindex [gdb_get_tracepoint_info $bpnum] 4] == 0} {
- set type disabled_tracepoint
- }
- } else {
- if {$enabled == "0" } {
- set type disabled_bp
- } elseif {$thread != "-1"} {
- set type thread
- }
- }
-
- switch $type {
- donttouch {
- set tag_type bp_tag
- set remove_type disabled_bp_tag
- }
- delete {
- set tag_type temp_bp_tag
- }
- disabled_bp {
- set tag_type disabled_bp_tag
- set remove_type bp_tag
- }
- tracepoint {
- set tag_type tp_tag
- set remove_type disabled_tp_tag
- }
- disabled_tracepoint {
- set tag_type disabled_tp_tag
- set remove_type tp_tag
- }
- thread {
- set tag_type thread_bp_tag
- }
- default {
- dbug E "UNKNOWN BP TYPE action=\"$action\" type=\"$type\""
- $win insert $linenum.0 "X" bp_tag
- set tag_type bp_tag
- }
- }
-
- if {[string compare $action "delete"] == 0} {
- removeBreakTag $win $linenum $tag_type
- } else {
- if {[string compare $action "modify"] == 0 && $remove_type != ""} {
- removeBreakTag $win $linenum $remove_type
- }
- insertBreakTag $win $linenum $tag_type
- }
-}
-
-
-# ------------------------------------------------------------------
-# METHOD: hasBP - see if a line number has a breakpoint set
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::hasBP {win line} {
- if {$win == ""} {
- set win $popups(saved_win)
- }
-
- if {[lsearch -glob [$win tag names $line.0] *bp_tag] >= 0} {
- return 1
- }
- return 0
-}
-
-# ------------------------------------------------------------------
-# METHOD: hasTP - see if a line number has a tracepoint set
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::hasTP {win line} {
- if {$win == ""} {
- set win $popups(saved_win)
- }
-
- if {[lsearch -exact [$win tag names $line.0] tp_tag] == 1} {
- return 1
- }
- return 0
-}
-
-# ------------------------------------------------------------------
-# METHOD: report_source_location
-#
-# This function reports the "current" location in the source
-# window, where current means what gdb_loc would return, if
-# that point is actually visible in the window, or the middle
-# of the current window, if that point is not visible.
-#
-# Return:
-# The gdb_loc result for the location found
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::report_source_location {} {
-
- if {$current(filename) == ""} {
- error "No source file in window"
- }
-
- # Figure out if the return from gdb_loc is visible.
-
- set not_visible 1
- if {![catch {gdb_loc} loc_info]} {
- set loc_long_name [lindex $loc_info 2]
- set loc_line [lindex $loc_info 3]
-# debug "Got loc_info: \"$loc_info\" and filename $current(filename) long_name: $loc_long_name"
- if {[string compare $current(filename) $loc_long_name] != 0} {
- set not_visible 1
- } else {
- foreach {name line} [lookup_line $twin 1] {
- break
- }
- if {$line < $loc_line} {
- foreach {name line} [lookup_line $twin [winfo height $twin]] {
- break
- }
- if {$line > $loc_line} {
- set not_visible 0
- }
- }
- }
- } else {
- debug "gdb_loc returned $loc_info"
- }
-
- if {$not_visible} {
- set y [expr int([winfo height $twin] / 2)]
- foreach {name line addr type} [lookup_line $twin $y] {
- break
- }
- switch $type {
- src {
- return [gdb_loc $name:$addr]
- }
- asm {
- return [gdb_loc *$addr]
- }
- }
- } else {
- return $loc_info
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: lookup_line - translated win & y position line info
-#
-# If win is {}, or y is -1, then the saved values from the popup
-# array are used.
-#
-# Return:
-# name - the fileName
-# line - the line number in the text widget
-# addr - the source line number, if in source mode, the
-# address if in assembly mode, and if in mixed mode,
-# the line if it is a source line, or the address if it
-# is an assembly line
-# type - src if it is a source line, asm if an assembly line.
-# set_cmd - for convenience, this is the command needed to set a
-# breakpoint at this address.
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::lookup_line {win y} {
- #debug "$win $y"
- if {$y == -1} {
- set y $popups(saved_y)
- }
-
- if {$win == {}} {
- set win $popups(saved_win)
- }
-
- scan [$win index @0,$y] "%d." line
- set name [lindex [::file split $current(filename)] end]
-
- # If we are in the SOURCE window (either because the mode is SOURCE,
- # or SRC+ASM, and we are in the upper pane, then return the
- if {([string compare $current(mode) SOURCE] == 0)
- || ([string compare $current(mode) SRC+ASM] == 0
- && [string compare $win $twin] == 0)} {
- set addr $line
- set type "src"
- } else {
- if {[info exists _map($Cname,line=$line)]} {
- set addr $_map($Cname,line=$line)
- set type "asm"
- } else {
- # This is a source line in MIXED mode
- set line_contents [$win get $line.0 "$line.0 lineend"]
- #debug "Looking at line: $line contents: \"$line_contents\""
- regexp "^\t(\[0-9\]*)" $line_contents match srcline
- set addr $srcline
- set type "src"
- }
- }
-
- switch $type {
- asm {
- set set_cmd [list gdb_set_bp_addr $addr]
- }
- src {
- set set_cmd [list gdb_set_bp $current(filename) $addr]
- }
- }
-
- #debug "Lookup line returning [list $name $line $addr $type $set_cmd]"
- return [list $name $line $addr $type $set_cmd]
-}
-
-# ------------------------------------------------------------------
-# METHOD: continue_to_here - Advance to the line pointed to by the
-# y coordinate in the window win. If win is {} or y is -1, the values
-# saved in the popups array are used.
-#
-# The threads parameter is not currently used.
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::continue_to_here {{win {}} {y -1} {threads -1}} {
-
- # Look up the line... This foreach is an lassign...
- foreach {name line addr type set_cmd} [lookup_line $win $y] {
- break
- }
-
- set dont_change_appearance 1
- foreach i [gdb_get_breakpoint_list] {
- set enabled($i) [lindex [gdb_get_breakpoint_info $i] 5]
- }
- gdb_cmd "disable"
- eval $set_cmd temp $threads
- gdb_immediate "continue"
- gdb_cmd "enable"
- foreach i [gdb_get_breakpoint_list] {
- if {![info exists enabled($i)]} {
- gdb_cmd "delete $i"
- } elseif {!$enabled($i)} {
- gdb_cmd "disable $i"
- }
- }
- set dont_change_appearance 0
-}
-
-# ------------------------------------------------------------------
-# METHOD: jump_to_here - Advance to the line pointed to by the
-# y coordinate in the window win. If win is {} or y is -1, the values
-# saved in the popups array are used.
-#
-# The threads parameter is not currently used.
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::jump_to_here {{win {}} {y -1} {threads -1}} {
-
- # Look up the line... This foreach is an lassign...
- foreach {name line addr type set_cmd} [lookup_line $win $y] {
- break
- }
-
- # Unfortunately we cant set the pc to a linespec and we have to do a
- # trick with a temporary breakpoint and the jump command.
- # FIXME: Get the address from the linespec.
- # FIXME: Even in the case we do have an address, I was not able to just
- # change the PC and get things updated wright. While I work on that,
- # I will use the temp breakpoint and jump trick for that case as well.
-
- set dont_change_appearance 1
-
- foreach i [gdb_get_breakpoint_list] {
- set enabled($i) [lindex [gdb_get_breakpoint_info $i] 5]
- }
- gdb_cmd "disable"
-
- if {$type == "asm"} {
- gdb_immediate "tbreak *$addr"
- gdb_immediate "jump *$addr"
- } else {
- eval $set_cmd temp $threads
- gdb_immediate "jump $name:$line"
- }
- gdb_cmd "enable"
- foreach i [gdb_get_breakpoint_list] {
- if {![info exists enabled($i)]} {
- gdb_cmd "delete $i"
- } elseif {!$enabled($i)} {
- gdb_cmd "disable $i"
- }
- }
- set dont_change_appearance 0
-}
-
-# ------------------------------------------------------------------
-# METHOD: set_bp_at_line - called when an empty break tag is clicked on
-#
-# When "threads" is set it means to set a bp on each thread in the list.
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::set_bp_at_line {{type N} {win {}} {y -1} {threads "-1"}} {
-# debug "$win $y $type $current(filename) Tracing=$Tracing"
- if {$Running} {return}
-
- # Look up the line... This foreach is an lassign...
-
- foreach {name line addr addr_type set_cmd} [lookup_line $win $y] {
- break
- }
-
- foreach th $threads {
- switch $type {
- N {
- if {[catch {eval $set_cmd normal $th} msg]} {
- dbug W $msg
- }
- }
- T {
- if {[catch {eval $set_cmd temp $th} msg]} {
- dbug W $msg
- }
- }
- }
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: enable_disable_at_line - Enable or disable breakpoint
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::enable_disable_at_line {action} {
- if {$Running} {
- return
- }
-
- # FIXME: should this work on $bwin as well? In that case we'd need
- # a `win' argument...
-
- set y $popups(saved_y)
-
- $twin tag remove _show_variable 1.0 end
- set line [lindex [split [$twin index @0,$y] .] 0]
- set bps ""
-
- switch $current(mode) {
- SRC+ASM {
- }
- ASSEMBLY {
- if {[info exists _map($Cname,line=$line)]} {
- set addr $_map($Cname,line=$line)
- set bps [gdb_find_bp_at_addr $addr]
- } else {
- return
- }
- }
- MIXED {
- if {[info exists _map($Cname,line=$line)]} {
- set addr $_map($Cname,line=$line)
- set bps [gdb_find_bp_at_addr $addr]
- } else {
- return
- }
- }
- }
-
- if {$bps == ""} {
- set bps [gdb_find_bp_at_line $current(filename) $line]
- }
-
- # ACTION is `enable' or `disable'
- gdb_cmd "$action $bps"
-}
-
-# ------------------------------------------------------------------
-# METHOD: remove_bp_at_line - called when a bp tag is clicked on
-#
-# when "threads" is set it means to set a bp on each thread in the list.
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::remove_bp_at_line {{win {}} {y -1}} {
-
- if {$Running} {return}
-
- # Look up the line... This foreach is an lassign...
-
- foreach {name line addr type} [lookup_line $win $y] {
- break
- }
-
- # FIXME: if there are multiple bp/tp at a single line,
- # we will (right now) always take the first one we find...
- switch $type {
- src { set bps [gdb_find_bp_at_line $name $addr] }
- asm { set bps [gdb_find_bp_at_addr $addr] }
- }
-
- set number [lindex $bps 0]
- gdb_cmd "delete $number"
-}
-
-
-# ------------------------------------------------------------------
-# METHOD: set_tp_at_line - called when an empty break region tag is clicked on
-#
-# when "threads" is set it means to set a bp on each thread in the list.
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::set_tp_at_line {{win {}} {y -1}} {
-# debug "$win $y $current(filename) Tracing=$Tracing"
-
- if {$Running} {return}
-
- # Look up the line... This foreach is an lassign...
-
- foreach {name line addr type} [lookup_line $win $y] {
- break
- }
-
- switch $type {
- src {
- after idle [list ManagedWin::open TraceDlg -File $name -Lines $addr]
- }
- asm {
- after idle [list ManagedWin::open TraceDlg -File $name -Addresses [list $addr]]
- }
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: next_hit_at_line - Finds the next trace hit at the line
-# given by win & y...
-#
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::next_hit_at_line {{win {}} {y -1}} {
-# debug "$win $y $current(filename) Tracing=$Tracing"
-
- if {!$Browsing} {return}
-
- # Look up the line... This foreach is an lassign...
-
- foreach {name line addr type} [lookup_line $win $y] {
- break
- }
-
- # If the line and the addr are the same, then the specification was
- # given by line. Otherwise is was a memory address.
-
- switch $type {
- src {
- tfind_cmd "tfind line $name:$addr"
- }
- asm {
- tfind_cmd "tfind line *$addr"
- }
- }
-
-}
-
-# ------------------------------------------------------------------
-# METHOD: remove_tp_at_line - called when a tp tag is clicked on
-#
-# when "threads" is set it means to set a bp on each thread in the list.
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::remove_tp_at_line {{win {}} {y -1}} {
-
- if {$Running} {return}
-
- # Look up the line... This foreach is an lassign...
-
- foreach {name line addr type} [lookup_line $win $y] {
- break
- }
- switch $type {
- src {
- set tp_num [gdb_tracepoint_exists $name:$addr]
- }
- asm {
- set tp_num [gdb_tracepoint_exists *$addr]
- }
- }
-
- if {$tp_num != -1} {
- if {[catch {gdb_cmd "delete tracepoints $tp_num"} errTxt]} {
- tk_messageBox -type error -message "Could not delete tracepoint number $tp_num
-Error was: $errTxt"
- }
- }
-
-}
-
-# ------------------------------------------------------------------
-# METHOD: do_tag_popup - The tag bind function for breakpoint popups
-# ------------------------------------------------------------------
-
-itcl::body SrcTextWin::do_tag_popup {name X Y y} {
-
-# debug "$name $X $Y $y"
-
- if {$Running || [winfo ismapped $popups($name)]} {
- return
- }
-
- set popups(saved_y) $y
- set popups(saved_win) [winfo containing -displayof $itk_interior $X $Y]
-
- # Hide variable balloons before showing the popup
- $twin tag remove _show_variable 1.0 end
- balloon withdraw $twin
-
- tk_popup $popups($name) $X $Y
-
-}
-
-# ------------------------------------------------------------------
-# METHOD: do_source_popup - tag bind function for source popups
-# ------------------------------------------------------------------
-
-itcl::body SrcTextWin::do_source_popup { X Y x y } {
- if {$Running || [winfo ismapped $popups(source)]} {
- return
- }
-
- # Figure out what window we are over...
- set win [winfo containing -displayof $itk_interior $X $Y]
-
- # Hide variable balloons before showing the popup
- $win tag remove _show_variable 1.0 end
- balloon withdraw $win
- catch {$_balloon_var delete}
-
-
- # Try to get the selection. If you fail, get the word around the
- # click point.
- # Note that we don't have to worry about the user clicking over the
- # break area, since the break_rgn_tag will override this...
-
- set hit_point [$win index @$x,$y]
- if {([$win tag ranges sel] != "")
- && ([$win compare sel.first < $hit_point]
- && [$win compare $hit_point < sel.last])} {
- set sel_first [$win index sel.first]
- set sel_last [$win index sel.last]
-
- # If there was a selection, see if it spans multiple lines.
- scan $sel_first "%d.%d" range_low sel_start_char
- scan $sel_last "%d.%d" range_high sel_end_char
-
- if {$range_low == $range_high} {
- set range -1
- set target_range [$win get sel.first sel.last]
- } else {
- # If the selection encompasses multiple lines, we only care about
- # the start and ending line numbers
- set range 1
- }
- } else {
- set target_range [$win get "$hit_point wordstart" "$hit_point wordend"]
- set range 0
- }
-
- $popups(source) delete 0 end
-
- if {$range && $Tracing} {
- # If the selection spans more than one line, it can't be a variable name...
- # So just insert the tracepoint range item
- $popups(source) add command -label "Set Tracepoint Range" \
- -command "$this tracepoint_range $win $range_low $range_high"
- $popups(source) add separator
- } elseif {$range != 1} {
- # RANGE = -1 means that we have already found the word we want (it was
- # a selection)...
- # RANGE = 1 means we got the word around the point, and we are just saving
- # getVariable the trouble of parsing it again.
- if {$range == -1} {
- set variable $target_range
- } else {
- set variable [lindex [getVariable -1 -1 $target_range] 0]
- }
-
- if {$variable != ""} {
- # LAME: check to see if VARIABLE is really a number (constants??)
- set is_var [catch {expr {$variable+1}}]
-
- if {$is_var} {
- $popups(source) add command -label "Add $variable to Watch" \
- -command [list $this addToWatch $variable]
- $popups(source) add command -label "Dump Memory at $variable" \
- -command [list ManagedWin::open MemWin -force -addr_exp $variable]
- $popups(source) add command -label "Set Breakpoint at $variable" \
- -command [list gdb_cmd "break $variable"]
- $popups(source) add separator
- }
- }
- }
-
- $popups(source) add command -label "Open Another Source Window" \
- -command {ManagedWin::open SrcWin -force}
- $popups(source) add command -label "Open Source in external editor" \
- -command [code $parent edit]
-
- tk_popup $popups(source) $X $Y
-}
-
-# ------------------------------------------------------------------
-# METHOD: addToWatch - add a variable to the watch window
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::addToWatch {var} {
- [ManagedWin::open WatchWin] add $var
-}
-
-# ------------------------------------------------------------------
-# METHOD: do_key -- wrapper for all key bindings
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::do_key {key} {
- if {!$Running} {
- switch $key {
- print { print $top }
- download { Download::download_it }
- run { $parent inferior run }
- stack { ManagedWin::open StackWin }
- registers { ManagedWin::open RegWin }
- memory { ManagedWin::open MemWin }
- watch { ManagedWin::open WatchWin }
- locals { ManagedWin::open LocalsWin }
- breakpoints { ManagedWin::open BpWin }
- console { ManagedWin::open Console }
- step { $parent inferior step }
- next { $parent inferior next }
- finish { $parent inferior finish }
- continue { $parent inferior continue }
- stepi { $parent inferior stepi }
- nexti { $parent inferior nexti }
- up { catch {gdb_cmd up} }
- down { catch {gdb_cmd down} }
- quit { gdbtk_quit }
- tdump { ManagedWin::open TdumpWin }
- tracepoints { ManagedWin::open BpWin -tracepoints 1}
- tfind_next { catch {gdb_immediate tfind} }
- tfind_prev { catch {gdb_immediate "tfind -"} }
- tfind_start { catch {gdb_immediate "tfind start"} }
- tfind_line { catch {gdb_immediate "tfind line"} }
- tfind_tp { catch {gdb_immediate "tfind tracepoint"} }
- open { catch {_open_file} }
- close { catch {_close_file} }
- browser { catch {ManagedWin::open BrowserWin} }
- thread_list { catch {ManagedWin::open ProcessWin} }
- debug { catch {ManagedWin::open DebugWin} }
- kod { catch {ManagedWin::open KodWin} }
- attach { catch {gdbtk_attach_native} }
- default {
- dbug E "Unknown key binding: \"$key\""
- }
- }
- } else {
-# debug "ignoring keypress -- running"
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: mode_get - get the source mode
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::mode_get {} {
- return $current(mode)
-}
-
-# ------------------------------------------------------------------
-# METHOD: mode_set - change the source mode
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::mode_set {new_mode {go 1}} {
- debug "$new_mode"
-
- if {$new_mode != $current(mode)} {
-
- if {$current(mode) == "SRC+ASM"} {
- if {$_bpane != ""} {$itk_interior.p hide $_bpane}
- set _bpane ""
- set _bwin ""
- }
-
- set current(mode) $new_mode
- set mode_changed 1
-
- if {$go} {
- location $current(tag) $current(filename) $current(funcname) \
- $current(line) $current(addr) $pc(addr) $current(lib)
- }
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: cancelMotion - cancel any pending motion callbacks for
-# the source window's variable balloons
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::cancelMotion {} {
- catch {after cancel $timeoutID}
-}
-
-# ------------------------------------------------------------------
-# METHOD: motion - callback for mouse motion within the source
-# window's text widget
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::motion {type win x y} {
- global gdb_running
- cancelMotion
-
- # The showBalloon method can sometimes raise errors (for instance in
- # assembly code with no sources, and when gdb coughs over a path
- # that contains a space. These functions should error quietly.
- # but write to the debug window so we can trace problems.
-
- if {$type == "var"} {
- set cmd_bit ""
- } else {
- set cmd_bit BP
- }
- set cmd_line [format {
- if {[catch {%s show%sBalloon %s %d %d} err]} {
- debug "show%sBalloon got error: $err"
- }
- } $this $cmd_bit $win $x $y $cmd_bit]
- set timeoutID [after $TimeOut $cmd_line]
-}
-
-
-# ------------------------------------------------------------------
-# METHOD: showBPBalloon - show BP information in a balloon
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::showBPBalloon {win x y} {
- if {$Running} { return }
- $win tag remove _show_variable 1.0 end
- set line [lindex [split [$win index @0,$y] .] 0]
- set bps ""
-
- switch $current(mode) {
- SRC+ASM {
- if {$win == $bwin} {
- if {[info exists _map($Cname,line=$line)]} {
- set addr $_map($Cname,line=$line)
- set bps [gdb_find_bp_at_addr $addr]
- } else {
- return
- }
- }
- }
- ASSEMBLY {
- if {[info exists _map($Cname,line=$line)]} {
- set addr $_map($Cname,line=$line)
- set bps [gdb_find_bp_at_addr $addr]
- } else {
- return
- }
- }
- MIXED {
- if {[info exists _map($Cname,line=$line)]} {
- set addr $_map($Cname,line=$line)
- set bps [gdb_find_bp_at_addr $addr]
- } else {
- return
- }
- }
- }
-
- if {$bps == ""} {
- set bps [gdb_find_bp_at_line $current(filename) $line]
- }
-
- set str ""
- set need_lf 0
- foreach b $bps {
- set bpinfo [gdb_get_breakpoint_info $b]
- lassign $bpinfo file func linenum addr type enabled disposition \
- ignore_count commands cond thread hit_count user_specification
- set file [lindex [file split $file] end]
- if {$enabled} {
- set enabled "ENA"
- } else {
- set enabled "DIS"
- }
-
- if {$need_lf} {append str \n}
-
- append str [format "breakpoint %d at %s:%d (%s)\n %s %s %s" \
- $b $file $linenum $addr $enabled $type $disposition]
-
- if {$thread != "-1"} {
- append str "\n threads: $thread"
- }
-
- if {$ignore_count != 0} {
- append str "\n ignore: $ignore_count"
- }
-
- if {$cond != ""} {
- append str "\n condition: $cond"
- }
-
- if {$commands != ""} {
- if {[string length $commands] > 50} {
- append str "\n commands: [string range $commands 0 50] ..."
- } else {
- append str "\n commands: $commands"
- }
- }
- set need_lf 1
- }
-
- # Scope out which break type is set here, and use the tag to get
- # the break region range...
-
- set tag_list [$win tag names $line.0]
- set break_tag [lindex $tag_list [lsearch -glob $tag_list *bp_tag]]
- set end [lindex [$win tag nextrange $break_tag $line.0 $line.end] 1]
-
- if {$end != ""} {
- $win tag add _show_variable $line.0 $end
- balloon register $win $str _show_variable
- balloon show $win _show_variable 1
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: showBalloon - (possibly) show a variable's value in
-# a balloon-help widget
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::showBalloon {win x y} {
- if {$Running} { return }
-
- $twin tag remove _show_variable 1.0 end
- catch {tmp delete}
-
-
- if {[catch {getVariable $x $y} variable]} {
- return
- }
-
- if {[llength $variable] != 3} {
- return
- }
-
- # We get the variable name, and its start and stop indices in the text
- # widget, so all we need to do is set the tag and register the balloon help
- set varName [lindex $variable 0]
- set start [lindex $variable 1]
- set stop [lindex $variable 2]
-
- # Get the address associated with this line
- foreach {file text_line source_line type} [lookup_line $twin $y] {
- break
- }
-
- # Reduce the areas over which we will show balloons.
- # 1) Only pop up a balloon if we are over the function in
- # the currently selected frame, or in the static data for
- # the file.
- # 2) We would also like to exclude cases where the line that
- # under the mouse cursor does not contain executable code,
- # but we can't since gdb considers continuation lines to not
- # have executible code so we would lose on these...
-
- set cur_fn [lindex [gdb_loc $file:$source_line] 1]
- set selected_frame_fn [lindex [gdb_loc] 1]
-
- if {[string compare $cur_fn $selected_frame_fn] == 0} {
- # Create the variable object
- catch {$_balloon_var delete}
- set err [catch {gdb_variable create -expr $varName} _balloon_var]
- if {!$err} {
- set value [balloon_value $_balloon_var]
- if {$value != ""} {
- $win tag add _show_variable $start $stop
-
- # display variable's value
- balloon register $twin "$varName=$value" _show_variable
- balloon show $win _show_variable
- } else {
- # No value/error. Don't show it.
- catch {$_balloon_var delete}
- set _balloon_var {}
- }
- } else {
- set _balloon_var {}
- }
- } else {
- set _balloon_var {}
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: getVariable - get the name of the 'variable' under the
-# mouse pointer in the text widget
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::getVariable {x y {line {}}} {
- #debug "$x $y $line"
- set hit_point [$twin index @$x,$y]
-
- if {$x != -1 && $y != -1} {
- # If we are over a selection, just report that:
- if {([$twin tag ranges sel] != "")
- && ([$twin compare sel.first < $hit_point]
- && [$twin compare $hit_point < sel.last])} {
- return [list [$twin get sel.first sel.last] [$twin index sel.first] [$twin index sel.last]]
- }
- # Since we will only be concerned with this line, get it
- set line [$twin get "$hit_point linestart" "$hit_point lineend"]
- # debug "new line=$line"
- set simple 0
- } else {
- # This is not quite right -- still want constants to appear...
- set simple 1
- }
-
- # The index into LINE that contains the char at which the pointer hangs
- set a [split [$twin index @$x,$y] .]
- set lineNo [lindex $a 0]
- set index [lindex $a 1]
- set s [string range $line $index end]
- set last {}
- foreach char [split $s {}] {
- if {[regexp -- {([^a-zA-Z0-9_>.-])} $char dummy]} {
- break
- }
- lappend last $char
- }
- set last [string trimright [join $last {}] ->]
-
- # Decrement index for string -- will need to increment it later
- incr index -1
- set tmp [string range $line 0 $index]
- set s {}
- foreach char [split $tmp {}] {
- set s [linsert $s 0 $char]
- }
-
- set first {}
- foreach char $s {
- if {[regexp -- {([^a-zA-Z0-9_>.-])} $char dummy]} {
- break
- }
- set first [linsert $first 0 $char]
- }
- #set first [string trimleft [join $first {}] ->]
- set first [join $first {}]
- #debug "FIRST=$first\nLAST=$last"
-
- # Validate the variable
- set variable [string trim $first$last \ ]
- if {!$simple && ![regexp {^[a-zA-Z_]} $variable dummy]} {
- #debug "Rejecting: $variable"
- return {}
- }
-
- incr index
- # Find the boundaries of this word in the text box
- set a [string length $first]
- set b [string length $last]
-
- # Gag! If there is a breakpoint at a line, this is off by one!
- if {[hasBP $twin $lineNo] || [hasTP $twin $lineNo]} {
- incr a -1
- incr b 1
- }
- set start "$lineNo.[expr {$index - $a}]"
- set end "$lineNo.[expr {$index + $b}]"
- return [list $variable $start $end]
-}
-
-# ------------------------------------------------------------------
-# METHOD: trace_help - update statusbar with ballon help message
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::trace_help {args} {
- upvar #0 ${this}_balloon a
- if {$a == ""} {
- $parent set_status
- } else {
- $parent set_status $a 1
- }
-}
-
-itcl::body SrcTextWin::line_is_executable {win line} {
- # there should be an image or a "-" on the line
- set res [catch {$win image cget $line.0 -image}]
- if {!$res || [$win get $line.0] == "-"} {
- return 1
- }
- return 0
-}
-
-# ------------------------------------------------------------------
-# METHOD: tracepoint_range - create tracepoints at every line in
-# a range of lines on the screen
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::tracepoint_range {win low high} {
-# debug "$win $low $high"
-
- switch $current(mode) {
- SOURCE {
- set lines {}
- for {set i $low} {$i <= $high} {incr i} {
- if {[line_is_executable $win $i]} {
- lappend lines $i
- }
- }
- }
-
- ASSEMBLY {
- set addrs {}
- for {set i $low} {$i <= $high} {incr i} {
- lappend addrs $_map($Cname,line=$i)
- }
- }
-
- MIXED {
- set addrs {}
- for {set i $low} {$i <= $high} {incr i} {
- if {[line_is_executable $win $i]} {
- lappend addrs $_map($Cname,line=$i)
- }
- }
- }
-
- SRC+ASM {
- if {$win == $awin} {
- # Assembly
- set addrs {}
- for {set i $low} {$i <= $high} {incr i} {
- lappend addrs $_map($Cname,line=$i)
- }
- } else {
- # Source
- set lines {}
- for {set i $low} {$i <= $high} {incr i} {
- if {[line_is_executable $win $i]} {
- lappend lines $i
- }
- }
- }
- }
- }
-
- if {[info exists lines]} {
-# debug "Got executible lines: $lines"
- if {[llength $lines]} {
- set name [::file tail $current(filename)]
- ManagedWin::open TraceDlg -File $name -Lines $lines
- }
- } elseif {[info exists addrs]} {
-# debug "Got executible addresses: $addrs"
- if {[llength $addrs]} {
- set name [::file tail $current(filename)]
- ManagedWin::open TraceDlg -File $name -Addresses $addrs
- }
- } else {
-# debug "Got no executible lines in the selected range..."
- }
-
- # Clear the selection -- it looks a lot better.
- $twin tag remove sel 1.0 end
-}
-
-
-# ------------------------------------------------------------------
-# METHOD: search - search for text or jump to a specific line
-# in source window, going in the specified DIRECTION.
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::search {exp direction} {
- if {$exp != ""} {
- set result {}
- if {[regexp {^@([0-9]+)} $exp dummy index]} {
- append index .0
- set end [$twin index "$index lineend"]
- } else {
- set index [$twin search -exact -count len -$direction -- $exp $SearchIndex]
-
- if {$index != ""} {
- set end [split $index .]
- set line [lindex $end 0]
- set char [lindex $end 1]
- set char [expr {$char + $len}]
- set end $line.$char
- set result "Match of \"$exp\" found on line $line"
- if {$direction == "forwards"} {
- set SearchIndex $end
- } else {
- set SearchIndex $index
- }
- }
- }
- if {$index != ""} {
- # Highlight word and save index
- $twin tag remove search 1.0 end
- $twin tag add search $index $end
- $twin see $index
- } else {
- set result "No match for \"$exp\" found"
- }
- return $result
- } else {
- $twin tag remove search 1.0 end
- }
-}
-
-# -----------------------------------------------------------------------------
-# NAME: SrcTextWin::LoadFromCache
-#
-# SYNOPSIS: LoadFromCache {w name asm lib}
-#
-# DESC: Looks up $name in the cache. If $name is cached, replace the
-# pane $w with the cached pane. Otherwise create a new
-# pane and scrolledtext widget and set _${w}pane and _${w}win.
-#
-# ARGS: w "t" or "b" (for Top and Bottom pane)
-# name name to look for in cache. This will be a filename if
-# we are filling in a source window, or an address
-# otherwise.
-# asm 'S' for source,
-# 'A' for assembly mode
-# 'M' for mixed mode.
-# lib library name
-#
-# RETURNS: 0 - read from cache
-# 1 - created new (blank) widget
-# -1 - could not find the contents you are trying to load,
-# so far this only happens for "Source" files.
-#
-# NOTES: If you call this and a new widget is created which cannot be
-# filled in later due to errors, call UnLoadFromCache.
-# -----------------------------------------------------------------------------
-
-itcl::body SrcTextWin::LoadFromCache {w name asm lib} {
- debug "LoadFromCache $w $name $asm"
- global tcl_platform
- upvar ${w}win win
- upvar _${w}pane pane
-
- if {[string compare gdbtk_scratch_widget $name]} {
- append full_name $name "," $asm "," $lib
- } else {
- set full_name $name
- }
-
- set loadingSource [expr ![string compare $asm "S"]]
-
- set oldpane $pane
- if {[info exists Stwc($full_name:pane)]} {
- debug "READING CACHE $full_name->$Stwc($full_name:pane)"
- set pane $Stwc($full_name:pane)
- if {$oldpane != ""} {
- $itk_interior.p replace $oldpane $pane
- } else {
- $itk_interior.p show $pane
- }
- set win [[$itk_interior.p childsite $pane].st component text]
- if {!$loadingSource} {
- set Cname $full_name
- }
-
- # If the text in this cache file is dirty, clean the window, and
- # return 1, which will tell the caller to refill it. Otherwise
- # return 0, and the caller will just display the window.
-
- if {$Stwc($name:dirty)} {
- $win delete 0.0 end
- set res 1
- set Stwc($name:dirty) 0
- } else {
- set res 0
- }
-
- } else {
- debug "name=$name"
- # If we are trying to load a source file, check the time
- # to see if we need to update it. If we can't stat the
- # file then we probably can't open it either, so error
- # out.
-
- if {$loadingSource} {
- if {[string compare $tcl_platform(platform) "windows"] == 0} {
- set f [ide_cygwin_path to_win32 $name]
- } else {
- set f $name
- }
- if {[catch {file mtime $f} file_time]} {
- debug "Could not stat file \"$f\" - \"$file_time\""
- return -1
- } else {
- set Stwc($full_name:pane) pane$filenum
- set Stwc($name:mtime) $file_time
- }
- } else {
- # FIXME: This is wrong. For Assembly files we need to
- # check whether the executable is newer than the cached
- # disassembly. For mixed files, we need to check BOTH
- # the source file mtime, and the executable time.
-
- set Stwc($full_name:pane) pane$filenum
- set Stwc($name:mtime) 0
- }
-
- set Stwc($full_name:pane) pane$filenum
-
- set Stwc($name:dirty) 0
- incr filenum
-
- set pane $Stwc($full_name:pane)
- debug "pane=$pane"
- if {$oldpane != ""} {$itk_interior.p hide $oldpane}
- $itk_interior.p add $pane
- set p [$itk_interior.p childsite $pane]
- set st [iwidgets::scrolledtext $p.st \
- -hscrollmode dynamic -vscrollmode dynamic]
- set win [$st component text]
-
- if {!$loadingSource} {
- set Cname $full_name
- }
- pack $st -expand yes -fill both
- set res 1
- }
-
- # reconfigure in case some preferences have changed
- config_win $win $asm
- return $res
-}
-
-# ------------------------------------------------------------------
-# METHOD: UnLoadFromCache - revert back to previously cached widget
-# This is used when a new widget is created with LoadFromCache but
-# there is a problem with filling the widget.
-# ------------------------------------------------------------------
-
-itcl::body SrcTextWin::UnLoadFromCache {w oldpane name asm lib} {
-# debug "$w $oldpane $name"
- upvar ${w}win win
- upvar _${w}pane pane
-# debug "pane=$pane win=$win"
-
-
- set full_name ${name},${asm},${lib}
- $itk_interior.p delete $pane
- foreach elem [array names Stwc $full_name:*] {
- unset Stwc($elem)
- }
- foreach elem [array names Stwc $name:*] {
- unset Stwc($elem)
- }
-
- if {$oldpane != ""} {
- $itk_interior.p show $oldpane
- set pane $oldpane
- set win [[$itk_interior.p childsite $pane].st component text]
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: print - print the contents of the text widget
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::print {top} {
- # FIXME
- send_printer -ascii [$twin get 1.0 end] -parent $top
-}
-
-# ------------------------------------------------------------------
-# METHOD: ask_thread_bp - prompt for thread(s) for BP
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::ask_thread_bp {} {
-# debug
- if {[catch {gdb_cmd "info thread"} threads]} {
- # failed. Just leave
- return
- }
- set threads [split $threads \n]
- set num_threads [expr {[llength $threads] - 1}]
- if {$num_threads <= 0} {
- show_warning "No threads were found.\nYou may only set breakpoints on threads\nthat have already been created."
- return
- }
-
- set a [toplevel .[gensym]]
- wm title $a "Thread Selection"
-
- iwidgets::scrolledlistbox $a.slb \
- -vscrollmode dynamic -hscrollmode dynamic \
- -selectmode multiple -textfont global/fixed
-
- set i [expr $num_threads - 1]
- set width 0
- foreach line $threads {
- # Active line starts with "*"
- if {[string index $line 0] == "*"} {
- # strip off leading "*"
- set line " [string trimleft $line "*"]"
- }
- # scan for GDB ID number at start of line
- if {[scan $line "%d" id($i)] == 1} {
- if {[string length $line] > $width} {
- set width [string length $line]
- }
- $a.slb insert 0 $line
- incr i -1
- }
- }
- $a.slb configure -visibleitems ${width}x$num_threads
- [$a.slb component listbox] configure -bg $::Colors(textbg) -fg $::Colors(textfg)
-
- frame $a.b
- button $a.b.ok -text OK -underline 0 -width 7 \
- -command "$this do_thread_bp $a.slb"
- button $a.b.cancel -text Cancel -width 7 -underline 0 -command "destroy $a"
- pack $a.b.ok $a.b.cancel -side left
- standard_button_box $a.b
- pack $a.b -fill x -expand yes -side bottom -padx 5 -pady 5
- center_window $a -over [winfo toplevel [namespace tail $this]]
- pack $a.slb -side top -fill both -expand yes
- bind $a.b.ok <Return> "$a.b.ok flash; $a.b.ok invoke"
- focus $a.b.ok
-}
-
-# ------------------------------------------------------------------
-# METHOD: do_thread_bp - callback from thread selection
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::do_thread_bp {listbox} {
-# debug "$listbox [$listbox curselection]"
- set x ""
- foreach i [$listbox curselection] {
- lappend x $id($i)
- }
- $this set_bp_at_line N {} -1 $x
- destroy [winfo toplevel $listbox]
-}
-
-
-# public method for testing use only!
-itcl::body SrcTextWin::test_get {var} {
- if {[array exists $var]} {
- return [array get $var]
- } else {
- return [set $var]
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: get_file - Return name of current file.
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::get_file {} {
- return $current(filename)
-}
-
-# ------------------------------------------------------------------
-# METHOD: clear_file - Clear out state so that user may load
-# new executable. For the SrcTextWin class, this means:
-#
-# Delete all srctextwin caches
-# Delete the variable balloon if it exists.
-# Clear the screen.
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::clear_file {} {
-
- debug "In clear_file"
- # delete all caches
- _clear_cache
-
- set oldpane {}
-
- # clear window
- # FIXME - We don't do this here, because is causes a wierd error
- # where the "Source file more recent than executible" error gets
- # for no apparent reason. This only effects the case where the
- # user types just "file" in the command line, then the window will
- # not get cleared.
-
- # delete variable balloon
- catch {$_balloon_var delete}
- set _balloon_var {}
-
- # reinit state
- _initialize_srctextwin
-
- # update the screen
- update idletasks
-
-}
-
-itcl::body SrcTextWin::_initialize_srctextwin {} {
- set pc(filename) ""
- set pc(func) ""
- set pc(line) 0
- set pc(addr) ""
- set pc(asm_line) 0
- set pc(lib) ""
- set current(filename) ""
- set current(funcname) ""
- set current(line) 0
- set current(addr) ""
- set current(asm_line) 0
- set current(tag) "BROWSE_TAG"
- set current(mode) "SOURCE"
- set current(lib) ""
-}
-
-# ------------------------------------------------------------------
-# METHOD: _clear_cache - Clear the cache
-# ------------------------------------------------------------------
-itcl::body SrcTextWin::_clear_cache {} {
-
- # display empty scratch frame
- set pane $Stwc(gdbtk_scratch_widget:pane)
- set win [[$itk_interior.p childsite $pane].st component text]
- $win delete 0.0 end
- $itk_interior.p show $pane
-
- # delete all cached frames
- foreach p [array names Stwc *:pane] {
- set p [lindex [split $p :] 0]
- if {$p != "gdbtk_scratch_widget"} {
- catch {
- #debug "clearing cache: \"$p\""
- $itk_interior.p delete $Stwc($p:pane)
- unset Stwc($p:pane)
- unset Stwc($p:mtime)
- }
- }
- }
-
- _initialize_srctextwin
- set filenum 0
- set Cname ""
- set _tpane pane$filenum
- incr filenum
- set _bpane ""
-}
diff --git a/gdb/gdbtk/library/srctextwin.ith b/gdb/gdbtk/library/srctextwin.ith
deleted file mode 100644
index fae89ad294b..00000000000
--- a/gdb/gdbtk/library/srctextwin.ith
+++ /dev/null
@@ -1,163 +0,0 @@
-# SrcTextWin class definition, for Insight
-# Copyright (C) 1997, 1998, 1999, 2001 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-itcl::class SrcTextWin {
- inherit itk::Widget GDBWin
-
- public {
- variable Tracing ;# 1 if we are running in trace mode
- variable Browsing 0 ;# 1 if we are browsing a trace experiment
- variable parent {} ;# the parent SrcWin
- variable ignore_var_balloons 0; # ignore all variable balloons
-
- # Set the height of the src window
- variable textheight 5i {
- catch {$itk_interior.p configure -height $itk_option(-textheight)}
- }
-
- method constructor {args}
- method destructor {}
- method disassembly_changed {}
- method reconfig {}
- method trace_find_hook {mode from_tty}
- method set_control_mode {mode}
- method build_popups {}
- method build_win {}
- method SetRunningState {state}
- method enable {on}
- method setTabs {win {asm S}}
- method enable_disable_src_tags {win how}
- method config_win {win {asm S}}
- method addPopup {menu label command {abg {}} {browse 1} {run 1}}
- method updateBalloon {}
- method ClearTags {}
- method FillSource {winname tagname filename funcname line addr pc_addr lib}
- method FillAssembly {winname tagname filename funcname line addr pc_addr lib}
- method FillMixed {winname tagname filename funcname line addr pc_addr lib}
- method location {tagname filename funcname line addr pc_addr lib}
- method LoadFile {winname name lib mtime_changed}
- method display_line { win line }
- method display_breaks {}
- method insertBreakTag {win linenum tag}
- method removeBreakTag {win linenum tag }
- method bp {action bpnum addr {linenum {}} {file {}} {type 0} {enabled 0} {thread -1}}
- method do_bp { win action linenum type bpnum enabled thread asm}
- method hasBP {win line}
- method hasTP {win line}
- method report_source_location {}
- method lookup_line {win y}
- method continue_to_here {{win {}} {y -1} {threads -1}}
- method jump_to_here {{win {}} {y -1} {threads -1}}
- method set_bp_at_line {{type N} {win {}} {y -1} {threads "-1"}}
- method remove_bp_at_line {{win {}} {y -1}}
- method enable_disable_at_line {action}
- method set_tp_at_line {{win {}} {y -1}}
- method next_hit_at_line {{win {}} {y -1}}
- method remove_tp_at_line {{win {}} {y -1}}
- method do_tag_popup {name X Y y}
- method do_source_popup { X Y x y }
- method addToWatch {var}
- method do_key {key}
- method mode_get {}
- method mode_set {new_mode {go 1}}
- method cancelMotion {}
- method motion {type win x y}
- method showBPBalloon {win x y}
- method showBalloon {win x y}
- method getVariable {x y {line {}}}
- method trace_help {args}
- method line_is_executable {win line}
- method tracepoint_range {win low high}
- method search {exp direction}
- method LoadFromCache {pname name asm lib}
- method UnLoadFromCache {pname oldpane name asm lib}
- method print {top}
- method ask_thread_bp {}
- method do_thread_bp {listbox}
- method test_get {var}
- method clear_file {}
- method get_file {}
- method set_tag_to_stack {}
-
- # GDB Events
- method breakpoint {event}
- method tracepoint {event}
- method set_variable {event}
- }
-
- private {
- variable top ;# toplevel window
- variable twin ;# top text window of pane
- variable _tpane ;# top pane name
- variable bwin "" ;# bottom text window of pane
- variable _bpane "" ;# bottom pane name
-
- variable do_display_breaks 0 ;# flag
- variable popups
-
- variable timeoutID {} ;# The timeout ID for the variable balloon help
- variable UseVariableBalloons
-
- variable mode_changed 0
- variable current ;# our current state
- variable pc ;# where the PC is now
- variable oldmode "" ;# remember the mode we want, even if we can't have it
-
- variable Running 0 ;# another way to disable things while target is active
- variable Linenums ;# use linenumbers?
- variable SearchIndex 1.0 ;# static
- variable id ;#thread id to line mapping
- # needed for assembly support
- variable _map
- variable Cname "" ;# cache index name for _map
- # cache is not shared among windows yet. That could be a later
- # optimization
- variable Stwc ;# Source Text Window Cache
- variable filenum 0
-
- # The variable object which the variable balloon describes
- variable _balloon_var {}
-
- method balloon_value {variable}
- method _mtime_changed {filename}
- method _initialize_srctextwin {}
- method _clear_cache {}
- method _highlightAsmLine {win addr pc_addr tagname filename funcname} {}
-
- proc makeBreakDot {size colorList {image {}}}
- }
-
-
-
- # common variables are shared among all objects of this type
- # break_images stores the images associated with the break dot.
- # bp
- # temp_bp
- # disabled_bp
- # tp
- # thread_bp
- protected common break_images
-
- # This is the list of bp types. Be nice, and don't put spaces in
- # any of the elements of this list...
- protected common bp_types {bp temp_bp disabled_bp thread_bp}
-
- # This variable is used in the "Continue to here" case, where we are
- # disabling then reenabling breakpoints behind the user's back to
- # implement this feature, but we don't want the user to see this...
- protected common dont_change_appearance 0
-
- protected common TimeOut 100 ;# The timeout value for variable balloon help
-
-}
diff --git a/gdb/gdbtk/library/srcwin.itb b/gdb/gdbtk/library/srcwin.itb
deleted file mode 100644
index c8b17dc8741..00000000000
--- a/gdb/gdbtk/library/srcwin.itb
+++ /dev/null
@@ -1,1051 +0,0 @@
-# Source window for Insight.
-# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-# ------------------------------------------------------------------
-# CONSTRUCTOR - create new source window
-# ------------------------------------------------------------------
-itcl::body SrcWin::constructor {args} {
- debug "$args"
- eval itk_initialize $args
- set top [winfo toplevel $itk_interior]
-
- _update_title ""
-
- set Tracing [pref get gdb/mode]
- set current(filename) ""
-
- if {[catch {_build_win} mssg]} {
- dbug E "_build_win returned: $::errorInfo"
- }
-
- # add special delete handler
- wm protocol $top WM_DELETE_WINDOW "[code $this _exit]"
-
- # add hooks
- add_hook gdb_no_inferior_hook "$this no_inferior"
- add_hook download_progress_hook "$this download_progress"
- add_hook state_hook [code $this _set_state]
- add_hook gdb_clear_file_hook [code $this clear_file]
- after idle "
- update idletasks
- $this sizeWinByChild toolbar"
-
- lappend window_list $this
-}
-
-# ------------------------------------------------------------------
-# DESTRUCTOR - destroy window containing widget
-# ------------------------------------------------------------------
-itcl::body SrcWin::destructor {} {
- debug
- remove_hook gdb_no_inferior_hook "$this no_inferior"
- remove_hook download_progress_hook "$this download_progress"
- remove_hook state_hook [code $this _set_state]
- remove_hook gdb_clear_file_hook [code $this clear_file]
- set window_list [lremove $window_list $this]
- if {$pc_window == $this} then {
- set pc_window ""
- }
-}
-
-# ------------------------------------------------------------------
-# PRIVATE METHOD: _build_win - build the main source window
-# ------------------------------------------------------------------
-itcl::body SrcWin::_build_win {} {
- global gdb_downloading gdb_running gdb_loaded
-
- # build source toolbar
- set _toolbar [conAdd toolbar -resizable 0]
- SrcBar $_toolbar $this \
- -updatecommand [list $this toggle_updates] \
- -updatevalue $do_updates
- pack $_toolbar -expand 1 -fill both
-
- # if user likes control on bottom...
- if {! [pref get gdb/src/top_control]} {
-
- # add a SrcTextWin container
- set srcwin [conAdd src]
- set twin [SrcTextWin $srcwin -Tracing $Tracing -parent $this]
- pack $srcwin -expand 1 -fill both
-
- # add status line
- set _status [conAdd status -resizable 0]
- label $_status -relief sunken -bd 3 -font global/status -height 1
- pack $_status -expand 1 -fill both
- }
-
- # add a status bar container
- set _statbar [conAdd stat -resizable 0]
- frame $_statbar
- pack $_statbar -expand 1 -fill both
-
- combobox::combobox $_statbar.name -maxheight 15 -font global/fixed\
- -command [code $this _name] -bg $::Colors(textbg)
-
- set need_files 1
-
- combobox::combobox $_statbar.func -maxheight 15 -font global/fixed\
- -command [code $this goto_func] -bg $::Colors(textbg)
- combobox::combobox $_statbar.mode -width 9 -editable false \
- -font global/fixed -command [code $this mode] -bg $::Colors(textbg)
-
- $_statbar.mode list insert end SOURCE
- $_statbar.mode list insert end ASSEMBLY
- $_statbar.mode list insert end MIXED
- $_statbar.mode list insert end SRC+ASM
-
- pack $_statbar.mode -side right -padx 10 -pady 4
- pack $_statbar.name $_statbar.func -side left -pady 4 -padx 10
-
- # if user likes control on top...
- if {[pref get gdb/src/top_control]} {
-
- # add a SrcTextWin container
- set srcwin [conAdd src]
- set twin [SrcTextWin $srcwin -Tracing $Tracing -parent $this]
- pack $srcwin -expand 1 -fill both
-
- # add status line
- set _status [conAdd status -resizable 0]
- set _statusframe [frame $_status]
- set _status $_statusframe.con
- label $_status -relief sunken -bd 3 -font global/status -height 1 \
- -anchor w
-
- # add download progress meter
- canvas $_statusframe.progress -relief sunken -borderwidth 2 \
- -highlightthickness 0 -takefocus 0 -width 100 -height 0 -confine 1
- $_statusframe.progress create rectangle 0 0 0 \
- [winfo height $_statusframe.progress] -outline blue -fill blue -tags rect
-
- # add address and line number indicators
- label $_statusframe.addr -text "" -width 10 -relief sunken \
- -bd 1 -anchor e -font global/fixed
- label $_statusframe.line -text "" -width 6 -relief sunken \
- -bd 1 -anchor e -font global/fixed
-
- balloon register $_statusframe.addr "Address"
- balloon register $_statusframe.line "Line number"
-
- pack $_statusframe -expand 1 -fill both
- grid $_status -row 0 -column 1 -sticky news -pady 2 -padx 2
- grid $_statusframe.addr -row 0 -column 3 -sticky nes -pady 4
- grid $_statusframe.line -row 0 -column 4 -sticky nws -pady 4
- grid columnconfigure $_statusframe 1 -weight 10
- grid columnconfigure $_statusframe 2 -minsize 5
- grid columnconfigure $_statusframe 5 -minsize 5
- }
-
- set_execution_status
-
- # balloon help
- foreach i {entry button} {
- balloon register $_statbar.name.$i "Current file name"
- balloon register $_statbar.func.$i "Current function name"
- balloon register $_statbar.mode.$i "Source mode"
- }
- balloon variable $_status ${twin}_balloon
-
- $_statbar.mode entryset [$twin mode_get]
-
- # time to load the widget with a file.
- # If this is a new widget and the program is
- # not yet being debugged, load the file with "main" in it.
- if {$gdb_running} {
- if {[catch {gdb_loc} loc]} {
- # Nothing we can do but leave the window empty.
- } else {
- _update $loc
- }
- }
-}
-
-
-# ------------------------------------------------------------------
-# PUBLIC METHOD: _set_state - do things when program state changes
-# ------------------------------------------------------------------
-itcl::body SrcWin::_set_state {varname} {
- global gdb_running gdb_downloading gdb_loaded gdb_program_has_run
- debug "$varname l=$gdb_loaded d=$gdb_downloading r=$gdb_running"
-
- if {$varname == "gdb_loaded" && $gdb_loaded == 1} {
- set gdb_program_has_run 0
- #set current(filename) ""
- return
- }
-
- if {$gdb_running} {
- set state normal
- set gdb_program_has_run 1
- } else {
- set state disabled
- }
- if {!$Tracing} {
- $twin SetRunningState $state
- }
-}
-
-# ------------------------------------------------------------------
-# PUBLIC METHOD: download_progress - update the progress meter when downloading
-# ------------------------------------------------------------------
-itcl::body SrcWin::download_progress { section num tot {msg ""} } {
- global download_start_time download_cancel_ok gdb_loaded
-
- #debug "$section $num $tot $msg"
- if {$last_section_start == 0} {
- grid forget $_statusframe.addr $_statusframe.line
- grid $_statusframe.progress -row 0 -column 4 -padx 4 -sticky news
- ::update idletasks
- }
-
- if {$section == "DONE"} {
- set last_done $tot
- if {$gdb_loaded} {
- # loaded something
- set secs [expr {[clock seconds] - $download_start_time}]
- if {$secs} {
- set bps [expr {8 * $tot / $secs}]
- set_status "DOWNLOAD FINISHED: $tot bytes in $secs seconds ($bps bits per second)"
- } else {
- set_status "DOWNLOAD FINISHED"
- }
- }
- } elseif {$section != "CANCEL"} {
- if {$section != $last_section} {
- set last_section $section
- set last_section_start $last_done
- }
- set last_done [expr {$last_section_start + $num}]
- set_status "Downloading section $section - $num bytes"
- }
-
- set canvas $_statusframe.progress
- set height [winfo height $canvas]
- if {$last_done} {
- set width [winfo width $canvas]
- set rw [expr {double ($last_done) * $width / $tot}]
- $canvas coords rect 0 0 $rw $height
- ::update
- }
-
- if {$last_done == $tot || $section == "CANCEL"} {
- $_toolbar configure -runstop normal
- if {!$gdb_loaded} {
- ::update
- # errored or canceled
- if {$msg != ""} {
- set_status "DOWNLOAD FAILED: $msg"
- } else {
- set_status "DOWNLOAD CANCELLED"
- }
- $canvas coords rect 0 0 0 $height
- ::update idletasks
- }
-
- set last_section ""
- set last_done 0
- set last_section_start 0
-
- grid forget $_statusframe.progress
- grid $_statusframe.addr -row 0 -column 3 -sticky new -pady 4
- grid $_statusframe.line -row 0 -column 4 -sticky nws -pady 4
- ::update idletasks
- }
-}
-
-# ------------------------------------------------------------------
-# PUBLIC METHOD: reconfig - used when preferences change
-# ------------------------------------------------------------------
-itcl::body SrcWin::reconfig {} {
- debug
- $_toolbar reconfig
- $twin reconfig
-}
-
-
-# ------------------------------------------------------------------
-# PRIVATE METHOD: _name - filename combobox callback
-# This is only called when the user edits the name combobox.
-# It is the only way that files can be inserted into the file list
-# once the debugger is started.
-# ------------------------------------------------------------------
-itcl::body SrcWin::_name {w {val ""}} {
- global _files
- debug "$w $val"
- if {$val != ""} {
- if {![info exists _files(short,$val)]} {
- if {![info exists _files(full,$val)]} {
- if [catch {gdb_find_file $val} full] {
- set_status "Cannot find source file \"$val\": $full"
- $_statbar.name entryset [lindex [file split $current(filename)] end]
- return
- }
- if {$full == ""} {
- set_status "Cannot find source file \"$val\""
- $_statbar.name entryset [lindex [file split $current(filename)] end]
- return
- }
- set _files(short,$full) $val
- set _files(full,$val) $full
- }
- set full $_files(full,$val)
- } else {
- set full $val
- set val $_files(short,$full)
- }
- $_statbar.name entryset $val
- location BROWSE_TAG [list $val "" $full 0 0 0 {}]
- }
-}
-
-# ------------------------------------------------------------------
-# PRIVATE PUBLIC METHOD: toggle_updates - update toggle callback
-# ------------------------------------------------------------------
-itcl::body SrcWin::toggle_updates {value} {
- # save state in do_updates so it will be preserved
- # in window reconfigs
- set do_updates $value
-}
-
-# ------------------------------------------------------------------
-# PRIVATE PUBLIC METHOD: goto_func - function combobox callback
-# ------------------------------------------------------------------
-itcl::body SrcWin::goto_func {w {val ""}} {
- if {$val != ""} {
- set mang 0
- if {[info exists _mangled_func($val)]} {
- set mang $_mangled_func($val)
- }
- if {$mang} {
- set loc $val
- } else {
- set fn [lindex [::file split $current(filename)] end]
- if {$fn == ""} {
- set loc $val
- } else {
- set loc $fn:$val
- }
- }
- debug "GOTO $loc"
- if {![catch {gdb_loc $loc} result]} {
- location BROWSE_TAG $result
- } else {
- dbug W "gdb_loc returned \"$result\""
- }
- }
-}
-
-# ------------------------------------------------------------------
-# PUBLIC METHOD: fillNameCB - fill the name combobox
-#
-# This method needs to be public, since other parts of
-# the gui can cause new symbols to be read.
-# ------------------------------------------------------------------
-itcl::body SrcWin::fillNameCB {} {
- global _files
- set allfiles [gdb_listfiles]
- foreach f $allfiles {
- # FIXME: If you reactivate this code add a catch as gdb_find_file can err
- # (P.S.: I don't know why this is commented out)
- #set fullname [gdb_find_file $f]
- #set _files(full,$f) $fullname
- #set _files(short,$fullname) $f
- $_statbar.name list insert end $f
- }
- set need_files 0
-}
-
-
-# ------------------------------------------------------------------
-# PUBLIC METHOD: fillFuncCB - fill the function combobox
-#
-# This method needs to be public, since other parts of
-# the gui can cause new symbols to be read.
-# ------------------------------------------------------------------
-itcl::body SrcWin::fillFuncCB {name} {
- $_statbar.func list delete 0 end
- if {$name != ""} {
- set maxlen 10
- if {[catch {gdb_listfuncs $name} listfuncs]} {
- tk_messageBox -icon error -default ok \
- -title "GDB" -type ok \
- -message "This file can not be found or does not contain\ndebugging information."
- _set_name ""
- return
- }
- foreach f [lsort -increasing $listfuncs] {
- lassign $f func mang
- set _mangled_func($func) $mang
- $_statbar.func list insert end $func
- if {[string length $func] > $maxlen} {
- set maxlen [string length $func]
- }
- }
- $_statbar.func configure -width [expr $maxlen + 1]
- }
-}
-
-# ------------------------------------------------------------------
-# PUBLIC METHOD: location - update the location displayed
-#
-# a linespec looks like this:
-# 0: basename of the file
-# 1: function name
-# 2: full filename
-# 3: source line number
-# 4: address
-# 5: current PC - which will often be the same as address, but not when
-# we are browsing, or walking the stack.
-# 6: shared library name if the pc is in a shared lib
-#
-# linespec will be "{} {} {} 0 0x0 0x0" when GDB has not started debugging.
-# ------------------------------------------------------------------
-itcl::body SrcWin::location {tag linespec} {
- global gdb_running gdb_exe_name _files tcl_platform
-
- # We need to keep track of changes to the line, filename, function name
- # and address so we can keep the widgets up-to-date. Otherwise we
- # basically pass things through to the SrcTextWin location public method.
-
- debug "running=$gdb_running tag=$tag linespec=$linespec"
- lassign $linespec foo funcname name line addr pc_addr lib
-
- # need to call this to update running state
- set_execution_status $line $addr
-
- # "update" doesn't set the tag so we do it here
- if {$tag == ""} {
- if {$addr == $pc_addr} {
- set tag PC_TAG
- } else {
- set tag STACK_TAG
- }
- }
-
- if {!$gdb_running} {
- # When we are not yet debugging, we need to force something
- # to be displayed, so we choose to find function "main" and
- # display the file with it.
- set tag BROWSE_TAG
- debug "not running: name=$name funcname=$funcname line=$line"
- if {$name == ""} {
- if {[set linespec [gdbtk_locate_main]] == ""} {
- # no "main" function found
- return
- }
- lassign $linespec foo funcname name line addr pc_addr lib
- debug "new linespec=$linespec"
- }
- }
-
- # update file and function combobox
- if {$name != $current(filename)} {
- _set_name $name
- fillFuncCB $name
- }
-
- # get a proper address string to display
- set textaddr [gdb_CA_to_TAS $addr]
-
- # set address and line widgets
- if {[string length $textaddr] > 8} {
- # 64-bit address
- set width 16
- } else {
- # 32-bit address
- set width 8
- }
- $_statusframe.addr configure -text $textaddr -font global/fixed -width $width
- $_statusframe.line configure -text $line
-
- # set function combobox
- $_statbar.func entryset $funcname
-
- # call SrcTextWin::location
- $twin location $tag $name $funcname $line $addr $pc_addr $lib
-
- set current(filename) $name
-}
-
-# ------------------------------------------------------------------
-# PUBLIC METHOD: stack - handle stack commands
-# ------------------------------------------------------------------
-itcl::body SrcWin::stack {cmd} {
- if {$cmd == "bottom"} {
- set cmd "frame 0"
- }
- gdbtk_busy
- if {[catch {gdb_cmd "$cmd"} message]} {
- dbug E "STACK ERROR: $message"
- }
- gdbtk_update
- gdbtk_idle
-}
-
-# ------------------------------------------------------------------
-# METHOD: _update - update widget when PC changes
-# ------------------------------------------------------------------
-itcl::body SrcWin::_update {loc} {
- debug "loc=$loc"
- # See if name combobox needs filled.
- if {$need_files} {
- fillNameCB
- }
- location "" $loc
-}
-
-# ------------------------------------------------------------------
-# PUBLIC METHOD: idle - callback for gdbtk_idle
-# Called when the target is idle, so enable all buttons.
-# ------------------------------------------------------------------
-itcl::body SrcWin::idle {event} {
- $_toolbar configure -runstop normal
- enable_ui 1
-}
-
-# ------------------------------------------------------------------
-# PUBLIC METHOD: mode - set mode to SOURCE, ASSEMBLY, MIXED, SRC+ASM
-# ------------------------------------------------------------------
-itcl::body SrcWin::mode {w new_mode {go 1}} {
- gdbtk_busy
- $_statbar.mode entryset $new_mode
- catch {$twin mode_set $new_mode $go} errorVal
- $_toolbar configure -displaymode $new_mode
- gdbtk_idle
-}
-
-# ------------------------------------------------------------------
-# PRIVATE METHOD: _update_title - update title bar
-# ------------------------------------------------------------------
-itcl::body SrcWin::_update_title {name} {
- set fn [lindex [::file split $name] end]
- if {$fn == ""} {
- set prefix ""
- } else {
- set prefix "$fn - "
- }
- window_name "${prefix}Source Window" $fn
-}
-
-# ------------------------------------------------------------------
-# PUBLIC METHOD: busy - disable things when gdb is busy
-# ------------------------------------------------------------------
-itcl::body SrcWin::busy {event} {
- global gdb_loaded gdb_target_name
-# debug "gdb_loaded=$gdb_loaded, gdb_target_name=$gdb_target_name"
-
- if {$do_updates} {
- enable_ui 0
- if {$Running} {
- $_toolbar configure -runstop running
- if {$gdb_loaded || \
- ([TargetSelection::native_debugging] && $gdb_target_name != "remote")} {
- set_status "Program is running."
- }
- } else {
- $_toolbar configure -runstop busy
- }
- }
-}
-
-# ------------------------------------------------------------------
-# PUBLIC METHOD: update - The inferior's state has changed.
-# ------------------------------------------------------------------
-itcl::body SrcWin::update {event} {
-
- # FIXME: This is kinda lame. We need to run this only once
- # as it is now written, so only the first window in the list
- # will actually call choose_and_update.
- # This is still better than before, since it will not
- # matter if this window is destroyed: as long as _a_
- # SrcWin exists, this will get called.
- if {[lindex $window_list 0] == $this} {
- choose_and_update
- }
-}
-
-# ------------------------------------------------------------------
-# PRIVATE METHOD: _set_name - set the name in the name combobox and in the title
-# ------------------------------------------------------------------
-itcl::body SrcWin::_set_name { val {found 1} } {
- global _files
- _update_title $val
- if {![info exists _files(short,$val)]} {
- if {![info exists _files(full,$val)]} {
- # not in our list; just display basename
- $_statbar.name entryset [lindex [::file split $val] end]
- return
- }
- } else {
- set val $_files(short,$val)
- }
- if {$found} {
- $_statbar.name entryset $val
- } else {
- $_statbar.name entryset "$val (not found)"
- }
-}
-
-# ------------------------------------------------------------------
-# PUBLIC METHOD: set_status - write a message to the status line.
-# If "tmp" is set, the status change will not be saved.
-# ------------------------------------------------------------------
-
-itcl::body SrcWin::set_status { {msg ""} {tmp 0} } {
- set msg [lindex [split $msg \n] 0]
- if {$tmp} {
- $_status configure -text $msg
- return
- }
- if {$msg != ""} {
- set saved_msg $msg
- }
- $_status configure -text $saved_msg
-}
-
-# ------------------------------------------------------------------
-# PUBLIC METHOD: set_execution_status - write the current execution state
-# to the status line
-# ------------------------------------------------------------------
-itcl::body SrcWin::set_execution_status { {line ""} {pc ""}} {
- global gdb_running gdb_loaded gdb_program_has_run gdb_target_changed
- #debug "line=$line pc=$pc [gdb_target_has_execution] running=$gdb_running loaded=$gdb_loaded"
- set message ""
-
- if {![gdb_target_has_execution]} {
- if {$gdb_running} {
- set gdb_running 0
- # tell text window program is no longer running
- $twin ClearTags
- }
- if {$gdb_loaded} {
- if {$gdb_program_has_run} {
- set message "Program terminated. 'Run' will restart."
- # Need to set gdb_target_changed because most
- # remote targets detach when they are finished,
- # and this will force it to reattach.
- set gdb_target_changed 1
- set gdb_running 0
- } else {
- set message "Program is ready to run."
- }
- } else {
- set message "Program not running. Click on run icon to start."
- }
- } else {
-
- # gdb_target_has_execution has returned true, so we must be running.
- #
- # This can cause problems on targets which do not set inferior_pid.
- # Although this is bogus, much of gdb (and gdbtk) relies on
- # gdb_target_has_execution (and thus inferior_pid), so we should
- # not try to second guess it and fix those targets which do not set
- # inferior_pid when opened.
- set gdb_running 1
-
- # only do a gdb_loc if we have to
- if {$line == "" && $pc == ""} {
- if {[catch {gdb_loc} loc] == 0} {
- set line [lindex $loc 3]
- set pc [lindex $loc 4]
- }
- }
-
- set pc [gdb_CA_to_TAS $pc]
-
- if {$line == "" || $line == 0} {
- if {$pc == "" || $pc == 0} {
- if {$Tracing} {
- set message "Ready."
- } else {
- set message "Program stopped."
- }
- } else {
- set message "Program stopped at 0x$pc"
- }
- } else {
- if {$Tracing} {
- set msg "Inspecting trace"
- } else {
- set msg "Program stopped"
- }
- switch [$twin mode_get] {
- ASSEMBLY {set message "$msg at 0x$pc" }
- MIXED {set message "$msg at line $line, 0x$pc" }
- SRC+ASM {set message "$msg at line $line, 0x$pc" }
- default {set message "$msg at line $line" }
- }
- }
- }
- set_status $message
-}
-
-# ------------------------------------------------------------------
-# PUBLIC METHOD: edit - invoke external editor
-# ------------------------------------------------------------------
-itcl::body SrcWin::edit {} {
- global external_editor_command
- # If external editor is enabled, pass the file to the specified command
-
- if {$current(filename) == ""} {
- tk_dialog .warn {Edit} {No file is loaded in the source window.} error 0 Ok
- return
- }
-
- if {[catch {$twin report_source_location} loc_info]} {
- tk_dialog .warn "Edit" "No source file selected" error 0 Ok
- return
- }
-
- Editor::edit $loc_info
-}
-
-# ------------------------------------------------------------------
-# PUBLIC METHOD: print - print the contents of the text widget
-# ------------------------------------------------------------------
-itcl::body SrcWin::print {} {
- # Call the SrcTextWin's print public method
- $twin print $top
-}
-
-# ------------------------------------------------------------------
-# PUBLIC METHOD: enable_ui
-# Enable all UI elements for user interaction.
-# ------------------------------------------------------------------
-itcl::body SrcWin::enable_ui { on } {
- #debug "$on"
- if {$on} {
- set Running 0
- set state normal
- set glyph ""
- } else {
- if {!$NoRun} {set Running 1}
- set state disabled
- set glyph watch
- }
- # combo boxes
- $_statbar.mode configure -state $state
- $_statbar.name configure -state $state
- $_statbar.func configure -state $state
-
- $twin enable $on
- $top configure -cursor $glyph
-}
-
-# ------------------------------------------------------------------
-# PUBLIC METHOD: no_inferior
-# Put the UI elements of this object into a state
-# appropriate for an inferior which is not executing.
-# For this object, this means:
-# Disable:
-# - key binding for all inferior control (not needed -- gdb does this
-# for us)
-#
-# Enable:
-# - file/func/mode selectors
-# - right-click popups, since gdb DOES allow looking at exe fil
-# - selections
-#
-# Change mouse pointer to normal
-# ------------------------------------------------------------------
-itcl::body SrcWin::no_inferior {} {
- #debug
- set_execution_status
- enable_ui 1
-}
-
-# ------------------------------------------------------------------
-# PUBLIC METHOD: reset - reset the source window
-# ------------------------------------------------------------------
-itcl::body SrcWin::reset {} {
- set current(filename) ""
- set need_files 1
- set do_updates 1
- set last_section ""
- set last_section_start 0
- set last_done 0
- set saved_msg ""
-
- # do we need to flush the cache or clear the source windows?
-
- # Empty combo boxes
- $_statbar.name list delete 0 end
- $_statbar.name configure -value {}
- $_statbar.func list delete 0 end
- $_statbar.func configure -value {}
-}
-
-# ------------------------------------------------------------------
-# PUBLIC METHOD: search - search for a STRING or jump to a specific line
-# in source window, going in the specified DIRECTION.
-# ------------------------------------------------------------------
-itcl::body SrcWin::search {direction string} {
- set_status
- set_status [$twin search $string $direction] 1
-}
-
-# ------------------------------------------------------------------
-# PROCEDURE: point_to_main
-# Proc that may be called to point some source window to
-# main (or an entry point?). (see gdbtk_tcl_exec_file_changed)
-# ------------------------------------------------------------------
-itcl::body SrcWin::point_to_main {} {
- # We need to force this to some default location. Assume main and
- # if that fails, let the source window guess (via gdb_loc using stop_pc).
- set src [lindex [ManagedWin::find SrcWin] 0]
- if {[set linespec [gdbtk_locate_main]] == ""} {
- gdbtk_update
- debug "could not find main"
- } else {
- $src location BROWSE_TAG [list $linespec]
- }
-}
-
-itcl::body SrcWin::_exit {} {
- debug
- if {[llength [ManagedWin::find SrcWin]] == 1} {
- if {![gdbtk_quit_check]} {
- return
- }
- }
- after idle [delete object $this]
-}
-
-# public method for testing use only!
-itcl::body SrcWin::test_get {var {private_func 0}} {
- debug $var
- if {$private_func} {
- return [code $this $var]
- }
- return [set $var]
-}
-
-# ------------------------------------------------------------------
-# PUBLIC METHOD: toolbar - configure the toolbar's "state"
-# ------------------------------------------------------------------
-#
-# This method is used to configure the toolbar's running state.
-# Valid states include anything that the "runtest" variable of
-# the GDBSrcBar may accept. Specifically,
-#
-# busy - Run button becomes disabled
-# running - Stop button appears, allowing user to stop executing target
-# downloading - Stop button appears, allowing user to interrupt downloading
-# normal - Run button appears, allowing user to run/re-run exe
-itcl::body SrcWin::toolbar {state} {
- $_toolbar configure -runstop $state
-}
-
-# ------------------------------------------------------------------
-# METHOD: inferior - change execution state of inferior
-# ------------------------------------------------------------------
-#
-# ACTION may be:
-# step - step the inferior one source line (stepping into functions)
-# next - step the inferior one source line (stepping over functions)
-# finish - finish the current frame of execution
-# continue - continue executing the inferior
-# stepi - step one machine instruction (stepping into calls)
-# nexti - step one machine instruction (stepping over calls)
-# run - run/re-run the inferior
-# stop - stop or detach from target
-#
-# FIXME: This should really be in an object which describes gdb's state.
-# Unfortunately, this doesn't exist, so it's here for now.
-itcl::body SrcWin::inferior {action} {
-
- # Check to see if this action is forwarded to other Insight instances
- if {$::iipc} {
- switch $action {
- step -
- next -
- stepi -
- nexti -
- finish {
- if {[pref get gdb/ipc/step_button]} {
- $::insight_ipc send $action
- }
- }
- continue {
- if {[pref get gdb/ipc/cont_button]} {
- $::insight_ipc send $action
- }
- }
- run {
- if {[pref get gdb/ipc/run_button]} {
- $::insight_ipc send $action
- }
- }
- stop {
- if {[pref get gdb/ipc/stop_button]} {
- $::insight_ipc send $action
- }
- }
- }
- }
-
- switch $action {
- step { gdbtk_step }
- next { gdbtk_next }
- finish { gdbtk_finish }
- continue { gdbtk_continue }
- stepi { gdbtk_stepi }
- nexti { gdbtk_nexti }
- run { gdbtk_run }
- stop { gdbtk_stop }
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: clear_file
-# Tasks for SrcWin to clear file:
-#
-# - clear window
-# - reset to src mode
-# - clear func/file comboboxes
-# - clear status (done by no_inferior)
-# - allow SrcTextWin to clear_file
-# ------------------------------------------------------------------
-itcl::body SrcWin::clear_file {} {
-
- # Reset to Source mode
- if {[$twin mode_get] != "SOURCE"} {
- mode {} SOURCE 0
- }
-
- no_inferior
- reset
-
- # run srctextwin clear_file
- $twin clear_file
-}
-
-# ------------------------------------------------------------------
-# METHOD: get_file
-# Return name of displayed file, or empty string if no file.
-# ------------------------------------------------------------------
-itcl::body SrcWin::get_file {} {
- if {$twin == ""} {
- return ""
- } else {
- return [$twin get_file]
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: is_fixed
-# Return boolean indicating whether this window is fixed.
-# ------------------------------------------------------------------
-itcl::body SrcWin::is_fixed {} {
- return 0
-}
-
-# ------------------------------------------------------------------
-# METHOD: get_top
-# Return toplevel
-# ------------------------------------------------------------------
-itcl::body SrcWin::get_top {} {
- return $top
-}
-
-# ------------------------------------------------------------------
-# METHOD: _set_tag_to_stack
-# Set tag to `stack' and update the underlying window.
-# ------------------------------------------------------------------
-itcl::body SrcWin::_set_tag_to_stack {} {
- set tag STACK_TAG
- if {$twin != ""} then {
- $twin set_tag_to_stack
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: _choose_window
-# Choose the right source window.
-# ------------------------------------------------------------------
-itcl::body SrcWin::_choose_window {file} {
- # Find the next available source window. The rules are:
- # 1. LRU overall
- # 2. Skip iconified windows
- # 3. If a window already shows the file, use it. Prefer the
- # window currently showing the PC
- # 4. If the window is fixed, skip it
- if {$pc_window != ""} then {
- if {[$pc_window get_file] == $file} then {
- return $pc_window
- }
- }
-
- set choice ""
- foreach win $window_list {
- if {[wm state [$win get_top]] != "normal"} then {
- continue
- }
-
- if {[$win get_file] == ""
- || [$win get_file] == $file
- || ! [$win is_fixed]} then {
- set choice $win
- break
- }
- }
-
- # If we didn't find an available window, then pick the current PC
- # window.
- if {$choice == ""} then {
- set choice $pc_window
- }
-
- set window_list [lremove $window_list $choice]
- lappend window_list $choice
-
- return $choice
-}
-
-# ------------------------------------------------------------------
-# METHOD: choose_and_update
-# Choose the right source window and then cause it to be updated
-# ------------------------------------------------------------------
-itcl::body SrcWin::choose_and_update {} {
- if {$pc_window == ""} then {
- set pc_window [lindex $window_list 0]
- }
-
- if {$pc_window == ""} then {
- # Nothing.
- } elseif {[catch {gdb_loc} loc]} {
- $pc_window set_execution_status
- } else {
- set prev $pc_window
- set file [lindex $loc 2]
- set pc_window [_choose_window $file]
- debug "chose window $pc_window"
- $pc_window _update $loc
- if {$pc_window != $prev} then {
- $pc_window reveal
- $prev _set_tag_to_stack
- }
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: choose_and_display
-# Choose the right source window for a given file
-# ------------------------------------------------------------------
-itcl::body SrcWin::choose_and_display {tag linespec} {
- set file [lindex $linespec 2]
- set window [_choose_window $file]
- $window location $tag $linespec
-}
diff --git a/gdb/gdbtk/library/srcwin.ith b/gdb/gdbtk/library/srcwin.ith
deleted file mode 100644
index 03e9b4ee8e4..00000000000
--- a/gdb/gdbtk/library/srcwin.ith
+++ /dev/null
@@ -1,106 +0,0 @@
-# Source window class definition for GDBtk.
-# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-# ----------------------------------------------------------------------
-# Implements a source display widget using primitive widgets as the
-# building blocks.
-#
-# The main display for SrcWin is a SrcTextWin widget. This file
-# should contain all the code for controlling the SrcTextWin.
-# SrcTextWin should just display the requested file and lines, without
-# having to be very intelligent. If there are problems, error codes
-# should be returned and SrcWin should figure out what to do.
-# ----------------------------------------------------------------------
-
-itcl::class SrcWin {
- inherit TopLevelWin GDBWin
-
- public {
- method constructor {args}
- method destructor {}
- method download_progress { section num tot {msg ""} }
- method edit {}
- method enable_ui { on }
- method fillNameCB {}
- method fillFuncCB {name}
- method goto_func {w {val ""}}
- method location {tag linespec}
- method mode {w new_mode {go 1}}
- method no_inferior {}
- method print {}
- method reconfig {}
- method reset {}
- method set_status { {msg ""} {tmp 0} }
- method set_execution_status { {line ""} {pc ""}}
- method stack {cmd}
- method test_get {var {private_func 0}}
- method toggle_updates {value}
- method toolbar {state}
- method inferior {action}
- method clear_file {}
- method get_file {}
- method is_fixed {}
- method search {direction string}
-
- proc choose_and_update {}
- proc choose_and_display {tag linespec}
- proc point_to_main {}
-
- #
- # GDB Events
- #
- method busy {event}
- method idle {event}
- method update {event}
- }
-
- private {
- method _build_win {}
- method _exit {}
- method _name {w {val ""}}
- method _set_name { val {found 1} }
- method _set_state {varname}
- method _update_title {name}
- method _update {loc}
- method get_top {}
- method _set_tag_to_stack {}
- proc _choose_window {file}
- variable _statbar
- variable _status
- variable _toolbar
- variable _statusframe
- variable top
- variable twin
- variable current
- variable need_files 0
- variable do_updates 1 ;# if the window does updates
- variable _mangled_func
- variable Tracing
- variable saved_msg "" ;# static
-
- # statics used for downloads
- variable last_section ""
- variable last_section_start 0
- variable last_done 0
-
- # These keep track of the current PC window and the list of all
- # source windows.
- common window_list ""
- common pc_window ""
-
- # fenceposts
- variable Running 0
- variable NoRun 0
- }
-}
diff --git a/gdb/gdbtk/library/stackwin.itb b/gdb/gdbtk/library/stackwin.itb
deleted file mode 100644
index b738c1462ab..00000000000
--- a/gdb/gdbtk/library/stackwin.itb
+++ /dev/null
@@ -1,159 +0,0 @@
-# Stack window for Insight.
-# Copyright (C) 1997, 1998, 1999, 2002, 2003 Red Hat
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-# ------------------------------------------------------------------
-# CONSTRUCTOR - create new stack window
-# ------------------------------------------------------------------
-itcl::body StackWin::constructor {args} {
- gdbtk_busy
- build_win
- gdbtk_idle
-
- add_hook gdb_no_inferior_hook [code $this no_inferior]
-}
-
-# ------------------------------------------------------------------
-# DESTRUCTOR - destroy window containing widget
-# ------------------------------------------------------------------
-itcl::body StackWin::destructor {} {
- remove_hook gdb_no_inferior_hook [code $this no_inferior]
-}
-
-# ------------------------------------------------------------------
-# METHOD: build_win - build the main register window
-# ------------------------------------------------------------------
-itcl::body StackWin::build_win {} {
- global tcl_platform
-
- itk_component add slb {
- iwidgets::scrolledlistbox $itk_interior.s \
- -vscrollmode dynamic -hscrollmode dynamic \
- -selectmode single -exportselection false -visibleitems 30x15 \
- -textfont global/fixed -selectioncommand [code $this change_frame]
- }
-
- [$itk_component(slb) component listbox] configure \
- -bg $::Colors(textbg) -fg $::Colors(textfg)
-
- update dummy
-
- pack $itk_interior.s -side left -expand yes -fill both
-
- window_name "Stack"
-}
-
-
-# ------------------------------------------------------------------
-# METHOD: update - update widget when PC changes
-# ------------------------------------------------------------------
-itcl::body StackWin::update {event} {
- global gdb_selected_frame_level
-
- if {!$protect_me} {
- # The gdb_stack command might fail, for instance if you are browsing
- # a trace experiment, and the stack has not been collected.
-
- if {[catch {gdb_stack 0 -1} frames]} {
- dbug W "Error in stack collection $frames"
- set frames {}
- }
-
- if {[llength $frames] == 0} {
- $itk_component(slb) delete 0 end
- $itk_component(slb) insert end {NO STACK}
- return
- }
-
- $itk_component(slb) delete 0 end
- set levels 0
- foreach frame $frames {
- set len [string length $frame]
-
- if {$len > $maxwidth} {
- set maxwidth $len
- }
- $itk_component(slb) insert end $frame
- incr levels
- }
-
- # this next section checks to see if the source
- # window is looking at some location other than the
- # bottom of the stack. If so, highlight the stack frame
- set level [expr {$levels - $gdb_selected_frame_level - 1}]
- $itk_component(slb) selection set $level
- $itk_component(slb) see $level
- }
-}
-
-itcl::body StackWin::idle {event} {
- set Running 0
- cursor {}
-}
-
-# ------------------------------------------------------------------
-# METHOD: change_frame - change the current frame
-# This method is currently ONLY called from the mouse binding
-# ------------------------------------------------------------------
-itcl::body StackWin::change_frame {} {
-
- if {!$Running && [$itk_component(slb) size] != 0} {
- gdbtk_busy
- set sel [$itk_component(slb) curselection]
- set size [$itk_component(slb) size]
- set frame_num [expr {$size - $sel - 1}]
- catch {gdb_cmd "frame $frame_num"}
-
- # Run idle hooks and cause all widgets to update
- set protect_me 1
- gdbtk_update
- set protect_me 0
- gdbtk_idle
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: reconfig - used when preferences change
-# ------------------------------------------------------------------
-itcl::body StackWin::reconfig {} {
- destroy $itk_interior.s
- build_win
-}
-
-# ------------------------------------------------------------------
-# PUBLIC METHOD: busy - BusyEvent handler
-# This method should cause blocking of clicks in
-# the window and change mouse pointer.
-# ------------------------------------------------------------------
-itcl::body StackWin::busy {event} {
- set Running 1
- cursor watch
-}
-
-# ------------------------------------------------------------------
-# METHOD: no_inferior - gdb_no_inferior_hook
-# ------------------------------------------------------------------
-itcl::body StackWin::no_inferior {} {
- set Running 0
- cursor {}
-}
-
-# ------------------------------------------------------------------
-# METHOD: cursor - set the window cursor
-# This is a convenience method which simply sets the mouse
-# pointer to the given glyph.
-# ------------------------------------------------------------------
-itcl::body StackWin::cursor {glyph} {
- set top [winfo toplevel $itk_interior]
- $top configure -cursor $glyph
-}
diff --git a/gdb/gdbtk/library/stackwin.ith b/gdb/gdbtk/library/stackwin.ith
deleted file mode 100644
index b639746175d..00000000000
--- a/gdb/gdbtk/library/stackwin.ith
+++ /dev/null
@@ -1,46 +0,0 @@
-# Stack window class definition for GDBtk.
-# Copyright (C) 1997, 1998, 1999 Cygnus Solutions
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-# ----------------------------------------------------------------------
-# Implements stack window for gdb
-# ----------------------------------------------------------------------
-
-itcl::class StackWin {
- inherit EmbeddedWin GDBWin
-
- private {
- variable maxwidth 40
- variable Running 0
- variable protect_me 0
- method build_win {}
- method cursor {glyph}
- method change_frame {}
- method no_inferior {}
- }
-
- public {
- method reconfig {}
- method constructor {args}
- method destructor {}
-
- #
- # GDB Events
- #
- method busy {event}
- method idle {event}
- method update {event}
- }
-
-}
-
diff --git a/gdb/gdbtk/library/targetselection.itb b/gdb/gdbtk/library/targetselection.itb
deleted file mode 100644
index 9816c0cb114..00000000000
--- a/gdb/gdbtk/library/targetselection.itb
+++ /dev/null
@@ -1,1087 +0,0 @@
-# Target selection dialog for Insight.
-# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-# ----------------------------------------------------------------------
-# Implements GDB TargetSelection dialog
-# ----------------------------------------------------------------------
-
-# ------------------------------------------------------------------
-# CONSTRUCTOR - create new target selection window
-# ------------------------------------------------------------------
-itcl::body TargetSelection::constructor {args} {
- eval itk_initialize $args
- set top [winfo toplevel $itk_interior]
- _init
- build_win
-}
-
-itcl::body TargetSelection::getname {target name} {
-
- # Init target database if we haven't already done so
- init_target_db
-
- if {[info exists gdb_target($target,$name)]} {
- return $gdb_target($target,$name)
- } else {
- return ""
- }
-}
-
-itcl::body TargetSelection::init_target_db {} {
- # check to see if we already initialized this database
- if {$db_inited} {
- return
- }
- set db_inited 1
-
- # Target Database
- # Set the following members:
- # TARGET,pretty-name: Name to display to user
- # TARGET,debaud: Default baudrate
- # TARGET,baud-rates: Permissible baudrates
- # TARGET,cmd: Abstracted command to run for this target (tcpX and com1 are
- # replaced with the real port and host/port in set_target)
- # TARGET,runlist: List of preferences for the target: {attach download run cont}
- # TARGET,after_attaching: a command to run after attaching to the target
-
- # Default target
- set gdb_target(default,pretty-name) "Default"
- set gdb_target(default,defbaud) ""
- set gdb_target(default,baud-rates) {}
- set gdb_target(default,cmd) ""
- set gdb_target(default,runlist) {0 0 1 0}
- set gdb_target(default,options) ""
- set gdb_target(default,after_attaching) {}
-
- # Exec target
- set gdb_target(exec,pretty-name) "Exec"
- set gdb_target(exec,defbaud) ""
- set gdb_target(exec,baud-rates) {}
- set gdb_target(exec,cmd) ""
- set gdb_target(exec,runlist) {0 0 1 0}
- set gdb_target(exec,options) ""
- set gdb_target(exec,after_attaching) {}
-
- # ADS board w/SDS protocol
- set gdb_target(sds,pretty-name) "SDS"
- set gdb_target(sds,defbaud) "38400"
- set gdb_target(sds,baud-rates) {9600 38400}
- set gdb_target(sds,cmd) "sds com1"
- set gdb_target(sds,runlist) {1 1 0 1}
- set gdb_target(sds,after_attaching) {}
-
- # Simulator
- set gdb_target(sim,pretty-name) "Simulator"
- set gdb_target(sim,defbaud) ""
- set gdb_target(sim,baud-rates) {}
- set gdb_target(sim,cmd) "sim"
- set gdb_target(sim,runlist) {1 1 1 0}
- set gdb_target(sim,options) ""
- set gdb_target(sim,after_attaching) {}
-
- # Remote
- set gdb_target(remote,pretty-name) "Remote/Serial"
- set gdb_target(remote,defbaud) "9600"
- set gdb_target(remote,baud-rates) {9600 19200 38400 57600 115200}
- set gdb_target(remote,cmd) "remote com1"
- set gdb_target(remote,runlist) {1 1 0 1}
- set gdb_target(remote,after_attaching) {}
- set gdb_target(remotetcp,pretty-name) "Remote/TCP"
- set gdb_target(remotetcp,defbaud) "TCP"
- set gdb_target(remotetcp,baud-rates) {}
- set gdb_target(remotetcp,cmd) "remote tcpX"
- set gdb_target(remotetcp,runlist) {1 1 0 1}
- set gdb_target(remotetcp,after_attaching) {}
-
- # ARM Angel
- set gdb_target(rdi,pretty-name) "ARM Angel/Serial"
- set gdb_target(rdi,defbaud) "9600"
- set gdb_target(rdi,baud-rates) {9600 19200 38400 57600 115200}
- set gdb_target(rdi,cmd) "rdi com1"
- set gdb_target(rdi,runlist) {1 1 0 1}
- set gdb_target(rdi,after_attaching) {}
-
- # ARM Angel/Ethernet
- set gdb_target(rditcp,pretty-name) "ARM Angel/Ethernet"
- set gdb_target(rditcp,defbaud) "ETH"
- set gdb_target(rditcp,baud-rates) {}
- set gdb_target(rditcp,cmd) "rdi ethX"
- set gdb_target(rditcp,runlist) {1 1 0 1}
- set gdb_target(rditcp,after_attaching) {}
-
- # ARM Remote
- set gdb_target(rdp,pretty-name) "ARM Remote/Serial"
- set gdb_target(rdp,defbaud) "9600"
- set gdb_target(rdp,baud-rates) {9600}
- set gdb_target(rdp,cmd) "rdp com1"
- set gdb_target(rdp,runlist) {1 1 0 1}
- set gdb_target(rdp,after_attaching) {}
- set gdb_target(rdptcp,pretty-name) "ARM Remote/TCP"
- set gdb_target(rdptcp,defbaud) "TCP"
- set gdb_target(rdptcp,baud-rates) {}
- set gdb_target(rdptcp,cmd) "rdp tcpX"
- set gdb_target(rdptcp,runlist) {1 1 0 1}
- set gdb_target(rdptcp,after_attaching) {}
-
- # m32r rev C
- set gdb_target(m32r,pretty-name) "M32R/Serial"
- set gdb_target(m32r,defbaud) "9600"
- set gdb_target(m32r,baud-rates) {9600}
- set gdb_target(m32r,cmd) "m32r com1"
- set gdb_target(m32r,runlist) {1 1 0 1}
- set gdb_target(m32r,after_attaching) {}
- set gdb_target(m32rtcp,pretty-name) "M32R/TCP"
- set gdb_target(m32rtcp,defbaud) "TCP"
- set gdb_target(m32rtcp,baud-rates) {}
- set gdb_target(m32rtcp,cmd) "m32r tcpX"
- set gdb_target(m32rtcp,runlist) {1 1 0 1}
- set gdb_target(m32rtcp,after_attaching) {}
-
- # m32r msa2000
- set gdb_target(mon2000,pretty-name) "MON2000/Serial"
- set gdb_target(mon2000,defbaud) "9600"
- set gdb_target(mon2000,baud-rates) {9600}
- set gdb_target(mon2000,cmd) "mon2000 com1"
- set gdb_target(mon2000,runlist) {1 1 0 1}
- set gdb_target(mon2000,after_attaching) {}
- set gdb_target(mon2000tcp,pretty-name) "MON2000/TCP"
- set gdb_target(mon2000tcp,defbaud) "TCP"
- set gdb_target(mon2000tcp,baud-rates) {}
- set gdb_target(mon2000tcp,cmd) "mon2000 tcpX"
- set gdb_target(mon2000tcp,runlist) {1 1 0 1}
- set gdb_target(mon2000tcp,after_attaching) {}
-
- # sparclite
- set gdb_target(sparclite,pretty-name) "SPARClite/Serial"
- set gdb_target(sparclite,defbaud) "9600"
- set gdb_target(sparclite,baud-rates) {9600}
- set gdb_target(sparclite,cmd) "sparclite com1"
- set gdb_target(sparclite,runlist) {1 1 0 1}
- set gdb_target(sparclite,after_attaching) {}
- set gdb_target(sparclitetcp,pretty-name) "SPARClite/TCP"
- set gdb_target(sparclitetcp,defbaud) "TCP"
- set gdb_target(sparclitetcp,baud-rates) {}
- set gdb_target(sparclitetcp,cmd) "sparclite tcpX"
- set gdb_target(sparclitetcp,runlist) {1 1 0 1}
- set gdb_target(sparclitetcp,after_attaching) {}
-
- # V850 ICE
- set gdb_target(ice,pretty-name) "V850 ICE"
- set gdb_target(ice,defbaud) ""
- set gdb_target(ice,baud-rates) {}
- set gdb_target(ice,cmd) "ice"
- set gdb_target(ice,runlist) {1 1 0 1}
- set gdb_target(ice,after_attaching) {}
-
- # MIPS
- set gdb_target(mips,pretty-name) "MIPS/Serial"
- set gdb_target(mips,defbaud) "9600"
- set gdb_target(mips,baud-rates) {9600}
- set gdb_target(mips,cmd) "mips com1"
- set gdb_target(mips,runlist) {1 1 0 1}
- set gdb_target(mips,after_attaching) {}
- set gdb_target(mipstcp,pretty-name) "MIPS/TCP"
- set gdb_target(mipstcp,defbaud) "TCP"
- set gdb_target(mipstcp,baud-rates) {}
- set gdb_target(mipstcp,cmd) "mips tcpX"
- set gdb_target(mipstcp,runlist) {1 1 0 1}
- set gdb_target(mipstcp,after_attaching) {}
-
- # PMON
- set gdb_target(pmon,pretty-name) "PMON/Serial"
- set gdb_target(pmon,defbaud) "9600"
- set gdb_target(pmon,baud-rates) {9600 19200 38400}
- set gdb_target(pmon,cmd) "pmon com1"
- set gdb_target(pmon,runlist) {1 1 0 1}
- set gdb_target(pmon,after_attaching) {}
- set gdb_target(pmontcp,pretty-name) "PMON/TCP"
- set gdb_target(pmontcp,defbaud) "TCP"
- set gdb_target(pmontcp,baud-rates) {}
- set gdb_target(pmontcp,cmd) "pmon tcpX"
- set gdb_target(pmontcp,runlist) {1 1 0 1}
- set gdb_target(pmontcp,after_attaching) {}
-
- # DDB
- set gdb_target(ddb,pretty-name) "DDB/Serial"
- set gdb_target(ddb,defbaud) "19200"
- set gdb_target(ddb,baud-rates) {9600 19200 38400}
- set gdb_target(ddb,cmd) "ddb com1"
- set gdb_target(ddb,runlist) {1 1 0 1}
- set gdb_target(ddb,after_attaching) {}
- set gdb_target(ddbtcp,pretty-name) "DDB/TCP"
- set gdb_target(ddbtcp,defbaud) "TCP"
- set gdb_target(ddbtcp,baud-rates) {}
- set gdb_target(ddbtcp,cmd) "ddb tcpX"
- set gdb_target(ddbtcp,runlist) {1 1 0 1}
- set gdb_target(ddbtcp,after_attaching) {}
-
- # Picobug
- set gdb_target(picobug,pretty-name) "Picobug/Serial"
- set gdb_target(picobug,defbaud) "19200"
- set gdb_target(picobug,baud-rates) {19200}
- set gdb_target(picobug,cmd) "picobug com1"
- set gdb_target(picobug,runlist) {1 1 0 1}
- set gdb_target(picobug,after_attaching) {}
- set gdb_target(picobugtcp,pretty-name) "Picobug/TCP"
- set gdb_target(picobugtcp,defbaud) "TCP"
- set gdb_target(picobugtcp,baud-rates) {}
- set gdb_target(picobugtcp,cmd) "picobug tcpX"
- set gdb_target(picobugtcp,runlist) {1 1 0 1}
- set gdb_target(picobugtcp,after_attaching) {}
-
- # Cisco.
- set gdb_target(cisco,pretty-name) "Cisco/Serial"
- set gdb_target(cisco,defbaud) "38400"
- set gdb_target(cisco,baud-rates) {9600 19200 38400 56000}
- set gdb_target(cisco,cmd) "cisco com1"
- set gdb_target(cisco,runlist) {1 0 0 0}
- set gdb_target(cisco,after_attaching) "set os cisco"
- set gdb_target(ciscotcp,pretty-name) "Cisco/TCP"
- set gdb_target(ciscotcp,defbaud) "TCP"
- set gdb_target(ciscotcp,baud-rates) {}
- set gdb_target(ciscotcp,cmd) "cisco tcpX"
- set gdb_target(ciscotcp,runlist) {1 0 0 0}
- set gdb_target(ciscotcp,after_attaching) "set os cisco"
-
- # VxWorks
- set gdb_target(vxworks,pretty-name) "VxWorks RDB"
- set gdb_target(vxworks,defbaud) "ETH"
- set gdb_target(vxworks,baud-rates) {}
- set gdb_target(vxworks,cmd) "vxworks ethX"
- set gdb_target(vxworks,runlist) { 1 0 1 1}
- set gdb_target(vxworks,after_attaching) { sym vxWorks.st }
-
- # GDBServer, libremote, rda, etc
- set gdb_target(gdbserver,pretty-name) "GDBserver"
- set gdb_target(gdbserver,pretty-name) "GDBserver/Serial"
- set gdb_target(gdbserver,defbaud) "9600"
- set gdb_target(gdbserver,baud-rates) {9600 19200 38400 57600 115200}
- set gdb_target(gdbserver,cmd) "remote com1"
- set gdb_target(gdbserver,runlist) {1 0 0 1}
- set gdb_target(gdbserver,after_attaching) {}
- set gdb_target(gdbservertcp,pretty-name) "GDBserver/TCP"
- set gdb_target(gdbservertcp,defbaud) "TCP"
- set gdb_target(gdbservertcp,baud-rates) {}
- set gdb_target(gdbservertcp,cmd) "remote tcpX"
- set gdb_target(gdbservertcp,runlist) {1 0 0 1}
- set gdb_target(gdbservertcp,after_attaching) {}
-}
-
-itcl::body TargetSelection::default_port {} {
- global tcl_platform
- switch -regexp $tcl_platform(os) {
- Windows { set port com1 }
- Linux { set port /dev/ttyS0 }
- SunOS { set port /dev/ttya }
- AIX { set port /dev/foo1 }
- ULTRIX { set port /dev/foo1 }
- IRIX { set port /dev/foo1 }
- OSF1 { set port /dev/foo1 }
- NetBSD { set port /dev/foo1 }
- HP-UX {
- # Special case...
- switch -regexp $tcl_platform(osVersion) {
- A.09 { set port /dev/tty00 }
- B.10 -
- B.11 { set port /dev/tty0p0 }
- }
- }
- default { set port /dev/ttya }
- }
-
- return $port
-}
-
-
-itcl::body TargetSelection::_init_prefs {} {
-
- if {$prefs_inited} {
- return
- }
- set prefs_inited 1
-
- # these are not target-specific
-
- pref define gdb/load/main 1
- pref define gdb/load/exit 1
- pref define gdb/load/check 0
-
- # these are target-specific
- # set up the defaults
- pref define gdb/load/default-verbose 0
- pref define gdb/load/default-port [default_port]
- pref define gdb/load/default-hostname ""
- pref define gdb/load/default-after_attaching {}
-}
-
-itcl::body TargetSelection::_init_target {} {
- global gdb_target_name
- set target_list [get_target_list]
- set target $gdb_target_name
-
- # target = CANCEL should never come into here. If the target was
- # returned as CANCEL, it should be fixed by the caller... But it
- # should not be harmful if it gets in here.
-
- if {$target == "" || [string compare $target CANCEL] == 0} {
- set target default
- }
-
- set defbaud $gdb_target($target,defbaud)
- pref define gdb/load/$target-baud $defbaud
- pref define gdb/load/$target-port [pref get gdb/load/default-port]
- pref define gdb/load/$target-verbose [pref get gdb/load/default-verbose]
- pref define gdb/load/$target-portname 1000
- pref define gdb/load/$target-hostname [pref get gdb/load/default-hostname]
-
- set err [catch {pref get gdb/load/$target-runlist} run_list]
- if {$err} {
- set run_list $gdb_target($target,runlist)
- pref setd gdb/load/$target-runlist $run_list
- }
- pref set gdb/src/run_attach [lindex $run_list 0]
- pref set gdb/src/run_load [lindex $run_list 1]
- pref set gdb/src/run_run [lindex $run_list 2]
- pref set gdb/src/run_cont [lindex $run_list 3]
-
- set err [catch {pref get gdb/load/$target-after_attaching} aa]
- if {$err} {
- set aa $gdb_target($target,after_attaching)
- pref setd gdb/load/$target-after_attaching $aa
- }
-}
-
-itcl::body TargetSelection::_init {} {
-
- if {!$trace_inited} {
- # Trace all gdb_loaded changes based on target
- trace variable gdb_loaded w [code TargetSelection::target_trace]
- }
- set trace_inited 1
-
- init_target_db ;# initialize database
- _init_prefs ;# initialize load prefs
- _init_target ;# initialize target prefs
- set_saved
-
- # This tells us that the target system is inited. Some of these
- # init functions need to be called every time the target dialog is
- # posted, some only once. The latter functions can check inited to
- # see what they should do.
-
-}
-
-# ------------------------------------------------------------------
-# METHOD: build_win - build the dialog
-# ------------------------------------------------------------------
-itcl::body TargetSelection::build_win {} {
- global tcl_platform PREFS_state gdb_ImageDir gdb_target_name
-
- set f [frame $itk_interior.f]
- set opts [frame $itk_interior.moreoptions]
- frame $itk_interior.moreoptionsframe
- set btns [frame $itk_interior.buttons]
-
- #labelled frame "Connection"
- iwidgets::Labeledframe $f.lab -labelpos nw -labeltext [gettext "Connection"]
- set fr [$f.lab childsite]
-
- # target name
- label $fr.tarl -text [gettext "Target:"]
- combobox::combobox $fr.tar -editable 0 -command [code $this change_target] \
- -width $Width -maxheight 10 -bg $::Colors(textbg)
-
- # baud rate combobox
- label $fr.cbl -text [gettext "Baud Rate:"]
- combobox::combobox $fr.cb -editable 0 -command [code $this change_baud] \
- -textvariable [pref varname gdb/load/$target-baud] -width $Width \
- -maxheight 10 -bg $::Colors(textbg)
-
- if {[catch {gdb_cmd "show remotebaud"} res]} {
- set baud [pref get gdb/load/$target-baud]
- } else {
- set baud [lindex $res end]
- set baud [string trimright $baud "."]
- # When uninitialized, GDB returns a baud rate of 2^32
- # Detect this and ignore it.
- if {$baud > 4000000000} {
- set baud [pref get gdb/load/$target-baud]
- } else {
- pref setd gdb/load/$target-baud $baud
- }
- }
-
- # host entry widget
- entry $fr.host -textvariable [pref varname gdb/load/$target-hostname] \
- -width $Width
-
- # port combobox
- if {$tcl_platform(platform) == "windows"} {
- set editable 0
- } else {
- set editable 1
- }
-
- label $fr.portl -text [gettext "Port:"]
- combobox::combobox $fr.port -editable $editable \
- -textvariable [pref varname gdb/load/$target-port] \
- -width $Width -maxheight 10 -bg $::Colors(textbg)
-
- # load baud rates into combobox
- fill_rates
-
- # load port combobox
- if {$tcl_platform(platform) == "windows"} {
- foreach val [port_list] {
- $fr.port list insert end $val
- }
- } else {
- # fixme: how do I find valid values for these????
- switch $tcl_platform(os) {
- Linux { set ports [list /dev/cua0 /dev/ttyS0 /dev/ttyS1 /dev/ttyS2 /dev/ttyS3]}
- SunOS { set ports [list /dev/ttya /dev/ttyb] }
- AIX { set ports [list /dev/foo1 /dev/foo2] }
- ULTRIX { set ports [list /dev/foo1 /dev/foo2] }
- IRIX { set ports [list /dev/foo1 /dev/foo2] }
- OSF1 { set ports [list /dev/foo1 /dev/foo2] }
- NetBSD { set ports [list /dev/foo1 /dev/foo2] }
- HP-UX {
- # Special case...
- switch -regexp $tcl_platform(osVersion) {
- A.09 { set ports [list /dev/tty00 /dev/tty01] }
- B.10 -
- B.11 { set ports [list /dev/tty0p0 /dev/tty1p0] }
- }
- }
- default { set ports [list UNKNOWN UNKNOWN] }
- }
- foreach val $ports {
- $fr.port list insert end $val
- }
- }
-
- # Port entry widget
- entry $fr.porte -textvariable [pref varname gdb/load/$target-port] -width $Width
-
- frame $f.fr
- checkbutton $f.fr.main -text [gettext "Set breakpoint at 'main'"] \
- -variable [pref varname gdb/load/main]
- checkbutton $f.fr.exit -text [gettext "Set breakpoint at 'exit'"] \
- -variable [pref varname gdb/load/exit]
- frame $f.fr.bp
- checkbutton $f.fr.bp.at_func -text [gettext "Set breakpoint at"] \
- -variable [pref varname gdb/load/bp_at_func]
- entry $f.fr.bp.func -textvariable [pref varname gdb/load/bp_func] -width 20
- checkbutton $f.fr.verb -text [gettext "Display Download Dialog"] \
- -variable [pref varname gdb/load/$target-verbose]
-
- if {$tcl_platform(platform) == "unix"} {
- checkbutton $f.fr.xterm -text [gettext "Use xterm as inferior's tty"] \
- -variable [pref varname gdb/process/xtermtty] \
- -onvalue yes -offvalue no
- }
-
- if {![pref get gdb/control_target]} {
- $f.fr.main configure -state disabled
- $f.fr.exit configure -state disabled
- $f.fr.verb configure -state disabled
- $f.fr.bp.at_func configure -state disabled
- $f.fr.bp.func configure -state disabled
- checkbutton $f.fr.check -text [gettext "Compare to remote executable"] \
- -variable [pref varname gdb/load/check]
- if { $gdb_target_name == "exec" } {
- $f.fr.check configure -state disabled
- }
- }
-
- grid $fr.tarl $fr.tar -sticky w -padx 5 -pady 5
- grid $fr.cbl $fr.cb -sticky w -padx 5 -pady 5
- grid $fr.portl $fr.port -sticky w -padx 5 -pady 5
- set mapped1 $fr.cb
- set mapped2 $fr.port
-
- grid $f.fr.main -sticky w -padx 5 -pady 5
- grid $f.fr.exit -sticky w -padx 5 -pady 5
- pack $f.fr.bp.at_func $f.fr.bp.func -side left
- grid $f.fr.bp -sticky w -padx 5 -pady 5
- grid $f.fr.verb -sticky w -padx 5 -pady 5
- if {$tcl_platform(platform) == "unix"} {
- grid $f.fr.xterm -sticky w -padx 5 -pady 5
- }
- if {![pref get gdb/control_target]} {
- grid $f.fr.check -sticky w -padx 5 -pady 5
- }
-
- grid $f.lab $f.fr -sticky w -padx 5 -pady 5
-
- # Create the "More Options" thingy
- if {[lsearch [image names] _MORE_] == -1} {
- image create photo _MORE_ -file [file join $gdb_ImageDir more.gif]
- image create photo _LESS_ -file [file join $gdb_ImageDir less.gif]
- }
-
- set MoreButton [button $opts.button -image _MORE_ \
- -relief flat -command [code $this toggle_more_options]]
- set MoreLabel [label $opts.lbl -text {More Options}]
- frame $opts.frame -relief raised -bd 1
- pack $opts.button $opts.lbl -side left
- place $opts.frame -relx 1 -x -10 -rely 0.5 -relwidth 0.73 -height 2 -anchor e
-
- # Create the (hidden) more options frame
- set MoreFrame [iwidgets::Labeledframe $itk_interior.moreoptionsframe.frame \
- -labelpos nw -labeltext {Run Options}]
- set frame [$MoreFrame childsite]
-
- set var [pref varname gdb/src/run_attach]
- checkbutton $frame.attach -text {Attach to Target} -variable $var
-
- set var [pref varname gdb/src/run_load]
- checkbutton $frame.load -text {Download Program} -variable $var
-
- set rm_frame [iwidgets::labeledframe $frame.run_method -labelpos nw -labeltext "Run Method" ]
- set RunMethod [ $rm_frame childsite ]
-
- set var [pref varname gdb/src/run_cont]
- radiobutton $RunMethod.cont -text {Continue from Last Stop} -value 1 -variable $var \
- -command [code $this set_run run]
-
- set var [pref varname gdb/src/run_run]
- radiobutton $RunMethod.run -text {Run Program} -value 1 -variable $var \
- -command [code $this set_run cont]
-
- # The after attaching command entry
- set _after_entry [entry $frame.aftere]
- label $frame.afterl -text {Command to issue after attaching:}
-
- grid $frame.attach -column 0 -row 1 -padx 10 -sticky w
- grid $frame.load -column 0 -row 2 -padx 10 -sticky w
-
- grid $RunMethod.run -column 0 -row 1 -sticky w -ipady 2
- grid $RunMethod.cont -column 0 -row 2 -sticky w -ipady 2
-
- grid $rm_frame -column 1 -row 1 -rowspan 2 -sticky nsew -ipady 2
-
- grid $frame.afterl -row 4 -sticky we -columnspan 2 -ipady 2
- grid $frame.aftere -sticky we -columnspan 2 -ipady 2
- grid columnconfigure $frame 0 -weight 1
- grid columnconfigure $frame 1 -weight 1
-
- # Map everything onto the screen
- # This looks like a possible packing bug -- our topmost frame
- # will not resize itself. So, instead, use the topmost frame.
- #pack $f $opts $itk_interior.moreoptionsframe -side top -fill x
- pack $MoreFrame -fill x -expand yes
- pack $f $opts -side top -fill x
-
- change_target $gdb_target($target,pretty-name)
-
- button $btns.ok -text [gettext OK] -width 7 -command [code $this save] \
- -default active
- button $btns.cancel -text [gettext Cancel] -width 7 \
- -command [code $this cancel]
- button $btns.help -text [gettext Help] -width 7 -command [code $this help]
-
- standard_button_box $btns
- bind $btns.ok <Return> "$btns.ok flash; $btns.ok invoke"
- bind $btns.cancel <Return> "$btns.cancel flash; $btns.cancel invoke"
- bind $btns.help <Return> "$btns.help flash; $btns.help invoke"
-
- pack $btns -side bottom -anchor e
- focus $btns.ok
-
- # set up balloon help
- balloon register $f.fr.bp.at_func "Set User-Speficied Breakpoints at Run Time"
- balloon register $f.fr.bp.func "Enter a List of Functions for Breakpoints"
-
- window_name "Target Selection"
-
- if {[valid_target $target]} {
- $fr.tar configure -value $gdb_target($target,pretty-name)
- }
- fill_targets
-
-
-}
-
-# ------------------------------------------------------------------
-# METHOD: set_saved - set saved values
-# ------------------------------------------------------------------
-itcl::body TargetSelection::set_saved {} {
- set saved_baud [pref get gdb/load/$target-baud]
- set saved_port [pref get gdb/load/$target-port]
- set saved_main [pref get gdb/load/main]
- set saved_exit [pref get gdb/load/exit]
- set saved_check [pref get gdb/load/check]
- set saved_verb [pref get gdb/load/$target-verbose]
- set saved_portname [pref get gdb/load/$target-portname]
- set saved_hostname [pref get gdb/load/$target-hostname]
- set saved_attach [pref get gdb/src/run_attach]
- set saved_load [pref get gdb/src/run_load]
- set saved_run [pref get gdb/src/run_run]
- set saved_cont [pref get gdb/src/run_cont]
- if {[info exists gdb_target($target,options)]} {
- if {[catch {pref get gdb/load/$target-opts} saved_options]} {
- set saved_options ""
- }
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: write_saved - write saved values to preferences
-# ------------------------------------------------------------------
-itcl::body TargetSelection::write_saved {} {
- pref setd gdb/load/$target-baud $saved_baud
- pref setd gdb/load/$target-port $saved_port
- pref setd gdb/load/main $saved_main
- pref setd gdb/load/exit $saved_exit
- pref setd gdb/load/check $saved_check
- pref setd gdb/load/$target-verbose $saved_verb
- pref setd gdb/load/$target-portname $saved_portname
- pref setd gdb/load/$target-hostname $saved_hostname
- pref setd gdb/load/$target-runlist [list $saved_attach $saved_load $saved_run $saved_cont]
- if {[info exists gdb_target($target,options)]} {
- pref setd gdb/load/$target-opts $saved_options
- }
- if {[catch {$_after_entry get} saved_after_attaching]} {
- set saved_after_attaching ""
- }
- pref setd gdb/load/$target-after_attaching $saved_after_attaching
-}
-
-# ------------------------------------------------------------------
-# METHOD: fill_rates - fill baud rate combobox
-# ------------------------------------------------------------------
-itcl::body TargetSelection::fill_rates {} {
- $fr.cb list delete 0 end
-
- if {$gdb_target($target,baud-rates) != ""} {
- foreach val $gdb_target($target,baud-rates) {
- $fr.cb list insert end $val
- }
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: fill_targets - fill target combobox
-# ------------------------------------------------------------------
-itcl::body TargetSelection::fill_targets {} {
- #[$fr.tar subwidget listbox] delete 0 end
- $fr.tar list delete 0 end
-
- foreach val $target_list {
- if {[info exists gdb_target($val,pretty-name)]} {
- $fr.tar list insert end $gdb_target($val,pretty-name)
-
- # Insert TCP target, if it exists
- if {[info exists gdb_target(${val}tcp,pretty-name)]} {
- $fr.tar list insert end $gdb_target(${val}tcp,pretty-name)
- }
- }
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: config_dialog - Convenience method to map/unmap/rename
-# components onto the screen based on target T.
-# ------------------------------------------------------------------
-itcl::body TargetSelection::config_dialog {t} {
- pref define gdb/load/$t-verbose [pref get gdb/load/verbose]
- $f.fr.verb config -variable [pref varname gdb/load/$t-verbose]
- # Map the correct entries and comboboxes onto the screen
- if {$gdb_target($t,defbaud) == "TCP"} {
- # we have a tcp target
- # map host and porte
- if {$mapped1 != "$fr.host"} {
- grid forget $mapped1
- set mapped1 $fr.host
- grid $mapped1 -row 1 -column 1 -sticky w -padx 5 -pady 5
- }
- $fr.cbl configure -text "Hostname:"
- $fr.host config -textvariable [pref varname gdb/load/$t-hostname]
-
- if {$mapped2 != "$fr.porte"} {
- grid forget $mapped2
- set mapped2 $fr.porte
- grid $mapped2 -row 2 -column 1 -sticky w -padx 5 -pady 5
- }
- $fr.portl configure -text {Port:}
- $fr.porte config -textvariable [pref varname gdb/load/$t-portname] -fg black
-
- $mapped1 configure -state normal
- $mapped2 configure -state normal
- } elseif {$gdb_target($t,defbaud) == "ETH"} {
- # we have a udp target
- # map host and porte
- if {$mapped1 != "$fr.host"} {
- grid forget $mapped1
- set mapped1 $fr.host
- grid $mapped1 -row 1 -column 1 -sticky w -padx 5 -pady 5
- }
- $fr.cbl configure -text "Hostname:"
- $fr.host config -textvariable [pref varname gdb/load/$t-hostname]
-
- if {$mapped2 != "$fr.porte"} {
- grid forget $mapped2
- }
- $fr.portl configure -text {Port: N/A (fixed)}
-
- $mapped1 configure -state normal
- $mapped2 configure -state disabled
- } elseif {$gdb_target($t,defbaud) != ""} {
- # we have a serial target
- # map port and cb
- if {$mapped1 != "$fr.cb"} {
- grid forget $mapped1
- set mapped1 $fr.cb
- grid $mapped1 -row 1 -column 1 -sticky w -padx 5 -pady 5
- }
- $fr.cbl configure -text "Baud Rate:"
- $fr.cb configure -textvariable [pref varname gdb/load/$t-baud]
-
- if {$mapped2 != "$fr.port"} {
- grid forget $mapped2
- set mapped2 $fr.port
- grid $mapped2 -row 2 -column 1 -sticky w -padx 5 -pady 5
- }
- $fr.portl configure -text {Port:}
- $fr.port configure -textvariable [pref varname gdb/load/$t-port]
-
- $mapped1 configure -state normal
- $mapped2 configure -state normal
- } else {
- # we have a non-remote(-like) target
- # disable all (except tar) and check for
- # options
- $mapped1 configure -state disabled
- $mapped2 configure -state disabled
- $fr.porte configure -fg gray
-
- if {[info exists gdb_target($t,options)]} {
- if {$mapped1 != "$fr.host"} {
- grid forget $mapped1
- set mapped1 $fr.host
- grid $mapped1 -row 1 -column 1 -sticky w -padx 5 -pady 5
- }
- $mapped1 configure -state normal
- $fr.host config -textvariable [pref varname gdb/load/$t-opts]
-
- # We call options "arguments" for the exec target
- # FIXME: this is really overloaded!!
- if {$t == "exec"} {
- set text "Arguments:"
- } else {
- set text "Options:"
- }
- $fr.cbl configure -text $text
- }
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: change_target - callback for target combobox
-# ------------------------------------------------------------------
-itcl::body TargetSelection::change_target {w {name ""}} {
- if {$name == ""} {return}
- set target [get_target $name]
-
- if { "$target" == "exec" } {
- $RunMethod.run configure -state disabled -value 1
- $RunMethod.cont configure -state disabled
- } else {
- $RunMethod.run configure -state normal
- $RunMethod.cont configure -state normal
- }
-
- debug "$target"
- set defbaud $gdb_target($target,defbaud)
- pref define gdb/load/$target-baud $defbaud
- pref define gdb/load/$target-portname 1000
- pref define gdb/load/$target-hostname [pref get gdb/load/default-hostname]
- if {$defbaud == ""} {
- pref define gdb/load/$target-port ""
- } else {
- pref define gdb/load/$target-port [pref get gdb/load/default-port]
- }
-
- config_dialog $target
- fill_rates
-
- # Configure the default run options for this target
- set err [catch {pref get gdb/load/$target-runlist} run_list]
- if {$err} {
- set run_list $gdb_target($target,runlist)
- pref setd gdb/load/$target-runlist $run_list
- }
-
- pref set gdb/src/run_attach [lindex $run_list 0]
- pref set gdb/src/run_load [lindex $run_list 1]
- pref set gdb/src/run_run [lindex $run_list 2]
- pref set gdb/src/run_cont [lindex $run_list 3]
- set_check_button $name
-
- set err [catch {pref get gdb/load/$target-after_attaching} aa]
- if {$err} {
- set aa $gdb_target($target,after_attaching)
- pref setd gdb/load/$target-after_attaching $aa
- }
-
- $_after_entry delete 0 end
- $_after_entry insert 0 $aa
-
- set_saved
-
- set changes 0
-}
-
-# ------------------------------------------------------------------
-# PRIVATE METHOD: change_baud - called when the baud rate is changed.
-# If GDB is running, set baud rate in GDB and read it back.
-# ------------------------------------------------------------------
-itcl::body TargetSelection::change_baud {w {baud ""}} {
- if {$baud != ""} {
- if {([string compare $baud "TCP"] != 0)
- && ([string compare $baud "ETH"] != 0)} {
- gdb_cmd "set remotebaud $baud"
- if {[catch {gdb_cmd "show remotebaud"} res]} {
- set newbaud 0
- } else {
- set newbaud [lindex $res end]
- set newbaud [string trimright $newbaud "."]
- if {$newbaud > 4000000} {
- set newbaud 0
- }
- }
- if {$newbaud != $baud} {
- pref set gdb/load/$target-baud $newbaud
- }
- }
- }
-}
-
-
-# ------------------------------------------------------------------
-# METHOD: port_list - return a list of valid ports for Windows
-# ------------------------------------------------------------------
-itcl::body TargetSelection::port_list {} {
- set plist ""
- # Scan com1 - com8 trying to open each one.
- # If permission is denied that means it is in use,
- # which is OK because we may be using it or the user
- # may be setting up the remote target manually with
- # a terminal program.
- set quit 0
- for {set i 1} {!$quit} {incr i} {
- if {[catch { set fd [::open COM$i: RDWR] } msg]} {
- # Failed. Find out why.
- if {[string first "permission denied" $msg] != -1} {
- # Port is there, but busy right now. That's OK.
- lappend plist /dev/com$i
- } elseif {$i > 4} {
- # if we've scanned the first 4 ports, then quit when we find no more
- set quit 1
- }
- } else {
- # We got it. Now close it and add to list.
- close $fd
- lappend plist /dev/com$i
- }
- }
- return $plist
-}
-
-# ------------------------------------------------------------------
-# METHOD: get_target_list - return a list of targets supported
-# by this GDB. Parses the output of "help target"
-# ------------------------------------------------------------------
-itcl::body TargetSelection::get_target_list {} {
- set native [native_debugging]
- set names ""
- set res [gdb_cmd "help target"]
- foreach line [split $res \n] {
- if {![string compare [lindex $line 0] "target"]} {
- set name [lindex $line 1]
-
- # For cross debuggers, do not allow the target "exec"
- if {$name == "exec" && !$native} {
- continue
- }
- lappend names $name
- }
- }
- lappend names gdbserver
- return $names
-}
-
-# ------------------------------------------------------------------
-# METHOD: save - save values
-# ------------------------------------------------------------------
-itcl::body TargetSelection::save {} {
- global gdb_target_name
- set err [catch {
- set_saved
- write_saved
- set gdb_target_name $target
- pref setd gdb/load/target $target
- } errtxt]
- if {$err} {debug "target: $errtxt"}
- if {[valid_target $gdb_target_name]} {
- # Dismiss the dialog box
- unpost
- } else {
- tk_messageBox -message "The current target is not valid."
- }
-
-}
-
-
-# ------------------------------------------------------------------
-# METHOD: cancel - restore previous values
-# ------------------------------------------------------------------
-itcl::body TargetSelection::cancel {} {
- global gdb_target_name
- catch {gdb_cmd "set remotebaud $saved_baud"}
-
- $fr.cb configure -value $saved_baud
- write_saved
- if {$exportcancel} {
- set gdb_target_name CANCEL
- }
-
- # Now dismiss the dialog
- unpost
-}
-
-# ------------------------------------------------------------------
-# METHOD: set_check_button - enable/disable compare-section command
-# ------------------------------------------------------------------
-itcl::body TargetSelection::set_check_button {name} {
- if {[winfo exists $itk_interior.f.fr.check]} {
- if { $name == "exec" } {
- $itk_interior.f.fr.check configure -state disabled
- } else {
- $itk_interior.f.fr.check configure -state normal
- }
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: help - launches context sensitive help.
-# ------------------------------------------------------------------
-itcl::body TargetSelection::help {} {
- open_help target.html
-}
-
-# ------------------------------------------------------------------
-# METHOD: reconfig - used when preferences change
-# ------------------------------------------------------------------
-itcl::body TargetSelection::reconfig {} {
- # for now, just delete and recreate
- destroy $itk_interior.f
- build_win
-}
-
-# ------------------------------------------------------------------
-# METHOD: get_target - get the internal name of a target from the
-# pretty-name
-# ------------------------------------------------------------------
-itcl::body TargetSelection::get_target {name} {
- set t {}
- set list [array get gdb_target *,pretty-name]
- set i [lsearch -exact $list $name]
- if {$i != -1} {
- incr i -1
- set t [lindex [split [lindex $list $i] ,] 0]
- } else {
- debug "unknown pretty-name \"$name\""
- }
- return $t
-}
-
-# ------------------------------------------------------------------
-# METHOD: toggle_more_options -- toggle displaying the More/Fewer
-# Options pane
-# ------------------------------------------------------------------
-itcl::body TargetSelection::toggle_more_options {} {
- if {[$MoreLabel cget -text] == "More Options"} {
- $MoreLabel configure -text "Fewer Options"
- $MoreButton configure -image _LESS_
- # Bug in Tk? The top-most frame does not shrink...
- #pack $MoreFrame
- pack $itk_interior.moreoptionsframe -after $itk_interior.moreoptions -fill both -padx 5 -pady 5
- } else {
- $MoreLabel configure -text "More Options"
- $MoreButton configure -image _MORE_
- #pack forget $MoreFrame
- pack forget $itk_interior.moreoptionsframe
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: set_run - set the run button. Make sure not both run and
-# continue are selected.
-# ------------------------------------------------------------------
-itcl::body TargetSelection::set_run {check_which} {
- global PREFS_state
- set var [pref varname gdb/src/run_$check_which]
- global $var
- if {[set $var]} {
- set $var 0
- }
-}
-
-# ------------------------------------------------------------------
-# PROCEDURE: target_trace
-# This procedure is used to configure gdb_loaded
-# and possible more) whenever the value of gdb_loaded
-# is changed based on the current target.
-# ------------------------------------------------------------------
-itcl::body TargetSelection::target_trace {variable index op} {
- global gdb_target_name gdb_loaded
-
- switch $gdb_target_name {
-
- exec {
- # The exec target is always loaded.
- set gdb_loaded 1
- }
- }
-}
-
-# Returns 1 if TARGET is a _runnable_ target for this gdb.
-itcl::body TargetSelection::valid_target {target} {
-
- # always allow gdbserver
- if {$target == "gdbserver"} {return 1}
-
- set err [catch {gdb_cmd "help target $target"}]
- if {$target == "exec" && ![native_debugging]} {
- set err 1
- }
-
- if {[regexp "tcp$" $target]} {
- # Special case (of course)
- regsub tcp$ $target {} foo
- return [valid_target $foo]
- }
-
- return [expr {$err == 0}]
-}
-
-# Returns 1 if this is not a cross debugger.
-itcl::body TargetSelection::native_debugging {} {
- global GDBStartup
-
- set r [string compare $GDBStartup(host_name) $GDBStartup(target_name)]
- return [expr {!$r}]
-}
diff --git a/gdb/gdbtk/library/targetselection.ith b/gdb/gdbtk/library/targetselection.ith
deleted file mode 100644
index a7c9182491d..00000000000
--- a/gdb/gdbtk/library/targetselection.ith
+++ /dev/null
@@ -1,100 +0,0 @@
-# Target selection dialog class definition for GDBtk.
-# Copyright (C) 1997, 1998, 1999 Cygnus Solutions
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-itcl::class TargetSelection {
- inherit ModalDialog ManagedWin
-
- private {
- variable f
- variable fr
- variable target
- variable saved_baud
- variable saved_port
- variable saved_main
- variable saved_exit
- variable saved_check
- variable saved_verb
- variable saved_portname
- variable saved_hostname
- variable saved_attach
- variable saved_load
- variable saved_run
- variable saved_cont
- variable saved_options
- variable saved_after_attaching
- variable _after_entry
- variable changes 0
- variable target_list ""
-
- common db_inited 0
- common prefs_inited 0
- common trace_inited 0
-
- # The Connection frame has three "sections"; the first contains
- # a combobox with all the targets. The second can either be
- # a combobox listing available baud rates or an entry for specifying
- # the hostname of a TCP connection. The actual widget mapped onto the
- # screen is saved in MAPPED1. The third section contains either a
- # combobox for the serial port or an entry for the portnumber. The
- # widget actually mapped onto the screen is saved in MAPPED2.
- variable mapped1
- variable mapped2
-
- variable Width 20
- variable MoreButton
- variable MoreFrame
- variable MoreLabel
-
- variable RunMethod
-
- proc _init_prefs {}
- proc default_port {}
-
- method build_win {}
- method cancel {}
- method change_baud {w {baud ""}}
- method change_target {w {name ""}}
- method config_dialog {t}
- method fill_rates {}
- method fill_targets {}
- method get_target {name}
- method help {}
- method _init {}
- method _init_target {}
- method port_list {}
- method save {}
- method set_check_button {name}
- method set_run {check_which}
- method set_saved {}
- method target_trace {variable index op}
- method toggle_more_options {}
- method valid_target {target}
- method write_saved {}
- }
-
- public {
- variable exportcancel 0
-
- method constructor {args}
- method reconfig {}
-
- proc get_target_list {}
- proc native_debugging {}
- proc getname {target name}
- proc init_target_db {}
- }
-
- protected common gdb_target
-
-}
diff --git a/gdb/gdbtk/library/tclIndex b/gdb/gdbtk/library/tclIndex
deleted file mode 100644
index 03ad77e86a5..00000000000
--- a/gdb/gdbtk/library/tclIndex
+++ /dev/null
@@ -1,639 +0,0 @@
-# Tcl autoload index file, version 2.0
-# This file is generated by the "auto_mkindex" command
-# and sourced to set up indexing information for one or
-# more commands. Typically each line is a command that
-# sets an element in the auto_index array, where the
-# element name is the name of a command and the value is
-# a script that loads the command.
-
-set auto_index(About) [list source [file join $dir about.tcl]]
-set auto_index(ActionDlg) [list source [file join $dir actiondlg.tcl]]
-set auto_index(::Editor::edit) [list source [file join $dir editor.tcl]]
-set auto_index(open_help) [list source [file join $dir helpviewer.tcl]]
-set auto_index(prompt_helpname) [list source [file join $dir helpviewer.tcl]]
-set auto_index(gdbtk_tcl_set_variable) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_tcl_preloop) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_busy) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_update) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_update_safe) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_idle) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_quit_check) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_quit) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_force_quit) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_cleanup) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_tcl_query) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_tcl_warning) [list source [file join $dir interface.tcl]]
-set auto_index(show_warning) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_tcl_ignorable_warning) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_tcl_fputs) [list source [file join $dir interface.tcl]]
-set auto_index(echo) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_tcl_fputs_error) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_tcl_fputs_log) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_tcl_fputs_target) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_tcl_fputs_target_err) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_tcl_flush) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_tcl_start_variable_annotation) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_tcl_end_variable_annotation) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_tcl_breakpoint) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_tcl_tracepoint) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_tcl_trace_find_hook) [list source [file join $dir interface.tcl]]
-set auto_index(gdb_run_readline_command) [list source [file join $dir interface.tcl]]
-set auto_index(gdb_run_readline_command_no_output) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_tcl_readline_begin) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_tcl_readline) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_tcl_readline_end) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_tcl_busy) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_tcl_idle) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_tcl_tstart) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_tcl_tstop) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_tcl_display) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_register_changed) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_memory_changed) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_tcl_pre_add_symbol) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_tcl_post_add_symbol) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_tcl_file_changed) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_tcl_exec_file_display) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_locate_main) [list source [file join $dir interface.tcl]]
-set auto_index(set_exe_name) [list source [file join $dir interface.tcl]]
-set auto_index(set_exe) [list source [file join $dir interface.tcl]]
-set auto_index(_open_file) [list source [file join $dir interface.tcl]]
-set auto_index(_close_file) [list source [file join $dir interface.tcl]]
-set auto_index(set_target_name) [list source [file join $dir interface.tcl]]
-set auto_index(set_target) [list source [file join $dir interface.tcl]]
-set auto_index(run_executable) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_attach_remote) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_connect) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_step) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_next) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_finish) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_continue) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_stepi) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_nexti) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_attached) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_detached) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_stop) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_stop_idle_callback) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_detach) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_run) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_attach_native) [list source [file join $dir interface.tcl]]
-set auto_index(set_baud) [list source [file join $dir interface.tcl]]
-set auto_index(do_state_hook) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_disconnect) [list source [file join $dir interface.tcl]]
-set auto_index(tstart) [list source [file join $dir interface.tcl]]
-set auto_index(tstop) [list source [file join $dir interface.tcl]]
-set auto_index(source_file) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_signal) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_clear_file) [list source [file join $dir interface.tcl]]
-set auto_index(initialize_gdbtk) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_tcl_architecture_changed) [list source [file join $dir interface.tcl]]
-set auto_index(gdbtk_console_read) [list source [file join $dir interface.tcl]]
-set auto_index(Iipc) [list source [file join $dir ipc.tcl]]
-set auto_index(LocalsWin) [list source [file join $dir locals.tcl]]
-set auto_index(ModalDialog) [list source [file join $dir modal.tcl]]
-set auto_index(pref_read) [list source [file join $dir prefs.tcl]]
-set auto_index(pref_save) [list source [file join $dir prefs.tcl]]
-set auto_index(escape_value) [list source [file join $dir prefs.tcl]]
-set auto_index(unescape_value) [list source [file join $dir prefs.tcl]]
-set auto_index(pref_set_defaults) [list source [file join $dir prefs.tcl]]
-set auto_index(pref_set_colors) [list source [file join $dir prefs.tcl]]
-set auto_index(pref_load_default) [list source [file join $dir prefs.tcl]]
-set auto_index(pref_load_gnome) [list source [file join $dir prefs.tcl]]
-set auto_index(load_gnome_file) [list source [file join $dir prefs.tcl]]
-set auto_index(pref_set_option_db) [list source [file join $dir prefs.tcl]]
-set auto_index(::Session::_exe_name) [list source [file join $dir session.tcl]]
-set auto_index(::Session::_serialize_bps) [list source [file join $dir session.tcl]]
-set auto_index(::Session::_recreate_bps) [list source [file join $dir session.tcl]]
-set auto_index(::Session::save) [list source [file join $dir session.tcl]]
-set auto_index(::Session::load) [list source [file join $dir session.tcl]]
-set auto_index(::Session::notice_file_change) [list source [file join $dir session.tcl]]
-set auto_index(::Session::delete) [list source [file join $dir session.tcl]]
-set auto_index(::Session::list_names) [list source [file join $dir session.tcl]]
-set auto_index(TdumpWin) [list source [file join $dir tdump.tcl]]
-set auto_index(TraceDlg) [list source [file join $dir tracedlg.tcl]]
-set auto_index(gdb_add_tracepoint) [list source [file join $dir tracedlg.tcl]]
-set auto_index(gdb_edit_tracepoint) [list source [file join $dir tracedlg.tcl]]
-set auto_index(::tty::create) [list source [file join $dir tty.tcl]]
-set auto_index(::tty::destroy) [list source [file join $dir tty.tcl]]
-set auto_index(keep_raised) [list source [file join $dir util.tcl]]
-set auto_index(sleep) [list source [file join $dir util.tcl]]
-set auto_index(auto_step) [list source [file join $dir util.tcl]]
-set auto_index(auto_step_cancel) [list source [file join $dir util.tcl]]
-set auto_index(tfind_cmd) [list source [file join $dir util.tcl]]
-set auto_index(save_trace_commands) [list source [file join $dir util.tcl]]
-set auto_index(do_test) [list source [file join $dir util.tcl]]
-set auto_index(gdbtk_read_defs) [list source [file join $dir util.tcl]]
-set auto_index(bp_exists) [list source [file join $dir util.tcl]]
-set auto_index(gridCGet) [list source [file join $dir util.tcl]]
-set auto_index(get_disassembly_flavor) [list source [file join $dir util.tcl]]
-set auto_index(list_disassembly_flavors) [list source [file join $dir util.tcl]]
-set auto_index(init_disassembly_flavor) [list source [file join $dir util.tcl]]
-set auto_index(list_element_strcmp) [list source [file join $dir util.tcl]]
-set auto_index(gdbtk_endian) [list source [file join $dir util.tcl]]
-set auto_index(set_bg_colors) [list source [file join $dir util.tcl]]
-set auto_index(r_setcolors) [list source [file join $dir util.tcl]]
-set auto_index(recolor) [list source [file join $dir util.tcl]]
-set auto_index(WarningDlg) [list source [file join $dir warning.tcl]]
-set auto_index(::WarningDlg::constructor) [list source [file join $dir warning.tcl]]
-set auto_index(WatchWin) [list source [file join $dir watch.tcl]]
-set auto_index(GDBMenuBar) [list source [file join $dir gdbmenubar.itcl]]
-set auto_index(GDBToolBar) [list source [file join $dir gdbtoolbar.itcl]]
-set auto_index(PluginWindow) [list source [file join $dir pluginwin.itcl]]
-set auto_index(SrcBar) [list source [file join $dir srcbar.itcl]]
-set auto_index(AttachDlg) [list source [file join $dir attachdlg.ith]]
-set auto_index(Block) [list source [file join $dir blockframe.ith]]
-set auto_index(Frame) [list source [file join $dir blockframe.ith]]
-set auto_index(BpWin) [list source [file join $dir bpwin.ith]]
-set auto_index(BrowserWin) [list source [file join $dir browserwin.ith]]
-set auto_index(Console) [list source [file join $dir console.ith]]
-set auto_index(CSPref) [list source [file join $dir cspref.ith]]
-set auto_index(DebugWin) [list source [file join $dir debugwin.ith]]
-set auto_index(DebugWinDOpts) [list source [file join $dir debugwin.ith]]
-set auto_index(Download) [list source [file join $dir download.ith]]
-set auto_index(GDBEventHandler) [list source [file join $dir ehandler.ith]]
-set auto_index(::GDBEventHandler::dispatch) [list source [file join $dir ehandler.ith]]
-set auto_index(EmbeddedWin) [list source [file join $dir embeddedwin.ith]]
-set auto_index(GDBEvent) [list source [file join $dir gdbevent.ith]]
-set auto_index(BreakpointEvent) [list source [file join $dir gdbevent.ith]]
-set auto_index(TracepointEvent) [list source [file join $dir gdbevent.ith]]
-set auto_index(SetVariableEvent) [list source [file join $dir gdbevent.ith]]
-set auto_index(BusyEvent) [list source [file join $dir gdbevent.ith]]
-set auto_index(IdleEvent) [list source [file join $dir gdbevent.ith]]
-set auto_index(UpdateEvent) [list source [file join $dir gdbevent.ith]]
-set auto_index(ArchChangedEvent) [list source [file join $dir gdbevent.ith]]
-set auto_index(GDBWin) [list source [file join $dir gdbwin.ith]]
-set auto_index(GlobalPref) [list source [file join $dir globalpref.ith]]
-set auto_index(IPCPref) [list source [file join $dir ipcpref.ith]]
-set auto_index(KodWin) [list source [file join $dir kod.ith]]
-set auto_index(ManagedWin) [list source [file join $dir managedwin.ith]]
-set auto_index(MemPref) [list source [file join $dir mempref.ith]]
-set auto_index(MemWin) [list source [file join $dir memwin.ith]]
-set auto_index(ProcessWin) [list source [file join $dir process.ith]]
-set auto_index(RegWin) [list source [file join $dir regwin.ith]]
-set auto_index(SrcPref) [list source [file join $dir srcpref.ith]]
-set auto_index(SrcTextWin) [list source [file join $dir srctextwin.ith]]
-set auto_index(SrcWin) [list source [file join $dir srcwin.ith]]
-set auto_index(StackWin) [list source [file join $dir stackwin.ith]]
-set auto_index(TargetSelection) [list source [file join $dir targetselection.ith]]
-set auto_index(TopLevelWin) [list source [file join $dir toplevelwin.ith]]
-set auto_index(VarTree) [list source [file join $dir vartree.ith]]
-set auto_index(::AttachDlg::constructor) [list source [file join $dir attachdlg.itb]]
-set auto_index(::AttachDlg::build_win) [list source [file join $dir attachdlg.itb]]
-set auto_index(::AttachDlg::doit) [list source [file join $dir attachdlg.itb]]
-set auto_index(::AttachDlg::cancel) [list source [file join $dir attachdlg.itb]]
-set auto_index(::AttachDlg::choose_symbol_file) [list source [file join $dir attachdlg.itb]]
-set auto_index(::AttachDlg::list_pids) [list source [file join $dir attachdlg.itb]]
-set auto_index(::AttachDlg::select_pid) [list source [file join $dir attachdlg.itb]]
-set auto_index(::AttachDlg::clear_pid_selection) [list source [file join $dir attachdlg.itb]]
-set auto_index(::AttachDlg::filter_pid_selection) [list source [file join $dir attachdlg.itb]]
-set auto_index(::Block::constructor) [list source [file join $dir blockframe.itb]]
-set auto_index(::Block::destructor) [list source [file join $dir blockframe.itb]]
-set auto_index(::Block::variables) [list source [file join $dir blockframe.itb]]
-set auto_index(::Block::_findVariables) [list source [file join $dir blockframe.itb]]
-set auto_index(::Block::update) [list source [file join $dir blockframe.itb]]
-set auto_index(::Block::info) [list source [file join $dir blockframe.itb]]
-set auto_index(::Frame::constructor) [list source [file join $dir blockframe.itb]]
-set auto_index(::Frame::destructor) [list source [file join $dir blockframe.itb]]
-set auto_index(::Frame::_removeBlock) [list source [file join $dir blockframe.itb]]
-set auto_index(::Frame::_addBlock) [list source [file join $dir blockframe.itb]]
-set auto_index(::Frame::_createBlocks) [list source [file join $dir blockframe.itb]]
-set auto_index(::Frame::update) [list source [file join $dir blockframe.itb]]
-set auto_index(::Frame::variables) [list source [file join $dir blockframe.itb]]
-set auto_index(::Frame::new) [list source [file join $dir blockframe.itb]]
-set auto_index(::Frame::deleteOld) [list source [file join $dir blockframe.itb]]
-set auto_index(::Frame::_oldBlocks) [list source [file join $dir blockframe.itb]]
-set auto_index(::Frame::old) [list source [file join $dir blockframe.itb]]
-set auto_index(::Frame::_findBlock) [list source [file join $dir blockframe.itb]]
-set auto_index(::Frame::_findBlockIndex) [list source [file join $dir blockframe.itb]]
-set auto_index(::BpWin::constructor) [list source [file join $dir bpwin.itb]]
-set auto_index(::BpWin::destructor) [list source [file join $dir bpwin.itb]]
-set auto_index(::BpWin::build_win) [list source [file join $dir bpwin.itb]]
-set auto_index(::BpWin::bp_add) [list source [file join $dir bpwin.itb]]
-set auto_index(::BpWin::bp_store) [list source [file join $dir bpwin.itb]]
-set auto_index(::BpWin::bp_restore) [list source [file join $dir bpwin.itb]]
-set auto_index(::BpWin::bp_select) [list source [file join $dir bpwin.itb]]
-set auto_index(::BpWin::_select_and_popup) [list source [file join $dir bpwin.itb]]
-set auto_index(::BpWin::bp_modify) [list source [file join $dir bpwin.itb]]
-set auto_index(::BpWin::bp_able) [list source [file join $dir bpwin.itb]]
-set auto_index(::BpWin::bp_remove) [list source [file join $dir bpwin.itb]]
-set auto_index(::BpWin::bp_type) [list source [file join $dir bpwin.itb]]
-set auto_index(::BpWin::bp_delete) [list source [file join $dir bpwin.itb]]
-set auto_index(::BpWin::breakpoint) [list source [file join $dir bpwin.itb]]
-set auto_index(::BpWin::tracepoint) [list source [file join $dir bpwin.itb]]
-set auto_index(::BpWin::bp_all) [list source [file join $dir bpwin.itb]]
-set auto_index(::BpWin::get_actions) [list source [file join $dir bpwin.itb]]
-set auto_index(::BpWin::toggle_threads) [list source [file join $dir bpwin.itb]]
-set auto_index(::BpWin::reconfig) [list source [file join $dir bpwin.itb]]
-set auto_index(::BpWin::goto_bp) [list source [file join $dir bpwin.itb]]
-set auto_index(::BrowserWin::constructor) [list source [file join $dir browserwin.itb]]
-set auto_index(::BrowserWin::destructor) [list source [file join $dir browserwin.itb]]
-set auto_index(::BrowserWin::_build_win) [list source [file join $dir browserwin.itb]]
-set auto_index(::BrowserWin::_filter_trace_proc) [list source [file join $dir browserwin.itb]]
-set auto_index(::BrowserWin::_filter_trace_after) [list source [file join $dir browserwin.itb]]
-set auto_index(::BrowserWin::_search_src) [list source [file join $dir browserwin.itb]]
-set auto_index(::BrowserWin::search) [list source [file join $dir browserwin.itb]]
-set auto_index(::BrowserWin::_process_file_selection) [list source [file join $dir browserwin.itb]]
-set auto_index(::BrowserWin::_process_func_selection) [list source [file join $dir browserwin.itb]]
-set auto_index(::BrowserWin::do_all_bp) [list source [file join $dir browserwin.itb]]
-set auto_index(::BrowserWin::_toggle_bp) [list source [file join $dir browserwin.itb]]
-set auto_index(::BrowserWin::_select) [list source [file join $dir browserwin.itb]]
-set auto_index(::BrowserWin::_set_filter_mode) [list source [file join $dir browserwin.itb]]
-set auto_index(::BrowserWin::_file_hide_h) [list source [file join $dir browserwin.itb]]
-set auto_index(::BrowserWin::_fill_source) [list source [file join $dir browserwin.itb]]
-set auto_index(::BrowserWin::mode) [list source [file join $dir browserwin.itb]]
-set auto_index(::BrowserWin::_goto_func) [list source [file join $dir browserwin.itb]]
-set auto_index(::BrowserWin::_fill_file_box) [list source [file join $dir browserwin.itb]]
-set auto_index(::BrowserWin::_fill_funcs_combo) [list source [file join $dir browserwin.itb]]
-set auto_index(::BrowserWin::_build_filter_frame) [list source [file join $dir browserwin.itb]]
-set auto_index(::BrowserWin::_build_file_frame) [list source [file join $dir browserwin.itb]]
-set auto_index(::BrowserWin::_build_function_frame) [list source [file join $dir browserwin.itb]]
-set auto_index(::BrowserWin::_build_view_frame) [list source [file join $dir browserwin.itb]]
-set auto_index(::BrowserWin::_switch_layout) [list source [file join $dir browserwin.itb]]
-set auto_index(::Console::constructor) [list source [file join $dir console.itb]]
-set auto_index(::Console::destructor) [list source [file join $dir console.itb]]
-set auto_index(::Console::_build_win) [list source [file join $dir console.itb]]
-set auto_index(::Console::idle) [list source [file join $dir console.itb]]
-set auto_index(::Console::busy) [list source [file join $dir console.itb]]
-set auto_index(::Console::insert) [list source [file join $dir console.itb]]
-set auto_index(::Console::_operate_and_get_next) [list source [file join $dir console.itb]]
-set auto_index(::Console::_previous) [list source [file join $dir console.itb]]
-set auto_index(::Console::_search_history) [list source [file join $dir console.itb]]
-set auto_index(::Console::_rsearch_history) [list source [file join $dir console.itb]]
-set auto_index(::Console::_next) [list source [file join $dir console.itb]]
-set auto_index(::Console::_last) [list source [file join $dir console.itb]]
-set auto_index(::Console::_first) [list source [file join $dir console.itb]]
-set auto_index(::Console::_setprompt) [list source [file join $dir console.itb]]
-set auto_index(::Console::gets) [list source [file join $dir console.itb]]
-set auto_index(::Console::_cancel) [list source [file join $dir console.itb]]
-set auto_index(::Console::activate) [list source [file join $dir console.itb]]
-set auto_index(::Console::invoke) [list source [file join $dir console.itb]]
-set auto_index(::Console::_delete) [list source [file join $dir console.itb]]
-set auto_index(::Console::_insertion) [list source [file join $dir console.itb]]
-set auto_index(::Console::_paste) [list source [file join $dir console.itb]]
-set auto_index(::Console::_find_lcp) [list source [file join $dir console.itb]]
-set auto_index(::Console::_find_completion) [list source [file join $dir console.itb]]
-set auto_index(::Console::_complete) [list source [file join $dir console.itb]]
-set auto_index(::Console::_reset_tab) [list source [file join $dir console.itb]]
-set auto_index(::Console::_set_wrap) [list source [file join $dir console.itb]]
-set auto_index(::Console::_update_option) [list source [file join $dir console.itb]]
-set auto_index(::Console::test) [list source [file join $dir console.itb]]
-set auto_index(::CSPref::constructor) [list source [file join $dir cspref.itb]]
-set auto_index(::CSPref::_init_var) [list source [file join $dir cspref.itb]]
-set auto_index(::CSPref::_build_win) [list source [file join $dir cspref.itb]]
-set auto_index(::CSPref::_apply) [list source [file join $dir cspref.itb]]
-set auto_index(::CSPref::_cancel) [list source [file join $dir cspref.itb]]
-set auto_index(::CSPref::_save) [list source [file join $dir cspref.itb]]
-set auto_index(::CSPref::reconfig) [list source [file join $dir cspref.itb]]
-set auto_index(::CSPref::_pick) [list source [file join $dir cspref.itb]]
-set auto_index(::DebugWin::constructor) [list source [file join $dir debugwin.itb]]
-set auto_index(::DebugWin::destructor) [list source [file join $dir debugwin.itb]]
-set auto_index(::DebugWin::reconfig) [list source [file join $dir debugwin.itb]]
-set auto_index(::DebugWin::build_win) [list source [file join $dir debugwin.itb]]
-set auto_index(::DebugWin::puts) [list source [file join $dir debugwin.itb]]
-set auto_index(::DebugWin::put_trace) [list source [file join $dir debugwin.itb]]
-set auto_index(::DebugWin::loadlog) [list source [file join $dir debugwin.itb]]
-set auto_index(::DebugWin::_source_all) [list source [file join $dir debugwin.itb]]
-set auto_index(::DebugWin::_clear) [list source [file join $dir debugwin.itb]]
-set auto_index(::DebugWin::_mark_old) [list source [file join $dir debugwin.itb]]
-set auto_index(::DebugWin::_save_contents) [list source [file join $dir debugwin.itb]]
-set auto_index(::DebugWinDOpts::constructor) [list source [file join $dir debugwin.itb]]
-set auto_index(::DebugWinDOpts::destructor) [list source [file join $dir debugwin.itb]]
-set auto_index(::DebugWinDOpts::build_win) [list source [file join $dir debugwin.itb]]
-set auto_index(::DebugWinDOpts::_all) [list source [file join $dir debugwin.itb]]
-set auto_index(::DebugWinDOpts::_apply) [list source [file join $dir debugwin.itb]]
-set auto_index(::Download::constructor) [list source [file join $dir download.itb]]
-set auto_index(::Download::update_download) [list source [file join $dir download.itb]]
-set auto_index(::Download::done) [list source [file join $dir download.itb]]
-set auto_index(::Download::cancel) [list source [file join $dir download.itb]]
-set auto_index(::Download::destructor) [list source [file join $dir download.itb]]
-set auto_index(::Download::do_download_hooks) [list source [file join $dir download.itb]]
-set auto_index(::Download::download_hash) [list source [file join $dir download.itb]]
-set auto_index(::Download::download_it) [list source [file join $dir download.itb]]
-set auto_index(::GDBEventHandler::dispatch) [list source [file join $dir ehandler.itb]]
-set auto_index(::BreakpointEvent::get) [list source [file join $dir gdbevent.itb]]
-set auto_index(::BreakpointEvent::_init) [list source [file join $dir gdbevent.itb]]
-set auto_index(::BreakpointEvent::number) [list source [file join $dir gdbevent.itb]]
-set auto_index(::TracepointEvent::get) [list source [file join $dir gdbevent.itb]]
-set auto_index(::TracepointEvent::_init) [list source [file join $dir gdbevent.itb]]
-set auto_index(::TracepointEvent::number) [list source [file join $dir gdbevent.itb]]
-set auto_index(::TracepointEvent::get) [list source [file join $dir gdbevent.itb]]
-set auto_index(::SetVariableEvent::get) [list source [file join $dir gdbevent.itb]]
-set auto_index(::UpdateEvent::constructor) [list source [file join $dir gdbevent.itb]]
-set auto_index(::UpdateEvent::get) [list source [file join $dir gdbevent.itb]]
-set auto_index(::GlobalPref::_init) [list source [file join $dir globalpref.itb]]
-set auto_index(::GlobalPref::_init_var) [list source [file join $dir globalpref.itb]]
-set auto_index(::GlobalPref::constructor) [list source [file join $dir globalpref.itb]]
-set auto_index(::GlobalPref::destructor) [list source [file join $dir globalpref.itb]]
-set auto_index(::GlobalPref::_build_win) [list source [file join $dir globalpref.itb]]
-set auto_index(::GlobalPref::_make_font_item) [list source [file join $dir globalpref.itb]]
-set auto_index(::GlobalPref::_resize_font_item_height) [list source [file join $dir globalpref.itb]]
-set auto_index(::GlobalPref::_change_icons) [list source [file join $dir globalpref.itb]]
-set auto_index(::GlobalPref::_change_font) [list source [file join $dir globalpref.itb]]
-set auto_index(::GlobalPref::_change_size) [list source [file join $dir globalpref.itb]]
-set auto_index(::GlobalPref::_toggle_tracing) [list source [file join $dir globalpref.itb]]
-set auto_index(::GlobalPref::_ok) [list source [file join $dir globalpref.itb]]
-set auto_index(::GlobalPref::_apply) [list source [file join $dir globalpref.itb]]
-set auto_index(::GlobalPref::_cancel) [list source [file join $dir globalpref.itb]]
-set auto_index(::GlobalPref::cancel) [list source [file join $dir globalpref.itb]]
-set auto_index(::IPCPref::constructor) [list source [file join $dir ipcpref.itb]]
-set auto_index(::IPCPref::_init_var) [list source [file join $dir ipcpref.itb]]
-set auto_index(::IPCPref::_build_win) [list source [file join $dir ipcpref.itb]]
-set auto_index(::IPCPref::_apply) [list source [file join $dir ipcpref.itb]]
-set auto_index(::IPCPref::_cancel) [list source [file join $dir ipcpref.itb]]
-set auto_index(::IPCPref::_save) [list source [file join $dir ipcpref.itb]]
-set auto_index(::KodWin::constructor) [list source [file join $dir kod.itb]]
-set auto_index(::KodWin::build_win) [list source [file join $dir kod.itb]]
-set auto_index(::KodWin::update) [list source [file join $dir kod.itb]]
-set auto_index(::KodWin::display) [list source [file join $dir kod.itb]]
-set auto_index(::KodWin::display_list) [list source [file join $dir kod.itb]]
-set auto_index(::KodWin::display_object) [list source [file join $dir kod.itb]]
-set auto_index(::KodWin::clear) [list source [file join $dir kod.itb]]
-set auto_index(::KodWin::top) [list source [file join $dir kod.itb]]
-set auto_index(::KodWin::up) [list source [file join $dir kod.itb]]
-set auto_index(::KodWin::destructor) [list source [file join $dir kod.itb]]
-set auto_index(::KodWin::set_variable) [list source [file join $dir kod.itb]]
-set auto_index(::KodWin::reconfig) [list source [file join $dir kod.itb]]
-set auto_index(::KodWin::busy) [list source [file join $dir kod.itb]]
-set auto_index(::KodWin::idle) [list source [file join $dir kod.itb]]
-set auto_index(::KodWin::cursor) [list source [file join $dir kod.itb]]
-set auto_index(::KodWin::_disable_buttons) [list source [file join $dir kod.itb]]
-set auto_index(::KodWin::_restore_buttons) [list source [file join $dir kod.itb]]
-set auto_index(::ManagedWin::constructor) [list source [file join $dir managedwin.itb]]
-set auto_index(::ManagedWin::destructor) [list source [file join $dir managedwin.itb]]
-set auto_index(::ManagedWin::window_name) [list source [file join $dir managedwin.itb]]
-set auto_index(::ManagedWin::window_instance) [list source [file join $dir managedwin.itb]]
-set auto_index(::ManagedWin::pickle) [list source [file join $dir managedwin.itb]]
-set auto_index(::ManagedWin::reveal) [list source [file join $dir managedwin.itb]]
-set auto_index(::ManagedWin::restart) [list source [file join $dir managedwin.itb]]
-set auto_index(::ManagedWin::shutdown) [list source [file join $dir managedwin.itb]]
-set auto_index(::ManagedWin::startup) [list source [file join $dir managedwin.itb]]
-set auto_index(::ManagedWin::open_dlg) [list source [file join $dir managedwin.itb]]
-set auto_index(::ManagedWin::open) [list source [file join $dir managedwin.itb]]
-set auto_index(::ManagedWin::_open) [list source [file join $dir managedwin.itb]]
-set auto_index(::ManagedWin::_create) [list source [file join $dir managedwin.itb]]
-set auto_index(::ManagedWin::find) [list source [file join $dir managedwin.itb]]
-set auto_index(::ManagedWin::init) [list source [file join $dir managedwin.itb]]
-set auto_index(::ManagedWin::destroy_toplevel) [list source [file join $dir managedwin.itb]]
-set auto_index(::ManagedWin::_freeze_me) [list source [file join $dir managedwin.itb]]
-set auto_index(::ManagedWin::_thaw_me) [list source [file join $dir managedwin.itb]]
-set auto_index(::ManagedWin::_make_icon_window) [list source [file join $dir managedwin.itb]]
-set auto_index(::MemPref::constructor) [list source [file join $dir mempref.itb]]
-set auto_index(::MemPref::destructor) [list source [file join $dir mempref.itb]]
-set auto_index(::MemPref::build_win) [list source [file join $dir mempref.itb]]
-set auto_index(::MemPref::busy) [list source [file join $dir mempref.itb]]
-set auto_index(::MemPref::idle) [list source [file join $dir mempref.itb]]
-set auto_index(::MemPref::ok) [list source [file join $dir mempref.itb]]
-set auto_index(::MemPref::cancel) [list source [file join $dir mempref.itb]]
-set auto_index(::MemPref::check_numbytes) [list source [file join $dir mempref.itb]]
-set auto_index(::MemPref::set_bytes_per_row) [list source [file join $dir mempref.itb]]
-set auto_index(::MemPref::toggle_size_control) [list source [file join $dir mempref.itb]]
-set auto_index(::MemPref::apply) [list source [file join $dir mempref.itb]]
-set auto_index(::MemPref::enable_format) [list source [file join $dir mempref.itb]]
-set auto_index(::MemPref::disable_format) [list source [file join $dir mempref.itb]]
-set auto_index(::MemPref::pick) [list source [file join $dir mempref.itb]]
-set auto_index(::MemPref::reconfig) [list source [file join $dir mempref.itb]]
-set auto_index(::MemWin::constructor) [list source [file join $dir memwin.itb]]
-set auto_index(::MemWin::destructor) [list source [file join $dir memwin.itb]]
-set auto_index(::MemWin::build_win) [list source [file join $dir memwin.itb]]
-set auto_index(::MemWin::paste) [list source [file join $dir memwin.itb]]
-set auto_index(::MemWin::validate) [list source [file join $dir memwin.itb]]
-set auto_index(::MemWin::create_prefs) [list source [file join $dir memwin.itb]]
-set auto_index(::MemWin::changed_cell) [list source [file join $dir memwin.itb]]
-set auto_index(::MemWin::edit) [list source [file join $dir memwin.itb]]
-set auto_index(::MemWin::toggle_enabled) [list source [file join $dir memwin.itb]]
-set auto_index(::MemWin::update) [list source [file join $dir memwin.itb]]
-set auto_index(::MemWin::idle) [list source [file join $dir memwin.itb]]
-set auto_index(::MemWin::busy) [list source [file join $dir memwin.itb]]
-set auto_index(::MemWin::newsize) [list source [file join $dir memwin.itb]]
-set auto_index(::MemWin::_update_address) [list source [file join $dir memwin.itb]]
-set auto_index(::MemWin::update_address_cb) [list source [file join $dir memwin.itb]]
-set auto_index(::MemWin::update_address) [list source [file join $dir memwin.itb]]
-set auto_index(::MemWin::BadExpr) [list source [file join $dir memwin.itb]]
-set auto_index(::MemWin::incr_addr) [list source [file join $dir memwin.itb]]
-set auto_index(::MemWin::update_addr) [list source [file join $dir memwin.itb]]
-set auto_index(::MemWin::hidemb) [list source [file join $dir memwin.itb]]
-set auto_index(::MemWin::reconfig) [list source [file join $dir memwin.itb]]
-set auto_index(::MemWin::do_popup) [list source [file join $dir memwin.itb]]
-set auto_index(::MemWin::goto) [list source [file join $dir memwin.itb]]
-set auto_index(::MemWin::init_addr_exp) [list source [file join $dir memwin.itb]]
-set auto_index(::MemWin::cursor) [list source [file join $dir memwin.itb]]
-set auto_index(::MemWin::memMoveCell) [list source [file join $dir memwin.itb]]
-set auto_index(::MemWin::error_dialog) [list source [file join $dir memwin.itb]]
-set auto_index(::ProcessWin::constructor) [list source [file join $dir process.itb]]
-set auto_index(::ProcessWin::build_win) [list source [file join $dir process.itb]]
-set auto_index(::ProcessWin::update) [list source [file join $dir process.itb]]
-set auto_index(::ProcessWin::change_context) [list source [file join $dir process.itb]]
-set auto_index(::ProcessWin::destructor) [list source [file join $dir process.itb]]
-set auto_index(::ProcessWin::reconfig) [list source [file join $dir process.itb]]
-set auto_index(::ProcessWin::busy) [list source [file join $dir process.itb]]
-set auto_index(::ProcessWin::idle) [list source [file join $dir process.itb]]
-set auto_index(::ProcessWin::cursor) [list source [file join $dir process.itb]]
-set auto_index(::RegWin::constructor) [list source [file join $dir regwin.itb]]
-set auto_index(::RegWin::destructor) [list source [file join $dir regwin.itb]]
-set auto_index(::RegWin::_load_prefs) [list source [file join $dir regwin.itb]]
-set auto_index(::RegWin::_build_win) [list source [file join $dir regwin.itb]]
-set auto_index(::RegWin::_layout_table) [list source [file join $dir regwin.itb]]
-set auto_index(::RegWin::_size_cell_column) [list source [file join $dir regwin.itb]]
-set auto_index(::RegWin::_size_column) [list source [file join $dir regwin.itb]]
-set auto_index(::RegWin::reconfig) [list source [file join $dir regwin.itb]]
-set auto_index(::RegWin::_accept_edit) [list source [file join $dir regwin.itb]]
-set auto_index(::RegWin::_add_to_watch) [list source [file join $dir regwin.itb]]
-set auto_index(::RegWin::_open_memory) [list source [file join $dir regwin.itb]]
-set auto_index(::RegWin::_but3) [list source [file join $dir regwin.itb]]
-set auto_index(::RegWin::_delete_from_display) [list source [file join $dir regwin.itb]]
-set auto_index(::RegWin::_display_all) [list source [file join $dir regwin.itb]]
-set auto_index(::RegWin::_edit) [list source [file join $dir regwin.itb]]
-set auto_index(::RegWin::_move) [list source [file join $dir regwin.itb]]
-set auto_index(::RegWin::_select_cell) [list source [file join $dir regwin.itb]]
-set auto_index(::RegWin::_unedit) [list source [file join $dir regwin.itb]]
-set auto_index(::RegWin::_get_value) [list source [file join $dir regwin.itb]]
-set auto_index(::RegWin::_change_format) [list source [file join $dir regwin.itb]]
-set auto_index(::RegWin::_update_register) [list source [file join $dir regwin.itb]]
-set auto_index(::RegWin::_select_group) [list source [file join $dir regwin.itb]]
-set auto_index(::RegWin::arch_changed) [list source [file join $dir regwin.itb]]
-set auto_index(::RegWin::busy) [list source [file join $dir regwin.itb]]
-set auto_index(::RegWin::idle) [list source [file join $dir regwin.itb]]
-set auto_index(::RegWin::set_variable) [list source [file join $dir regwin.itb]]
-set auto_index(::RegWin::update) [list source [file join $dir regwin.itb]]
-set auto_index(::SrcPref::constructor) [list source [file join $dir srcpref.itb]]
-set auto_index(::SrcPref::_init_var) [list source [file join $dir srcpref.itb]]
-set auto_index(::SrcPref::_build_win) [list source [file join $dir srcpref.itb]]
-set auto_index(::SrcPref::_apply) [list source [file join $dir srcpref.itb]]
-set auto_index(::SrcPref::cancel) [list source [file join $dir srcpref.itb]]
-set auto_index(::SrcPref::_cancel) [list source [file join $dir srcpref.itb]]
-set auto_index(::SrcPref::_save) [list source [file join $dir srcpref.itb]]
-set auto_index(::SrcPref::_set_flavor) [list source [file join $dir srcpref.itb]]
-set auto_index(::SrcPref::_pick) [list source [file join $dir srcpref.itb]]
-set auto_index(::SrcTextWin::constructor) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::destructor) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::trace_find_hook) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::set_control_mode) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::build_popups) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::build_win) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::SetRunningState) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::enable) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::makeBreakDot) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::setTabs) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::enable_disable_src_tags) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::config_win) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::addPopup) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::set_variable) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::disassembly_changed) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::reconfig) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::updateBalloon) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::balloon_value) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::ClearTags) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::_mtime_changed) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::FillSource) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::FillAssembly) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::FillMixed) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::_highlightAsmLine) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::set_tag_to_stack) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::location) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::LoadFile) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::display_line) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::display_breaks) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::insertBreakTag) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::removeBreakTag) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::breakpoint) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::tracepoint) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::bp) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::do_bp) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::hasBP) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::hasTP) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::report_source_location) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::lookup_line) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::continue_to_here) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::jump_to_here) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::set_bp_at_line) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::enable_disable_at_line) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::remove_bp_at_line) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::set_tp_at_line) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::next_hit_at_line) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::remove_tp_at_line) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::do_tag_popup) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::do_source_popup) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::addToWatch) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::do_key) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::mode_get) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::mode_set) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::cancelMotion) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::motion) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::showBPBalloon) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::showBalloon) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::getVariable) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::trace_help) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::line_is_executable) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::tracepoint_range) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::search) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::LoadFromCache) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::UnLoadFromCache) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::print) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::ask_thread_bp) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::do_thread_bp) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::test_get) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::get_file) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::clear_file) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::_initialize_srctextwin) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcTextWin::_clear_cache) [list source [file join $dir srctextwin.itb]]
-set auto_index(::SrcWin::constructor) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::destructor) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::_build_win) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::_set_state) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::download_progress) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::reconfig) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::_name) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::toggle_updates) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::goto_func) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::fillNameCB) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::fillFuncCB) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::location) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::stack) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::_update) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::idle) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::mode) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::_update_title) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::busy) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::update) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::_set_name) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::set_status) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::set_execution_status) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::edit) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::print) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::enable_ui) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::no_inferior) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::reset) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::search) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::point_to_main) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::_exit) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::test_get) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::toolbar) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::inferior) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::clear_file) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::get_file) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::is_fixed) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::get_top) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::_set_tag_to_stack) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::_choose_window) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::choose_and_update) [list source [file join $dir srcwin.itb]]
-set auto_index(::SrcWin::choose_and_display) [list source [file join $dir srcwin.itb]]
-set auto_index(::StackWin::constructor) [list source [file join $dir stackwin.itb]]
-set auto_index(::StackWin::destructor) [list source [file join $dir stackwin.itb]]
-set auto_index(::StackWin::build_win) [list source [file join $dir stackwin.itb]]
-set auto_index(::StackWin::update) [list source [file join $dir stackwin.itb]]
-set auto_index(::StackWin::idle) [list source [file join $dir stackwin.itb]]
-set auto_index(::StackWin::change_frame) [list source [file join $dir stackwin.itb]]
-set auto_index(::StackWin::reconfig) [list source [file join $dir stackwin.itb]]
-set auto_index(::StackWin::busy) [list source [file join $dir stackwin.itb]]
-set auto_index(::StackWin::no_inferior) [list source [file join $dir stackwin.itb]]
-set auto_index(::StackWin::cursor) [list source [file join $dir stackwin.itb]]
-set auto_index(::TargetSelection::constructor) [list source [file join $dir targetselection.itb]]
-set auto_index(::TargetSelection::getname) [list source [file join $dir targetselection.itb]]
-set auto_index(::TargetSelection::init_target_db) [list source [file join $dir targetselection.itb]]
-set auto_index(::TargetSelection::default_port) [list source [file join $dir targetselection.itb]]
-set auto_index(::TargetSelection::_init_prefs) [list source [file join $dir targetselection.itb]]
-set auto_index(::TargetSelection::_init_target) [list source [file join $dir targetselection.itb]]
-set auto_index(::TargetSelection::_init) [list source [file join $dir targetselection.itb]]
-set auto_index(::TargetSelection::build_win) [list source [file join $dir targetselection.itb]]
-set auto_index(::TargetSelection::set_saved) [list source [file join $dir targetselection.itb]]
-set auto_index(::TargetSelection::write_saved) [list source [file join $dir targetselection.itb]]
-set auto_index(::TargetSelection::fill_rates) [list source [file join $dir targetselection.itb]]
-set auto_index(::TargetSelection::fill_targets) [list source [file join $dir targetselection.itb]]
-set auto_index(::TargetSelection::config_dialog) [list source [file join $dir targetselection.itb]]
-set auto_index(::TargetSelection::change_target) [list source [file join $dir targetselection.itb]]
-set auto_index(::TargetSelection::change_baud) [list source [file join $dir targetselection.itb]]
-set auto_index(::TargetSelection::port_list) [list source [file join $dir targetselection.itb]]
-set auto_index(::TargetSelection::get_target_list) [list source [file join $dir targetselection.itb]]
-set auto_index(::TargetSelection::save) [list source [file join $dir targetselection.itb]]
-set auto_index(::TargetSelection::cancel) [list source [file join $dir targetselection.itb]]
-set auto_index(::TargetSelection::set_check_button) [list source [file join $dir targetselection.itb]]
-set auto_index(::TargetSelection::help) [list source [file join $dir targetselection.itb]]
-set auto_index(::TargetSelection::reconfig) [list source [file join $dir targetselection.itb]]
-set auto_index(::TargetSelection::get_target) [list source [file join $dir targetselection.itb]]
-set auto_index(::TargetSelection::toggle_more_options) [list source [file join $dir targetselection.itb]]
-set auto_index(::TargetSelection::set_run) [list source [file join $dir targetselection.itb]]
-set auto_index(::TargetSelection::target_trace) [list source [file join $dir targetselection.itb]]
-set auto_index(::TargetSelection::valid_target) [list source [file join $dir targetselection.itb]]
-set auto_index(::TargetSelection::native_debugging) [list source [file join $dir targetselection.itb]]
-set auto_index(::VarTree::constructor) [list source [file join $dir vartree.itb]]
-set auto_index(::VarTree::destructor) [list source [file join $dir vartree.itb]]
-set auto_index(::VarTree::build) [list source [file join $dir vartree.itb]]
-set auto_index(::VarTree::buildlayer) [list source [file join $dir vartree.itb]]
-set auto_index(::VarTree::add) [list source [file join $dir vartree.itb]]
-set auto_index(::VarTree::remove) [list source [file join $dir vartree.itb]]
-set auto_index(::VarTree::update_var) [list source [file join $dir vartree.itb]]
-set auto_index(::VarTree::update) [list source [file join $dir vartree.itb]]
-set auto_index(::VarTree::drawselection) [list source [file join $dir vartree.itb]]
-set auto_index(::VarTree::clicked) [list source [file join $dir vartree.itb]]
-set auto_index(::VarTree::setselection) [list source [file join $dir vartree.itb]]
-set auto_index(::VarTree::closed) [list source [file join $dir vartree.itb]]
-set auto_index(::VarTree::open) [list source [file join $dir vartree.itb]]
-set auto_index(::VarTree::close) [list source [file join $dir vartree.itb]]
-set auto_index(::VarTree::edit) [list source [file join $dir vartree.itb]]
-set auto_index(::VarTree::unedit) [list source [file join $dir vartree.itb]]
-set auto_index(::VarTree::changeValue) [list source [file join $dir vartree.itb]]
-set auto_index(::VarTree::_change_format) [list source [file join $dir vartree.itb]]
-set auto_index(::VarTree::_but3) [list source [file join $dir vartree.itb]]
-set auto_index(::VarTree::_do_default_menu) [list source [file join $dir vartree.itb]]
-set auto_index(::VarTree::_sort) [list source [file join $dir vartree.itb]]
-set auto_index(::VarTree::_compare) [list source [file join $dir vartree.itb]]
-set auto_index(::VarTree::_init_data) [list source [file join $dir vartree.itb]]
diff --git a/gdb/gdbtk/library/tdump.tcl b/gdb/gdbtk/library/tdump.tcl
deleted file mode 100644
index 2525f30746a..00000000000
--- a/gdb/gdbtk/library/tdump.tcl
+++ /dev/null
@@ -1,95 +0,0 @@
-# Trace dump window for Insight
-# Copyright (C) 1998, 1999, 2001, 2002, 2004 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-# ----------------------------------------------------------------------
-# Implements Tdump window for gdb
-#
-# PUBLIC ATTRIBUTES:
-#
-#
-# METHODS:
-#
-# reconfig ....... called when preferences change
-#
-#
-# X11 OPTION DATABASE ATTRIBUTES
-#
-#
-# ----------------------------------------------------------------------
-
-itcl::class TdumpWin {
- inherit ManagedWin GDBWin
-
- # ------------------------------------------------------------------
- # CONSTRUCTOR - create new tdump window
- # ------------------------------------------------------------------
- constructor {args} {
- window_name "Trace Dump"
- build_win
- eval itk_initialize $args
- }
-
-
- # ------------------------------------------------------------------
- # METHOD: build_win - build the main tdump window
- # ------------------------------------------------------------------
- method build_win {} {
- global tcl_platform
-
- itk_component add stext {
- iwidgets::scrolledtext $itk_interior.stext -hscrollmode dynamic \
- -vscrollmode dynamic -textfont global/fixed \
- -background $::Colors(bg)
- } {}
- [$itk_component(stext) component text] configure \
- -background $::Colors(bg)
- pack $itk_component(stext) -side left -expand yes -fill both
- update dummy
- }
-
-
- # ------------------------------------------------------------------
- # METHOD: update - update widget when PC changes
- # ------------------------------------------------------------------
- method update {event} {
- #debug "tdump: update"
- gdbtk_busy
- set tframe_num [gdb_get_trace_frame_num]
-
- if { $tframe_num!=-1 } {
- debug "doing tdump"
- $itk_component(stext) delete 1.0 end
-
- if {[catch {gdb_cmd "tdump $tframe_num" 0} tdump_output]} {
- tk_messageBox -title "Error" -message $tdump_output -icon error \
- -type ok
- } else {
- #debug "tdum output is $tdump_output"
-
- $itk_component(stext) insert end $tdump_output
- $itk_component(stext) see insert
- }
- }
- gdbtk_idle
- }
-
- # ------------------------------------------------------------------
- # METHOD: reconfig - used when preferences change
- # ------------------------------------------------------------------
- method reconfig {} {
- if {[winfo exists $itk_interior.stext]} { destroy $itk_interior.stext }
- build_win
- }
-}
-
diff --git a/gdb/gdbtk/library/tfind_args.tcl b/gdb/gdbtk/library/tfind_args.tcl
deleted file mode 100644
index 67e00e7ed54..00000000000
--- a/gdb/gdbtk/library/tfind_args.tcl
+++ /dev/null
@@ -1,139 +0,0 @@
-# TfindArgs
-# Copyright (C) 1998, 1999 Cygnus Solutions
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-# ----------------------------------------------------------------------
-# Implements tfind arguments dialogs
-#
-# PUBLIC ATTRIBUTES:
-#
-# Type .........Type of dialog (tfind pc, tfind line, tfind tracepoint)
-#
-# config ....... used to change public attributes
-#
-# PRIVATE METHODS
-#
-# X11 OPTION DATABASE ATTRIBUTES
-#
-#
-# ----------------------------------------------------------------------
-
-itcl_class TfindArgs {
- # ------------------------------------------------------------------
- # CONSTRUCTOR - create new tfind arguments dialog
- # ------------------------------------------------------------------
- constructor {config} {
- #
- # Create a window with the same name as this object
- #
- set class [$this info class]
- set hull [namespace tail $this]
- set old_name $this
- ::rename $this $this-tmp-
- ::frame $hull -class $class
- ::rename $hull $old_name-win-
- ::rename $this $old_name
- build_win
- }
-
- # ------------------------------------------------------------------
- # METHOD: build_win - build the dialog
- # ------------------------------------------------------------------
- method build_win {} {
-
- frame $hull.f
- frame $hull.f.a
- frame $hull.f.b
- set f $hull.f.a
-
- switch $Type {
- LN {
- set text "Enter argument: "
- }
- PC {
- set text "Enter PC value: "
- }
- TP {
- set text "Enter Tracepoint No.: "
- }
- FR {
- set text "Enter Frame No.:"
- }
-
- if {[string compare $Type $last_type]} != 0} {
- global argument
- set argument ""
- }
-
- set last_type $Type
-
- label $f.1 -text $text
- entry $f.2 -textvariable argument -width 10
- $f.2 selection range 0 end
- grid $f.1 $f.2 -padx 4 -pady 4 -sticky nwe
-
- button $hull.f.b.ok -text OK -command "$this ok" -width 7 -default active
- button $hull.f.b.quit -text Cancel -command "delete object $this" -width 7
- grid $hull.f.b.ok $hull.f.b.quit -padx 4 -pady 4 -sticky ews
-
- pack $hull.f.a $hull.f.b
- grid $hull.f
-
- focus $f.2
- bind $f.2 <Return> "$this.f.b.ok flash; $this.f.b.ok invoke"
-
- }
-
- # ------------------------------------------------------------------
- # DESTRUCTOR - destroy window containing widget
- # ------------------------------------------------------------------
- destructor {
- set top [winfo toplevel $hull]
- manage delete $this 1
- destroy $this
- destroy $top
- }
-
-
-
- # ------------------------------------------------------------------
- # METHOD: ok - do it and quit
- # ------------------------------------------------------------------
- method ok {} {
- do_it
- delete
- }
-
-
- # ------------------------------------------------------------------
- # METHOD: do_it - call the gdb command
- # ------------------------------------------------------------------
- method do_it {} {
- global argument
-
-
- switch $Type {
- LN { tfind_cmd "tfind line $argument"}
- PC { tfind_cmd "tfind pc $argument"}
- TP { tfind_cmd "tfind tracepoint $argument"}
- FR { tfind_cmd "tfind $argument"}
- }
- }
-
-
- public Type
- common last_type {}
- private hull
-
-
-}
diff --git a/gdb/gdbtk/library/toplevelwin.ith b/gdb/gdbtk/library/toplevelwin.ith
deleted file mode 100644
index 3cd8f93b373..00000000000
--- a/gdb/gdbtk/library/toplevelwin.ith
+++ /dev/null
@@ -1,64 +0,0 @@
-# TopLevelWin class definition for GDBtk.
-# Copyright (C) 1998, 1999 Cygnus Solutions
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-itcl::class TopLevelWin {
- inherit ManagedWin
-
- private variable frame ""
-
- constructor {args} {
- debug $itk_interior
-
- # create a container frame
- conFrame $itk_interior.container
- pack $itk_interior.container -fill both -expand 1
-
- # set up bindings for group iconification/deiconification
- # NOT IMPLEMENTED YET
- #set top [winfo toplevel [namespace tail $this]]
- #bind_for_toplevel_only $top <Unmap> {
- # manage_iconify iconify
- #}
- #bind_for_toplevel_only $top <Map> {
- # manage_iconify deiconify
- #}
- incr numTopWins
- }
-
- public method conFrame {win} {
- set frame [cyg::panedwindow $win -height 5i]
- return $frame.con
- }
-
- public method conAdd {child args} {
- parse_args {{resizable 1}}
- $frame add $child -margin 0 -resizable $resizable
- return [$frame childsite $child].con
- }
-
- public method sizeWinByChild {child} {
- if {[catch {$frame childsite $child} childWin]} {
- debug "Could not find child $child"
- return
- }
- set width [winfo reqwidth $childWin]
- $frame configure -width $width
-
- }
-
- destructor {
- debug
- incr numTopWins -1
- }
-}
diff --git a/gdb/gdbtk/library/tracedlg.tcl b/gdb/gdbtk/library/tracedlg.tcl
deleted file mode 100644
index 1a84b41c8b8..00000000000
--- a/gdb/gdbtk/library/tracedlg.tcl
+++ /dev/null
@@ -1,800 +0,0 @@
-# Trace configuration dialog for Insight
-# Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-# -----------------------------------------------------------------
-# Implements the Tracepoint configuration dialog box. This (modal)
-# dialog will be called upon to interact with gdb's tracepoint routines
-# allowing the user to add/edit tracepoints. Specifically, user can
-# specify:
-#
-# - What data to collect: locals, registers, "all registers", "all locals",
-# user-defined (globals)
-# - Number of passes which we should collect the data
-# - An ignore count after which data will start being collected
-# This method will destroy itself when the dialog is released. It returns
-# either one if a tracepoint was set/edited successfully or zero if
-# the user bails out (cancel or destroy buttons).
-
-itcl::class TraceDlg {
- inherit ManagedWin
-
- # ------------------------------------------------------------------
- # CONSTRUCTOR: create new trace dialog
- # ------------------------------------------------------------------
- constructor {args} {
-
- eval itk_initialize $args
- build_win
- title
- }
-
- # ------------------------------------------------------------------
- # DESTRUCTOR - destroy window containing widget
- # ------------------------------------------------------------------
- destructor {
-
- # Remove this window and all hooks
- if {$ActionsDlg != ""} {
- catch {delete object $ActionsDlg}
- }
- }
-
- # ------------------------------------------------------------------
- # METHOD: build_win - build the Trace dialog box (cache this?)
- # ------------------------------------------------------------------
- method build_win {} {
-
- set f $itk_interior
-
- # Need to set the title to either "Add Tracepoint" or "Edit Tracepoint",
- # depending on the location of the given tracepoint.
- # !! Why can I not do this?
-
- # If we have multiple lines, we "add" if we have any new ones ONLY..
- set nums {}
- set lown -1
- set highn -1
- set lowl -1
- set highl 0
- set functions {}
- set last_function {}
- set display_lines {}
- set display_number {}
-
- # Look at all lines
- foreach line $Lines {
- set num [gdb_tracepoint_exists "$File:$line"]
- if {$num == -1} {
- set New 1
- } else {
- set Exists 1
- }
-
- set function [gdb_get_function "$File:$line"]
- if {"$last_function" != "$function"} {
- lappend functions $function
- set last_function $function
- }
-
- if {$lown == -1 && $num != -1} {
- set lown $num
- }
- if {$lowl == -1} {
- set lowl $line
- }
-
- lappend Number $num
- if {$num > $highn} {
- set highn $num
- }
- if {$num != -1 && $num < $lown} {
- set lown $num
- }
- if {$line > $highl} {
- set highl $line
- }
- if {$line < $lowl} {
- set lowl $line
- }
- }
-
- # Look at all addresses
- foreach addr $Addresses {
- set num [gdb_tracepoint_exists "*$addr"]
- if {$num == -1} {
- set New 1
- } else {
- set Exists 1
- }
-
- set function [gdb_get_function "*$addr"]
- if {"$last_function" != "$function"} {
- lappend functions $function
- set last_function $function
- }
-
- if {$lown == -1 && $num != -1} {
- set lown $num
- }
- if {$lowl == -1} {
- set lowl $addr
- }
-
- lappend Number $num
- if {$num > $highn} {
- set highn $num
- }
- if {$num != -1 && $num < $lown} {
- set lown $num
- }
- if {$addr > $highl} {
- set highl $addr
- }
- if {$addr < $lowl} {
- set lowl $addr
- }
- }
-
- if {$Lines != {}} {
- if {[llength $Lines] == 1} {
- set Number $lown
- set display_number [concat $Number]
- set display_lines [concat $Lines]
- set multiline 0
- } else {
- # range of numbers
- set display_number "$lown-$highn"
- set display_lines "$lowl-$highl"
- set multiline 1
- }
- } elseif {$Addresses != {}} {
- if {[llength $Addresses] == 1} {
- set Number $lown
- set display_number [concat $Number]
- set display_lines [concat $Addresses]
- set multiline 0
- } else {
- # range of numbers
- set display_number "$lown-$highn"
- set display_lines "$lowl-$highl"
- set multiline 1
- }
- } elseif {$Number != {}} {
- set New 0
- set multiline 0
- set display_number $Number
- }
-
- # The three frames of this dialog
- set bbox [frame $f.bbox]; # for holding OK,CANCEL DELETE buttons
- Labelledframe $f.exp -text "Experiment"
- set exp [$f.exp get_frame]; # the "Experiment" frame
- Labelledframe $f.act -text "Actions"
- set act [$f.act get_frame]; # the "Actions" frame
-
- # Setup the button box
- button $bbox.ok -text OK -command "$this ok" -width 6
- button $bbox.cancel -text CANCEL -command "$this cancel"
- set Delete [button $bbox.delete -text DELETE -command "$this delete_tp"]
- pack $bbox.ok $bbox.cancel -side left -padx 10 -expand yes
- pack $bbox.delete -side right -padx 10 -expand yes
-
- # Setup the "Experiment" frame
- if {$New} {
- set hit_count "N/A"
- set thread "N/A"
- set _TPassCount 0
- if {!$Exists} {
- $Delete configure -state disabled
- }
- } else {
- if {!$multiline} {
- set stuff [gdb_get_tracepoint_info $Number]
- # 0=file 1=func 2=line 3=addr 4=disposition 5=passCount 6=stepCount
- # 7=thread 8=hitCount 9=actions
- set enabled [lindex $stuff 4]
- set _TPassCount [lindex $stuff 5]
- set thread [lindex $stuff 7]
- set hit_count [lindex $stuff 8]
- set actions [lindex $stuff 9]
- if {$File == {}} {
- set File [lindex $stuff 0]
- }
- if {$Lines == {} && $Addresses == {}} {
- set Addresses [lindex $stuff 3]
- set display_lines $Addresses
- }
- if {$functions == {}} {
- set functions [lindex $stuff 1]
- }
- } else {
- # ummm...
- set hit_count "N/A"
- set thread "N/A"
-
- # !! Assumptions...
- set stuff [gdb_get_tracepoint_info [lindex $Number 0]]
- set _TPassCount [lindex $stuff 5]
- set actions [lindex $stuff 9]
- }
- }
-
- # Number
- label $exp.numlbl -text {Number:}
- label $exp.number -text $display_number
-
- # File
- label $exp.fillbl -text {File:}
- label $exp.file -text $File
- # Line
- if {$Lines != {}} {
- label $exp.linlbl -text {Line(s):}
- } else {
- label $exp.linlbl -text {Address(es):}
- }
- label $exp.line -text $display_lines
-
- # Function
- if {[llength $functions] > 1} {
- # Do not allow this until we clean up the action dialog...
- tk_messageBox -type ok -icon error \
- -message "Cannot set tracepoint ranges across functions!"
- after idle [code delete object $this]
- }
- #set functions [join $functions ,]
- label $exp.funlbl -text {Function:}
- label $exp.funct -text [concat $functions]
-
- # Hit count
- label $exp.hitlbl -text {Hit Count:}
- label $exp.hit -text $hit_count
-
- # Thread
- label $exp.thrlbl -text {Thread:}
- label $exp.thread -text $thread
-
- # Place these onto the screen
- grid $exp.numlbl -row 0 -column 0 -sticky w -padx 10 -pady 1
- grid $exp.number -row 0 -column 1 -sticky w -padx 10 -pady 1
- grid $exp.funlbl -row 0 -column 2 -sticky w -padx 10 -pady 1
- grid $exp.funct -row 0 -column 3 -sticky w -padx 10 -pady 1
- grid $exp.hitlbl -row 1 -column 0 -sticky w -padx 10 -pady 1
- grid $exp.hit -row 1 -column 1 -sticky w -padx 10 -pady 1
- grid $exp.fillbl -row 1 -column 2 -sticky w -padx 10 -pady 1
- grid $exp.file -row 1 -column 3 -sticky w -padx 10 -pady 1
- grid $exp.thrlbl -row 2 -column 0 -sticky w -padx 10 -pady 1
- grid $exp.thread -row 2 -column 1 -sticky w -padx 10 -pady 1
- grid $exp.linlbl -row 2 -column 2 -sticky w -padx 10 -pady 1
- grid $exp.line -row 2 -column 3 -sticky w -padx 10 -pady 1
-
- # Configure columns
- grid columnconfigure $exp 0 -weight 1
- grid columnconfigure $exp 1 -weight 1
- grid columnconfigure $exp 2 -weight 1
- grid columnconfigure $exp 3 -weight 1
-
- # The "Actions" Frame
- set pass_frame [frame $act.pass]
- set act_frame [frame $act.actions]
- set new_frame [frame $act.new]
-
- # Pack these frames
- pack $pass_frame -fill x
- pack $act_frame -fill both -expand 1
- pack $new_frame -side top -fill x
-
- # Passes
- label $pass_frame.lbl -text {Number of Passes:}
- entry $pass_frame.ent -textvariable _TPassCount -width 5
- pack $pass_frame.lbl -side left -padx 10 -pady 5
- pack $pass_frame.ent -side right -padx 10 -pady 5
-
- # Actions
- set ActionLB $act_frame.lb
- iwidgets::scrolledlistbox $act_frame.lb -hscrollmode dynamic \
- -vscrollmode dynamic -selectmode multiple -exportselection 0 \
- -dblclickcommand [code $this edit] \
- -selectioncommand [code $this set_delete_action_state $ActionLB $new_frame.del_but] \
- -background $::Colors(bg)
- [$ActionLB component listbox] configure -background $::Colors(bg)
- label $act_frame.lbl -text {Actions}
- pack $act_frame.lbl -side top
- pack $act_frame.lb -side bottom -fill both -expand 1 -padx 5 -pady 5
-
- # New actions
- combobox::combobox $new_frame.combo -maxheight 15 -editable 0 \
- -font global/fixed -command [code $this set_action_type] \
- -bg $::Colors(textbg)
- $new_frame.combo list insert end collect while-stepping
- $new_frame.combo entryset collect
-
- button $new_frame.add_but -text {Add} -command "$this add_action"
- pack $new_frame.combo $new_frame.add_but -side left -fill x \
- -padx 5 -pady 5
-
- button $new_frame.del_but -text {Delete} -state disabled \
- -command "$this delete_action"
- pack $new_frame.del_but -side right -fill x \
- -padx 5 -pady 5
-
- # Pack the main frames
- pack $bbox -side bottom -padx 5 -pady 8 -fill x
- pack $f.exp -side top -padx 5 -pady 2 -fill x
- pack $f.act -side top -padx 5 -pady 2 -expand yes -fill both
-
- # If we are not new, add all actions
- if {!$New} {
- add_all_actions $actions
- }
-
- # !! FOR SOME REASON, THE *_FRAMES DO NOT GET MAPPED WHENEVER THE USER
- # WAITS A FEW SECONDS TO PLACE THIS DIALOG ON THE SCREEN. This is here
- # as a workaround so that the action-related widgets don't disappear...
- #update idletasks
- }
-
- method set_action_type {widget action} {
- set ActionType $action
- }
-
- method add_action {} {
-
- if {"$ActionType" == "while-stepping"} {
- if {$WhileStepping} {
- # We are only allowed on of these...
- tk_messageBox -icon error -type ok \
- -message "A tracepoint may only have one while-stepping action."
- return
- }
- set whilestepping 1
- set step_args "-Steps 1"
- } else {
- set whilestepping 0
- set step_args {}
- }
-
- #debug "ADDING ACTION FOR $File:[lindex $Lines 0]"
- if {$Lines != {}} {
- set ActionsDlg [eval ManagedWin::open ActionDlg -File $File \
- -Line [lindex $Lines 0] \
- -WhileStepping $whilestepping -Number [lindex $Number 0]\
- -Callback "\\\{$this done\\\}" $step_args]
- } else {
- set ActionsDlg [eval ManagedWin::open ActionDlg -File $File \
- -Address [lindex $Addresses 0] \
- -WhileStepping $whilestepping -Number [lindex $Number 0]\
- -Callback "\\\{$this done\\\}" $step_args]
- }
- }
-
- method delete_action {} {
- # If we just delete these from the action list, they will get deleted
- # when the user presses OK.
-
- set selected_elem [lsort -integer -decreasing [$ActionLB curselection]]
- foreach elem $selected_elem {
- $ActionLB delete $elem
- }
- }
-
- method set_delete_action_state {list but} {
- if {[$list curselection] == ""} {
- $but configure -state disabled
- } else {
- $but configure -state normal
- }
- }
-
- method done {status {steps 0} {data {}}} {
-
- # We have just returned from the ActionDlg: must reinstall our grab
-# after idle grab $this
-
- switch $status {
- cancel {
- # Don't do anything
- set ActionsDlg {}
- return
- }
- add {
- add_action_to_list $steps $data
- set ActionsDlg {}
- }
- delete {
- # do something
- set ActionsDlg {}
- }
- modify {
- # Delete the current selection and insert the new one in its place
- $ActionLB delete $Selection
- add_action_to_list $steps $data $Selection
- set ActionsDlg {}
- }
- default {
- debug "Unknown status from ActionDlg : \"$status\""
- }
- }
- }
-
- method add_action_to_list {steps data {index {}}} {
-
- set data [join $data ,]
-
- if {$steps > 0} {
- if {"$index" == ""} {
- set index "end"
- }
- $ActionLB insert $index "while-stepping ($steps): $data"
- set WhileStepping 1
- } else {
- if {"$index" == ""} {
- set index 0
- }
- $ActionLB insert $index "collect: $data"
- }
- }
-
- # ------------------------------------------------------------------
- # METHOD: cancel - cancel the dialog and do not set the trace
- # ------------------------------------------------------------------
- method cancel {} {
- ::delete object $this
- }
-
- # ------------------------------------------------------------------
- # METHOD: ok - validate the tracepoint and install it
- # ------------------------------------------------------------------
- method ok {} {
-
- # We "dismiss" the dialog here...
- wm withdraw [winfo toplevel [namespace tail $this]]
-
- set actions [get_actions]
- # Check that we are collecting data
-
- # This is silly, but, hey, it works.
- # Lines is the line number where the tp is
- # in case of a tp-range it is the set of lines for that range
- if {$Lines != {}} {
- for {set i 0} {$i < [llength $Number]} {incr i} {
- set number [lindex $Number $i]
- set line [lindex $Lines $i]
-
- if {$number == -1} {
- #debug "Adding new tracepoint at $File:$line $_TPassCount $actions"
- set err [catch {gdb_add_tracepoint $File:$line $_TPassCount $actions} errTxt]
- } else {
- if {$New && $Exists} {
- set result [tk_messageBox -icon error -type yesno \
- -message "Overwrite actions for tracepoint \#$number at $File:$line?" \
- -title "Query"]
- if {"$result" == "no"} {
- continue
- }
- }
- if {$New == 0 && $Exists == 1} {
- set tpnum [gdb_tracepoint_exists "$File:$line"]
- if {$tpnum == -1} {
- tk_messageBox -type ok -icon error -message "Tracepoint was deleted"
- ::delete object $this
- return
- }
- }
-
- #debug "Editing tracepoint \#$Number: $_TPassCount $actions"
- set err [catch {gdb_edit_tracepoint $number $_TPassCount $actions} errTxt]
- }
-
- if {$err} {
- if {$number == -1} {
- set str "adding new tracepoint at $File:$line"
- } else {
- set str "editing tracepoint $number at $File:$line"
- }
- tk_messageBox -type ok -icon error -message "Error $str: $errTxt"
- }
- }
- } else {
- # Async
- for {set i 0} {$i < [llength $Number]} {incr i} {
- set number [lindex $Number $i]
- set addr [lindex $Addresses $i]
- if {$number == -1} {
- #debug "Adding new tracepoint at $addr in $File; $_TPassCount $actions"
- set err [catch {gdb_add_tracepoint {} $_TPassCount $actions $addr} errTxt]
- } else {
- if {$New && $Exists} {
- set result [tk_messageBox -icon error -type yesno \
- -message "Overwrite actions for tracepoint \#$number at $File:$line?" \
- -title "Query"]
- if {"$result" == "no"} {
- continue
- }
- }
- if {$New == 0 && $Exists == 1} {
- set num [gdb_tracepoint_exists "$File:$Line"]
- if {$num == -1} {
- tk_messageBox -type ok -icon error -message "Tracepoint was deleted"
- ::delete object $this
- return
- }
- }
-
- #debug "Editing tracepoint \#$Number: $_TPassCount $actions"
- set err [catch {gdb_edit_tracepoint $number $_TPassCount $actions} errTxt]
- }
-
- if {$err} {
- if {$number == -1} {
- set str "adding new tracepoint at $addr in $File"
- } else {
- set str "editing tracepoint $number at $addr in $File"
- }
- tk_messageBox -type ok -icon error -message "Error $str: $errTxt"
- }
- }
- }
-
- ::delete object $this
- }
-
- method cmd {line} {
- $line
- }
-
- method delete_tp {} {
- debug "deleting tracepoint $Number"
- set err [catch {gdb_cmd "delete tracepoints $Number"} errTxt]
- debug "done deleting tracepoint $Number"
- ::delete object $this
- }
-
- method get_data {action} {
-
- set data {}
- foreach a $action {
- set datum [string trim $a \ \r\n\t,]
- if {"$datum" == "collect" || "$datum" == ""} {
- continue
- }
-
- lappend data $datum
- }
-
- return $data
- }
-
- method add_all_actions {actions} {
-
- set length [llength $actions]
- for {set i 0} {$i < $length} {incr i} {
- set action [lindex $actions $i]
-
- if {[regexp "collect" $action]} {
- set steps 0
- set data [get_data $action]
- } elseif {[regexp "while-stepping" $action]} {
- scan $action "while-stepping %d" steps
- incr i
- set action [lindex $actions $i]
- set data [get_data $action]
- } elseif {[regexp "end" $action]} {
- continue
- }
-
- # Now have an action: data and steps
- add_action_to_list $steps $data
- }
- }
-
- method get_actions {} {
-
- set actions {}
- set list [$ActionLB get 0 end]
- foreach action $list {
- if {[regexp "collect" $action]} {
- scan $action "collect: %s" data
- set steps 0
- set whilestepping 0
- } elseif {[regexp "while-stepping" $action]} {
- scan $action "while-stepping (%d): %s" steps data
- set whilestepping 1
- } else {
- debug "unknown action: $action"
- continue
- }
-
- lappend actions [list $steps $data]
- }
-
- return $actions
- }
-
- method edit {} {
-
- set Selection [$ActionLB curselection]
- if {$Selection != ""} {
- set action [$ActionLB get $Selection]
- if [regexp "collect" $action] {
- scan $action "collect: %s" data
- set steps 0
- set whilestepping 0
- } elseif [regexp "while-stepping" $action] {
- scan $action "while-stepping (%d): %s" steps data
- set whilestepping 1
- } else {
- debug "unknown action: $action"
- return
- }
-
- set data [split $data ,]
- set len [llength $data]
- set real_data {}
- set special 0
- for {set i 0} {$i < $len} {incr i} {
- set a [lindex $data $i]
- if {[string range $a 0 1] == "\$("} {
- set special 1
- set b $a
- } elseif {$special} {
- lappend b $a
- if {[string index $a [expr {[string length $a]-1}]] == ")"} {
- lappend real_data [join $b ,]
- set special 0
- }
- } else {
- lappend real_data $a
- }
- }
-
- # !! lindex $Lines 0 -- better way?
- if {$Lines != {}} {
- ManagedWin::open ActionDlg -File $File -Line [lindex $Lines 0] \
- -WhileStepping $whilestepping -Number [lindex $Number 0] \
- -Callback [list [code $this done]] -Data $real_data -Steps $steps
- } else {
- ManagedWin::open ActionDlg -File $File -Address [lindex $Addresses 0] \
- -WhileStepping $whilestepping -Number [lindex $Number 0] \
- -Callback [list [code $this done]] -Data $real_data -Steps $steps
- }
- }
- }
-
- method get_selection {} {
-
- set action [$ActionLB curselection]
- return [$ActionLB get $action]
- }
-
- # ------------------------------------------------------------------
- # METHOD: title - Title the trace dialog.
- #
- # This is needed to title the window after the dialog has
- # been created. The window manager actually sets our title
- # after we've been created, so we need to do this in an
- # "after idle".
- # ------------------------------------------------------------------
- method title {} {
- if {$New} {
- set display_number "N/A"
- wm title [winfo toplevel [namespace tail $this]] "Add Tracepoint"
- } else {
- wm title [winfo toplevel [namespace tail $this]] "Edit Tracepoint"
- }
- }
-
- # PUBLIC DATA
- public variable File {}
- public variable Lines {}
- public variable Addresses {}
- public variable Number {}
-
- # PROTECTED DATA
- protected variable Delete
- protected variable _TPassCount
- protected variable ActionType {}
- protected variable ActionLB
- protected variable Actions
- protected variable WhileStepping 0
- protected variable Selection {}
- protected variable New 0; # set whenever there is a new tp to add
- protected variable Exists 0; # set whenever a tracepoint in the range exists
- protected variable Dismissed 0; # has this dialog been dismissed already?
- protected variable ActionsDlg {}
-}
-
-proc gdb_add_tracepoint {where passes actions {addr {}}} {
- #debug "gdb_add_tracepoint $where $passes $actions $addr"
-
- # Install the tracepoint
- if {$where == "" && $addr != ""} {
- set where "*$addr"
- }
-
- #debug "trace $where"
- set err [catch {gdb_cmd "trace $where"} errTxt]
-
- if {$err} {
- tk_messageBox -type ok -icon error -message $errTxt
- return
- }
-
- # Get the number for this tracepoint
- set number [gdb_tracepoint_exists $where]
-
- # If there is a pass count, add that, too
- set err [catch {gdb_cmd "passcount $passes $number"} errTxt]
-
- if {$err} {
- tk_messageBox -type ok -icon error -message $errTxt
- return
- }
-
- set real_actions {}
- foreach action $actions {
- set steps [lindex $action 0]
- set data [lindex $action 1]
-
- if {$steps} {
- lappend real_actions "while-stepping $steps"
- lappend real_actions "collect $data"
- lappend real_actions "end"
- } else {
- lappend real_actions "collect $data"
- }
- }
-
- if {[llength $real_actions] > 0} {
- lappend real_actions "end"
- }
-
- set err [catch {gdb_actions $number $real_actions} errTxt]
- if $err {
- set errTxt "$errTxt Tracepoint will be installed with no actions"
- tk_messageBox -type ok -icon error -message $errTxt
- return
- }
-}
-
-proc gdb_edit_tracepoint {number passes actions} {
- #debug "gdb_edit_tracepoint $number $passes $actions"
-
- # If there is a pass count, add that, too
- set err [catch {gdb_cmd "passcount $passes $number"} errTxt]
-
- if $err {
- tk_messageBox -type ok -icon error -message $errTxt
- return
- }
-
- set real_actions {}
- foreach action $actions {
- set steps [lindex $action 0]
- set data [lindex $action 1]
-
- if $steps {
- lappend real_actions "while-stepping $steps"
- lappend real_actions "collect $data"
- lappend real_actions "end"
- } else {
- lappend real_actions "collect $data"
- }
- }
-
- if {[llength $real_actions] > 0} {
- lappend real_actions "end"
- }
-
- gdb_actions $number $real_actions
-}
diff --git a/gdb/gdbtk/library/tty.tcl b/gdb/gdbtk/library/tty.tcl
deleted file mode 100644
index d7eff97879d..00000000000
--- a/gdb/gdbtk/library/tty.tcl
+++ /dev/null
@@ -1,55 +0,0 @@
-# tty.tcl - xterm as tty for the inferior
-# Copyright (C) 1996, 2000 Red Hat, Inc
-# Written by Tom Tromey <tromey@cygnus.com>
-#
-# Interface to the inferior's terminal. This is very rough, and is
-# guaranteed to only work on Unix machines (if even there).
-#
-
-namespace eval tty {
- namespace export create
-
- variable _xterm_fd {}
-
- proc create {} {
- variable _xterm_fd
-
- destroy
-
- # Tricky: we exec /bin/cat so that the xterm will exit whenever we
- # close the write end of the pipe. Note that the stdin
- # redirection must come after tty is run; tty looks at its stdin.
- set shcmd {/bin/sh -c 'exec 1>&7; tty; exec /bin/cat 0<&6'}
-
- set fg [option get . foreground Foreground]
- if {$fg == ""} then {
- set fg black
- }
-
- set bg [. cget -background]
- if {$bg == ""} then {
- set bg [lindex [. configure -background] 3]
- }
-
- set xterm [list /bin/sh -c "exec xterm -T 'Gdb Child' -n Gdb -bg '$bg' -fg '$fg' -e $shcmd 6<&0 7>&1"]
-
- # Need both read and write access to xterm process.
- set _xterm_fd [open "| $xterm" w+]
- set tty [gets $_xterm_fd]
-
- # On failure we don't try the tty command.
- if {$tty != ""} {
- gdb_cmd "tty $tty"
- }
- }
-
- proc destroy {} {
- variable _xterm_fd
-
- if {$_xterm_fd != ""} then {
- # We don't care if this fails.
- catch {close $_xterm_fd}
- }
- set _xterm_fd {}
- }
-}
diff --git a/gdb/gdbtk/library/util.tcl b/gdb/gdbtk/library/util.tcl
deleted file mode 100644
index 764ce62b08e..00000000000
--- a/gdb/gdbtk/library/util.tcl
+++ /dev/null
@@ -1,331 +0,0 @@
-# Utilities for Insight.
-# Copyright (C) 1997, 1998, 1999, 2004 Red Hat
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-# ----------------------------------------------------------------------
-# Misc routines
-#
-# PROCS:
-#
-# keep_raised - keep a window raised
-# sleep - wait a certain number of seconds and return
-# toggle_debug_mode - turn debugging on and off
-# freeze - make a window modal
-# bp_exists - does a breakpoint exist on linespec?
-#
-# ----------------------------------------------------------------------
-#
-
-
-# A helper procedure to keep a window on top.
-proc keep_raised {top} {
- if {[winfo exists $top]} {
- raise $top
- wm deiconify $top
- after 1000 [info level 0]
- }
-}
-
-# sleep - wait a certain number of seconds then return
-proc sleep {sec} {
- global __sleep_timer
- set __sleep_timer 0
- after [expr {1000 * $sec}] set __sleep_timer 1
- vwait __sleep_timer
-}
-
-
-# ------------------------------------------------------------------
-# PROC: auto_step - automatically step through a program
-# ------------------------------------------------------------------
-
-# FIXME FIXME
-proc auto_step {} {
- global auto_step_id
-
- set auto_step_id [after 2000 auto_step]
- gdb_cmd next
-}
-
-# ------------------------------------------------------------------
-# PROC: auto_step_cancel - cancel auto-stepping
-# ------------------------------------------------------------------
-
-proc auto_step_cancel {} {
- global auto_step_id
-
- if {[info exists auto_step_id]} {
- after cancel $auto_step_id
- unset auto_step_id
- }
-}
-
-# ------------------------------------------------------------------
-# PROC: tfind_cmd -- to execute a tfind command on the target
-# ------------------------------------------------------------------
-proc tfind_cmd {command} {
- gdbtk_busy
- # need to call gdb_cmd because we want to ignore the output
- set err [catch {gdb_cmd $command} msg]
- if {$err || [regexp "Target failed to find requested trace frame" $msg]} {
- tk_messageBox -icon error -title "GDB" -type ok \
- -message $msg
- gdbtk_idle
- return
- } else {
- gdbtk_update
- gdbtk_idle
- }
-}
-
-# ------------------------------------------------------------------
-# PROC: save_trace_command -- Saves the current trace settings to a file
-# ------------------------------------------------------------------
-proc save_trace_commands {} {
-
- set out_file [tk_getSaveFile -title "Enter output file for trace commands"]
- debug "Got outfile: $out_file"
- if {$out_file != ""} {
- gdb_cmd "save-tracepoints $out_file"
- }
-}
-
-# ------------------------------------------------------------------
-# PROC: do_test - invoke the test passed in
-# This proc is provided for convenience. For any test
-# that uses the console window (like the console window
-# tests), the file cannot be sourced directly using the
-# 'tk' command because it will block the console window
-# until the file is done executing. This proc assures
-# that the console window is free for input by wrapping
-# the source call in an after callback.
-# Users may also pass in the verbose and tests globals
-# used by the testsuite.
-# ------------------------------------------------------------------
-proc do_test {{file {}} {verbose {}} {tests {}}} {
- global _test
-
- if {$file == {}} {
- error "wrong \# args: should be: do_test file ?verbose? ?tests ...?"
- }
-
- if {$verbose != {}} {
- set _test(verbose) $verbose
- } elseif {![info exists _test(verbose)]} {
- set _test(verbose) 0
- }
-
- if {$tests != {}} {
- set _test(tests) $tests
- }
-
- set _test(interactive) 1
- after 500 [list source $file]
-}
-
-# ------------------------------------------------------------------
-# PROCEDURE: gdbtk_read_defs
-# Reads in the defs file for the testsuite. This is usually
-# the first procedure called by a test file. It returns
-# 1 if it was successful and 0 if not (if run interactively
-# from the console window) or exits (if running via dejagnu).
-# ------------------------------------------------------------------
-proc gdbtk_read_defs {} {
- global _test env
-
- if {[info exists env(DEFS)]} {
- set err [catch {source $env(DEFS)} errTxt]
- } else {
- set err [catch {source defs} errTxt]
- }
-
- if {$err} {
- if {$_test(interactive)} {
- tk_messageBox -icon error -message "Cannot load defs file:\n$errTxt" -type ok
- return 0
- } else {
- puts stderr "cannot load defs files: $errTxt\ntry setting DEFS"
- exit 1
- }
- }
-
- return 1
-}
-
-# ------------------------------------------------------------------
-# PROCEDURE: bp_exists
-# Returns BPNUM if a breakpoint exists at LINESPEC or
-# -1 if no breakpoint exists there
-# ------------------------------------------------------------------
-proc bp_exists {linespec} {
-
- lassign $linespec foo function filename line_number addr pc_addr
-
- set bps [gdb_get_breakpoint_list]
- foreach bpnum $bps {
- set bpinfo [gdb_get_breakpoint_info $bpnum]
- lassign $bpinfo file func line pc type enabled disposition \
- ignore_count commands cond thread hit_count user_specification
- if {$filename == $file && $function == $func && $addr == $pc} {
- return $bpnum
- }
- }
-
- return -1
-}
-
-
-# gridCGet - This provides the missing grid cget
-# command.
-
-proc gridCGet {slave option} {
- set config_list [grid info $slave]
- return [lindex $config_list [expr [lsearch $config_list $option] + 1]]
-}
-
-# ------------------------------------------------------------------
-# PROC: get_disassembly_flavor - gets the current disassembly flavor.
-# The set disassembly-flavor command is assumed to exist. This
-# will error out if it does not.
-# ------------------------------------------------------------------
-proc get_disassembly_flavor {} {
- if {[catch {gdb_cmd "show disassembly-flavor"} ret]} {
- return ""
- } else {
- regexp {\"([^\"]*)\"\.} $ret dummy gdb_val
- return $gdb_val
- }
-}
-
-# ------------------------------------------------------------------
-# PROC: list_disassembly_flavors - Lists the current disassembly flavors.
-# Returns an empty list if the set disassembly-flavor is not supported.
-# ------------------------------------------------------------------
-proc list_disassembly_flavors {} {
- catch {gdb_cmd "set disassembly-flavor"} ret_val
- if {[regexp {Requires an argument\. Valid arguments are (.*)\.} \
- $ret_val dummy list]} {
- foreach elem [split $list ","] {
- lappend vals [string trim $elem]
- }
- return [lsort $vals]
- } else {
- return {}
- }
-}
-
-# ------------------------------------------------------------------
-# PROC: init_disassembly_flavor - Synchs up gdb's internal disassembly
-# flavor with the value in the preferences file.
-# ------------------------------------------------------------------
-proc init_disassembly_flavor {} {
- set gdb_val [get_disassembly_flavor]
- if {$gdb_val != ""} {
- set def_val [pref get gdb/src/disassembly-flavor]
- if {[string compare $def_val ""] != 0} {
- if {[catch "gdb_cmd \"set disassembly-flavor $def_val\""]} {
- pref set gdb/src/disassembly-flavor $gdb_val
- }
- } else {
- pref set gdb/src/disassembly-flavor $gdb_val
- }
- }
-}
-
-# ------------------------------------------------------------------
-# PROC: list_element_strcmp - to be used in lsort -command when the
-# elements are themselves lists, and you always want to look at
-# a particular item.
-# ------------------------------------------------------------------
-proc list_element_strcmp {index first second} {
- set theFirst [lindex $first $index]
- set theSecond [lindex $second $index]
-
- return [string compare $theFirst $theSecond]
-}
-
-# ------------------------------------------------------------------
-# PROC: gdbtk_endian - returns BIG or LITTLE depending on target
-# endianess
-# ------------------------------------------------------------------
-
-proc gdbtk_endian {} {
- if {[catch {gdb_cmd "show endian"} result]} {
- return "UNKNOWN"
- }
- if {[regexp {.*big endian} $result]} {
- set result "BIG"
- } elseif {[regexp {.*little endian} $result]} {
- set result "LITTLE"
- } else {
- set result "UNKNOWN"
- }
- return $result
-}
-
-# ------------------------------------------------------------------
-# PROC: set_bg_colors - set background and text background for
-# all windows.
-# ------------------------------------------------------------------
-proc set_bg_colors {{num ""}} {
- debug $num
-
- if {$num != ""} {
- set ::gdb_bg_num $num
- }
- set ::Colors(textbg) [pref get gdb/bg/$::gdb_bg_num]
-
- # calculate background as 80% of textbg
- set ::Colors(bg) [recolor $::Colors(textbg) 80]
-
- # calculate trough and activebackground as 90% of background
- set dbg [recolor $::Colors(bg) 90]
-
- r_setcolors . -background $::Colors(bg)
- r_setcolors . -highlightbackground $::Colors(bg)
- r_setcolors . -textbackground $::Colors(textbg)
- r_setcolors . -troughcolor $dbg
- r_setcolors . -activebackground $dbg
-
- pref_set_option_db 1
- ManagedWin::restart
-}
-
-# ------------------------------------------------------------------
-# PROC: r_setcolors - recursively set background and text background for
-# all windows.
-# ------------------------------------------------------------------
-proc r_setcolors {w option color} {
- debug "$w $option $color"
-
- # exception(s)
- if {![catch {$w isa Balloon} result] && $result == "1"} {
- return
- }
- catch {$w config $option $color}
-
- foreach child [winfo children $w] {
- r_setcolors $child $option $color
- }
-}
-
-# ------------------------------------------------------------------
-# PROC: recolor - returns a darker or lighter color
-# ------------------------------------------------------------------
-proc recolor {color percent} {
- set c [winfo rgb . $color]
- return [format #%02x%02x%02x [expr {($percent * [lindex $c 0]) / 25600}] \
- [expr {($percent * [lindex $c 1]) / 25600}] [expr {($percent * [lindex $c 2]) / 25600}]]
-}
-
-
diff --git a/gdb/gdbtk/library/vartree.itb b/gdb/gdbtk/library/vartree.itb
deleted file mode 100644
index e28733d37b8..00000000000
--- a/gdb/gdbtk/library/vartree.itb
+++ /dev/null
@@ -1,431 +0,0 @@
-# Variable tree implementation for Insight.
-# Copyright (C) 2002 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-itcl::body VarTree::constructor {args} {
- debug $args
- if {!$initialized} {
- _init_data
- }
- eval itk_initialize $args
-
- itk_component add canvas {
- iwidgets::scrolledcanvas $itk_interior.c -autoresize 1 -hscrollmode dynamic -vscrollmode dynamic \
- -background $::Colors(textbg) -borderwidth 0 -highlightthickness 0
- }
- set c [$itk_component(canvas) childsite]
- pack $itk_component(canvas) -side top -fill both -expand 1
- bind $c <1> "[code $this clicked %W %x %y 0]"
-
- # Add popup menu - we populate it in _but3
- itk_component add popup {
- menu $itk_interior.pop -tearoff 0
- } {}
- set pop $itk_component(popup)
- $pop configure -disabledforeground $::Colors(fg)
- bind $c <3> [code $this _but3 %x %y %X %Y]
-
- set selection {}
- set selidx {}
- after idle [code $this build]
-}
-
-itcl::body VarTree::destructor {} {
- debug
-}
-
-itcl::body VarTree::build {} {
- debug
- $c delete all
- catch {unset var_to_items}
- catch {unset item_to_var}
- set _y 30
- buildlayer $rootlist 10
- $c config -scrollregion [$c bbox all] -background $::Colors(textbg) -borderwidth 0 -highlightthickness 0
- update 1
- drawselection
-}
-
-itcl::body VarTree::buildlayer {tlist in} {
- set start [expr $_y - 10]
-
- foreach var $tlist {
- set y $_y
- incr _y 17
-
- if {$in > 10} {
- $c create line $in $y [expr $in+10] $y -fill $colors(line)
- }
- set x [expr $in + 12]
-
- set j1 [$c create text $x $y -text "[$var name] = " -fill $colors(name) -anchor w -font global/fixed]
- set x [expr [lindex [$c bbox $j1] 2] + 5]
- set j2 [$c create text $x $y -text "([$var type])" -fill $colors(type) -anchor w -font global/fixed]
- set x [expr [lindex [$c bbox $j2] 2] + 5]
- if {[catch {$var value} val]} {
- # error accessing memory, etc.
- set j3 [$c create text $x $y -text $val -fill $colors(error) -anchor w -font global/fixed]
- } else {
- set j3 [$c create text $x $y -text $val -fill $colors(value) -anchor w -font global/fixed]
- }
-
- set var_to_items($var) [list $j1 $j2 $j3]
- set item_to_var($j1) $var
- set item_to_var($j2) $var
- set item_to_var($j3) $var
-
- $c bind $j1 <Double-1> "[code $this clicked %W %x %y 1]"
- $c bind $j2 <Double-1> "[code $this clicked %W %x %y 1]"
- $c bind $j3 <Double-1> "[code $this edit $j3];break"
-
- if {[$var numChildren]} {
- if {[closed $var]} {
- set j [$c create image $in $y -image closedbm]
- $c bind $j <1> "[code $this open $var]"
- } else {
- set j [$c create image $in $y -image openbm]
- $c bind $j <1> "[code $this close $var]"
- buildlayer [$var children] [expr $in+18]
- }
- }
- }
- if {$in > 10} {
- $c lower [$c create line $in $start $in [expr $y+1] -fill $colors(line) ]
- }
-}
-
-# add: add a list of varobj to the tree
-itcl::body VarTree::add {var} {
- debug $var
- if {$var == ""} {return}
- set rootlist [concat $rootlist $var]
- after idle [code $this build]
-}
-
-# remove: remove a varobj from the tree
-# if the name is "all" then remove all
-itcl::body VarTree::remove {name} {
- debug $name
- if {$name == ""} {return}
- if {$name == "all"} {
- set rootlist {}
- } else {
- set rootlist [lremove $rootlist $name]
- }
- after idle [code $this build]
-}
-
-# update a var
-itcl::body VarTree::update_var {var enabled check} {
- if {$enabled && $check} {return}
- lassign $var_to_items($var) nam typ val
- if {$enabled} {
- $c itemconfigure $nam -fill $colors(name)
- $c itemconfigure $typ -fill $colors(type)
-
- if {[catch {$var value} value]} {
- set color $colors(error)
- } elseif {[$c itemcget $val -text] != $value} {
- set color $colors(change)
- } else {
- set color $colors(value)
- }
- $c itemconfigure $val -text $value -fill $color
- } else {
- $c itemconfigure $nam -fill $colors(disabled)
- $c itemconfigure $typ -fill $colors(disabled)
- $c itemconfigure $val -fill $colors(disabled)
- }
-
- if {![closed $var] && [$var numChildren]} {
- foreach child [$var children] {
- update_var $child $enabled $check
- }
- }
-}
-
-# update: update the values of the vars in the tree.
-# The "check" argument is a hack we have to do because
-# [$varobj value] does not return an error; only [$varobj update]
-# does. So after changing the tree layout in build, we must then
-# do an update. The "check" argument just optimizes things a bit over
-# a normal update by not fetching values, just calling update.
-itcl::body VarTree::update {{check 0}} {
- debug
-
- # delete selection box if it is visible
- if {$selidx != ""} {
- $c delete $selidx
- }
-
- # update all the root variables
- foreach var $rootlist {
- if {[$var update] == "-1"} {
- set enabled 0
- } else {
- set enabled 1
- }
- update_var $var $enabled $check
- }
-}
-
-# Draw the selection highlight
-itcl::body VarTree::drawselection {} {
- #debug "selidx=$selidx selection=$selection"
- if {$selidx != ""} {
- $c delete $selidx
- }
- if {$selection == ""} return
- if {![info exists var_to_items($selection)]} return
- set bbox [eval "$c bbox $var_to_items($selection)"]
- if {[llength $bbox] == 4} {
- set selidx [eval $c create rectangle $bbox -fill $::Colors(sbg) -outline {{}}]
- $c lower $selidx
- } else {
- set selidx {}
- }
-}
-
-# button 1 callback
-itcl::body VarTree::clicked {w x y open} {
- #debug "clicked $w $x $y $open"
- set x [$w canvasx $x]
- set y [$w canvasy $y]
- foreach m [$w find overlapping $x $y $x $y] {
- if {[info exists item_to_var($m)]} {
- if {$open} {
- set var $item_to_var($m)
- if {[closed $var]} {
- set closed($var) 0
- } else {
- set closed($var) 1
- }
- after idle [code $this build]
- } else {
- setselection $item_to_var($m)
- }
- return
- }
- }
- if {!$open} {
- setselection ""
- }
-}
-
-
-#
-# Change the selection to the indicated item
-#
-itcl::body VarTree::setselection {var} {
- #debug "setselection $var"
- set selection $var
- drawselection
-}
-
-# Check if a node is closed.
-# If it is a new node, set it to closed
-itcl::body VarTree::closed {name} {
- if {![info exists closed($name)]} {
- set closed($name) 1
- }
- return $closed($name)
-}
-
-# mark a node open
-itcl::body VarTree::open {name} {
- set closed($name) 0
- after idle [code $this build]
-}
-
-# mark a node closed
-itcl::body VarTree::close {name} {
- set closed($name) 1
- after idle [code $this build]
-}
-
-# edit a varobj.
-# creates an entry widget in place of the current value
-itcl::body VarTree::edit {j} {
- #debug "$j"
-
- # if another edit is in progress, cancel it
- if {$entry != ""} { unedit $j }
-
- set entryobj $item_to_var($j)
- set entry [entry $c.entry -bg $::Colors(bg) -fg $::Colors(fg) -font global/fixed]
- set entrywin [$c create window [$c coords $j] -window $entry -anchor w]
- focus $entry
- bind $entry <Return> [code $this changeValue $j]
- bind $entry <Escape> [code $this unedit $j]
-}
-
-# cancel or clean up after an edit
-itcl::body VarTree::unedit {j} {
- #debug
- # cancel the edit
- $c delete $entrywin
- destroy $entry
- set entry ""
- $c raise $j
-}
-
-# change the value of a varobj.
-itcl::body VarTree::changeValue {j} {
- #debug "value = [$entry get]"
- set new [string trim [$entry get] \ \r\n]
- if {$new == ""} {
- unedit $j
- return
- }
- if {[catch {$entryobj value $new} errTxt]} {
- # gdbtk-varobj doesn't actually return meaningful error messages
- # so use a generic one.
- set errTxt "GDB could not evaluate that expression"
- tk_messageBox -icon error -type ok -message $errTxt \
- -title "Error in Expression" -parent [winfo toplevel $itk_interior]
- focus $entry
- $entry selection to end
- } else {
- unedit $j
-
- # We may have changed a register or something else that is
- # being displayed in another window
- gdbtk_update
- }
-}
-
-# change the format for a var
-itcl::body VarTree::_change_format {var} {
- #debug "$var $popup_temp"
- catch {$var format $popup_temp}
- after idle [code $this update]
-}
-
-# button 3 callback. Pops up a menu.
-itcl::body VarTree::_but3 {x y X Y} {
- set x [$c canvasx $x]
- set y [$c canvasy $y]
- catch {destroy $pop.format}
-
- set var ""
- foreach item [$c find overlapping $x $y $x $y] {
- if {![catch {set var $item_to_var($item)}]} {
- break
- }
- }
- setselection $var
- if {$var == ""} {
- _do_default_menu $X $Y
- return
- }
- set popup_temp [$var format]
- set j3 [lindex $var_to_items($var) 2]
- #debug "var=$var [$var name] format=$popup_temp this=$this"
- $pop delete 0 end
- $pop add command -label [$var name] -state disabled
- $pop add separator
- $pop add cascade -menu $pop.format -label "Format" -underline 0
- set f [menu $pop.format -tearoff 0]
- $f add radio -label "Natural" -variable [scope popup_temp] -value "natural" -command [code $this _change_format $var]
- $f add radio -label "Decimal" -variable [scope popup_temp] -value "decimal" -command [code $this _change_format $var]
- $f add radio -label "Hex" -variable [scope popup_temp] -value "hexadecimal" -command [code $this _change_format $var]
- $f add radio -label "Octal" -variable [scope popup_temp] -value "octal" -command [code $this _change_format $var]
- $f add radio -label "Binary" -variable [scope popup_temp] -value "binary" -command [code $this _change_format $var]
- $pop add command -label "Edit" -command [code $this edit $j3]
- $pop add command -label "Delete" -command [code $this remove $var]
- if {![catch {$var value} value]} {
- $pop add separator
- $pop add command -label "Dump Memory at [$var name]" -command [list ManagedWin::open MemWin -force -addr_exp [$var name]]
- }
- $pop add separator
- if {$type == "local"} {
- $pop add command -label "Help" -command "open_help watch.html"
- } else {
- $pop add command -label "Help" -command "open_help locals.html"
- }
- $pop add separator
- $pop add command -label "Close" -command "destroy [winfo toplevel $itk_interior]"
- tk_popup $pop $X $Y
-}
-
-# popup menu over empty space
-itcl::body VarTree::_do_default_menu {X Y} {
- #debug
- $pop delete 0 end
- if {$type == "local"} {
- $pop add command -label "Local Variables" -state disabled
- } else {
- $pop add command -label "Watch Window" -state disabled
- }
- $pop add separator
- $pop add command -label "Sort" -command [code $this _sort]
- if {$type == "local"} {
- $pop add command -label "Help" -command "open_help watch.html"
- } else {
- $pop add command -label "Help" -command "open_help locals.html"
- }
- $pop add separator
- $pop add command -label "Close" -command "destroy [winfo toplevel $itk_interior]"
- tk_popup $pop $X $Y
-}
-
-# alphabetize the variable names in the list
-itcl::body VarTree::_sort {} {
- #debug $rootlist
- set rootlist [lsort -command [code $this _compare] $rootlist]
- after idle [code $this build]
-}
-
-# comparison function for lsort.
-itcl::body VarTree::_compare {a b} {
- return [string compare [$a name] [$b name]]
-}
-
-# ititialize common data
-itcl::body VarTree::_init_data {} {
- set colors(name) "\#0000C0"
- set colors(type) "red"
- set colors(error) "red"
- set colors(value) "black"
- set colors(change) $::Colors(change)
- set colors(disabled) "gray50"
- set colors(line) "gray50"
-
- set maskdata "#define solid_width 9\n#define solid_height 9"
- append maskdata {
- static unsigned char solid_bits[] = {
- 0xff, 0x01, 0xff, 0x01, 0xff, 0x01, 0xff, 0x01, 0xff, 0x01, 0xff, 0x01,
- 0xff, 0x01, 0xff, 0x01, 0xff, 0x01
- };
- }
- set data "#define open_width 9\n#define open_height 9"
- append data {
- static unsigned char open_bits[] = {
- 0xff, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x7d, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0xff, 0x01
- };
- }
- image create bitmap openbm -data $data -maskdata $maskdata \
- -foreground black -background white
- set data "#define closed_width 9\n#define closed_height 9"
- append data {
- static unsigned char closed_bits[] = {
- 0xff, 0x01, 0x01, 0x01, 0x11, 0x01, 0x11, 0x01, 0x7d, 0x01, 0x11, 0x01,
- 0x11, 0x01, 0x01, 0x01, 0xff, 0x01
- };
- }
- image create bitmap closedbm -data $data -maskdata $maskdata \
- -foreground black -background white
-
- set initialized 1
-}
-
diff --git a/gdb/gdbtk/library/vartree.ith b/gdb/gdbtk/library/vartree.ith
deleted file mode 100644
index 2a185063726..00000000000
--- a/gdb/gdbtk/library/vartree.ith
+++ /dev/null
@@ -1,77 +0,0 @@
-# Variable tree class definition for Insight.
-# Copyright (C) 2002 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-itcl::class VarTree {
- inherit itk::Widget
-
- public variable type "watch"
-
- private {
- # list of root variables in tree
- variable rootlist {}
-
- # mapping of varobj to canvas items
- variable var_to_items
- variable item_to_var
-
- variable c ;#the canvas
- variable pop ;#popup menu
- variable _y 0
- variable selection
- variable selidx
- variable closed
-
- variable popup_temp
-
- # when editing, these contain the entry widget and edited varobj
- variable entry ""
- variable entryobj
- variable entrywin
- }
-
- common maskdata
- common data
- common openbm
- common closedbm
- common initialized 0
- common colors
-
- private {
- method _init_data {}
- method build {}
- method buildlayer {tlist n}
- method drawselection {}
- method clicked {w x y open}
- method setselection {var}
- method closed {name}
- method open {name}
- method close {name}
- method edit {j}
- method unedit {j}
- method changeValue {j}
- method update_var {var ena check}
- method _but3 {x y X Y}
- method _change_format {var}
- method _do_default_menu {X Y}
- method _sort {}
- method _compare {a b}
- }
-
- public {
- method constructor {args}
- method destructor {}
- method add {varobj}
- method remove {varobj}
- method update {{check 0}}
- }
-}
diff --git a/gdb/gdbtk/library/warning.tcl b/gdb/gdbtk/library/warning.tcl
deleted file mode 100644
index 0b510594645..00000000000
--- a/gdb/gdbtk/library/warning.tcl
+++ /dev/null
@@ -1,102 +0,0 @@
-# Warning dialog for GDBtk.
-# Copyright (C) 1998, 1999 Cygnus Solutions
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-# -----------------------------------------------------------------------------
-# NAME:
-# class WarningDlg
-#
-# DESC:
-# This class implements a warning dialog. It has an optional checkbox
-# that the user can select to disable all warnings of the same type.
-#
-# ARGS:
-# -ignorable "class" - Causes an ignorable dialog to be created.
-# "class" is the warning class that will be either
-# displayed or ignored. It may be any string, so
-# long as the same string is used for all related
-# warning messages.
-#
-# -message "msg" - Message to be displayed.
-# -----------------------------------------------------------------------------
-#
-
-itcl::class WarningDlg {
- inherit ManagedWin ModalDialog
-
- public {
- variable ignorable ""
- variable message ""
- method constructor {args}
- }
-
- protected common ignore
-}
-
-# -----------------------------------------------------------------------------
-# NAME:
-# WarningDlg::constructor
-#
-# DESC:
-# Creates the warning dialog.
-# -----------------------------------------------------------------------------
-itcl::body WarningDlg::constructor {args} {
- debug $args
- window_name "Warning"
- eval itk_initialize $args
-
- if {$ignorable == ""} {
- tk_messageBox -message $message -type ok -icon warning -default ok \
- -parent [winfo toplevel $itk_interior]
- delete
- return
- } else {
- if {[info exists ignore($ignorable)]} {
- if {$ignore($ignorable)} {
- delete
- return
- }
- } else {
- set ignore($ignorable) 0
- }
- }
-
- frame $itk_interior.f
- frame $itk_interior.f.a -relief raised -bd 1
- frame $itk_interior.f.b -relief raised -bd 1
- set f $itk_interior.f.a
-
-
- label $f.bitmap -bitmap warning
- label $f.lab -text $message
- pack $f.bitmap $f.lab -side left -padx 10 -pady 10
-
- if {$ignorable != ""} {
- checkbutton $itk_interior.f.b.ignore -text "Don't show this warning again" \
- -variable [scope ignore($ignorable)] -anchor w
- }
-
- button $itk_interior.f.b.ok -text OK -underline 0 -command [code $this unpost]
- bind $itk_interior.f.b.ok <Return> \
- "$itk_interior.f.b.ok flash; $itk_interior.f.b.ok invoke"
- focus $itk_interior.f.b.ok
-
- if {$ignorable != ""} {
- pack $itk_interior.f.b.ignore
- }
-
- pack $itk_interior.f.b.ok -expand yes -side left
- pack $itk_interior.f.a
- pack $itk_interior.f.b -fill x
- pack $itk_interior.f
-}
diff --git a/gdb/gdbtk/library/watch.tcl b/gdb/gdbtk/library/watch.tcl
deleted file mode 100644
index 64b249f2064..00000000000
--- a/gdb/gdbtk/library/watch.tcl
+++ /dev/null
@@ -1,214 +0,0 @@
-# Watch window for Insight.
-# Copyright (C) 2002, 2003 Red Hat
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-
-# ----------------------------------------------------------------------
-# Implements watch windows for gdb.
-# ----------------------------------------------------------------------
-
-itcl::class WatchWin {
- inherit EmbeddedWin GDBWin
- # ------------------------------------------------------------------
- # CONSTRUCTOR - create new watch window
- # ------------------------------------------------------------------
- constructor {args} {
- debug
-
- gdbtk_busy
- build_win $itk_interior
- gdbtk_idle
-
- add_hook gdb_no_inferior_hook "$this no_inferior"
- add_hook gdb_clear_file_hook [code $this clear_file]
- add_hook file_changed_hook [code $this clear_file]
- }
-
-
- # ------------------------------------------------------------------
- # PUBLIC METHOD: busy - BusyEvent handler
- # Disable all ui elements that could affect gdb's state
- # ------------------------------------------------------------------
- method busy {event} {
- debug
- set Running 1
- cursor watch
- }
-
- # Re-enable the UI
- method idle {event} {
- debug
- set Running 0
- cursor {}
- }
-
- # ------------------------------------------------------------------
- # METHOD: no_inferior
- # Reset this object.
- # ------------------------------------------------------------------
- method no_inferior {} {
- debug
- cursor {}
- set Running 0
- }
-
- # ------------------------------------------------------------------
- # METHOD: cursor - change the toplevel's cursor
- # ------------------------------------------------------------------
- method cursor {what} {
- [winfo toplevel [namespace tail $this]] configure -cursor $what
- ::update idletasks
- }
-
-
- # ------------------------------------------------------------------
- # METHOD: build_win - build window for watch.
- # ------------------------------------------------------------------
- method build_win {f} {
- #debug "$f"
-
- set f [::frame $f.f]
- set treeFrame [frame $f.top]
- set entryFrame [frame $f.expr]
-
- set tree [VarTree $treeFrame.tree]
- pack $tree -expand yes -fill both
-
- set Entry [entry $entryFrame.ent -font global/fixed]
- button $entryFrame.but -text "Add Watch" -command [code $this validateEntry]
- pack $f -fill both -expand yes
- grid $entryFrame.ent -row 0 -column 0 -sticky news -padx 2
- grid $entryFrame.but -row 0 -column 1 -padx 2
- grid columnconfigure $entryFrame 0 -weight 1
- grid columnconfigure $entryFrame 1
-
- grid $treeFrame -row 0 -column 0 -sticky news
- grid $entryFrame -row 1 -column 0 -padx 5 -pady 5 -sticky news
- grid columnconfigure $f 0 -weight 1
- grid rowconfigure $f 0 -weight 1
- window_name "Watch"
- ::update idletasks
- # Binding for the entry
- bind $entryFrame.ent <Return> "$entryFrame.but flash; $entryFrame.but invoke"
- }
-
- method validateEntry {} {
- if {!$Running} {
- debug "Getting entry value...."
- set variable [$Entry get]
- debug "Got $variable, going to add"
- set ok [add $variable]
- debug "Added... with ok: $ok"
- $Entry delete 0 end
- }
- }
-
- # ------------------------------------------------------------------
- # METHOD: clear_file - Clear out state so that a new executable
- # can be loaded. For WatchWins, this means deleting
- # the Watched list.
- # ------------------------------------------------------------------
- method clear_file {} {
- debug
- set Watched {}
- }
-
- # ------------------------------------------------------------------
- # DESTRUCTOR - delete watch window
- # ------------------------------------------------------------------
- destructor {
- debug
- set tree {}
-
- # Remove this window and all hooks
- remove_hook gdb_no_inferior_hook "$this no_inferior"
- remove_hook gdb_clear_file_hook [code $this clear_file]
- remove_hook file_changed_hook [code $this clear_file]
-
- foreach var $Watched {
- $var delete
- }
- }
-
- method remove {entry} {
- debug $entry
-
- # Remove this entry from the list of watched variables
- set Watched [lremove $Watched $entry]
-
- $entry remove
- $entry delete
- }
-
-
- method update {event} {
- $tree update
- }
-
-
- # ------------------------------------------------------------------
- # METHOD: add - add a variable to the watch window
- # ------------------------------------------------------------------
- method add {name} {
- debug "Trying to add \"$name\" to watch"
-
- # Strip all the junk after the first \n
- set var [split $name \n]
- set var [lindex $var 0]
- set var [split $var =]
- set var [lindex $var 0]
-
- # Strip out leading/trailing +, -, ;, spaces, commas
- set var [string trim $var +-\;\ \r\n,]
-
- # Make sure that we have a valid variable
- set err [catch {gdb_cmd "set variable $var"} errTxt]
- if {$err} {
- dbug W "ERROR adding variable: $errTxt"
- ManagedWin::open WarningDlg -transient \
- -over $this -message [list $errTxt] -ignorable "watchvar"
- } else {
- if {[string index $var 0] == "\$"} {
- # We must make a special attempt at verifying convenience
- # variables.. Specifically, these are printed as "void"
- # when they are not defined. So if a user type "$_I_made_tbis_up",
- # gdb responds with the value "void" instead of an error
- catch {gdb_cmd "p $var"} msg
- set msg [split $msg =]
- set msg [string trim [lindex $msg 1] \ \r\n]
- if {$msg == "void"} {
- return 0
- }
- }
-
- debug "In add, going to add $name"
- # make one last attempt to get errors
- set err [catch {set foo($name) 1}]
- debug "err1=$err"
- set err [expr {$err + [catch {expr {$foo($name) + 1}}]}]
- debug "err2=$err"
- if {!$err} {
- set var [gdb_variable create -expr $name]
- debug "var=$var"
- $tree add $var
- lappend Watched $var
- return 1
- }
- }
- return 0
- }
-
- protected variable Entry
- protected variable Watched {}
- protected variable tree
- protected variable Running
-}
diff --git a/gdb/gdbtk/plugins/ChangeLog b/gdb/gdbtk/plugins/ChangeLog
deleted file mode 100644
index 828f4ec67a7..00000000000
--- a/gdb/gdbtk/plugins/ChangeLog
+++ /dev/null
@@ -1,12 +0,0 @@
-2005-12-23 Eli Zaretskii <eliz@gnu.org>
-
- * aclocal.m4: Update the FSF address.
-
-2002-08-14 Keith Seitz <keiths@redhat.com>
-
- * acinclude.m4, aclocal.m4, configure, configure.in,
- HOW-TO, Makefile.am, Makefile.in, Make-rules,
- plugins.tcl: New files adding improved support for plugins.
- * rhabout/: Add new sample plugin.
- * intel-pentium/: Add new Intel Pentium plugin.
-
diff --git a/gdb/gdbtk/plugins/HOW-TO b/gdb/gdbtk/plugins/HOW-TO
deleted file mode 100644
index 6d7ebc158f9..00000000000
--- a/gdb/gdbtk/plugins/HOW-TO
+++ /dev/null
@@ -1,414 +0,0 @@
-INSIGHT PLUG-INS HOW-TO
-=======================
-
-This text describes the technical aspects of adding a plug-in window
-to Insight, the graphical front-end to the GNU Debugger, GDB.
-
-
-1) INTRODUCTION
-
-The plug-in facility allows for the addition of custom windows to
-Insight. These windows are not to become part of the Insight
-distribution, but rather to be distributed separately. They can be
-downloaded from the author's web site, may accompany some development
-board or embedded OS, or come with anything else that can benefit from
-a custom window being added to the standard Insight. Plug-ins
-will be loaded into Insight/GDB for execution, so the terms of the GPL
-also apply to the plug-in code. Also, Red Hat provides this facility
-as-is and accepts no responsibility from its use. Please refer to the
-text of the GPL for more details.
-
-The facilities described here provide support for custom
-visualizations (custom windows for displaying information retrieved
-from the target). By writing a plug-in, it is possible to visualize
-target-specific data that is not shown in the standard Insight
-windows.
-
-The plug-in facility cannot be used to control target execution. The
-current implementation of Insight assumes that only the Source Window
-issues commands related to target execution control. There is no
-mechanism to prevent one to call the commands that control execution,
-but its use may result in inconsistent GUI states. This restriction
-may be lifted in future versions of Insight.
-
-The facility works as follows: A plugins subdirectory is added under
-the "EXEC-PREFIX/lib" directory where Insight is installed. The custom
-plug-in code will be installed in a subdirectory of this plugins
-directory. The plug-in window will be written as an [incr Tcl/Tk]
-class which inherits from the provided PluginWindow class and
-implements the methods necessary to display the desired custom
-data. GDB will read plug-in files on start-up and add a menu item to
-the PlugIn menu of the Insight Source Window. When the menu item is
-chosen, GDB instantiates the custom plug-in class.
-
-The PluginWindow base class constructor creates a toplevel window (an
-Insight ManagedWin) which contains a "childsite". In this case, the
-"childsite" is a frame in which the derived class (the custom plug-in)
-can draw. The PluginWindow class also provides facilities to add a
-menu and a toolbar. Among the methods provided by this class, the
-"running" method is called every time the debugger starts the target
-and the "stopped" method is called every time the target stops. In the
-"stopped" method, information can be gathered from the target and
-displayed. The "running" method indicates that GDB is busy running
-the target. No activities should be initiated by any GUI component
-while in this state (except for the STOP button in the Source Window).
-
-The remainder of this document describes how to install a custom
-plug-in and some details of the PluginWindow class. Writing Tcl
-extensions (technically what plug-ins are) is beyond the scope of
-this document, but a simple example is given and some documentation
-references are provided.
-
-Please see the file CONTRIBUTE in this directory for some
-administrative details before you start developing your plug-in.
-
-
-2) HOW TO ADD A PLUG-IN WINDOW TO INSIGHT
-
-Once you have your plug-in class ready, here is how to make it show up
-in the Insight Source Window "PlugIn" menu. You may perform these
-steps manually, but if you are distributing your plug-in, it may be
-convenient to provide an installation script with it that automates
-this steps.
-
-The examples in this section refer to the sample plug-in code provided
-with the Insight sources, located in the
-$(SOURCE)/gdb/gdbtk/plugins and $(SOURCE)/gdb/gdbtk/plugins/rhabout
-directories.
-
-Custom plug-ins are provided as "packages" (see [Welch 2000] and
-[Smith 2000]). The following setup will cause your plug-in package to
-be loaded.
-
-** FIXME: don't need to create the directory -- install will do it **
-i) First, locate the $(EXEC-PREFIX)/lib/insight1.0 directory. This is the
-directory which contains the plug-in code used by Insight. Create a
-this directory if it does not exist yet (i.e., if your plug-in
-is the first to be installed).
-
-ii) Create a subdirectory for your plug-in code (named in accordance to
-the conventions set forth in the CONTRIBUTE file). Add all your code
-to that directory. Make sure you have a tclIndex file or use
-auto_mkindex to create it. For instance, in the sample case we would
-have:
-
- $(EXEC-PREFIX)/lib/insight1.0/rhabout
-
-** FIXME: this shows unix. show cygwin, too. **
-and it would contain:
-
- rhabout.itcl rhabout.so rhabout.tcl pkgIndex.tcl tclIndex
-
-iii) In your plug-in's directory, create a file that will actually load your
-plug-in package (named accordingly to the CONTRIBUTE conventions). In
-the provided sample, this file is "rhabout.tcl" and would contain the
-following lines:
-
- package provide RHABOUT 1.0
- set dirname [file dirname [info script]]
- lappend auto_path [file join $dirname]
- catch {load [file join $dirname rhabout@TCL_SHLIB_SUFFIX@]}
-
-The first line states what package the sample plug-in code is
-providing. Note that the subdirectory "rhabout" which contains the
-sample plug-in is added to the auto_path in the third line and there
-is a tclIndex file in that directory (that is how plug-in classes and
-methods are found).
-
-The last line is only necessary if your plug-in contains Tcl command
-procedures written in C. Loading Tcl libraries is described in [Welch
-2000] and the [incr Tcl/Tk] bits can be found in [Smith 2000]. It is
-recommended that the reader also refer to the "load" Tcl man page if
-these dynamic libraries are to be loaded.
-
-iv) Add a pkgIndex.tcl file to your plug-in's directory. Do not use
-Tcl to generate this file, since it will not work properly. Instead,
-just add a line like:
-
- package ifneeded RHABOUT 1.0 [list source [file join $dir rhabout.tcl]]
-
-This roughly corresponds to what would be created by a pkg_mkIndex
-command with the "-direct" option.
-
-** FIXME: install will do this, too. ALL plugins should be mentioned
- in the global plugins.tcl file **
-v) Create/append the file "plugins.tcl" in the plugins directory
-($(EXEC-PREFIX/lib/insight1.0) if it does not yet exist. This is a file
-shared by all plug-ins so make sure your install script does not overwrite,
-but append to it.
-
-This is a Tcl code fragment that will be sourced by the Insight Source
-Window constructor to add menu entries to the "PlugIn" menu that will
-instantiate the plug-in classes. If there is any error in this few
-lines of code Insight will not start and a Tcl stack trace will be
-shown. So test it in your build directory before installing in a
-system shared by others.
-
-For the sample plug-in, this lines would be:
-
- # Add your window to the PlugIn menu here
- # Don't forget to add your packet as well
-
- if {1} { #test here if your target is configured
- # Uncomment this when the PlugIn class is ready
- #package require LIBGDB 1.0
- package require RHABOUT 1.0
- $Menu add command Other "About Red Hat" \
- {ManagedWin::open RHAbout} \
- -underline 0
- # To activate the PlugIn sample, uncomment the next line
- set plugins_available 1
- }
-
-You can ignore the LIBGDB "package require" command for now. LIBGDB
-is under construction and not yet available. But do not forget to
-add a "package require" command for your plug-in package. Otherwise,
-when someone choses your plug-in menu entry a stack trace will be
-produced.
-
-The Tcl command starting with "$Menu" is similar to the ones provided
-by the "menubar" component of the PluginWindow class (described later
-in this document), but all one needs to do is to copy the above
-replacing the menu entry text "About Red Hat", the plug-in class name
-"RHAbout" and the underline index with the appropriate values.
-
-The "set plugins_available 1" command is important. If the variable
-"plugins_available" is not set to 1 by any of the plug-in code
-fragments, the Source Window will not have a "PlugIn" menu.
-
-This brings us to the "if" statement in the first line. The sample
-plug-in is generic, it works with any target. However, a custom
-plug-in may be written for a specific target and be of no generic
-use. Furthermore, a target-specific plug-in may not even work with
-other host and target configurations different from the one for which
-it was designed.
-
-The plugins.tcl file used by Insight is shared by all configurations on a
-given host, and adding a plug-in incorrectly could render Insight unusable.
-To avoid this, test for the right configuration before adding your plug-in
-to the plug-in menu entry (the "package require" must also be protected).
-
-Insight has a global variable which contains configuration
-information. The array "GDBStartup" has the elements:
-
- host_name - host configuration triplet
- target_name - target configuration triplet
-
-Use the values $GDBStartup(host_name) and $GDBStartup(target_name)
-to verify that your plug-in code is supported. Since these are global
-variables, you must either add "global GDBStartup" somewhere before using
-it, or simply specify GDBStartup in the global space, e.g.,
-"$::GDBStartup(host_name)".
-
-For instance, if the sample code could only be used with Linux hosts,
-the sample code above would look like this:
-
- # Add your window to the PlugIn menu here
- # Don't forget to add your packet as well
-
- global GDBStartup
- if {[string first "linux" $GDBStartup(host_name)] != -1} {
- #package require LIBGDB 1.0
- package require RHABOUT 1.0
- $Menu add command Other "About Red Hat" \
- {ManagedWin::open RHAbout} \
- -underline 0
- set plugins_available 1
- }
-
-
-3) DEVELOPING AN INSIGHT PLUG-IN
-
-Only itcl-based windows will work. They must also be derived (i.e.,
-inherit) from the PluginWindow class described in the next section.
-You must also follow the name conventions described in the CONTRIBUTE
-file to avoid class name clashes.
-
-The PluginWindow base class has facilities for adding a menu and a
-toolbar. It already provides the code to deactivate buttons and menu
-entries when GDB is busy (running the target) and reactivate them when
-the target stops. Your job usually consists of calling a method to
-redraw your window with updated information when the target stops.
-You can do this simply by adding a call to this method inside the
-"stopped" method provided.
-
-The Insight Tcl source file gdb/gdbtk/library/interface.tcl and the C
-file gdb/gdbtk/generic/gdbtk-cmds.c contain a (quite volatile) set of
-Tcl commands that can be used to retrieve information from and about
-the target. Examples of the use of such commands exist all around the
-Insight source code and details are usually given near the procedure
-or function definitions. Please refrain from using commands that
-control the target execution or change the GDB state in any way, they
-are reserved for use by the Source Window only. Remember, plug-ins are
-a visualization facility only.
-
-A special remark is necessary about the gdb_cmd and gdb_immediate
-commands. These are deprecated and will disappear (stop working) soon.
-The GDB maintainers have asked the Insight maintainers to stop using
-the hooks in GDB code that make them possible. Conversion is already
-under way. You can use them for prototyping (for now), but be
-prepared to write Tcl command procedures instead of parsing console text
-output.
-
-If you need to issue target-dependent commands to retrieve information
-from your target (that cannot be retrieved with the standard register
-and memory access operations), you can write Tcl command procedures
-and add them to your target dependent file enclosed in
- #ifdef GDBTK
- #endif
-The target-dependent Tcl code will move to a subdirectory of gdbtk in
-the future, but for now, just add it to your existent target-dependent
-file.
-
-If you must access gdb functions that are not yet available in
-gdbtk-cmds.c (or in any of the spun-offs that will soon exist in the
-gdb/gdbtk/generic directory), consider writing to the Insight
-maintainers. They will be able to tell you what command should be
-implemented and, if they have the time, add it to Insight. As they
-may be busy, consider offering to write the code yourself and
-submitting it for approval (see CONTRIBUTE). You can see how these
-Tcl command procedures in C are written by looking at what it is done
-in the gdbtk-cmds.c file and others in the gdb/gdbtk/generic
-subdirectory. Again, you can use the gdb_cmd and gdb_immediate
-commands to invoke a GDB command line interface command, but they will
-not be available for long.
-
-Please refer to the sample source code located in the files:
- gdb/gdbtk/library/plugins/rhabout/rhabout.itcl
- gdb/gdbtk/library/plugins/rhabout/rhabout.c
-
-The comments in these files provide a basic framework for a Insight
-plug-in.
-
-
-4) THE "PluginWindow" BASE CLASS
-
-The PluginWindow base class provides the following methods:
-
-childsite - returns the path of the frame component that can be used
-by the plug-in code to pack its custom display components.
-
-stopped - called when the target stops. It should be overloaded and
-call the plug-in procedure that updates the display. The child
-version must call the base class method implementation if it wants
-menu items and/or buttons to be automatically controlled.
-
-running - called when GDB becomes busy by running the target. No
-commands shall be issued by a plug-in while GDB is busy. The child
-version must call the base class method implementation if it wants
-menu items and/or buttons to be automatically controlled.
-
-no_inferior - called when GDB disconnects from the target. The
-plug-in may want to forget some context information in this case,
-depending on the specifics of its implementation. The child
-version must call the base class method implementation if it wants
-menu items and/or buttons to be automatically controlled.
-
-
-The PluginWindow base class contains two components which can be
-optionally used:
-
-menubar - allows a menu to be added to the plug-in window. This
-facility is implemented by the GDBMenuBar class (gdbmenubar.itcl).
-
-toolbar - allows a toolbar to be added to the plug-in window. This
-facility is implemented by the GDBToolBar class (gdbtoolbar.itcl).
-
-
-Both buttons and menu entries have "class" attributes. Button classes
-and Menu entry classes are specified when they are created and are
-used for the automatic control of button and menu entry states.
-If the class is specified as "None", the menu entry or button will
-remain always active. The classes "Control" and "Other" follow the
-following convention:
-
- Control Other State
- off off gdb is busy
- on on gdb has inferior, and is idle
- off on gdb has no inferior, and is idle
-
-
-The "menubutton" component offers the following supported commands:
-
-add menubutton - add a menu button to the window menu bar.
-add command - add an entry to the last menu created.
-add separator - add a separator to the last menu created.
-show - attach the created menu to the window.
-
-If the show command is not issued, the plug-in window will have no
-menu bar. There are other methods and commands defined in the
-GDBMenuBar class. They are for Insight internal use only and should
-not be used by plug-in windows.
-
-A menu named "help" will automatically be aligned to the right.
-
-The sample plug-in code creates a simple menu with the following commands:
-
- $menubar add menubutton file "File" 0
- $menubar add command None "Close" \
- [code $this destroy_toplevel] \
- -underline 1
- $menubar add menubutton help "Help" 0
- $menubar add command Other "Help Topics" \
- {HtmlViewer::open_help index.html} \
- -underline 0
- $menubar add separator
- $menubar add command Other "About GDB..." \
- {ManagedWin::open About -transient} \
- -underline 0
-
- # The menu only shows up if you do this:
- $menubar show
-
-
-The "toolbar" component offers the following supported commands:
-
-add button - add a button to the window tool bar.
-add label - add an label widget to the tool bar.
-add separator - add a separator to the tool bar.
-itemconfigure - configure a tool bar element.
-show - make the toolbar visible.
-
-If the show command is not issued, the plug-in window will have no
-tool bar. There are other methods and commands defined in the
-GDBToolBar class. They are for Insight internal use only and should
-not be used by plug-in windows.
-
-Use the "itemconfigure" command to fill the label elements with the
-current data as necessary.
-
-The sample plug-in code creates a single button with the following commands:
-
- $toolbar add button con Other {ManagedWin::open Console} \
- "Console (Ctrl+N)" -image console_img
-
- # The toolbar will only show up if you do this:
- $toolbar show
-
-
-The complete Tcl code of the sample plug-in can be found in the file
- gdb/gdbtk/library/plugins/rhabout/rhabout.itcl
-and the PluginWindow class definition and implementation is in the file
- gdb/gdbtk/library/pluginwin.itcl
-
-Please refer to the files
- gdb/gdbtk/library/gdbmenubar.itcl
-and
- gdb/gdbtk/library/gdbtoolbar.itcl
-for the current arguments accepted by the menubar and toolbar commands
-respectively.
-
-REQUIRED FILES
-gdbtk/plugins/PLUGIN
-gdbtk/plugins/PLGUIN/PLUGIN.tcl.in
-gdbtk/plugins/PLUGIN/Makefile.in
-gdbtk/plugins/PLUGIN/pkgIndex.tcl
-gdbtk/plugins/PLUGIN/tclIndex
-
-REFERENCES
-
-[Smith 2000] Chad Smith, "[incr Tcl/Tk] from the Ground Up".
-Chapters 9 and 10. Osborne/McGraw-Hill, 2000.
-
-[Welch 2000] Brent B. Welch, "Practical Programming in Tcl and Tk",
-3/e. Chapters 12, 14, 44, 45, 46 and 47. Prentice Hall PTR, 2000.
diff --git a/gdb/gdbtk/plugins/Make-rules b/gdb/gdbtk/plugins/Make-rules
deleted file mode 100644
index 78a32e1a886..00000000000
--- a/gdb/gdbtk/plugins/Make-rules
+++ /dev/null
@@ -1,165 +0,0 @@
-# Variables to be defined by plugin's Makefile.in:
-#
-# PLUGIN (required)
-# PLUGIN_CFLAGS - CFLAGS to use for build
-# PLUGIN_SHLIB_LIBS - shared libs to link against
-# PLUGIN_INSTALL - anything to install from builddir
-# PLUGIN_INSTALL_SRCDIR - anything to install from srcdir
-# PLUGIN_INSTALL_TARGET - install target (overrides default)
-# PLUGIN_TARGETS - targets to build
-# PLUGIN_CLEAN - clean targets (overrides default)
-# PLUGIN_DISTCLEAN - distclean targets (overrides default)
-#
-# Cygwin-specific variables
-# PLUGIN_DLL_ENTRY - cygwin DLL entry point default _DllMain@12)
-# PLUGIN_IMAGE_BASE (required) - DLL image base
-# PLUGIN_CYGWIN_LIBS - any additional cygwin libs to link against
-# PLUGIN_OBJS - objects to put in DLL (hack)
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-srcdir = @srcdir@
-datadir = @datadir@
-libdir = @libdir@
-mandir = @mandir@
-plugin_srcdir = @top_srcdir@
-plugin_builddir = @plugin_builddir@
-
-SHELL = @SHELL@
-CC = @CC@
-CFLAGS = @CFLAGS@
-
-OBJEXT = @OBJEXT@
-TCL_SHLIB_CFLAGS = @TCL_SHLIB_CFLAGS@
-TCL_SHLIB_LD = @TCL_SHLIB_LD@
-TCL_DBGX = @TCL_DBGX@
-TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@
-TCL_INCLUDES = @TCLHDIR@
-TCL_BUILD_LIB_SPEC = @TCL_BUILD_LIB_SPEC@
-
-mkinstalldirs = $(srcdir)/../../../../mkinstalldirs
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-
-PLUGIN_MODULE = $(PLUGIN)$(TCL_SHLIB_SUFFIX)
-
-# Must include a path to tclWinInt.h on cygwin
-ifeq ($(TCL_SHLIB_SUFFIX),.dll)
-CYGWIN_CFLAGS=-I$(srcdir)/../../../../tcl/win
-else
-CYGWIN_CFLAGS=
-endif
-GENERIC_CFLAGS = $(CFLAGS) $(TCL_SHLIB_CFLAGS) $(TCL_INCLUDES) $(CYGWIN_CFLAGS)
-ALL_CFLAGS = $(GENERIC_CFLAGS) $(PLUGIN_CFLAGS)
-
-# It would be nice to copy all the plugin's files to the build dir so
-# that we can use the plugin without installing it...
-#GENERIC_TARGETS = tclIndex pkgIndex.tcl
-ifeq ($(PLUGIN_OBJS),)
-ALL_TARGETS = $(GENERIC_TARGETS) $(PLUGIN_TARGETS)
-else
-ALL_TARGETS = $(PLUGIN_MODULE) $(GENERIC_TARGETS) $(PLUGIN_TARGETS)
-endif
-
-GENERIC_SHLIB_LIBS = $(TCL_BUILD_LIB_SPEC)
-CYGWIN_DLL_LIBS = $(PLUGIN_CYGWIN_LIBS) @LIBCYGWIN_A@
-ALL_SHLIB_LIBS = $(GENERIC_SHLIB_LIBS) $(PLUGIN_SHLIB_LIBS)
-
-GENERIC_INSTALL = $(PLUGIN).tcl
-ifeq ($(PLUGIN_OBJS),)
-ALL_INSTALL = $(GENERIC_INSTALL) $(PLUGIN_INSTALL)
-else
-ALL_INSTALL = $(PLUGIN_MODULE) $(GENERIC_INSTALL) $(PLUGIN_INSTALL)
-endif
-
-ifeq ($(PLUGIN_INSTALL_TARGET),)
-INSTALL_TARGET = install-generic
-else
-INSTALL_TARGET = $(PLUGIN_INSTALL_TARGET)
-endif
-
-ifeq ($(PLUGIN_CLEAN),)
-CLEAN_TARGET = clean-generic
-else
-CLEAN_TARGET = $(PLUGIN_CLEAN)
-endif
-
-ifeq ($(PLUGIN_DISTCLEAN),)
-DISTCLEAN_TARGET = distclean-generic
-else
-DISTCLEAN_TARGET = $(PLUGIN_DISTCLEAN)
-endif
-
-# Makefile dependencies
-Makefile: $(plugin_srcdir)/Make-rules $(plugin_builddir)/config.status
- cd $(plugin_builddir) \
- && CONFIG_FILES=$(PLUGIN)/Makefile:$(PLUGIN)/Makefile.in:Make-rules CONFIG_HEADERS= $(SHELL) ./config.status
-
-all: $(ALL_TARGETS)
-
-%.$(OBJEXT): $(srcdir)/%.c
- $(CC) -c $(ALL_CFLAGS) $<
-
-install: $(INSTALL_TARGET)
-
-install-generic:
- $(mkinstalldirs) $(libdir)/insight1.0/$(PLUGIN)
- for i in $(ALL_INSTALL); do \
- $(INSTALL_DATA) $$i $(libdir)/insight1.0/$(PLUGIN)/$$i ; \
- done ;
- for i in pkgIndex.tcl tclIndex $(PLUGIN_INSTALL_SRCDIR) ; do \
- $(INSTALL_DATA) $(srcdir)/$$i $(libdir)/insight1.0/$(PLUGIN)/$$i ; \
- done ;
-
-info:
-install-info:
-clean: $(CLEAN_TARGET)
-
-clean-generic:
- rm -f *.$(OBJEXT) *.base *.def *.exp $(PLUGIN_MODULE) $(PLUGIN_CLEAN)
-
-distclean-generic: $(CLEAN_TARGET)
-
-distclean: $(DISTCLEAN_TARGET)
-
-#
-# Build rules for the DLL/shlib
-#
-
-ifeq ($(TCL_SHLIB_SUFFIX),.dll)
-
-# cygwin stuff
-DLLTOOL = @DLLTOOL@
-LD = @LD@
-AS = @AS@
-NM = @NM@
-
-PLUGIN_DEFS = $(PLUGIN).def
-PLUGIN_BASE = $(PLUGIN).base
-PLUGIN_EXP = $(PLUGIN).exp
-ifeq ($(PLUGIN_DLL_ENTRY),)
-PLUGIN_DLL_ENTRY = _DllMain@12
-endif
-
-$(PLUGIN_DEFS): $(PLUGIN_OBJS)
- echo 'EXPORTS' > tmp.def
- -for o in $(PLUGIN_OBJS) ; do \
- $(NM) --extern-only --defined-only $$o | sed -e 's/[^ ]* [^ ]* //' -e 's/^_//' | fgrep -v DllMain | fgrep -v impure_ptr >> tmp.def ; \
- done
- mv tmp.def $(PLUGIN_DEFS)
-
-$(PLUGIN_MODULE): $(PLUGIN_OBJS) $(PLUGIN_DEFS)
- $(LD) -s --base-file $(PLUGIN_BASE) -dll -o $(PLUGIN_MODULE) $(PLUGIN_OBJS) $(ALL_SHLIB_LIBS) $(CYGWIN_DLL_LIBS) -e $(PLUGIN_DLL_ENTRY) --image-base $(PLUGIN_IMAGE_BASE)
- $(DLLTOOL) --as=$(AS) --dllname $(PLUGIN_MODULE) --def $(PLUGIN_DEFS) --base-file $(PLUGIN_DEFS) --output-exp $(PLUGIN_EXP)
- $(LD) -s --base-file $(PLUGIN_BASE) $(PLUGIN_EXP) -dll -o $(PLUGIN_MODULE) $(PLUGIN_OBJS) $(ALL_SHLIB_LIBS) $(CYGWIN_DLL_LIBS) -e $(PLUGIN_DLL_ENTRY) --image-base $(PLUGIN_IMAGE_BASE)
- $(DLLTOOL) --as=$(AS) --dllname $(PLUGIN_MODULE) --def $(PLUGIN_DEFS) --base-file $(PLUGIN_BASE) --output-exp $(PLUGIN_EXP)
- $(LD) $(PLUGIN_EXP) -dll -o $(PLUGIN_MODULE) $(PLUGIN_OBJS) $(ALL_SHLIB_LIBS) $(CYGWIN_DLL_LIBS) -e $(PLUGIN_DLL_ENTRY) --image-base $(PLUGIN_IMAGE_BASE)
-
-else
-
-# For unixen only
-$(PLUGIN_MODULE): $(PLUGIN_OBJS)
- $(TCL_SHLIB_LD) -o $(PLUGIN_MODULE) $(PLUGIN_OBJS) $(ALL_SHLIB_LIBS)
-
-endif
diff --git a/gdb/gdbtk/plugins/Makefile.am b/gdb/gdbtk/plugins/Makefile.am
deleted file mode 100644
index 03fabe7c4d9..00000000000
--- a/gdb/gdbtk/plugins/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-SUBDIRS = @make_subdirs@
diff --git a/gdb/gdbtk/plugins/Makefile.in b/gdb/gdbtk/plugins/Makefile.in
deleted file mode 100644
index 15112709ffc..00000000000
--- a/gdb/gdbtk/plugins/Makefile.in
+++ /dev/null
@@ -1,447 +0,0 @@
-# Makefile.in generated by automake 1.8.3 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = .
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-host_triplet = @host@
-DIST_COMMON = $(srcdir)/../../../config.guess \
- $(srcdir)/../../../config.sub ChangeLog $(srcdir)/Makefile.in \
- $(srcdir)/Makefile.am $(top_srcdir)/configure \
- $(am__configure_deps) $(srcdir)/../../../mkinstalldirs \
- $(top_srcdir)/rhabout/Makefile.in $(srcdir)/Make-rules \
- $(top_srcdir)/rhabout/rhabout.tcl.in \
- $(top_srcdir)/intel-pentium/Makefile.in $(srcdir)/Make-rules \
- $(top_srcdir)/intel-pentium/intel-pentium.tcl.in
-subdir = .
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/../../../config/acinclude.m4 \
- $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno configure.status.lineno
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../mkinstalldirs
-CONFIG_CLEAN_FILES = rhabout/Makefile rhabout/rhabout.tcl \
- intel-pentium/Makefile intel-pentium/intel-pentium.tcl
-depcomp =
-am__depfiles_maybe =
-SOURCES =
-DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
- html-recursive info-recursive install-data-recursive \
- install-exec-recursive install-info-recursive \
- install-recursive installcheck-recursive installdirs-recursive \
- pdf-recursive ps-recursive uninstall-info-recursive \
- uninstall-recursive
-ETAGS = etags
-CTAGS = ctags
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBCYGWIN_A = @LIBCYGWIN_A@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-NM = @NM@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-TCLCONFIG = @TCLCONFIG@
-TCLHDIR = @TCLHDIR@
-TCL_BIN_DIR = @TCL_BIN_DIR@
-TCL_BUILD_LIB_SPEC = @TCL_BUILD_LIB_SPEC@
-TCL_CFLAGS = @TCL_CFLAGS@
-TCL_DBGX = @TCL_DBGX@
-TCL_DEFS = @TCL_DEFS@
-TCL_LD_FLAGS = @TCL_LD_FLAGS@
-TCL_LD_SEARCH_FLAGS = @TCL_LD_SEARCH_FLAGS@
-TCL_LIBS = @TCL_LIBS@
-TCL_LIB_FILE = @TCL_LIB_FILE@
-TCL_LIB_FULL_PATH = @TCL_LIB_FULL_PATH@
-TCL_LIB_SPEC = @TCL_LIB_SPEC@
-TCL_RANLIB = @TCL_RANLIB@
-TCL_SHLIB_CFLAGS = @TCL_SHLIB_CFLAGS@
-TCL_SHLIB_LD = @TCL_SHLIB_LD@
-TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@
-TKCONFIG = @TKCONFIG@
-TKHDIR = @TKHDIR@
-TK_BUILD_INCLUDES = @TK_BUILD_INCLUDES@
-TK_BUILD_LIB_SPEC = @TK_BUILD_LIB_SPEC@
-TK_DEFS = @TK_DEFS@
-TK_LIBS = @TK_LIBS@
-TK_LIB_FILE = @TK_LIB_FILE@
-TK_LIB_FULL_PATH = @TK_LIB_FULL_PATH@
-TK_LIB_SPEC = @TK_LIB_SPEC@
-TK_VERSION = @TK_VERSION@
-TK_XINCLUDES = @TK_XINCLUDES@
-TK_XLIBSW = @TK_XLIBSW@
-VERSION = @VERSION@
-ac_ct_AS = @ac_ct_AS@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
-ac_ct_LD = @ac_ct_LD@
-ac_ct_NM = @ac_ct_NM@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localstatedir = @localstatedir@
-make_subdirs = @make_subdirs@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-plugin_builddir = @plugin_builddir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-AUTOMAKE_OPTIONS = cygnus
-SUBDIRS = @make_subdirs@
-all: all-recursive
-
-.SUFFIXES:
-am--refresh:
- @:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
- cd $(srcdir) && $(AUTOMAKE) --foreign \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- echo ' $(SHELL) ./config.status'; \
- $(SHELL) ./config.status;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-rhabout/Makefile: $(top_builddir)/config.status $(top_srcdir)/rhabout/Makefile.in $(srcdir)/Make-rules
- cd $(top_builddir) && $(SHELL) ./config.status $@
-rhabout/rhabout.tcl: $(top_builddir)/config.status $(top_srcdir)/rhabout/rhabout.tcl.in
- cd $(top_builddir) && $(SHELL) ./config.status $@
-intel-pentium/Makefile: $(top_builddir)/config.status $(top_srcdir)/intel-pentium/Makefile.in $(srcdir)/Make-rules
- cd $(top_builddir) && $(SHELL) ./config.status $@
-intel-pentium/intel-pentium.tcl: $(top_builddir)/config.status $(top_srcdir)/intel-pentium/intel-pentium.tcl.in
- cd $(top_builddir) && $(SHELL) ./config.status $@
-uninstall-info-am:
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
- @set fnord $$MAKEFLAGS; amf=$$2; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- dot_seen=yes; \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @set fnord $$MAKEFLAGS; amf=$$2; \
- dot_seen=no; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- rev=''; for subdir in $$list; do \
- if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- fi; \
- done; \
- rev="$$rev ."; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-ctags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- if (etags --etags-include --version) >/dev/null 2>&1; then \
- include_option=--etags-include; \
- else \
- include_option=--include; \
- fi; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test -f $$subdir/TAGS && \
- tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
- fi; \
- done; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$tags$$unique" \
- || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-check-am:
-check: check-recursive
-all-am: Makefile
-installdirs: installdirs-recursive
-installdirs-am:
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-generic mostlyclean-am
-
-distclean: distclean-recursive
- -rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html: html-recursive
-
-info: info-recursive
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-recursive
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
- -rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -rf $(top_srcdir)/autom4te.cache
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-generic
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am:
-
-uninstall-info: uninstall-info-recursive
-
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
- check-am clean clean-generic clean-recursive ctags \
- ctags-recursive distclean distclean-generic \
- distclean-recursive distclean-tags dvi dvi-am html html-am \
- info info-am install install-am install-data install-data-am \
- install-exec install-exec-am install-info install-info-am \
- install-man install-strip installcheck installcheck-am \
- installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic maintainer-clean-recursive \
- mostlyclean mostlyclean-generic mostlyclean-recursive pdf \
- pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
- uninstall-info-am
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/gdb/gdbtk/plugins/acinclude.m4 b/gdb/gdbtk/plugins/acinclude.m4
deleted file mode 100644
index f5b22bea8aa..00000000000
--- a/gdb/gdbtk/plugins/acinclude.m4
+++ /dev/null
@@ -1 +0,0 @@
-"sinclude(../../../config/acinclude.m4)"
diff --git a/gdb/gdbtk/plugins/aclocal.m4 b/gdb/gdbtk/plugins/aclocal.m4
deleted file mode 100644
index 9b46a2518a2..00000000000
--- a/gdb/gdbtk/plugins/aclocal.m4
+++ /dev/null
@@ -1,944 +0,0 @@
-# generated automatically by aclocal 1.8.3 -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
-# Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-# -*- Autoconf -*-
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
-# Generated from amversion.in; do not edit by hand.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.8.3])])
-
-# AM_AUX_DIR_EXPAND
-
-# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
-#
-# Of course, Automake must honor this variable whenever it calls a
-# tool from the auxiliary directory. The problem is that $srcdir (and
-# therefore $ac_aux_dir as well) can be either absolute or relative,
-# depending on how configure is run. This is pretty annoying, since
-# it makes $ac_aux_dir quite unusable in subdirectories: in the top
-# source directory, any form will work fine, but in subdirectories a
-# relative path needs to be adjusted first.
-#
-# $ac_aux_dir/missing
-# fails when called from a subdirectory if $ac_aux_dir is relative
-# $top_srcdir/$ac_aux_dir/missing
-# fails if $ac_aux_dir is absolute,
-# fails when called from a subdirectory in a VPATH build with
-# a relative $ac_aux_dir
-#
-# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
-# are both prefixed by $srcdir. In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
-# start a VPATH build or use an absolute $srcdir.
-#
-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
-# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
-# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
-# and then we would define $MISSING as
-# MISSING="\${SHELL} $am_aux_dir/missing"
-# This will work as long as MISSING is not called from configure, because
-# unfortunately $(top_srcdir) has no meaning in configure.
-# However there are other variables, like CC, which are often used in
-# configure, and could therefore not use this "fixed" $ac_aux_dir.
-#
-# Another solution, used here, is to always expand $ac_aux_dir to an
-# absolute PATH. The drawback is that using absolute paths prevent a
-# configured tree to be moved without reconfiguration.
-
-AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-])
-
-# AM_CONDITIONAL -*- Autoconf -*-
-
-# Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 6
-
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
-# -------------------------------------
-# Define a conditional.
-AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
- [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])
-AC_SUBST([$1_FALSE])
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi
-AC_CONFIG_COMMANDS_PRE(
-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
- AC_MSG_ERROR([conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.])
-fi])])
-
-# serial 7 -*- Autoconf -*-
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
-# Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
-# written in clear, in which case automake, when reading aclocal.m4,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery. Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
-
-
-
-# _AM_DEPENDENCIES(NAME)
-# ----------------------
-# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
-# We try a few techniques and use that to set a single cache variable.
-#
-# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
-# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
-# dependency, and given that the user is not expected to run this macro,
-# just rely on AC_PROG_CC.
-AC_DEFUN([_AM_DEPENDENCIES],
-[AC_REQUIRE([AM_SET_DEPDIR])dnl
-AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
-AC_REQUIRE([AM_MAKE_INCLUDE])dnl
-AC_REQUIRE([AM_DEP_TRACK])dnl
-
-ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
- [$1], CXX, [depcc="$CXX" am_compiler_list=],
- [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
- [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
- [depcc="$$1" am_compiler_list=])
-
-AC_CACHE_CHECK([dependency style of $depcc],
- [am_cv_$1_dependencies_compiler_type],
-[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
- # We make a subdir and do the tests there. Otherwise we can end up
- # making bogus files that we don't know about and never remove. For
- # instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
- mkdir conftest.dir
- # Copy depcomp to subdir because otherwise we won't find it if we're
- # using a relative directory.
- cp "$am_depcomp" conftest.dir
- cd conftest.dir
- # We will build objects and dependencies in a subdirectory because
- # it helps to detect inapplicable dependency modes. For instance
- # both Tru64's cc and ICC support -MD to output dependencies as a
- # side effect of compilation, but ICC will put the dependencies in
- # the current directory while Tru64 will put them in the object
- # directory.
- mkdir sub
-
- am_cv_$1_dependencies_compiler_type=none
- if test "$am_compiler_list" = ""; then
- am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
- fi
- for depmode in $am_compiler_list; do
- # Setup a source with many dependencies, because some compilers
- # like to wrap large dependency lists on column 80 (with \), and
- # we should not choose a depcomp mode which is confused by this.
- #
- # We need to recreate these files for each test, as the compiler may
- # overwrite some of them when testing with obscure command lines.
- # This happens at least with the AIX C compiler.
- : > sub/conftest.c
- for i in 1 2 3 4 5 6; do
- echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
- done
- echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
- case $depmode in
- nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
- if test "x$enable_dependency_tracking" = xyes; then
- continue
- else
- break
- fi
- ;;
- none) break ;;
- esac
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this.
- if depmode=$depmode \
- source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
- depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
- >/dev/null 2>conftest.err &&
- grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- # icc doesn't choke on unknown options, it will just issue warnings
- # (even with -Werror). So we grep stderr for any message
- # that says an option was ignored.
- if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
- am_cv_$1_dependencies_compiler_type=$depmode
- break
- fi
- fi
- done
-
- cd ..
- rm -rf conftest.dir
-else
- am_cv_$1_dependencies_compiler_type=none
-fi
-])
-AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
-AM_CONDITIONAL([am__fastdep$1], [
- test "x$enable_dependency_tracking" != xno \
- && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
-])
-
-
-# AM_SET_DEPDIR
-# -------------
-# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
-AC_DEFUN([AM_SET_DEPDIR],
-[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
-])
-
-
-# AM_DEP_TRACK
-# ------------
-AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[ --disable-dependency-tracking speeds up one-time build
- --enable-dependency-tracking do not reject slow dependency extractors])
-if test "x$enable_dependency_tracking" != xno; then
- am_depcomp="$ac_aux_dir/depcomp"
- AMDEPBACKSLASH='\'
-fi
-AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])
-])
-
-# Generate code to set up dependency tracking. -*- Autoconf -*-
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-#serial 2
-
-# _AM_OUTPUT_DEPENDENCY_COMMANDS
-# ------------------------------
-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[for mf in $CONFIG_FILES; do
- # Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named `Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # So let's grep whole file.
- if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
- dirpart=`AS_DIRNAME("$mf")`
- else
- continue
- fi
- grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
- # Extract the definition of DEP_FILES from the Makefile without
- # running `make'.
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
- test -z "$DEPDIR" && continue
- # When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n 's/^U = //p' < "$mf"`
- test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
- # We invoke sed twice because it is the simplest approach to
- # changing $(DEPDIR) to its actual value in the expansion.
- for file in `sed -n '
- /^DEP_FILES = .*\\\\$/ {
- s/^DEP_FILES = //
- :loop
- s/\\\\$//
- p
- n
- /\\\\$/ b loop
- p
- }
- /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`AS_DIRNAME(["$file"])`
- AS_MKDIR_P([$dirpart/$fdir])
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
- done
-done
-])# _AM_OUTPUT_DEPENDENCY_COMMANDS
-
-
-# AM_OUTPUT_DEPENDENCY_COMMANDS
-# -----------------------------
-# This macro should only be invoked once -- use via AC_REQUIRE.
-#
-# This code is only required when automatic dependency tracking
-# is enabled. FIXME. This creates each `.P' file that we will
-# need in order to bootstrap the dependency handling code.
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
-[AC_CONFIG_COMMANDS([depfiles],
- [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
- [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
-
-# Do all the work for Automake. -*- Autoconf -*-
-
-# This macro actually does too much some checks are only needed if
-# your package does certain things. But this isn't really a big deal.
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 11
-
-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
-# AM_INIT_AUTOMAKE([OPTIONS])
-# -----------------------------------------------
-# The call with PACKAGE and VERSION arguments is the old style
-# call (pre autoconf-2.50), which is being phased out. PACKAGE
-# and VERSION should now be passed to AC_INIT and removed from
-# the call to AM_INIT_AUTOMAKE.
-# We support both call styles for the transition. After
-# the next Automake release, Autoconf can make the AC_INIT
-# arguments mandatory, and then we can depend on a new Autoconf
-# release and drop the old call support.
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.58])dnl
-dnl Autoconf wants to disallow AM_ names. We explicitly allow
-dnl the ones we care about.
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
-AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])dnl
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
- test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
- if (cygpath --version) >/dev/null 2>/dev/null; then
- CYGPATH_W='cygpath -w'
- else
- CYGPATH_W=echo
- fi
-fi
-AC_SUBST([CYGPATH_W])
-
-# Define the identity of the package.
-dnl Distinguish between old-style and new-style calls.
-m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
- AC_SUBST([PACKAGE], [$1])dnl
- AC_SUBST([VERSION], [$2])],
-[_AM_SET_OPTIONS([$1])dnl
- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
-
-_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
-
-# Some tools Automake needs.
-AC_REQUIRE([AM_SANITY_CHECK])dnl
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
-AM_MISSING_PROG(AMTAR, tar)
-AM_PROG_INSTALL_SH
-AM_PROG_INSTALL_STRIP
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-
-_AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_CC],
- [_AM_DEPENDENCIES(CC)],
- [define([AC_PROG_CC],
- defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [_AM_DEPENDENCIES(CXX)],
- [define([AC_PROG_CXX],
- defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
-])
-])
-
-
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated. The stamp files are numbered to have different names.
-
-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
-# loop where config.status creates the headers, so we can generate
-# our stamp files there.
-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
-[# Compute $1's index in $config_headers.
-_am_stamp_count=1
-for _am_header in $config_headers :; do
- case $_am_header in
- $1 | $1:* )
- break ;;
- * )
- _am_stamp_count=`expr $_am_stamp_count + 1` ;;
- esac
-done
-echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
-
-# AM_PROG_INSTALL_SH
-# ------------------
-# Define $install_sh.
-
-# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-AC_DEFUN([AM_PROG_INSTALL_SH],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
-AC_SUBST(install_sh)])
-
-# -*- Autoconf -*-
-# Copyright (C) 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 1
-
-# Check whether the underlying file-system supports filenames
-# with a leading dot. For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
- am__leading_dot=.
-else
- am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004
-# Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 3
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT([$USE_MAINTAINER_MODE])
- AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
-AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
-
-# Check to see how 'make' treats includes. -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 2
-
-# AM_MAKE_INCLUDE()
-# -----------------
-# Check to see how make treats includes.
-AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
- @echo done
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
- am__include=include
- am__quote=
- _am_result=GNU
-fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
- echo '.include "confinc"' > confmf
- if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
- am__include=.include
- am__quote="\""
- _am_result=BSD
- fi
-fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
-
-# -*- Autoconf -*-
-
-
-# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 3
-
-# AM_MISSING_PROG(NAME, PROGRAM)
-# ------------------------------
-AC_DEFUN([AM_MISSING_PROG],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
-$1=${$1-"${am_missing_run}$2"}
-AC_SUBST($1)])
-
-
-# AM_MISSING_HAS_RUN
-# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
-AC_DEFUN([AM_MISSING_HAS_RUN],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
-else
- am_missing_run=
- AC_MSG_WARN([`missing' script is too old or missing])
-fi
-])
-
-# AM_PROG_MKDIR_P
-# ---------------
-# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
-
-# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
-# created by `make install' are always world readable, even if the
-# installer happens to have an overly restrictive umask (e.g. 077).
-# This was a mistake. There are at least two reasons why we must not
-# use `-m 0755':
-# - it causes special bits like SGID to be ignored,
-# - it may be too restrictive (some setups expect 775 directories).
-#
-# Do not use -m 0755 and let people choose whatever they expect by
-# setting umask.
-#
-# We cannot accept any implementation of `mkdir' that recognizes `-p'.
-# Some implementations (such as Solaris 8's) are not thread-safe: if a
-# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
-# concurrently, both version can detect that a/ is missing, but only
-# one can create it and the other will error out. Consequently we
-# restrict ourselves to GNU make (using the --version option ensures
-# this.)
-AC_DEFUN([AM_PROG_MKDIR_P],
-[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
- # Keeping the `.' argument allows $(mkdir_p) to be used without
- # argument. Indeed, we sometimes output rules like
- # $(mkdir_p) $(somedir)
- # where $(somedir) is conditionally defined.
- # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
- # expensive solution, as it forces Make to start a sub-shell.)
- mkdir_p='mkdir -p -- .'
-else
- # On NextStep and OpenStep, the `mkdir' command does not
- # recognize any option. It will interpret all options as
- # directories to create, and then abort because `.' already
- # exists.
- for d in ./-p ./--version;
- do
- test -d $d && rmdir $d
- done
- # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
- if test -f "$ac_aux_dir/mkinstalldirs"; then
- mkdir_p='$(mkinstalldirs)'
- else
- mkdir_p='$(install_sh) -d'
- fi
-fi
-AC_SUBST([mkdir_p])])
-
-# Helper functions for option handling. -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 2
-
-# _AM_MANGLE_OPTION(NAME)
-# -----------------------
-AC_DEFUN([_AM_MANGLE_OPTION],
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
-
-# _AM_SET_OPTION(NAME)
-# ------------------------------
-# Set option NAME. Presently that only means defining a flag for this option.
-AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
-
-# _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
-# OPTIONS is a space-separated list of Automake options.
-AC_DEFUN([_AM_SET_OPTIONS],
-[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
-
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
-# -------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-AC_DEFUN([_AM_IF_OPTION],
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 3
-
-# AM_SANITY_CHECK
-# ---------------
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
- if test "$[*]" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftest.file`
- fi
- rm -f conftest.file
- if test "$[*]" != "X $srcdir/configure conftest.file" \
- && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "$[2]" = conftest.file
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-AC_MSG_RESULT(yes)])
-
-# AM_PROG_INSTALL_STRIP
-
-# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# One issue with vendor `install' (even GNU) is that you can't
-# specify the program used to strip binaries. This is especially
-# annoying in cross-compiling environments, where the build's strip
-# is unlikely to handle the host's binaries.
-# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
-# STRIPPROG with the value of the STRIP variable (set by the user).
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'. However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
-if test "$cross_compiling" != no; then
- AC_CHECK_TOOL([STRIP], [strip], :)
-fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
-
-m4_include([acinclude.m4])
diff --git a/gdb/gdbtk/plugins/configure b/gdb/gdbtk/plugins/configure
deleted file mode 100755
index db35383e093..00000000000
--- a/gdb/gdbtk/plugins/configure
+++ /dev/null
@@ -1,5082 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59.
-#
-# Copyright (C) 2003 Free Software Foundation, Inc.
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-exec 6>&1
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_config_libobj_dir=.
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Maximum number of lines to put in a shell here document.
-# This variable seems obsolete. It should probably be removed, and
-# only ac_max_sed_lines should be used.
-: ${ac_max_here_lines=38}
-
-# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-
-ac_unique_file="Make-rules"
-# Factoring default headers for most tests.
-ac_includes_default="\
-#include <stdio.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#if STDC_HEADERS
-# include <stdlib.h>
-# include <stddef.h>
-#else
-# if HAVE_STDLIB_H
-# include <stdlib.h>
-# endif
-#endif
-#if HAVE_STRING_H
-# if !STDC_HEADERS && HAVE_MEMORY_H
-# include <memory.h>
-# endif
-# include <string.h>
-#endif
-#if HAVE_STRINGS_H
-# include <strings.h>
-#endif
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-# include <stdint.h>
-# endif
-#endif
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif"
-
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO SET_MAKE MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT TCLCONFIG TCL_DEFS TCL_LIB_FILE TCL_LIB_FULL_PATH TCL_LIBS TCL_CFLAGS TCL_SHLIB_CFLAGS TCL_SHLIB_LD TCL_LD_FLAGS TCL_LD_SEARCH_FLAGS TCL_RANLIB TCL_BUILD_LIB_SPEC TCL_LIB_SPEC TCL_BIN_DIR TKCONFIG TK_VERSION TK_DEFS TK_LIB_FILE TK_LIB_FULL_PATH TK_LIBS TK_BUILD_INCLUDES TK_XINCLUDES TK_XLIBSW TK_BUILD_LIB_SPEC TK_LIB_SPEC CPP EGREP TCLHDIR TKHDIR TCL_DBGX TCL_SHLIB_SUFFIX NM ac_ct_NM AS ac_ct_AS LD ac_ct_LD LIBCYGWIN_A DLLTOOL ac_ct_DLLTOOL make_subdirs plugin_builddir LIBOBJS LTLIBOBJS'
-ac_subst_files=''
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-ac_prev=
-for ac_option
-do
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case $ac_option in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir=$ac_optarg ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build_alias ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build_alias=$ac_optarg ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file=$ac_optarg ;;
-
- --config-cache | -C)
- cache_file=config.cache ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir=$ac_optarg ;;
-
- -disable-* | --disable-*)
- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- eval "enable_$ac_feature=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_$ac_feature='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix=$ac_optarg ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he | -h)
- ac_init_help=long ;;
- -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
- ac_init_help=recursive ;;
- -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
- ac_init_help=short ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host_alias ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host_alias=$ac_optarg ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir=$ac_optarg ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir=$ac_optarg ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir=$ac_optarg ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir=$ac_optarg ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir=$ac_optarg ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir=$ac_optarg ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c | -n)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir=$ac_optarg ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix=$ac_optarg ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix=$ac_optarg ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix=$ac_optarg ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name=$ac_optarg ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir=$ac_optarg ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir=$ac_optarg ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site=$ac_optarg ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir=$ac_optarg ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir=$ac_optarg ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target_alias ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target_alias=$ac_optarg ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers | -V)
- ac_init_version=: ;;
-
- -with-* | --with-*)
- ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "with_$ac_package='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/-/_/g'`
- eval "with_$ac_package=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes=$ac_optarg ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries=$ac_optarg ;;
-
- -*) { echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; }
- ;;
-
- *=*)
- ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
- # Reject names that are not valid shell variable names.
- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
- { (exit 1); exit 1; }; }
- ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
- eval "$ac_envvar='$ac_optarg'"
- export $ac_envvar ;;
-
- *)
- # FIXME: should be removed in autoconf 3.0.
- echo "$as_me: WARNING: you should use --build, --host, --target" >&2
- expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- { echo "$as_me: error: missing argument to $ac_option" >&2
- { (exit 1); exit 1; }; }
-fi
-
-# Be sure to have absolute paths.
-for ac_var in exec_prefix prefix
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
- localstatedir libdir includedir oldincludedir infodir mandir
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
- if test "x$build_alias" = x; then
- cross_compiling=maybe
- echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
- elif test "x$build_alias" != "x$host_alias"; then
- cross_compiling=yes
- fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_confdir=`(dirname "$0") 2>/dev/null ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$0" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
- { (exit 1); exit 1; }; }
- else
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
- { (exit 1); exit 1; }; }
- fi
-fi
-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
- { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
- { (exit 1); exit 1; }; }
-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
-ac_env_build_alias_set=${build_alias+set}
-ac_env_build_alias_value=$build_alias
-ac_cv_env_build_alias_set=${build_alias+set}
-ac_cv_env_build_alias_value=$build_alias
-ac_env_host_alias_set=${host_alias+set}
-ac_env_host_alias_value=$host_alias
-ac_cv_env_host_alias_set=${host_alias+set}
-ac_cv_env_host_alias_value=$host_alias
-ac_env_target_alias_set=${target_alias+set}
-ac_env_target_alias_value=$target_alias
-ac_cv_env_target_alias_set=${target_alias+set}
-ac_cv_env_target_alias_value=$target_alias
-ac_env_CC_set=${CC+set}
-ac_env_CC_value=$CC
-ac_cv_env_CC_set=${CC+set}
-ac_cv_env_CC_value=$CC
-ac_env_CFLAGS_set=${CFLAGS+set}
-ac_env_CFLAGS_value=$CFLAGS
-ac_cv_env_CFLAGS_set=${CFLAGS+set}
-ac_cv_env_CFLAGS_value=$CFLAGS
-ac_env_LDFLAGS_set=${LDFLAGS+set}
-ac_env_LDFLAGS_value=$LDFLAGS
-ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
-ac_cv_env_LDFLAGS_value=$LDFLAGS
-ac_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_env_CPPFLAGS_value=$CPPFLAGS
-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_cv_env_CPPFLAGS_value=$CPPFLAGS
-ac_env_CPP_set=${CPP+set}
-ac_env_CPP_value=$CPP
-ac_cv_env_CPP_set=${CPP+set}
-ac_cv_env_CPP_value=$CPP
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE. See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
- -h, --help display this help and exit
- --help=short display options specific to this package
- --help=recursive display the short help of all the included packages
- -V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
- --cache-file=FILE cache test results in FILE [disabled]
- -C, --config-cache alias for \`--cache-file=config.cache'
- -n, --no-create do not create output files
- --srcdir=DIR find the sources in DIR [configure dir or \`..']
-
-_ACEOF
-
- cat <<_ACEOF
-Installation directories:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --infodir=DIR info documentation [PREFIX/info]
- --mandir=DIR man documentation [PREFIX/man]
-_ACEOF
-
- cat <<\_ACEOF
-
-Program names:
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM run sed PROGRAM on installed program names
-
-System types:
- --build=BUILD configure for building on BUILD [guessed]
- --host=HOST cross-compile to build programs to run on HOST [BUILD]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
-
- cat <<\_ACEOF
-
-Optional Features:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer
-
-Optional Packages:
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --with-tclconfig directory containing tcl configuration (tclConfig.sh)
- --with-tkconfig directory containing tk configuration (tkConfig.sh)
- --with-tclinclude directory where tcl headers are
- --with-tkinclude directory where tk headers are
-
-Some influential environment variables:
- CC C compiler command
- CFLAGS C compiler flags
- LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
- nonstandard directory <lib dir>
- CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
- headers in a nonstandard directory <include dir>
- CPP C preprocessor
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-_ACEOF
-fi
-
-if test "$ac_init_help" = "recursive"; then
- # If there are subdirs, report their specific --help.
- ac_popdir=`pwd`
- for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d $ac_dir || continue
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
- cd $ac_dir
- # Check for guested configure; otherwise get Cygnus style configure.
- if test -f $ac_srcdir/configure.gnu; then
- echo
- $SHELL $ac_srcdir/configure.gnu --help=recursive
- elif test -f $ac_srcdir/configure; then
- echo
- $SHELL $ac_srcdir/configure --help=recursive
- elif test -f $ac_srcdir/configure.ac ||
- test -f $ac_srcdir/configure.in; then
- echo
- $ac_configure --help
- else
- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi
- cd $ac_popdir
- done
-fi
-
-test -n "$ac_init_help" && exit 0
-if $ac_init_version; then
- cat <<\_ACEOF
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
- exit 0
-fi
-exec 5>config.log
-cat >&5 <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by $as_me, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- $ $0 $@
-
-_ACEOF
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
-
-/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
-/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
-/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- echo "PATH: $as_dir"
-done
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_sep=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
- for ac_arg
- do
- case $ac_arg in
- -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- continue ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- case $ac_pass in
- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
- 2)
- ac_configure_args1="$ac_configure_args1 '$ac_arg'"
- if test $ac_must_keep_next = true; then
- ac_must_keep_next=false # Got value, back to normal.
- else
- case $ac_arg in
- *=* | --config-cache | -C | -disable-* | --disable-* \
- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
- | -with-* | --with-* | -without-* | --without-* | --x)
- case "$ac_configure_args0 " in
- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
- esac
- ;;
- -* ) ac_must_keep_next=true ;;
- esac
- fi
- ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
- # Get rid of the leading space.
- ac_sep=" "
- ;;
- esac
- done
-done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log. We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Be sure not to use single quotes in there, as some shells,
-# such as our DU 5.0 friend, will then `close' the trap.
-trap 'exit_status=$?
- # Save into config.log some information that might help in debugging.
- {
- echo
-
- cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
- echo
- # The following way of writing the cache mishandles newlines in values,
-{
- (set) 2>&1 |
- case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- sed -n \
- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
- ;;
- *)
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-}
- echo
-
- cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_vars
- do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
-
- if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------- ##
-## Output files. ##
-## ------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_files
- do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
- fi
-
- if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
- echo
- sed "/^$/d" confdefs.h | sort
- echo
- fi
- test "$ac_signal" != 0 &&
- echo "$as_me: caught signal $ac_signal"
- echo "$as_me: exit $exit_status"
- } >&5
- rm -f core *.core &&
- rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
- exit $exit_status
- ' 0
-for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo >confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
- sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
- { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . $cache_file;;
- *) . ./$cache_file;;
- esac
- fi
-else
- { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
- >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in `(set) 2>&1 |
- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
- eval ac_old_set=\$ac_cv_env_${ac_var}_set
- eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val="\$ac_cv_env_${ac_var}_value"
- eval ac_new_val="\$ac_env_${ac_var}_value"
- case $ac_old_set,$ac_new_set in
- set,)
- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,set)
- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,);;
- *)
- if test "x$ac_old_val" != "x$ac_new_val"; then
- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
-echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
-echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
- fi;;
- esac
- # Pass precious variables to config.status.
- if test "$ac_new_set" = set; then
- case $ac_new_val in
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
- *) ac_arg=$ac_var=$ac_new_val ;;
- esac
- case " $ac_configure_args " in
- *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- esac
- fi
-done
-if $ac_cache_corrupted; then
- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-ac_aux_dir=
-for ac_dir in ../../.. $srcdir/../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- elif test -f $ac_dir/shtool; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/shtool install -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in ../../.. $srcdir/../../.." >&5
-echo "$as_me: error: cannot find install-sh or install.sh in ../../.. $srcdir/../../.." >&2;}
- { (exit 1); exit 1; }; }
-fi
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"
-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
- ./ | .// | /cC/* | \
- /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
- ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
- /usr/ucb/* ) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # program-specific install script used by HP pwplus--don't use.
- :
- else
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
- done
- done
- ;;
-esac
-done
-
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL=$ac_cv_path_install
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL=$ac_install_sh
- fi
-fi
-echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo "$as_me:$LINENO: checking whether build environment is sane" >&5
-echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" >&5
-echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" >&2;}
- { (exit 1); exit 1; }; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
-Check your system clock" >&5
-echo "$as_me: error: newly created file is older than distributed files!
-Check your system clock" >&2;}
- { (exit 1); exit 1; }; }
-fi
-rm -f conftest*
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,$program_prefix,;$program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$,$program_suffix,;$program_transform_name"
-# Double any \ or $. echo might interpret backslashes.
-# By default was `s,x,x', remove it if useless.
-cat <<\_ACEOF >conftest.sed
-s/[\\$]/&&/g;s/;s,x,x,$//
-_ACEOF
-program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
-rm conftest.sed
-
-echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.make <<\_ACEOF
-all:
- @echo 'ac_maketemp="$(MAKE)"'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftest.make
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- SET_MAKE=
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-PACKAGE=insight
-
-VERSION=1.0
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
-echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE "$PACKAGE"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define VERSION "$VERSION"
-_ACEOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo "$as_me:$LINENO: checking for working aclocal" >&5
-echo $ECHO_N "checking for working aclocal... $ECHO_C" >&6
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal
- echo "$as_me:$LINENO: result: found" >&5
-echo "${ECHO_T}found" >&6
-else
- ACLOCAL="$missing_dir/missing aclocal"
- echo "$as_me:$LINENO: result: missing" >&5
-echo "${ECHO_T}missing" >&6
-fi
-
-echo "$as_me:$LINENO: checking for working autoconf" >&5
-echo $ECHO_N "checking for working autoconf... $ECHO_C" >&6
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$as_me:$LINENO: result: found" >&5
-echo "${ECHO_T}found" >&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$as_me:$LINENO: result: missing" >&5
-echo "${ECHO_T}missing" >&6
-fi
-
-echo "$as_me:$LINENO: checking for working automake" >&5
-echo $ECHO_N "checking for working automake... $ECHO_C" >&6
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake
- echo "$as_me:$LINENO: result: found" >&5
-echo "${ECHO_T}found" >&6
-else
- AUTOMAKE="$missing_dir/missing automake"
- echo "$as_me:$LINENO: result: missing" >&5
-echo "${ECHO_T}missing" >&6
-fi
-
-echo "$as_me:$LINENO: checking for working autoheader" >&5
-echo $ECHO_N "checking for working autoheader... $ECHO_C" >&6
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$as_me:$LINENO: result: found" >&5
-echo "${ECHO_T}found" >&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$as_me:$LINENO: result: missing" >&5
-echo "${ECHO_T}missing" >&6
-fi
-
-echo "$as_me:$LINENO: checking for working makeinfo" >&5
-echo $ECHO_N "checking for working makeinfo... $ECHO_C" >&6
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$as_me:$LINENO: result: found" >&5
-echo "${ECHO_T}found" >&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$as_me:$LINENO: result: missing" >&5
-echo "${ECHO_T}missing" >&6
-fi
-
-
-echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
-echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi;
- echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
-echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.make <<\_ACEOF
-all:
- @echo 'ac_maketemp="$(MAKE)"'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftest.make
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- SET_MAKE=
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-# Make sure we can run config.sub.
-$ac_config_sub sun4 >/dev/null 2>&1 ||
- { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
-echo "$as_me: error: cannot run $ac_config_sub" >&2;}
- { (exit 1); exit 1; }; }
-
-echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6
-if test "${ac_cv_build+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_build_alias=$build_alias
-test -z "$ac_cv_build_alias" &&
- ac_cv_build_alias=`$ac_config_guess`
-test -z "$ac_cv_build_alias" &&
- { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
- { (exit 1); exit 1; }; }
-ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6
-build=$ac_cv_build
-build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6
-if test "${ac_cv_host+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_host_alias=$host_alias
-test -z "$ac_cv_host_alias" &&
- ac_cv_host_alias=$ac_cv_build_alias
-ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6
-host=$ac_cv_host
-host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-fi
-
-fi
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# != 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
- fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- for ac_prog in cl
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$CC" && break
- done
-fi
-if test -z "$CC"; then
- ac_ct_CC=$CC
- for ac_prog in cl
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$ac_ct_CC" && break
-done
-
- CC=$ac_ct_CC
-fi
-
-fi
-
-
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-
-# Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
- "checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
- (eval $ac_compiler --version </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
- (eval $ac_compiler -v </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
- (eval $ac_compiler -V </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
- (eval $ac_link_default) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # Find the output, starting from the most likely. This scheme is
-# not robust to junk in `.', hence go to wildcards (a.*) only as a last
-# resort.
-
-# Be careful to initialize this variable, since it used to be cached.
-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
-ac_cv_exeext=
-# b.out is created by i960 compilers.
-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
-do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
- ;;
- conftest.$ac_ext )
- # This is the source file.
- ;;
- [ab].out )
- # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
- *.* )
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- # FIXME: I believe we export ac_cv_exeext for Libtool,
- # but it would be cool to find out if it's true. Does anybody
- # maintain Libtool? --akim.
- export ac_cv_exeext
- break;;
- * )
- break;;
- esac
-done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }
-fi
-
-ac_exeext=$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6
-
-# Check the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
- if { ac_try='./$ac_file'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
- fi
- fi
-fi
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-# Check the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6
-
-echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
- *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- export ac_cv_exeext
- break;;
- * ) break;;
- esac
-done
-else
- { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
-if test "${ac_cv_objext+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
- *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
- break;;
- esac
-done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_compiler_gnu=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_compiler_gnu=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
-GCC=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-CFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_g=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_prog_cc_g=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_prog_cc_stdc=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std1 is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std1. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
-_ACEOF
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX -qlanglvl=ansi
-# Ultrix and OSF/1 -std1
-# HP-UX 10.20 and later -Ae
-# HP-UX older versions -Aa -D_HPUX_SOURCE
-# SVR4 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_stdc=$ac_arg
-break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext
-done
-rm -f conftest.$ac_ext conftest.$ac_objext
-CC=$ac_save_CC
-
-fi
-
-case "x$ac_cv_prog_cc_stdc" in
- x|xno)
- echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
- *)
- echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
- CC="$CC $ac_cv_prog_cc_stdc" ;;
-esac
-
-# Some people use a C++ compiler to compile C. Since we use `exit',
-# in C++ we need to declare it. In case someone uses the same compiler
-# for both compiling C and C++ we need to have the C++ compiler decide
-# the declaration of exit, since it's the most demanding environment.
-cat >conftest.$ac_ext <<_ACEOF
-#ifndef __cplusplus
- choke me
-#endif
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- for ac_declaration in \
- '' \
- 'extern "C" void std::exit (int) throw (); using std::exit;' \
- 'extern "C" void std::exit (int); using std::exit;' \
- 'extern "C" void exit (int) throw ();' \
- 'extern "C" void exit (int);' \
- 'void exit (int);'
-do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-#include <stdlib.h>
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-continue
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
- echo '#ifdef __cplusplus' >>confdefs.h
- echo $ac_declaration >>confdefs.h
- echo '#endif' >>confdefs.h
-fi
-
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-
-# Find Tcl, Tk, etc
-
-dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
-if test x"${no_tcl}" = x ; then
- no_tcl=true
-
-# Check whether --with-tclconfig or --without-tclconfig was given.
-if test "${with_tclconfig+set}" = set; then
- withval="$with_tclconfig"
- with_tclconfig=${withval}
-fi;
- echo "$as_me:$LINENO: checking for Tcl configuration script" >&5
-echo $ECHO_N "checking for Tcl configuration script... $ECHO_C" >&6
- if test "${ac_cv_c_tclconfig+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-
- if test x"${with_tclconfig}" != x ; then
- if test -f "${with_tclconfig}/tclConfig.sh" ; then
- ac_cv_c_tclconfig=`(cd ${with_tclconfig}; ${PWDCMD-pwd})`
- else
- { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
-echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;}
- { (exit 1); exit 1; }; }
- fi
- fi
-
- if test x"${ac_cv_c_tclconfig}" = x ; then
- for i in $dirlist; do
- if test -f $srcdir/$i/unix/tclConfig.sh ; then
- ac_cv_c_tclconfig=`(cd $srcdir/$i/unix; ${PWDCMD-pwd})`
- break
- fi
- if test -f $srcdir/$i/win/tclConfig.sh ; then
- ac_cv_c_tclconfig=`(cd $srcdir/$i/win; ${PWDCMD-pwd})`
- break
- fi
- done
- fi
- if test x"${ac_cv_c_tclconfig}" = x ; then
- for i in $dirlist; do
- if test -n "`ls -dr $i/tcl* 2>/dev/null`" ; then
- tclconfpath=$i
- break
- fi
- done
-
- for i in `ls -dr $tclconfpath/tcl* 2>/dev/null ` ; do
- if test -f $i/unix/tclConfig.sh ; then
- ac_cv_c_tclconfig=`(cd $i/unix; ${PWDCMD-pwd})`
- break
- fi
- if test -f $i/win/tclConfig.sh ; then
- ac_cv_c_tclconfig=`(cd $i/win; ${PWDCMD-pwd})`
- break
- fi
- done
- fi
-
- if test x"${ac_cv_c_tclconfig}" = x ; then
- ccpath=`which ${CC} | sed -e 's:/bin/.*::'`/lib
- if test -f $ccpath/tclConfig.sh; then
- ac_cv_c_tclconfig=$ccpath
- fi
- fi
-
-fi
-
- if test x"${ac_cv_c_tclconfig}" = x ; then
- TCLCONFIG=""
- { echo "$as_me:$LINENO: WARNING: Can't find Tcl configuration definitions" >&5
-echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
- else
- no_tcl=""
- TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
- echo "$as_me:$LINENO: result: ${TCLCONFIG}" >&5
-echo "${ECHO_T}${TCLCONFIG}" >&6
- fi
-fi
-
-
-
- . $TCLCONFIG
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
-if test x"${no_tk}" = x ; then
- no_tk=true
-
-# Check whether --with-tkconfig or --without-tkconfig was given.
-if test "${with_tkconfig+set}" = set; then
- withval="$with_tkconfig"
- with_tkconfig=${withval}
-fi;
- echo "$as_me:$LINENO: checking for Tk configuration script" >&5
-echo $ECHO_N "checking for Tk configuration script... $ECHO_C" >&6
- if test "${ac_cv_c_tkconfig+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-
- if test x"${with_tkconfig}" != x ; then
- if test -f "${with_tkconfig}/tkConfig.sh" ; then
- ac_cv_c_tkconfig=`(cd ${with_tkconfig}; ${PWDCMD-pwd})`
- else
- { { echo "$as_me:$LINENO: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&5
-echo "$as_me: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&2;}
- { (exit 1); exit 1; }; }
- fi
- fi
-
- if test x"${ac_cv_c_tkconfig}" = x ; then
- for i in $dirlist; do
- if test -f $srcdir/$i/unix/tkConfig.sh ; then
- ac_cv_c_tkconfig=`(cd $srcdir/$i/unix; ${PWDCMD-pwd})`
- break
- fi
- if test -f $srcdir/$i/win/tkConfig.sh ; then
- ac_cv_c_tkconfig=`(cd $srcdir/$i/unix; ${PWDCMD-pwd})`
- break
- fi
- done
- fi
- if test x"${ac_cv_c_tkconfig}" = x ; then
- for i in $dirlist; do
- if test -n "`ls -dr $i/tk* 2>/dev/null`" ; then
- tkconfpath=$i
- break
- fi
- done
-
- for i in `ls -dr $tkconfpath/tk* 2>/dev/null ` ; do
- if test -f $i/unix/tkConfig.sh ; then
- ac_cv_c_tkconfig=`(cd $i/unix; ${PWDCMD-pwd})`
- break
- fi
- if test -f $i/win/tkConfig.sh ; then
- ac_cv_c_tkconfig=`(cd $i/win; ${PWDCMD-pwd})`
- break
- fi
- done
- fi
-
- if test x"${ac_cv_c_tkconfig}" = x ; then
- ccpath=`which ${CC} | sed -e 's:/bin/.*::'`/lib
- if test -f $ccpath/tkConfig.sh; then
- ac_cv_c_tkconfig=$ccpath
- fi
- fi
-
-fi
-
- if test x"${ac_cv_c_tkconfig}" = x ; then
- TKCONFIG=""
- { echo "$as_me:$LINENO: WARNING: Can't find Tk configuration definitions" >&5
-echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
- else
- no_tk=""
- TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
- echo "$as_me:$LINENO: result: ${TKCONFIG}" >&5
-echo "${ECHO_T}${TKCONFIG}" >&6
- fi
-fi
-
-
-
- if test -f "$TKCONFIG" ; then
- . $TKCONFIG
- fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
- if test "${ac_cv_prog_CPP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Double quotes because CPP needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
- do
- ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether non-existent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- # Broken: success on invalid input.
-continue
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
- break
-fi
-
- done
- ac_cv_prog_CPP=$CPP
-
-fi
- CPP=$ac_cv_prog_CPP
-else
- ac_cv_prog_CPP=$CPP
-fi
-echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether non-existent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- # Broken: success on invalid input.
-continue
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
- :
-else
- { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6
-if test "${ac_cv_prog_egrep+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if echo a | (grep -E '(a|b)') >/dev/null 2>&1
- then ac_cv_prog_egrep='grep -E'
- else ac_cv_prog_egrep='egrep'
- fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
- EGREP=$ac_cv_prog_egrep
-
-
-echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
-if test "${ac_cv_header_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_header_stdc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_header_stdc=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then
- :
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then
- :
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then
- :
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ctype.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- exit(2);
- exit (0);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-
-
-
-
-
-
-
-
-
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_Header=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_Header=no"
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
-no_tcl=true
-echo "$as_me:$LINENO: checking for Tcl headers in the source tree" >&5
-echo $ECHO_N "checking for Tcl headers in the source tree... $ECHO_C" >&6
-
-# Check whether --with-tclinclude or --without-tclinclude was given.
-if test "${with_tclinclude+set}" = set; then
- withval="$with_tclinclude"
- with_tclinclude=${withval}
-fi;
-if test "${ac_cv_c_tclh+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-if test x"${with_tclinclude}" != x ; then
- if test -f ${with_tclinclude}/tcl.h ; then
- ac_cv_c_tclh=`(cd ${with_tclinclude}; ${PWDCMD-pwd})`
- elif test -f ${with_tclinclude}/generic/tcl.h ; then
- ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; ${PWDCMD-pwd})`
- else
- { { echo "$as_me:$LINENO: error: ${with_tclinclude} directory doesn't contain headers" >&5
-echo "$as_me: error: ${with_tclinclude} directory doesn't contain headers" >&2;}
- { (exit 1); exit 1; }; }
- fi
-fi
-
-if test x"${ac_cv_c_tclconfig}" != x ; then
- for i in $dirlist; do
- if test -f $ac_cv_c_tclconfig/$i/generic/tcl.h ; then
- ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/$i/generic; ${PWDCMD-pwd})`
- break
- fi
- done
-fi
-
-if test x"${ac_cv_c_tclh}" = x ; then
- for i in $dirlist; do
- if test -n "`ls -dr $srcdir/$i/tcl* 2>/dev/null`" ; then
- tclpath=$srcdir/$i
- break
- fi
- done
-
- for i in `ls -dr $tclpath/tcl* 2>/dev/null ` ; do
- if test -f $i/generic/tcl.h ; then
- ac_cv_c_tclh=`(cd $i/generic; ${PWDCMD-pwd})`
- break
- fi
- done
-fi
-
-if test x"${ac_cv_c_tclh}" = x ; then
- ccpath=`which ${CC} | sed -e 's:/bin/.*::'`/include
- if test -f $ccpath/tcl.h; then
- ac_cv_c_tclh=$ccpath
- fi
-fi
-
-if test x"${ac_cv_c_tclh}" = x ; then
- echo "$as_me:$LINENO: result: none" >&5
-echo "${ECHO_T}none" >&6
- if test "${ac_cv_header_tcl_h+set}" = set; then
- echo "$as_me:$LINENO: checking for tcl.h" >&5
-echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
-if test "${ac_cv_header_tcl_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
-echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking tcl.h usability" >&5
-echo $ECHO_N "checking tcl.h usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <tcl.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking tcl.h presence" >&5
-echo $ECHO_N "checking tcl.h presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <tcl.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: tcl.h: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: tcl.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: tcl.h: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: tcl.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: tcl.h: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: tcl.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: tcl.h: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: tcl.h: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: tcl.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: tcl.h: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: tcl.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: tcl.h: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists. ##
-## ------------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for tcl.h" >&5
-echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
-if test "${ac_cv_header_tcl_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_header_tcl_h=$ac_header_preproc
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
-echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
-
-fi
-if test $ac_cv_header_tcl_h = yes; then
- ac_cv_c_tclh=installed
-else
- ac_cv_c_tclh=""
-fi
-
-
-else
- echo "$as_me:$LINENO: result: ${ac_cv_c_tclh}" >&5
-echo "${ECHO_T}${ac_cv_c_tclh}" >&6
-fi
-
-fi
-
- TCLHDIR=""
-if test x"${ac_cv_c_tclh}" = x ; then
- { { echo "$as_me:$LINENO: error: Can't find any Tcl headers" >&5
-echo "$as_me: error: Can't find any Tcl headers" >&2;}
- { (exit 1); exit 1; }; }
-fi
-if test x"${ac_cv_c_tclh}" != x ; then
- no_tcl=""
- if test x"${ac_cv_c_tclh}" != x"installed" ; then
- if test x"${CC}" = xcl ; then
- tmp="`cygpath --windows ${ac_cv_c_tclh}`"
- ac_cv_c_tclh="`echo $tmp | sed -e s#\\\\\\\\#/#g`"
- fi
- echo "$as_me:$LINENO: result: ${ac_cv_c_tclh}" >&5
-echo "${ECHO_T}${ac_cv_c_tclh}" >&6
- TCLHDIR="-I${ac_cv_c_tclh}"
- fi
-fi
-
-
-
-
-#
-# Ok, lets find the tk source trees so we can use the headers
-# If the directory (presumably symlink) named "tk" exists, use that one
-# in preference to any others. Same logic is used when choosing library
-# and again with Tcl. The search order is the best place to look first, then in
-# decreasing significance. The loop breaks if the trigger file is found.
-# Note the gross little conversion here of srcdir by cd'ing to the found
-# directory. This converts the path from a relative to an absolute, so
-# recursive cache variables for the path will work right. We check all
-# the possible paths in one loop rather than many separate loops to speed
-# things up.
-# the alternative search directory is involked by --with-tkinclude
-#
-dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
-no_tk=true
-echo "$as_me:$LINENO: checking for Tk headers in the source tree" >&5
-echo $ECHO_N "checking for Tk headers in the source tree... $ECHO_C" >&6
-
-# Check whether --with-tkinclude or --without-tkinclude was given.
-if test "${with_tkinclude+set}" = set; then
- withval="$with_tkinclude"
- with_tkinclude=${withval}
-fi;
-if test "${ac_cv_c_tkh+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-if test x"${with_tkinclude}" != x ; then
- if test -f ${with_tkinclude}/tk.h ; then
- ac_cv_c_tkh=`(cd ${with_tkinclude}; ${PWDCMD-pwd})`
- elif test -f ${with_tkinclude}/generic/tk.h ; then
- ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; ${PWDCMD-pwd})`
- else
- { { echo "$as_me:$LINENO: error: ${with_tkinclude} directory doesn't contain headers" >&5
-echo "$as_me: error: ${with_tkinclude} directory doesn't contain headers" >&2;}
- { (exit 1); exit 1; }; }
- fi
-fi
-
-if test x"${ac_cv_c_tkconfig}" != x ; then
- for i in $dirlist; do
- if test -f $ac_cv_c_tkconfig/$i/generic/tk.h ; then
- ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/$i/generic; ${PWDCMD-pwd})`
- break
- fi
- done
-fi
-
-if test x"${ac_cv_c_tkh}" = x ; then
- for i in $dirlist; do
- if test -n "`ls -dr $srcdir/$i/tk* 2>/dev/null`" ; then
- tkpath=$srcdir/$i
- break
- fi
- done
-
- for i in `ls -dr $tkpath/tk* 2>/dev/null ` ; do
- if test -f $i/generic/tk.h ; then
- ac_cv_c_tkh=`(cd $i/generic; ${PWDCMD-pwd})`
- break
- fi
- done
-fi
-
-if test x"${ac_cv_c_tkh}" = x ; then
- echo "$as_me:$LINENO: result: none" >&5
-echo "${ECHO_T}none" >&6
- ccpath=`which ${CC} | sed -e 's:/bin/.*::'`/include
- if test -f $ccpath/tk.h; then
- ac_cv_c_tkh=$ccpath
- fi
-else
- echo "$as_me:$LINENO: result: ${ac_cv_c_tkh}" >&5
-echo "${ECHO_T}${ac_cv_c_tkh}" >&6
-fi
-
-fi
-
- TKHDIR=""
-if test x"${ac_cv_c_tkh}" = x ; then
- { { echo "$as_me:$LINENO: error: Can't find any Tk headers" >&5
-echo "$as_me: error: Can't find any Tk headers" >&2;}
- { (exit 1); exit 1; }; }
-fi
-if test x"${ac_cv_c_tkh}" != x ; then
- no_tk=""
- if test x"${ac_cv_c_tkh}" != x"installed" ; then
- if test x"${CC}" = xcl ; then
- tmp="`cygpath --windows ${ac_cv_c_tkh}`"
- ac_cv_c_tkh="`echo $tmp | sed -e s#\\\\\\\\#/#g`"
- fi
- echo "$as_me:$LINENO: result: found in ${ac_cv_c_tkh}" >&5
-echo "${ECHO_T}found in ${ac_cv_c_tkh}" >&6
- TKHDIR="-I${ac_cv_c_tkh}"
- fi
-fi
-
-
-
-
-
-# Make sure TCL_SHLIB_SUFFIX is set
-if test x$TCL_SHLIB_SUFFIX = x ; then
- case "${host}" in
- *cygwin*) TCL_SHLIB_SUFFIX=".dll" ;;
- *) TCL_SHILB_SUFFIX=".so" ;;
- esac
-fi
-
-
-# Since we're not using autoconf > 2.1x, we cannot use AC_CONFIG_FILES.
-make_subdirs=""
-
-# See if -mwin32 works for cygwin
-case "${host}" in
- *cygwin*)
- ocflags=${CFLAGS}
- CFLAGS="${CFLAGS} -mwin32"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-CFLAGS="${ocflags}"
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- ;;
- *) ;;
-esac
-
-# note toplevel plugin build directory
-plugin_builddir=`pwd`
-
-#
-# Plugins
-#
-
-# Supported hosts
-
-# Only supported/tested on linux, solaris, cygwin
-supported=yes
-case "${host}" in
- *cygwin*) ;;
- *solaris*) ;;
- *linux*) ;;
- *) supported=no ;;
-esac
-
-# Host-specific configury
-case "${host}" in
- *cygwin*)
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
-set dummy ${ac_tool_prefix}nm; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_NM+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$NM"; then
- ac_cv_prog_NM="$NM" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_NM="${ac_tool_prefix}nm"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-NM=$ac_cv_prog_NM
-if test -n "$NM"; then
- echo "$as_me:$LINENO: result: $NM" >&5
-echo "${ECHO_T}$NM" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_NM"; then
- ac_ct_NM=$NM
- # Extract the first word of "nm", so it can be a program name with args.
-set dummy nm; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_NM"; then
- ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_NM="nm"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
-fi
-fi
-ac_ct_NM=$ac_cv_prog_ac_ct_NM
-if test -n "$ac_ct_NM"; then
- echo "$as_me:$LINENO: result: $ac_ct_NM" >&5
-echo "${ECHO_T}$ac_ct_NM" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- NM=$ac_ct_NM
-else
- NM="$ac_cv_prog_NM"
-fi
-
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_AS+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-AS=$ac_cv_prog_AS
-if test -n "$AS"; then
- echo "$as_me:$LINENO: result: $AS" >&5
-echo "${ECHO_T}$AS" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_AS"; then
- ac_ct_AS=$AS
- # Extract the first word of "as", so it can be a program name with args.
-set dummy as; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_AS+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_AS"; then
- ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_AS="as"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_AS" && ac_cv_prog_ac_ct_AS="as"
-fi
-fi
-ac_ct_AS=$ac_cv_prog_ac_ct_AS
-if test -n "$ac_ct_AS"; then
- echo "$as_me:$LINENO: result: $ac_ct_AS" >&5
-echo "${ECHO_T}$ac_ct_AS" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- AS=$ac_ct_AS
-else
- AS="$ac_cv_prog_AS"
-fi
-
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ld; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_LD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$LD"; then
- ac_cv_prog_LD="$LD" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_LD="${ac_tool_prefix}ld"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-LD=$ac_cv_prog_LD
-if test -n "$LD"; then
- echo "$as_me:$LINENO: result: $LD" >&5
-echo "${ECHO_T}$LD" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_LD"; then
- ac_ct_LD=$LD
- # Extract the first word of "ld", so it can be a program name with args.
-set dummy ld; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_LD"; then
- ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_LD="ld"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
-fi
-fi
-ac_ct_LD=$ac_cv_prog_ac_ct_LD
-if test -n "$ac_ct_LD"; then
- echo "$as_me:$LINENO: result: $ac_ct_LD" >&5
-echo "${ECHO_T}$ac_ct_LD" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- LD=$ac_ct_LD
-else
- LD="$ac_cv_prog_LD"
-fi
-
- echo "$as_me:$LINENO: checking \"for libcygwin.a\"" >&5
-echo $ECHO_N "checking \"for libcygwin.a\"... $ECHO_C" >&6
- LIBCYGWIN_A=`$CC -print-file-name=libcygwin.a`
- echo "$as_me:$LINENO: result: $LIBCYGWIN_A" >&5
-echo "${ECHO_T}$LIBCYGWIN_A" >&6
-
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
-set dummy ${ac_tool_prefix}dlltool; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_DLLTOOL+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-DLLTOOL=$ac_cv_prog_DLLTOOL
-if test -n "$DLLTOOL"; then
- echo "$as_me:$LINENO: result: $DLLTOOL" >&5
-echo "${ECHO_T}$DLLTOOL" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_DLLTOOL"; then
- ac_ct_DLLTOOL=$DLLTOOL
- # Extract the first word of "dlltool", so it can be a program name with args.
-set dummy dlltool; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_DLLTOOL"; then
- ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_DLLTOOL="dlltool"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
-if test -n "$ac_ct_DLLTOOL"; then
- echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5
-echo "${ECHO_T}$ac_ct_DLLTOOL" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- DLLTOOL=$ac_ct_DLLTOOL
-else
- DLLTOOL="$ac_cv_prog_DLLTOOL"
-fi
-
- ;;
-esac
-
-# Plugins supported by this configuration
-if test x${supported} = xyes; then
- plugins="rhabout"
- case "${target}" in
- *cygwin*) ;;
- *linux*) ;;
- *i?86*)
- plugins="${plugins} intel-pentium"
- ;;
- esac
-
- for i in $plugins ; do
- make_subdirs="${make_subdirs} $i"
- done
-fi
-
-
-
-
- ac_config_files="$ac_config_files 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"
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems. If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-{
- (set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- "s/'/'\\\\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-} |
- sed '
- t clear
- : clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- : end' >>confcache
-if diff $cache_file confcache >/dev/null 2>&1; then :; else
- if test -w $cache_file; then
- test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
- cat confcache >$cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/;
-s/:*\${srcdir}:*/:/;
-s/:*@srcdir@:*/:/;
-s/^\([^=]*=[ ]*\):*/\1/;
-s/:*$//;
-s/^[^=]*=[ ]*$//;
-}'
-fi
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-#
-# If the first sed substitution is executed (which looks for macros that
-# take arguments), then we branch to the quote section. Otherwise,
-# look for a macro that doesn't take arguments.
-cat >confdef2opt.sed <<\_ACEOF
-t clear
-: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
-t quote
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
-t quote
-d
-: quote
-s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
-s,\[,\\&,g
-s,\],\\&,g
-s,\$,$$,g
-p
-_ACEOF
-# We use echo to avoid assuming a particular line-breaking character.
-# The extra dot is to prevent the shell from consuming trailing
-# line-breaks from the sub-command output. A line-break within
-# single-quotes doesn't work because, if this script is created in a
-# platform that uses two characters for line-breaks (e.g., DOS), tr
-# would break.
-ac_LF_and_DOT=`echo; echo .`
-DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
-rm -f confdef2opt.sed
-
-
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
- # 1. Remove the extension, and $U if already installed.
- ac_i=`echo "$ac_i" |
- sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
- # 2. Add them.
- ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-
-: ${CONFIG_STATUS=./config.status}
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-exec 6>&1
-
-# Open the log real soon, to keep \$[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling. Logging --version etc. is OK.
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-} >&5
-cat >&5 <<_CSEOF
-
-This file was extended by $as_me, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-_CSEOF
-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
-echo >&5
-_ACEOF
-
-# Files that config.status was made for.
-if test -n "$ac_config_files"; then
- echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_headers"; then
- echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_links"; then
- echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_commands"; then
- echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTIONS] [FILE]...
-
- -h, --help print this help, then exit
- -V, --version print version number, then exit
- -q, --quiet do not print progress messages
- -d, --debug don't remove temporary files
- --recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
-
-Configuration files:
-$config_files
-
-Report bugs to <bug-autoconf@gnu.org>."
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-ac_cs_version="\\
-config.status
-configured by $0, generated by GNU Autoconf 2.59,
- with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-srcdir=$srcdir
-INSTALL="$INSTALL"
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value. By we need to know if files were specified by the user.
-ac_need_defaults=:
-while test $# != 0
-do
- case $1 in
- --*=*)
- ac_option=`expr "x$1" : 'x\([^=]*\)='`
- ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
- ac_shift=:
- ;;
- -*)
- ac_option=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
- *) # This is not an option, so the user has probably given explicit
- # arguments.
- ac_option=$1
- ac_need_defaults=false;;
- esac
-
- case $ac_option in
- # Handling of the options.
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --vers* | -V )
- echo "$ac_cs_version"; exit 0 ;;
- --he | --h)
- # Conflict between --help and --header
- { { echo "$as_me:$LINENO: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; };;
- --help | --hel | -h )
- echo "$ac_cs_usage"; exit 0 ;;
- --debug | --d* | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- CONFIG_FILES="$CONFIG_FILES $ac_optarg"
- ac_need_defaults=false;;
- --header | --heade | --head | --hea )
- $ac_shift
- CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
- ac_need_defaults=false;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; } ;;
-
- *) ac_config_targets="$ac_config_targets $1" ;;
-
- esac
- shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
- exec 6>/dev/null
- ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-if \$ac_cs_recheck; then
- echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
- exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-fi
-
-_ACEOF
-
-
-
-
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_config_target in $ac_config_targets
-do
- case "$ac_config_target" in
- # Handling of arguments.
- "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- "rhabout/Makefile" ) CONFIG_FILES="$CONFIG_FILES rhabout/Makefile:rhabout/Makefile.in:Make-rules" ;;
- "rhabout/rhabout.tcl" ) CONFIG_FILES="$CONFIG_FILES rhabout/rhabout.tcl" ;;
- "intel-pentium/Makefile" ) CONFIG_FILES="$CONFIG_FILES intel-pentium/Makefile:intel-pentium/Makefile.in:Make-rules" ;;
- "intel-pentium/intel-pentium.tcl" ) CONFIG_FILES="$CONFIG_FILES intel-pentium/intel-pentium.tcl" ;;
- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used. Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason to put it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=./confstat$$-$RANDOM
- (umask 077 && mkdir $tmp)
-} ||
-{
- echo "$me: cannot create a temporary directory in ." >&2
- { (exit 1); exit 1; }
-}
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-
-#
-# CONFIG_FILES section.
-#
-
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "\$CONFIG_FILES"; then
- # Protect against being on the right side of a sed subst in config.status.
- sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
- s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
-s,@SHELL@,$SHELL,;t t
-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
-s,@exec_prefix@,$exec_prefix,;t t
-s,@prefix@,$prefix,;t t
-s,@program_transform_name@,$program_transform_name,;t t
-s,@bindir@,$bindir,;t t
-s,@sbindir@,$sbindir,;t t
-s,@libexecdir@,$libexecdir,;t t
-s,@datadir@,$datadir,;t t
-s,@sysconfdir@,$sysconfdir,;t t
-s,@sharedstatedir@,$sharedstatedir,;t t
-s,@localstatedir@,$localstatedir,;t t
-s,@libdir@,$libdir,;t t
-s,@includedir@,$includedir,;t t
-s,@oldincludedir@,$oldincludedir,;t t
-s,@infodir@,$infodir,;t t
-s,@mandir@,$mandir,;t t
-s,@build_alias@,$build_alias,;t t
-s,@host_alias@,$host_alias,;t t
-s,@target_alias@,$target_alias,;t t
-s,@DEFS@,$DEFS,;t t
-s,@ECHO_C@,$ECHO_C,;t t
-s,@ECHO_N@,$ECHO_N,;t t
-s,@ECHO_T@,$ECHO_T,;t t
-s,@LIBS@,$LIBS,;t t
-s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
-s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
-s,@INSTALL_DATA@,$INSTALL_DATA,;t t
-s,@PACKAGE@,$PACKAGE,;t t
-s,@VERSION@,$VERSION,;t t
-s,@ACLOCAL@,$ACLOCAL,;t t
-s,@AUTOCONF@,$AUTOCONF,;t t
-s,@AUTOMAKE@,$AUTOMAKE,;t t
-s,@AUTOHEADER@,$AUTOHEADER,;t t
-s,@MAKEINFO@,$MAKEINFO,;t t
-s,@SET_MAKE@,$SET_MAKE,;t t
-s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
-s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
-s,@MAINT@,$MAINT,;t t
-s,@build@,$build,;t t
-s,@build_cpu@,$build_cpu,;t t
-s,@build_vendor@,$build_vendor,;t t
-s,@build_os@,$build_os,;t t
-s,@host@,$host,;t t
-s,@host_cpu@,$host_cpu,;t t
-s,@host_vendor@,$host_vendor,;t t
-s,@host_os@,$host_os,;t t
-s,@CC@,$CC,;t t
-s,@CFLAGS@,$CFLAGS,;t t
-s,@LDFLAGS@,$LDFLAGS,;t t
-s,@CPPFLAGS@,$CPPFLAGS,;t t
-s,@ac_ct_CC@,$ac_ct_CC,;t t
-s,@EXEEXT@,$EXEEXT,;t t
-s,@OBJEXT@,$OBJEXT,;t t
-s,@TCLCONFIG@,$TCLCONFIG,;t t
-s,@TCL_DEFS@,$TCL_DEFS,;t t
-s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
-s,@TCL_LIB_FULL_PATH@,$TCL_LIB_FULL_PATH,;t t
-s,@TCL_LIBS@,$TCL_LIBS,;t t
-s,@TCL_CFLAGS@,$TCL_CFLAGS,;t t
-s,@TCL_SHLIB_CFLAGS@,$TCL_SHLIB_CFLAGS,;t t
-s,@TCL_SHLIB_LD@,$TCL_SHLIB_LD,;t t
-s,@TCL_LD_FLAGS@,$TCL_LD_FLAGS,;t t
-s,@TCL_LD_SEARCH_FLAGS@,$TCL_LD_SEARCH_FLAGS,;t t
-s,@TCL_RANLIB@,$TCL_RANLIB,;t t
-s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t
-s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
-s,@TCL_BIN_DIR@,$TCL_BIN_DIR,;t t
-s,@TKCONFIG@,$TKCONFIG,;t t
-s,@TK_VERSION@,$TK_VERSION,;t t
-s,@TK_DEFS@,$TK_DEFS,;t t
-s,@TK_LIB_FILE@,$TK_LIB_FILE,;t t
-s,@TK_LIB_FULL_PATH@,$TK_LIB_FULL_PATH,;t t
-s,@TK_LIBS@,$TK_LIBS,;t t
-s,@TK_BUILD_INCLUDES@,$TK_BUILD_INCLUDES,;t t
-s,@TK_XINCLUDES@,$TK_XINCLUDES,;t t
-s,@TK_XLIBSW@,$TK_XLIBSW,;t t
-s,@TK_BUILD_LIB_SPEC@,$TK_BUILD_LIB_SPEC,;t t
-s,@TK_LIB_SPEC@,$TK_LIB_SPEC,;t t
-s,@CPP@,$CPP,;t t
-s,@EGREP@,$EGREP,;t t
-s,@TCLHDIR@,$TCLHDIR,;t t
-s,@TKHDIR@,$TKHDIR,;t t
-s,@TCL_DBGX@,$TCL_DBGX,;t t
-s,@TCL_SHLIB_SUFFIX@,$TCL_SHLIB_SUFFIX,;t t
-s,@NM@,$NM,;t t
-s,@ac_ct_NM@,$ac_ct_NM,;t t
-s,@AS@,$AS,;t t
-s,@ac_ct_AS@,$ac_ct_AS,;t t
-s,@LD@,$LD,;t t
-s,@ac_ct_LD@,$ac_ct_LD,;t t
-s,@LIBCYGWIN_A@,$LIBCYGWIN_A,;t t
-s,@DLLTOOL@,$DLLTOOL,;t t
-s,@ac_ct_DLLTOOL@,$ac_ct_DLLTOOL,;t t
-s,@make_subdirs@,$make_subdirs,;t t
-s,@plugin_builddir@,$plugin_builddir,;t t
-s,@LIBOBJS@,$LIBOBJS,;t t
-s,@LTLIBOBJS@,$LTLIBOBJS,;t t
-CEOF
-
-_ACEOF
-
- cat >>$CONFIG_STATUS <<\_ACEOF
- # Split the substitutions into bite-sized pieces for seds with
- # small command number limits, like on Digital OSF/1 and HP-UX.
- ac_max_sed_lines=48
- ac_sed_frag=1 # Number of current file.
- ac_beg=1 # First line for current file.
- ac_end=$ac_max_sed_lines # Line after last line for current file.
- ac_more_lines=:
- ac_sed_cmds=
- while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- else
- sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- fi
- if test ! -s $tmp/subs.frag; then
- ac_more_lines=false
- else
- # The purpose of the label and of the branching condition is to
- # speed up the sed processing (if there are no `@' at all, there
- # is no need to browse any of the substitutions).
- # These are the two extra sed commands mentioned above.
- (echo ':t
- /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
- fi
- ac_sed_frag=`expr $ac_sed_frag + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_lines`
- fi
- done
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
- fi
-fi # test -n "$CONFIG_FILES"
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
- esac
-
- # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
-
- case $INSTALL in
- [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
- esac
-
- if test x"$ac_file" != x-; then
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
- rm -f "$ac_file"
- fi
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- if test x"$ac_file" = x-; then
- configure_input=
- else
- configure_input="$ac_file. "
- fi
- configure_input=$configure_input"Generated from `echo $ac_file_in |
- sed 's,.*/,,'` by configure."
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
- sed "$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s,@configure_input@,$configure_input,;t t
-s,@srcdir@,$ac_srcdir,;t t
-s,@abs_srcdir@,$ac_abs_srcdir,;t t
-s,@top_srcdir@,$ac_top_srcdir,;t t
-s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
-s,@builddir@,$ac_builddir,;t t
-s,@abs_builddir@,$ac_abs_builddir,;t t
-s,@top_builddir@,$ac_top_builddir,;t t
-s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
-s,@INSTALL@,$ac_INSTALL,;t t
-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
- rm -f $tmp/stdin
- if test x"$ac_file" != x-; then
- mv $tmp/out $ac_file
- else
- cat $tmp/out
- rm -f $tmp/out
- fi
-
-done
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded. So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status. When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
- ac_cs_success=:
- ac_config_status_args=
- test "$silent" = yes &&
- ac_config_status_args="$ac_config_status_args --quiet"
- exec 5>/dev/null
- $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
- exec 5>>config.log
- # Use ||, not &&, to avoid exiting from the if with $? = 1, which
- # would make configure fail if this is the last instruction.
- $ac_cs_success || { (exit 1); exit 1; }
-fi
-
diff --git a/gdb/gdbtk/plugins/configure.ac b/gdb/gdbtk/plugins/configure.ac
deleted file mode 100644
index 58a54808124..00000000000
--- a/gdb/gdbtk/plugins/configure.ac
+++ /dev/null
@@ -1,93 +0,0 @@
-AC_INIT(Make-rules)
-AC_CONFIG_AUX_DIR(../../..)
-AM_INIT_AUTOMAKE(insight, 1.0)
-AM_MAINTAINER_MODE
-AC_PROG_MAKE_SET
-AC_CANONICAL_HOST
-AC_PROG_CC
-AC_OBJEXT
-AC_EXEEXT
-
-# Find Tcl, Tk, etc
-CYG_AC_PATH_TCLCONFIG
-CYG_AC_LOAD_TCLCONFIG
-CYG_AC_PATH_TKCONFIG
-CYG_AC_LOAD_TKCONFIG
-CYG_AC_PATH_TCLH
-CYG_AC_PATH_TKH
-AC_SUBST(TCL_DBGX)
-
-# Make sure TCL_SHLIB_SUFFIX is set
-if test x$TCL_SHLIB_SUFFIX = x ; then
- case "${host}" in
- *cygwin*) TCL_SHLIB_SUFFIX=".dll" ;;
- *) TCL_SHILB_SUFFIX=".so" ;;
- esac
-fi
-AC_SUBST(TCL_SHLIB_SUFFIX)
-
-# Since we're not using autoconf > 2.1x, we cannot use AC_CONFIG_FILES.
-make_subdirs=""
-
-# See if -mwin32 works for cygwin
-case "${host}" in
- *cygwin*)
- ocflags=${CFLAGS}
- CFLAGS="${CFLAGS} -mwin32"
- AC_TRY_COMPILE(,,,CFLAGS="${ocflags}")
- ;;
- *) ;;
-esac
-
-# note toplevel plugin build directory
-plugin_builddir=`pwd`
-
-#
-# Plugins
-#
-
-# Supported hosts
-
-# Only supported/tested on linux, solaris, cygwin
-supported=yes
-case "${host}" in
- *cygwin*) ;;
- *solaris*) ;;
- *linux*) ;;
- *) supported=no ;;
-esac
-
-# Host-specific configury
-case "${host}" in
- *cygwin*)
- AC_CHECK_TOOL(NM, nm, nm)
- AC_CHECK_TOOL(AS, as, as)
- AC_CHECK_TOOL(LD, ld, ld)
- AC_MSG_CHECKING("for libcygwin.a")
- LIBCYGWIN_A=`$CC -print-file-name=libcygwin.a`
- AC_MSG_RESULT($LIBCYGWIN_A)
- AC_SUBST(LIBCYGWIN_A)
- AC_CHECK_TOOL(DLLTOOL, dlltool)
- ;;
-esac
-
-# Plugins supported by this configuration
-if test x${supported} = xyes; then
- plugins="rhabout"
- case "${target}" in
- *cygwin*) ;;
- *linux*) ;;
- *i?86*)
- plugins="${plugins} intel-pentium"
- ;;
- esac
-
- for i in $plugins ; do
- make_subdirs="${make_subdirs} $i"
- done
-fi
-
-AC_SUBST(make_subdirs)
-AC_SUBST(plugin_builddir)
-
-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)
diff --git a/gdb/gdbtk/plugins/intel-pentium/ChangeLog b/gdb/gdbtk/plugins/intel-pentium/ChangeLog
deleted file mode 100644
index 67f84af825d..00000000000
--- a/gdb/gdbtk/plugins/intel-pentium/ChangeLog
+++ /dev/null
@@ -1,43 +0,0 @@
-2005-12-23 Eli Zaretskii <eliz@gnu.org>
-
- * msrselection.ith:
- * msrselection.itb:
- * cpuinfo.tcl: Put (C) after Copyright.
-
-2002-08-14 Keith Seitz <keiths@redhat.com>
-
- Merged from Red Hat internal branch:
-
- 2001-11-30 Keith Seitz <keith@redhat.com>
- * Makefile.in: New file.
- * intel-pentium.tcl: Renamed to intel-pentium.tcl.in.
- * plugins.tcl: This plugin is only available on non-native targets.
- Append to ../plugins.tcl and remove.
-
- 2001-11-28 Ian Roxborough <irox@redhat.com>
- * cpuinfo.tcl (display_cpu_info): exec the gdb command
- "info cpu" to get the extra cpuinformation (CPU ID).
- * library/plugins/intel-pentium/msrselection.itb
- (MsrSelDlg::build_win): Switch the OK and Cancel buttons
- around to improve ease of use.
- * plugins.tcl: Use "$::GDBStartup" rather than "$GDBStartup".
- Create a sub menu in the plugins menu called "Intel Pentium"
- and place the menu items in it.
-
- 2001-11-21 Ian Roxborough <irox@redhat.com>
- * msrselection.itb (MsrSelDlg::list_msrs): Use
- "set msr-pointer" instead of "set msr".
- (MsrSelDlg::doit): Set the msr-pointer before calling
- unpost. Display an error message is we can't set the
- msr-pointer.
-
- 2001-11-16 Ian Roxborough <irox@redhat.com>
- * cpuinfo.tcl: New file.
- * intel-pentium.tcl: Ditto.
- * cpuinfo.tcl: Ditto.
- * msrselection.itb: Ditto.
- * msrselection.ith: Ditto.
- * pkgIndex.tcl: Ditto.
- * plugins.tcl: Ditto.
- * tclIndex: Ditto.
-
diff --git a/gdb/gdbtk/plugins/intel-pentium/Makefile.in b/gdb/gdbtk/plugins/intel-pentium/Makefile.in
deleted file mode 100644
index 79613d9f1da..00000000000
--- a/gdb/gdbtk/plugins/intel-pentium/Makefile.in
+++ /dev/null
@@ -1,6 +0,0 @@
-# Plugin definitions
-PLUGIN = intel-pentium
-PLUGIN_INSTALL_SRCDIR = cpuinfo.tcl \
- msrselection.ith \
- msrselection.itb
-
diff --git a/gdb/gdbtk/plugins/intel-pentium/cpuinfo.tcl b/gdb/gdbtk/plugins/intel-pentium/cpuinfo.tcl
deleted file mode 100644
index 1864c436b2c..00000000000
--- a/gdb/gdbtk/plugins/intel-pentium/cpuinfo.tcl
+++ /dev/null
@@ -1,33 +0,0 @@
-# Display CPU information.
-# Copyright (C) 1999, 2000, 2001 Red Hat, Inc.
-#
-# Written by Fernando Nasser <fnasser@redhat.com>
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# ------------------------------------------------------------------
-# NAME: proc display_cpu_info
-# DESCRIPTION: display what we know about the target CPU
-# if the information is available.
-#
-# ARGUMENTS: None
-# RETURNS: Nothing
-#
-# NOTES:
-# ------------------------------------------------------------------
-proc display_cpu_info {} {
- global gdb_cpuid_info
- if {[catch {gdb_cmd "info cpu"} result]} {
- tk_messageBox -message "CPU information not available"
- } else {
- tk_messageBox -message "$result"
- }
-}
diff --git a/gdb/gdbtk/plugins/intel-pentium/intel-pentium.tcl.in b/gdb/gdbtk/plugins/intel-pentium/intel-pentium.tcl.in
deleted file mode 100644
index 77b737647af..00000000000
--- a/gdb/gdbtk/plugins/intel-pentium/intel-pentium.tcl.in
+++ /dev/null
@@ -1,4 +0,0 @@
-package provide INTELPENTIUM 1.0
-set dirname [file dirname [info script]]
-lappend auto_path $dirname
-#catch {load [file join $dirname intel-pentium@TCL_SHLIB_SUFFIX@]}
diff --git a/gdb/gdbtk/plugins/intel-pentium/msrselection.itb b/gdb/gdbtk/plugins/intel-pentium/msrselection.itb
deleted file mode 100644
index f8fda1996bd..00000000000
--- a/gdb/gdbtk/plugins/intel-pentium/msrselection.itb
+++ /dev/null
@@ -1,192 +0,0 @@
-# Implements MSR selection dialog class for Insight.
-# Copyright (C) 1999, 2000, 2001 Red Hat, Inc.
-#
-# Written by Fernando Nasser <fnasser@redhat.com>
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# ------------------------------------------------------------------
-# NAME: MsrSelDlg::constructor
-# DESCRIPTION: Create a new MSR Selection dialog window.
-#
-# ARGUMENTS: None
-# RETURNS: Nothing
-# ------------------------------------------------------------------
-body MsrSelDlg::constructor {args} {
-
- window_name "MSR Selection"
- build_win
- eval itk_initialize $args
-
-}
-
-# ------------------------------------------------------------------
-# NAME: protected method MsrSelDlg::build_win
-# DESCRIPTION: Builds the MSR dialog window from widgets.
-#
-# ARGUMENTS: None
-# RETURNS: Nothing
-#
-# NOTES: This method should only be called once for
-# each MsrSelDlg.
-# ------------------------------------------------------------------
-body MsrSelDlg::build_win {} {
-
- # CHOOSE_MSR: the list box with list of MSRs. Also an entry
- # for typing in the MSR by hand.
-
- itk_component add choose_msr {
- iwidgets::scrolledlistbox $itk_interior.cmsr -visibleitems 30x15 \
- -labeltext "Choose MSR" -labelpos nw \
- -labelrelief groove -labelborderwidth 2 \
- -ipadx 8 -ipady 6 -childsitepos s -hscrollmode none \
- -textbackground white -exportselection 0 \
- -selectioncommand [code $this select_msr] \
- -dblclickcommand [code $this doit]
- }
-
- # MSR_ENTRY: this is the MSR entry box. You can enter the MSR register name
- # by hand here, or click on the listbox to have it entered for you.
-
- itk_component add msr_entry {
- iwidgets::entryfield [$itk_component(choose_msr) childsite].lab \
- -labeltext MSR: -textbackground white \
- -focuscommand [code $this clear_msr_selection] \
- -command [code $this doit]
- }
- pack $itk_component(msr_entry) -fill x -side bottom -pady 4
-
- itk_component add button_box {
- frame $itk_interior.b
- }
-
- itk_component add ok {
- button $itk_component(button_box).ok -text OK -command [code $this doit]
- }
- $itk_component(ok) configure -state disabled
-
- itk_component add cancel {
- button $itk_component(button_box).cancel -text Cancel \
- -command [code $this cancel]
- }
-
- ::standard_button_box $itk_component(button_box)
-
- pack $itk_component(button_box) -side bottom -fill x \
- -pady 4 -padx 4
- pack $itk_component(choose_msr) -fill both -expand 1 -pady 4 -padx 4
-
- after idle [list update idletasks; $this list_msrs]
-
-}
-
-# ------------------------------------------------------------------
-# NAME: protected method MsrSelDlg::doit
-# DESCRIPTION: Selects the MSR to view and unposts window.
-#
-# ARGUMENTS: None
-# RETURNS: Nothing
-#
-# NOTES:
-# ------------------------------------------------------------------
-body MsrSelDlg::doit {} {
- set MsrSelDlg::last_button 1
- set msr [$itk_component(msr_entry) get]
- set MsrSelDlg::last_msr $msr
-
- if {[catch {gdb_cmd "set msr-pointer $msr"} result]} {
- ManagedWin::open WarningDlg -transient \
- -message [list "Could not select this $msr:\n$result"]
- }
-
- debug "About to unpost"
- unpost
-}
-
-# ------------------------------------------------------------------
-# NAME: protected method MsrSelDlg::cancel
-# DESCRIPTION: Unposts the window without selecting
-# the MSR to view.
-#
-# ARGUMENTS: None
-# RETURNS: Nothing
-#
-# NOTES:
-# ------------------------------------------------------------------
-body MsrSelDlg::cancel {} {
- set MsrSelDlg::last_button 0
- set MsrSelDlg::last_msr {}
- unpost
-}
-
-# ------------------------------------------------------------------
-# NAME: protected method MsrSelDlg::list_msrs
-# DESCRIPTION: List the known MSR names.
-#
-# ARGUMENTS: None
-# RETURNS: Nothing
-#
-# NOTES:
-# ------------------------------------------------------------------
-body MsrSelDlg::list_msrs {{expr {}}} {
- set err [catch {gdb_cmd "set msr-pointer" 1} msg ]
- set msg [string trimright $msg "."]
- set msrnames [split $msg ,]
- set msrnames [lrange $msrnames 1 end]
-
- $itk_component(choose_msr) clear
- set msr_list {}
-
- foreach name $msrnames {
- lappend msr_list [list $name {set msr $name}]
- $itk_component(choose_msr) insert end $name
- }
-
- $itk_component(choose_msr) selection set 0
- select_msr
-}
-
-# ------------------------------------------------------------------
-# NAME: protected method MsrSelDlg::select_msrs
-# DESCRIPTION: Grab the selected element from the MSR listbox
-# and insert the associated MSR into the entry form.
-#
-# ARGUMENTS: None
-# RETURNS: Nothing
-#
-# NOTES:
-# ------------------------------------------------------------------
-body MsrSelDlg::select_msr {} {
- set hit [$itk_component(choose_msr) curselection]
- if {$hit != ""} {
- $itk_component(msr_entry) clear
- $itk_component(msr_entry) insert 0 [lindex [lindex $msr_list $hit] 0]
- $itk_component(ok) configure -state normal
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: clear_msr_selection - Clear the current MSR selection.
-# ------------------------------------------------------------------
-# ------------------------------------------------------------------
-# NAME: protected method MsrSelDlg::clear_msrs_selection
-# DESCRIPTION: Clear the current MSR selection.
-#
-# ARGUMENTS: None
-# RETURNS: Nothing
-#
-# NOTES:
-# ------------------------------------------------------------------
-body MsrSelDlg::clear_msr_selection {} {
- $itk_component(choose_msr) selection clear 0 end
- $itk_component(msr_entry) selection range 0 end
-}
-
diff --git a/gdb/gdbtk/plugins/intel-pentium/msrselection.ith b/gdb/gdbtk/plugins/intel-pentium/msrselection.ith
deleted file mode 100644
index 88f4a45aada..00000000000
--- a/gdb/gdbtk/plugins/intel-pentium/msrselection.ith
+++ /dev/null
@@ -1,38 +0,0 @@
-# Implements MSR selection dialog class for Insight.
-# Copyright (C) 1999, 2000, 2001 Red Hat, Inc.
-#
-# Written by Fernando Nasser <fnasser@redhat.com>
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-class MsrSelDlg {
- inherit ModalDialog PluginWindow
-
- public {
- method constructor {args}
- proc last_button {} {return $last_button}
- proc msr {} {return $last_msr}
- }
-
- protected {
- method build_win {args}
- method cancel {}
- method doit {}
- method list_msrs {{expr {}}}
- method select_msr {}
- method clear_msr_selection {}
-
- variable msr_list
-
- common last_button 0
- common last_msr {}
- }
-}
diff --git a/gdb/gdbtk/plugins/intel-pentium/pkgIndex.tcl b/gdb/gdbtk/plugins/intel-pentium/pkgIndex.tcl
deleted file mode 100644
index 58182a9676c..00000000000
--- a/gdb/gdbtk/plugins/intel-pentium/pkgIndex.tcl
+++ /dev/null
@@ -1 +0,0 @@
-package ifneeded INTELPENTIUM 1.0 [list source [file join $dir intel-pentium.tcl]]
diff --git a/gdb/gdbtk/plugins/intel-pentium/tclIndex b/gdb/gdbtk/plugins/intel-pentium/tclIndex
deleted file mode 100644
index 8b7e117e667..00000000000
--- a/gdb/gdbtk/plugins/intel-pentium/tclIndex
+++ /dev/null
@@ -1,17 +0,0 @@
-# Tcl autoload index file, version 2.0
-# This file is generated by the "auto_mkindex" command
-# and sourced to set up indexing information for one or
-# more commands. Typically each line is a command that
-# sets an element in the auto_index array, where the
-# element name is the name of a command and the value is
-# a script that loads the command.
-
-set auto_index(MsrSelDlg) [list source [file join $dir msrselection.ith]]
-set auto_index(::MsrSelDlg::constructor) [list source [file join $dir msrselection.itb]]
-set auto_index(::MsrSelDlg::build_win) [list source [file join $dir msrselection.itb]]
-set auto_index(::MsrSelDlg::doit) [list source [file join $dir msrselection.itb]]
-set auto_index(::MsrSelDlg::cancel) [list source [file join $dir msrselection.itb]]
-set auto_index(::MsrSelDlg::list_msrs) [list source [file join $dir msrselection.itb]]
-set auto_index(::MsrSelDlg::select_msr) [list source [file join $dir msrselection.itb]]
-set auto_index(::MsrSelDlg::clear_msr_selection) [list source [file join $dir msrselection.itb]]
-set auto_index(display_cpu_info) [list source [file join $dir cpuinfo.tcl]]
diff --git a/gdb/gdbtk/plugins/plugins.tcl b/gdb/gdbtk/plugins/plugins.tcl
deleted file mode 100644
index b9b1f926713..00000000000
--- a/gdb/gdbtk/plugins/plugins.tcl
+++ /dev/null
@@ -1,30 +0,0 @@
-# Only load the rhabout plugin if it was installed.
-foreach dir $::gdb_plugins {
- if {[file exists [file join $dir rhabout]]} {
- package require RHABOUT 1.0
- $Menu add command Other "About Red Hat" \
- {ManagedWin::open RHAbout} -underline 0
-
- # To activate the PlugIn sample, uncomment the next line
- set plugins_available 1
- }
-}
-
-# Only load the Intel Pentium plugin for x86 targets.
-if {[string match "i?86-*" $::GDBStartup(target_name)] && ![TargetSelection::native_debugging]} {
- package require INTELPENTIUM 1.0
-
- # Add a new cascading-style menu to plugin menu
- $Menu add cascade intel "Intel Pentium" 0
-
- # Add MSR selection dialog menu item.
- $Menu add command None "MSR Selection..." \
- {ManagedWin::open_dlg MsrSelDlg} -underline 0
-
- # Add CPU info menu item.
- $Menu add command None "CPU Information..." \
- display_cpu_info -underline 0
-
- # Activate the PlugIn.
- set plugins_available 1
-}
diff --git a/gdb/gdbtk/plugins/rhabout/ChangeLog b/gdb/gdbtk/plugins/rhabout/ChangeLog
deleted file mode 100644
index f87b23b37ca..00000000000
--- a/gdb/gdbtk/plugins/rhabout/ChangeLog
+++ /dev/null
@@ -1,24 +0,0 @@
-2004-12-08 Keith Seitz <kseitz@sources.redhat.com>
-
- From Ben Elliston (bje@gnu.org):
- * rhabout.c (extra_text): Convert to object interface.
- (Rhabout_Init): Use Tcl_CreateObjCommand instead of older argc/argv
- Tcl_CreateCommand.
-
-2003-03-12 Martin M. Hunt <hunt@redhat.com>
-
- * rhabout.itcl (RHAbout): Fix call
- to open_help. We no longer use HTMLViewer.
-
-2002-08-14 Keith Seitz <keiths@redhat.com>
-
- Merged from Red Hat internal branch:
- 2001-11-30 Keith Seitz <keiths@redhat.com>
- * rhabout.c: Update for building a DLL on cygwin.
- (DllMain): New function.
- * rhabout.tcl: Moved from ../ and renamed to
- rhabout.tcl.in: configure needs to tweak the shared library name.
- * rhabout.tcl.in: "New" file.
- * Makefile.in: New (template) file.
- * Makefile: Remove.
- * pkgIndex.tcl: Moved from ../ here.
diff --git a/gdb/gdbtk/plugins/rhabout/Makefile.in b/gdb/gdbtk/plugins/rhabout/Makefile.in
deleted file mode 100644
index e63e568d6f4..00000000000
--- a/gdb/gdbtk/plugins/rhabout/Makefile.in
+++ /dev/null
@@ -1,9 +0,0 @@
-# Plugin definitions
-PLUGIN = rhabout
-PLUGIN_OBJS = rhabout.$(OBJEXT)
-PLUGIN_IMAGE_BASE = 0x65000000
-PLUGIN_INSTALL_SRCDIR = rhabout.itcl
-# Comment out this to install the example plugin
-PLUGIN_INSTALL_TARGET = nothing
-
-nothing:
diff --git a/gdb/gdbtk/plugins/rhabout/pkgIndex.tcl b/gdb/gdbtk/plugins/rhabout/pkgIndex.tcl
deleted file mode 100644
index b56e703e31f..00000000000
--- a/gdb/gdbtk/plugins/rhabout/pkgIndex.tcl
+++ /dev/null
@@ -1,2 +0,0 @@
-package ifneeded RHABOUT 1.0 [list source [file join $dir rhabout.tcl]]
-
diff --git a/gdb/gdbtk/plugins/rhabout/rhabout.c b/gdb/gdbtk/plugins/rhabout/rhabout.c
deleted file mode 100644
index fd043dc355a..00000000000
--- a/gdb/gdbtk/plugins/rhabout/rhabout.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Sample command procedure library for a plug-in. */
-
-/* You have to include the Tcl headers, of course. */
-#include <tcl.h>
-
-/* Define the functions that implement your commands as required by Tcl */
-#ifdef __CYGWIN__
-# define EXPORT __declspec(dllexport)
-#else
-# define EXPORT /* nothing */
-#endif
-
-int extra_text (ClientData clientData,
- Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[]);
-
-/* Here you actually do whatever you want, like calling your target
- libraries etc. Here we just return a string. */
-
-int
-extra_text (ClientData clientData,
- Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
-{
- interp->result = "\nThis is a sample plug-in\n";
- return TCL_OK;
-}
-
-/* Initialization function required in Tcl libraries. */
-
-int EXPORT
-Rhabout_Init (Tcl_Interp *interp)
-{
- /* Register your command as a Tcl command with this interpreter. */
- Tcl_CreateObjCommand (interp, "rhabout_extra_text", extra_text,
- (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
-
- /* Register this package */
- Tcl_PkgProvide (interp, "RHABOUT", "1.0");
- return TCL_OK;
-}
-
-/* This is REQUIRED for cygwin */
-#ifdef __CYGWIN__
-#include <windows.h>
-#include <tclInt.h>
-
-struct _reent *_impure_ptr;
-extern struct _reent *_imp__reent_data;
-
-BOOL APIENTRY
-DllMain (HINSTANCE hInstance, DWORD reason, LPVOID reserved)
-{
- _impure_ptr = _imp__reent_data;
- return TRUE;
-}
-#endif
diff --git a/gdb/gdbtk/plugins/rhabout/rhabout.itcl b/gdb/gdbtk/plugins/rhabout/rhabout.itcl
deleted file mode 100644
index 02a83517dfd..00000000000
--- a/gdb/gdbtk/plugins/rhabout/rhabout.itcl
+++ /dev/null
@@ -1,87 +0,0 @@
-class RHAbout {
- inherit PluginWindow
- constructor {args} {
- global gdb_ImageDir
-
- # What about a menu?
- $menubar add menubutton file "File" 0
- $menubar add command None "Close" \
- [code $this destroy_toplevel] \
- -underline 1
- $menubar add menubutton help "Help" 0
- $menubar add command Other "Help Topics" \
- {open_help index.html} \
- -underline 0
- $menubar add separator
- $menubar add command Other "About GDB..." \
- {ManagedWin::open About -transient} \
- -underline 0
-
- # The menu only shows up if you do this:
- $menubar show
-
- # Do you want a toolbar?
- $toolbar add button con Other {ManagedWin::open Console} \
- "Console (Ctrl+N)" -image console_img
-
- # The toolbar will only show up if you do this:
- $toolbar show
-
- # Now, fill the childsite with some graphics and text
-
- # Remember to use the childsite, do not pack in the widget hull
- set f [childsite]
-
- # Put in some graphics
- label $f.image1 -bg white -image \
- [image create photo -file [file join $gdb_ImageDir insight.gif]]
-
- # Here we call an interface function provided by GDBTCL
- set text [gdb_cmd {show version}]
-
- # Here we call a command procedure that we created, if it exists
- catch {append text [rhabout_extra_text]}
-
- # Now add the text
- message $f.m -bg white -fg black -text $text -aspect 500 -relief flat
-
- # Add a status bar so we can show some dynamic information
- set _status [label $f.stat -relief sunken -bd 3 \
- -font global/status -height 1]
-
- # pack everything
- pack $f.image1 $f.m -fill both -expand yes
- pack $f.stat -expand 1 -fill both
- pack $itk_interior
-
- # Give our sample window a name
- window_name "About Red Hat Insight Plug-In"
- }
-
- # You can overload the base class busy method, but make sure
- # to call it as well or the menu and button status will not be updated
- # (unless this is what you want)
- public method busy {event} {
- debug
- # Call the baseclass version
- PluginWindow::busy $event
-
- # Display something in the status area
- $_status configure -text "Running..."
- }
-
- # You can overload the base class idle method, but make sure
- # to call it as well or the menu and button status will not be updated
- # (unless this is what you want)
- private method idle {} {
- debug
- # First call the baseclass version
- PluginWindow::idle
-
- # Display something in the status area
- $_status configure -text "Stopped."
- }
-
- # Path to the status area
- private variable _status
-}
diff --git a/gdb/gdbtk/plugins/rhabout/rhabout.tcl.in b/gdb/gdbtk/plugins/rhabout/rhabout.tcl.in
deleted file mode 100644
index 61533da7501..00000000000
--- a/gdb/gdbtk/plugins/rhabout/rhabout.tcl.in
+++ /dev/null
@@ -1,5 +0,0 @@
-package provide RHABOUT 1.0
-set dirname [file dirname [info script]]
-lappend auto_path $dirname
-set TCL_DBGX "@TCL_DBGX@" ; # needed for cygwin
-catch {load [file join $dirname rhabout@TCL_SHLIB_SUFFIX@]}
diff --git a/gdb/gdbtk/plugins/rhabout/tclIndex b/gdb/gdbtk/plugins/rhabout/tclIndex
deleted file mode 100644
index 6a7b8a87329..00000000000
--- a/gdb/gdbtk/plugins/rhabout/tclIndex
+++ /dev/null
@@ -1,9 +0,0 @@
-# Tcl autoload index file, version 2.0
-# This file is generated by the "auto_mkindex" command
-# and sourced to set up indexing information for one or
-# more commands. Typically each line is a command that
-# sets an element in the auto_index array, where the
-# element name is the name of a command and the value is
-# a script that loads the command.
-
-set auto_index(RHAbout) [list source [file join $dir rhabout.itcl]]
diff --git a/gdb/testsuite/gdb.gdbtk/ChangeLog b/gdb/testsuite/gdb.gdbtk/ChangeLog
deleted file mode 100644
index 38a76ef64e1..00000000000
--- a/gdb/testsuite/gdb.gdbtk/ChangeLog
+++ /dev/null
@@ -1,329 +0,0 @@
-2005-01-27 Keith Seitz <keiths@redhat.com>
-
- * configure.in: Rename to ...
- * configure.ac: ... this.
- * configure: Regnerate.
-
-2004-07-19 Martin Hunt <hunt@redhat.com>
-
- * All: Updated load_lib calls to find new location
- of insight-support.exp.
-
-2004-07-16 Andrew Cagney <cagney@redhat.com>
-
- * insight-support.exp: Moved to here from ../lib.
-
-2003-02-28 Martin M. Hunt <hunt@redhat.com>
-
- * c_variable.test: Fix result for 6.22.
-
-2003-02-27 Martin M. Hunt <hunt@redhat.com>
-
- * cpp_variable.test: Major changes required because varobj_update
- now returns "-1" if a variable is out of scope.
-
- * c_variable.test: Major changes required because varobj_update
- now returns "-1" if a variable is out of scope. This fixes a bunch
- of XFAILS. Change bug reporting address.
-
- * windows.test: Remove HtmlViewer from list of windows.
-
- * srcwin.test: Use "list get" instead of "listget" to
- get contents of comboboxes.
- (2.1): Be less sensitive.
-
- * srcwin2.test: Use "list get" instead of "listget" to
- get contents of comboboxes
- (2-1.3): Accept assembly == mixed
- for no source tests.
-
- * srcwin3.test: Use "list get" instead of "listget" to
- get contents of comboboxes
-
-2002-09-09 Fred Fish <fnf@intrinsity.com>
-
- * simple.c: Pass addresses to strncpy, not chars.
-
-2002-04-26 Martin M. Hunt <hunt@redhat.com>
-
- * defs (gdbtk_test_done): Call gdbtk_force_quit.
-
-2002-04-26 Martin M. Hunt <hunt@redhat.com>
-
- * srcwin.test (click): Take a button number as an arg.
- Generate a ButtonPress event then a ButtonRelease event
- for that button number.
- (4.4): Fix args for click().
- (5.1): Fix results again.
-
-2002-03-07 Martin M. Hunt <hunt@redhat.com>
-
- * srcwin.test (5.1): Adjust line numbers to
- test now runs correctly.
-
-2002-01-18 Keith Seitz <keiths@redhat.com>
-
- * console.test: Don't rely on "event generate" to do
- keystrokes. It just doesn't work. Use the console window's
- "test" method instead.
- Use Console::test instead of Console::get_text.
-
-2002-01-15 Keith Seitz <keiths@redhat.com>
-
- * c_variable.test (1.4,2.14): Remove test for local frame
- variables. Varobj now forces evaluation in the current frame
- by default.
- (2.15): Ignore any changes and only check for out of scope
- locals (which is still unsupported).
- * cpp_variable.test (1.1): Support alternative names for
- local scope.
- (1.6a): Catch call to gdb_cmd to prevent an error from
- throwing testsuite into la-la land. Add to test.
- (1.7): Ignore results from children during step, since
- they may or may not change value when the parent changes.
- (2.2a): New test incorperating gdb_cmd (also wrapped in
- catch).
- (2.22a): Likewise.
- (2.71a): Likewise.
-
-2001-12-20 Keith Seitz <keiths@redhat.com>
-
- * cpp_variable.test: Catch non-test calls in case we
- could not run.
-
-2001-10-25 Keith Seitz <keiths@redhat.com>
-
- * defs (_report_error): Fix typo.
- (show_warning): Redefine the standard warning handler
- so that we don't end up stalling tests with a warning dialog.
-
- * windows.exp: New file.
- * windows.test: New file.
-
-2001-10-08 Keith Seitz <keiths@redhat.com>
-
- * c_variable.test (check_update): Forget about returning
- the "unchanged" list. It unneccessarily complicates things.
- Update all callers.
- * cpp_variable.test: Likewise.
-
-2001-08-30 Keith Seitz <keiths@redhat.com>
-
- * README: Update documentation to reflect recent changes.
- * browser.exp: Load the insight testsuite support library.
- * c_variable.exp: Likewise.
- * console.exp: Likewise.
- * cpp_variable.exp: Likewise.
- * srcwin.exp: Likewise.
-
-2001-08-16 Keith Seitz <keiths@redhat.com>
-
- * cpp_variable.test (2.29, 2.30, 2.43, 2.63, 2.72): Char
- pointers can now be dereferenced. Update test to reflect
- this change in varobj.
- * c_variable.test (4.9, 4.10, 4.47, 4.48, 5.1, 5.2, 5.3,
- 5.4, 5.5, 5.6, 5.7, 5.8, 5.9, 5.17, 5.18, 5.43, 5.44, 5.47,
- 5.48, 5.49, 5.50, 5.51, 5.53, 6.30): Likewise.
-
-2001-08-13 Jeff Holcomb <jeffh@redhat.com>
-
- * cpp_variable.test: Use gdbtk_test_run to start the test
- program.
-
-2001-05-07 Keith Seitz <keiths@cygnus.com>
-
- * README: New file.
-
- * configure.in: Check for executable filename extension.
- * Makefile.in: Add filename extensions.
- * configure: Regenerated.
-
- * defs: Fix typo setting _test(verbose).
- (gdbtk_test_file): New proc to load executables into gdbtk.
- (gdbtk_test_run): New proc to run executables on gdbtk.
- * browser.exp: Don't check if DISPLAY is set: let
- gdbtk_initialize_display do it all for us.
- Call gdbtk_done when finished with tests.
- * c_variable.exp: Ditto.
- * console.exp: Ditto.
- * cpp_variable.exp: Ditto.
- Only run tests if c++ is supported in the configuration.
- * srcwin.exp: Ditto the DISPLAY stuff.
- Accumulate all test results for the end and report them then.
-
- * browser.test: Use gdbtk_test_file and gdbtk_test_run
- to load and run an executable.
- * c_variable.test: Use gdbtk_test_file and gdbtk_test_run
- to load and run an executable.
- * srcwin.test: Ditto.
- * srcwin1.test: Ditto.
- * srcwin2.test: Ditto.
-
- * browser.test: (set_search_mode): Use "configure
- -value" not "entryset" to set the combobox's value. We need
- to have the command fired.
- (browser-3.5): Remove trailing whitespace which causes test to
- fail.
- (browser-4.4): Expect something rational. Regexp "\_1$" cannot
- match "func_10"!
- (browser-4.5): Ditto.
- (browser-5.12): Select all files for search to make test
- match description.
- (browser-6.2): Renamed from another test also calledd 6.1.
- (browser-7.1): Delete all breakpoints at once without from_tty.
- Select all entries in the comobox before invoking BP set/delete
- button.
- (browser-7.2): Ditto.
-
- * list0.c, list1.c, list0.h: New files. Grabbed from gdb.base.
- * srcwin.exp: Use these local files instead of those in gdb.base.
-
-1999-09-17 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * cpp_variable.test: Add test (2.75) to verify
- that a baseclass member value was effectively changed.
-
-1999-09-17 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * cpp_variable.test: Update for new variable
- code.
-
-1999-09-17 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * c_variable.test: Update for new variable code.
-
-1999-09-17 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * cpp_variable.h (class V): Add type to virtual function
- declaration.
-
-1999-06-08 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * browser.exp: Use untested and not warning when DISPLAY is
- not found.
- * c_variable.exp: Same.
- * console.exp: Same.
- * cpp_variable.exp: Same.
- * srcwin.exp: Same.
-
-1999-04-12 Keith Seitz <keiths@cygnus.com>
-
- * cpp_variable.exp: Pass the "c++" flag to gdb_compile so
- that it can grab the right compiler.
-
-1999-03-16 Martin Hunt <hunt@cygnus.com>
-
- * srcwin.test (srcwin-4.5): Change variable name
- to $b so test will run again.
-
-1999-03-03 James Ingham <jingham@cygnus.com>
-
- * browser.test: Fixed up to match the new function browser.
- This is not done yet...
-
- * srcwin.test: Check for errors when the bbox is called for a text
- item that is not on screen (so bbox is ""). Return something more
- useful.
-
-1999-03-01 James Ingham <jingham@cygnus.com>
-
- Changelog entries merged over from gdb development branch.
-
- 1999-01-12 Martin Hunt <hunt@cygnus.com>
- * srcwin.test: Add a bunch of tests for the source
- window filename and function comboboxes. Add in stack tests.
-
- 1999-01-11 Martin Hunt <hunt@cygnus.com>
- * srcwin.test: New file. Source Window tests.
- * srcwin.exp: New file. Source Window tests.
-
- Wed Jan 6 09:22:52 1999 Keith Seitz <keiths@cygnus.com>
- * c_variable.test (c_variable-1.9): Add new
- test to check for creation of a variable that is really a type.
- (c_variable-7.81): Use "output" instead of "print" to get PC.
- Include missing bits of test.
-
- * cpp_variable.test (cpp_variable-1.6): Default format
- is now "natural", not "hexadecimal"
- (cpp_variable-2.22): Ditto.
- (cpp_variable-2.24): Force format to hex before getting value.
-
- * cpp_variable.exp: Supply missing arg to gdbtk_analyze_results.
-
- Tue Jan 5 12:40:52 1999 Keith Seitz <keiths@cygnus.com>
- * gdb.gdbtk/c_variable.c, c_variable.test, c_variable.exp: New C
- language tests for variable object interface.
-
- * gdb.gdbtk/cpp_variable.h, cpp_variable.cc, cpp_variable.test,
- cpp_variable.exp: New C++ language tests for variable object
- interface.
-
- * gdb.gdbtk/Makefile.in (EXECUTABLES): Add c_variable and cpp_variable.
-
- Tue Jan 5 12:33:47 1999 Keith Seitz <keiths@cygnus.com>
- lib/gdb.exp (gdbtk_analyze_results): Generic function
- for outputting results of test run.
-
- * gdb.gdbtk/defs (gdbtk_test): Handle xpass and xfail.
- (gdbtk_test_error): New proc which handles error aborts.
-
- * gdb.gdbtk/console.exp: Use gdbtk_analyze_results.
- Check if we have a valid DISPLAY before running.
- * gdb.gdbtk/browser.exp: Ditto.
-
- 1998-12-07 Martin M. Hunt <hunt@cygnus.com>
- * lib/gdb.exp (gdbtk_start): Fix path for itcl library.
- * gdb.gdbtk/browser.test: Change "manage open" to ManagedWin::open.
- * gdb.gdbtk/console.test: Same.
- * gdb.gdbtk/*: Update from devo.
-
- Fri Jul 24 14:57:19 1998 Keith Seitz <keiths@cygnus.com>
- * gdb.gdbtk/Makefile.in: Add new example program "stack".
- * gdb.gdbtk/browser.test,browser.exp: Add browser window
- tests.
- * gdb.gdbtk/stack1.c,stack2.c: Test case for browser window.
-
-1999-02-22 Martin Hunt <hunt@cygnus.com>
-
- * srcwin.test (move_mouse_to): Fix typo.
-
-1999-02-03 Martin Hunt <hunt@cygnus.com>
-
- * console.test (clear_command_line): Add tests 1.5 - 1.8,
- which test the new Shift-Up and Shift-Down bindings.
-
-1999-02-01 Martin Hunt <hunt@cygnus.com>
-
- * srcwin.test (srcwin-4.3): Fix bp test.
-
-1999-01-29 Martin Hunt <hunt@cygnus.com>
-
- * srcwin.test (click): New function that generates an event
- at a location.
- (srcwin-4.4): New test. Simulate a click on a line and
- check for breakpoint set.
- (srcwin-4.5): New test. Right-click on a line and select "Continue
- to Here" from popup.
-
- * srcwin.exp: Source srcwin3.test, which will test source window
- assembly debugging on executables built without "-g".
-
-1999-01-29 Martin Hunt <hunt@cygnus.com>
-
- * srcwin.exp: Add srcwin2.test, which are basically the same
- tests as srcwin.test, but run with a missing source file.
-
- * srcwin2.test: New file.
-
- * srcwin.test: Add tests for setting breakpoints in the source window,
- testing BP balloons, variable balloons, and mixed-mode disassembly
- of include files.
-
-Sun Jun 28 22:34:34 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * gdb.gdbtk/simple.c (main): Make main return an
- int so compiler will stop complaining.
-
-Fri Jun 26 14:27:13 1998 Keith Seitz <keiths@cygnus.com>
-
- * gdb.gdbtk/console.{exp, test}: New console window tests.
diff --git a/gdb/testsuite/gdb.gdbtk/Makefile.in b/gdb/testsuite/gdb.gdbtk/Makefile.in
deleted file mode 100644
index 51151a57814..00000000000
--- a/gdb/testsuite/gdb.gdbtk/Makefile.in
+++ /dev/null
@@ -1,36 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXEEXT = @EXEEXT@
-
-EXECUTABLES = simple$(EXEEXT) stack$(EXEEXT) c_variable$(EXEEXT) \
- cpp_variable$(EXEEXT)
-
-# uuencoded format to avoid SCCS/RCS problems with binary files.
-CROSS_EXECUTABLES =
-
-all:
- @echo "Nothing to be done for all..."
-
-info:
-install-info:
-dvi:
-install:
-uninstall: force
-installcheck:
-check:
-
-clean mostlyclean:
- -rm -f *~ *.o a.out xgdb *.x $(CROSS_EXECUTABLES) *.ci *.tmp
- -rm -f core core.coremaker coremaker.core corefile $(EXECUTABLES)
- -rm -f twice-tmp.c
-
-distclean maintainer-clean realclean: clean
- -rm -f *~ core
- -rm -f Makefile config.status config.log
- -rm -f arch.inc
- -rm -f *-init.exp
- -rm -fr *.log summary detail *.plog *.sum *.psum site.*
-
-Makefile : $(srcdir)/Makefile.in $(srcdir)/configure.in
- $(SHELL) ./config.status --recheck
diff --git a/gdb/testsuite/gdb.gdbtk/README b/gdb/testsuite/gdb.gdbtk/README
deleted file mode 100644
index b70488647b4..00000000000
--- a/gdb/testsuite/gdb.gdbtk/README
+++ /dev/null
@@ -1,421 +0,0 @@
- The Insight Testsuite
- ---------------------
- Keith Seitz (keiths@cygnus.com)
- May 1, 2001
-
-RUNNING THE TESTSUITE
-
-The Insight testsuite is run in much the same way that gdb's testsuites
-are run. The one big difference is the environment variable GDB_DISPLAY,
-which governs what display should be used for the tests.
-
-When GDB_DISPLAY is not set in the user's environment, the Insight testsuite
-will attempt to run Xvfb, an X server with a virtual frame buffer. Using
-Xvfb, the testsuite can run without interuppting the user.
-
-When Xvfb is not available, the testsuite will mark the Insight tests
-"untested" and print out some appropriate warning to the testsuite log
-file.
-
-If GDB_DISPLAY is set in the user's environment, the testsuite will attempt
-to use this display for the tests. If this display is a desktop display,
-it is very likely that any interaction between the user and his desktop
-will interfere with the tests. Some tests warp the cursor, i.e., they
-force the mouse to move on the screen. If you don't want this to happen to
-you, put Xvfb in your path.
-
-On Cygwin systems, Xvfb is not supported. Only two choices are available in
-this environment: run the testsuites using the desktop or do not run the
-testsuite. To run the testsuite on Cygwin, just define the environment
-variable GDB_DISPLAY to anything.
-
-The examples below summarize the usage of the environment variable GDB_DISPLAY
-on unix/X-Windows hosts and Cygwin hosts. In all examples, assume that DISPLAY
-set to the local workstation's main display (:0).
-
-To run the testsuite using Xvfb -- unix only (Xvfb must be in PATH):
-$ make check
-
-To run the testsuite using a given display (either the desktop or a peviously
-started Xvfb):
-$ GDB_DISPLAY=$DISPLAY make check
-
-To run the testsuite on Cygwin:
-$ GDB_DISPLAY=foo make check
-
-
-TESTSUITE INFRASTRUCTURE
-
-The rest of this document deals with writing tests for Insight. This reading
-is only noteworthy for developers and contributors.
-
-The Insight testsuite consists of two large portions of code: code which is
-run in dejagnu and code which runs in Insight's built-in Tcl interpreter. Files
-containing dejagnu code (those files ending in ".exp" in the testsuite directory)
-are "glue code" between gdb's dejagnu testsuite and Insight's Tcl testsuite.
-
-Dejagnu testsuite files are considered "drivers" for any particular set of
-tests, since they allow dejagnu to control Insight's Tcl testsuite.
-
-
-Dejagnu Testsuite Infrastructure
-
-The dejagnu code is responsible for doing several things. Some of the more
-important responsibilities include:
-
-o Initializing the display
-o Determining if tests should be run
-o Results accounting
-o Compiling testcases in various languages
-o Repoting results to gdb's testsuite
-
-There are various functions defined to facilitate the writing of tests. These
-functions currently reside in gdb's gdb.exp (src/gdb/testsuite/lib/gdb.exp) and
-include:
-
-Pulic functions:
-proc gdbtk_initialize_display {}
-
- gdbtk_initialize_display should be the first function called from the
- (dejagnu) test file. It initializes the DISPLAY variable on unix systems
- and determines (for all host systems) whether or not the testsuite should
- run. It returns 1 if the test should run. If tests should not run, it
- marks the test as "untested" and leaves a suitable message about why
- the test should not run. If gdbtk_initialize_display returns zero, a test
- should simply exit.
-
-proc gdbtk_start {test}
-
- This function marks the start of a test and will execute Insight for
- testing. The TEST parameter should be the file name of the Tcl test
- file to load into Insight's Tcl interpreter. It returns a list of
- test results suitable for passing to gdbtk_done or gdbtk_analyze_results.
- See gdbtk_analyze_results for more information on the format of results.
-
- gdbtk_start is responsible for communicating target startup information
- to Insight, so that Insight's testsuite may be run on any target supported
- by gdb. It does this by setting several environment variables just before
- it starts Insight. These environment variables are:
-
- OBJDIR
- The object directory of the dejagnu testsuite (i.e.,
- objdir/gdb/testsuite).
- SRCDIR
- The dejagnu source directory in which the tests are located (i.e,
- src/gdb/testsuite)
- SUBDIR
- The dejagnu testsuite subdirectory for the test (i.e., gdb.gdbtk)
- DEFS
- The location of the testsuite definitions file (i.e.,
- src/gdb/testsuite/gdb.gdbtk/defs)
-
- Note that DEFS is converted to abs$lute tcl-style paths. On unix,
- this means that DEFS would point to, for example,
- /home/keiths/insight/src/gdb/testsuite/gdb.gdbtk/defs. On Cygwin it
- would point to C:/cygwin/home/keiths/insight/src/gdb/testsuite/gdb.gdbtk/defs.
- This is because of a descrepency between Cygwin's posix paths and Tcl's
- not-quite-posix paths.
-
-proc gdbtk_analyze_results {results}
- This function translates the list of results in RESULTS into dejagnu
- results, reporting the number of failures, errors, passes, and expected
- failures and passes. It currently does not deal with "untested" and other
- test statuses from dejagnu since Insight's tcl testsuite does not
- issue such results.
-
- The format of the results expected by gdbtk_analyze_results is simple:
- it is a list of {status name description msg}. "status" is the execution
- status of one of the tcl tests run. This can be "PASS", "FAIL", "ERROR",
- "XFAIL", or "XPASS".
-
- "name" is the name of the test, and it is reported in all testsuite
- results in dejagnu. This speeds location of the failing test. This
- "name" may also be given to Insight's testsuite, telling it to
- only run this test. See "do_tests" in Tcl Testsuite Infrastructure
- for more information.
-
- "description" is a textual description of the test given by "name".
-
- "msg" is currently not used.
-
-proc gdbtk_done {{results {}}}
- gdbtk_done takes any RESULTS and passes it gdbtk_analyze_results for
- outputting to the dejagnu part of the testsuite. It may be called
- without an argument, in which case it will only terminate Xvfb if it
- was started. Tests must call gdbtk_done _once_ at the end of their
- test drivers.
-
-Private functions:
-proc _gdbtk_export_target_info
- This functin exports information about the target into the environment
- so that Insight's testsuite may run programs on any supported gdb
- target. This target information is passed into the Tcl testsuite
- via an environment variable, TARGET_INFO, which is really a Tcl array,
- i.e., the array is constructed in tcl and exported into the environment
- with Tcl's "array get" command).
-
- There are four elements to the array:
- TARGET_INFO(init) - (optional) A list of commands to execute in gdb
- to initialize the session. This usually includes
- setting baud rates and remote protocol options.
- TARGET_INFO(target) - (required) The complete "target" command to connect
- to the given target.
- TARGET_INFO(load) - (optional) The complete "load" command to load an
- executable into a target.
- TARGET_INFO(run) - (required) The complete "run" command, sans arguments,
- to start a process on the target. For remote targets,
- this is usually just "continue".
-
-proc _gdbtk_xvfb_init
- This procedure actually determines whether the an Insight test should
- run and what DISPLAY it should use for that test. It is called by
- gdbtk_initialize_display to do most of the dirty work.
-
- It has a simple heuristic: If GDB_DISPLAY is not set and Xvfb is available
- (on unix), it starts Xvfb, using the current process id as the screen number.
- If Xvfb is not available and GDB_DISPLAY was not set, it skips the tests.
-
-proc _gdbtk_xvfb_exit
- _gdbtk_xvfb_exit will kill any previously started Xvfb.
-
-Private globals:
-global _xvfb_spawn_id
- This variable holds the spawn_id of any Xvfb process started
- by the testsuite (or it is left undefined).
-
-global _using_windows
- A global variable which indicates whether the testsuite is running
- on cygwin. Unfortunately, as of writing, the global variable
- tcl_platform(platform) is "unix" on Cygwin, so it is not possible
- to rely on this for platform-dependent operations.
-
- Instead, this variable is set by gdbtk_initialize_display. The test
- it uses to determine if Cygwin is being used: it looks for the program
- cygpath in the PATH. Therefore, cygpath is REQUIRED to run the testsuite
- on Cygwin. (gdbtk_start also uses cygpath to determine Windows
- pathnames for Cygwin.)
-
-
-Testsuite Driver Basics
-
-Given the above interfaces for connecting Insight's Tcl testsuite and
-gdb's dejagnu testsuite, the basic testsuite driver file should look
-(minimally) like this:
-
-File: mytest.exp
-1 load_lib "insight-support.exp"
-2 if {[gdbtk_initialize_display]} {
-3 # We found a display to use
-4 gdb_exit; # Make sure any previous gdb is gone
-5 set results [gdbtk_start mytest.test]
-6
-7 # Done!
-8 gdbtk_done [split $results \n]
-9 }
-
-Line 1 loads the insight testsuite support library which contains definitions
-for all the procedures used in dejagnu to initialize and run the Insight testsuite.
-Line 2 calls gdbtk_initialize_display to ascertain whether there is a display
-to use for the test. This could use an existing display (if GDB_DISPLAY is
-set in the environment) or gdbk_initialize_display could startup an Xvfb
-for use by the testsuite.
-
-Line 4 forces any previously executing gdb to terminate.
-
-Line 5 signals the start of the test run. "mytest.test" is the name of the
-Tcl test file to execute in Insight's built-in Tcl interpreter. The output
-of gdbtk_start_test is all of the results of the Tcl test from Insight, which
-is subsequently passed to gdbk_analyze_results via gdbtk_done on Line 8.
-
-Note how nothing happens if gdbtk_initialize_display returns false.
-
-
-Tcl Testsuite Infrastructure
-
-The heart of Insight's testsuite is its Tcl testsuite. It is these tests
-which run directly in Insight's Tcl interpreter and allow test writers
-access to Insight's internals. Tcl testsuite files have the filename suffix
-".test" to distinguish them from their driver files, which end in ".exp".
-
-The design of the Insight Tcl testsuite parallels Tcl's testsuite. It has
-many powerful features, including the ability to run ANY test in a given
-Tcl test file. See the description of utility routines below for more
-information about running any set of tests from a file.
-
-The bulk of the code implementing the Tcl testsuite infrastructure in
-Insight is contained in the testsuite definitions file, "defs", located
-in src/gdb/testsuite/gdb.gdbtk. This file contains routines necessary
-to write tests for Insight.
-
-Public functions:
-proc gdbtk_read_defs {}
- This function, located in Insight's core Tcl library, attempts to load
- the testsuite definitions file. If it fails, it will either pop up
- a dialog box with the error (if running interactively) or it will
- print the error to stderr and exit (if running non-interactively).
-
- If successful, it will return true.
-
-proc gdbtk_test_file {filename}
- This function is used to load the file given by FILENAME into
- Insight. It will automatically append ".exe" to any FILENAME
- on Cygwin-hosted systems.
-
- If successful, it will load the given file into Insight and
- return the output of gdb's file command. It will call "error"
- if it was succesful, therefore all calls to "gdbtk_test_file"
- should be called using "catch".
-
- Test authors should not use "gdb_cmd {file FILENAME}" to load
- files into gdb unless they are testing interface code between
- gdb and Insight.
-
-proc gdbtk_test_run {{prog_args {}}}
- gdbtk_test_run runs the previoiusly loaded executable, passing
- the given arguments to the inferior. Like Insight's Run button,
- it will do whatever is necessary to get the executable running,
- including any target initialization (setting baud rate and remote
- protocol options), downloading the executable to the target, and
- finally starting execution.
-
- Test authors should NEVER use "gdb_cmd {run ARGUMENTS}" to run an
- executable. Doing so will insure that your tests will only run on
- a native debugger.
-
- It returns true if successful or false otherwise. It will report
- the error in a dialog box (if running interactively) or it will
- print the error to stderr.
-
-proc gdbtk_test {name description script answer}
- This is Tcl testsuite equivalent of "expect". "name" is a canonical
- name of the test, usually of the form "shortname-major.minor". This is
- the name that is used when running selected tests from a given file.
- If "name" starts with an asterisk (*), it designates that the test
- is expected to fail.
-
- "description" is a short textual description of the test to help
- humans understand what it does.
-
- "script" is the actual test script to run. The result of this script
- will be compared against "answer" to determine if the test passed
- or failed.
-
- It calls gdbtk_print_verbose to print out the results to the terminal
- (if running interactively) or to the log file.
-
-proc gdbtk_test_done {}
- gdbtk_test_done is called at the very end of all tcl tests. It is used
- to exit Insight and return control back to the dejagnu driver which
- started the tests.
-
-proc gdbtk_dotests {file args}
- Obsolete.
-
-proc do_test {{file {}} {verbose {}} {tests {}}}
- This procedure is used to invoke the Insight test(s) given in FILE
- which match the regular expression(s) in TESTS. This is invoked
- from Insight's console window to run tests interactively.
-
- VERBOSE sets the verbosity of the test run. When set to one,
- the testsuite will report all results in human readable form.
- When set greater than one, it will print out results as a list,
- i.e., for passing to gdbtk_analyze_results. If zero, it will only
- print errors and failures in human readable form.
-
-Public global variables:
-objdir - The objdir from dejagnu. See gdbtk_start for more information.
-srcdir - The srcdir from dejagnu. See gdbtk_start for more information.
-test_ran - Indicates whether the last test ran or not. See example below.
-
-Private functions:
-proc gdbtk_test_error {desc}
- An internal function used to report a framework error in the testsuite.
- "desc" is a description of the error. It calls gdbtk_test_done.
-
-proc gdbtk_print_verbose {status name description script code answer}
- A helper procedure to gdbtk_test which prints out results to the terminal
- or the logfile (or both or none).
-
-Private global variables:
-_test - An array used by the testsuite internals.
-
-
-Tcl Test Basics
-
-Armed with the basic interface described above, it is possible to test Insight's
-GUI. Please do not write tests which attempt to imitate a user (moving the
-mouse and clicking buttons), unless there is no other way to test the functionality.
-
-The basic test file (with one test) looks like this (nonsensical one):
-File: mytest.test
-1 if {![gdbtk_read_defs]} {
-2 break
-3 }
-4
-5 global objdir test_ran
-6 set program [file join $objdir mytest]
-7 if {[catch {gdbtk_test_file $program} t]} {
-8 gdbtk_test_error "loading \"$program\": $t"
-9 }
-10 if {![gdbtk_test_run]} { exit 1 }
-11
-12 global foo
-13 set foo 1
-14
-15 # Test: mytest-1.1
-16 # Desc: check if a source window was created
-17 gdbtk_test mytest-1.1 {source window created} {
-18 set window [ManagedWin::find SrcWin]
-19 llength $window
-20 set foo 13
-21 } {1}
-22
-23 if {$test_ran} {
-24 set foo 1
-25 }
-26
-27 # Done
-28 gdbtk_test_done
-
-Line 1 calls the Inisght function gdbtk_read_defs to read in the testsuite
-definitions file.
-
-Line 6 then specifies the name of a file (mytest) in the object directory
-which is loaded into gdb on Line 7. If loading the file into Insight
-failed, gdbtk_test_error is called to publish the error (and terminate the
-test run for this file).
-
-Line 10 runs the executable on the target, and exits if it was unable
-to do so.
-
-Line 13 simply sets a global variable foo to illustrate the purpose
-of the global "test_ran". Before the test "mytest-1.1" runs, foo is set to
-one. In order to support running specific tests, the state of the debugger
-cannot be altered INSIDE gdbtk_test scripts, since the contents of the
-script may not be run if the user requested only a specific test to run.
-
-Line 20 in the middle of the test modifies the global foo. If subsequent
-test relied on foo being one, we would have a state violation, since
-mytest-1.1 may have (or may have not) run.
-
-Therefore, we can check if a test ran and reset foo by checking the
-global "test_ran". If set, we know that the previous test (mytest-1.1)
-was run, and that foo is now thirteen. We reset the result back to one.
-
-(Aside: Some tests do not follow this rule explicitly: they can assume
-that all tests run sequentially. In these cases, running a specific
-test in the file will probably fail, since the debugger is not brought
-to a known state along the way.)
-
-Lines 17-21 contain the actual test. The test's name is "mytest-1.1". It
-is this name that may be referred to when asking the testsuite to run
-a specific test. The description of this test is "source window created",
-indicating that mytest-1.1's purpose is to check whether a source window
-was created.
-
-If gdbtk_test determines that this test is to run, it will execute the
-next part, lines 18-20, and compare the output of that script (llength
-$window) with "1". If the result is not "1", a failure is recorded. If
-it is "1", a pass is recorded.
-
-Finally, the test file is done and exits on line 28.
diff --git a/gdb/testsuite/gdb.gdbtk/browser.exp b/gdb/testsuite/gdb.gdbtk/browser.exp
deleted file mode 100644
index 475bdb506a1..00000000000
--- a/gdb/testsuite/gdb.gdbtk/browser.exp
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright 1998, 1999, 2001, 2004 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-load_lib ../gdb.gdbtk/insight-support.exp
-
-if {[gdbtk_initialize_display]} {
- if {$tracelevel} {
- strace $tracelevel
- }
-
- #
- # test browser window
- #
- set prms_id 0
- set bug_id 0
-
- set testfile "stack"
- set binfile ${objdir}/${subdir}/${testfile}
- set r [gdb_compile "${srcdir}/${subdir}/stack1.c ${srcdir}/${subdir}/stack2.c" "${binfile}" executable {debug}]
- if { $r != "" } {
- gdb_suppress_entire_file \
- "Testcase compile failed, so some tests in this file will automatically fail."
- }
-
- # Start with a fresh gdbtk
- gdb_exit
- set results [gdbtk_start [file join $srcdir $subdir browser.test]]
- set results [split $results \n]
-
- # Analyze results
- gdbtk_done $results
-}
diff --git a/gdb/testsuite/gdb.gdbtk/browser.test b/gdb/testsuite/gdb.gdbtk/browser.test
deleted file mode 100644
index 9e358dab1a5..00000000000
--- a/gdb/testsuite/gdb.gdbtk/browser.test
+++ /dev/null
@@ -1,686 +0,0 @@
-# Browser Window Tests
-# Copyright 1998, 2001 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Keith Seitz (keiths@cygnus.com)
-
-# Read in the standard defs file
-
-if {![gdbtk_read_defs]} {
- break
-}
-
-global objdir test_ran
-set _files(stupid_initializer) -100
-
-##### #####
-# #
-# Helper functions for this module #
-# #
-##### #####
-
-# Set the search expression
-proc set_regexp {exp} {
- global browser
-
- $browser component filt_entry delete 0 end
- $browser component filt_entry insert 0 $exp
-}
-
-# Do the search
-proc do_search {} {
- global browser
- $browser search
- set m [$browser component func_box get 0 end]
-
- return $m
-}
-
-# Set search to use regular expressions.
-proc set_search_mode {val} {
- global browser
- pref set gdb/search/filter_mode $val
-
- # Use configure instead of entryset: need to have
- # combobox's command fire
- $browser component filt_type configure -value $val
-}
-
-# Highlight a file
-proc select {filename} {
- global browser _files
-
- if {[info exists _files($filename)]} {
- $browser component file_box selection set $_files($filename)
- } else {
- set files [$browser component file_box get 0 end]
- set i [lsearch $files $filename]
- set _files($filename) $i
- $browser component file_box selection set $i
- }
- $browser search
-}
-
-proc select_all {} {
- global browser
-
- $browser component file_all invoke
-
-}
-
-# clear all files
-proc clear {} {
- global browser
-
- $browser component file_box selection clear 0 end
- $browser search
-}
-
-##### #####
-# #
-# BROWSER TESTS #
-# #
-##### #####
-
-# Load the test executable
-set program [file join $objdir stack]
-if {[catch {gdbtk_test_file $program} t]} {
- # This isn't a test case, since if this fails, we're hosed.
- gdbtk_test_error "loading \"$program\": $t"
-}
-
-# Open a browser
-set browser [ManagedWin::open BrowserWin]
-
-# Test: browser-1.1
-# Desc: Check file listbox contents
-gdbtk_test browser-1.1 {file listbox contents} {
- set m [$browser component file_box get 0 end]
- set f {}
- if {[lsearch $m stack1.c] == -1} {
- lappend f 0
- } else {
- lappend f 1
- }
- if {[lsearch $m stack2.c] == -1} {
- lappend f 0
- } else {
- lappend f 1
- }
-
- join $f \
-} {1 1}
-
-# Tests 2.* test starts with search mode.
-# Test: browser-2.1
-# Desc: Check all files/all funcs
-gdbtk_test browser-2.1 {all files/all funcs} {
- set_search_mode "starts with"
- set_regexp ""
- select_all
- set m [do_search]
- set r 0
- foreach f {extern_func1_1 extern_func1_10 extern_func1_11 extern_func1_12 \
- extern_func1_13 extern_func1_14 extern_func1_15 extern_func1_2 \
- extern_func1_3 extern_func1_4 extern_func1_5 extern_func1_6 \
- extern_func1_7 extern_func1_8 extern_func1_9 func_1 \
- func_10 func_11 func_12 func_13 \
- func_14 func_15 func_2 func_3 \
- func_4 func_5 func_6 func_7 \
- func_8 func_9 main static_func_1 \
- static_func_10 static_func_11 static_func_12 static_func_13 \
- static_func_14 static_func_15 static_func_2 static_func_3 \
- static_func_4 static_func_5 static_func_6 static_func_7 \
- static_func_8 static_func_9} {
- if {[lsearch $m $f] != -1} {
- incr r
- }
- }
-
- set r
-} {46}
-
-# Test: browser-2.2
-# Desc: Check all functions in stack1.c
-gdbtk_test browser-2.2 {all functions in stack1.c} {
- set_regexp ""
- clear
- select stack1.c
- set m [do_search]
-
- set r 0
- foreach f {func_1 func_10 func_11 func_12 \
- func_13 func_14 func_15 func_2 \
- func_3 func_4 func_5 func_6 \
- func_7 func_8 func_9 main \
- static_func_1 static_func_10 static_func_11 static_func_12 \
- static_func_13 static_func_14 static_func_15 static_func_2 \
- static_func_3 static_func_4 static_func_5 static_func_6 \
- static_func_7 static_func_8 static_func_9} {
- if {[lsearch $m $f] != -1} {
- incr r
- }
- }
-
- set r
-} {31}
-if {$test_ran} {
- clear
-}
-
-# Test: browser-2.3
-# Desc: Check all functions in stack2.c
-gdbtk_test browser-2.3 {all functions in stack2.c} {
- set_regexp ""
- clear
- select stack2.c
- set m [do_search]
-
- set r 0
- foreach f {extern_func1_1 extern_func1_10 extern_func1_11 \
- extern_func1_12 extern_func1_13 extern_func1_14 extern_func1_15 \
- extern_func1_2 extern_func1_3 extern_func1_4 extern_func1_5 \
- extern_func1_6 extern_func1_7 extern_func1_8 extern_func1_9} {
- if {[lsearch $m $f] != -1} {
- incr r
- }
- }
-
- set r
-} {15}
-if {$test_ran} {
- clear
-}
-
-# Test: browser-2.4
-# Desc: Check for all functions matching "func" - mode starts with
-gdbtk_test browser-2.4 {all functions matching "func" - "mode starts with"} {
- set_search_mode "starts with"
- select_all
- set_regexp func
- do_search
-} {func_1 func_10 func_11 func_12 func_13 func_14 func_15 func_2 func_3 func_4 func_5 func_6 func_7 func_8 func_9}
-
-# Test: browser-2.5
-# Desc: Check all functions matching "func" in stack1.c - mode starts with
-gdbtk_test browser-2.5 {all functions matching "func" in stack1.c - "mode starts with"} {
- set_search_mode "starts with"
- set_regexp func
- clear
- select stack1.c
- do_search
-} {func_1 func_10 func_11 func_12 func_13 func_14 func_15 func_2 func_3 func_4 func_5 func_6 func_7 func_8 func_9}
-
-# Test: browser-2.6
-# Desc: Check all functions matching "funcs" in stack2.c - mode starts with
-gdbtk_test browser-2.6 {all functions matching "func" in stack2.c - mode "starts with"} {
- set_search_mode "starts with"
- set_regexp func
- clear
- select stack2.c
- do_search
-} {}
-if {$test_ran} {
- clear
-}
-
-# Test: browser-2.7
-# Desc: Check all functions matching "foobar"
-gdbtk_test browser-2.7 {all functions matching "foobar"} {
- set_search_mode "starts with"
- select_all
- set_regexp foobar
- do_search
-} {}
-
-# Test: browser-2.8
-# Desc: Check all functions matching "foobar" in stack1.c
-gdbtk_test browser-2.8 {functions matching "foobar" in stack1.c} {
- set_search_mode "starts with"
- set_regexp foobar
- clear
- select stack1.c
- do_search
-} {}
-
-# Tests 3.* test "contains" search mode.
-# Test: browser-3.1
-# Desc: Check all files/all funcs
-gdbtk_test browser-3.1 {all files/all funcs} {
- set_search_mode "contains"
- set_regexp ""
- select_all
- set m [do_search]
- set r 0
- foreach f {extern_func1_1 extern_func1_10 extern_func1_11 extern_func1_12 \
- extern_func1_13 extern_func1_14 extern_func1_15 extern_func1_2 \
- extern_func1_3 extern_func1_4 extern_func1_5 extern_func1_6 \
- extern_func1_7 extern_func1_8 extern_func1_9 func_1 \
- func_10 func_11 func_12 func_13 \
- func_14 func_15 func_2 func_3 \
- func_4 func_5 func_6 func_7 \
- func_8 func_9 main static_func_1 \
- static_func_10 static_func_11 static_func_12 static_func_13 \
- static_func_14 static_func_15 static_func_2 static_func_3 \
- static_func_4 static_func_5 static_func_6 static_func_7 \
- static_func_8 static_func_9} {
- if {[lsearch $m $f] != -1} {
- incr r
- }
- }
-
- set r
-} {46}
-
-# Test: browser-3.2
-# Desc: Check all functions in stack1.c
-gdbtk_test browser-3.2 {all functions in stack1.c} {
- set_regexp ""
- set_search_mode "contains"
- clear
- select stack1.c
- set m [do_search]
-
- set r 0
- foreach f {func_1 func_10 func_11 func_12 \
- func_13 func_14 func_15 func_2 \
- func_3 func_4 func_5 func_6 \
- func_7 func_8 func_9 main \
- static_func_1 static_func_10 static_func_11 static_func_12 \
- static_func_13 static_func_14 static_func_15 static_func_2 \
- static_func_3 static_func_4 static_func_5 static_func_6 \
- static_func_7 static_func_8 static_func_9} {
- if {[lsearch $m $f] != -1} {
- incr r
- }
- }
-
- set r
-} {31}
-
-if {$test_ran} {
- clear
-}
-
-# Test: browser-3.3
-# Desc: Check all functions in stack2.c
-gdbtk_test browser-3.3 {all functions in stack2.c} {
- set_regexp ""
- set_search_mode "contains"
- clear
- select stack2.c
- set m [do_search]
-
- set r 0
- foreach f {extern_func1_1 extern_func1_10 extern_func1_11 \
- extern_func1_12 extern_func1_13 extern_func1_14 extern_func1_15 \
- extern_func1_2 extern_func1_3 extern_func1_4 extern_func1_5 \
- extern_func1_6 extern_func1_7 extern_func1_8 extern_func1_9} {
- if {[lsearch $m $f] != -1} {
- incr r
- }
- }
-
- set r
-} {15}
-if {$test_ran} {
- clear
-}
-
-# Test: browser-3.4
-# Desc: Check for all functions matching "func" - mode contains
-gdbtk_test browser-3.4 {all functions matching "func_1" - "mode contains"} {
- set_search_mode "contains"
- set_regexp "func_1"
- select_all
- do_search
-} {func_1 func_10 func_11 func_12 func_13 func_14 func_15 static_func_1 static_func_10 static_func_11 static_func_12 static_func_13 static_func_14 static_func_15}
-
-# Test: browser-3.5
-# Desc: Check all functions matching "func_1" in stack1.c - mode contains
-gdbtk_test browser-3.5 {all functions matching "func_1" in stack1.c - "mode contains"} {
- set_search_mode "contains"
- set_regexp "func_1"
- clear
- select stack1.c
- do_search
-} {func_1 func_10 func_11 func_12 func_13 func_14 func_15 static_func_1 static_func_10 static_func_11 static_func_12 static_func_13 static_func_14 static_func_15}
-
-# Test: browser-3.6
-# Desc: Check all functions matching "func_1" in stack2.c - mode contains
-gdbtk_test browser-3.6 {all functions matching "func" in stack2.c - mode "contains"} {
- set_search_mode "contains"
- set_regexp func_1
- clear
- select stack2.c
- do_search
-} {}
-
-# Test: browser-3.7
-# Desc: Check all functions matching "foobar"
-gdbtk_test browser-3.7 {all functions matching "foobar"} {
- set_search_mode "contains"
- select_all
- set_regexp foobar
- do_search
-} {}
-
-# Test: browser-3.8
-# Desc: Check all functions matching "foobar" in stack1.c
-gdbtk_test browser-3.8 {functions matching "foobar" in stack1.c} {
- set_search_mode "contains"
- set_regexp foobar
- clear
- select stack1.c
- do_search
-} {}
-
-# Tests 4.* test "ends with" search mode.
-# Test: browser-4.1
-# Desc: Check all files/all funcs
-gdbtk_test browser-4.1 {all files/all funcs} {
- set_search_mode "ends with"
- set_regexp ""
- select_all
- set m [do_search]
- set r 0
- foreach f {extern_func1_1 extern_func1_10 extern_func1_11 extern_func1_12 \
- extern_func1_13 extern_func1_14 extern_func1_15 extern_func1_2 \
- extern_func1_3 extern_func1_4 extern_func1_5 extern_func1_6 \
- extern_func1_7 extern_func1_8 extern_func1_9 func_1 \
- func_10 func_11 func_12 func_13 \
- func_14 func_15 func_2 func_3 \
- func_4 func_5 func_6 func_7 \
- func_8 func_9 main static_func_1 \
- static_func_10 static_func_11 static_func_12 static_func_13 \
- static_func_14 static_func_15 static_func_2 static_func_3 \
- static_func_4 static_func_5 static_func_6 static_func_7 \
- static_func_8 static_func_9} {
- if {[lsearch $m $f] > -1} {
- incr r
- }
- }
-
- set r
-} {46}
-
-# Test: browser-4.2
-# Desc: Check all functions in stack1.c
-gdbtk_test browser-4.2 {all functions in stack1.c} {
- set_regexp ""
- set_search_mode "ends with"
- clear
- select stack1.c
- set m [do_search]
-
- set r 0
- foreach f {func_1 func_10 func_11 func_12 \
- func_13 func_14 func_15 func_2 \
- func_3 func_4 func_5 func_6 \
- func_7 func_8 func_9 main \
- static_func_1 static_func_10 static_func_11 static_func_12 \
- static_func_13 static_func_14 static_func_15 static_func_2 \
- static_func_3 static_func_4 static_func_5 static_func_6 \
- static_func_7 static_func_8 static_func_9} {
- if {[lsearch $m $f] != -1} {
- incr r
- }
- }
-
- set r
-} {31}
-
-if {$test_ran} {
- clear
-}
-
-# Test: browser-4.3
-# Desc: Check all functions in stack2.c
-gdbtk_test browser-4.3 {all functions in stack2.c} {
- set_regexp ""
- set_search_mode "ends with"
- clear
- select stack2.c
- set m [do_search]
-
- set r 0
- foreach f {extern_func1_1 extern_func1_10 extern_func1_11 \
- extern_func1_12 extern_func1_13 extern_func1_14 extern_func1_15 \
- extern_func1_2 extern_func1_3 extern_func1_4 extern_func1_5 \
- extern_func1_6 extern_func1_7 extern_func1_8 extern_func1_9} {
- if {[lsearch $m $f] != -1} {
- incr r
- }
- }
-
- set r
-} {15}
-if {$test_ran} {
- clear
-}
-
-# Test: browser-4.4
-# Desc: Check for all functions matching "func_1" - mode ends with
-gdbtk_test browser-4.4 {all functions matching "func_1" - "mode ends with"} {
- set_search_mode "ends with"
- set_regexp "func_1"
- select_all
- do_search
-} {func_1 static_func_1}
-
-# Test: browser-4.5
-# Desc: Check all functions matching "func_1" in stack1.c - mode ends with
-gdbtk_test browser-4.5 {all functions matching "func_1" in stack1.c - "mode ends with"} {
- set_search_mode "ends with"
- set_regexp "func_1"
- clear
- select stack1.c
- do_search
-} {func_1 static_func_1}
-if {$test_ran} {
- clear
-}
-
-# Test: browser-4.6
-# Desc: Check all functions matching "func_1" in stack2.c - mode ends with
-gdbtk_test browser-4.6 {all functions matching "func" in stack2.c - mode "ends with"} {
- set_search_mode "ends with"
- set_regexp func_1
- clear
- select stack2.c
- do_search
-} {}
-
-# Test: browser-4.7
-# Desc: Check all functions matching "foobar"
-gdbtk_test browser-4.7 {all functions matching "foobar"} {
- set_search_mode "ends with"
- select_all
- set_regexp foobar
- do_search
-} {}
-
-# Test: browser-4.8
-# Desc: Check all functions matching "foobar" in stack1.c
-gdbtk_test browser-4.8 {functions matching "foobar" in stack1.c} {
- set_search_mode "ends with"
- set_regexp foobar
- clear
- select stack1.c
- do_search
-} {}
-if {$test_ran} {
- clear
-}
-
-# Test: browser-5.10
-# Desc: Check all functions matching regexp "func"
-gdbtk_test browser-5.10 {all functions matching regexp "func"} {
- set_search_mode "matches regexp"
- set_regexp func
- select_all
- do_search
-} {extern_func1_1 extern_func1_10 extern_func1_11 extern_func1_12 extern_func1_13 extern_func1_14 extern_func1_15 extern_func1_2 extern_func1_3 extern_func1_4 extern_func1_5 extern_func1_6 extern_func1_7 extern_func1_8 extern_func1_9 func_1 func_10 func_11 func_12 func_13 func_14 func_15 func_2 func_3 func_4 func_5 func_6 func_7 func_8 func_9 static_func_1 static_func_10 static_func_11 static_func_12 static_func_13 static_func_14 static_func_15 static_func_2 static_func_3 static_func_4 static_func_5 static_func_6 static_func_7 static_func_8 static_func_9}
-
-# Test: browser-5.11
-# Desc: Check all functions matching regexp "func" in stack1.c
-gdbtk_test browser-5.11 {all functions matching regexp "func" in stack1.c} {
- set_search_mode "matches regexp"
- set_regexp func
- clear
- select stack1.c
- do_search
-} {func_1 func_10 func_11 func_12 func_13 func_14 func_15 func_2 func_3 func_4 func_5 func_6 func_7 func_8 func_9 static_func_1 static_func_10 static_func_11 static_func_12 static_func_13 static_func_14 static_func_15 static_func_2 static_func_3 static_func_4 static_func_5 static_func_6 static_func_7 static_func_8 static_func_9}
-
-# Test: browser-5.12
-# Desc: Check all functions matching regexp "func" in stack2.c
-gdbtk_test browser-5.12 {all functions matching regexp "func" in stack2.c} {
- set_regexp func
- clear
- select stack2.c
- do_search
-} {extern_func1_1 extern_func1_10 extern_func1_11 extern_func1_12 extern_func1_13 extern_func1_14 extern_func1_15 extern_func1_2 extern_func1_3 extern_func1_4 extern_func1_5 extern_func1_6 extern_func1_7 extern_func1_8 extern_func1_9}
-
-# Test: browser-5.13
-# Desc: Check all functions matching regexp "\_1$"
-gdbtk_test browser-5.13 {all functions matching regexp "\_1$"} {
- set_search_mode "matches regexp"
- set_regexp {\_1$}
- select_all
- do_search
-} {extern_func1_1 func_1 static_func_1}
-
-# Test: browser-5.14
-# Desc: Check all functions matching regexp "\_1$" in stack1.c
-gdbtk_test browser-5.14 {all functions matching regexp "\_1$" in stack1.c} {
- set_search_mode "matches regexp"
- set_regexp {\_1$}
- clear
- select stack1.c
- do_search
-} {func_1 static_func_1}
-
-# Test: browser-5.15
-# Desc: Check all functions matching regexp "\_1$" in stack2.c
-gdbtk_test browser-5.15 {all functions matching regexp "\_1$" in stack2.c} {
- set_search_mode "matches regexp"
- set_regexp {\_1$}
- clear
- select stack2.c
- do_search
-} {extern_func1_1}
-
-# Test: browser-5.16
-# Desc: Check all functions matching regexp "foobar"
-gdbtk_test browser-5.16 {all functions matching regexp "foobar"} {
- set_search_mode "matches regexp"
- set_regexp foobar
- select_all
- do_search
-} {}
-
-# Test: browser-5.17
-# Desc: Check all functions matching regexp "foobar" in stack1.c
-gdbtk_test browser-5.17 {all functions matching regexp "foobar" in stack1.c} {
- set_search_mode "matches regexp"
- set_regexp foobar
- clear
- select stack1.c
- do_search
-} {}
-
-
-# Test: browser-6.1
-# Desc: Check select button function
-gdbtk_test browser-6.1 {select button - select all} {
- clear
- select_all
- set m [$browser component file_box curselection]
-
- expr {[llength $m] >= 2}
-} {1}
-
-# Test: browser-6.2
-# Desc: Check that search expressions are saved
-gdbtk_test browser-6.2 {save last search expression} {
- set_regexp hello
- select_all
- do_search
- pref get gdb/search/last_symbol
-} {hello}
-
-# Test: browser-7.1
-# Desc: Toggle all bps on
-gdbtk_test browser-7.1 {toggle_all_bp on} {
- set_regexp {\_1$}
- set_search_mode "matches regexp"
- select_all
- set funcs [do_search]
-
- # select all to set bp on
- $browser component func_box selection set 0 end
- $browser component func_add_bp invoke
-
- set bps {}
- foreach f $funcs {
- if {![catch {gdb_loc $f} ls]} {
- if {[bp_exists $ls] != -1} {
- lappend bps $f
- }
- }
- }
-
- catch {gdb_cmd "delete" 0}
- join [lsort $bps]
-} {extern_func1_1 func_1 static_func_1}
-
-# Test: browser-7.2
-# Desc: Toggle some bps off
-gdbtk_test browser-7.2 {toggle_some_bp off} {
- set_regexp {\_1$}
- set_search_mode "matches regexp"
- select_all
- set funcs [do_search]
-
- $browser component func_box selection set 0 end
- $browser component func_add_bp invoke
-
- # Turn off all the "static_func_*" bps
- set_regexp {^static.*_1$}
- do_search
- $browser component func_box selection set 0 end
- $browser component func_remove_bp invoke
- set bps {}
- foreach f $funcs {
- if {![catch {gdb_loc $f} ls]} {
- if {[bp_exists $ls] != -1} {
- lappend bps $f
- }
- }
- }
-
- catch {gdb_cmd "delete" 0}
-
- join [lsort $bps]
-} {extern_func1_1 func_1}
-
-#
-# Exit
-#
-gdbtk_test_done
diff --git a/gdb/testsuite/gdb.gdbtk/c_variable.c b/gdb/testsuite/gdb.gdbtk/c_variable.c
deleted file mode 100644
index 461d5cee2fa..00000000000
--- a/gdb/testsuite/gdb.gdbtk/c_variable.c
+++ /dev/null
@@ -1,296 +0,0 @@
-struct _simple_struct {
- int integer;
- unsigned int unsigned_integer;
- char character;
- signed char signed_character;
- char *char_ptr;
- int array_of_10[10];
-};
-
-typedef struct _simple_struct simpleton;
-
-simpleton global_simple;
-
-enum foo {
- bar = 1,
- baz
-};
-
-typedef enum foo efoo;
-
-union named_union
-{
- int integer;
- char *char_ptr;
-};
-
-typedef struct _struct_decl {
- int integer;
- char character;
- char *char_ptr;
- long long_int;
- int **int_ptr_ptr;
- long long_array[10];
-
- void (*func_ptr) (void);
- struct _struct_decl (*func_ptr_struct) (int, char *, long);
- struct _struct_decl *(*func_ptr_ptr) (int, char *, long);
- union {
- int a;
- char *b;
- long c;
- enum foo d;
- } u1;
-
- struct {
- union {
- struct {
- int d;
- char e[10];
- int *(*func) (void);
- efoo foo;
- } u1s1;
-
- long f;
- struct {
- char array_ptr[2];
- int (*func) (int, char *);
- } u1s2;
- } u2;
-
- int g;
- char h;
- long i[10];
- } s2;
-} weird_struct;
-
-struct _struct_n_pointer {
- char ****char_ptr;
- long ****long_ptr;
- struct _struct_n_pointer *ptrs[3];
- struct _struct_n_pointer *next;
-};
-
-void do_locals_tests (void);
-void do_block_tests (void);
-void subroutine1 (int, long *);
-void nothing (void);
-void do_children_tests (void);
-void do_special_tests (void);
-void incr_a (int);
-
-void incr_a (int a)
-{
- int b;
- b = a;
-}
-
-void
-do_locals_tests ()
-{
- int linteger;
- int *lpinteger;
- char lcharacter;
- char *lpcharacter;
- long llong;
- long *lplong;
- float lfloat;
- float *lpfloat;
- double ldouble;
- double *lpdouble;
- struct _simple_struct lsimple;
- struct _simple_struct *lpsimple;
- void (*func) (void);
-
- /* Simple assignments */
- linteger = 1234;
- lpinteger = &linteger;
- lcharacter = 'a';
- lpcharacter = &lcharacter;
- llong = 2121L;
- lplong = &llong;
- lfloat = 2.1;
- lpfloat = &lfloat;
- ldouble = 2.718281828459045;
- lpdouble = &ldouble;
- lsimple.integer = 1234;
- lsimple.unsigned_integer = 255;
- lsimple.character = 'a';
- lsimple.signed_character = 21;
- lsimple.char_ptr = &lcharacter;
- lpsimple = &lsimple;
- func = nothing;
-
- /* Check pointers */
- linteger = 4321;
- lcharacter = 'b';
- llong = 1212L;
- lfloat = 1.2;
- ldouble = 5.498548281828172;
- lsimple.integer = 255;
- lsimple.unsigned_integer = 4321;
- lsimple.character = 'b';
- lsimple.signed_character = 0;
-
- subroutine1 (linteger, &llong);
-}
-
-void
-nothing ()
-{
-}
-
-void
-subroutine1 (int i, long *l)
-{
- global_simple.integer = i + 3;
- i = 212;
- *l = 12;
-}
-
-void
-do_block_tests ()
-{
- int cb = 12;
-
- {
- int foo;
- foo = 123;
- {
- int foo2;
- foo2 = 123;
- {
- int foo;
- foo = 321;
- }
- foo2 = 0;
- }
- foo = 0;
- }
-
- cb = 21;
-}
-
-void
-do_children_tests (void)
-{
- weird_struct *weird;
- struct _struct_n_pointer *psnp;
- struct _struct_n_pointer snp0, snp1, snp2;
- char a0, *a1, **a2, ***a3;
- char b0, *b1, **b2, ***b3;
- char c0, *c1, **c2, ***c3;
- long z0, *z1, **z2, ***z3;
- long y0, *y1, **y2, ***y3;
- long x0, *x1, **x2, ***x3;
- int *foo;
- int bar;
-
- struct _struct_decl struct_declarations;
- weird = &struct_declarations;
-
- struct_declarations.integer = 123;
- weird->char_ptr = "hello";
- bar = 2121;
- foo = &bar;
- struct_declarations.int_ptr_ptr = &foo;
- weird->long_array[0] = 1234;
- struct_declarations.long_array[1] = 2345;
- weird->long_array[2] = 3456;
- struct_declarations.long_array[3] = 4567;
- weird->long_array[4] = 5678;
- struct_declarations.long_array[5] = 6789;
- weird->long_array[6] = 7890;
- struct_declarations.long_array[7] = 8901;
- weird->long_array[8] = 9012;
- struct_declarations.long_array[9] = 1234;
-
- weird->func_ptr = nothing;
-
- /* Struct/pointer/array tests */
- a0 = '0';
- a1 = &a0;
- a2 = &a1;
- a3 = &a2;
- b0 = '1';
- b1 = &b0;
- b2 = &b1;
- b3 = &b2;
- c0 = '2';
- c1 = &c0;
- c2 = &c1;
- c3 = &c2;
- z0 = 0xdead + 0;
- z1 = &z0;
- z2 = &z1;
- z3 = &z2;
- y0 = 0xdead + 1;
- y1 = &y0;
- y2 = &y1;
- y3 = &y2;
- x0 = 0xdead + 2;
- x1 = &x0;
- x2 = &x1;
- x3 = &x2;
- snp0.char_ptr = &a3;
- snp0.long_ptr = &z3;
- snp0.ptrs[0] = &snp0;
- snp0.ptrs[1] = &snp1;
- snp0.ptrs[2] = &snp2;
- snp0.next = &snp1;
- snp1.char_ptr = &b3;
- snp1.long_ptr = &y3;
- snp1.ptrs[0] = &snp0;
- snp1.ptrs[1] = &snp1;
- snp1.ptrs[2] = &snp2;
- snp1.next = &snp2;
- snp2.char_ptr = &c3;
- snp2.long_ptr = &x3;
- snp2.ptrs[0] = &snp0;
- snp2.ptrs[1] = &snp1;
- snp2.ptrs[2] = &snp2;
- snp2.next = 0x0;
- psnp = &snp0;
- snp0.char_ptr = &b3;
- snp1.char_ptr = &c3;
- snp2.char_ptr = &a3;
- snp0.long_ptr = &y3;
- snp1.long_ptr = &x3;
- snp2.long_ptr = &z3;
-}
-
-void
-do_special_tests (void)
-{
- union named_union u;
- union {
- int a;
- char b;
- long c;
- } anonu;
- struct _simple_struct s;
- struct {
- int a;
- char b;
- long c;
- } anons;
- enum foo e;
- enum { A, B, C } anone;
- int array[21];
- int a;
-
- a = 1;
- incr_a(2);
-}
-
-int
-main (int argc, char *argv [])
-{
- do_locals_tests ();
- do_block_tests ();
- do_children_tests ();
- do_special_tests ();
- exit (0);
-}
-
-
diff --git a/gdb/testsuite/gdb.gdbtk/c_variable.exp b/gdb/testsuite/gdb.gdbtk/c_variable.exp
deleted file mode 100644
index 0fcd652e2be..00000000000
--- a/gdb/testsuite/gdb.gdbtk/c_variable.exp
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 1999, 2001, 2004 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-load_lib ../gdb.gdbtk/insight-support.exp
-
-if {[gdbtk_initialize_display]} {
- if {$tracelevel} {
- strace $tracelevel
- }
-
- #
- # test variable API
- #
- set prms_id 0
- set bug_id 0
-
- set testfile "c_variable"
- set srcfile ${testfile}.c
- set binfile ${objdir}/${subdir}/${testfile}
- set r [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}]
- if { $r != "" } {
- gdb_suppress_entire_file \
- "Testcase compile failed, so some tests in this file will automatically fail."
- }
-
- # Start with a fresh gdbtk
- gdb_exit
- set results [gdbtk_start [file join $srcdir $subdir ${testfile}.test]]
- set results [split $results \n]
-
- # Analyze results
- gdbtk_done $results
-}
diff --git a/gdb/testsuite/gdb.gdbtk/c_variable.test b/gdb/testsuite/gdb.gdbtk/c_variable.test
deleted file mode 100644
index 625ac7c017d..00000000000
--- a/gdb/testsuite/gdb.gdbtk/c_variable.test
+++ /dev/null
@@ -1,2071 +0,0 @@
-# Varobj Tests (C language)
-# Copyright 1998, 2001, 2003 Red Hat, Inc.
-#
-# This Program Is Free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# insight@sources.redhat.com
-
-# This file was written by Keith Seitz (keiths@cygnus.com)
-
-# Read in the standard defs file
-if {![gdbtk_read_defs]} {
- break
-}
-
-global objdir test_ran
-
-# Load in a file
-set program [file join $objdir c_variable]
-if {[catch {gdbtk_test_file $program} t]} {
- # This isn't a test case, since if this fails, we're hosed.
- gdbtk_test_error "loading \"$program\": $t"
-}
-
-# The variables that are created are stored in an array called "var".
-
-# proc to tell us which of the variables are changed/out of scope
-proc check_update {} {
- global var
-
- set out {}
- set changed {}
- foreach ind [array names var] {
- set ret [$var($ind) update]
- if {$ret == -1} {
- lappend out $ind
- } elseif {$ret != ""} {
- lappend changed $ret
- }
- }
- return [list $changed $out]
-}
-
-# proc to create a variable
-proc create_variable {expr} {
- global var
-
- set err [catch {gdb_variable create "$expr" -expr $expr} v]
- if {!$err} {
- set var($expr) $v
- }
-
- return $err
-}
-
-# proc to get the children
-# Children are stored in the global "var" as
-# PARENT.child. So for struct _foo {int a; int b} bar;,
-# the children returned are {a b} and var(bar.a) and var(bar.b)
-# map the actual objects to their names.
-proc get_children {parent} {
- global var
-
- set kiddies [$var($parent) children]
- set children {}
- foreach child $kiddies {
- set name [lindex [split $child .] end]
- lappend children $name
- set var($parent.$name) $child
- }
-
- return $children
-}
-
-proc delete_variable {varname} {
- global var
-
- if {[info exists var($varname)]} {
- # This has to be caught, since deleting a parent
- # will erase all children.
- $var($varname) delete
- set vars [array names var $varname*]
- foreach v $vars {
- if {[info exists var($v)]} {
- unset var($v)
- }
- }
- }
-}
-
-# Compare the values of variable V in format FMT
-# with gdb's value.
-proc value {v fmt} {
- global var
- global _test
-
- set value [$var($v) value]
- set gdb [gdb_cmd "output/$fmt $v"]
- if {$value == $gdb} {
- set result ok
- } else {
- set result $v
- puts $_test(logfile) "output/$fmt $v"
- puts $_test(logfile) "gdbtk: $value <> gdb: $gdb"
- }
-
- return $result
-}
-
-proc delete_all_variables {} {
- global var
-
- foreach variable [array names var] {
- delete_variable $variable
- }
-}
-
-proc editable_variables {} {
- global var
-
- set yes {}
- set no {}
- foreach name [array names var] {
- if {[$var($name) editable]} {
- lappend yes $name
- } else {
- lappend no $name
- }
- }
-
- return [list $yes $no]
-}
-
-
-##### #####
-# #
-# Variable Creation tests #
-# #
-##### #####
-
-# Test: c_variable-1.1
-# Desc: Create global variable
-gdbtk_test c_variable-1.1 {create global variable} {
- create_variable global_simple
-} {0}
-
-# Test: c_variable-1.2
-# Desc: Create non-existent variable
-gdbtk_test c_variable-1.2 {create non-existent variable} {
- create_variable bogus_unknown_variable
-} {1}
-
-# Test: c_variable-1.3
-# Desc: Create out of scope variable
-gdbtk_test c_variable-1.3 {create out of scope variable} {
- create_variable argc
-} {1}
-
-# Break in main and run
-gdb_cmd "break do_locals_tests"
-gdbtk_test_run
-
-# Test: c_variable-1.4
-# Desc: create local variables
-gdbtk_test c_variable-1.4 {create local variables} {
- set results {}
- foreach v {linteger lpinteger lcharacter lpcharacter llong lplong lfloat lpfloat ldouble lpdouble lsimple lpsimple func} {
- lappend results [create_variable $v]
- }
- set results
-} {0 0 0 0 0 0 0 0 0 0 0 0 0}
-
-# Test: c_variable-1.5
-# Desc: create lsimple.character
-gdbtk_test c_variable-1.5 {create lsimple.character} {
- create_variable lsimple.character
-} {0}
-
-# Test: c_variable-1.6
-# Desc: create lpsimple->integer
-gdbtk_test c_variable-1.6 {create lpsimple->integer} {
- create_variable lpsimple->integer
-} {0}
-
-# Test: c_variable-1.7
-# Desc: create lsimple.integer
-gdbtk_test c_variable-1.7 {create lsimple.integer} {
- create_variable lsimple.integer
-} {0}
-
-# Test: c_variable-1.8
-# Desc: names of editable variables
-gdbtk_test c_variable-1.8 {names of editable variables} {
- editable_variables
-} {{lsimple.character lsimple.integer lpsimple lcharacter lpcharacter linteger lpinteger lfloat lpfloat func llong lplong lpsimple->integer ldouble lpdouble} {lsimple global_simple}}
-
-# Test: c_variable-1.9
-# Desc: create type name
-# Type names (like int, long, etc..) are all proper expressions to gdb.
-# make sure variable code does not allow users to create variables, though.
-gdbtk_test c_variable-1.9 {create type name} {
- create_variable int
-} {1}
-
-##### #####
-# #
-# Value changed tests #
-# #
-##### #####
-
-# Test: c_variable-2.1
-# Desc: check whether values changed at do_block_tests
-gdbtk_test c_variable-2.1 {check whether values changed at do_block_tests} {
- check_update
-} {{} {}}
-
-# Step over "linteger = 1234;"
-gdb_cmd "step"
-
-# Test: c_variable-2.2
-# Desc: check whether only linteger changed values
-gdbtk_test c_variable-2.2 {check whether only linteger changed values} {
- check_update
-} {linteger {}}
-
-# Step over "lpinteger = &linteger;"
-gdb_cmd "step"
-
-# Test: c_variable-2.3
-# Desc: check whether only lpinteger changed
-gdbtk_test c_variable-2.3 {check whether only lpinteger changed} {
- check_update
-} {lpinteger {}}
-
-# Step over "lcharacter = 'a';"
-gdb_cmd "step"
-
-# Test: c_variable-2.4
-# Desc: check whether only lcharacter changed
-gdbtk_test c_variable-2.4 {check whether only lcharacter changed} {
- check_update
-} {lcharacter {}}
-
-# Step over "lpcharacter = &lcharacter;"
-gdb_cmd "step"
-
-# Test: c_variable-2.5
-# Desc: check whether only lpcharacter changed
-gdbtk_test c_variable-2.5 {check whether only lpcharacter changed} {
- check_update
-} {lpcharacter {}}
-
-# Step over:
-# llong = 2121L;
-# lplong = &llong;
-# lfloat = 2.1;
-# lpfloat = &lfloat;
-# ldouble = 2.718281828459045;
-# lpdouble = &ldouble;
-# lsimple.integer = 1234;
-# lsimple.unsigned_integer = 255;
-# lsimple.character = 'a';
-for {set i 0} {$i < 9} {incr i} {
- gdb_cmd "step"
-}
-
-# Test: c_variable-2.6
-# Desc: check whether llong, lplong, lfloat, lpfloat, ldouble, lpdouble, lsimple.integer,
-# lsimple.unsigned_character lsimple.integer lsimple.character changed
-gdbtk_test c_variable-2.6 {check whether llong -- lsimple.character changed} {
- check_update
-} {{lsimple.character lsimple.integer lfloat lpfloat llong lplong ldouble lpdouble} {}}
-
-# Step over:
-# lsimple.signed_character = 21;
-# lsimple.char_ptr = &lcharacter;
-# lpsimple = &lsimple;
-# func = nothing;
-for {set i 0} {$i < 4} {incr i} {
- gdb_cmd "step"
-}
-
-# Test: c_variable-2.7
-# Desc: check whether lsimple.signed_character, lsimple.char_ptr, lpsimple, func changed
-gdbtk_test c_variable-2.7 {check whether lsimple.signed_character, lsimple.char_ptr, lpsimple, func changed} {
- check_update
-} {{lpsimple func lpsimple->integer} {}}
-
-# Step over
-# linteger = 4321;
-# lcharacter = 'b';
-# llong = 1212L;
-# lfloat = 1.2;
-# ldouble = 5.498548281828172;
-# lsimple.integer = 255;
-# lsimple.unsigned_integer = 4321;
-# lsimple.character = 'b';
-for {set i 0} {$i < 8} {incr i} {
- gdb_cmd "step"
-}
-
-# Test: c_variable-2.8
-# Desc: check whether linteger, lcharacter, llong, lfoat, ldouble, lsimple.integer,
-# lpsimple.integer lsimple.character changed
-# Note: this test also checks that lpsimple->integer and lsimple.integer have
-# changed (they are the same)
-gdbtk_test c_variable-2.8 {check whether linteger -- lsimple.integer changed} {
- check_update
-} {{lsimple.character lsimple.integer lcharacter linteger lfloat llong lpsimple->integer ldouble} {}}
-
-gdb_cmd "break subroutine1"
-gdb_cmd "continue"
-
-# Test: c_variable-2.9
-# Desc: stop in subroutine1
-gdbtk_test c_variable-2.9 {stop in subroutine1} {
- lindex [gdb_loc] 1
-} {subroutine1}
-
-# Test: c_variable-2.10
-# Desc: create variable for locals i,l in subroutine1
-gdbtk_test c_variable-2.10 {create variable for locals i,l in subroutine1} {
- set r [create_variable i]
- lappend r [create_variable l]
-} {0 0}
-
-# Test: c_variable-2.11
-# Desc: create do_locals_tests local in subroutine1
-gdbtk_test c_variable-2.11 {create do_locals_tests local in subroutine1} {
- create_variable linteger
-} {1}
-
-# Step over
-# global_simple.integer = i + 3;
-gdb_cmd "step"
-
-# Test: c_variable-2.12
-# Desc: change global_simple.integer
-# Note: This also tests whether we are reporting changes in structs properly.
-# gdb normally would say that global_simple has changed, but we
-# special case that, since it is not what a human expects to see.
-gdbtk_test c_variable-2.12 {change global_simple.integer} {
- check_update
-} {{} {lsimple.character lsimple.integer lpsimple lsimple lcharacter lpcharacter linteger lpinteger lfloat lpfloat func llong lplong lpsimple->integer ldouble lpdouble}}
-
-# Step over
-# i = 212;
-gdb_cmd "step"
-
-# Test: c_variable-2.13
-# Desc: change subroutine1 local i
-gdbtk_test c_variable-2.13 {change subroutine1 local i} {
- check_update
-} {i {lsimple.character lsimple.integer lpsimple lsimple lcharacter lpcharacter linteger lpinteger lfloat lpfloat func llong lplong lpsimple->integer ldouble lpdouble}}
-
-# Step over
-# *l = 12
-gdb_cmd "step"
-
-# This test is no longer valid, since varobj now forces
-# re-evaluation in the current frame by default.
-# Test: c_variable-2.14
-# Desc: change do_locals_tests local llong
-#gdbtk_test c_variable-2.14 {change do_locals_tests local llong} {
-# check_update
-#} {llong {}}
-
-# Leave subroutine1
-gdb_cmd "next"
-
-# Test: c_variable-2.15
-# Desc: check for out of scope subroutine1 locals
-gdbtk_test c_variable-2.15 {check for out of scope subroutine1 locals} {
- lindex [check_update] 1
-} {i l}
-
-# Test: c_variable-2.16
-# Desc: names of all editable variables
-gdbtk_test c_variable-2.16 {names of all editable variables} {
- editable_variables
-} {{lsimple.character lsimple.integer lpsimple i lcharacter lpcharacter linteger lpinteger lfloat lpfloat l func llong lplong lpsimple->integer ldouble lpdouble} {lsimple global_simple}}
-
-# Done with locals/globals tests. Erase all variables
-delete_all_variables
-
-##### #####
-# #
-# Block tests #
-# #
-##### #####
-gdb_cmd "break do_block_tests"
-gdb_cmd "continue"
-
-# Test: c_variable-3.1
-# Desc: stop in do_block_tests
-gdbtk_test c_variable-3.1 {stop in do_block_tests} {
- lindex [gdb_loc] 1
-} {do_block_tests}
-
-# Test: c_variable-3.2
-# Desc: create cb and foo
-gdbtk_test c_variable-3.2 {create cb and foo} {
- set r [create_variable cb]
- lappend r [create_variable foo]
-} {0 1}
-
-# step to "foo = 123;"
-gdb_cmd "step"
-
-# Be paranoid and assume 3.2 created foo
-delete_variable foo
-
-# Test: c_variable-3.3
-# Desc: create foo
-gdbtk_test c_variable-3.3 {create foo} {
- create_variable foo
-} {0}
-
-# step to "foo2 = 123;"
-gdb_cmd "step"
-
-# Test: c_variable-3.4
-# Desc: check foo, cb changed
-gdbtk_test c_variable-3.4 {check foo,cb changed} {
- check_update
-} {{foo cb} {}}
-
-# step to "foo = 321;"
-gdb_cmd "step"
-
-# Test: c_variable-3.5
-# Desc: create inner block foo
-gdbtk_test c_variable-3.5 {create inner block foo} {
- global var
- set err [catch {gdb_variable create inner_foo -expr foo} v]
- if {!$err} {
- set var(inner_foo) $v
- }
-
- set err
-} {0}
-
-# step to "foo2 = 0;"
-gdb_cmd "step"
-
-# Test: c_variable-3.6
-# Desc: create foo2
-gdbtk_test c_variable-3.6 {create foo2} {
- create_variable foo2
-} {0}
-
-# Test: c_variable-3.7
-# Desc: check that outer foo in scope and inner foo out of scope
-
-# Disabled for now because varobjs don't work this way. If you create a varobj named "foo"
-# it will display the correct value for any variable named "foo" in scope. So inner_foo
-# is not out of scope because there is another variable named "foo" in scope. It is
-# instead marked as changed.
-
-#gdbtk_test *c_variable-3.7 {check that outer foo in scope and inner foo out of scope} {
-# check_update
-#} {{} inner_foo}
-
-delete_variable inner_foo
-
-# step to "foo = 0;"
-gdb_cmd "step"
-
-# Test: c_variable-3.8
-# Desc: check that foo2 out of scope
-gdbtk_test c_variable-3.8 {check that foo2 out of scope} {
- check_update
-} {{} foo2}
-
-# step to "cb = 21;"
-gdb_cmd "step"
-
-# Test: c_variable-3.9
-# Desc: check that only cb is in scope
-gdbtk_test c_variable-3.9 {check that only cb is in scope} {
- check_update
-} {{} {foo foo2}}
-
-# Test: c_variable-3.10
-# Desc: names of editable variables
-gdbtk_test c_variable-3.10 {names of editable variables} {
- editable_variables
-} {{foo cb foo2} {}}
-
-# Done with block tests
-delete_all_variables
-
-##### #####
-# #
-# children tests #
-# #
-##### #####
-
-gdb_cmd "break do_children_tests"
-gdb_cmd "continue"
-
-# Test: c_variable-4.1
-# Desc: stopped in do_children_tests
-gdbtk_test c_variable-4.1 {stopped in do_children_tests} {
- lindex [gdb_loc] 1
-} {do_children_tests}
-
-# Test: c_variable-4.2
-# Desc: create variable "struct_declarations"
-gdbtk_test c_variable-4.2 {create variable "struct_declarations"} {
- create_variable struct_declarations
-} {0}
-
-# Test: c_variable-4.3
-# Desc: children of struct_declarations
-gdbtk_test c_variable-4.3 {children of struct_declarations} {
- get_children struct_declarations
-} {integer character char_ptr long_int int_ptr_ptr long_array func_ptr func_ptr_struct func_ptr_ptr u1 s2}
-
-# Test: c_variable-4.4
-# Desc: number of children of struct_declarations
-gdbtk_test c_variable-4.4 {number of children of struct_declarations} {
- $var(struct_declarations) numChildren
-} {11}
-
-# Test: c_variable-4.5
-# Desc: children of struct_declarations.integer
-gdbtk_test c_variable-4.5 {children of struct_declarations.integer} {
- get_children struct_declarations.integer
-} {}
-
-# Test: c_variable-4.6
-# Desc: number of children of struct_declarations.integer
-gdbtk_test c_variable-4.6 {number of children of struct_declarations.integer} {
- $var(struct_declarations.integer) numChildren
-} {0}
-
-# Test: c_variable-4.7
-# Desc: children of struct_declarations.character
-gdbtk_test c_variable-4.7 {children of struct_declarations.character} {
- get_children struct_declarations.character
-} {}
-
-# Test: c_variable-4.8
-# Desc: number of children of struct_declarations.character
-gdbtk_test c_variable-4.8 {number of children of struct_declarations.character} {
- $var(struct_declarations.character) numChildren
-} {0}
-
-# Test: c_variable-4.9
-# Desc: children of struct_declarations.char_ptr
-gdbtk_test c_variable-4.9 {children of struct_declarations.char_ptr} {
- get_children struct_declarations.char_ptr
-} {*char_ptr}
-
-# Test: c_variable-4.10
-# Desc: number of children of struct_declarations.char_ptr
-gdbtk_test c_variable-4.10 {number of children of struct_declarations.char_ptr} {
- $var(struct_declarations.char_ptr) numChildren
-} {1}
-
-# Test: c_variable-4.11
-# Desc: children of struct_declarations.long_int
-gdbtk_test c_variable-4.11 {children of struct_declarations.long_int} {
-
- get_children struct_declarations.long_int
-} {}
-
-# Test: c_variable-4.12
-# Desc: number of children of struct_declarations.long_int
-gdbtk_test c_variable-4.12 {number of children of struct_declarations.long_int} {
- $var(struct_declarations.long_int) numChildren
-} {0}
-
-# Test: c_variable-4.13
-# Desc: children of int_ptr_ptr
-gdbtk_test c_variable-4.13 {children of int_ptr_ptr} {
- get_children struct_declarations.int_ptr_ptr
-} {*int_ptr_ptr}
-
-# Test: c_variable-4.14
-# Desc: number of children of int_ptr_ptr
-gdbtk_test c_variable-4.14 {number of children of int_ptr_ptr} {
- $var(struct_declarations.int_ptr_ptr) numChildren
-} {1}
-
-# Test: c_variable-4.15
-# Desc: children of struct_declarations.long_array
-gdbtk_test c_variable-4.15 {children of struct_declarations.long_array} {
- get_children struct_declarations.long_array
-} {0 1 2 3 4 5 6 7 8 9}
-
-# Test: c_variable-4.16
-# Desc: number of children of struct_declarations.long_array
-gdbtk_test c_variable-4.16 {number of children of struct_declarations.long_array} {
- $var(struct_declarations.long_array) numChildren
-} {10}
-
-# Test: c_variable-4.17
-# Desc: children of struct_declarations.func_ptr
-gdbtk_test c_variable-4.17 {children of struct_declarations.func_ptr} {
- get_children struct_declarations.func_ptr
-} {}
-
-# Test: c_variable-4.18
-# Desc: number of children of struct_declarations.func_ptr
-gdbtk_test c_variable-4.18 {number of children of struct_declarations.func_ptr} {
- $var(struct_declarations.func_ptr) numChildren
-} {0}
-
-# Test: c_variable-4.19
-# Desc: children of struct_declarations.func_ptr_struct
-gdbtk_test c_variable-4.19 {children of struct_declarations.func_ptr_struct} {
- get_children struct_declarations.func_ptr_struct
-} {}
-
-# Test: c_variable-4.20
-# Desc: number of children of struct_declarations.func_ptr_struct
-gdbtk_test c_variable-4.20 {number of children of struct_declarations.func_ptr_struct} {
- $var(struct_declarations.func_ptr_struct) numChildren
-} {0}
-
-# Test: c_variable-4.21
-# Desc: children of struct_declarations.func_ptr_ptr
-gdbtk_test c_variable-4.21 {children of struct_declarations.func_ptr_ptr} {
- get_children struct_declarations.func_ptr_ptr
-} {}
-
-# Test: c_variable-4.22
-# Desc: number of children of struct_declarations.func_ptr_ptr
-gdbtk_test c_variable-4.22 {number of children of struct_declarations.func_ptr_ptr} {
- $var(struct_declarations.func_ptr_ptr) numChildren
-} {0}
-
-# Test: c_variable-4.23
-# Desc: children of struct_declarations.u1
-gdbtk_test c_variable-4.23 {children of struct_declarations.u1} {
- get_children struct_declarations.u1
-} {a b c d}
-
-# Test: c_variable-4.24
-# Desc: number of children of struct_declarations.u1
-gdbtk_test c_variable-4.24 {number of children of struct_declarations.u1} {
- $var(struct_declarations.u1) numChildren
-} {4}
-
-# Test: c_variable-4.25
-# Desc: children of struct_declarations.s2
-gdbtk_test c_variable-4.25 {children of struct_declarations.s2} {
- get_children struct_declarations.s2
-} {u2 g h i}
-
-# Test: c_variable-4.26
-# Desc: number of children of struct_declarations.s2
-gdbtk_test c_variable-4.26 {number of children of struct_declarations.s2} {
- $var(struct_declarations.s2) numChildren
-} {4}
-
-# Test: c_variable-4.27
-# Desc: children of struct_declarations.long_array.1
-gdbtk_test c_variable-4.27 {children of struct_declarations.long_array.1} {
- get_children struct_declarations.long_array.1
-} {}
-
-# Test: c_variable-4.28
-# Desc: number of children of struct_declarations.long_array.1
-gdbtk_test c_variable-4.28 {number of children of struct_declarations.long_array.1} {
- $var(struct_declarations.long_array.1) numChildren
-} {0}
-
-# Test: c_variable-4.29
-# Desc: children of struct_declarations.long_array.2
-gdbtk_test c_variable-4.29 {children of struct_declarations.long_array.2} {
- get_children struct_declarations.long_array.2
-} {}
-
-# Test: c_variable-4.30
-# Desc: number of children of struct_declarations.long_array.2
-gdbtk_test c_variable-4.30 {number of children of struct_declarations.long_array.2} {
- $var(struct_declarations.long_array.2) numChildren
-} {0}
-
-# Test: c_variable-4.31
-# Desc: children of struct_declarations.long_array.3
-gdbtk_test c_variable-4.31 {children of struct_declarations.long_array.3} {
- get_children struct_declarations.long_array.3
-} {}
-
-# Test: c_variable-4.32
-# Desc: number of children of struct_declarations.long_array.3
-gdbtk_test c_variable-4.32 {number of children of struct_declarations.long_array.3} {
- $var(struct_declarations.long_array.3) numChildren
-} {0}
-
-# Test: c_variable-4.33
-# Desc: children of struct_declarations.long_array.4
-gdbtk_test c_variable-4.33 {children of struct_declarations.long_array.4} {
- get_children struct_declarations.long_array.4
-} {}
-
-# Test: c_variable-4.34
-# Desc: number of children of struct_declarations.long_array.4
-gdbtk_test c_variable-4.34 {number of children of struct_declarations.long_array.4} {
- $var(struct_declarations.long_array.4) numChildren
-} {0}
-
-# Test: c_variable-4.35
-# Desc: children of struct_declarations.long_array.5
-gdbtk_test c_variable-4.35 {children of struct_declarations.long_array.5} {
- get_children struct_declarations.long_array.5
-} {}
-
-# Test: c_variable-4.36
-# Desc: number of children of struct_declarations.long_array.5
-gdbtk_test c_variable-4.36 {number of children of struct_declarations.long_array.5} {
- $var(struct_declarations.long_array.5) numChildren
-} {0}
-
-# Test: c_variable-4.37
-# Desc: children of struct_declarations.long_array.6
-gdbtk_test c_variable-4.37 {children of struct_declarations.long_array.6} {
- get_children struct_declarations.long_array.6
-} {}
-
-# Test: c_variable-4.38
-# Desc: number of children of struct_declarations.long_array.6
-gdbtk_test c_variable-4.38 {number of children of struct_declarations.long_array.6} {
- $var(struct_declarations.long_array.6) numChildren
-} {0}
-
-# Test: c_variable-4.39
-# Desc: children of struct_declarations.long_array.7
-gdbtk_test c_variable-4.39 {children of struct_declarations.long_array.7} {
- get_children struct_declarations.long_array.7
-} {}
-
-# Test: c_variable-4.40
-# Desc: number of children of struct_declarations.long_array.7
-gdbtk_test c_variable-4.40 {number of children of struct_declarations.long_array.7} {
- $var(struct_declarations.long_array.7) numChildren
-} {0}
-
-# Test: c_variable-4.41
-# Desc: children of struct_declarations.long_array.8
-gdbtk_test c_variable-4.41 {children of struct_declarations.long_array.8} {
- get_children struct_declarations.long_array.8
-} {}
-
-# Test: c_variable-4.42
-# Desc: number of children of struct_declarations.long_array.8
-gdbtk_test c_variable-4.42 {number of children of struct_declarations.long_array.8} {
- $var(struct_declarations.long_array.8) numChildren
-} {0}
-
-# Test: c_variable-4.43
-# Desc: children of struct_declarations.long_array.9
-gdbtk_test c_variable-4.43 {children of struct_declarations.long_array.9} {
- get_children struct_declarations.long_array.9
-} {}
-
-# Test: c_variable-4.44
-# Desc: number of children of struct_declarations.long_array.9
-gdbtk_test c_variable-4.44 {number of children of struct_declarations.long_array.9} {
- $var(struct_declarations.long_array.9) numChildren
-} {0}
-
-# Test: c_variable-4.45
-# Desc: children of struct_declarations.u1.a
-gdbtk_test c_variable-4.45 {children of struct_declarations.u1.a} {
- get_children struct_declarations.u1.a
-} {}
-
-# Test: c_variable-4.46
-# Desc: number of children of struct_declarations.u1.a
-gdbtk_test c_variable-4.46 {number of children of struct_declarations.u1.a} {
- $var(struct_declarations.u1.a) numChildren
-} {0}
-
-# Test: c_variable-4.47
-# Desc: children of struct_declarations.u1.b
-gdbtk_test c_variable-4.47 {children of struct_declarations.u1.b} {
- get_children struct_declarations.u1.b
-} {*b}
-
-# Test: c_variable-4.48
-# Desc: number of children of struct_declarations.u1.b
-gdbtk_test c_variable-4.48 {number of children of struct_declarations.u1.b} {
- $var(struct_declarations.u1.b) numChildren
-} {1}
-
-# Test: c_variable-4.49
-# Desc: children of struct_declarations.u1.c
-gdbtk_test c_variable-4.49 {children of struct_declarations.u1.c} {
- get_children struct_declarations.u1.c
-} {}
-
-# Test: c_variable-4.50
-# Desc: number of children of struct_declarations.u1.c
-gdbtk_test c_variable-4.50 {number of children of struct_declarations.u1.c} {
- $var(struct_declarations.u1.c) numChildren
-} {0}
-
-# Test: c_variable-4.51
-# Desc: children of struct_declarations.u1.d
-gdbtk_test c_variable-4.51 {children of struct_declarations.u1.d} {
- get_children struct_declarations.u1.d
-} {}
-
-# Test: c_variable-4.52
-# Desc: number of children of struct_declarations.u1.d
-gdbtk_test c_variable-4.52 {number of children of struct_declarations.u1.d} {
- $var(struct_declarations.u1.d) numChildren
-} {0}
-
-# Test: c_variable-4.53
-# Desc: children of struct_declarations.s2.u2
-gdbtk_test c_variable-4.53 {children of struct_declarations.s2.u2} {
- get_children struct_declarations.s2.u2
-} {u1s1 f u1s2}
-
-# Test: c_variable-4.54
-# Desc: number of children of struct_declarations.s2.u2
-gdbtk_test c_variable-4.54 {number of children of struct_declarations.s2.u2} {
- $var(struct_declarations.s2.u2) numChildren
-} {3}
-
-# Test: c_variable-4.55
-# Desc: children of struct_declarations.s2.g
-gdbtk_test c_variable-4.55 {children of struct_declarations.s2.g} {
- get_children struct_declarations.s2.g
-} {}
-
-# Test: c_variable-4.56
-# Desc: number of children of struct_declarations.s2.g
-gdbtk_test c_variable-4.56 {number of children of struct_declarations.s2.g} {
- $var(struct_declarations.s2.g) numChildren
-} {0}
-
-# Test: c_variable-4.57
-# Desc: children of struct_declarations.s2.h
-gdbtk_test c_variable-4.57 {children of struct_declarations.s2.h} {
- get_children struct_declarations.s2.h
-} {}
-
-# Test: c_variable-4.58
-# Desc: number of children of struct_declarations.s2.h
-gdbtk_test c_variable-4.58 {number of children of struct_declarations.s2.h} {
- $var(struct_declarations.s2.h) numChildren
-} {0}
-
-# Test: c_variable-4.59
-# Desc: children of struct_declarations.s2.i
-gdbtk_test c_variable-4.59 {children of struct_declarations.s2.i} {
- get_children struct_declarations.s2.i
-} {0 1 2 3 4 5 6 7 8 9}
-
-# Test: c_variable-4.60
-# Desc: number of children of struct_declarations.s2.i
-gdbtk_test c_variable-4.60 {number of children of struct_declarations.s2.i} {
- $var(struct_declarations.s2.i) numChildren
-} {10}
-
-# Test: c_variable-4.61
-# Desc: children of struct_declarations.s2.u2.u1s1
-gdbtk_test c_variable-4.61 {children of struct_declarations.s2.u2.u1s1} {
- get_children struct_declarations.s2.u2.u1s1
-} {d e func foo}
-
-# Test: c_variable-4.62
-# Desc: number of children of struct_declarations.s2.u2.u1s1
-gdbtk_test c_variable-4.62 {number of children of struct_declarations.s2.u2.u1s1} {
- $var(struct_declarations.s2.u2.u1s1) numChildren
-} {4}
-
-# Test: c_variable-4.63
-# Desc: children of struct_declarations.s2.u2.f
-gdbtk_test c_variable-4.63 {children of struct_declarations.s2.u2.f} {
- get_children struct_declarations.s2.u2.f
-} {}
-
-# Test: c_variable-4.64
-# Desc: number of children of struct_declarations.s2.u2.f
-gdbtk_test c_variable-4.64 {number of children of struct_declarations.s2.u2.f} {
- $var(struct_declarations.s2.u2.f) numChildren
-} {0}
-
-# Test: c_variable-4.65
-# Desc: children of struct_declarations.s2.u2.u1s2
-gdbtk_test c_variable-4.65 {children of struct_declarations.s2.u2.u1s2} {
- get_children struct_declarations.s2.u2.u1s2
-} {array_ptr func}
-
-# Test: c_variable-4.66
-# Desc: number of children of struct_declarations.s2.u2.u1s2
-gdbtk_test c_variable-4.66 {number of children of struct_declarations.s2.u2.u1s2} {
- $var(struct_declarations.s2.u2.u1s2) numChildren
-} {2}
-
-# Test: c_variable-4.67
-# Desc: children of struct_declarations.s2.u2.u1s1.d
-gdbtk_test c_variable-4.67 {children of struct_declarations.s2.u2.u1s1.d} {
- get_children struct_declarations.s2.u2.u1s1.d
-} {}
-
-# Test: c_variable-4.68
-# Desc: number of children of struct_declarations.s2.u2.u1s1.d
-gdbtk_test c_variable-4.68 {number of children of struct_declarations.s2.u2.u1s1.d} {
- $var(struct_declarations.s2.u2.u1s1.d) numChildren
-} {0}
-
-# Test: c_variable-4.69
-# Desc: children of struct_declarations.s2.u2.u1s1.e
-gdbtk_test c_variable-4.69 {children of struct_declarations.s2.u2.u1s1.e} {
- get_children struct_declarations.s2.u2.u1s1.e
-} {0 1 2 3 4 5 6 7 8 9}
-
-# Test: c_variable-4.70
-# Desc: number of children of struct_declarations.s2.u2.u1s1.e
-gdbtk_test c_variable-4.70 {number of children of struct_declarations.s2.u2.u1s1.e} {
- $var(struct_declarations.s2.u2.u1s1.e) numChildren
-} {10}
-
-# Test: c_variable-4.71
-# Desc: children of struct_declarations.s2.u2.u1s1.func
-gdbtk_test c_variable-4.71 {children of struct_declarations.s2.u2.u1s1.func} {
- get_children struct_declarations.s2.u2.u1s1.func
-} {}
-
-# Test: c_variable-4.72
-# Desc: number of children of struct_declarations.s2.u2.u1s1.func
-gdbtk_test c_variable-4.72 {number of children of struct_declarations.s2.u2.u1s1.func} {
- $var(struct_declarations.s2.u2.u1s1.func) numChildren
-} {0}
-
-# Test: c_variable-4.73
-# Desc: children of struct_declarations.s2.u2.u1s1.foo
-gdbtk_test c_variable-4.73 {children of struct_declarations.s2.u2.u1s1.foo} {
- get_children struct_declarations.s2.u2.u1s1.foo
-} {}
-
-# Test: c_variable-4.74
-# Desc: number of children of struct_declarations.s2.u2.u1s1.foo
-gdbtk_test c_variable-4.74 {number of children of struct_declarations.s2.u2.u1s1.foo} {
- $var(struct_declarations.s2.u2.u1s1.foo) numChildren
-} {0}
-
-# Test: c_variable-4.75
-# Desc: children of struct_declarations.s2.u2.u1s2.array_ptr
-gdbtk_test c_variable-4.75 {children of struct_declarations.s2.u2.u1s2.array_ptr} {
- get_children struct_declarations.s2.u2.u1s2.array_ptr
-} {0 1}
-
-# Test: c_variable-4.76
-# Desc: number of children of struct_declarations.s2.u2.u1s2.array_ptr
-gdbtk_test c_variable-4.76 {number of children of struct_declarations.s2.u2.u1s2.array_ptr} {
- $var(struct_declarations.s2.u2.u1s2.array_ptr) numChildren
-} {2}
-
-# Test: c_variable-4.77
-# Desc: children of struct_declarations.s2.u2.u1s2.func
-gdbtk_test c_variable-4.77 {children of struct_declarations.s2.u2.u1s2.func} {
- get_children struct_declarations.s2.u2.u1s2.func
-} {}
-
-# Test: c_variable-4.78
-# Desc: number of children of struct_declarations.s2.u2.u1s2.func
-gdbtk_test c_variable-4.78 {number of children of struct_declarations.s2.u2.u1s2.func} {
- $var(struct_declarations.s2.u2.u1s2.func) numChildren
-} {0}
-
-# Test: c_variable-4.79
-# Desc: children of struct_declarations.*int_ptr_ptr
-gdbtk_test c_variable-4.79 {children of struct_declarations.*int_ptr_ptr} {
- get_children struct_declarations.int_ptr_ptr.*int_ptr_ptr
-} {**int_ptr_ptr}
-
-# Test: c_variable-4.80
-# Desc: Number of children of struct_declarations.*int_ptr_ptr
-gdbtk_test c_variable-4.80 {Number of children of struct_declarations.*int_ptr_ptr} {
- $var(struct_declarations.int_ptr_ptr.*int_ptr_ptr) numChildren
-} {1}
-
-# Step to "struct_declarations.integer = 123;"
-gdb_cmd "step"
-
-# Test: c_variable-4.81
-# Desc: create local variable "weird"
-gdbtk_test c_variable-4.81 {create local variable "weird"} {
- create_variable weird
-} {0}
-
-# Test: c_variable-4.82
-# Desc: children of weird
-gdbtk_test c_variable-4.82 {children of weird} {
- get_children weird
-} {integer character char_ptr long_int int_ptr_ptr long_array func_ptr func_ptr_struct func_ptr_ptr u1 s2}
-
-# Test: c_variable-4.83
-# Desc: number of children of weird
-gdbtk_test c_variable-4.83 {number of children of weird} {
- $var(weird) numChildren
-} {11}
-
-# Test: c_variable-4.84
-# Desc: children of weird->long_array
-gdbtk_test c_variable-4.84 {children of weird->long_array} {
- get_children weird.long_array
-} {0 1 2 3 4 5 6 7 8 9}
-
-# Test: c_variable-4.85
-# Desc: number of children of weird->long_array
-gdbtk_test c_variable-4.85 {number of children of weird->long_array} {
- $var(weird.long_array) numChildren
-} {10}
-
-# Test: c_variable-4.86
-# Desc: children of weird->int_ptr_ptr
-gdbtk_test c_variable-4.86 {children of weird->int_ptr_ptr} {
- get_children weird.int_ptr_ptr
-} {*int_ptr_ptr}
-
-# Test: c_variable-4.87
-# Desc: number of children of weird->int_ptr_ptr
-gdbtk_test c_variable-4.87 {number of children of weird->int_ptr_ptr} {
- $var(weird.int_ptr_ptr) numChildren
-} {1}
-
-# Test: c_variable-4.88
-# Desc: children of *weird->int_ptr_ptr
-gdbtk_test c_variable-4.88 {children of *weird->int_ptr_ptr} {
- get_children weird.int_ptr_ptr.*int_ptr_ptr
-} {**int_ptr_ptr}
-
-# Test: c_variable-4.89
-# Desc: number of children *weird->int_ptr_ptr
-gdbtk_test c_variable-4.89 {number of children *weird->int_ptr_ptr} {
- $var(weird.int_ptr_ptr.*int_ptr_ptr) numChildren
-} {1}
-
-# Test: c_variable-4.90
-# Desc: create weird->int_ptr_ptr
-gdbtk_test c_variable-4.90 {create weird->int_ptr_ptr} {
- create_variable weird->int_ptr_ptr
-} {0}
-
-# Test: c_variable-4.91
-# Desc: children of weird->int_ptr_ptr
-gdbtk_test c_variable-4.91 {children of weird->int_ptr_ptr} {
- get_children weird->int_ptr_ptr
-} {*weird->int_ptr_ptr}
-
-# Test: c_variable-4.92
-# Desc: number of children of (weird->int_ptr_ptr)
-gdbtk_test c_variable-4.92 {number of children of (weird->int_ptr_ptr)} {
- $var(weird->int_ptr_ptr) numChildren
-} {1}
-
-# Test: c_variable-4.93
-# Desc: children of *(weird->int_ptr_ptr)
-gdbtk_test c_variable-4.93 {children of *(weird->int_ptr_ptr)} {
- get_children weird->int_ptr_ptr.*weird->int_ptr_ptr
-} {**weird->int_ptr_ptr}
-
-# Test: c_variable-4.94
-# Desc: number of children of *(weird->int_ptr_ptr)
-gdbtk_test c_variable-4.94 {number of children of *(weird->int_ptr_ptr)} {
- $var(weird->int_ptr_ptr.*weird->int_ptr_ptr) numChildren
-} {1}
-
-# Test: c_variable-4.95
-# Desc: children of *(*(weird->int_ptr_ptr))
-gdbtk_test c_variable-4.95 {children of *(*(weird->int_ptr_ptr))} {
- get_children weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr
-} {}
-
-# Test: c_variable-4.96
-# Desc: number of children of *(*(weird->int_ptr_ptr))
-gdbtk_test c_variable-4.96 {number of children of **weird->int_ptr_ptr} {
- $var(weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr) numChildren
-} {0}
-
-# Test: c_variable-4.97
-# Desc: is weird editable
-gdbtk_test c_variable-4.97 {is weird editable} {
- $var(weird) editable
-} {1}
-
-# Test: c_variable-4.98
-# Desc: is weird->int_ptr_ptr editable
-gdbtk_test c_variable-4.98 {is weird->int_ptr_ptr editable} {
- $var(weird.int_ptr_ptr) editable
-} {1}
-
-# Test: c_variable-4.99
-# Desc: is *(weird->int_ptr_ptr) editable
-gdbtk_test c_variable-4.99 {is *(weird->int_ptr_ptr) editable} {
- $var(weird.int_ptr_ptr.*int_ptr_ptr) editable
-} {1}
-
-# Test: c_variable-4.100
-# Desc: is *(*(weird->int_ptr_ptr)) editable
-gdbtk_test c_variable-4.100 {is *(*(weird->int_ptr_ptr)) editable} {
- $var(weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr) editable
-} {1}
-
-# Test: c_variable-4.101
-# Desc: is weird->u1 editable
-gdbtk_test c_variable-4.101 {is weird->u1 editable} {
- $var(weird.u1) editable
-} {0}
-
-# Test: c_variable-4.102
-# Desc: is weird->s2 editable
-gdbtk_test c_variable-4.102 {is weird->s2 editable} {
- $var(weird.s2) editable
-} {0}
-
-# Test: c_variable-4.103
-# Desc: is struct_declarations.u1.a editable
-gdbtk_test c_variable-4.103 {is struct_declarations.u1.a editable} {
- $var(struct_declarations.u1.a) editable
-} {1}
-
-# Test: c_variable-4.104
-# Desc: is struct_declarations.u1.b editable
-gdbtk_test c_variable-4.104 {is struct_declarations.u1.b editable} {
- $var(struct_declarations.u1.b) editable
-} {1}
-
-# Test: c_variable-4.105
-# Desc: is struct_declarations.u1.c editable
-gdbtk_test c_variable-4.105 {is struct_declarations.u1.c editable} {
- $var(struct_declarations.u1.c) editable
-} {1}
-
-# Test: c_variable-4.106
-# Desc: is struct_declarations.long_array editable
-gdbtk_test c_variable-4.106 {is struct_declarations.long_array editable} {
- $var(struct_declarations.long_array) editable
-} {0}
-
-# Test: c_variable-4.107
-# Desc: is struct_declarations.long_array[0] editable
-gdbtk_test c_variable-4.107 {is struct_declarations.long_array[0] editable} {
- $var(struct_declarations.long_array.0) editable
-} {1}
-
-# Test: c_variable-4.108
-# Desc: is struct_declarations editable
-gdbtk_test c_variable-4.108 {is struct_declarations editable} {
- $var(struct_declarations) editable
-} {0}
-
-delete_variable weird
-
-##### #####
-# #
-# children and update tests #
-# #
-##### #####
-
-# Test: c_variable-5.1
-# Desc: check that nothing changed
-gdbtk_test c_variable-5.1 {check that nothing changed} {
- check_update
-} {{} {struct_declarations.s2.i.3 struct_declarations.func_ptr_ptr struct_declarations.s2.i.4 struct_declarations.s2.i.5 struct_declarations.s2.i.6 struct_declarations.func_ptr struct_declarations.s2.i.7 struct_declarations.s2.i.8 struct_declarations.s2.i.9 struct_declarations.s2.u2.u1s1.d struct_declarations.func_ptr_struct struct_declarations.s2.u2.u1s1.e struct_declarations.u1 struct_declarations.char_ptr.*char_ptr struct_declarations.long_int struct_declarations.s2.u2.u1s2.func struct_declarations.integer struct_declarations.s2.u2 struct_declarations.s2.u2.u1s1.e.0 struct_declarations.s2.u2.u1s1.e.1 struct_declarations.long_array.0 struct_declarations.s2.u2.u1s1.e.2 struct_declarations.long_array.1 struct_declarations.u1.a struct_declarations.s2.u2.u1s1.e.3 struct_declarations.long_array.2 struct_declarations.u1.b struct_declarations.s2.u2.u1s1.e.4 struct_declarations.long_array.3 struct_declarations.u1.c struct_declarations.s2.u2.u1s1.e.5 struct_declarations.long_array.4 struct_declarations.u1.d struct_declarations.u1.b.*b struct_declarations.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr struct_declarations.s2.u2.u1s1.e.6 struct_declarations.long_array.5 struct_declarations.s2.u2.u1s1.e.7 struct_declarations.long_array.6 struct_declarations.s2.u2.u1s1.e.8 struct_declarations.long_array.7 struct_declarations.s2.u2.u1s1.e.9 struct_declarations.long_array.8 struct_declarations.character struct_declarations.long_array.9 struct_declarations.int_ptr_ptr.*int_ptr_ptr struct_declarations.s2.u2.u1s1.func struct_declarations.s2.u2.u1s2.array_ptr struct_declarations.s2.u2.f struct_declarations.s2.u2.u1s1.foo struct_declarations.s2.u2.u1s1 struct_declarations.s2.u2.u1s2.array_ptr.0 struct_declarations.char_ptr struct_declarations.s2.u2.u1s2 struct_declarations.s2.u2.u1s2.array_ptr.1 struct_declarations.int_ptr_ptr struct_declarations.s2 struct_declarations.long_array struct_declarations.s2.g struct_declarations.s2.i.0 struct_declarations.s2.h struct_declarations.s2.i.1 struct_declarations.s2.i struct_declarations.s2.i.2}}
-
-# Step over "struct_declarations.integer = 123;"
-gdb_cmd "step"
-
-# Test: c_variable-5.2
-# Desc: check that integer changed
-gdbtk_test c_variable-5.2 {check that integer changed} {
- check_update
-} {struct_declarations.integer {struct_declarations.s2.i.3 struct_declarations.func_ptr_ptr struct_declarations.s2.i.4 struct_declarations.s2.i.5 struct_declarations.s2.i.6 struct_declarations.func_ptr struct_declarations.s2.i.7 struct_declarations.s2.i.8 struct_declarations.s2.i.9 struct_declarations.s2.u2.u1s1.d struct_declarations.func_ptr_struct struct_declarations.s2.u2.u1s1.e struct_declarations.u1 struct_declarations.char_ptr.*char_ptr struct_declarations.long_int struct_declarations.s2.u2.u1s2.func struct_declarations.integer struct_declarations.s2.u2 struct_declarations.s2.u2.u1s1.e.0 struct_declarations.s2.u2.u1s1.e.1 struct_declarations.long_array.0 struct_declarations.s2.u2.u1s1.e.2 struct_declarations.long_array.1 struct_declarations.u1.a struct_declarations.s2.u2.u1s1.e.3 struct_declarations.long_array.2 struct_declarations.u1.b struct_declarations.s2.u2.u1s1.e.4 struct_declarations.long_array.3 struct_declarations.u1.c struct_declarations.s2.u2.u1s1.e.5 struct_declarations.long_array.4 struct_declarations.u1.d struct_declarations.u1.b.*b struct_declarations.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr struct_declarations.s2.u2.u1s1.e.6 struct_declarations.long_array.5 struct_declarations.s2.u2.u1s1.e.7 struct_declarations.long_array.6 struct_declarations.s2.u2.u1s1.e.8 struct_declarations.long_array.7 struct_declarations.s2.u2.u1s1.e.9 struct_declarations.long_array.8 struct_declarations.character struct_declarations.long_array.9 struct_declarations.int_ptr_ptr.*int_ptr_ptr struct_declarations.s2.u2.u1s1.func struct_declarations.s2.u2.u1s2.array_ptr struct_declarations.s2.u2.f struct_declarations.s2.u2.u1s1.foo struct_declarations.s2.u2.u1s1 struct_declarations.s2.u2.u1s2.array_ptr.0 struct_declarations.char_ptr struct_declarations.s2.u2.u1s2 struct_declarations.s2.u2.u1s2.array_ptr.1 struct_declarations.int_ptr_ptr struct_declarations.s2 struct_declarations.long_array struct_declarations.s2.g struct_declarations.s2.i.0 struct_declarations.s2.h struct_declarations.s2.i.1 struct_declarations.s2.i struct_declarations.s2.i.2}}
-
-# Step over:
-# weird->char_ptr = "hello";
-# bar = 2121;
-# foo = &bar;
-for {set i 0} {$i < 3} {incr i} {
- gdb_cmd "step"
-}
-
-# Test: c_variable-5.3
-# Desc: check that char_ptr changed
-gdbtk_test c_variable-5.3 {check that char_ptr changed} {
- check_update
-} {{{struct_declarations.char_ptr struct_declarations.char_ptr.*char_ptr}} {struct_declarations.s2.i.3 struct_declarations.func_ptr_ptr struct_declarations.s2.i.4 struct_declarations.s2.i.5 struct_declarations.s2.i.6 struct_declarations.func_ptr struct_declarations.s2.i.7 struct_declarations.s2.i.8 struct_declarations.s2.i.9 struct_declarations.s2.u2.u1s1.d struct_declarations.func_ptr_struct struct_declarations.s2.u2.u1s1.e struct_declarations.u1 struct_declarations.char_ptr.*char_ptr struct_declarations.long_int struct_declarations.s2.u2.u1s2.func struct_declarations.integer struct_declarations.s2.u2 struct_declarations.s2.u2.u1s1.e.0 struct_declarations.s2.u2.u1s1.e.1 struct_declarations.long_array.0 struct_declarations.s2.u2.u1s1.e.2 struct_declarations.long_array.1 struct_declarations.u1.a struct_declarations.s2.u2.u1s1.e.3 struct_declarations.long_array.2 struct_declarations.u1.b struct_declarations.s2.u2.u1s1.e.4 struct_declarations.long_array.3 struct_declarations.u1.c struct_declarations.s2.u2.u1s1.e.5 struct_declarations.long_array.4 struct_declarations.u1.d struct_declarations.u1.b.*b struct_declarations.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr struct_declarations.s2.u2.u1s1.e.6 struct_declarations.long_array.5 struct_declarations.s2.u2.u1s1.e.7 struct_declarations.long_array.6 struct_declarations.s2.u2.u1s1.e.8 struct_declarations.long_array.7 struct_declarations.s2.u2.u1s1.e.9 struct_declarations.long_array.8 struct_declarations.character struct_declarations.long_array.9 struct_declarations.int_ptr_ptr.*int_ptr_ptr struct_declarations.s2.u2.u1s1.func struct_declarations.s2.u2.u1s2.array_ptr struct_declarations.s2.u2.f struct_declarations.s2.u2.u1s1.foo struct_declarations.s2.u2.u1s1 struct_declarations.s2.u2.u1s2.array_ptr.0 struct_declarations.char_ptr struct_declarations.s2.u2.u1s2 struct_declarations.s2.u2.u1s2.array_ptr.1 struct_declarations.int_ptr_ptr struct_declarations.s2 struct_declarations.long_array struct_declarations.s2.g struct_declarations.s2.i.0 struct_declarations.s2.h struct_declarations.s2.i.1 struct_declarations.s2.i struct_declarations.s2.i.2}}
-
-# Step over "struct_declarations.int_ptr_ptr = &foo;"
-gdb_cmd "step"
-
-# Test: c_variable-5.4
-# Desc: check that int_ptr_ptr and children changed
-gdbtk_test c_variable-5.4 {check that int_ptr_ptr and children changed} {
- check_update
-} {{{struct_declarations.int_ptr_ptr struct_declarations.int_ptr_ptr.*int_ptr_ptr struct_declarations.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr}} {struct_declarations.s2.i.3 struct_declarations.func_ptr_ptr struct_declarations.s2.i.4 struct_declarations.s2.i.5 struct_declarations.s2.i.6 struct_declarations.func_ptr struct_declarations.s2.i.7 struct_declarations.s2.i.8 struct_declarations.s2.i.9 struct_declarations.s2.u2.u1s1.d struct_declarations.func_ptr_struct struct_declarations.s2.u2.u1s1.e struct_declarations.u1 struct_declarations.char_ptr.*char_ptr struct_declarations.long_int struct_declarations.s2.u2.u1s2.func struct_declarations.integer struct_declarations.s2.u2 struct_declarations.s2.u2.u1s1.e.0 struct_declarations.s2.u2.u1s1.e.1 struct_declarations.long_array.0 struct_declarations.s2.u2.u1s1.e.2 struct_declarations.long_array.1 struct_declarations.u1.a struct_declarations.s2.u2.u1s1.e.3 struct_declarations.long_array.2 struct_declarations.u1.b struct_declarations.s2.u2.u1s1.e.4 struct_declarations.long_array.3 struct_declarations.u1.c struct_declarations.s2.u2.u1s1.e.5 struct_declarations.long_array.4 struct_declarations.u1.d struct_declarations.u1.b.*b struct_declarations.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr struct_declarations.s2.u2.u1s1.e.6 struct_declarations.long_array.5 struct_declarations.s2.u2.u1s1.e.7 struct_declarations.long_array.6 struct_declarations.s2.u2.u1s1.e.8 struct_declarations.long_array.7 struct_declarations.s2.u2.u1s1.e.9 struct_declarations.long_array.8 struct_declarations.character struct_declarations.long_array.9 struct_declarations.int_ptr_ptr.*int_ptr_ptr struct_declarations.s2.u2.u1s1.func struct_declarations.s2.u2.u1s2.array_ptr struct_declarations.s2.u2.f struct_declarations.s2.u2.u1s1.foo struct_declarations.s2.u2.u1s1 struct_declarations.s2.u2.u1s2.array_ptr.0 struct_declarations.char_ptr struct_declarations.s2.u2.u1s2 struct_declarations.s2.u2.u1s2.array_ptr.1 struct_declarations.int_ptr_ptr struct_declarations.s2 struct_declarations.long_array struct_declarations.s2.g struct_declarations.s2.i.0 struct_declarations.s2.h struct_declarations.s2.i.1 struct_declarations.s2.i struct_declarations.s2.i.2}}
-
-# Step over "weird->long_array[0] = 1234;"
-gdb_cmd "step"
-
-# Test: c_variable-5.5
-# Desc: check that long_array[0] changed
-gdbtk_test c_variable-5.5 {check that long_array[0] changed} {
- check_update
-} {struct_declarations.long_array.0 {struct_declarations.s2.i.3 struct_declarations.func_ptr_ptr struct_declarations.s2.i.4 struct_declarations.s2.i.5 struct_declarations.s2.i.6 struct_declarations.func_ptr struct_declarations.s2.i.7 struct_declarations.s2.i.8 struct_declarations.s2.i.9 struct_declarations.s2.u2.u1s1.d struct_declarations.func_ptr_struct struct_declarations.s2.u2.u1s1.e struct_declarations.u1 struct_declarations.char_ptr.*char_ptr struct_declarations.long_int struct_declarations.s2.u2.u1s2.func struct_declarations.integer struct_declarations.s2.u2 struct_declarations.s2.u2.u1s1.e.0 struct_declarations.s2.u2.u1s1.e.1 struct_declarations.long_array.0 struct_declarations.s2.u2.u1s1.e.2 struct_declarations.long_array.1 struct_declarations.u1.a struct_declarations.s2.u2.u1s1.e.3 struct_declarations.long_array.2 struct_declarations.u1.b struct_declarations.s2.u2.u1s1.e.4 struct_declarations.long_array.3 struct_declarations.u1.c struct_declarations.s2.u2.u1s1.e.5 struct_declarations.long_array.4 struct_declarations.u1.d struct_declarations.u1.b.*b struct_declarations.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr struct_declarations.s2.u2.u1s1.e.6 struct_declarations.long_array.5 struct_declarations.s2.u2.u1s1.e.7 struct_declarations.long_array.6 struct_declarations.s2.u2.u1s1.e.8 struct_declarations.long_array.7 struct_declarations.s2.u2.u1s1.e.9 struct_declarations.long_array.8 struct_declarations.character struct_declarations.long_array.9 struct_declarations.int_ptr_ptr.*int_ptr_ptr struct_declarations.s2.u2.u1s1.func struct_declarations.s2.u2.u1s2.array_ptr struct_declarations.s2.u2.f struct_declarations.s2.u2.u1s1.foo struct_declarations.s2.u2.u1s1 struct_declarations.s2.u2.u1s2.array_ptr.0 struct_declarations.char_ptr struct_declarations.s2.u2.u1s2 struct_declarations.s2.u2.u1s2.array_ptr.1 struct_declarations.int_ptr_ptr struct_declarations.s2 struct_declarations.long_array struct_declarations.s2.g struct_declarations.s2.i.0 struct_declarations.s2.h struct_declarations.s2.i.1 struct_declarations.s2.i struct_declarations.s2.i.2}}
-
-# Step over "struct_declarations.long_array[1] = 2345;"
-gdb_cmd "step"
-
-# Test: c_variable-5.6
-# Desc: check that long_array[1] changed
-gdbtk_test c_variable-5.6 {check that long_array[1] changed} {
- check_update
-} {struct_declarations.long_array.1 {struct_declarations.s2.i.3 struct_declarations.func_ptr_ptr struct_declarations.s2.i.4 struct_declarations.s2.i.5 struct_declarations.s2.i.6 struct_declarations.func_ptr struct_declarations.s2.i.7 struct_declarations.s2.i.8 struct_declarations.s2.i.9 struct_declarations.s2.u2.u1s1.d struct_declarations.func_ptr_struct struct_declarations.s2.u2.u1s1.e struct_declarations.u1 struct_declarations.char_ptr.*char_ptr struct_declarations.long_int struct_declarations.s2.u2.u1s2.func struct_declarations.integer struct_declarations.s2.u2 struct_declarations.s2.u2.u1s1.e.0 struct_declarations.s2.u2.u1s1.e.1 struct_declarations.long_array.0 struct_declarations.s2.u2.u1s1.e.2 struct_declarations.long_array.1 struct_declarations.u1.a struct_declarations.s2.u2.u1s1.e.3 struct_declarations.long_array.2 struct_declarations.u1.b struct_declarations.s2.u2.u1s1.e.4 struct_declarations.long_array.3 struct_declarations.u1.c struct_declarations.s2.u2.u1s1.e.5 struct_declarations.long_array.4 struct_declarations.u1.d struct_declarations.u1.b.*b struct_declarations.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr struct_declarations.s2.u2.u1s1.e.6 struct_declarations.long_array.5 struct_declarations.s2.u2.u1s1.e.7 struct_declarations.long_array.6 struct_declarations.s2.u2.u1s1.e.8 struct_declarations.long_array.7 struct_declarations.s2.u2.u1s1.e.9 struct_declarations.long_array.8 struct_declarations.character struct_declarations.long_array.9 struct_declarations.int_ptr_ptr.*int_ptr_ptr struct_declarations.s2.u2.u1s1.func struct_declarations.s2.u2.u1s2.array_ptr struct_declarations.s2.u2.f struct_declarations.s2.u2.u1s1.foo struct_declarations.s2.u2.u1s1 struct_declarations.s2.u2.u1s2.array_ptr.0 struct_declarations.char_ptr struct_declarations.s2.u2.u1s2 struct_declarations.s2.u2.u1s2.array_ptr.1 struct_declarations.int_ptr_ptr struct_declarations.s2 struct_declarations.long_array struct_declarations.s2.g struct_declarations.s2.i.0 struct_declarations.s2.h struct_declarations.s2.i.1 struct_declarations.s2.i struct_declarations.s2.i.2}}
-
-# Step over "weird->long_array[2] = 3456;"
-gdb_cmd "step"
-
-# Test: c_variable-5.7
-# Desc: check that long_array[2] changed
-gdbtk_test c_variable-5.7 {check that long_array[2] changed} {
- check_update
-} {struct_declarations.long_array.2 {struct_declarations.s2.i.3 struct_declarations.func_ptr_ptr struct_declarations.s2.i.4 struct_declarations.s2.i.5 struct_declarations.s2.i.6 struct_declarations.func_ptr struct_declarations.s2.i.7 struct_declarations.s2.i.8 struct_declarations.s2.i.9 struct_declarations.s2.u2.u1s1.d struct_declarations.func_ptr_struct struct_declarations.s2.u2.u1s1.e struct_declarations.u1 struct_declarations.char_ptr.*char_ptr struct_declarations.long_int struct_declarations.s2.u2.u1s2.func struct_declarations.integer struct_declarations.s2.u2 struct_declarations.s2.u2.u1s1.e.0 struct_declarations.s2.u2.u1s1.e.1 struct_declarations.long_array.0 struct_declarations.s2.u2.u1s1.e.2 struct_declarations.long_array.1 struct_declarations.u1.a struct_declarations.s2.u2.u1s1.e.3 struct_declarations.long_array.2 struct_declarations.u1.b struct_declarations.s2.u2.u1s1.e.4 struct_declarations.long_array.3 struct_declarations.u1.c struct_declarations.s2.u2.u1s1.e.5 struct_declarations.long_array.4 struct_declarations.u1.d struct_declarations.u1.b.*b struct_declarations.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr struct_declarations.s2.u2.u1s1.e.6 struct_declarations.long_array.5 struct_declarations.s2.u2.u1s1.e.7 struct_declarations.long_array.6 struct_declarations.s2.u2.u1s1.e.8 struct_declarations.long_array.7 struct_declarations.s2.u2.u1s1.e.9 struct_declarations.long_array.8 struct_declarations.character struct_declarations.long_array.9 struct_declarations.int_ptr_ptr.*int_ptr_ptr struct_declarations.s2.u2.u1s1.func struct_declarations.s2.u2.u1s2.array_ptr struct_declarations.s2.u2.f struct_declarations.s2.u2.u1s1.foo struct_declarations.s2.u2.u1s1 struct_declarations.s2.u2.u1s2.array_ptr.0 struct_declarations.char_ptr struct_declarations.s2.u2.u1s2 struct_declarations.s2.u2.u1s2.array_ptr.1 struct_declarations.int_ptr_ptr struct_declarations.s2 struct_declarations.long_array struct_declarations.s2.g struct_declarations.s2.i.0 struct_declarations.s2.h struct_declarations.s2.i.1 struct_declarations.s2.i struct_declarations.s2.i.2}}
-
-# Step over:
-# struct_declarations.long_array[3] = 4567;
-# weird->long_array[4] = 5678;
-# struct_declarations.long_array[5] = 6789;
-# weird->long_array[6] = 7890;
-# struct_declarations.long_array[7] = 8901;
-# weird->long_array[8] = 9012;
-# struct_declarations.long_array[9] = 1234;
-for {set i 0} {$i < 7} {incr i} {
- gdb_cmd "step"
-}
-
-# Test: c_variable-5.8
-# Desc: check that long_array[3-9] changed
-gdbtk_test c_variable-5.8 {check that long_array[3-9] changed} {
- check_update
-} {{{struct_declarations.long_array.3 struct_declarations.long_array.4 struct_declarations.long_array.5 struct_declarations.long_array.6 struct_declarations.long_array.7 struct_declarations.long_array.8 struct_declarations.long_array.9}} {struct_declarations.s2.i.3 struct_declarations.func_ptr_ptr struct_declarations.s2.i.4 struct_declarations.s2.i.5 struct_declarations.s2.i.6 struct_declarations.func_ptr struct_declarations.s2.i.7 struct_declarations.s2.i.8 struct_declarations.s2.i.9 struct_declarations.s2.u2.u1s1.d struct_declarations.func_ptr_struct struct_declarations.s2.u2.u1s1.e struct_declarations.u1 struct_declarations.char_ptr.*char_ptr struct_declarations.long_int struct_declarations.s2.u2.u1s2.func struct_declarations.integer struct_declarations.s2.u2 struct_declarations.s2.u2.u1s1.e.0 struct_declarations.s2.u2.u1s1.e.1 struct_declarations.long_array.0 struct_declarations.s2.u2.u1s1.e.2 struct_declarations.long_array.1 struct_declarations.u1.a struct_declarations.s2.u2.u1s1.e.3 struct_declarations.long_array.2 struct_declarations.u1.b struct_declarations.s2.u2.u1s1.e.4 struct_declarations.long_array.3 struct_declarations.u1.c struct_declarations.s2.u2.u1s1.e.5 struct_declarations.long_array.4 struct_declarations.u1.d struct_declarations.u1.b.*b struct_declarations.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr struct_declarations.s2.u2.u1s1.e.6 struct_declarations.long_array.5 struct_declarations.s2.u2.u1s1.e.7 struct_declarations.long_array.6 struct_declarations.s2.u2.u1s1.e.8 struct_declarations.long_array.7 struct_declarations.s2.u2.u1s1.e.9 struct_declarations.long_array.8 struct_declarations.character struct_declarations.long_array.9 struct_declarations.int_ptr_ptr.*int_ptr_ptr struct_declarations.s2.u2.u1s1.func struct_declarations.s2.u2.u1s2.array_ptr struct_declarations.s2.u2.f struct_declarations.s2.u2.u1s1.foo struct_declarations.s2.u2.u1s1 struct_declarations.s2.u2.u1s2.array_ptr.0 struct_declarations.char_ptr struct_declarations.s2.u2.u1s2 struct_declarations.s2.u2.u1s2.array_ptr.1 struct_declarations.int_ptr_ptr struct_declarations.s2 struct_declarations.long_array struct_declarations.s2.g struct_declarations.s2.i.0 struct_declarations.s2.h struct_declarations.s2.i.1 struct_declarations.s2.i struct_declarations.s2.i.2}}
-
-# Step over "weird->func_ptr = nothing;"
-gdb_cmd "step"
-
-# Test: c_variable-5.9
-# Desc: check that func_ptr changed
-gdbtk_test c_variable-5.9 {check that func_ptr changed} {
- check_update
-} {struct_declarations.func_ptr {struct_declarations.s2.i.3 struct_declarations.func_ptr_ptr struct_declarations.s2.i.4 struct_declarations.s2.i.5 struct_declarations.s2.i.6 struct_declarations.func_ptr struct_declarations.s2.i.7 struct_declarations.s2.i.8 struct_declarations.s2.i.9 struct_declarations.s2.u2.u1s1.d struct_declarations.func_ptr_struct struct_declarations.s2.u2.u1s1.e struct_declarations.u1 struct_declarations.char_ptr.*char_ptr struct_declarations.long_int struct_declarations.s2.u2.u1s2.func struct_declarations.integer struct_declarations.s2.u2 struct_declarations.s2.u2.u1s1.e.0 struct_declarations.s2.u2.u1s1.e.1 struct_declarations.long_array.0 struct_declarations.s2.u2.u1s1.e.2 struct_declarations.long_array.1 struct_declarations.u1.a struct_declarations.s2.u2.u1s1.e.3 struct_declarations.long_array.2 struct_declarations.u1.b struct_declarations.s2.u2.u1s1.e.4 struct_declarations.long_array.3 struct_declarations.u1.c struct_declarations.s2.u2.u1s1.e.5 struct_declarations.long_array.4 struct_declarations.u1.d struct_declarations.u1.b.*b struct_declarations.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr struct_declarations.s2.u2.u1s1.e.6 struct_declarations.long_array.5 struct_declarations.s2.u2.u1s1.e.7 struct_declarations.long_array.6 struct_declarations.s2.u2.u1s1.e.8 struct_declarations.long_array.7 struct_declarations.s2.u2.u1s1.e.9 struct_declarations.long_array.8 struct_declarations.character struct_declarations.long_array.9 struct_declarations.int_ptr_ptr.*int_ptr_ptr struct_declarations.s2.u2.u1s1.func struct_declarations.s2.u2.u1s2.array_ptr struct_declarations.s2.u2.f struct_declarations.s2.u2.u1s1.foo struct_declarations.s2.u2.u1s1 struct_declarations.s2.u2.u1s2.array_ptr.0 struct_declarations.char_ptr struct_declarations.s2.u2.u1s2 struct_declarations.s2.u2.u1s2.array_ptr.1 struct_declarations.int_ptr_ptr struct_declarations.s2 struct_declarations.long_array struct_declarations.s2.g struct_declarations.s2.i.0 struct_declarations.s2.h struct_declarations.s2.i.1 struct_declarations.s2.i struct_declarations.s2.i.2}}
-
-# Delete all variables
-delete_all_variables
-
-# Step over all lines:
-# ...
-# psnp = &snp0;
-for {set i 0} {$i < 43} {incr i} {
- gdb_cmd "step"
-}
-
-# Test: c_variable-5.10
-# Desc: create psnp->char_ptr
-gdbtk_test c_variable-5.10 {create psnp->char_ptr} {
- create_variable psnp->char_ptr
-} {0}
-
-# Test: c_variable-5.11
-# Desc: children of psnp->char_ptr
-gdbtk_test c_variable-5.11 {children of psnp->char_ptr} {
- get_children psnp->char_ptr
-} {*psnp->char_ptr}
-
-# Test: c_variable-5.12
-# Desc: number of children of psnp->char_ptr
-gdbtk_test c_variable-5.12 {number of children of psnp->char_ptr} {
- $var(psnp->char_ptr) numChildren
-} {1}
-
-# Test: c_variable-5.13
-# Desc: children of *(psnp->char_ptr)
-gdbtk_test c_variable-5.13 {children of *(psnp->char_ptr)} {
- get_children psnp->char_ptr.*psnp->char_ptr
-} {**psnp->char_ptr}
-
-# Test: c_variable-5.14
-# Desc: number of children of *(psnp->char_ptr)
-gdbtk_test c_variable-5.14 {number of children of *(psnp->char_ptr)} {
- $var(psnp->char_ptr.*psnp->char_ptr) numChildren
-} {1}
-
-# Test: c_variable-5.15
-# Desc: children of *(*(psnp->char_ptr))
-gdbtk_test c_variable-5.15 {children of *(*(psnp->char_ptr))} {
- get_children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr
-} {***psnp->char_ptr}
-
-# Test: c_variable-5.16
-# Desc: number of children of *(*(psnp->char_ptr))
-gdbtk_test c_variable-5.16 {number of children of *(*(psnp->char_ptr))} {
- $var(psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr) numChildren
-} {1}
-
-# Test: c_variable-5.17
-# Desc: children of *(*(*(psnp->char_ptr)))
-gdbtk_test c_variable-5.17 {children of *(*(*(psnp->char_ptr)))} {
- get_children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr
-} {****psnp->char_ptr}
-
-# Test: c_variable-5.18
-# Desc: number of children of *(*(*(psnp->char_ptr)))
-gdbtk_test c_variable-5.18 {number of children of *(*(*(psnp->char_ptr)))} {
- $var(psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr) numChildren
-} {1}
-
-# Test: c_variable-5.19
-# Desc: create psnp->long_ptr
-gdbtk_test c_variable-5.19 {create psnp->long_ptr} {
- create_variable psnp->long_ptr
-} {0}
-
-# Test: c_variable-5.20
-# Desc: children of psnp->long_ptr
-gdbtk_test c_variable-5.20 {children of psnp->long_ptr} {
- get_children psnp->long_ptr
-} {*psnp->long_ptr}
-
-# Test: c_variable-5.21
-# Desc: number of children of psnp->long_ptr
-gdbtk_test c_variable-5.21 {number of children of psnp->long_ptr} {
- $var(psnp->long_ptr) numChildren
-} {1}
-
-# Test: c_variable-5.22
-# Desc: children of *(psnp->long_ptr)
-gdbtk_test c_variable-5.22 {children of *(psnp->long_ptr)} {
- get_children psnp->long_ptr.*psnp->long_ptr
-} {**psnp->long_ptr}
-
-# Test: c_variable-5.23
-# Desc: number of children of *(psnp->long_ptr)
-gdbtk_test c_variable-5.23 {number of children of *(psnp->long_ptr)} {
- $var(psnp->long_ptr.*psnp->long_ptr) numChildren
-} {1}
-
-# Test: c_variable-5.24
-# Desc: children of *(*(psnp->long_ptr))
-gdbtk_test c_variable-5.24 {children of *(*(psnp->long_ptr))} {
- get_children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr
-} {***psnp->long_ptr}
-
-# Test: c_variable-5.25
-# Desc: number of children of *(*(psnp->long_ptr))
-gdbtk_test c_variable-5.25 {number of children of *(*(psnp->long_ptr))} {
- $var(psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr) numChildren
-} {1}
-
-# Test: c_variable-5.26
-# Desc: children of *(*(*(psnp->long_ptr)))
-gdbtk_test c_variable-5.26 {children of *(*(*(psnp->long_ptr)))} {
- get_children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr
-} {****psnp->long_ptr}
-
-# Test: c_variable-5.27
-# Desc: number of children of *(*(*(psnp->long_ptr)))
-gdbtk_test c_variable-5.27 {number of children of *(*(*(psnp->long_ptr)))} {
- $var(psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr) numChildren
-} {1}
-
-# Test: c_variable-5.28
-# Desc: children of *(*(*(*(psnp->long_ptr))))
-gdbtk_test c_variable-5.29 {children of *(*(*(*(psnp->long_ptr))))} {
- get_children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr
-} {}
-
-# Test: c_variable-5.29
-# Desc: number of children of *(*(*(*(psnp->long_ptr))))
-gdbtk_test c_variable-5.29 {number of children of *(*(*(*(psnp->long_ptr))))} {
- $var(psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr) numChildren
-} {0}
-
-# Test: c_variable-5.30
-# Desc: create psnp->ptrs
-gdbtk_test c_variable-5.30 {create psnp->ptrs} {
- create_variable psnp->ptrs
-} {0}
-
-# Test: c_variable-5.31
-# Desc: children of psnp->ptrs
-gdbtk_test c_variable-5.31 {children of psnp->ptrs} {
- get_children psnp->ptrs
-} {0 1 2}
-
-# Test: c_variable-5.32
-# Desc: number of children of psnp->ptrs
-gdbtk_test c_variable-5.32 {number of children of psnp->ptrs} {
- $var(psnp->ptrs) numChildren
-} {3}
-
-# Test: c_variable-5.33
-# Desc: children of psnp->ptrs[0]
-gdbtk_test c_variable-5.33 {children of psnp->ptrs[0]} {
- get_children psnp->ptrs.0
-} {char_ptr long_ptr ptrs next}
-
-# Test: c_variable-5.34
-# Desc: number of children of psnp->ptrs[0]
-gdbtk_test c_variable-5.34 {number of children of psnp->ptrs[0]} {
- $var(psnp->ptrs.0) numChildren
-} {4}
-
-# Test: c_variable-5.35
-# Desc: children of psnp->ptrs[0]->next
-gdbtk_test c_variable-5.35 {children of psnp->ptrs.0.next} {
- get_children psnp->ptrs.0.next
-} {char_ptr long_ptr ptrs next}
-
-# Test: c_variable-5.36
-# Desc: number of children of psnp->ptrs[0]->next
-gdbtk_test c_variable-5.36 {number of children of psnp->ptrs[0]->next} {
- $var(psnp->ptrs.0.next) numChildren
-} {4}
-
-# Test: c_variable-5.37
-# Desc: children of psnp->ptrs[0]->next->char_ptr
-gdbtk_test c_variable-5.37 {children of psnp->ptrs[0]->next->char_ptr} {
- get_children psnp->ptrs.0.next.char_ptr
-} {*char_ptr}
-
-# Test: c_variable-5.38
-# Desc: number of children of psnp->ptrs[0]->next->char_ptr
-gdbtk_test c_variable-5.38 {number of children of psnp->ptrs[0]->next->char_ptr} {
- $var(psnp->ptrs.0.next.char_ptr) numChildren
-} {1}
-
-# Test: c_variable-5.39
-# Desc: children of *psnp->ptrs[0]->next->char_ptr
-gdbtk_test c_variable-5.39 {children of *psnp->ptrs[0]->next->char_ptr} {
- get_children psnp->ptrs.0.next.char_ptr.*char_ptr
-} {**char_ptr}
-
-# Test: c_variable-5.40
-# Desc: number of children of *psnp->ptrs[0]->next->char_ptr
-gdbtk_test c_variable-5.40 {number of children of *psnp->ptrs[0]->next->char_ptr} {
- $var(psnp->ptrs.0.next.char_ptr.*char_ptr) numChildren
-} {1}
-
-# Test: c_variable-5.41
-# Desc: children of **psnp->ptrs[0]->next->char_ptr
-gdbtk_test c_variable-5.41 {children of **psnp->ptrs[0]->next->char_ptr} {
- get_children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr
-} {***char_ptr}
-
-# Test: c_variable-5.42
-# Desc: number of children of **psnp->ptrs[0]->next->char_ptr
-gdbtk_test c_variable-5.42 {number of children of **psnp->ptrs[0]->next->char_ptr} {
- $var(psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr) numChildren
-} {1}
-
-# Test: c_variable-5.43
-# Desc: children of ***psnp->ptrs[0]->next->char_ptr
-gdbtk_test c_variable-5.43 {children of ***psnp->ptrs[0]->next->char_ptr} {
- get_children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr
-} {****char_ptr}
-
-# Test: c_variable-5.44
-# Desc: number of children of ***psnp->ptrs[0]->next->char_ptr
-gdbtk_test c_variable-5.44 {number of children of ***psnp->ptrs[0]->next->char_ptr} {
- $var(psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr) numChildren
-} {1}
-
-# Test: c_variable-5.45
-# Desc: children of psnp->ptrs[0]->next->next
-gdbtk_test c_variable-5.45 {children of psnp->ptrs[0]->next->next} {
- get_children psnp->ptrs.0.next.next
-} {char_ptr long_ptr ptrs next}
-
-# Test: c_variable-5.46
-# Desc: children of psnp->ptrs[0]->next->next->ptrs
-gdbtk_test c_variable-5.46 {children of psnp->ptrs[0]->next->next->ptrs} {
- get_children psnp->ptrs.0.next.next.ptrs
-} {0 1 2}
-
-# Step over "snp0.char_ptr = &b3;"
-gdb_cmd "step"
-
-# Test: c_variable-5.47
-# Desc: check that psnp->char_ptr (and [0].char_ptr) changed
-gdbtk_test c_variable-5.47 {check that psnp->char_ptr (and [0].char_ptr) changed} {
- check_update
-} {{psnp->ptrs.0.char_ptr {psnp->char_ptr psnp->char_ptr.*psnp->char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr}} {psnp->ptrs.0.next psnp->ptrs.0.next.ptrs psnp->ptrs.0.next.next psnp->ptrs.0.next.next.char_ptr psnp->ptrs.0.next.next.long_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr psnp->ptrs.0.next.char_ptr psnp->ptrs.0.next.long_ptr psnp->ptrs.0.next.next.ptrs psnp->ptrs.0.next.char_ptr.*char_ptr psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr psnp->ptrs.0.next.next.next psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr psnp->char_ptr.*psnp->char_ptr psnp->ptrs.0.next.next.ptrs.0 psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr psnp->long_ptr.*psnp->long_ptr psnp->ptrs.0.next.next.ptrs.1 psnp->ptrs.0.next.next.ptrs.2 psnp->ptrs.0.char_ptr psnp->ptrs.0.long_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr psnp->ptrs.0.ptrs psnp->ptrs.0 psnp->ptrs.1 psnp->ptrs.2 psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr}}
-
-# Step over "snp1.char_ptr = &c3;"
-gdb_cmd "step"
-
-# Test: c_variable-5.48
-# Desc: check that psnp->next->char_ptr (and [1].char_ptr) changed
-gdbtk_test c_variable-5.48 {check that psnp->next->char_ptr (and [1].char_ptr) changed} {
- check_update
-} {{{psnp->ptrs.0.next.char_ptr psnp->ptrs.0.next.char_ptr.*char_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr}} {psnp->ptrs.0.next psnp->ptrs.0.next.ptrs psnp->ptrs.0.next.next psnp->ptrs.0.next.next.char_ptr psnp->ptrs.0.next.next.long_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr psnp->ptrs.0.next.char_ptr psnp->ptrs.0.next.long_ptr psnp->ptrs.0.next.next.ptrs psnp->ptrs.0.next.char_ptr.*char_ptr psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr psnp->ptrs.0.next.next.next psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr psnp->char_ptr.*psnp->char_ptr psnp->ptrs.0.next.next.ptrs.0 psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr psnp->long_ptr.*psnp->long_ptr psnp->ptrs.0.next.next.ptrs.1 psnp->ptrs.0.next.next.ptrs.2 psnp->ptrs.0.char_ptr psnp->ptrs.0.long_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr psnp->ptrs.0.ptrs psnp->ptrs.0 psnp->ptrs.1 psnp->ptrs.2 psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr}}
-
-# Step over "snp2.char_ptr = &a3;"
-gdb_cmd "step"
-
-# Test: c_variable-5.49
-# Desc: check that psnp->next->next->char_ptr (and [2].char_ptr) changed
-gdbtk_test c_variable-5.49 {heck that psnp->next->next->char_ptr (and [2].char_ptr) changed} {
- check_update
-} {psnp->ptrs.0.next.next.char_ptr {psnp->ptrs.0.next psnp->ptrs.0.next.ptrs psnp->ptrs.0.next.next psnp->ptrs.0.next.next.char_ptr psnp->ptrs.0.next.next.long_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr psnp->ptrs.0.next.char_ptr psnp->ptrs.0.next.long_ptr psnp->ptrs.0.next.next.ptrs psnp->ptrs.0.next.char_ptr.*char_ptr psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr psnp->ptrs.0.next.next.next psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr psnp->char_ptr.*psnp->char_ptr psnp->ptrs.0.next.next.ptrs.0 psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr psnp->long_ptr.*psnp->long_ptr psnp->ptrs.0.next.next.ptrs.1 psnp->ptrs.0.next.next.ptrs.2 psnp->ptrs.0.char_ptr psnp->ptrs.0.long_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr psnp->ptrs.0.ptrs psnp->ptrs.0 psnp->ptrs.1 psnp->ptrs.2 psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr}}
-
-# Step over "snp0.long_ptr = &y3;"
-gdb_cmd "step"
-
-# Test: c_variable-5.50
-# Desc: check that psnp->long_ptr (and [0].long_ptr) changed
-gdbtk_test c_variable-5.50 {check that psnp->long_ptr (and [0].long_ptr) changed} {
- check_update
-} {{psnp->ptrs.0.long_ptr {psnp->long_ptr psnp->long_ptr.*psnp->long_ptr psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr}} {psnp->ptrs.0.next psnp->ptrs.0.next.ptrs psnp->ptrs.0.next.next psnp->ptrs.0.next.next.char_ptr psnp->ptrs.0.next.next.long_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr psnp->ptrs.0.next.char_ptr psnp->ptrs.0.next.long_ptr psnp->ptrs.0.next.next.ptrs psnp->ptrs.0.next.char_ptr.*char_ptr psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr psnp->ptrs.0.next.next.next psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr psnp->char_ptr.*psnp->char_ptr psnp->ptrs.0.next.next.ptrs.0 psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr psnp->long_ptr.*psnp->long_ptr psnp->ptrs.0.next.next.ptrs.1 psnp->ptrs.0.next.next.ptrs.2 psnp->ptrs.0.char_ptr psnp->ptrs.0.long_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr psnp->ptrs.0.ptrs psnp->ptrs.0 psnp->ptrs.1 psnp->ptrs.2 psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr}}
-
-# Step over "snp1.long_ptr = &x3;"
-gdb_cmd "step"
-
-# Test: c_variable-5.51
-# Desc: check that psnp->next->long_ptr (and [1].long_ptr) changed
-gdbtk_test c_variable-5.51 {check that psnp->next->long_ptr (and [1].long_ptr) changed} {
- check_update
-} {psnp->ptrs.0.next.long_ptr {psnp->ptrs.0.next psnp->ptrs.0.next.ptrs psnp->ptrs.0.next.next psnp->ptrs.0.next.next.char_ptr psnp->ptrs.0.next.next.long_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr psnp->ptrs.0.next.char_ptr psnp->ptrs.0.next.long_ptr psnp->ptrs.0.next.next.ptrs psnp->ptrs.0.next.char_ptr.*char_ptr psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr psnp->ptrs.0.next.next.next psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr psnp->char_ptr.*psnp->char_ptr psnp->ptrs.0.next.next.ptrs.0 psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr psnp->long_ptr.*psnp->long_ptr psnp->ptrs.0.next.next.ptrs.1 psnp->ptrs.0.next.next.ptrs.2 psnp->ptrs.0.char_ptr psnp->ptrs.0.long_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr psnp->ptrs.0.ptrs psnp->ptrs.0 psnp->ptrs.1 psnp->ptrs.2 psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr}}
-
-# Step over "snp2.long_ptr = &z3;"
-gdb_cmd "step"
-
-# Test: c_variable-5.52
-# Desc: check that psnp->next->next->long_ptr (and [2].long_ptr) changed
-gdbtk_test c_variable-5.52 {check that psnp->next->next->long_ptr (and [2].long_ptr) changed} {
- check_update
-} {psnp->ptrs.0.next.next.long_ptr {psnp->ptrs.0.next psnp->ptrs.0.next.ptrs psnp->ptrs.0.next.next psnp->ptrs.0.next.next.char_ptr psnp->ptrs.0.next.next.long_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr psnp->ptrs.0.next.char_ptr psnp->ptrs.0.next.long_ptr psnp->ptrs.0.next.next.ptrs psnp->ptrs.0.next.char_ptr.*char_ptr psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr psnp->ptrs.0.next.next.next psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr psnp->char_ptr.*psnp->char_ptr psnp->ptrs.0.next.next.ptrs.0 psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr psnp->long_ptr.*psnp->long_ptr psnp->ptrs.0.next.next.ptrs.1 psnp->ptrs.0.next.next.ptrs.2 psnp->ptrs.0.char_ptr psnp->ptrs.0.long_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr psnp->ptrs.0.ptrs psnp->ptrs.0 psnp->ptrs.1 psnp->ptrs.2 psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr}}
-
-# Test: c_variable-5.53
-# Desc: names of editable variables
-gdbtk_test c_variable-5.53 {names of editable variables} {
- editable_variables
-} {{psnp->ptrs.0.next psnp->ptrs.0.next.next psnp->ptrs.0.next.next.char_ptr psnp->ptrs.0.next.next.long_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr psnp->ptrs.0.next.char_ptr psnp->ptrs.0.next.long_ptr psnp->ptrs.0.next.char_ptr.*char_ptr psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr psnp->ptrs.0.next.next.next psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr psnp->char_ptr.*psnp->char_ptr psnp->ptrs.0.next.next.ptrs.0 psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr psnp->long_ptr.*psnp->long_ptr psnp->ptrs.0.next.next.ptrs.1 psnp->ptrs.0.next.next.ptrs.2 psnp->ptrs.0.char_ptr psnp->ptrs.0.long_ptr psnp->char_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr psnp->long_ptr psnp->ptrs.0 psnp->ptrs.1 psnp->ptrs.2 psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr} {psnp->ptrs.0.next.ptrs psnp->ptrs.0.next.next.ptrs psnp->ptrs psnp->ptrs.0.ptrs}}
-
-##### #####
-# #
-# Display tests #
-# #
-##### #####
-
-delete_all_variables
-
-# Test: c_variable-6.1
-# Desc: create variable bar
-gdbtk_test c_variable-6.1 {create variable bar} {
- create_variable bar
-} {0}
-
-# Test: c_variable-6.2
-# Desc: type of variable bar
-gdbtk_test c_variable-6.2 {type of variable bar} {
- $var(bar) type
-} {int}
-
-# Test: c_variable-6.3
-# Desc: format of variable bar
-gdbtk_test c_variable-6.3 {format of variable bar} {
- $var(bar) format
-} {natural}
-
-# Test: c_variable-6.4
-# Desc: value of variable bar
-gdbtk_test c_variable-6.4 {value of variable bar} {
- value bar d
-} {ok}
-
-# Test: c_variable-6.5
-# Desc: change format of bar to hex
-gdbtk_test c_variable-6.5 {change format of bar to hex} {
- $var(bar) format hex
- $var(bar) format
-} {hexadecimal}
-
-# Test: c_variable-6.6
-# Desc: value of bar with new format
-gdbtk_test c_variable-6.6 {value of bar with new format} {
- value bar x
-} {ok}
-
-# Test: c_variable-6.7
-# Desc: change value of bar
-gdbtk_test c_variable-6.7 {change value of bar} {
- $var(bar) value 3
- value bar x
-} {ok}
-
-# Test: c_variable-6.8
-# Desc: check new value of bar
-gdbtk_test c_variable-6.8 {change value of bar} {
- $var(bar) format decimal
- $var(bar) value
-} {3}
-
-delete_variable bar
-
-# Test: c_variable-6.11
-# Desc: create variable foo
-gdbtk_test c_variable-6.11 {create variable foo} {
- create_variable foo
-} {0}
-
-# Test: c_variable-6.12
-# Desc: type of variable foo
-gdbtk_test c_variable-6.12 {type of variable foo} {
- $var(foo) type
-} {int *}
-
-# Test: c_variable-6.13
-# Desc: format of variable foo
-gdbtk_test c_variable-6.13 {format of variable foo} {
- $var(foo) format
-} {natural}
-
-# Test: c_variable-6.14
-# Desc: value of variable foo
-gdbtk_test c_variable-6.14 {value of variable foo} {
- value foo x
-} {ok}
-
-# Test: c_variable-6.15
-# Desc: change format of var to octal
-gdbtk_test c_variable-6.15 {change format of foo to octal} {
- $var(foo) format octal
- $var(foo) format
-} {octal}
-
-# Test: c_variable-6.16
-# Desc: value of foo with new format
-gdbtk_test c_variable-6.16 {value of foo with new format} {
- value foo o
-} {ok}
-
-# Test: c_variable-6.17
-# Desc: change value of foo
-gdbtk_test c_variable-6.17 {change value of foo} {
- $var(foo) value 3
- value foo o
-} {ok}
-
-# Test: c_variable-6.18
-# Desc: check new value of foo
-gdbtk_test c_variable-6.18 {check new value of foo} {
- $var(foo) format decimal
- $var(foo) value
-} {3}
-
-delete_variable foo
-
-# Test: c_variable-6.21
-# Desc: create variable weird and children
-gdbtk_test c_variable-6.21 {create variable foo} {
- if {![create_variable weird]} {
- lsort [get_children weird]
- }
-} {char_ptr character func_ptr func_ptr_ptr func_ptr_struct int_ptr_ptr integer long_array long_int s2 u1}
-
-# Test: c_variable-6.22
-# Desc: type of weird and children
-gdbtk_test c_variable-6.22 {type of weird and children} {
- set types {}
- foreach v [lsort [array names var]] {
- lappend types [$var($v) type]
- }
-
- set types
-} {{weird_struct *} {char *} char {void (*)(void)} {struct _struct_decl *(*)(int, char *, long int)} {struct _struct_decl (*)(int, char *, long int)} {int **} int {long int [10]} {long int} struct union}
-
-# Test: c_variable-6.23
-# Desc: change format of weird.func_ptr and weird.func_ptr_ptr
-gdbtk_test c_variable-6.23 {change format of weird.func_ptr and weird.func_ptr_ptr} {
- $var(weird.func_ptr) format hexadecimal
- $var(weird.func_ptr_ptr) format hexadecimal
- set result {}
- lappend result [$var(weird.func_ptr) format]
- lappend result [$var(weird.func_ptr_ptr) format]
- set result
-} {hexadecimal hexadecimal}
-
-# Test: c_variable-6.24
-# Desc: format of weird and children
-gdbtk_test c_variable-6.24 {format of weird and children} {
- set formats {}
- foreach v [lsort [array names var]] {
- lappend formats [$var($v) format]
- }
-
- set formats
-} {natural natural natural hexadecimal hexadecimal natural natural natural natural natural natural natural}
-
-# Test: c_variable-6.25
-# Desc: value of weird and children
-gdbtk_test c_variable-6.25 {value of weird and children} {
- set values {}
- foreach v [lsort [array names var]] f [list x "" "" x x x x d d d d d] {
- lappend values [value $v $f]
- }
-
- set values
-} {ok ok ok ok ok ok ok ok weird.long_array ok weird.s2 weird.u1}
-
-# Test: c_variable-6.26
-# Desc: change format of weird and children to octal
-gdbtk_test c_variable-6.26 {change format of weird and children to octal} {
- set formats {}
- foreach v [lsort [array names var]] {
- $var($v) format octal
- lappend formats [$var($v) format]
- }
-
- set formats
-} {octal octal octal octal octal octal octal octal octal octal octal octal}
-
-# Test: c_variable-6.27
-# Desc: value of weird and children with new format
-gdbtk_test c_variable-6.27 {value of foo with new format} {
- set values {}
- foreach v [lsort [array names var]] {
- lappend values [value $v o]
- }
-
- set values
-} {ok ok ok ok ok ok ok ok weird.long_array ok weird.s2 weird.u1}
-
-# Test: c_variable-6.30
-# Desc: create more children of weird
-gdbtk_test c_variable-6.30 {create more children of weird} {
- foreach v [array names var] {
- get_children $v
- }
-
- # Do it twice to get more children
- foreach v [array names var] {
- get_children $v
- }
-
- lsort [array names var]
-} {weird weird.char_ptr weird.char_ptr.*char_ptr weird.character weird.func_ptr weird.func_ptr_ptr weird.func_ptr_struct weird.int_ptr_ptr weird.int_ptr_ptr.*int_ptr_ptr weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr weird.integer weird.long_array weird.long_array.0 weird.long_array.1 weird.long_array.2 weird.long_array.3 weird.long_array.4 weird.long_array.5 weird.long_array.6 weird.long_array.7 weird.long_array.8 weird.long_array.9 weird.long_int weird.s2 weird.s2.g weird.s2.h weird.s2.i weird.s2.i.0 weird.s2.i.1 weird.s2.i.2 weird.s2.i.3 weird.s2.i.4 weird.s2.i.5 weird.s2.i.6 weird.s2.i.7 weird.s2.i.8 weird.s2.i.9 weird.s2.u2 weird.s2.u2.f weird.s2.u2.u1s1 weird.s2.u2.u1s2 weird.u1 weird.u1.a weird.u1.b weird.u1.b.*b weird.u1.c weird.u1.d}
-
-# Test: c_variable-6.31
-# Desc: check that all children of weird change
-# Ok, obviously things like weird.s2 and weird.u1 will not change!
-gdbtk_test c_variable-6.31 {check that all children of weird change (ops, we are now reporting array names as changed in this case - seems harmless though)} {
- $var(weird) value 0x2121
- check_update
-} {{{weird weird.integer weird.character weird.char_ptr weird.char_ptr.*char_ptr weird.long_int weird.int_ptr_ptr weird.int_ptr_ptr.*int_ptr_ptr weird.long_array.0 weird.long_array.1 weird.long_array.2 weird.long_array.3 weird.long_array.4 weird.long_array.5 weird.long_array.6 weird.long_array.7 weird.long_array.8 weird.long_array.9 weird.func_ptr weird.func_ptr_struct weird.func_ptr_ptr weird.u1.a weird.u1.b weird.u1.c weird.u1.d weird.s2.u2.f weird.s2.g weird.s2.h weird.s2.i.0 weird.s2.i.1 weird.s2.i.2 weird.s2.i.3 weird.s2.i.4 weird.s2.i.5 weird.s2.i.6 weird.s2.i.7 weird.s2.i.8 weird.s2.i.9}} {weird.char_ptr weird.s2.u2.f weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr weird.s2.g weird.s2.h weird.s2.i weird.func_ptr_ptr weird.func_ptr weird.s2.u2 weird.int_ptr_ptr weird.long_int weird.character weird.s2.u2.u1s1 weird.s2.u2.u1s2 weird.long_array.0 weird.u1.a weird.long_array.1 weird.s2 weird.func_ptr_struct weird.u1.b weird.long_array.2 weird.long_array weird.u1.c weird.long_array.3 weird.u1.d weird.long_array.4 weird.long_array.5 weird.s2.i.0 weird.long_array.6 weird.s2.i.1 weird.long_array.7 weird.s2.i.2 weird.long_array.8 weird.s2.i.3 weird.long_array.9 weird.s2.i.4 weird.integer weird.s2.i.5 weird.s2.i.6 weird.s2.i.7 weird.s2.i.8 weird.int_ptr_ptr.*int_ptr_ptr weird.s2.i.9 weird.char_ptr.*char_ptr weird.u1 weird.u1.b.*b}}
-
-delete_variable weird
-
-##### #####
-# #
-# Special Display Tests #
-# #
-##### #####
-
-# Stop in "do_special_tests"
-gdb_cmd "break do_special_tests"
-gdb_cmd "continue"
-
-# Test: c_variable-7.1
-# Desc: stop in do_special_tests
-gdbtk_test c_variable-7.1 {stop in do_special_tests} {
- lindex [gdb_loc] 1
-} {do_special_tests}
-
-# Test: c_variable-7.10
-# Desc: create union u
-gdbtk_test c_variable-7.10 {create union u} {
- create_variable u
-} {0}
-
-# Test: c_variable-7.11
-# Desc: value of u
-gdbtk_test c_variable-7.11 {value of u} {
- $var(u) value
-} {{...}}
-
-# Test: c_variable-7.12
-# Desc: type of u
-gdbtk_test c_variable-7.12 {type of u} {
- $var(u) type
-} {union named_union}
-
-# Test: c_variable-7.13
-# Desc: is u editable
-gdbtk_test c_variable-7.13 {is u editable} {
- $var(u) editable
-} {0}
-
-# Test: c_variable-7.14
-# Desc: number of children of u
-gdbtk_test c_variable-7.14 {number of children of u} {
- $var(u) numChildren
-} {2}
-
-# Test: c_variable-7.15
-# Desc: children of u
-gdbtk_test c_variable-7.15 {children of u} {
- get_children u
-} {integer char_ptr}
-
-# Test: c_variable-7.20
-# Desc: create anonu
-gdbtk_test c_variable-7.20 {create anonu} {
- create_variable anonu
-} {0}
-
-# Test: c_variable-7.21
-# Desc: value of anonu
-gdbtk_test c_variable-7.21 {value of anonu} {
- $var(anonu) value
-} {{...}}
-
-# Test: c_variable-7.22
-# Desc: type of anonu
-gdbtk_test c_variable-7.22 {type of anonu} {
- $var(anonu) type
-} {union}
-
-# Test: c_variable-7.23
-# Desc: is anonu editable
-gdbtk_test c_variable-7.23 {is anonu editable} {
- $var(anonu) editable
-} {0}
-
-# Test: c_variable-7.24
-# Desc: number of children of anonu
-gdbtk_test c_variable-7.24 {number of children of anonu} {
- $var(anonu) numChildren
-} {3}
-
-# Test: c_variable-7.25
-# Desc: children of anonu
-gdbtk_test c_variable-7.25 {children of anonu} {
- get_children anonu
-} {a b c}
-
-# Test: c_variable-7.30
-# Desc: create struct s
-gdbtk_test c_variable-7.30 {create struct s} {
- create_variable s
-} {0}
-
-# Test: c_variable-7.31
-# Desc: value of s
-gdbtk_test c_variable-7.31 {value of s} {
- $var(s) value
-} {{...}}
-
-# Test: c_variable-7.32
-# Desc: type of s
-gdbtk_test c_variable-7.32 {type of s} {
- $var(s) type
-} {struct _simple_struct}
-
-# Test: c_variable-7.33
-# Desc: is s editable
-gdbtk_test c_variable-7.33 {is s editable} {
- $var(s) editable
-} {0}
-
-# Test: c_variable-7.34
-# Desc: number of children of s
-gdbtk_test c_variable-7.34 {number of children of s} {
- $var(s) numChildren
-} {6}
-
-# Test: c_variable-7.35
-# Desc: children of s
-gdbtk_test c_variable-7.35 {children of s} {
- get_children s
-} {integer unsigned_integer character signed_character char_ptr array_of_10}
-
-# Test: c_variable-7.40
-# Desc: create anons
-gdbtk_test c_variable-7.40 {create anons} {
- create_variable anons
-} {0}
-
-# Test: c_variable-7.41
-# Desc: value of anons
-gdbtk_test c_variable-7.41 {value of anons} {
- $var(anons) value
-} {{...}}
-
-# Test: c_variable-7.42
-# Desc: type of anons
-gdbtk_test c_variable-7.42 {type of anons} {
- $var(anons) type
-} {struct}
-
-# Test: c_variable-7.43
-# Desc: is anons editable
-gdbtk_test c_variable-7.43 {is anons editable} {
- $var(anons) editable
-} {0}
-
-# Test: c_variable-7.44
-# Desc: number of children of anons
-gdbtk_test c_variable-7.44 {number of children of anons} {
- $var(anons) numChildren
-} {3}
-
-# Test: c_variable-7.45
-# Desc: children of anons
-gdbtk_test c_variable-7.45 {children of anons} {
- get_children anons
-} {a b c}
-
-# Test: c_variable-7.50
-# Desc: create enum e
-gdbtk_test c_variable-7.50 {create enum e} {
- create_variable e
-} {0}
-
-# Test: c_variable-7.51
-# Desc: value of e
-gdbtk_test c_variable-7.51 {value of e} {
- $var(e) value bar
- $var(e) value
-} {bar}
-
-# Test: c_variable-7.52
-# Desc: type of e
-gdbtk_test c_variable-7.52 {type of e} {
- $var(e) type
-} {enum foo}
-
-# Test: c_variable-7.53
-# Desc: is e editable
-gdbtk_test c_variable-7.53 {is e editable} {
- $var(e) editable
-} {1}
-
-# Test: c_variable-7.54
-# Desc: number of children of e
-gdbtk_test c_variable-7.54 {number of children of e} {
- $var(e) numChildren
-} {0}
-
-# Test: c_variable-7.55
-# Desc: children of e
-gdbtk_test c_variable-7.55 {children of e} {
- get_children e
-} {}
-
-# Test: c_variable-7.60
-# Desc: create anone
-gdbtk_test c_variable-7.60 {create anone} {
- create_variable anone
-} {0}
-
-# Test: c_variable-7.61
-# Desc: value of anone
-gdbtk_test c_variable-7.61 {value of e} {
- $var(e) value bar
- $var(e) value
-} {bar}
-
-# Test: c_variable-7.62
-# Desc: type of e
-gdbtk_test c_variable-7.62 {type of e} {
- $var(e) type
-} {enum foo}
-
-# Test: c_variable-7.63
-# Desc: is e editable
-gdbtk_test c_variable-7.63 {is e editable} {
- $var(e) editable
-} {1}
-
-# Test: c_variable-7.64
-# Desc: number of children of e
-gdbtk_test c_variable-7.64 {number of children of e} {
- $var(e) numChildren
-} {0}
-
-# Test: c_variable-7.65
-# Desc: children of e
-gdbtk_test c_variable-7.65 {children of e} {
- get_children e
-} {}
-
-# Test: c_variable-7.70
-# Desc: create anone
-gdbtk_test c_variable-7.70 {try to create anone again (duplicate obj name} {
- create_variable anone
-} {1}
-
-# Test: c_variable-7.71
-# Desc: value of anone
-gdbtk_test c_variable-7.71 {value of anone} {
- $var(anone) value A
- $var(anone) value
-} {A}
-
-# Test: c_variable-7.72
-# Desc: type of anone
-gdbtk_test c_variable-7.72 {type of anone} {
- $var(anone) type
-} {enum}
-
-# Test: c_variable-7.73
-# Desc: is anone editable
-gdbtk_test c_variable-7.73 {is anone editable} {
- $var(anone) editable
-} {1}
-
-# Test: c_variable-7.74
-# Desc: number of children of anone
-gdbtk_test c_variable-7.74 {number of children of anone} {
- $var(anone) numChildren
-} {0}
-
-# Test: c_variable-7.75
-# Desc: children of anone
-gdbtk_test c_variable-7.75 {children of anone} {
- get_children anone
-} {}
-
-# Record fp
-set fp [gdb_cmd "output/x \$fp"]
-gdb_cmd {break incr_a}
-gdb_cmd {continue}
-
-# Test: c_variable-7.80
-# Desc: stop in incr_a
-gdbtk_test c_variable-7.80 {stop in incr_a} {
- lindex [gdb_loc] 1
-} {incr_a}
-
-# Test: c_variable-7.81
-# Desc: Create variables in different scopes
-gdbtk_test c_variable-7.81 {create variables in different scopes} {
- set a1 [gdb_variable create -expr a]
- set a2 [gdb_variable create -expr a -frame $fp]
-
- set vals {}
- lappend vals [$a1 value]
- lappend vals [$a2 value]
- set vals
-} {2 1}
-
-# Exit
-#
-gdbtk_test_done
-
-#Local Variables:
-#mode: tcl
diff --git a/gdb/testsuite/gdb.gdbtk/configure b/gdb/testsuite/gdb.gdbtk/configure
deleted file mode 100644
index 16dc537ba46..00000000000
--- a/gdb/testsuite/gdb.gdbtk/configure
+++ /dev/null
@@ -1,2248 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59.
-#
-# Copyright (C) 2003 Free Software Foundation, Inc.
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-exec 6>&1
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_config_libobj_dir=.
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Maximum number of lines to put in a shell here document.
-# This variable seems obsolete. It should probably be removed, and
-# only ac_max_sed_lines should be used.
-: ${ac_max_here_lines=38}
-
-# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-
-ac_unique_file="defs"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os LIBOBJS LTLIBOBJS'
-ac_subst_files=''
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-ac_prev=
-for ac_option
-do
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case $ac_option in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir=$ac_optarg ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build_alias ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build_alias=$ac_optarg ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file=$ac_optarg ;;
-
- --config-cache | -C)
- cache_file=config.cache ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir=$ac_optarg ;;
-
- -disable-* | --disable-*)
- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- eval "enable_$ac_feature=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_$ac_feature='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix=$ac_optarg ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he | -h)
- ac_init_help=long ;;
- -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
- ac_init_help=recursive ;;
- -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
- ac_init_help=short ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host_alias ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host_alias=$ac_optarg ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir=$ac_optarg ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir=$ac_optarg ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir=$ac_optarg ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir=$ac_optarg ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir=$ac_optarg ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir=$ac_optarg ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c | -n)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir=$ac_optarg ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix=$ac_optarg ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix=$ac_optarg ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix=$ac_optarg ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name=$ac_optarg ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir=$ac_optarg ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir=$ac_optarg ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site=$ac_optarg ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir=$ac_optarg ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir=$ac_optarg ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target_alias ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target_alias=$ac_optarg ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers | -V)
- ac_init_version=: ;;
-
- -with-* | --with-*)
- ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "with_$ac_package='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/-/_/g'`
- eval "with_$ac_package=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes=$ac_optarg ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries=$ac_optarg ;;
-
- -*) { echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; }
- ;;
-
- *=*)
- ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
- # Reject names that are not valid shell variable names.
- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
- { (exit 1); exit 1; }; }
- ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
- eval "$ac_envvar='$ac_optarg'"
- export $ac_envvar ;;
-
- *)
- # FIXME: should be removed in autoconf 3.0.
- echo "$as_me: WARNING: you should use --build, --host, --target" >&2
- expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- { echo "$as_me: error: missing argument to $ac_option" >&2
- { (exit 1); exit 1; }; }
-fi
-
-# Be sure to have absolute paths.
-for ac_var in exec_prefix prefix
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
- localstatedir libdir includedir oldincludedir infodir mandir
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
- if test "x$build_alias" = x; then
- cross_compiling=maybe
- echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
- elif test "x$build_alias" != "x$host_alias"; then
- cross_compiling=yes
- fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_confdir=`(dirname "$0") 2>/dev/null ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$0" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
- { (exit 1); exit 1; }; }
- else
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
- { (exit 1); exit 1; }; }
- fi
-fi
-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
- { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
- { (exit 1); exit 1; }; }
-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
-ac_env_build_alias_set=${build_alias+set}
-ac_env_build_alias_value=$build_alias
-ac_cv_env_build_alias_set=${build_alias+set}
-ac_cv_env_build_alias_value=$build_alias
-ac_env_host_alias_set=${host_alias+set}
-ac_env_host_alias_value=$host_alias
-ac_cv_env_host_alias_set=${host_alias+set}
-ac_cv_env_host_alias_value=$host_alias
-ac_env_target_alias_set=${target_alias+set}
-ac_env_target_alias_value=$target_alias
-ac_cv_env_target_alias_set=${target_alias+set}
-ac_cv_env_target_alias_value=$target_alias
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE. See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
- -h, --help display this help and exit
- --help=short display options specific to this package
- --help=recursive display the short help of all the included packages
- -V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
- --cache-file=FILE cache test results in FILE [disabled]
- -C, --config-cache alias for \`--cache-file=config.cache'
- -n, --no-create do not create output files
- --srcdir=DIR find the sources in DIR [configure dir or \`..']
-
-_ACEOF
-
- cat <<_ACEOF
-Installation directories:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --infodir=DIR info documentation [PREFIX/info]
- --mandir=DIR man documentation [PREFIX/man]
-_ACEOF
-
- cat <<\_ACEOF
-
-System types:
- --build=BUILD configure for building on BUILD [guessed]
- --host=HOST cross-compile to build programs to run on HOST [BUILD]
- --target=TARGET configure for building compilers for TARGET [HOST]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
-
- cat <<\_ACEOF
-
-_ACEOF
-fi
-
-if test "$ac_init_help" = "recursive"; then
- # If there are subdirs, report their specific --help.
- ac_popdir=`pwd`
- for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d $ac_dir || continue
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
- cd $ac_dir
- # Check for guested configure; otherwise get Cygnus style configure.
- if test -f $ac_srcdir/configure.gnu; then
- echo
- $SHELL $ac_srcdir/configure.gnu --help=recursive
- elif test -f $ac_srcdir/configure; then
- echo
- $SHELL $ac_srcdir/configure --help=recursive
- elif test -f $ac_srcdir/configure.ac ||
- test -f $ac_srcdir/configure.in; then
- echo
- $ac_configure --help
- else
- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi
- cd $ac_popdir
- done
-fi
-
-test -n "$ac_init_help" && exit 0
-if $ac_init_version; then
- cat <<\_ACEOF
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
- exit 0
-fi
-exec 5>config.log
-cat >&5 <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by $as_me, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- $ $0 $@
-
-_ACEOF
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
-
-/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
-/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
-/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- echo "PATH: $as_dir"
-done
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_sep=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
- for ac_arg
- do
- case $ac_arg in
- -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- continue ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- case $ac_pass in
- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
- 2)
- ac_configure_args1="$ac_configure_args1 '$ac_arg'"
- if test $ac_must_keep_next = true; then
- ac_must_keep_next=false # Got value, back to normal.
- else
- case $ac_arg in
- *=* | --config-cache | -C | -disable-* | --disable-* \
- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
- | -with-* | --with-* | -without-* | --without-* | --x)
- case "$ac_configure_args0 " in
- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
- esac
- ;;
- -* ) ac_must_keep_next=true ;;
- esac
- fi
- ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
- # Get rid of the leading space.
- ac_sep=" "
- ;;
- esac
- done
-done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log. We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Be sure not to use single quotes in there, as some shells,
-# such as our DU 5.0 friend, will then `close' the trap.
-trap 'exit_status=$?
- # Save into config.log some information that might help in debugging.
- {
- echo
-
- cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
- echo
- # The following way of writing the cache mishandles newlines in values,
-{
- (set) 2>&1 |
- case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- sed -n \
- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
- ;;
- *)
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-}
- echo
-
- cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_vars
- do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
-
- if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------- ##
-## Output files. ##
-## ------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_files
- do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
- fi
-
- if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
- echo
- sed "/^$/d" confdefs.h | sort
- echo
- fi
- test "$ac_signal" != 0 &&
- echo "$as_me: caught signal $ac_signal"
- echo "$as_me: exit $exit_status"
- } >&5
- rm -f core *.core &&
- rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
- exit $exit_status
- ' 0
-for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo >confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
- sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
- { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . $cache_file;;
- *) . ./$cache_file;;
- esac
- fi
-else
- { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
- >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in `(set) 2>&1 |
- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
- eval ac_old_set=\$ac_cv_env_${ac_var}_set
- eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val="\$ac_cv_env_${ac_var}_value"
- eval ac_new_val="\$ac_env_${ac_var}_value"
- case $ac_old_set,$ac_new_set in
- set,)
- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,set)
- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,);;
- *)
- if test "x$ac_old_val" != "x$ac_new_val"; then
- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
-echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
-echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
- fi;;
- esac
- # Pass precious variables to config.status.
- if test "$ac_new_set" = set; then
- case $ac_new_val in
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
- *) ac_arg=$ac_var=$ac_new_val ;;
- esac
- case " $ac_configure_args " in
- *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- esac
- fi
-done
-if $ac_cache_corrupted; then
- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-CC=${CC-cc}
-
-ac_aux_dir=
-for ac_dir in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- elif test -f $ac_dir/shtool; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/shtool install -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \`cd $srcdir;pwd\`/../../.. $srcdir/\`cd $srcdir;pwd\`/../../.." >&5
-echo "$as_me: error: cannot find install-sh or install.sh in \`cd $srcdir;pwd\`/../../.. $srcdir/\`cd $srcdir;pwd\`/../../.." >&2;}
- { (exit 1); exit 1; }; }
-fi
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"
-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
-
-# Make sure we can run config.sub.
-$ac_config_sub sun4 >/dev/null 2>&1 ||
- { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
-echo "$as_me: error: cannot run $ac_config_sub" >&2;}
- { (exit 1); exit 1; }; }
-
-echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6
-if test "${ac_cv_build+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_build_alias=$build_alias
-test -z "$ac_cv_build_alias" &&
- ac_cv_build_alias=`$ac_config_guess`
-test -z "$ac_cv_build_alias" &&
- { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
- { (exit 1); exit 1; }; }
-ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6
-build=$ac_cv_build
-build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6
-if test "${ac_cv_host+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_host_alias=$host_alias
-test -z "$ac_cv_host_alias" &&
- ac_cv_host_alias=$ac_cv_build_alias
-ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6
-host=$ac_cv_host
-host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-echo "$as_me:$LINENO: checking target system type" >&5
-echo $ECHO_N "checking target system type... $ECHO_C" >&6
-if test "${ac_cv_target+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_target_alias=$target_alias
-test "x$ac_cv_target_alias" = "x" &&
- ac_cv_target_alias=$ac_cv_host_alias
-ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_target" >&5
-echo "${ECHO_T}$ac_cv_target" >&6
-target=$ac_cv_target
-target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-test -n "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-
- ac_config_files="$ac_config_files Makefile"
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems. If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-{
- (set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- "s/'/'\\\\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-} |
- sed '
- t clear
- : clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- : end' >>confcache
-if diff $cache_file confcache >/dev/null 2>&1; then :; else
- if test -w $cache_file; then
- test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
- cat confcache >$cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/;
-s/:*\${srcdir}:*/:/;
-s/:*@srcdir@:*/:/;
-s/^\([^=]*=[ ]*\):*/\1/;
-s/:*$//;
-s/^[^=]*=[ ]*$//;
-}'
-fi
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-#
-# If the first sed substitution is executed (which looks for macros that
-# take arguments), then we branch to the quote section. Otherwise,
-# look for a macro that doesn't take arguments.
-cat >confdef2opt.sed <<\_ACEOF
-t clear
-: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
-t quote
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
-t quote
-d
-: quote
-s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
-s,\[,\\&,g
-s,\],\\&,g
-s,\$,$$,g
-p
-_ACEOF
-# We use echo to avoid assuming a particular line-breaking character.
-# The extra dot is to prevent the shell from consuming trailing
-# line-breaks from the sub-command output. A line-break within
-# single-quotes doesn't work because, if this script is created in a
-# platform that uses two characters for line-breaks (e.g., DOS), tr
-# would break.
-ac_LF_and_DOT=`echo; echo .`
-DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
-rm -f confdef2opt.sed
-
-
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
- # 1. Remove the extension, and $U if already installed.
- ac_i=`echo "$ac_i" |
- sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
- # 2. Add them.
- ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-
-: ${CONFIG_STATUS=./config.status}
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-exec 6>&1
-
-# Open the log real soon, to keep \$[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling. Logging --version etc. is OK.
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-} >&5
-cat >&5 <<_CSEOF
-
-This file was extended by $as_me, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-_CSEOF
-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
-echo >&5
-_ACEOF
-
-# Files that config.status was made for.
-if test -n "$ac_config_files"; then
- echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_headers"; then
- echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_links"; then
- echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_commands"; then
- echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTIONS] [FILE]...
-
- -h, --help print this help, then exit
- -V, --version print version number, then exit
- -q, --quiet do not print progress messages
- -d, --debug don't remove temporary files
- --recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
-
-Configuration files:
-$config_files
-
-Report bugs to <bug-autoconf@gnu.org>."
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-ac_cs_version="\\
-config.status
-configured by $0, generated by GNU Autoconf 2.59,
- with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-srcdir=$srcdir
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value. By we need to know if files were specified by the user.
-ac_need_defaults=:
-while test $# != 0
-do
- case $1 in
- --*=*)
- ac_option=`expr "x$1" : 'x\([^=]*\)='`
- ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
- ac_shift=:
- ;;
- -*)
- ac_option=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
- *) # This is not an option, so the user has probably given explicit
- # arguments.
- ac_option=$1
- ac_need_defaults=false;;
- esac
-
- case $ac_option in
- # Handling of the options.
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --vers* | -V )
- echo "$ac_cs_version"; exit 0 ;;
- --he | --h)
- # Conflict between --help and --header
- { { echo "$as_me:$LINENO: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; };;
- --help | --hel | -h )
- echo "$ac_cs_usage"; exit 0 ;;
- --debug | --d* | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- CONFIG_FILES="$CONFIG_FILES $ac_optarg"
- ac_need_defaults=false;;
- --header | --heade | --head | --hea )
- $ac_shift
- CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
- ac_need_defaults=false;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; } ;;
-
- *) ac_config_targets="$ac_config_targets $1" ;;
-
- esac
- shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
- exec 6>/dev/null
- ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-if \$ac_cs_recheck; then
- echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
- exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-fi
-
-_ACEOF
-
-
-
-
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_config_target in $ac_config_targets
-do
- case "$ac_config_target" in
- # Handling of arguments.
- "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used. Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason to put it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=./confstat$$-$RANDOM
- (umask 077 && mkdir $tmp)
-} ||
-{
- echo "$me: cannot create a temporary directory in ." >&2
- { (exit 1); exit 1; }
-}
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-
-#
-# CONFIG_FILES section.
-#
-
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "\$CONFIG_FILES"; then
- # Protect against being on the right side of a sed subst in config.status.
- sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
- s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
-s,@SHELL@,$SHELL,;t t
-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
-s,@exec_prefix@,$exec_prefix,;t t
-s,@prefix@,$prefix,;t t
-s,@program_transform_name@,$program_transform_name,;t t
-s,@bindir@,$bindir,;t t
-s,@sbindir@,$sbindir,;t t
-s,@libexecdir@,$libexecdir,;t t
-s,@datadir@,$datadir,;t t
-s,@sysconfdir@,$sysconfdir,;t t
-s,@sharedstatedir@,$sharedstatedir,;t t
-s,@localstatedir@,$localstatedir,;t t
-s,@libdir@,$libdir,;t t
-s,@includedir@,$includedir,;t t
-s,@oldincludedir@,$oldincludedir,;t t
-s,@infodir@,$infodir,;t t
-s,@mandir@,$mandir,;t t
-s,@build_alias@,$build_alias,;t t
-s,@host_alias@,$host_alias,;t t
-s,@target_alias@,$target_alias,;t t
-s,@DEFS@,$DEFS,;t t
-s,@ECHO_C@,$ECHO_C,;t t
-s,@ECHO_N@,$ECHO_N,;t t
-s,@ECHO_T@,$ECHO_T,;t t
-s,@LIBS@,$LIBS,;t t
-s,@CC@,$CC,;t t
-s,@build@,$build,;t t
-s,@build_cpu@,$build_cpu,;t t
-s,@build_vendor@,$build_vendor,;t t
-s,@build_os@,$build_os,;t t
-s,@host@,$host,;t t
-s,@host_cpu@,$host_cpu,;t t
-s,@host_vendor@,$host_vendor,;t t
-s,@host_os@,$host_os,;t t
-s,@target@,$target,;t t
-s,@target_cpu@,$target_cpu,;t t
-s,@target_vendor@,$target_vendor,;t t
-s,@target_os@,$target_os,;t t
-s,@LIBOBJS@,$LIBOBJS,;t t
-s,@LTLIBOBJS@,$LTLIBOBJS,;t t
-CEOF
-
-_ACEOF
-
- cat >>$CONFIG_STATUS <<\_ACEOF
- # Split the substitutions into bite-sized pieces for seds with
- # small command number limits, like on Digital OSF/1 and HP-UX.
- ac_max_sed_lines=48
- ac_sed_frag=1 # Number of current file.
- ac_beg=1 # First line for current file.
- ac_end=$ac_max_sed_lines # Line after last line for current file.
- ac_more_lines=:
- ac_sed_cmds=
- while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- else
- sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- fi
- if test ! -s $tmp/subs.frag; then
- ac_more_lines=false
- else
- # The purpose of the label and of the branching condition is to
- # speed up the sed processing (if there are no `@' at all, there
- # is no need to browse any of the substitutions).
- # These are the two extra sed commands mentioned above.
- (echo ':t
- /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
- fi
- ac_sed_frag=`expr $ac_sed_frag + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_lines`
- fi
- done
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
- fi
-fi # test -n "$CONFIG_FILES"
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
- esac
-
- # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
-
-
- if test x"$ac_file" != x-; then
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
- rm -f "$ac_file"
- fi
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- if test x"$ac_file" = x-; then
- configure_input=
- else
- configure_input="$ac_file. "
- fi
- configure_input=$configure_input"Generated from `echo $ac_file_in |
- sed 's,.*/,,'` by configure."
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
- sed "$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s,@configure_input@,$configure_input,;t t
-s,@srcdir@,$ac_srcdir,;t t
-s,@abs_srcdir@,$ac_abs_srcdir,;t t
-s,@top_srcdir@,$ac_top_srcdir,;t t
-s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
-s,@builddir@,$ac_builddir,;t t
-s,@abs_builddir@,$ac_abs_builddir,;t t
-s,@top_builddir@,$ac_top_builddir,;t t
-s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
- rm -f $tmp/stdin
- if test x"$ac_file" != x-; then
- mv $tmp/out $ac_file
- else
- cat $tmp/out
- rm -f $tmp/out
- fi
-
-done
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded. So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status. When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
- ac_cs_success=:
- ac_config_status_args=
- test "$silent" = yes &&
- ac_config_status_args="$ac_config_status_args --quiet"
- exec 5>/dev/null
- $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
- exec 5>>config.log
- # Use ||, not &&, to avoid exiting from the if with $? = 1, which
- # would make configure fail if this is the last instruction.
- $ac_cs_success || { (exit 1); exit 1; }
-fi
-
diff --git a/gdb/testsuite/gdb.gdbtk/configure.ac b/gdb/testsuite/gdb.gdbtk/configure.ac
deleted file mode 100644
index 5ab12edbf15..00000000000
--- a/gdb/testsuite/gdb.gdbtk/configure.ac
+++ /dev/null
@@ -1,18 +0,0 @@
-dnl Process this file file with autoconf to produce a configure script.
-dnl This file is a shell script fragment that supplies the information
-dnl necessary to tailor a template configure script into the configure
-dnl script appropriate for this directory. For more information, check
-dnl any existing configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(defs)
-
-CC=${CC-cc}
-AC_SUBST(CC)
-AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../..)
-AC_CANONICAL_SYSTEM
-
-dnl Check for exe extension set on certain hosts (e.g. Win32)
-AC_EXEEXT
-
-AC_OUTPUT(Makefile)
diff --git a/gdb/testsuite/gdb.gdbtk/console.exp b/gdb/testsuite/gdb.gdbtk/console.exp
deleted file mode 100644
index b17eaa11ee7..00000000000
--- a/gdb/testsuite/gdb.gdbtk/console.exp
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 1998, 1999, 2001, 2004 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-load_lib ../gdb.gdbtk/insight-support.exp
-
-if {[gdbtk_initialize_display]} {
- if {$tracelevel} {
- strace $tracelevel
- }
-
- #
- # test console window
- #
- set prms_id 0
- set bug_id 0
-
- set testfile "simple"
- set srcfile ${testfile}.c
- set binfile ${objdir}/${subdir}/${testfile}
- set r [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}]
- if { $r != "" } {
- gdb_suppress_entire_file \
- "Testcase compile failed, so some tests in this file will automatically fail."
- }
-
- # Start with a fresh gdbtk
- gdb_exit
- set results [gdbtk_start [file join $srcdir $subdir console.test]]
- set results [split $results \n]
-
- # Analyze results
- gdbtk_done $results
-}
diff --git a/gdb/testsuite/gdb.gdbtk/console.test b/gdb/testsuite/gdb.gdbtk/console.test
deleted file mode 100644
index 41e79465cd2..00000000000
--- a/gdb/testsuite/gdb.gdbtk/console.test
+++ /dev/null
@@ -1,491 +0,0 @@
-# Copyright (C) 1998, 1999, 2002 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Keith Seitz (keiths@cygnus.com)
-
-# Read in the standard defs file
-
-if {![gdbtk_read_defs]} {
- break
-}
-
-global objdir test_ran
-global console text
-set console [ManagedWin::open Console]
-set text [$console test set _twin]
-
-##### #####
-# #
-# Helper functions for this module #
-# #
-##### #####
-
-# console_command --
-# Invoke STRING as a command in the console window and
-# return the result
-proc console_command {string} {
- global console text
-
- # Save current position
- set line [lindex [split [$text index cmdmark] .] 0]
- incr line 1
-
- # Insert and invoke command
- $text insert end $string
- $console invoke
- update
-
- # Get the result
- set end [lindex [split [$text index cmdmark] .] 0]
- incr end -1
- return [$text get $line.0 [list $end.0 lineend]]
-}
-
-# get_cmd_line --
-# Return the command line
-proc get_cmd_line {} {
- global text
-
- update
- set index [$text index cmdmark]
- return [$text get [list $index linestart] [list $index lineend]]
-}
-
-# clear_command_line --
-# Clear the command line
-proc clear_command_line {} {
- global text
- $text delete {cmdmark + 1 char} insert
-}
-
-##### #####
-# #
-# CONSOLE TESTS #
-# #
-##### #####
-
-#
-# Miscellaneous tests
-#
-
-# Test: console-misc-1
-# Desc: Change console prompt
-gdbtk_test console-misc-1 {change console prompt} {
- # Insert the "set prompt" command into the text widget
- console_command {set prompt (test) }
-
- $text get {cmdmark linestart} {cmdmark lineend}
-} {(test) }
-if {$test_ran} {
- console_command {set prompt (gdb) }
-}
-
-#
-# Paste tests
-#
-
-# Test: console-paste-1
-# Desc: Paste the X selection into console window
-gdbtk_test console-paste-1 {paste X text} {
- # This is cheesy, but it works... Create a text widget
- # which holds the current selection...
- text .test_text
- .test_text insert end "this is some pasted text"
- .test_text tag add sel 1.0 {1.0 lineend}
- event generate .test_text <<Copy>>
- event generate $text <<Paste>>
- get_cmd_line
-} {(gdb) this is some pasted text}
-if {$test_ran} {
- destroy .test_text
- clear_command_line
-}
-
-#
-# Test for errors
-#
-
-# Test: console-error-1
-# Desc: Check if console window reports internal gdb errors
-gdbtk_test console-error-1 {invoke unknown command} {
- console_command {this_command_doesn't_exist}
-} {Error: Undefined command: "this". Try "help".
-}
-
-#
-# History tests
-#
-
-# Test: console-history-1.1
-# Desc: Exercise the up-history functionality
-gdbtk_test console-history-1.1 {up history once} {
- # Add some commands into the command buffer
- console_command {show annotate}
- console_command {show complaints}
- console_command {show confirm}
- console_command {show height}
- console_command {show language}
- console_command {show print demangle}
- console_command {show remotebaud}
- console_command {show remotebreak}
- console_command {show remotecache}
- console_command {show remotedebug}
- console_command {show remotedevice}
- console_command {show remotelogbase}
- console_command {help quit}
- console_command {help si}
- # this doesn't seem to work reliably: event generate $text <Up>
- $console test _previous
- get_cmd_line
-} {(gdb) help si}
-if {$test_ran} {
- clear_command_line
-}
-
-# Test: console-history-1.2
-# Desc: Exercise the up-history functionality
-gdbtk_test console-history-1.2 {up history twice} {
- # Add some commands into the command buffer
- console_command {show annotate}
- console_command {show complaints}
- console_command {show confirm}
- console_command {show height}
- console_command {show language}
- console_command {show print demangle}
- console_command {show remotebaud}
- console_command {show remotebreak}
- console_command {show remotecache}
- console_command {show remotedebug}
- console_command {show remotedevice}
- console_command {show remotelogbase}
- console_command {help quit}
- console_command {help si}
- # this doesn't seem to work reliably: event generate $text <Up>
- # this doesn't seem to work reliably: event generate $text <Up>
- $console test _previous
- $console test _previous
- get_cmd_line
-} {(gdb) help quit}
-if {$test_ran} {
- clear_command_line
-}
-
-# Test: console-history-1.3
-# Desc: Exercise the up-history functionality
-gdbtk_test console-history-1.3 {up history four times} {
- # Add some commands into the command buffer
- console_command {show annotate}
- console_command {show complaints}
- console_command {show confirm}
- console_command {show height}
- console_command {show language}
- console_command {show print demangle}
- console_command {show remotebaud}
- console_command {show remotebreak}
- console_command {show remotecache}
- console_command {show remotedebug}
- console_command {show remotedevice}
- console_command {show remotelogbase}
- console_command {help quit}
- console_command {help si}
-
- for {set i 0} {$i < 4} {incr i} {
- # this doesn't seem to work reliably: event generate $text <Up>
- $console test _previous
- }
- get_cmd_line
-} {(gdb) show remotedevice}
-if {$test_ran} {
- clear_command_line
-}
-
-# Test: console-history-1.4
-# Desc: Exercise the up-history functionality
-gdbtk_test console-history-1.4 {up fourteen times} {
- # Add some commands into the command buffer
- console_command {show annotate}
- console_command {show complaints}
- console_command {show confirm}
- console_command {show height}
- console_command {show language}
- console_command {show print demangle}
- console_command {show remotebaud}
- console_command {show remotebreak}
- console_command {show remotecache}
- console_command {show remotedebug}
- console_command {show remotedevice}
- console_command {show remotelogbase}
- console_command {help quit}
- console_command {help si}
- for {set i 0} {$i < 14} {incr i} {
- # this doesn't seem to work reliably: event generate $text <Up>
- $console test _previous
- }
- get_cmd_line
-} {(gdb) show annotate}
-if {$test_ran} {
- clear_command_line
-}
-
-# Test: console-history-1.5
-# Desc: Exercise the up-history search functionality
-gdbtk_test console-history-1.5 {up search} {
- # Add some commands into the command buffer
- console_command {show height}
- console_command {show annotate}
- console_command {show complaints}
- console_command {print main}
- console_command {show remotelogbase}
- console_command {help quit}
- console_command {help si}
-
- $text insert end "sh"
- # this doesn't seem to work reliably: event generate $text <Shift-Up>
- # this doesn't seem to work reliably: event generate $text <Shift-Up>
- # this doesn't seem to work reliably: event generate $text <Shift-Up>
- $console test _search_history
- $console test _search_history
- $console test _search_history
- get_cmd_line
-} {(gdb) show annotate}
-
-
-# Test: console-history-1.6
-# Desc: Exercise the down-history search functionality
-gdbtk_test console-history-1.6 {down search} {
- # this doesn't seem to work reliably: event generate $text <Shift-Down>
- # this doesn't seem to work reliably: event generate $text <Shift-Down>
- $console test _rsearch_history
- $console test _rsearch_history
- get_cmd_line
-} {(gdb) show remotelogbase}
-
-# Test: console-history-1.7
-# Desc: Down-history search to bottom
-# We go back down until the original partialcommand is displayed
-gdbtk_test console-history-1.7 {down search to bottom} {
- # this doesn't seem to work reliably: event generate $text <Shift-Down>
- # this doesn't seem to work reliably: event generate $text <Shift-Down>
- $console test _rsearch_history
- $console test _rsearch_history
- get_cmd_line
-} {(gdb) sh}
-
-# Test: console-history-1.8
-# Desc: Up-history search to top
-# We go up until there are no matches
-gdbtk_test console-history-1.8 {up search to top} {
- for {set i 0} {$i < 100} {incr i} {
- # this doesn't seem to work reliably: event generate $text <Shift-Up>
- $console test _search_history
- }
- get_cmd_line
-} {(gdb) show annotate}
-
-if {$test_ran} {
- clear_command_line
-}
-
-# Test: console-history-2.1
-# Desc: Exercise the down-history functionality
-gdbtk_test console-history-2.1 {down once} {
- # Add some commands into the command buffer
- console_command {show annotate}
- console_command {show complaints}
- console_command {show confirm}
- console_command {show height}
- console_command {show language}
- console_command {show print demangle}
- console_command {show remotebaud}
- console_command {show remotebreak}
- console_command {show remotecache}
- console_command {show remotedebug}
- console_command {show remotedevice}
- console_command {show remotelogbase}
- console_command {help quit}
- console_command {help si}
-
- for {set i 0} {$i < 14} {incr i} {
- # this doesn't seem to work reliably: event generate $text <Up>
- $console test _previous
- }
- # this doesn't seem to work reliably: event generate $text <Down>
- $console test _next
- get_cmd_line
-} {(gdb) show complaints}
-if {$test_ran} {
- clear_command_line
-}
-
-# Test: console-history-2.2
-# Desc: Exercise the down-history functionality
-gdbtk_test console-history-2.2 {down twice} {
- # Add some commands into the command buffer
- console_command {show annotate}
- console_command {show complaints}
- console_command {show confirm}
- console_command {show height}
- console_command {show language}
- console_command {show print demangle}
- console_command {show remotebaud}
- console_command {show remotebreak}
- console_command {show remotecache}
- console_command {show remotedebug}
- console_command {show remotedevice}
- console_command {show remotelogbase}
- console_command {help quit}
- console_command {help si}
-
- for {set i 0} {$i < 14} {incr i} {
- # this doesn't seem to work reliably: event generate $text <Up>
- $console test _previous
- }
-
- # this doesn't seem to work reliably: event generate $text <Down>
- # this doesn't seem to work reliably: event generate $text <Down>
- $console test _next
- $console test _next
- get_cmd_line
-} {(gdb) show confirm}
-if {$test_ran} {
- clear_command_line
-}
-
-# Test: console-history-2.3
-# Desc: Exercise the down-history functionality
-gdbtk_test console-history-2.3 {down four times} {
- # Add some commands into the command buffer
- console_command {show annotate}
- console_command {show complaints}
- console_command {show confirm}
- console_command {show height}
- console_command {show language}
- console_command {show print demangle}
- console_command {show remotebaud}
- console_command {show remotebreak}
- console_command {show remotecache}
- console_command {show remotedebug}
- console_command {show remotedevice}
- console_command {show remotelogbase}
- console_command {help quit}
- console_command {help si}
-
- for {set i 0} {$i < 14} {incr i} {
- # this doesn't seem to work reliably: event generate $text <Up>
- $console test _previous
- }
-
- for {set i 0} {$i < 4} {incr i} {
- # this doesn't seem to work reliably: event generate $text <Down>
- $console test _next
- }
- get_cmd_line
-} {(gdb) show language}
-if {$test_ran} {
- clear_command_line
-}
-
-# Test: console-history-2.4
-# Desc: Exercise the down-history functionality
-gdbtk_test console-history-2.4 {down infinitely} {
- # Add some commands into the command buffer
- console_command {show annotate}
- console_command {show complaints}
- console_command {show confirm}
- console_command {show height}
- console_command {show language}
- console_command {show print demangle}
- console_command {show remotebaud}
- console_command {show remotebreak}
- console_command {show remotecache}
- console_command {show remotedebug}
- console_command {show remotedevice}
- console_command {show remotelogbase}
- console_command {help quit}
- console_command {help si}
- for {set i 0} {$i < 14} {incr i} {
- # this doesn't seem to work reliably: event generate $text <Up>
- $console test _previous
- }
-
- for {set i 0} {$i < 20} {incr i} {
- # this doesn't seem to work reliably: event generate $text <Down>
- $console test _next
- }
- get_cmd_line
-} {(gdb) }
-if {$test_ran} {
- clear_command_line
-}
-
-#
-# gdb - gdbtk Interface Tests
-#
-
-# Test: console-interface-1.1
-# Desc: Verify that a "file" command in the console window causes
-# gdb to invoke the pre-/post-add-symbol hooks
-set file_loaded 0
-gdbtk_test console-interface-1.1 {file command goes through hooks} {
- global TEST1_RESULT TEST2_RESULT
-
- # This is really ugly, but its the only way to do this...
- rename gdbtk_tcl_pre_add_symbol pre_add
- rename gdbtk_tcl_post_add_symbol post_add
-
- proc gdbtk_tcl_pre_add_symbol {file} {
- global TEST1_RESULT
-
- set TEST1_RESULT $file
- pre_add $file
- }
- proc gdbtk_tcl_post_add_symbol {} {
- global TEST2_RESULT
-
- set TEST2_RESULT ok
- post_add
- }
-
- # load a file and make sure we went through the pre/post_add_symbol hooks
- set TEST1_RESULT {}
- set TEST2_RESULT {}
- set file [file join $objdir simple]
- console_command "file $file"
- if {$TEST1_RESULT != $file} {
- set result "did not go through gdbtk_tcl_pre_add_symbol ($TEST1_RESULT)"
- } elseif {$TEST2_RESULT != "ok"} {
- set result "did not go through gdbtk_tcl_post_add_symbol"
- } else {
- set result {}
- set file_loaded 1
- }
-
- set result
-} {}
-if {$test_ran} {
- rename gdbtk_tcl_pre_add_symbol {}
- rename gdbtk_tcl_post_add_symbol {}
- rename pre_add gdbtk_tcl_pre_add_symbol
- rename post_add gdbtk_tcl_post_add_symbol
-}
-
-#
-# Exit
-#
-gdbtk_test_done
diff --git a/gdb/testsuite/gdb.gdbtk/cpp_variable.cc b/gdb/testsuite/gdb.gdbtk/cpp_variable.cc
deleted file mode 100644
index deecc295a7f..00000000000
--- a/gdb/testsuite/gdb.gdbtk/cpp_variable.cc
+++ /dev/null
@@ -1,33 +0,0 @@
-#include "cpp_variable.h"
-
-static void do_simple_class_tests (void);
-
-int
-VB::fvb_pub () {return 300 + vb_pub_int;}
-
-int
-VB::vvb_pub () {return 400 + vb_pub_int;}
-
-int
-V::f () {return 600 + v_pub_int;}
-
-int
-V::vv () {return 400 + v_pub_int;}
-
-int
-VC::fvc () {return 300 + vc_pub_int;}
-
-int
-VC::vfvc () {return 100 + vc_pub_int;}
-
-main ()
-{
- do_simple_class_tests ();
-}
-
-static void
-do_simple_class_tests (void)
-{
- V *v = new V;
- V vv;
-}
diff --git a/gdb/testsuite/gdb.gdbtk/cpp_variable.exp b/gdb/testsuite/gdb.gdbtk/cpp_variable.exp
deleted file mode 100644
index a7764f67199..00000000000
--- a/gdb/testsuite/gdb.gdbtk/cpp_variable.exp
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright 1999, 2001, 2004 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-load_lib ../gdb.gdbtk/insight-support.exp
-
-if {[gdbtk_initialize_display]} {
- if {$tracelevel} {
- strace $tracelevel
- }
-
- set results {}
- if {[skip_cplus_tests]} {
- # Target doesn't have c++ support
- verbose "No C++ support -- skipping test"
- } else {
- #
- # test variable API
- #
- set prms_id 0
- set bug_id 0
-
- set testfile "cpp_variable"
- set srcfile ${testfile}.cc
- set binfile ${objdir}/${subdir}/${testfile}
- set r [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}]
- if { $r != "" } {
- gdb_suppress_entire_file \
- "Testcase compile failed, so some tests in this file will automatically fail."
- }
-
- # Start with a fresh gdbtk
- gdb_exit
- set results [gdbtk_start [file join $srcdir $subdir ${testfile}.test]]
- set results [split $results \n]
- }
-
- # Analyze results
- gdbtk_done $results
-}
diff --git a/gdb/testsuite/gdb.gdbtk/cpp_variable.h b/gdb/testsuite/gdb.gdbtk/cpp_variable.h
deleted file mode 100644
index 40fda99a4dd..00000000000
--- a/gdb/testsuite/gdb.gdbtk/cpp_variable.h
+++ /dev/null
@@ -1,54 +0,0 @@
-struct _foo
-{
- int a[10];
- char *p;
-};
-
-class VA
-{
- public:
- int va_pub_int;
- char *va_pub_charp;
-
- private:
- int va_priv_int;
- char *va_priv_charp;
-
- protected:
- struct _foo bar;
-};
-
-class VB
-{
- public:
- int vb_pub_int;
-
- int fvb_pub ();
- virtual int vvb_pub ();
-
- private:
- int vb_priv_int;
- char *vb_priv_charp;
-};
-
-class VC
-{
- public:
- int vc_pub_int;
-
- int fvc ();
- virtual int vfvc ();
-};
-
-class V : public VA, public VB, public VC
-{
- public:
- int f ();
- virtual int vv ();
- int v_pub_int;
- char *v_pub_charp;
-
- private:
- int v_priv_int;
- char *v_priv_charp;
-};
diff --git a/gdb/testsuite/gdb.gdbtk/cpp_variable.test b/gdb/testsuite/gdb.gdbtk/cpp_variable.test
deleted file mode 100644
index d2de6f3deea..00000000000
--- a/gdb/testsuite/gdb.gdbtk/cpp_variable.test
+++ /dev/null
@@ -1,594 +0,0 @@
-# Varobj Tests (C++ language)
-# Copyright (C) 1998, 2003 Red Hat, Inc.
-#
-# This Program Is Free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# insight@sources.redhat.com
-
-# This file was written by Keith Seitz (keiths@cygnus.com)
-
-# Read in the standard defs file
-if {![gdbtk_read_defs]} {
- break
-}
-
-global objdir test_ran
-
-# Load in a file
-set program [file join $objdir cpp_variable]
-if {[catch {gdbtk_test_file $program} t]} {
- # This isn't a test case, since if this fails, we're hosed.
- gdbtk_test_error "loading \"$program\": $t"
-}
-
-# The variables that are created are stored in an array called "var".
-
-# proc to tell us which of the variables are changed/out of scope
-proc check_update {} {
- global var
-
- set out {}
- set changed {}
- foreach ind [array names var] {
- set ret [$var($ind) update]
- if {$ret == -1} {
- lappend out $ind
- } elseif {$ret != ""} {
- lappend changed $ret
- }
- }
- return [list $changed $out]
-}
-
-
-# proc to create a variable
-proc create_variable {expr} {
- global var
-
- set err [catch {gdb_variable create "$expr" -expr $expr} v]
- if {!$err} {
- set var($expr) $v
- }
-
- return $err
-}
-
-# proc to get the children
-# Children are stored in the global "var" as
-# PARENT.child. So for struct _foo {int a; int b} bar;,
-# the children returned are {a b} and var(bar.a) and var(bar.b)
-# map the actual objects to their names.
-proc get_children {parent} {
- global var
-
- set kiddies [$var($parent) children]
- set children {}
- foreach child $kiddies {
- set name [lindex [split $child .] end]
- lappend children $name
- set var($parent.$name) $child
- }
-
- return $children
-}
-
-proc delete_variable {varname} {
- global var
-
- if {[info exists var($varname)]} {
- # This has to be caught, since deleting a parent
- # will erase all children.
- $var($varname) delete
- set vars [array names var $varname*]
- foreach v $vars {
- if {[info exists var($v)]} {
- unset var($v)
- }
- }
- }
-}
-
-# Compare the values of variable V in format FMT with value of OBJ
-# with gdb's value.
-proc cppvalue {obj v fmt} {
- global var
- global _test
-
- puts $_test(logfile) "obj=$obj v=$v fmt=$fmt"
- puts $_test(logfile) "var(\$obj)=$var($obj)"
-
- set value [$var($obj) value]
- set gdb [gdb_cmd "output/$fmt $v"]
- puts $_test(logfile) "output/$fmt $v"
- if {$value == $gdb} {
- puts $_test(logfile) "gdbtk: $value == gdb: $gdb"
- set result ok
- } else {
- set result $v
- puts $_test(logfile) "gdbtk: $value <> gdb: $gdb"
- }
-
- return $result
-}
-
-proc delete_all_variables {} {
- global var
-
- foreach variable [array names var] {
- delete_variable $variable
- }
-}
-
-##### #####
-# #
-# Simple Class Tests #
-# #
-##### #####
-
-# run to "do_simple_class_tests"
-gdb_cmd "break do_simple_class_tests"
-gdbtk_test_run
-
-# Test: cpp_variable-1.1
-# Desc: stopped in do_simple_class_tests
-gdbtk_test cpp_variable-1.1 {stopped in do_simple_class_tests} {
- # G++ can output "do_simple_class_tests(void)". Strip the "(void)" part.
- set loc [lindex [gdb_loc] 1]
- set index [string first \( $loc]
- if {$index > 0} {
- set loc [string range $loc 0 [expr {$index-1}]]
- }
- set loc
-} {do_simple_class_tests}
-
-# Test: cpp_variable-1.2
-# Desc: create variable v
-gdbtk_test cpp_variable-1.2 {create variable v} {
- create_variable v
-} {0}
-
-# Test: cpp_variable-1.3
-# Desc: number of children of v
-gdbtk_test cpp_variable-1.3 {number of children of v} {
- $var(v) numChildren
-} {5}
-
-# Test: cpp_variable-1.4a
-# Desc: children of v
-gdbtk_test cpp_variable-1.4a {children of v} {
- get_children v
-} {VA VB VC public private}
-
-# Test: cpp_variable-1.4b
-# Desc: public children of v
-gdbtk_test cpp_variable-1.4b {public children of v} {
- get_children v.public
-} {v_pub_int v_pub_charp}
-
-# Test: cpp_variable-1.4c
-# Desc: private children of v
-gdbtk_test cpp_variable-1.4c {private children of v} {
- get_children v.private
-} {v_priv_int v_priv_charp}
-
-# Test: cpp_variable-1.5
-# Desc: type of v
-gdbtk_test cpp_variable-1.5 {type of v} {
- $var(v) type
-} {V *}
-
-# Test: cpp_variable-1.6
-# Desc: format of v
-gdbtk_test cpp_variable-1.6 {format of v} {
- $var(v) format
-} {natural}
-
-set value {}
-catch {$var(v) value} value
-
-# Test: cpp_variable-1.6a
-# Desc: Step over "V *v = new V;"
-gdbtk_test cpp_variable-1.6a {step over "V *v = new V;"} {
- catch {gdb_cmd "next"}
-} {0}
-
-# Test: cpp_variable-1.7
-# Desc: check value of v changed
-gdbtk_test cpp_variable-1.7 {check value of v changed} {
- set changes [check_update]
- # It is undefined whether the children will change values
- # or not, so ignore them.
- expr {[lsearch [lindex [lindex $changes 0] 0] v] != -1}
-} {1}
-
-# Test: cpp_variable-1.8
-# Desc: check values of v
-gdbtk_test cpp_variable-1.8 {check values of v} {
- set new [$var(v) value]
- expr {$new != $value}
-} {1}
-
-# Test: cpp_variable-1.9
-# Desc: v editable
-gdbtk_test cpp_variable-1.9 {v editable} {
- $var(v) editable
-} {1}
-
-##### #####
-# #
-# Children of v tests #
-# #
-##### #####
-
-# Test: cpp_variable-2.1
-# Desc: type of v.v_pub_int
-gdbtk_test cpp_variable-2.1 {type of v.v_pub_int} {
- $var(v.public.v_pub_int) type
-} {int}
-
-# Test: cpp_variable-2.2
-# Desc: format of v.v_pub_int
-gdbtk_test cpp_variable-2.2 {format of v.v_pub_int} {
- $var(v.public.v_pub_int) format
-} {natural}
-
-# Test: cpp_variable-2.2a
-# Desc: set variable v->v_pub_int=2112
-gdbtk_test cpp_variable-2.2a {set variable v.v_pub_int=2112} {
- set err [catch {gdb_cmd "set variable v.v_pub_int=2112"} txt]
- if {$err} {
- set txt
- } else {
- set err
- }
-} {0}
-
-# Test: cpp_variable-2.3
-# Desc: value of v.v_pub_int changed
-gdbtk_test cpp_variable-2.3 {value of v.v_pub_int changed} {
- check_update
-} {v.public.v_pub_int {v.private.v_priv_charp v.VB v.private.v_priv_int v.VC v.public.v_pub_charp v.public.v_pub_int v.private v.public v.VA}}
-
-# Test: cpp_variable-2.4
-# Desc: value of v.v_pub_int
-gdbtk_test cpp_variable-2.4 {value of v.v_pub_int} {
- $var(v.public.v_pub_int) value
-} {2112}
-
-# Test: cpp_variable-2.5
-# Desc: changed format of v.v_pub_int
-gdbtk_test cpp_variable-2.5 {changed format of v.v_pub_int} {
- $var(v.public.v_pub_int) format octal
- $var(v.public.v_pub_int) format
-} {octal}
-
-# Test: cpp_variable-2.6
-# Desc: value of v.v_pub_int with new format
-gdbtk_test cpp_variable-2.6 {value of v.v_pub_int with new format} {
- $var(v.public.v_pub_int) value
-} {04100}
-
-# Test: cpp_variable-2.7
-# Desc: change value of v.v_pub_int (decimal)
-gdbtk_test cpp_variable-2.7 {change value of v.v_pub_int (decimal)} {
- $var(v.public.v_pub_int) value 3
- cppvalue v.public.v_pub_int v.v_pub_int o
-} {ok}
-
-# Test: cpp_variable-2.8
-# Desc: change value of v.v_pub_int (hexadecimal)
-gdbtk_test cpp_variable-2.8 {change value of v.v_pub_int (hexadecimal)} {
- $var(v.public.v_pub_int) value 0x21
- cppvalue v.public.v_pub_int v.v_pub_int o
-} {ok}
-
-# Test: cpp_variable-2.9
-# Desc: number of children of v_pub_int
-gdbtk_test cpp_variable-2.9 {number of children of v_pub_int} {
- $var(v.public.v_pub_int) numChildren
-} {0}
-
-# Test: cpp_variable-2.10
-# Desc: children of v.v_pub_int
-gdbtk_test cpp_variable-2.10 {children of v.v_pub_int} {
- get_children v.public.v_pub_int
-} {}
-
-# Test: cpp_variable-2.11
-# Desc: v.v_pub_int editable
-gdbtk_test cpp_variable-2.11 {v.v_pub_int editable} {
- $var(v.public.v_pub_int) editable
-} {1}
-
-# Test: cpp_variable-2.21
-# Desc: type of v.v_priv_charp
-gdbtk_test cpp_variable-2.21 {type of v.v_priv_charp} {
- $var(v.private.v_priv_charp) type
-} {char *}
-
-# Test: cpp_variable-2.22
-# Desc: format of v.v_priv_charp
-gdbtk_test cpp_variable-2.22 {format of v.v_priv_charp} {
- $var(v.private.v_priv_charp) format
-} {natural}
-
-# Test: cpp_variable-2.22a
-# Desc: set variable v->v_priv_charp=2112
-gdbtk_test cpp_variable-2.22a {set variable v->v_priv_charp=2112} {
- set err [catch {gdb_cmd "set variable v->v_priv_charp=2112"} txt]
- if {$err} {
- set txt
- } else {
- set err
- }
-} {0}
-
-# Test: cpp_variable-2.23
-# Desc: value of v.v_priv_charp changed
-gdbtk_test cpp_variable-2.23 {value of v.v_priv_charp changed} {
- check_update
-} {{{v.public.v_pub_int v.private.v_priv_charp}} {v.private.v_priv_charp v.VB v.private.v_priv_int v.VC v.public.v_pub_charp v.public.v_pub_int v.private v.public v.VA}}
-
-# Test: cpp_variable-2.24
-# Desc: value of v.v_priv_charp
-gdbtk_test cpp_variable-2.24 {value of v.v_priv_charp} {
- $var(v.private.v_priv_charp) format hexadecimal
- $var(v.private.v_priv_charp) value
-} {0x840}
-
-# Test: cpp_variable-2.25
-# Desc: changed format of v.v_priv_charp
-gdbtk_test cpp_variable-2.25 {changed format of v.v_priv_charp} {
- $var(v.private.v_priv_charp) format octal
- $var(v.private.v_priv_charp) format
-} {octal}
-
-# Test: cpp_variable-2.26
-# Desc: value of v.v_priv_charp with new format
-gdbtk_test cpp_variable-2.26 {value of v.v_priv_charp with new format} {
- $var(v.private.v_priv_charp) value
-} {04100}
-
-# Test: cpp_variable-2.27
-# Desc: change value of v.v_priv_charp (decimal)
-gdbtk_test cpp_variable-2.27 {change value of v.v_priv_charp (decimal)} {
- $var(v.private.v_priv_charp) value 3
- cppvalue v.private.v_priv_charp v.v_priv_charp o
-} {ok}
-
-# Test: cpp_variable-2.28
-# Desc: change value of v.v_priv_charp (hexadecimal)
-gdbtk_test cpp_variable-2.28 {change value of v.v_priv_charp (hexadecimal)} {
- $var(v.private.v_priv_charp) value 0x21
- cppvalue v.private.v_priv_charp v.v_priv_charp o
-} {ok}
-
-# Test: cpp_variable-2.29
-# Desc: number of children of v_priv_charp
-gdbtk_test cpp_variable-2.29 {number of children of v_priv_charp} {
- $var(v.private.v_priv_charp) numChildren
-} {1}
-
-# Test: cpp_variable-2.30
-# Desc: children of v.v_priv_charp
-gdbtk_test cpp_variable-2.30 {children of v.v_priv_charp} {
- get_children v.private.v_priv_charp
-} {*v_priv_charp}
-
-# Test: cpp_variable-2.31
-# Desc: v.v_priv_int editable
-gdbtk_test cpp_variable-2.31 {v.v_priv_int editable} {
- $var(v.private.v_priv_int) editable
-} {1}
-
-# Test: cpp_variable-2.41
-# Desc: type of v.VA
-gdbtk_test cpp_variable-2.41 {type of v.VA} {
- $var(v.VA) type
-} {VA}
-
-# Test: cpp_variable-2.42
-# Desc: format of v.VA
-gdbtk_test cpp_variable-2.42 {format of v.VA} {
- $var(v.VA) format
-} {natural}
-
-# Test: cpp_variable-2.43
-# Desc: value of v.VA changed
-gdbtk_test cpp_variable-2.43 {value of v.VA changed} {
- check_update
-} {v.private.v_priv_charp {v.private.v_priv_charp v.VB v.private.v_priv_int v.VC v.public.v_pub_charp v.private.v_priv_charp.*v_priv_charp v.public.v_pub_int v.private v.public v.VA}}
-
-# Test: cpp_variable-2.44
-# Desc: value of v.VA
-gdbtk_test cpp_variable-2.44 {value of v.VA} {
- $var(v.VA) value
-} {{...}}
-
-# Test: cpp_variable-2.45
-# Desc: changed format of v.VA
-gdbtk_test cpp_variable-2.45 {changed format of v.VA} {
- $var(v.VA) format octal
- $var(v.VA) format
-} {octal}
-
-# Test: cpp_variable-2.46
-# Desc: value of v.VA with new format
-gdbtk_test cpp_variable-2.46 {value of v.VA with new format} {
- $var(v.VA) value
-} {{...}}
-
-# Test: cpp_variable-2.47
-# Desc: number of children of VA
-gdbtk_test cpp_variable-2.47 {number of children of VA} {
- $var(v.VA) numChildren
-} {3}
-
-# Test: cpp_variable-2.48a
-# Desc: children of v.VA
-gdbtk_test cpp_variable-2.48a {children of v.VA} {
- get_children v.VA
-} {public private protected}
-
-# Test: cpp_variable-2.48b
-# Desc: public children of v.VA
-gdbtk_test cpp_variable-2.48b {children of v.VA} {
- get_children v.VA.public
-} {va_pub_int va_pub_charp}
-
-# Test: cpp_variable-2.48c
-# Desc: private children of v.VA
-gdbtk_test cpp_variable-2.48c {children of v.VA} {
- get_children v.VA.private
-} {va_priv_int va_priv_charp}
-
-# Test: cpp_variable-2.48d
-# Desc: protected children of v.VA
-gdbtk_test cpp_variable-2.48d {children of v.VA} {
- get_children v.VA.protected
-} {bar}
-
-# Test: cpp_variable-2.49
-# Desc: v.VA editable
-gdbtk_test cpp_variable-2.49 {v.VA editable} {
- $var(v.VA) editable
-} {0}
-
-# Test: cpp_variable-2.61
-# Desc: type of v.VB
-gdbtk_test cpp_variable-2.61 {type of v.VB} {
- $var(v.VB) type
-} {VB}
-
-# Test: cpp_variable-2.62
-# Desc: format of v.VB
-gdbtk_test cpp_variable-2.62 {format of v.VB} {
- $var(v.VB) format
-} {natural}
-
-# Test: cpp_variable-2.63
-# Desc: value of v.VB changed
-gdbtk_test cpp_variable-2.63 {value of v.VB changed} {
- check_update
-} {{} {v.VA.protected v.private.v_priv_charp.*v_priv_charp v.VA.private v.VA.public.va_pub_int v.private.v_priv_int v.public.v_pub_int v.VA.public.va_pub_charp v.private.v_priv_charp v.VA.public v.public.v_pub_charp v.VA.private.va_priv_int v.VA v.public v.VB v.VC v.VA.protected.bar v.VA.private.va_priv_charp v.private}}
-
-# Test: cpp_variable-2.64
- # Desc: value of v.VB
-gdbtk_test cpp_variable-2.64 {value of v.VB} {
- $var(v.VB) value
-} {{...}}
-
-# Test: cpp_variable-2.65
-# Desc: changed format of v.VB
-gdbtk_test cpp_variable-2.65 {changed format of v.VB} {
- $var(v.VB) format octal
- $var(v.VB) format
-} {octal}
-
-# Test: cpp_variable-2.66
-# Desc: value of v.VB with new format
-gdbtk_test cpp_variable-2.66 {value of v.VB with new format} {
- $var(v.VB) value
-} {{...}}
-
-# Note: The next two tests show whether or not the logic
-# concerning vptr tables is working.
-# Test: cpp_variable-2.67
-# Desc: number of children of VB
-gdbtk_test cpp_variable-2.67 {number of children of VB} {
- $var(v.VB) numChildren
-} {2}
-
-# Test: cpp_variable-2.68a
-# Desc: children of v.VB
-gdbtk_test cpp_variable-2.68a {children of v.VB} {
- get_children v.VB
-} {public private}
-
-# Test: cpp_variable-2.68b
-# Desc: public children of v.VB
-gdbtk_test cpp_variable-2.68b {children of v.VB} {
- get_children v.VB.public
-} {vb_pub_int}
-
-# Test: cpp_variable-2.68c
-# Desc: private children of v.VB
-gdbtk_test cpp_variable-2.68c {children of v.VB} {
- get_children v.VB.private
-} {vb_priv_int vb_priv_charp}
-
-# Test: cpp_variable-2.69
-# Desc: v.VB editable
-gdbtk_test cpp_variable-2.69 {v.VB editable} {
- $var(v.VB) editable
-} {0}
-
-# Test: cpp_variable-2.70
-# Desc: v.VB.public editable
-gdbtk_test cpp_variable-2.70 {v.VB.public editable} {
- $var(v.VB.public) editable
-} {0}
-
-# Test: cpp_variable-2.71
-# Desc: v.VB.vb_pub_int editable
-gdbtk_test cpp_variable-2.71 {v.VB.vb_pub_int editable} {
- $var(v.VB.public.vb_pub_int) editable
-} {1}
-
-# Test: cpp_variable-2.71a
-# Desc: set variable v->vb_pub_int=2112
-gdbtk_test cpp_variable-2.71a {set variable v->v_pub_int=2112} {
- set err [catch {gdb_cmd "set variable v->vb_pub_int=2112"} txt]
- if {$err} {
- set txt
- } else {
- set err
- }
-} {0}
-
-# Test: cpp_variable-2.72
-# Desc: value of v.vb_pub_int changed
-gdbtk_test cpp_variable-2.72 {value of v.vb_pub_int changed} {
- check_update
-} {v.VB.public.vb_pub_int {v.VB.public v.VA.protected v.private.v_priv_charp.*v_priv_charp v.VA.private v.VB.private.vb_priv_int v.VB.private v.VA.public.va_pub_int v.private.v_priv_int v.VB.public.vb_pub_int v.public.v_pub_int v.VB.private.vb_priv_charp v.VA.public.va_pub_charp v.private.v_priv_charp v.VA.public v.public.v_pub_charp v.VA.private.va_priv_int v.VA v.public v.VB v.VC v.VA.protected.bar v.VA.private.va_priv_charp v.private}}
-
-# Test: cpp_variable-2.73
-# Desc: value of v.VB.vb_pub_int
-gdbtk_test cpp_variable-2.73 {changed value of v.vb_pub_int} {
- $var(v.VB.public.vb_pub_int) value
-} {2112}
-
-# Test: cpp_variable-2.74
-# Desc: change value of v.VB.vb_pub_int
-gdbtk_test cpp_variable-2.74 {change value of v.VB.public.vb_pub_int} {
- $var(v.VB.public.vb_pub_int) value 3
- cppvalue v.VB.public.vb_pub_int v.vb_pub_int d
-} {ok}
-
-# Test: cpp_variable-2.75
-# Desc: value of v.VB.vb_pub_int
-gdbtk_test cpp_variable-2.75 {changed value of v.VB.public.vb_pub_int} {
- $var(v.VB.public.vb_pub_int) value
-} {3}
-
-
-# Exit
-#
-gdbtk_test_done
-
-#Local Variables:
-#mode: tcl
-
diff --git a/gdb/testsuite/gdb.gdbtk/defs b/gdb/testsuite/gdb.gdbtk/defs
deleted file mode 100644
index 8e3fe5b4531..00000000000
--- a/gdb/testsuite/gdb.gdbtk/defs
+++ /dev/null
@@ -1,306 +0,0 @@
-# This file contains support code for the gdbtk test suite.
-# Copyright 2001 Red Hat, Inc.
-#
-# Based on the Tcl testsuite support code, portions of this file
-# are Copyright (c) 1990-1994 The Regents of the University of California and
-# Copyright (c) 1994-1996 Sun Microsystems, Inc.
-#
-global _test env srcdir objdir
-
-if {![info exists srcdir]} {
- if {[info exists env(SRCDIR)]} {
- set srcdir $env(SRCDIR)
- } else {
- set srcdir .
- }
-}
-
-if {![info exists objdir]} {
- if {[info exists env(OBJDIR)]} {
- set objdir $env(OBJDIR)
- } elseif {$_test(interactive)} {
- # If running interactively, assume that the objdir is
- # relative to the executable's location
- set objdir [file join [file dirname [info nameofexecutable]] testsuite gdb.gdbtk]
- } else {
- set objdir .
- }
-}
-
-if {![info exists _test(verbose)]} {
- if {[info exists env(GDBTK_VERBOSE)]} {
- set _test(verbose) $env(GDBTK_VERBOSE)
- } else {
- set _test(verbose) 0
- }
-}
-if {![info exists _test(tests)]} {
-
- if {[info exists env(GDBTK_TESTS)]} {
- set _test(tests) $env(GDBTK_TESTS)
- } else {
- set _test(tests) {}
- }
-}
-
-if {[info exists env(GDBTK_LOGFILE)]} {
- set _test(logfile) [open $env(GDBTK_LOGFILE) a+]
- fconfigure $_test(logfile) -buffering none
-} else {
- set _test(logfile) {}
-}
-
-# Informs gdbtk internals that testsuite is running. An example
-# where this is needed is the window manager, which must place
-# all windows at some place on the screen so that the system's
-# window manager does not interfere. This is reset in gdbtk_test_done.
-set env(GDBTK_TEST_RUNNING) 1
-
-# The gdb "file" command to use for gdbtk testing
-# NOTE: This proc appends ".exe" to all windows' programs
-proc gdbtk_test_file {filename} {
- global tcl_platform
-
- if {$tcl_platform(platform) == "windows"} {
- append filename ".exe"
- }
-
- set err [catch {gdb_cmd "file $filename" 1} text]
- if {$err} {
- error $text
- }
-
- return $text
-}
-
-proc gdbtk_test_run {{prog_args {}}} {
- global env
-
- # Get the target_info array from the testsuite
- array set target_info $env(TARGET_INFO)
-
- # We get the target ready by:
- # 1. Run all init commands
- # 2. Issue target command
- # 3. Issue load command
- # 4. Issue run command
- foreach cmd $target_info(init) {
- set err [catch {gdb_cmd $cmd 0} txt]
- if {$err} {
- _report_error "Target initialization command \"$cmd\" failed: $txt"
- return 0
- }
- }
-
- if {$target_info(target) != ""} {
- set err [catch {gdb_cmd $target_info(target) 0} txt]
- if {$err} {
- _report_error "Failed to connect to target: $txt"
- return 0
- }
- }
-
- if {$target_info(load) != ""} {
- set err [catch {gdb_cmd $target_info(load) 0} txt]
- if {$err} {
- _report_error "Failed to load: $txt"
- return 0
- }
- }
-
- if {$target_info(run) != ""} {
- set err [catch {gdb_cmd $target_info(run) 0} txt]
- if {$err} {
- _report_error "Could not run target with \"$target_info(run)\": $txt"
- return 0
- }
- }
-
- return 1
-}
-
-proc _report_error {msg} {
- global _test
-
- if {[info exists _test(interactive)] && $_test(interactive)} {
- # Dialog
- tk_messageBox -message $msg -icon error -type ok
- } else {
- # to stderr
- puts stderr $msg
- }
-}
-
-proc gdbtk_print_verbose {status name description script code answer} {
- global _test
-
- switch $code {
- 0 {
- set code_words {}
- }
- 1 {
- set code_words "Test generated error: $answer"
- }
-
- 2 {
- set code_words "Test generated return exception; result was: $answer"
- }
-
- 3 {
- set code_words "Test generated break exception"
- }
-
- 4 {
- set code_words "Test generated continue exception"
- }
-
- 5 {
- set code_words "Test generated exception $code; message was:$answer"
- }
- }
-
- if {$_test(verbose) > 1 \
- || ($_test(verbose) != 1 && ($status == "ERROR" || $status == "FAIL"))} {
- # Printed when user verbose mode (verbose > 1) or an error/failure occurs
- # not running the testsuite (dejagnu)
- puts stdout "\n"
- puts stdout "==== $name $description"
- puts stdout "==== Contents of test case:"
- puts stdout "$script"
- if {$code_words != ""} {
- puts stdout $code_words
- }
- puts stdout "==== Result was:"
- puts stdout "$answer"
- } elseif {$_test(verbose)} {
- # Printed for the testsuite (verbose = 1)
- puts stdout "[list $status $name $description $code_words]"
-
- if {$_test(logfile) != ""} {
- puts $_test(logfile) "\n"
- puts $_test(logfile) "==== $name $description"
- puts $_test(logfile) "==== Contents of test case:"
- puts $_test(logfile) "$script"
- if {$code_words != ""} {
- puts $_test(logfile) $code_words
- }
- puts $_test(logfile) "==== Result was:"
- puts $_test(logfile) "$answer"
- }
- }
-}
-
-# gdbtk_test
-#
-# This procedure runs a test and prints an error message if the
-# test fails.
-#
-# Arguments:
-# name - Name of test, in the form foo-1.2.
-# description - Short textual description of the test, to
-# help humans understand what it does.
-# script - Script to run to carry out the test. It must
-# return a result that can be checked for
-# correctness.
-# answer - Expected result from script.
-
-proc gdbtk_test {name description script answer} {
- global _test test_ran
-
- set test_ran 0
- if {[string compare $_test(tests) ""] != 0} then {
- set ok 0
- foreach test $_test(tests) {
- if [string match $test $name] then {
- set ok 1
- break
- }
- }
- if !$ok then return
- }
-
- set code [catch {uplevel $script} result]
- set test_ran 1
- if {$code != 0} {
- # Error
- gdbtk_print_verbose ERROR $name $description $script \
- $code $result
- } elseif {[string compare $result $answer] == 0} {
- if {[string index $name 0] == "*"} {
- # XPASS
- set HOW XPASS
- } else {
- set HOW PASS
- }
-
- if {$_test(verbose)} {
- gdbtk_print_verbose $HOW $name $description $script \
- $code $result
- if {$_test(verbose) != 1} {
- puts stdout "++++ $name ${HOW}ED"
- }
- }
- if {$_test(logfile) != ""} {
- puts $_test(logfile) "++++ $name ${HOW}ED"
- }
- } else {
- if {[string index $name 0] == "*"} {
- # XFAIL
- set HOW XFAIL
- } else {
- set HOW FAIL
- }
-
- gdbtk_print_verbose $HOW $name $description $script \
- $code $result
- if {$_test(verbose) != 1} {
- puts stdout "---- Result should have been:"
- puts stdout "$answer"
- puts stdout "---- $name ${HOW}ED"
- }
- if {$_test(logfile) != ""} {
- puts $_test(logfile) "---- Result should have been:"
- puts $_test(logfile) "$answer"
- puts $_test(logfile) "---- $name ${HOW}ED"
- }
- }
-}
-
-proc gdbtk_dotests {file args} {
- global _test
- set savedTests $_test(tests)
- set _test(tests) $args
- source $file
- set _test(tests) $savedTests
-}
-
-proc gdbtk_test_done {} {
- global _test env
-
- if {$_test(logfile) != ""} {
- close $_test(logfile)
- }
-
- set env(GDBTK_TEST_RUNNING) 0
- if {![info exists _test(interactive)] || !$_test(interactive)} {
- gdbtk_force_quit
- }
-}
-
-proc gdbtk_test_error {desc} {
- set desc [join [split $desc \n] |]
- puts "ERROR \{$desc\} \{\} \{\}"
- gdbtk_test_done
-}
-
-# Override the warning dialog. We don't want to see them.
-rename show_warning real_show_warning
-proc show_warning {msg} {
- global _test
-
- set str "INSIGHT TESTSUITE WARNING: $msg"
- puts stdout $str
- if {$_test(logfile) != ""} {
- puts $_test(logfile) $str
- }
-}
diff --git a/gdb/testsuite/gdb.gdbtk/insight-support.exp b/gdb/testsuite/gdb.gdbtk/insight-support.exp
deleted file mode 100644
index e1e88896a1d..00000000000
--- a/gdb/testsuite/gdb.gdbtk/insight-support.exp
+++ /dev/null
@@ -1,319 +0,0 @@
-# GDB Testsuite Support for Insight.
-#
-# Copyright 2001, 2004 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# Initializes the display for gdbtk testing.
-# Returns 1 if tests should run, 0 otherwise.
-proc gdbtk_initialize_display {} {
- global _using_windows
-
- # This is hacky, but, we don't have much choice. When running
- # expect under Windows, tcl_platform(platform) is "unix".
- if {![info exists _using_windows]} {
- set _using_windows [expr {![catch {exec cygpath --help}]}]
- }
-
- if {![_gdbtk_xvfb_init]} {
- if {$_using_windows} {
- untested "No GDB_DISPLAY -- skipping tests"
- } else {
- untested "No GDB_DISPLAY or Xvfb -- skipping tests"
- }
-
- return 0
- }
-
- return 1
-}
-
-# From dejagnu:
-# srcdir = testsuite src dir (e.g., devo/gdb/testsuite)
-# objdir = testsuite obj dir (e.g., gdb/testsuite)
-# subdir = subdir of testsuite (e.g., gdb.gdbtk)
-#
-# To gdbtk:
-# env(DEFS)=the "defs" files (e.g., devo/gdb/testsuite/gdb.gdbtk/defs)
-# env(SRCDIR)=directory containing the test code (e.g., *.test)
-# env(OBJDIR)=directory which contains any executables
-# (e.g., gdb/testsuite/gdb.gdbtk)
-proc gdbtk_start {test} {
- global verbose
- global GDB
- global GDBFLAGS
- global env srcdir subdir objdir
-
- gdb_stop_suppressing_tests;
-
- # Need to convert ::GDB to use (-)?insight...
- if {[regsub {gdb$} $GDB insight newGDB]} {
- set INSIGHT $newGDB
- } else {
- perror "Cannot find Insight executable"
- exit 1
- }
-
- verbose "Starting $INSIGHT -nx -q --tclcommand=$test"
-
- set real_test [which $test]
- if {$real_test == 0} {
- perror "$test is not found"
- exit 1
- }
-
- if {![is_remote host]} {
- if { [which $INSIGHT] == 0 } {
- perror "$INSIGHT does not exist."
- exit 1
- }
- }
-
- set wd [pwd]
-
- # Find absolute path to test
- set test [to_tcl_path -abs $test]
-
- # Set some environment variables
- cd $srcdir
- set abs_srcdir [pwd]
- set env(DEFS) [to_tcl_path -abs [file join $abs_srcdir $subdir defs]]
-
- cd $wd
- cd [file join $objdir $subdir]
- set env(OBJDIR) [pwd]
- cd $wd
-
- # Set info about target into env
- _gdbtk_export_target_info
-
- set env(SRCDIR) $abs_srcdir
- set env(GDBTK_VERBOSE) 1
- set env(GDBTK_LOGFILE) [to_tcl_path [file join $objdir gdb.log]]
- unset -nocomplain env(TCL_LIBRARY)
-
- set err [catch {exec $INSIGHT -nx -q --tclcommand=$test} res]
- if { $err } {
- perror "Execing $INSIGHT failed: $res"
- append res "\nERROR gdb-crash"
- }
- return $res
-}
-
-# Start xvfb when using it.
-# The precedence is:
-# 1. If GDB_DISPLAY is set (and not ""), use it
-# 2. If Xvfb exists, use it (not on cygwin)
-# 3. Skip tests
-proc _gdbtk_xvfb_init {} {
- global env spawn_id _xvfb_spawn_id _using_windows
-
- if {[info exists env(GDB_DISPLAY)]} {
- if {$env(GDB_DISPLAY) != ""} {
- set env(DISPLAY) $env(GDB_DISPLAY)
- } else {
- # Suppress tests
- return 0
- }
- } elseif {!$_using_windows && [which Xvfb] != 0} {
- set screen ":[getpid]"
- set pid [spawn Xvfb $screen -ac]
- set _xvfb_spawn_id $spawn_id
- set env(DISPLAY) localhost$screen
- } else {
- # No Xvfb found -- skip test
- return 0
- }
-
- return 1
-}
-
-# Kill xvfb
-proc _gdbtk_xvfb_exit {} {
- global objdir subdir env _xvfb_spawn_id
-
- if {[info exists _xvfb_spawn_id]} {
- exec kill [exp_pid -i $_xvfb_spawn_id]
- wait -i $_xvfb_spawn_id
- }
-}
-
-# help proc for setting tcl-style paths from unix-style paths
-# pass "-abs" to make it an absolute path
-proc to_tcl_path {unix_path {arg {}}} {
- global _using_windows
-
- if {[string compare $unix_path "-abs"] == 0} {
- set unix_path $arg
- set wd [pwd]
- cd [file dirname $unix_path]
- set dirname [pwd]
- set unix_name [file join $dirname [file tail $unix_path]]
- cd $wd
- }
-
- if {$_using_windows} {
- set unix_path [exec cygpath -aw $unix_path]
- set unix_path [join [split $unix_path \\] /]
- }
-
- return $unix_path
-}
-
-# Set information about the target into the environment
-# variable TARGET_INFO. This array will contain a list
-# of commands that are necessary to run a target.
-#
-# This is mostly devined from how dejagnu works, what
-# procs are defined, and analyzing unix.exp, monitor.exp,
-# and sim.exp.
-#
-# Array elements exported:
-# Index Meaning
-# ----- -------
-# init list of target/board initialization commands
-# target target command for target/board
-# load load command for target/board
-# run run command for target_board
-proc _gdbtk_export_target_info {} {
- global env
-
- # Figure out what "target class" the testsuite is using,
- # i.e., sim, monitor, native
- if {[string compare [info proc gdb_target_monitor] gdb_target_monitor] == 0} {
- # Using a monitor/remote target
- set target monitor
- } elseif {[string compare [info proc gdb_target_sim] gdb_target_sim] == 0} {
- # Using a simulator target
- set target simulator
- } elseif {[string compare [info proc gdb_target_sid] gdb_target_sid] == 0} {
- # Using sid
- set target sid
- } else {
- # Assume native
- set target native
- }
-
- # Now setup the array to be exported.
- set info(init) {}
- set info(target) {}
- set info(load) {}
- set info(run) {}
-
- switch $target {
- simulator {
- set opts "[target_info gdb,target_sim_options]"
- set info(target) "target sim $opts"
- set info(load) "load"
- set info(run) "run"
- }
-
- monitor {
- # Setup options for the connection
- if {[target_info exists baud]} {
- lappend info(init) "set remotebaud [target_info baud]"
- }
- if {[target_info exists binarydownload]} {
- lappend info(init) "set remotebinarydownload [target_info binarydownload]"
- }
- if {[target_info exists disable_x_packet]} {
- lappend info(init) "set remote X-packet disable"
- }
- if {[target_info exists disable_z_packet]} {
- lappend info(init) "set remote Z-packet disable"
- }
-
- # Get target name and connection info
- if {[target_info exists gdb_protocol]} {
- set targetname "[target_info gdb_protocol]"
- } else {
- set targetname "not_specified"
- }
- if {[target_info exists gdb_serial]} {
- set serialport "[target_info gdb_serial]"
- } elseif {[target_info exists netport]} {
- set serialport "[target_info netport]"
- } else {
- set serialport "[target_info serial]"
- }
-
- set info(target) "target $targetname $serialport"
- set info(load) "load"
- set info(run) "continue"
- }
-
- sid {
- # We must start sid first, since Insight won't have a clue
- # about how to do this.
- sid_start
- set info(target) "target [target_info gdb_protocol] [target_info netport]"
- set info(load) "load"
- set info(run) "continue"
- }
-
- native {
- set info(run) "run"
- }
- }
-
- # Export the array to the environment
- set env(TARGET_INFO) [array get info]
-}
-
-# gdbtk tests call this function to print out the results of the
-# tests. The argument is a proper list of lists of the form:
-# {status name description msg}. All of these things typically
-# come from the testsuite harness.
-proc gdbtk_analyze_results {results} {
- foreach test $results {
- set status [lindex $test 0]
- set name [lindex $test 1]
- set description [lindex $test 2]
- set msg [lindex $test 3]
-
- switch $status {
- PASS {
- pass "$description ($name)"
- }
-
- FAIL {
- fail "$description ($name)"
- }
-
- ERROR {
- perror "$name"
- }
-
- XFAIL {
- xfail "$description ($name)"
- }
-
- XPASS {
- xpass "$description ($name)"
- }
- }
- }
-}
-
-proc gdbtk_done {{results {}}} {
- global _xvfb_spawn_id
- gdbtk_analyze_results $results
-
- # Kill off xvfb if using it
- if {[info exists _xvfb_spawn_id]} {
- _gdbtk_xvfb_exit
- }
-
- # Yich. If we're using sid, we must kill it
- if {[string compare [info proc gdb_target_sid] gdb_target_sid] == 0} {
- sid_exit
- }
-}
diff --git a/gdb/testsuite/gdb.gdbtk/list0.c b/gdb/testsuite/gdb.gdbtk/list0.c
deleted file mode 100644
index b50fdd4323d..00000000000
--- a/gdb/testsuite/gdb.gdbtk/list0.c
+++ /dev/null
@@ -1,43 +0,0 @@
-#include "list0.h"
-
-int main ()
-{
- int x;
-#ifdef usestubs
- set_debug_traps();
- breakpoint();
-#endif
- x = 0;
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- return 0;
-}
-
-static void
-unused ()
-{
- /* Not used for anything */
-}
diff --git a/gdb/testsuite/gdb.gdbtk/list0.h b/gdb/testsuite/gdb.gdbtk/list0.h
deleted file mode 100644
index d46833060e5..00000000000
--- a/gdb/testsuite/gdb.gdbtk/list0.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* An include file that actually causes code to be generated in the including file. This is known to cause problems on some systems. */
-#ifdef PROTOTYPES
-extern void bar(int);
-static void foo (int x)
-#else
-static void foo (x) int x;
-#endif
-{
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
-}
diff --git a/gdb/testsuite/gdb.gdbtk/list1.c b/gdb/testsuite/gdb.gdbtk/list1.c
deleted file mode 100644
index 6094104b9cd..00000000000
--- a/gdb/testsuite/gdb.gdbtk/list1.c
+++ /dev/null
@@ -1,39 +0,0 @@
-#include <stdio.h>
-
-#ifdef PROTOTYPES
-void long_line (); int oof (int);
-void bar (int x)
-#else
-void bar (x) int x;
-#endif
-{
- printf ("%d\n", x);
-
- long_line ();
-}
-
-static void
-unused ()
-{
- /* Not used for anything */
-}
-/* This routine has a very long line that will break searching in older versions of GDB. */
-#ifdef PROTOTYPES
-void
-#endif
-long_line ()
-{
- oof (67);
-
- oof (6789);
-
- oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 5 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 10 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 15 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 20 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 25 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 30 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 35 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 40 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 45 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 50 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 55 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 60 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 65 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (1234); /* 70 */
-}
-#ifdef PROTOTYPES
-int oof (int n)
-#else
-oof (n) int n;
-#endif
-{
- return n + 1;
-}
diff --git a/gdb/testsuite/gdb.gdbtk/simple.c b/gdb/testsuite/gdb.gdbtk/simple.c
deleted file mode 100644
index 969f6880636..00000000000
--- a/gdb/testsuite/gdb.gdbtk/simple.c
+++ /dev/null
@@ -1,20 +0,0 @@
-int
-main(int argc, char * argv[])
-{
- int i;
- char *a;
- char *b = "abc";
- long foo;
-
- a = (char *) malloc (300);
-
- for (i=0; i < 50; i++)
- {
- int j = i % 3;
- int k = 3 - j;
- strncpy (&a[i], &b[k], j);
- foo = (long) j * k / i + 2 * k * k * k;
- }
- return 0;
-}
-
diff --git a/gdb/testsuite/gdb.gdbtk/srcwin.exp b/gdb/testsuite/gdb.gdbtk/srcwin.exp
deleted file mode 100644
index c9267d805e3..00000000000
--- a/gdb/testsuite/gdb.gdbtk/srcwin.exp
+++ /dev/null
@@ -1,71 +0,0 @@
-# Copyright 1999, 2001 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-load_lib ../gdb.gdbtk/insight-support.exp
-
-if {[gdbtk_initialize_display]} {
- if {$tracelevel} {
- strace $tracelevel
- }
-
- #
- # test source window
- #
- set prms_id 0
- set bug_id 0
-
- set testfile "list"
- set s1 "$srcdir/$subdir/list0.c"
- set sources "$s1 $srcdir/$subdir/list1.c"
- set binfile $objdir/$subdir/$testfile
- if {[file exists $s1.save]} {
- catch {file delete $s1}
- file rename $s1.save $s1
- }
- set r [gdb_compile $sources "$binfile" executable debug]
- if { $r != "" } {
- gdb_suppress_entire_file \
- "Testcase compile failed, so some tests in this file will automatically fail."
- }
-
- # Start with a fresh gdbtk
- gdb_exit
- set results [gdbtk_start [file join $srcdir $subdir srcwin.test]]
- set results [split $results \n]
- set all_results $results
-
- # move file with "main" out of the way
- file rename $s1 $s1.save
-
- # run slightly different set of tests
- gdb_exit
- set results [gdbtk_start [file join $srcdir $subdir srcwin2.test]]
- set results [split $results \n]
- set all_results [concat $all_results $results]
-
- # restore file
- file rename $s1.save $s1
-
- set r [gdb_compile $sources "$binfile" executable ""]
- if { $r != "" } {
- gdb_suppress_entire_file \
- "Testcase compile failed, so some tests in this file will automatically fail."
- }
- # run slightly different set of tests
- gdb_exit
- set results [gdbtk_start [file join $srcdir $subdir srcwin3.test]]
- set results [split $results \n]
- set all_results [concat $all_results $results]
-
- # Analyze results
- gdbtk_done $all_results
-}
diff --git a/gdb/testsuite/gdb.gdbtk/srcwin.test b/gdb/testsuite/gdb.gdbtk/srcwin.test
deleted file mode 100644
index eaa9ba8530e..00000000000
--- a/gdb/testsuite/gdb.gdbtk/srcwin.test
+++ /dev/null
@@ -1,1192 +0,0 @@
-# Copyright (C) 1999, 2001 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Martin Hunt (hunt@cygnus.com)
-
-# Read in the standard defs file
-
-if {![gdbtk_read_defs]} {
- break
-}
-
-global objdir srcdir
-
-
-# move the pointer to the center of the bbox relative to $win
-proc move_mouse_to {win bbox} {
- if {[llength $bbox] != 4} {
- return 0
- }
- set x [expr [lindex $bbox 0] + [lindex $bbox 2] / 2]
- set y [expr [lindex $bbox 1] + [lindex $bbox 3] / 2]
- warp_pointer . [winfo rootx $win] [winfo rooty $win]
-
- set nx 0
- set ny 0
-
- while {$nx != $x || $ny != $y} {
- if {$nx < $x} {incr nx}
- if {$ny < $y} {incr ny}
- warp_pointer $win $nx $ny
- }
- return 1
-}
-
-proc click {win bbox bnum} {
- if {![move_mouse_to $win $bbox]} {
- return 0
- }
- update
-
- set x [expr [lindex $bbox 0] + [lindex $bbox 2] / 2]
- set y [expr [lindex $bbox 1] + [lindex $bbox 3] / 2]
-
- if {[catch {event generate $win <Button-$bnum> -x $x -y $y} result]} {
- return 0
- }
- if {[catch {event generate $win <ButtonRelease-$bnum> -x $x -y $y} result]} {
- return 0
- }
- return 1
-}
-
-
-##### #####
-# #
-# SECTION 1: Mode Tests #
-# #
-##### #####
-
-# Load the test executable
-set program [file join $objdir list]
-if {[catch {gdbtk_test_file $program} t]} {
- # This isn't a test case, since if this fails, we're hosed.
- gdbtk_test_error "loading \"$program\": $t"
-}
-
-set srcwin [ManagedWin::open SrcWin]
-set stw [$srcwin test_get twin]
-set twin [$stw test_get twin]
-
-# get things started
-gdb_cmd "break main"
-gdbtk_test_run
-
-# Test: srcwin-1.1
-# Desc: Check for something in source window
-gdbtk_test srcwin-1.1 "source window has contents" {
- set file1(source) [$twin get 1.0 end]
- expr {![string compare $file1(source) ""]}
-} {0}
-
-
-# Test: srcwin-1.2
-# Desc: source->assembly mode change
-gdbtk_test srcwin-1.2 "source->assembly mode change" {
- $srcwin mode "" ASSEMBLY
- set twin [$stw test_get twin]
- set file1(assembly) [$twin get 1.0 end]
- expr {![string compare $file1(source) $file1(assembly)]}
-} {0}
-
-# Test: srcwin-1.3
-# Desc: assembly->mixed mode change
-gdbtk_test srcwin-1.3 "assembly->mixed mode change" {
- $srcwin mode "" MIXED
- set twin [$stw test_get twin]
- set file1(mixed) [$twin get 1.0 end]
- expr {![string compare $file1(mixed) $file1(assembly)]}
-} {0}
-
-# Test: srcwin-1.4
-# Desc: mixed->src+asm mode change
-gdbtk_test srcwin-1.4 "mixed->src+asm mode change" {
- $srcwin mode "" SRC+ASM
- set twin [$stw test_get twin]
- set bwin [$stw test_get bwin]
- set s [$twin get 1.0 end]
- set a [$bwin get 1.0 end]
- list [string compare $a $file1(assembly)] [string compare $s $file1(source)] [winfo ismapped $bwin]
-} {0 0 1}
-
-# Test: srcwin-1.5
-# Desc: src+asm->source mode change
-gdbtk_test srcwin-1.5 "src+asm->source mode change" {
- $srcwin mode "" SOURCE
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- set bwin [$stw test_get bwin]
- list [string compare $file1(source) $a] [winfo ismapped $bwin]
-} {0 0}
-
-# Test: srcwin-1.6
-# Desc: source->mixed mode change
-gdbtk_test srcwin-1.6 "source->mixed mode change" {
- $srcwin mode "" MIXED
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- string compare $file1(mixed) $a
-} {0}
-
-# Test: srcwin-1.7
-# Desc: mixed->source mode change
-gdbtk_test srcwin-1.7 "mixed->source mode change" {
- $srcwin mode "" SOURCE
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- string compare $file1(source) $a
-} {0}
-
-# Test: srcwin-1.8
-# Desc: source->src+asm mode change
-gdbtk_test srcwin-1.8 "source->src+asm mode change" {
- $srcwin mode "" SRC+ASM
- set twin [$stw test_get twin]
- set bwin [$stw test_get bwin]
- set s [$twin get 1.0 end]
- set a [$bwin get 1.0 end]
- list [string compare $a $file1(assembly)] [string compare $s $file1(source)] [winfo ismapped $bwin]
-} {0 0 1}
-
-# Test: srcwin-1.9
-# Desc: src+asm->assembly mode change
-gdbtk_test srcwin-1.9 "src+asm->assembly mode change" {
- $srcwin mode "" ASSEMBLY
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- string compare $file1(assembly) $a
-} {0}
-
-# Test: srcwin-1.10
-# Desc: assembly->src+asm mode change
-gdbtk_test srcwin-1.10 "assembly->src+asm mode change" {
- $srcwin mode "" SRC+ASM
- set twin [$stw test_get twin]
- set bwin [$stw test_get bwin]
- set s [$twin get 1.0 end]
- set a [$bwin get 1.0 end]
- list [string compare $a $file1(assembly)] [string compare $s $file1(source)] [winfo ismapped $bwin]
-} {0 0 1}
-
-# Test: srcwin-1.11
-# Desc: src+asm->mixed mode change
-gdbtk_test srcwin-1.11 "src+asm->mixed mode change" {
- $srcwin mode "" MIXED
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- set bwin [$stw test_get bwin]
- expr {[string compare $file1(mixed) $a] ||
- [winfo ismapped $bwin]}
-} {0}
-
-# Test: srcwin-1.12
-# Desc: mixed->assembly mode change
-gdbtk_test srcwin-1.12 "mixed->assembly mode change" {
- $srcwin mode "" ASSEMBLY
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- string compare $file1(assembly) $a
-} {0}
-
-# Test: srcwin-1.13
-# Desc: assembly->source mode change
-gdbtk_test srcwin-1.13 "assembly->source mode change" {
- $srcwin mode "" SOURCE
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- string compare $file1(source) $a
-} {0}
-
-
-##### #####
-# #
-# SECTION 2: Basic Operations #
-# #
-##### #####
-
-# Test: srcwin-2.1
-# Desc: check contents of filename combobox
-gdbtk_test srcwin-2.1 "check contents of filename combobox" {
- set statbar [$srcwin test_get _statbar]
- set names [$statbar.name list get 0 end]
- set r 0
- foreach f {list0.c list1.c} {
- if {[lsearch $names $f] != -1} {
- incr r
- }
- }
- set r
-} {2}
-
-# Test: srcwin-2.2
-# Desc: check contents of function combobox
-gdbtk_test srcwin-2.2 "check contents of function combobox" {
- set names [$statbar.func list get 0 end]
- set r 0
- foreach f {main foo unused} {
- if {[lsearch $names $f] != -1} {
- incr r
- }
- }
- set r
-} {3}
-
-# Test: srcwin-2.3
-# Desc: goto filename
-gdbtk_test srcwin-2.3 "goto filename" {
- set func [$srcwin test_get _name 1]
- $func "" list1.c
- set twin [$stw test_get twin]
- set file2(source) [$twin get 1.0 end]
- expr {![string compare $file1(source) $file2(source)]}
-} {0}
-
-# Test: srcwin-2.4
-# Desc: check contents of function combobox
-gdbtk_test srcwin-2.4 "check contents of function combobox" {
- set names [$statbar.func list get 0 end]
- set r 0
- foreach f {bar long_line oof unused} {
- if {[lsearch $names $f] != -1} {
- incr r
- }
- }
- set r
-} {4}
-
-# Test: srcwin-2.5
-# Desc: function combobox entry field should be empty after switching to a new file
-gdbtk_test srcwin-2.5 "function combobox entry field should be empty" {
- set names [$statbar.func get]
- string length $names
-} {0}
-
-# Test: srcwin-2.6
-# Desc: goto function
-gdbtk_test srcwin-2.6 "goto function bar" {
- $srcwin goto_func "" bar
- set r 0
-
- # now get a dump of all tags and check that only one line is
- # marked BROWSE_TAG and no lines are STACK_TAG or PC_TAG.
-
- # We know that list1.c should have BROWSE_TAG set at index 5.2
- # for function "bar". If list1.c is changed or the layout of the source
- # window is changed, this must be updated.
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "BROWSE_TAG"} {
- if {$i == "10.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} { incr r 10}
- if {$v == "PC_TAG"} { incr r 100}
- }
- }
- } else {
- set r -1
- }
-
- if {$r == 1} {
- # things are OK so far, so just verify the function name is displayed
- # in the combobox entry field.
- set names [$statbar.func get]
- if {[string compare $names "bar"]} {set r -2}
- }
- set r
-} {1}
-
-# Test: srcwin-2.7
-# Desc: goto function "oof". This tests that the correct line is highlighted
-# with BROWSE_TAG and no other lines are highlighted. It also checks that
-# the combobox has the correct function name in it. Finally, list1.c
-# has an extremely long line, line 32, that breaks some functions. We verify
-# that the GDBtk has the correct line number.
-
-gdbtk_test srcwin-2.7 "goto function oof" {
- $srcwin goto_func "" oof
- set r 0
-
- # now get a dump of all tags and check that only one line is
- # marked BROWSE_TAG and no lines are STACK_TAG or PC_TAG.
-
- # We know that list1.c should have BROWSE_TAG set at index 32.2
- # for function "oof". If list1.c is changed or the layout of the source
- # window is changed, this must be updated.
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "BROWSE_TAG"} {
- if {$i == "38.2"} {
- set line_number [$twin get "$i wordstart" "$i wordend"]
- if {$line_number == "38"} {
- incr r
- } else {
- incr r -100
- }
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "PC_TAG"} {incr r 100}
- }
- }
- } else {
- set r -1
- }
-
- if {$r == 1} {
- # things are OK so far, so just verify the function name is displayed
- # in the combobox entry field.
- set names [$statbar.func get]
- if {[string compare $names "oof"]} {set r -2}
- }
- set r
-} {1}
-
-# Test: srcwin-2.8
-# Desc: This test issues a next command while browsing list1.c.
-# It should display list0.c and highlight the correct line.
-gdbtk_test srcwin-2.8 "step while browsing" {
- gdb_immediate "next" 1
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list0.c"} {set r -1}
- if {$func != "main"} {set r -2}
-
- # check that correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $file1(source) $a]} {set r -3}
-
- # check for PC_TAG on correct line
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- if {$i == "11.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Test: srcwin-2.9
-# Desc: This test issues a next command while the current
-# PC is ready to call a function. It should not go into the function and
-# should update the PC highlight correctly.
-gdbtk_test srcwin-2.9 "next" {
- gdb_immediate "next" 1
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list0.c"} {set r -1}
- if {$func != "main"} {set r -2}
-
- # check that correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $file1(source) $a]} {set r -3}
-
- # check for PC_TAG on correct line
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- if {$i == "12.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Test: srcwin-2.10
-# Desc: This test issues a step command while the current
-# PC is ready to call a function. It should step into the function.
-gdbtk_test srcwin-2.10 "step" {
- gdb_immediate "step" 1
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list0.h"} {set r -1}
- if {$func != "foo"} {set r -2}
-
- # check that a new file is displayed
- set twin [$stw test_get twin]
- set file3(source) [$twin get 1.0 end]
- if {![string compare $file1(source) $file3(source)]} {set r -3}
-
- # check for PC_TAG on correct line
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- if {$i == "9.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Test: srcwin-2.11
-# Desc: This test issues a break and a continue
-gdbtk_test srcwin-2.11 "set BP and continue" {
- gdb_immediate "break oof" 1
- gdb_immediate "continue" 1
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list1.c"} {set r -1}
- if {$func != "oof"} {set r -2}
-
- # check that the correct file is displayed
- # we must clear the breakpoint first so it doesn't mess up the
- # comparison...
- gdb_immediate "clear oof" 1
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $file2(source) $a]} {set r -3}
-
- # check for PC_TAG on correct line
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- if {$i == "38.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-##### #####
-# #
-# SECTION 3: Stack Operations #
-# #
-##### #####
-
-# Test: srcwin-3.1
-# Desc: This tests "stack up"
-gdbtk_test srcwin-3.1 "stack up (1)" {
- $srcwin stack up
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list1.c"} {set r -1}
- if {$func != "long_line"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $file2(source) $a]} {set r -3}
-
- # check for PC_TAG and STACK_TAG on correct lines
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- # return n + 1;
- if {$i == "38.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {
- # oof (67);
- if {$i == "26.2"} {
- incr r
- } else {
- incr r 10
- }
- }
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {2}
-
-# Test: srcwin-3.2
-# Desc: Another "stack up" test
-gdbtk_test srcwin-3.2 "stack up (2)" {
- $srcwin stack up
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list1.c"} {set r -1}
- if {$func != "bar"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $file2(source) $a]} {set r -3}
-
- # check for PC_TAG and STACK_TAG on correct lines
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- # return n + 1;
- if {$i == "38.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {
- # long_line ();
- if {$i == "12.2"} {
- incr r
- } else {
- incr r 10
- }
- }
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {2}
-
-# Test: srcwin-3.3
-# Desc: Another "stack up" test
-gdbtk_test srcwin-3.3 "stack up (3)" {
- $srcwin stack up
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list0.h"} {set r -1}
- if {$func != "foo"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {![string compare $file2(source) $a]} {set r -3}
-
- # check for PC_TAG and STACK_TAG on correct lines
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "STACK_TAG"} {
- if {$i == "9.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "PC_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Test: srcwin-3.4
-# Desc: Another "stack up" test
-gdbtk_test srcwin-3.4 "stack up (4)" {
- $srcwin stack up
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list0.c"} {set r -1}
- if {$func != "main"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $file1(source) $a]} {set r -3}
-
- # check for PC_TAG and STACK_TAG on correct lines
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "STACK_TAG"} {
- if {$i == "12.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "PC_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Disabled for now because there are different correct results.
-# Test should be rewritten to include those.
-# Test: srcwin-3.5
-# Desc: "stack up" when we are at the top
-#gdbtk_test srcwin-3.5 "stack up when at the top" {
-# $srcwin stack up
-# set r 0
-# set name [$statbar.name get]
-# set func [$statbar.func get]
-#
- # check contents of name and function comboboxes
-# if {$name != "list0.c"} {set r -1}
-# if {$func != "main"} {set r -2}
-
- # check that the correct file is displayed
-# set twin [$stw test_get twin]
-# set a [$twin get 1.0 end]
-# if {[string compare $file1(source) $a]} {set r -3}
-
- # check for PC_TAG and STACK_TAG on correct lines
-# if {$r == 0} {
-# if {![catch {set z [$twin dump -tag 1.0 end]}]} {
-# foreach {k v i} $z {
-# if {$k == "tagon"} {
-# if {$v == "STACK_TAG"} {
-# if {$i == "12.2"} {
-# incr r
-# } else {
-# incr r 5
-# }
-# }
-# if {$v == "PC_TAG"} {incr r 10}
-# if {$v == "BROWSE_TAG"} {incr r 100}
-# }
-# }
-# } else {
-# set r -4
-# }
-# }
-# set r
-#} {1}
-
-# Test: srcwin-3.6
-# Desc: "stack down" test
-gdbtk_test srcwin-3.6 "stack down" {
- $srcwin stack down
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list0.h"} {set r -1}
- if {$func != "foo"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {![string compare $file2(source) $a]} {set r -3}
-
- # check for PC_TAG and STACK_TAG on correct lines
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "STACK_TAG"} {
- if {$i == "9.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "PC_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Test: srcwin-3.7
-# Desc: "stack bottom" test
-gdbtk_test srcwin-3.7 "stack bottom" {
- $srcwin stack bottom
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list1.c"} {set r -1}
- if {$func != "oof"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $file2(source) $a]} {set r -3}
-
- # check for PC_TAG on correct line
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- if {$i == "38.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Test: srcwin-3.8
-# Desc: "stack down" when at bottom
-gdbtk_test srcwin-3.8 "stack down when at bottom" {
- $srcwin stack down
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list1.c"} {set r -1}
- if {$func != "oof"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $file2(source) $a]} {set r -3}
-
- # check for PC_TAG on correct line
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- if {$i == "38.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# 4 - BREAKPOINTS
-
-# Test: srcwin-4.1
-# Desc: Set BP in another file. Tests bp and cache functions
-gdbtk_test srcwin-4.1 "set BP in another file" {
- gdb_immediate "break foo" 1
- $srcwin goto_func "" foo
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list0.h"} {set r -1}
- if {$func != "foo"} {set r -2}
-
- set twin [$stw test_get twin]
-
- # check for BROWSE_TAG and BP image on correct line
- if {$r == 0} {
- if {![catch {set z [$twin dump 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "BROWSE_TAG"} {
- if {$i == "9.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "PC_TAG"} {incr r 100}
- } elseif {$k == "image"} {
- if {$i == "9.0"} {
- incr r
- } else {
- set r -200
- }
- }
- }
- } else {
- set r -4
- }
- }
-
- if {$r == 2} {
- # clear BP and compare with previous contents. This should succeed,
- gdb_immediate "clear foo" 1
- set a [$twin get 1.0 end]
- if {[string compare $file3(source) $a]} {set r -3}
- }
-
- set r
-} {2}
-
-# Test: srcwin-4.2
-# Desc: Test temporary BP
-gdbtk_test srcwin-4.2 "temporary BP" {
- set r 0
- if {[catch {gdb_immediate "tbreak foo" 1} msg]} {
- set r -500
- }
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list0.h"} {set r -1}
- if {$func != "foo"} {set r -2}
-
- set twin [$stw test_get twin]
-
- # check for BROWSE_TAG and BP image on correct line
- if {$r == 0} {
- if {![catch {set z [$twin dump 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "BROWSE_TAG"} {
- if {$i == "9.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "PC_TAG"} {incr r 100}
- } elseif {$k == "image"} {
- if {$i == "9.0"} {
- incr r
- } else {
- set r -200
- }
- }
- }
- } else {
- set r -4
- }
- }
-
- gdb_immediate "continue" 1
-
- # now check for PC_TAG and no image
- if {$r == 2} {
- if {![catch {set z [$twin dump 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- if {$i == "9.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- } elseif {$k == "image"} {
- set r -200
- }
- }
- } else {
- set r -4
- }
- }
-
- set r
-} {3}
-
-# Test: srcwin-4.3
-# Desc: Test BP balloons
-gdbtk_test srcwin-4.3 "BP Balloons" {
- # move pointer out of the way
- warp_pointer . 0 0
- set r 0
- gdb_immediate "break 10" 1
- gdb_immediate "tbreak 10" 1
-
- set twin [$stw test_get twin]
-
- # check for BROWSE_TAG and BP image on correct line
- if {$r == 0} {
- if {![catch {set z [$twin dump 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- if {$i == "9.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- } elseif {$k == "image"} {
- if {$i == "10.0"} {
- incr r
- # we found the bp image, now we will test the bp balloon messages
- set balloon [winfo toplevel [namespace tail $srcwin]].__balloon
- # shouldn't be mapped yet
- if {[winfo ismapped $balloon]} {
- set r -3000
- break
- }
- move_mouse_to $twin [$twin bbox $i]
- #wait a second for the balloon message to appear
- sleep 1
- if {![winfo ismapped $balloon]} {
- set r -4000
- break
- }
- # read the contents of the balloon and parse it into lines
- set a [split [$balloon.label cget -text] \n]
- set i 0
- # foreach line parse it and check the type and make sure it is enabled
- foreach line $a {
- if {[lindex $line 0] == "breakpoint"} {continue}
- incr i
- set enabled [lindex $line 0]
- set bptype [lindex $line 2]
- switch $i {
- 1 {
- if {$bptype != "donttouch"} {set r -1000}
- }
- 2 {
- if {$bptype != "delete"} {set r -2000}
- }
- }
- }
- } else {
- set r -200
- }
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {2}
-
-#ManagedWin::open DebugWin
-
-# Test: srcwin-4.4
-# Desc: Click on line to set BP
-gdbtk_test srcwin-4.4 "Click on line to set BP" {
- set r 0
-
- # click mouse button 1 at index 20.1
- if {![click $twin [$twin bbox 20.1] 1]} {
- set r "Click failed on line 20.1"
- } else {
-
- # now look for BP at line 20
- foreach bpnum [gdb_get_breakpoint_list] {
- set bpinfo [gdb_get_breakpoint_info $bpnum]
- lassign $bpinfo file func line pc type enabled disposition \
- ignore_count commands cond thread hit_count
- set file [lindex [file split $file] end]
- if {$file == "list0.h"} {
- if {$line == "20"} {
- if {$enabled == "1"} {incr r}
- if {$func == "foo"} {incr r}
- if {$type == "breakpoint"} {incr r}
- if {$disposition == "donttouch"} {incr r}
- }
- }
- }
- }
- set r
-} {4}
-
-
-# Test: srcwin-4.5
-# Desc: Continue till here popup
-gdbtk_test srcwin-4.5 "Continue till here popup" {
- set twin [$stw test_get twin]
-
- # Get coordinates of line 16
- set b [$twin bbox 16.1]
- set y [expr {[lindex $b 1] + ([lindex $b 3] / 2)}]
-
- # Continue to here
- $stw continue_to_here $twin $y
-
- # Where is the PC_TAG?
- set pcs {}
- set tags [$twin tag ranges PC_TAG]
- foreach {start end} $tags {
- lappend pcs [expr {int($start)}]
- }
-
- # Where are breakpoints?
- set bps {}
- set imgs [$twin dump -image 1.0 end]
- foreach {foo bar line} $imgs {
- lappend bps $line
- }
-
- list $pcs $bps
-} {16 {10.0 20.0}}
-
-# 5.1 balloon variables
-# Test: srcwin-5.1
-# Desc: variable balloon test
-# continues to BP at line 20 and checks to see that value was updated
-gdbtk_test srcwin-5.1 "variable balloon test" {
- # move pointer out of the way
- warp_pointer . 0 0
- set r 0
- set twin [$stw test_get twin]
-
- # move pointer to variable "x" and check balloon
- set index [string first "x++" [$twin get 20.0 20.end]]
- move_mouse_to $twin [$twin bbox 20.$index]
- sleep 1
- if {[winfo ismapped $balloon]} {
- if {![string compare "x=9" [$balloon.label cget -text]]} {incr r}
- gdb_immediate "continue" 1
- sleep 1
- if {![string compare "x=13" [$balloon.label cget -text]]} {incr r}
- } else {
- set r -1
- }
-
- set r
-} {2}
-
-# 6.1 mixed mode disassembly of include file
-# Test: srcwin-6.1
-# Desc: Some versions of GDBtk can't do mixed-mode disassembly of a function
-# that is in an include file. PR# mi/1101
-
-gdbtk_test srcwin-6.1 "mixed mode disassembly of include file (mi/1101)" {
- set r 0
- $srcwin mode "" MIXED
-
- # check contents of name and function comboboxes
- set name [$statbar.name get]
- set func [$statbar.func get]
- if {$name != "list0.h"} {set r -1}
- if {$func != "foo"} {set r -2}
-
- # check contents of source window
- set twin [$stw test_get twin]
- set text [$twin get 1.0 end]
- # Is it correct? I don't know. Guess we look for some pieces of source...
- if {[string first "static void" $text] != -1 &&
- [string first "foo (x)" $text] != -1 &&
- [string first "bar (x++);" $text] != -1} {
- set r 1
- }
-
- set r
-} {1}
-
-gdbtk_test_done
diff --git a/gdb/testsuite/gdb.gdbtk/srcwin2.test b/gdb/testsuite/gdb.gdbtk/srcwin2.test
deleted file mode 100644
index ee693e269cb..00000000000
--- a/gdb/testsuite/gdb.gdbtk/srcwin2.test
+++ /dev/null
@@ -1,899 +0,0 @@
-# Copyright (C) 1999, 2001 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Martin Hunt (hunt@cygnus.com)
-
-
-# same as srcwin.test, except test debugging executables
-# when source files are missing.
-
-# Read in the standard defs file
-
-if {![gdbtk_read_defs]} {
- break
-}
-
-global objdir srcdir
-
-##### #####
-# #
-# SECTION 1: Mode Tests #
-# #
-##### #####
-
-# Load the test executable
-set program [file join $objdir list]
-if {[catch {gdbtk_test_file $program} t]} {
- # This isn't a test case, since if this fails, we're hosed.
- gdbtk_test_error "loading \"$program\": $t"
-}
-
-set srcwin [ManagedWin::open SrcWin]
-set stw [$srcwin test_get twin]
-set twin [$stw test_get twin]
-set statbar [$srcwin test_get _statbar]
-
-# get things started
-gdb_cmd "break main"
-gdbtk_test_run
-
-# Test: srcwin2-1.1
-# Desc: Check for something in source window
-gdbtk_test srcwin2-1.1 "source window has contents" {
- set r 0
- set file1(source) [$twin get 1.0 end]
- if {$file1(source) == ""} {set r -1}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -2}
- set r
-} {0}
-
-# Test: srcwin2-1.2
-# Desc: source->assembly mode change
-gdbtk_test srcwin2-1.2 "source->assembly mode change" {
- $srcwin mode "" ASSEMBLY
- set twin [$stw test_get twin]
- set file1(assembly) [$twin get 1.0 end]
- # source == assembly because for there is no source
- string compare $file1(source) $file1(assembly)
-} {0}
-
-# Test: srcwin2-1.3
-# Desc: assembly->mixed mode change
-gdbtk_test srcwin2-1.3 "assembly->mixed mode change" {
- set r 0
- $srcwin mode "" MIXED
- set twin [$stw test_get twin]
- set file1(mixed) [$twin get 1.0 end]
- # mixed != assembly because the lines with source should
- # be noted, even if source in unavailable. This behaviour is
- # different for different debug formats, so we accept either.
- if {$file1(mixed) == ""} {set r -1}
- if {[$statbar.mode get] != "MIXED"} {set r -2}
- set r
-} {0}
-
-# Test: srcwin2-1.4
-# Desc: mixed->src+asm mode change
-gdbtk_test srcwin2-1.4 "mixed->src+asm mode change" {
- set r 0
- # mode change may fail if fallover to ASSEMBLY fails
- if {[catch {$srcwin mode "" SRC+ASM}]} { set r -5 }
- set twin [$stw test_get twin]
- if {[$twin get 1.0 end] != $file1(assembly)} {set r -1}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -2}
- set r
-} {0}
-
-# Test: srcwin2-1.5
-# Desc: src+asm->source mode change
-gdbtk_test srcwin2-1.5 "src+asm->source mode change" {
- set r 0
- $srcwin mode "" SOURCE
- set twin [$stw test_get twin]
- if {[$stw test_get bwin] != ""} {set r -2}
- if {[$twin get 1.0 end] != $file1(assembly)} {set r -1}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -3}
- set r
-} {0}
-
-# Test: srcwin2-1.6
-# Desc: source->mixed mode change
-gdbtk_test srcwin2-1.6 "source->mixed mode change" {
- set r 0
- $srcwin mode "" MIXED
- set twin [$stw test_get twin]
- if {[$twin get 1.0 end] != $file1(mixed)} {set r -1}
- if {[$statbar.mode get] != "MIXED"} {set r -2}
- set r
-} {0}
-
-# Test: srcwin2-1.7
-# Desc: mixed->source mode change
-gdbtk_test srcwin2-1.7 "mixed->source mode change" {
- set r 0
- $srcwin mode "" SOURCE
- set twin [$stw test_get twin]
- if {[$twin get 1.0 end] != $file1(source)} {set r -1}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -2}
- set r
-} {0}
-
-# Test: srcwin2-1.8
-# Desc: source->src+asm mode change
-gdbtk_test srcwin2-1.8 "source->src+asm mode change" {
- set r 0
- # mode change may fail if fallover to ASSEMBLY fails
- if {[catch {$srcwin mode "" SRC+ASM}]} { set r -5 }
- set twin [$stw test_get twin]
- set bwin [$stw test_get bwin]
- if {[$twin get 1.0 end] != $file1(assembly)} {set r -1}
- if {$bwin != ""} {set r -2}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -3}
- set r
-} {0}
-
-# Test: srcwin2-1.9
-# Desc: src+asm->assembly mode change
-gdbtk_test srcwin2-1.9 "src+asm->assembly mode change" {
- set r 0
- $srcwin mode "" ASSEMBLY
- set twin [$stw test_get twin]
- if {[$twin get 1.0 end] != $file1(assembly)} {set r -1}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -2}
- set r
-} {0}
-
-# Test: srcwin2-1.10
-# Desc: assembly->src+asm mode change
-gdbtk_test srcwin2-1.10 "assembly->src+asm mode change" {
- set r 0
- # mode change may fail if fallover to ASSEMBLY fails
- if {[catch {$srcwin mode "" SRC+ASM}]} { set r -5 }
- set twin [$stw test_get twin]
- set bwin [$stw test_get bwin]
- if {[$twin get 1.0 end] != $file1(assembly)} {set r -1}
- if {$bwin != ""} {set r -2}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -3}
- set r
-} {0}
-
-# Test: srcwin2-1.11
-# Desc: src+asm->mixed mode change
-gdbtk_test srcwin2-1.11 "src+asm->mixed mode change" {
- set r 0
- $srcwin mode "" MIXED
- set twin [$stw test_get twin]
- if {[$twin get 1.0 end] != $file1(mixed)} {set r -1}
- if {[$statbar.mode get] != "MIXED"} {set r -2}
- set r
-} {0}
-
-# Test: srcwin2-1.12
-# Desc: mixed->assembly mode change
-gdbtk_test srcwin2-1.12 "mixed->assembly mode change" {
- set r 0
- $srcwin mode "" ASSEMBLY
- set twin [$stw test_get twin]
- if {[$twin get 1.0 end] != $file1(assembly)} {set r -1}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -2}
- set r
-} {0}
-
-# Test: srcwin2-1.13
-# Desc: assembly->source mode change
-gdbtk_test srcwin2-1.13 "assembly->source mode change" {
- set r 0
- $srcwin mode "" SOURCE
- set twin [$stw test_get twin]
- if {[$twin get 1.0 end] != $file1(source)} {set r -1}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -2}
- set r
-} {0}
-
-
-##### #####
-# #
-# SECTION 2: Basic Operations #
-# #
-##### #####
-
-# Test: srcwin2-2.1
-# Desc: check contents of filename combobox
-gdbtk_test srcwin2-2.1 "check contents of filename combobox" {
- set names [$statbar.name list get 0 end]
- set r 0
- foreach f {list0.c list1.c} {
- if {[lsearch $names $f] != -1} {
- incr r
- }
- }
- set r
-} {2}
-
-# Test: srcwin2-2.2
-# Desc: check contents of function combobox
-gdbtk_test srcwin2-2.2 "check contents of function combobox" {
- set names [$statbar.func list get 0 end]
- set r 0
- foreach f {main foo unused} {
- if {[lsearch $names $f] != -1} {
- incr r
- }
- }
- set r
-} {3}
-
-# Test: srcwin2-2.3
-# Desc: goto filename
-gdbtk_test srcwin2-2.3 "goto filename" {
- set func [$srcwin test_get _name 1]
- $func "" list1.c
- set twin [$stw test_get twin]
- set file2(source) [$twin get 1.0 end]
- expr {![string compare $file1(source) $file2(source)]}
-} {0}
-
-# Test: srcwin2-2.4
-# Desc: check contents of function combobox
-gdbtk_test srcwin2-2.4 "check contents of function combobox" {
- set names [$statbar.func list get 0 end]
- set r 0
- foreach f {bar long_line oof unused} {
- if {[lsearch $names $f] != -1} {
- incr r
- }
- }
- set r
-} {4}
-
-# Test: srcwin2-2.5
-# Desc: function combobox entry field should be empty after switching to a new file
-gdbtk_test srcwin2-2.5 "function combobox entry field should be empty" {
- set names [$statbar.func get]
- string length $names
-} {0}
-
-# Test: srcwin2-2.6
-# Desc: goto function
-gdbtk_test srcwin2-2.6 "goto function bar" {
- $srcwin goto_func "" bar
- set r 0
-
- # now get a dump of all tags and check that only one line is
- # marked BROWSE_TAG and no lines are STACK_TAG or PC_TAG.
-
- # We know that list1.c should have BROWSE_TAG set at index 10.2
- # for function "bar". If list1.c is changed or the layout of the source
- # window is changed, this must be updated.
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "BROWSE_TAG"} {
- if {$i == "10.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} { incr r 10}
- if {$v == "PC_TAG"} { incr r 100}
- }
- }
- } else {
- set r -1
- }
-
- if {$r == 1} {
- # things are OK so far, so just verify the function name is displayed
- # in the combobox entry field.
- set names [$statbar.func get]
- if {[string compare $names "bar"]} {set r -2}
- }
- set r
-} {1}
-
-# Test: srcwin2-2.7
-# Desc: goto function "oof". This tests that the correct line is highlighted
-# with BROWSE_TAG and no other lines are highlighted. It also checks that
-# the combobox has the correct function name in it. Finally, list1.c
-# has an extremely long line, line 32, that breaks some functions. We verify
-# that the GDBtk has the correct line number.
-
-gdbtk_test srcwin2-2.7 "goto function oof" {
- $srcwin goto_func "" oof
- set r 0
-
- # now get a dump of all tags and check that only one line is
- # marked BROWSE_TAG and no lines are STACK_TAG or PC_TAG.
-
- # We know that list1.c should have BROWSE_TAG set at index 38.2
- # for function "oof". If list1.c is changed or the layout of the source
- # window is changed, this must be updated.
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "BROWSE_TAG"} {
- if {$i == "38.2"} {
- set line_number [$twin get "$i wordstart" "$i wordend"]
- if {$line_number == "38"} {
- incr r
- } else {
- incr r -100
- }
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "PC_TAG"} {incr r 100}
- }
- }
- } else {
- set r -1
- }
-
- if {$r == 1} {
- # things are OK so far, so just verify the function name is displayed
- # in the combobox entry field.
- set names [$statbar.func get]
- if {[string compare $names "oof"]} {set r -2}
- }
- set r
-} {1}
-
-# Test: srcwin2-2.8
-# Desc: This test issues a next command while browsing list1.c.
-# It should display list0.c and highlight the correct line.
-gdbtk_test srcwin2-2.8 "step while browsing" {
- gdb_immediate "next" 1
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list0.c"} {set r -1}
- if {$func != "main"} {set r -2}
-
- # check that correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $file1(source) $a]} {set r -3}
-
- # check for PC_TAG
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- incr r
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Test: srcwin2-2.11
-# Desc: This test issues a break and a continue
-gdbtk_test srcwin2-2.11 "set BP and continue" {
- gdb_immediate "break oof" 1
- gdb_immediate "continue" 1
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list1.c"} {set r -1}
- if {$func != "oof"} {set r -2}
-
- # check that the correct file is displayed
- # we must clear the breakpoint first so it doesn't mess up the
- # comparison...
- gdb_immediate "clear oof" 1
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $file2(source) $a]} {set r -3}
-
- # check for PC_TAG on correct line
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- if {$i == "38.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-##### #####
-# #
-# SECTION 3: Stack Operations #
-# #
-##### #####
-
-# Test: srcwin2-3.1
-# Desc: This tests "stack up"
-gdbtk_test srcwin2-3.1 "stack up (1)" {
- $srcwin stack up
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list1.c"} {set r -1}
- if {$func != "long_line"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $file2(source) $a]} {set r -3}
-
- # check for PC_TAG and STACK_TAG on correct lines
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- if {$i == "38.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {
- if {$i == "26.2"} {
- incr r
- } else {
- incr r 10
- }
- }
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {2}
-
-# Test: srcwin2-3.2
-# Desc: Another "stack up" test
-gdbtk_test srcwin2-3.2 "stack up (2)" {
- $srcwin stack up
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list1.c"} {set r -1}
- if {$func != "bar"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $file2(source) $a]} {set r -3}
-
- # check for PC_TAG and STACK_TAG on correct lines
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- if {$i == "38.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {
- if {$i == "12.2"} {
- incr r
- } else {
- incr r 10
- }
- }
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {2}
-
-# Test: srcwin2-3.3
-# Desc: Another "stack up" test
-gdbtk_test srcwin2-3.3 "stack up (3)" {
- $srcwin stack up
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list0.h"} {set r -1}
- if {$func != "foo"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set file3(source) [$twin get 1.0 end]
- if {![string compare $file2(source) $file3(source)]} {set r -3}
-
- # check for PC_TAG and STACK_TAG on correct lines
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "STACK_TAG"} {
- if {$i == "9.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "PC_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Test: srcwin2-3.4
-# Desc: Another "stack up" test
-gdbtk_test srcwin2-3.4 "stack up (4)" {
- $srcwin stack up
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list0.c"} {set r -1}
- if {$func != "main"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $file1(source) $a]} {set r -3}
-
- # check for STACK_TAG
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "STACK_TAG"} {
- incr r
- }
- if {$v == "PC_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-
-# Disabled for now because there are different correct results.
-# Test should be rewritten to include those.
-# Test: srcwin2-3.5
-# Desc: "stack up" when we are at the top
-#gdbtk_test srcwin2-3.5 "stack up when at the top" {
-# $srcwin stack up
-# set r 0
-# set name [$statbar.name get]
-# set func [$statbar.func get]
-
- # check contents of name and function comboboxes
-# if {$name != "list0.c"} {set r -1}
-# if {$func != "main"} {set r -2}
-
- # check that the correct file is displayed
-# set twin [$stw test_get twin]
-# set a [$twin get 1.0 end]
-# if {[string compare $file1(source) $a]} {set r -3}
-
- # check for STACK_TAG
-# if {$r == 0} {
-# if {![catch {set z [$twin dump -tag 1.0 end]}]} {
-# foreach {k v i} $z {
-# if {$k == "tagon"} {
-# if {$v == "STACK_TAG"} {
-# incr r
-# }
-# if {$v == "PC_TAG"} {incr r 10}
-# if {$v == "BROWSE_TAG"} {incr r 100}
-# }
-# }
-# } else {
-# set r -4
-# }
-# }
-# set r
-#} {1}
-
-# Test: srcwin2-3.6
-# Desc: "stack down" test
-gdbtk_test srcwin2-3.6 "stack down" {
- $srcwin stack down
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list0.h"} {set r -1}
- if {$func != "foo"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {![string compare $file2(source) $a]} {set r -3}
-
- # check for PC_TAG and STACK_TAG on correct lines
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "STACK_TAG"} {
- if {$i == "9.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "PC_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Test: srcwin2-3.7
-# Desc: "stack bottom" test
-gdbtk_test srcwin2-3.7 "stack bottom" {
- $srcwin stack bottom
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list1.c"} {set r -1}
- if {$func != "oof"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $file2(source) $a]} {set r -3}
-
- # check for PC_TAG on correct line
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- if {$i == "38.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Test: srcwin2-3.8
-# Desc: "stack down" when at bottom
-gdbtk_test srcwin2-3.8 "stack down when at bottom" {
- $srcwin stack down
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list1.c"} {set r -1}
- if {$func != "oof"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $file2(source) $a]} {set r -3}
-
- # check for PC_TAG on correct line
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- if {$i == "38.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# 4.1 bp, multiple, balloon, etc
-
-# Test: srcwin2-4.1
-# Desc: Set BP in another file. Tests bp and cache functions
-gdbtk_test srcwin2-4.1 "set BP in another file" {
- gdb_immediate "break foo" 1
- $srcwin goto_func "" foo
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list0.h"} {set r -1}
- if {$func != "foo"} {set r -2}
-
- set twin [$stw test_get twin]
-
- # check for BROWSE_TAG and BP image on correct line
- if {$r == 0} {
- if {![catch {set z [$twin dump 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "BROWSE_TAG"} {
- if {$i == "9.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "PC_TAG"} {incr r 100}
- } elseif {$k == "image"} {
- if {$i == "9.0"} {
- incr r
- } else {
- set r -200
- }
- }
- }
- } else {
- set r -4
- }
- }
-
- if {$r == 2} {
- # clear BP and compare with previous contents. This should succeed,
- gdb_immediate "clear foo" 1
- set a [$twin get 1.0 end]
- if {[string compare $file3(source) $a]} {set r -3}
- }
-
- set r
-} {2}
-
-# Test: srcwin2-4.2
-# Desc: Test temporary BP
-gdbtk_test srcwin2-4.2 "temporary BP" {
- set r 0
- if {[catch {gdb_immediate "tbreak foo" 1} msg]} {
- set r -500
- }
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list0.h"} {set r -1}
- if {$func != "foo"} {set r -2}
-
- set twin [$stw test_get twin]
-
- # check for BROWSE_TAG and BP image on correct line
- if {$r == 0} {
- if {![catch {set z [$twin dump 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "BROWSE_TAG"} {
- if {$i == "9.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "PC_TAG"} {incr r 100}
- } elseif {$k == "image"} {
- if {$i == "9.0"} {
- incr r
- } else {
- set r -200
- }
- }
- }
- } else {
- set r -4
- }
- }
-
- gdb_immediate "continue" 1
-
- # now check for PC_TAG and no image
- if {$r == 2} {
- if {![catch {set z [$twin dump 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- if {$i == "9.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- } elseif {$k == "image"} {
- set r -200
- }
- }
- } else {
- set r -4
- }
- }
-
- set r
-} {3}
-
-gdbtk_test_done
diff --git a/gdb/testsuite/gdb.gdbtk/srcwin3.test b/gdb/testsuite/gdb.gdbtk/srcwin3.test
deleted file mode 100644
index b9a1617bb5c..00000000000
--- a/gdb/testsuite/gdb.gdbtk/srcwin3.test
+++ /dev/null
@@ -1,789 +0,0 @@
-# Copyright (C) 1999, 2001 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Martin Hunt (hunt@cygnus.com)
-
-###########################################################
-# same as srcwin.test, except test debugging executables #
-# build without "-g" #
-###########################################################
-
-# Read in the standard defs file
-
-if {![gdbtk_read_defs]} {
- break
-}
-
-global objdir srcdir
-
-##### #####
-# #
-# SECTION 1: Mode Tests #
-# #
-##### #####
-
-# Load the test executable
-set program [file join $objdir list]
-if {[catch {gdbtk_test_file $program} t]} {
- # This isn't a test case, since if this fails, we're hosed.
- gdbtk_test_error "loading \"$program\": $t"
-}
-
-set srcwin [ManagedWin::open SrcWin]
-set stw [$srcwin test_get twin]
-set twin [$stw test_get twin]
-set statbar [$srcwin test_get _statbar]
-
-# get things started
-gdb_cmd "break main"
-gdbtk_test_run
-
-# Test: srcwin3-1.1
-# Desc: Check for something in source window
-gdbtk_test srcwin3-1.1 "source window has contents" {
- set r 0
- set source(main) [$twin get 1.0 end]
- if {$source(main) == ""} {set r -1}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -2}
- set r
-} {0}
-
-# Test: srcwin3-1.2
-# Desc: source->assembly mode change
-gdbtk_test srcwin3-1.2 "source->assembly mode change" {
- set r 0
- $srcwin mode "" ASSEMBLY
- set twin [$stw test_get twin]
- if {$source(main) != [$twin get 1.0 end]} {set r -1}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -2}
- set r
-} {0}
-
-# Test: srcwin3-1.3
-# Desc: assembly->mixed mode change
-gdbtk_test srcwin3-1.3 "assembly->mixed mode change" {
- set r 0
- $srcwin mode "" MIXED
- set twin [$stw test_get twin]
- if {$source(main) != [$twin get 1.0 end]} {set r -1}
- if {[$statbar.mode get] != "MIXED"} {set r -2}
- set r
-} {0}
-
-# Test: srcwin3-1.4
-# Desc: mixed->src+asm mode change
-gdbtk_test srcwin3-1.4 "mixed->src+asm mode change" {
- set r 0
- # mode change may fail if fallover to ASSEMBLY fails
- if {[catch {$srcwin mode "" SRC+ASM}]} { set r -5 }
- set twin [$stw test_get twin]
- if {[$twin get 1.0 end] != $source(main)} {set r -1}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -2}
- set r
-} {0}
-
-# Test: srcwin3-1.5
-# Desc: src+asm->source mode change
-gdbtk_test srcwin3-1.5 "src+asm->source mode change" {
- set r 0
- $srcwin mode "" SOURCE
- set twin [$stw test_get twin]
- if {[$stw test_get bwin] != ""} {set r -2}
- if {[$twin get 1.0 end] != $source(main)} {set r -1}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -3}
- set r
-} {0}
-
-# Test: srcwin3-1.6
-# Desc: source->mixed mode change
-gdbtk_test srcwin3-1.6 "source->mixed mode change" {
- set r 0
- $srcwin mode "" MIXED
- set twin [$stw test_get twin]
- if {[$twin get 1.0 end] != $source(main)} {set r -1}
- if {[$statbar.mode get] != "MIXED"} {set r -2}
- set r
-} {0}
-
-# Test: srcwin3-1.7
-# Desc: mixed->source mode change
-gdbtk_test srcwin3-1.7 "mixed->source mode change" {
- set r 0
- $srcwin mode "" SOURCE
- set twin [$stw test_get twin]
- if {[$twin get 1.0 end] != $source(main)} {set r -1}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -2}
- set r
-} {0}
-
-# Test: srcwin3-1.8
-# Desc: source->src+asm mode change
-gdbtk_test srcwin3-1.8 "source->src+asm mode change" {
- set r 0
- # mode change may fail if fallover to ASSEMBLY fails
- if {[catch {$srcwin mode "" SRC+ASM}]} { set r -5 }
- set twin [$stw test_get twin]
- set bwin [$stw test_get bwin]
- if {[$twin get 1.0 end] != $source(main)} {set r -1}
- if {$bwin != ""} {set r -2}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -3}
- set r
-} {0}
-
-# Test: srcwin3-1.9
-# Desc: src+asm->assembly mode change
-gdbtk_test srcwin3-1.9 "src+asm->assembly mode change" {
- set r 0
- $srcwin mode "" ASSEMBLY
- set twin [$stw test_get twin]
- if {[$twin get 1.0 end] != $source(main)} {set r -1}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -2}
- set r
-} {0}
-
-# Test: srcwin3-1.10
-# Desc: assembly->src+asm mode change
-gdbtk_test srcwin3-1.10 "assembly->src+asm mode change" {
- set r 0
- # mode change may fail if fallover to ASSEMBLY fails
- if {[catch {$srcwin mode "" SRC+ASM}]} { set r -5 }
- set twin [$stw test_get twin]
- set bwin [$stw test_get bwin]
- if {[$twin get 1.0 end] != $source(main)} {set r -1}
- if {$bwin != ""} {set r -2}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -3}
- set r
-} {0}
-
-# Test: srcwin3-1.11
-# Desc: src+asm->mixed mode change
-gdbtk_test srcwin3-1.11 "src+asm->mixed mode change" {
- set r 0
- $srcwin mode "" MIXED
- set twin [$stw test_get twin]
- if {[$twin get 1.0 end] != $source(main)} {set r -1}
- if {[$statbar.mode get] != "MIXED"} {set r -2}
- set r
-} {0}
-
-# Test: srcwin3-1.12
-# Desc: mixed->assembly mode change
-gdbtk_test srcwin3-1.12 "mixed->assembly mode change" {
- set r 0
- $srcwin mode "" ASSEMBLY
- set twin [$stw test_get twin]
- if {[$twin get 1.0 end] != $source(main)} {set r -1}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -2}
- set r
-} {0}
-
-# Test: srcwin3-1.13
-# Desc: assembly->source mode change
-gdbtk_test srcwin3-1.13 "assembly->source mode change" {
- set r 0
- $srcwin mode "" SOURCE
- set twin [$stw test_get twin]
- if {[$twin get 1.0 end] != $source(main)} {set r -1}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -2}
- set r
-} {0}
-
-
-##### #####
-# #
-# SECTION 2: Basic Operations #
-# #
-##### #####
-
-# Test: srcwin3-2.2
-# Desc: check contents of function combobox
-# There won't be any because we have no debug info
-gdbtk_test srcwin3-2.2 "check contents of function combobox" {
- set names [$statbar.func list get 0 end]
- llength $names
-} {0}
-
-# Test: srcwin3-2.3
-# Desc: goto filename - this won't work, but should leave things as they were
-gdbtk_test srcwin3-2.3 "goto filename" {
- set func [$srcwin test_get _name 1]
- $func "" list1.c
- set twin [$stw test_get twin]
- string compare $source(main) [$twin get 1.0 end]
-} {0}
-
-# Test: srcwin3-2.6
-# Desc: goto function
-gdbtk_test srcwin3-2.6 "goto function bar" {
- $srcwin goto_func "" bar
- set r 0
- set twin [$stw test_get twin]
- set source(bar) [$twin get 1.0 end]
-
- if {$source(bar) == $source(main)} {set r -1000}
-
- # now get a dump of all tags and check that only one line is
- # marked BROWSE_TAG and no lines are STACK_TAG or PC_TAG.
-
- # We know that list1.c should have BROWSE_TAG set at index 5.2
- # for function "bar". If list1.c is changed or the layout of the source
- # window is changed, this must be updated.
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "BROWSE_TAG"} {
- incr r
- }
- if {$v == "STACK_TAG"} { incr r 10}
- if {$v == "PC_TAG"} { incr r 100}
- }
- }
- } else {
- set r -1
- }
-
- if {$r == 1} {
- # things are OK so far, so just verify the function name is displayed
- # in the combobox entry field.
- set names [$statbar.func get]
- if {[string compare $names "bar"]} {set r -2}
- }
- set r
-} {1}
-
-# Test: srcwin3-2.7
-# Desc: goto function "oof". This tests that the correct line is highlighted
-# with BROWSE_TAG and no other lines are highlighted. It also checks that
-# the combobox has the correct function name in it.
-
-gdbtk_test srcwin3-2.7 "goto function oof" {
- $srcwin goto_func "" oof
- set r 0
-
- set twin [$stw test_get twin]
- set source(oof) [$twin get 1.0 end]
-
- if {$source(bar) == $source(oof)} {set r -1000}
- if {$source(oof) == $source(main)} {set r -2000}
-
- # now get a dump of all tags and check that only one line is
- # marked BROWSE_TAG and no lines are STACK_TAG or PC_TAG.
-
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "BROWSE_TAG"} {
- incr r
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "PC_TAG"} {incr r 100}
- }
- }
- } else {
- set r -1
- }
-
- if {$r == 1} {
- # things are OK so far, so just verify the function name is displayed
- # in the combobox entry field.
- set names [$statbar.func get]
- if {[string compare $names "oof"]} {set r -2}
- }
- set r
-} {1}
-
-# Test: srcwin3-2.8
-# Desc: This test issues a nexti command while browsing oof.
-# It should jump back to main
-gdbtk_test srcwin3-2.8 "nexti while browsing" {
- gdb_immediate "nexti" 1
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of function combobox
- if {$func != "main"} {set r -2}
- if {$name != ""} {set r -1}
-
- # check that correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $source(main) $a]} {set r -3}
-
- # check for PC_TAG
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- incr r
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Test: srcwin3-2.11
-# Desc: This test issues a break and a continue
-gdbtk_test srcwin3-2.11 "set BP and continue" {
- gdb_immediate "break oof" 1
- gdb_immediate "continue" 1
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != ""} {set r -1}
- if {$func != "oof"} {set r -2}
-
- # check that the correct file is displayed
- # we must clear the breakpoint first so it doesn't mess up the
- # comparison...
- gdb_immediate "clear oof" 1
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $source(oof) $a]} {set r -3}
-
- # check for PC_TAG
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- incr r
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-##### #####
-# #
-# SECTION 3: Stack Operations #
-# #
-##### #####
-
-# Test: srcwin3-3.1
-# Desc: This tests "stack up"
-gdbtk_test srcwin3-3.1 "stack up (1)" {
- $srcwin stack up
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != ""} {set r -1}
- if {$func != "long_line"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set source(long_line) [$twin get 1.0 end]
- if {![string compare $source(long_line) $source(oof)]} {set r -3}
-
- # check for PC_TAG and STACK_TAG on correct lines
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {incr r 5}
- if {$v == "STACK_TAG"} {incr r}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Test: srcwin3-3.2
-# Desc: Another "stack up" test
-gdbtk_test srcwin3-3.2 "stack up (2)" {
- $srcwin stack up
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != ""} {set r -1}
- if {$func != "bar"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $source(bar) $a]} {set r -3}
-
- # check for PC_TAG and STACK_TAG on correct lines
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- set r -100
- }
- if {$v == "STACK_TAG"} {
- incr r
- }
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Test: srcwin3-3.3
-# Desc: Another "stack up" test
-gdbtk_test srcwin3-3.3 "stack up (3)" {
- $srcwin stack up
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != ""} {set r -1}
- if {$func != "foo"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set source(foo) [$twin get 1.0 end]
- if {![string compare $source(foo) $source(bar)]} {set r -3}
-
- # check for PC_TAG and STACK_TAG on correct lines
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "STACK_TAG"} {
- incr r
- }
- if {$v == "PC_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Test: srcwin3-3.4
-# Desc: Another "stack up" test
-gdbtk_test srcwin3-3.4 "stack up (4)" {
- $srcwin stack up
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != ""} {set r -1}
- if {$func != "main"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $source(main) $a]} {set r -3}
-
- # check for STACK_TAG
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "STACK_TAG"} {
- incr r
- }
- if {$v == "PC_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Disabled for now because there are different correct results.
-# Test should be rewritten to include those.
-# Test: srcwin3-3.5
-# Desc: "stack up" when we are at the top
-#gdbtk_test srcwin3-3.5 "stack up when at the top" {
-# $srcwin stack up
-# set r 0
-# set name [$statbar.name get]
-# set func [$statbar.func get]
-
- # check contents of name and function comboboxes
-# if {$name != ""} {set r -1}
-# if {$func != "main"} {set r -2}
-
- # check that the correct file is displayed
-# set twin [$stw test_get twin]
-# set a [$twin get 1.0 end]
-# if {[string compare $source(main) $a]} {set r -3}
-
- # check for STACK_TAG
-# if {$r == 0} {
-# if {![catch {set z [$twin dump -tag 1.0 end]}]} {
-# foreach {k v i} $z {
-# if {$k == "tagon"} {
-# if {$v == "STACK_TAG"} {
-# incr r
-# }
-# if {$v == "PC_TAG"} {incr r 10}
-# if {$v == "BROWSE_TAG"} {incr r 100}
-# }
-# }
-# } else {
-# set r -4
-# }
-# }
-# set r
-#} {1}
-
-# Test: srcwin3-3.6
-# Desc: "stack down" test
-gdbtk_test srcwin3-3.6 "stack down" {
- $srcwin stack down
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != ""} {set r -1}
- if {$func != "foo"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $source(foo) $a]} {set r -3}
-
- # check for PC_TAG and STACK_TAG on correct lines
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "STACK_TAG"} {
- incr r
- }
- if {$v == "PC_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Test: srcwin3-3.7
-# Desc: "stack bottom" test
-gdbtk_test srcwin3-3.7 "stack bottom" {
- $srcwin stack bottom
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != ""} {set r -1}
- if {$func != "oof"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $source(oof) $a]} {set r -3}
-
- # check for PC_TAG on correct line
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- incr r
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Test: srcwin3-3.8
-# Desc: "stack down" when at bottom
-gdbtk_test srcwin3-3.8 "stack down when at bottom" {
- $srcwin stack down
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != ""} {set r -1}
- if {$func != "oof"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $source(oof) $a]} {set r -3}
-
- # check for PC_TAG on correct line
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- incr r
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# 4.1 bp, multiple, balloon, etc
-
-# Test: srcwin3-4.1
-# Desc: Set BP in another file. Tests bp and cache functions
-gdbtk_test srcwin3-4.1 "set BP in another file" {
- gdb_immediate "break foo" 1
- $srcwin goto_func "" foo
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != ""} {set r -1}
- if {$func != "foo"} {set r -2}
-
- set twin [$stw test_get twin]
-
- # check for BROWSE_TAG and BP image
- if {$r == 0} {
- if {![catch {set z [$twin dump 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "BROWSE_TAG"} {
- incr r
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "PC_TAG"} {incr r 100}
- } elseif {$k == "image"} {
- incr r
- }
- }
- } else {
- set r -4
- }
- }
-
- if {$r == 2} {
- # clear BP and compare with previous contents. This should succeed,
- gdb_immediate "clear foo" 1
- set a [$twin get 1.0 end]
- if {[string compare $source(foo) $a]} {set r -3}
- }
-
- set r
-} {2}
-
-# Test: srcwin3-4.2
-# Desc: Test temporary BP
-gdbtk_test srcwin3-4.2 "temporary BP" {
- set r 0
- if {[catch {gdb_immediate "tbreak foo" 1} msg]} {
- set r -500
- }
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != ""} {set r -1}
- if {$func != "foo"} {set r -2}
-
- set twin [$stw test_get twin]
-
- # check for BROWSE_TAG and BP image on correct line
- if {$r == 0} {
- if {![catch {set z [$twin dump 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "BROWSE_TAG"} {
- incr r
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "PC_TAG"} {incr r 100}
- } elseif {$k == "image"} {
- incr r
- }
- }
- } else {
- set r -4
- }
- }
-
- gdb_immediate "continue" 1
-
- # now check for PC_TAG and no image
- if {$r == 2} {
- if {![catch {set z [$twin dump 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- incr r
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- } elseif {$k == "image"} {
- set r -200
- }
- }
- } else {
- set r -4
- }
- }
-
- set r
-} {3}
-
-gdbtk_test_done
diff --git a/gdb/testsuite/gdb.gdbtk/stack1.c b/gdb/testsuite/gdb.gdbtk/stack1.c
deleted file mode 100644
index 389260a22a5..00000000000
--- a/gdb/testsuite/gdb.gdbtk/stack1.c
+++ /dev/null
@@ -1,231 +0,0 @@
-/* Functions defined in other files */
-extern void extern_func1_1 (int a, char *b, unsigned long c);
-
-/* Functions defined in this file */
-static void static_func_1 (int a, char *b, unsigned long c);
-static void static_func_2 (int a, char *b, unsigned long c);
-static void static_func_3 (int a, char *b, unsigned long c);
-static void static_func_4 (int a, char *b, unsigned long c);
-static void static_func_5 (int a, char *b, unsigned long c);
-static void static_func_6 (int a, char *b, unsigned long c);
-static void static_func_7 (int a, char *b, unsigned long c);
-static void static_func_8 (int a, char *b, unsigned long c);
-static void static_func_9 (int a, char *b, unsigned long c);
-static void static_func_10 (int a, char *b, unsigned long c);
-static void static_func_11 (int a, char *b, unsigned long c);
-static void static_func_12 (int a, char *b, unsigned long c);
-static void static_func_13 (int a, char *b, unsigned long c);
-static void static_func_14 (int a, char *b, unsigned long c);
-static void static_func_15 (int a, char *b, unsigned long c);
-
-void func_1 (int a, char *b, unsigned long c);
-void func_2 (int a, char *b, unsigned long c);
-void func_3 (int a, char *b, unsigned long c);
-void func_4 (int a, char *b, unsigned long c);
-void func_5 (int a, char *b, unsigned long c);
-void func_6 (int a, char *b, unsigned long c);
-void func_7 (int a, char *b, unsigned long c);
-void func_8 (int a, char *b, unsigned long c);
-void func_9 (int a, char *b, unsigned long c);
-void func_10 (int a, char *b, unsigned long c);
-void func_11 (int a, char *b, unsigned long c);
-void func_12 (int a, char *b, unsigned long c);
-void func_13 (int a, char *b, unsigned long c);
-void func_14 (int a, char *b, unsigned long c);
-void func_15 (int a, char *b, unsigned long c);
-
-int
-main (int argc, char *argv[])
-{
- int a;
- char *b;
- unsigned long c;
-
- a = 1;
- b = "This is a string.";
- c = 0xdeadL;
-
- func_1 (a, b, c);
-
- exit (0);
-}
-
-void
-func_1 (int a, char *b, unsigned long c)
-{
- func_2 (a, b, c);
-}
-
-void
-func_2 (int a, char *b, unsigned long c)
-{
- func_3 (a, b, c);
-}
-
-void
-func_3 (int a, char *b, unsigned long c)
-{
- func_4 (a, b, c);
-}
-
-void
-func_4 (int a, char *b, unsigned long c)
-{
- func_5 (a, b, c);
-}
-
-void
-func_5 (int a, char *b, unsigned long c)
-{
- func_6 (a, b, c);
-}
-
-void
-func_6 (int a, char *b, unsigned long c)
-{
- func_7 (a, b, c);
-}
-
-void
-func_7 (int a, char *b, unsigned long c)
-{
- func_8 (a, b, c);
-}
-
-void
-func_8 (int a, char *b, unsigned long c)
-{
- func_9 (a, b, c);
-}
-
-void
-func_9 (int a, char *b, unsigned long c)
-{
- func_10 (a, b, c);
-}
-
-void
-func_10 (int a, char *b, unsigned long c)
-{
- func_11 (a, b, c);
-}
-
-void
-func_11 (int a, char *b, unsigned long c)
-{
- func_12 (a, b, c);
-}
-
-void
-func_12 (int a, char *b, unsigned long c)
-{
- func_13 (a, b, c);
-}
-
-void
-func_13 (int a, char *b, unsigned long c)
-{
- func_14 (a, b, c);
-}
-
-void
-func_14 (int a, char *b, unsigned long c)
-{
- func_15 (a, b, c);
-}
-
-void
-func_15 (int a, char *b, unsigned long c)
-{
- static_func_1 (a, b, c);
-}
-
-static void
-static_func_1 (int a, char *b, unsigned long c)
-{
- static_func_2 (a, b, c);
-}
-
-static void
-static_func_2 (int a, char *b, unsigned long c)
-{
- static_func_3 (a, b, c);
-}
-
-static void
-static_func_3 (int a, char *b, unsigned long c)
-{
- static_func_4 (a, b, c);
-}
-
-static void
-static_func_4 (int a, char *b, unsigned long c)
-{
- static_func_5 (a, b, c);
-}
-
-static void
-static_func_5 (int a, char *b, unsigned long c)
-{
- static_func_6 (a, b, c);
-}
-
-static void
-static_func_6 (int a, char *b, unsigned long c)
-{
- static_func_7 (a, b, c);
-}
-
-static void
-static_func_7 (int a, char *b, unsigned long c)
-{
- static_func_8 (a, b, c);
-}
-
-static void
-static_func_8 (int a, char *b, unsigned long c)
-{
- static_func_9 (a, b, c);
-}
-
-static void
-static_func_9 (int a, char *b, unsigned long c)
-{
- static_func_10 (a, b, c);
-}
-
-static void
-static_func_10 (int a, char *b, unsigned long c)
-{
- static_func_11 (a, b, c);
-}
-
-static void
-static_func_11 (int a, char *b, unsigned long c)
-{
- static_func_12 (a, b, c);
-}
-
-static void
-static_func_12 (int a, char *b, unsigned long c)
-{
- static_func_13 (a, b, c);
-}
-
-static void
-static_func_13 (int a, char *b, unsigned long c)
-{
- static_func_14 (a, b, c);
-}
-
-static void
-static_func_14 (int a, char *b, unsigned long c)
-{
- static_func_15 (a, b, c);
-}
-
-static void
-static_func_15 (int a, char *b, unsigned long c)
-{
- extern_func1_1 (a, b, c);
-}
diff --git a/gdb/testsuite/gdb.gdbtk/stack2.c b/gdb/testsuite/gdb.gdbtk/stack2.c
deleted file mode 100644
index db47c469e6e..00000000000
--- a/gdb/testsuite/gdb.gdbtk/stack2.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/* Functions defined in this file */
-void extern_func1_1 (int, char *, unsigned long);
-void extern_func1_2 (int, char *, unsigned long);
-void extern_func1_3 (int, char *, unsigned long);
-void extern_func1_4 (int, char *, unsigned long);
-void extern_func1_5 (int, char *, unsigned long);
-void extern_func1_6 (int, char *, unsigned long);
-void extern_func1_7 (int, char *, unsigned long);
-void extern_func1_8 (int, char *, unsigned long);
-void extern_func1_9 (int, char *, unsigned long);
-void extern_func1_10 (int, char *, unsigned long);
-void extern_func1_11 (int, char *, unsigned long);
-void extern_func1_12 (int, char *, unsigned long);
-void extern_func1_13 (int, char *, unsigned long);
-void extern_func1_14 (int, char *, unsigned long);
-void extern_func1_15 (int, char *, unsigned long);
-
-void
-extern_func1_1 (int a, char *b, unsigned long c)
-{
- extern_func1_2 (a, b, c);
-}
-
-void
-extern_func1_2 (int a, char *b, unsigned long c)
-{
- extern_func1_3 (a, b, c);
-}
-
-void
-extern_func1_3 (int a, char *b, unsigned long c)
-{
- extern_func1_4 (a, b, c);
-}
-
-void
-extern_func1_4 (int a, char *b, unsigned long c)
-{
- extern_func1_5 (a, b, c);
-}
-
-void
-extern_func1_5 (int a, char *b, unsigned long c)
-{
- extern_func1_6 (a, b, c);
-}
-
-void
-extern_func1_6 (int a, char *b, unsigned long c)
-{
- extern_func1_7 (a, b, c);
-}
-
-void
-extern_func1_7 (int a, char *b, unsigned long c)
-{
- extern_func1_8 (a, b, c);
-}
-
-void
-extern_func1_8 (int a, char *b, unsigned long c)
-{
- extern_func1_9 (a, b, c);
-}
-
-void
-extern_func1_9 (int a, char *b, unsigned long c)
-{
- extern_func1_10 (a, b, c);
-}
-
-void
-extern_func1_10 (int a, char *b, unsigned long c)
-{
- extern_func1_11 (a, b, c);
-}
-
-void
-extern_func1_11 (int a, char *b, unsigned long c)
-{
- extern_func1_12 (a, b, c);
-}
-
-void
-extern_func1_12 (int a, char *b, unsigned long c)
-{
- extern_func1_13 (a, b, c);
-}
-
-void
-extern_func1_13 (int a, char *b, unsigned long c)
-{
- extern_func1_14 (a, b, c);
-}
-
-void
-extern_func1_14 (int a, char *b, unsigned long c)
-{
- extern_func1_15 (a, b, c);
-}
-
-void
-extern_func1_15 (int a, char *b, unsigned long c)
-{
- /* THE END */
- return;
-}
diff --git a/gdb/testsuite/gdb.gdbtk/windows.exp b/gdb/testsuite/gdb.gdbtk/windows.exp
deleted file mode 100644
index c5613de8b42..00000000000
--- a/gdb/testsuite/gdb.gdbtk/windows.exp
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright 2001, 2004 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-load_lib ../gdb.gdbtk/insight-support.exp
-
-if {[gdbtk_initialize_display]} {
- if {$tracelevel} {
- strace $tracelevel
- }
-
- #
- # Basic window tests (basic as in, "do they open")
- #
- set prms_id 0
- set bug_id 0
-
- set srcfile [file join $srcdir $subdir c_variable.c]
- set binfile [file join $objdir $subdir c_variable]
- set r [gdb_compile $srcfile $binfile executable {debug}]
- if { $r != "" } {
- gdb_suppress_entire_file \
- "Testcase compile failed, so some tests in this file will automatically fail."
- }
-
- # Start with a fresh gdbtk
- gdb_exit
- set results [gdbtk_start [file join $srcdir $subdir windows.test]]
- set results [split $results \n]
-
- # Analyze results
- gdbtk_done $results
-}
diff --git a/gdb/testsuite/gdb.gdbtk/windows.test b/gdb/testsuite/gdb.gdbtk/windows.test
deleted file mode 100644
index d8f72c549fe..00000000000
--- a/gdb/testsuite/gdb.gdbtk/windows.test
+++ /dev/null
@@ -1,131 +0,0 @@
-# Basic window tests
-# Copyright 2001, 2003 Red Hat, Inc.
-#
-# This Program Is Free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Keith Seitz (keiths@cygnus.com)
-
-# Read in the standard defs file
-if {![gdbtk_read_defs]} {
- break
-}
-
-global objdir test_ran
-
-# Windows to test
-# FIXME: TfindArgs needs to be updated before it can go in the list...
-set windows [list BpWin BrowserWin Console DebugWin KodWin LocalsWin \
- MemWin ProcessWin RegWin StackWin TdumpWin WatchWin]
-
-# Dialogs to test
-# FIXME: ActionhDlg,TraceDlg cannot be independently opened
-set dialogs [list About AttachDlg GlobalPref SrcPref TargetSelection]
-
-# Helper proc to do all the testing
-proc do_open_close {num winlist} {
- set i 1
- foreach win $winlist {
-
- # Test: windows-$num.*
- # Desc: Open each window before running
- set win_obj ""
- gdbtk_test windows-$num.$i "open $win before running" {
- set err [catch {ManagedWin::open $win} txt]
- if {$err} {
- # display error
- set txt
- } else {
- # display "0"
- set win_obj $txt
- set err
- }
- } {0}
-
- # Update screen
- update idletasks
-
- # Test: windows-{$num+1}.*
- # Desc: Close each window before running
- gdbtk_test windows-[expr {$num+1}].$i "close $win before running" {
- set err [catch {delete object $win_obj} txt]
- if {$err} {
- # display error
- set txt
- } else {
- # display "0"
- set err
- }
- } {0}
-
- # Update screen
- update idletasks
- incr i
- }
-}
-
-#
-# Tests start here
-#
-
-# Counter for tests. Increment by 2 after each call to do_open_close.
-set num 1
-
-#
-# Check if all windows open with no file loaded
-#
-do_open_close $num $windows
-incr num 2
-
-# Sadly, there is no good way to unpost dialogs (except for setting
-# an after callback). Until something better comes along, skip them.
-# do_open_close $num $dialogs
-# incr num 2
-
-#
-# Check if all windows open with file loaded
-#
-
-# Load in a file
-set program [file join $objdir c_variable]
-if {[catch {gdbtk_test_file $program} t]} {
- # This isn't a test case, since if this fails, we're hosed.
- gdbtk_test_error "loading \"$program\": $t"
-}
-
-do_open_close $num $windows
-incr num 2
-#do_open_close $num $dialogs
-incr num 2
-
-#
-# Check if all windows open after running
-#
-
-# Break in main and run
-gdb_cmd "break main"
-gdbtk_test_run
-
-do_open_close $num $windows
-incr num 2
-#do_open_close $num $dialogs
-#incr num 2
-
-#
-# Exit
-#
-gdbtk_test_done
diff --git a/intl/ChangeLog b/intl/ChangeLog
deleted file mode 100644
index 1799509adb2..00000000000
--- a/intl/ChangeLog
+++ /dev/null
@@ -1,1115 +0,0 @@
-2006-04-06 Carlos O'Donell <carlos@codesourcery.com>
-
- * intl/Makefile.in: Add html info and dvi and install-html to .PHONY
- Add install-html target.
-
-2006-02-27 Carlos O'Donell <carlos@codesourcery.com>
-
- * intl/Makefile.in: Add html target.
-
-2005-05-13 Nick Clifton <nickc@redhat.com>
-
- * Update the address and phone number of the FSF organization in
- the GPL notices in the following files:
- Makefile.in, bindtextdom.c, cat-compat.c, dcgettext.c,
- dgettext.c, explodename.c, finddomain.c, gettext.c, gettext.h,
- gettextP.h, hash-string.h, intl-compat.c, intlh.inst.in,
- l10nflist.c, libgettext.h, libintl.glibc, linux-msg.sed,
- loadinfo.h, loadmsgcat.c, localealias.c, po2tbl.sed.in,
- textdomain.c, xopen-msg.sed
-
-2004-11-30 Tero Niemela <tero_niemela@yahoo.com>
-
- * Makefile.in: Change LOCALEDIR to $(datadir)/share.
-
-2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
-
- * linux-msg.sed: Comment typo fix.
- * xopen-msg.sed: Likewise.
-
-1998-04-29 Ulrich Drepper <drepper@cygnus.com>
-
- * intl/localealias.c (read_alias_file): Use unsigned char for
- local variables. Remove unused variable tp.
- * intl/l10nflist.c (_nl_normalize_codeset): Use unsigned char *
- for type of codeset. For loosing Solaris systems.
- * intl/loadinfo.h: Adapt prototype of _nl_normalize_codeset.
- * intl/bindtextdom.c (BINDTEXTDOMAIN): Don't define local variable
- len if not needed.
- Patches by Jim Meyering.
-
-1998-04-28 Ulrich Drepper <drepper@cygnus.com>
-
- * loadmsgcat.c (_nl_load_domain): Don't assign the element use_mmap if
- mmap is not supported.
-
- * hash-string.h: Don't include <values.h>.
-
-1998-04-27 Ulrich Drepper <drepper@cygnus.com>
-
- * textdomain.c: Use strdup is available.
-
- * localealias.c: Define HAVE_MEMPCPY so that we can use this
- function. Define and use semapahores to protect modfication of
- global objects when compiling for glibc. Add code to allow
- freeing alias table.
-
- * l10nflist.c: Don't assume stpcpy not being a macro.
-
- * gettextP.h: Define internal_function macri if not already done.
- Use glibc byte-swap macros instead of defining SWAP when compiled
- for glibc.
- (struct loaded_domain): Add elements to allow unloading.
-
- * Makefile.in (distclean): Don't remove libintl.h here.
-
- * bindtextdomain.c: Carry over changes from glibc. Use strdup if
- available.
-
- * dcgettext.c: Don't assume stpcpy not being a macro. Mark internal
- functions. Add memory freeing code for glibc.
-
- * dgettext.c: Update copyright.
-
- * explodename.c: Include stdlib.h and string.h only if they exist.
- Use strings.h eventually.
-
- * finddomain.c: Mark internal functions. Use strdup if available.
- Add memory freeing code for glibc.
-
-1997-10-10 20:00 Ulrich Drepper <drepper@cygnus.com>
-
- * libgettext.h: Fix dummy textdomain and bindtextdomain macros.
- They should return reasonable values.
- Reported by Tom Tromey <tromey@cygnus.com>.
-
-1997-09-16 03:33 Ulrich Drepper <drepper@cygnus.com>
-
- * libgettext.h: Define PARAMS also to `args' if __cplusplus is defined.
- * intlh.inst.in: Likewise.
- Reported by Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>.
-
- * libintl.glibc: Update from current glibc version.
-
-1997-09-06 02:10 Ulrich Drepper <drepper@cygnus.com>
-
- * intlh.inst.in: Reformat copyright.
-
-1997-08-19 15:22 Ulrich Drepper <drepper@cygnus.com>
-
- * dcgettext.c (DCGETTEXT): Remove wrong comment.
-
-1997-08-16 00:13 Ulrich Drepper <drepper@cygnus.com>
-
- * Makefile.in (install-data): Don't change directory to install.
-
-1997-08-01 14:30 Ulrich Drepper <drepper@cygnus.com>
-
- * cat-compat.c: Fix copyright.
-
- * localealias.c: Don't define strchr unless !HAVE_STRCHR.
-
- * loadmsgcat.c: Update copyright. Fix typos.
-
- * l10nflist.c: Don't define strchr unless !HAVE_STRCHR.
- (_nl_make_l10nflist): Handle sponsor and revision correctly.
-
- * gettext.c: Update copyright.
- * gettext.h: Likewise.
- * hash-string.h: Likewise.
-
- * finddomain.c: Remoave dead code. Define strchr only if
- !HAVE_STRCHR.
-
- * explodename.c: Include <sys/types.h>.
-
- * explodename.c: Reformat copyright text.
- (_nl_explode_name): Fix typo.
-
- * dcgettext.c: Define and use __set_errno.
- (guess_category_value): Don't use setlocale if HAVE_LC_MESSAGES is
- not defined.
-
- * bindtextdom.c: Pretty printing.
-
-1997-05-01 02:25 Ulrich Drepper <drepper@cygnus.com>
-
- * dcgettext.c (guess_category_value): Don't depend on
- HAVE_LC_MESSAGES. We don't need the macro here.
- Patch by Bruno Haible <haible@ilog.fr>.
-
- * cat-compat.c (textdomain): DoN't refer to HAVE_SETLOCALE_NULL
- macro. Instead use HAVE_LOCALE_NULL and define it when using
- glibc, as in dcgettext.c.
- Patch by Bruno Haible <haible@ilog.fr>.
-
- * Makefile.in (CPPFLAGS): New variable. Reported by Franc,ois
- Pinard.
-
-Mon Mar 10 06:51:17 1997 Ulrich Drepper <drepper@cygnus.com>
-
- * Makefile.in: Implement handling of libtool.
-
- * gettextP.h: Change data structures for use of generic lowlevel
- i18n file handling.
-
-Wed Dec 4 20:21:18 1996 Ulrich Drepper <drepper@cygnus.com>
-
- * textdomain.c: Put parentheses around arguments of memcpy macro
- definition.
- * localealias.c: Likewise.
- * l10nflist.c: Likewise.
- * finddomain.c: Likewise.
- * bindtextdom.c: Likewise.
- Reported by Thomas Esken.
-
-Mon Nov 25 22:57:51 1996 Ulrich Drepper <drepper@cygnus.com>
-
- * textdomain.c: Move definition of `memcpy` macro to right
- position.
-
-Fri Nov 22 04:01:58 1996 Ulrich Drepper <drepper@cygnus.com>
-
- * finddomain.c [!HAVE_STRING_H && !_LIBC]: Define memcpy using
- bcopy if not already defined. Reported by Thomas Esken.
- * bindtextdom.c: Likewise.
- * l10nflist.c: Likewise.
- * localealias.c: Likewise.
- * textdomain.c: Likewise.
-
-Tue Oct 29 11:10:27 1996 Ulrich Drepper <drepper@cygnus.com>
-
- * Makefile.in (libdir): Change to use exec_prefix instead of
- prefix. Reported by Knut-HåvardAksnes <etokna@eto.ericsson.se>.
-
-Sat Aug 31 03:07:09 1996 Ulrich Drepper <drepper@cygnus.com>
-
- * l10nflist.c (_nl_normalize_codeset): We convert to lower case,
- so don't prepend uppercase `ISO' for only numeric arg.
-
-Fri Jul 19 00:15:46 1996 Ulrich Drepper <drepper@cygnus.com>
-
- * l10nflist.c: Move inclusion of argz.h, ctype.h, stdlib.h after
- definition of _GNU_SOURCE. Patch by Roland McGrath.
-
- * Makefile.in (uninstall): Fix another bug with `for' loop and
- empty arguments. Patch by Jim Meyering. Correct name os
- uninstalled files: no intl- prefix anymore.
-
- * Makefile.in (install-data): Again work around shells which
- cannot handle mpty for list. Reported by Jim Meyering.
-
-Sat Jul 13 18:11:35 1996 Ulrich Drepper <drepper@cygnus.com>
-
- * Makefile.in (install): Split goal. Now depend on install-exec
- and install-data.
- (install-exec, install-data): New goals. Created from former
- install goal.
- Reported by Karl Berry.
-
-Sat Jun 22 04:58:14 1996 Ulrich Drepper <drepper@cygnus.com>
-
- * Makefile.in (MKINSTALLDIRS): New variable. Path to
- mkinstalldirs script.
- (install): use MKINSTALLDIRS variable or if the script is not present
- try to find it in the $top_scrdir).
-
-Wed Jun 19 02:56:56 1996 Ulrich Drepper <drepper@cygnus.com>
-
- * l10nflist.c: Linux libc *partly* includes the argz_* functions.
- Grr. Work around by renaming the static version and use macros
- for renaming.
-
-Tue Jun 18 20:11:17 1996 Ulrich Drepper <drepper@cygnus.com>
-
- * l10nflist.c: Correct presence test macros of __argz_* functions.
-
- * l10nflist.c: Include <argz.h> based on test of it instead when
- __argz_* functions are available.
- Reported by Andreas Schwab.
-
-Thu Jun 13 15:17:44 1996 Ulrich Drepper <drepper@cygnus.com>
-
- * explodename.c, l10nflist.c: Define NULL for dumb systems.
-
-Tue Jun 11 17:05:13 1996 Ulrich Drepper <drepper@cygnus.com>
-
- * intlh.inst.in, libgettext.h (dcgettext): Rename local variable
- result to __result to prevent name clash.
-
- * l10nflist.c, localealias.c, dcgettext.c: Define _GNU_SOURCE to
- get prototype for stpcpy and strcasecmp.
-
- * intlh.inst.in, libgettext.h: Move declaration of
- `_nl_msg_cat_cntr' outside __extension__ block to prevent warning
- from gcc's -Wnested-extern option.
-
-Fri Jun 7 01:58:00 1996 Ulrich Drepper <drepper@cygnus.com>
-
- * Makefile.in (install): Remove comment.
-
-Thu Jun 6 17:28:17 1996 Ulrich Drepper <drepper@cygnus.com>
-
- * Makefile.in (install): Work around for another Buglix stupidity.
- Always use an `else' close for `if's. Reported by Nelson Beebe.
-
- * Makefile.in (intlh.inst): Correct typo in phony rule.
- Reported by Nelson Beebe.
-
-Thu Jun 6 01:49:52 1996 Ulrich Drepper <drepper@cygnus.com>
-
- * dcgettext.c (read_alias_file): Rename variable alloca_list to
- block_list as the macro calls assume.
- Patch by Eric Backus.
-
- * localealias.c [!HAVE_ALLOCA]: Define alloca as macro using
- malloc.
- (read_alias_file): Rename varriabe alloca_list to block_list as the
- macro calls assume.
- Patch by Eric Backus.
-
- * l10nflist.c: Correct conditional for <argz.h> inclusion.
- Reported by Roland McGrath.
-
- * Makefile.in (all): Depend on all-@USE_INCLUDED_LIBINTL@, not
- all-@USE_NLS@.
-
- * Makefile.in (install): intlh.inst comes from local dir, not
- $(srcdir).
-
- * Makefile.in (intlh.inst): Special handling of this goal. If
- used in gettext, this is really a rul to construct this file. If
- used in any other package it is defined as a .PHONY rule with
- empty body.
-
- * finddomain.c: Extract locale file information handling into
- l10nfile.c. Rename local stpcpy__ function to stpcpy.
-
- * dcgettext.c (stpcpy): Add local definition.
-
- * l10nflist.c: Solve some portability problems. Patches partly by
- Thomas Esken. Add local definition of stpcpy.
-
-Tue Jun 4 02:47:49 1996 Ulrich Drepper <drepper@cygnus.com>
-
- * intlh.inst.in: Don't depend including <locale.h> on
- HAVE_LOCALE_H. Instead configure must rewrite this fiile
- depending on the result of the configure run.
-
- * Makefile.in (install): libintl.inst is now called intlh.inst.
- Add rules for updating intlh.inst from intlh.inst.in.
-
- * libintl.inst: Renamed to intlh.inst.in.
-
- * localealias.c, dcgettext.c [__GNUC__]: Define HAVE_ALLOCA to 1
- because gcc has __buitlin_alloca.
- Reported by Roland McGrath.
-
-Mon Jun 3 00:32:16 1996 Ulrich Drepper <drepper@cygnus.com>
-
- * Makefile.in (installcheck): New goal to fulfill needs of
- automake's distcheck.
-
- * Makefile.in (install): Reorder commands so that VERSION is
- found.
-
- * Makefile.in (gettextsrcdir): Now use subdirectory intl/ in
- @datadir@/gettext.
- (COMSRCS): Add l10nfile.c.
- (OBJECTS): Add l10nfile.o.
- (DISTFILES): Rename to DISTFILE.normal. Remove $(DISTFILES.common).
- (DISTFILE.gettext): Remove $(DISTFILES.common).
- (all-gettext): Remove goal.
- (install): If $(PACKAGE) = gettext install, otherwose do nothing. No
- package but gettext itself should install libintl.h + headers.
- (dist): Extend goal to work for gettext, too.
- (dist-gettext): Remove goal.
-
- * dcgettext.c [!HAVE_ALLOCA]: Define macro alloca by using malloc.
-
-Sun Jun 2 17:33:06 1996 Ulrich Drepper <drepper@cygnus.com>
-
- * loadmsgcat.c (_nl_load_domain): Parameter is now comes from
- find_l10nfile.
-
-Sat Jun 1 02:23:03 1996 Ulrich Drepper <drepper@cygnus.com>
-
- * l10nflist.c (__argz_next): Add definition.
-
- * dcgettext.c [!HAVE_ALLOCA]: Add code for handling missing alloca
- code. Use new l10nfile handling.
-
- * localealias.c [!HAVE_ALLOCA]: Add code for handling missing
- alloca code.
-
- * l10nflist.c: Initial revision.
-
-Tue Apr 2 18:51:18 1996 Ulrich Drepper <drepper@myware>
-
- * Makefile.in (all-gettext): New goal. Same as all-yes.
-
-Thu Mar 28 23:01:22 1996 Karl Eichwalder <ke@ke.central.de>
-
- * Makefile.in (gettextsrcdir): Define using @datadir@.
-
-Tue Mar 26 12:39:14 1996 Ulrich Drepper <drepper@myware>
-
- * finddomain.c: Include <ctype.h>. Reported by Roland McGrath.
-
-Sat Mar 23 02:00:35 1996 Ulrich Drepper <drepper@myware>
-
- * finddomain.c (stpcpy): Rename to stpcpy__ to prevent clashing
- with external declaration.
-
-Sat Mar 2 00:47:09 1996 Ulrich Drepper <drepper@myware>
-
- * Makefile.in (all-no): Rename from all_no.
-
-Sat Feb 17 00:25:59 1996 Ulrich Drepper <drepper@myware>
-
- * gettextP.h [loaded_domain]: Array `successor' must now contain up
- to 63 elements (because of codeset name normalization).
-
- * finddomain.c: Implement codeset name normalization.
-
-Thu Feb 15 04:39:09 1996 Ulrich Drepper <drepper@myware>
-
- * Makefile.in (all): Define to `all-@USE_NLS@'.
- (all-yes, all_no): New goals. `all-no' is noop, `all-yes'
- is former all.
-
-Mon Jan 15 21:46:01 1996 Howard Gayle <howard@hal.com>
-
- * localealias.c (alias_compare): Increment string pointers in loop
- of strcasecmp replacement.
-
-Fri Dec 29 21:16:34 1995 Ulrich Drepper <drepper@myware>
-
- * Makefile.in (install-src): Who commented this goal out ? :-)
-
-Fri Dec 29 15:08:16 1995 Ulrich Drepper <drepper@myware>
-
- * dcgettext.c (DCGETTEXT): Save `errno'. Failing system calls
- should not effect it because a missing catalog is no error.
- Reported by Harald K<o:>nig <koenig@tat.physik.uni-tuebingen.de>.
-
-Tue Dec 19 22:09:13 1995 Ulrich Drepper <drepper@myware>
-
- * Makefile.in (Makefile): Explicitly use $(SHELL) for running
- shell scripts.
-
-Fri Dec 15 17:34:59 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * Makefile.in (install-src): Only install library and header when
- we use the own implementation. Don't do it when using the
- system's gettext or catgets functions.
-
- * dcgettext.c (find_msg): Must not swap domain->hash_size here.
-
-Sat Dec 9 16:24:37 1995 Ulrich Drepper <drepper@myware>
-
- * localealias.c, libintl.inst, libgettext.h, hash-string.h,
- gettextP.h, finddomain.c, dcgettext.c, cat-compat.c:
- Use PARAMS instead of __P. Suggested by Roland McGrath.
-
-Tue Dec 5 11:39:14 1995 Larry Schwimmer <rosebud@cyclone.stanford.edu>
-
- * libgettext.h: Use `#if !defined (_LIBINTL_H)' instead of `#if
- !_LIBINTL_H' because Solaris defines _LIBINTL_H as empty.
-
-Mon Dec 4 15:42:07 1995 Ulrich Drepper <drepper@myware>
-
- * Makefile.in (install-src):
- Install libintl.inst instead of libintl.h.install.
-
-Sat Dec 2 22:51:38 1995 Marcus Daniels <marcus@sysc.pdx.edu>
-
- * cat-compat.c (textdomain):
- Reverse order in which files are tried you load. First
- try local file, when this failed absolute path.
-
-Wed Nov 29 02:03:53 1995 Nelson H. F. Beebe <beebe@math.utah.edu>
-
- * cat-compat.c (bindtextdomain): Add missing { }.
-
-Sun Nov 26 18:21:41 1995 Ulrich Drepper <drepper@myware>
-
- * libintl.inst: Add missing __P definition. Reported by Nelson Beebe.
-
- * Makefile.in:
- Add dummy `all' and `dvi' goals. Reported by Tom Tromey.
-
-Sat Nov 25 16:12:01 1995 Franc,ois Pinard <pinard@iro.umontreal.ca>
-
- * hash-string.h: Capitalize arguments of macros.
-
-Sat Nov 25 12:01:36 1995 Ulrich Drepper <drepper@myware>
-
- * Makefile.in (DISTFILES): Prevent files names longer than 13
- characters. libintl.h.glibc->libintl.glibc,
- libintl.h.install->libintl.inst. Reported by Joshua R. Poulson.
-
-Sat Nov 25 11:31:12 1995 Eric Backus <ericb@lsid.hp.com>
-
- * dcgettext.c: Fix bug in preprocessor conditionals.
-
-Sat Nov 25 02:35:27 1995 Nelson H. F. Beebe <beebe@math.utah.edu>
-
- * libgettext.h: Solaris cc does not understand
- #if !SYMBOL1 && !SYMBOL2. Sad but true.
-
-Thu Nov 23 16:22:14 1995 Ulrich Drepper <drepper@myware>
-
- * hash-string.h (hash_string):
- Fix for machine with >32 bit `unsigned long's.
-
- * dcgettext.c (DCGETTEXT):
- Fix horrible bug in loop for alternative translation.
-
-Thu Nov 23 01:45:29 1995 Ulrich Drepper <drepper@myware>
-
- * po2tbl.sed.in, linux-msg.sed, xopen-msg.sed:
- Some further simplifications in message number generation.
-
-Mon Nov 20 21:08:43 1995 Ulrich Drepper <drepper@myware>
-
- * libintl.h.glibc: Use __const instead of const in prototypes.
-
- * Makefile.in (install-src):
- Install libintl.h.install instead of libintl.h. This
- is a stripped-down version. Suggested by Peter Miller.
-
- * libintl.h.install, libintl.h.glibc: Initial revision.
-
- * localealias.c (_nl_expand_alias, read_alias_file):
- Protect prototypes in type casts by __P.
-
-Tue Nov 14 16:43:58 1995 Ulrich Drepper <drepper@myware>
-
- * hash-string.h: Correct prototype for hash_string.
-
-Sun Nov 12 12:42:30 1995 Ulrich Drepper <drepper@myware>
-
- * hash-string.h (hash_string): Add prototype.
-
- * gettextP.h: Fix copyright.
- (SWAP): Add prototype.
-
-Wed Nov 8 22:56:33 1995 Ulrich Drepper <drepper@myware>
-
- * localealias.c (read_alias_file): Forgot sizeof.
- Avoid calling *printf function. This introduces a big overhead.
- Patch by Roland McGrath.
-
-Tue Nov 7 14:21:08 1995 Ulrich Drepper <drepper@myware>
-
- * finddomain.c, cat-compat.c: Wrong indentation in #if for stpcpy.
-
- * finddomain.c (stpcpy):
- Define substitution function local. The macro was to flaky.
-
- * cat-compat.c: Fix typo.
-
- * xopen-msg.sed, linux-msg.sed:
- While bringing message number to right place only accept digits.
-
- * linux-msg.sed, xopen-msg.sed: Now that the counter does not have
- leading 0s we don't need to remove them. Reported by Marcus
- Daniels.
-
- * Makefile.in (../po/cat-id-tbl.o): Use $(top_srdir) in
- dependency. Reported by Marcus Daniels.
-
- * cat-compat.c: (stpcpy) [!_LIBC && !HAVE_STPCPY]: Define replacement.
- Generally cleanup using #if instead of #ifndef.
-
- * Makefile.in: Correct typos in comment. By Franc,ois Pinard.
-
-Mon Nov 6 00:27:02 1995 Ulrich Drepper <drepper@myware>
-
- * Makefile.in (install-src): Don't install libintl.h and libintl.a
- if we use an available gettext implementation.
-
-Sun Nov 5 22:02:08 1995 Ulrich Drepper <drepper@myware>
-
- * libgettext.h: Fix typo: HAVE_CATGETTS -> HAVE_CATGETS. Reported
- by Franc,ois Pinard.
-
- * libgettext.h: Use #if instead of #ifdef/#ifndef.
-
- * finddomain.c:
- Comments describing what has to be done should start with FIXME.
-
-Sun Nov 5 19:38:01 1995 Ulrich Drepper <drepper@myware>
-
- * Makefile.in (DISTFILES): Split. Use DISTFILES with normal meaning.
- DISTFILES.common names the files common to both dist goals.
- DISTFILES.gettext are the files only distributed in GNU gettext.
-
-Sun Nov 5 17:32:54 1995 Ulrich Drepper <drepper@myware>
-
- * dcgettext.c (DCGETTEXT): Correct searching in derived locales.
- This was necessary since a change in _nl_find_msg several weeks
- ago. I really don't know this is still not fixed.
-
-Sun Nov 5 12:43:12 1995 Ulrich Drepper <drepper@myware>
-
- * loadmsgcat.c (_nl_load_domain): Test for FILENAME == NULL. This
- might mark a special condition.
-
- * finddomain.c (make_entry_rec): Don't make illegal entry as decided.
-
- * Makefile.in (dist): Suppress error message when ln failed.
- Get files from $(srcdir) explicitly.
-
- * libgettext.h (gettext_const): Rename to gettext_noop.
-
-Fri Nov 3 07:36:50 1995 Ulrich Drepper <drepper@myware>
-
- * finddomain.c (make_entry_rec):
- Protect against wrong locale names by testing mask.
-
- * libgettext.h (gettext_const): Add macro definition.
- Capitalize macro arguments.
-
-Thu Nov 2 23:15:51 1995 Ulrich Drepper <drepper@myware>
-
- * finddomain.c (_nl_find_domain):
- Test for pointer != NULL before accessing value.
- Reported by Tom Tromey.
-
- * gettext.c (NULL):
- Define as (void*)0 instad of 0. Reported by Franc,ois Pinard.
-
-Mon Oct 30 21:28:52 1995 Ulrich Drepper <drepper@myware>
-
- * po2tbl.sed.in: Serious typo bug fixed by Jim Meyering.
-
-Sat Oct 28 23:20:47 1995 Ulrich Drepper <drepper@myware>
-
- * libgettext.h: Disable dcgettext optimization for Solaris 2.3.
-
- * localealias.c (alias_compare):
- Peter Miller reported that tolower in some systems is
- even dumber than I thought. Protect call by `isupper'.
-
-Fri Oct 27 22:22:51 1995 Ulrich Drepper <drepper@myware>
-
- * Makefile.in (libdir, includedir): New variables.
- (install-src): Install libintl.a and libintl.h in correct dirs.
-
-Fri Oct 27 22:07:29 1995 Ulrich Drepper <drepper@myware>
-
- * Makefile.in (SOURCES): Fix typo: intrl.compat.c -> intl-compat.c.
-
- * po2tbl.sed.in: Patch for buggy SEDs by Christian von Roques.
-
- * localealias.c:
- Fix typo and superflous test. Reported by Christian von Roques.
-
-Fri Oct 6 11:52:05 1995 Ulrich Drepper <drepper@myware>
-
- * finddomain.c (_nl_find_domain):
- Correct some remainder from the pre-CEN syntax. Now
- we don't have a constant number of successors anymore.
-
-Wed Sep 27 21:41:13 1995 Ulrich Drepper <drepper@myware>
-
- * Makefile.in (DISTFILES): Add libintl.h.glibc.
-
- * Makefile.in (dist-libc): Add goal for packing sources for glibc.
- (COMSRCS, COMHDRS): Splitted to separate sources shared with glibc.
-
- * loadmsgcat.c: Forget to continue #if line.
-
- * localealias.c:
- [_LIBC]: Rename strcasecmp to __strcasecmp to keep ANSI C name
- space clean.
-
- * dcgettext.c, finddomain.c: Better comment to last change.
-
- * loadmsgcat.c:
- [_LIBC]: Rename fstat, open, close, read, mmap, and munmap to
- __fstat, __open, __close, __read, __mmap, and __munmap resp
- to keep ANSI C name space clean.
-
- * finddomain.c:
- [_LIBC]: Rename stpcpy to __stpcpy to keep ANSI C name space clean.
-
- * dcgettext.c:
- [_LIBC]: Rename getced and stpcpy to __getcwd and __stpcpy resp to
- keep ANSI C name space clean.
-
- * libgettext.h:
- Include sys/types.h for those old SysV systems out there.
- Reported by Francesco Potorti`.
-
- * loadmsgcat.c (use_mmap): Define if compiled for glibc.
-
- * bindtextdom.c: Include all those standard headers
- unconditionally if _LIBC is defined.
-
- * finddomain.c: Fix 2 times defiend -> defined.
-
- * textdomain.c: Include libintl.h instead of libgettext.h when
- compiling for glibc. Include all those standard headers
- unconditionally if _LIBC is defined.
-
- * localealias.c, loadmsgcat.c: Prepare to be compiled in glibc.
-
- * gettext.c:
- Include libintl.h instead of libgettext.h when compiling for glibc.
- Get NULL from stddef.h if we compile for glibc.
-
- * finddomain.c: Include libintl.h instead of libgettext.h when
- compiling for glibc. Include all those standard headers
- unconditionally if _LIBC is defined.
-
- * dcgettext.c: Include all those standard headers unconditionally
- if _LIBC is defined.
-
- * dgettext.c: If compiled in glibc include libintl.h instead of
- libgettext.h.
- (locale.h): Don't rely on HAVE_LOCALE_H when compiling for glibc.
-
- * dcgettext.c: If compiled in glibc include libintl.h instead of
- libgettext.h.
- (getcwd): Don't rely on HAVE_GETCWD when compiling for glibc.
-
- * bindtextdom.c:
- If compiled in glibc include libintl.h instead of libgettext.h.
-
-Mon Sep 25 22:23:06 1995 Ulrich Drepper <drepper@myware>
-
- * localealias.c (_nl_expand_alias): Don't call bsearch if NMAP <= 0.
- Reported by Marcus Daniels.
-
- * cat-compat.c (bindtextdomain):
- String used in putenv must not be recycled.
- Reported by Marcus Daniels.
-
- * libgettext.h (__USE_GNU_GETTEXT):
- Additional symbol to signal that we use GNU gettext
- library.
-
- * cat-compat.c (bindtextdomain):
- Fix bug with the strange stpcpy replacement.
- Reported by Nelson Beebe.
-
-Sat Sep 23 08:23:51 1995 Ulrich Drepper <drepper@myware>
-
- * cat-compat.c: Include <string.h> for stpcpy prototype.
-
- * localealias.c (read_alias_file):
- While expand strdup code temporary variable `cp' hided
- higher level variable with same name. Rename to `tp'.
-
- * textdomain.c (textdomain):
- Avoid warning by using temporary variable in strdup code.
-
- * finddomain.c (_nl_find_domain): Remove unused variable `application'.
-
-Thu Sep 21 15:51:44 1995 Ulrich Drepper <drepper@myware>
-
- * localealias.c (alias_compare):
- Use strcasecmp() only if available. Else use
- implementation in place.
-
- * intl-compat.c:
- Wrapper functions now call *__ functions instead of __*.
-
- * libgettext.h: Declare prototypes for *__ functions instead for __*.
-
- * cat-compat.c, loadmsgcat.c:
- Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
- of the standard libc and so prevent libintl.a from being used
- standalone.
-
- * bindtextdom.c:
- Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
- of the standard libc and so prevent libintl.a from being used
- standalone.
- Rename to bindtextdomain__ if not used in GNU C Library.
-
- * dgettext.c:
- Rename function to dgettext__ if not used in GNU C Library.
-
- * gettext.c:
- Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
- of the standard libc and so prevent libintl.a from being used
- standalone.
- Functions now called gettext__ if not used in GNU C Library.
-
- * dcgettext.c, localealias.c, textdomain.c, finddomain.c:
- Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
- of the standard libc and so prevent libintl.a from being used
- standalone.
-
-Sun Sep 17 23:14:49 1995 Ulrich Drepper <drepper@myware>
-
- * finddomain.c: Correct some bugs in handling of CEN standard
- locale definitions.
-
-Thu Sep 7 01:49:28 1995 Ulrich Drepper <drepper@myware>
-
- * finddomain.c: Implement CEN syntax.
-
- * gettextP.h (loaded_domain): Extend number of successors to 31.
-
-Sat Aug 19 19:25:29 1995 Ulrich Drepper <drepper@myware>
-
- * Makefile.in (aliaspath): Remove path to X11 locale dir.
-
- * Makefile.in: Make install-src depend on install. This helps
- gettext to install the sources and other packages can use the
- install goal.
-
-Sat Aug 19 15:19:33 1995 Ulrich Drepper <drepper@myware>
-
- * Makefile.in (uninstall): Remove stuff installed by install-src.
-
-Tue Aug 15 13:13:53 1995 Ulrich Drepper <drepper@myware>
-
- * VERSION.in: Initial revision.
-
- * Makefile.in (DISTFILES):
- Add VERSION file. This is not necessary for gettext, but
- for other packages using this library.
-
-Tue Aug 15 06:16:44 1995 Ulrich Drepper <drepper@myware>
-
- * gettextP.h (_nl_find_domain):
- New prototype after changing search strategy.
-
- * finddomain.c (_nl_find_domain):
- We now try only to find a specified catalog. Fall back to other
- catalogs listed in the locale list is now done in __dcgettext.
-
- * dcgettext.c (__dcgettext):
- Now we provide message fall back even to different languages.
- I.e. if a message is not available in one language all the other
- in the locale list a tried. Formerly fall back was only possible
- within one language. Implemented by moving one loop from
- _nl_find_domain to here.
-
-Mon Aug 14 23:45:50 1995 Ulrich Drepper <drepper@myware>
-
- * Makefile.in (gettextsrcdir):
- Directory where source of GNU gettext library are made
- available.
- (INSTALL, INSTALL_DATA): Programs used for installing sources.
- (gettext-src): New. Rule to install GNU gettext sources for use in
- gettextize shell script.
-
-Sun Aug 13 14:40:48 1995 Ulrich Drepper <drepper@myware>
-
- * loadmsgcat.c (_nl_load_domain):
- Use mmap for loading only when munmap function is
- also available.
-
- * Makefile.in (install): Depend on `all' goal.
-
-Wed Aug 9 11:04:33 1995 Ulrich Drepper <drepper@myware>
-
- * localealias.c (read_alias_file):
- Do not overwrite '\n' when terminating alias value string.
-
- * localealias.c (read_alias_file):
- Handle long lines. Ignore the rest not fitting in
- the buffer after the initial `fgets' call.
-
-Wed Aug 9 00:54:29 1995 Ulrich Drepper <drepper@myware>
-
- * gettextP.h (_nl_load_domain):
- Add prototype, replacing prototype for _nl_load_msg_cat.
-
- * finddomain.c (_nl_find_domain):
- Remove unneeded variable filename and filename_len.
- (expand_alias): Remove prototype because functions does not
- exist anymore.
-
- * localealias.c (read_alias_file):
- Change type of fname_len parameter to int.
- (xmalloc): Add prototype.
-
- * loadmsgcat.c: Better prototypes for xmalloc.
-
-Tue Aug 8 22:30:39 1995 Ulrich Drepper <drepper@myware>
-
- * finddomain.c (_nl_find_domain):
- Allow alias name to be constructed from the four components.
-
- * Makefile.in (aliaspath): New variable. Set to preliminary value.
- (SOURCES): Add localealias.c.
- (OBJECTS): Add localealias.o.
-
- * gettextP.h: Add prototype for _nl_expand_alias.
-
- * finddomain.c: Aliasing handled in intl/localealias.c.
-
- * localealias.c: Aliasing for locale names.
-
- * bindtextdom.c: Better prototypes for xmalloc and xstrdup.
-
-Mon Aug 7 23:47:42 1995 Ulrich Drepper <drepper@myware>
-
- * Makefile.in (DISTFILES): gettext.perl is now found in misc/.
-
- * cat-compat.c (bindtextdomain):
- Correct implementation. dirname parameter was not used.
- Reported by Marcus Daniels.
-
- * gettextP.h (loaded_domain):
- New fields `successor' and `decided' for oo, lazy
- message handling implementation.
-
- * dcgettext.c:
- Adopt for oo, lazy message handliing.
- Now we can inherit translations from less specific locales.
- (find_msg): New function.
-
- * loadmsgcat.c, finddomain.c:
- Complete rewrite. Implement oo, lazy message handling :-).
- We now have an additional environment variable `LANGUAGE' with
- a higher priority than LC_ALL for the LC_MESSAGE locale.
- Here we can set a colon separated list of specifications each
- of the form `language[_territory[.codeset]][@modifier]'.
-
-Sat Aug 5 09:55:42 1995 Ulrich Drepper <drepper@myware>
-
- * finddomain.c (unistd.h):
- Include to get _PC_PATH_MAX defined on system having it.
-
-Fri Aug 4 22:42:00 1995 Ulrich Drepper <drepper@myware>
-
- * finddomain.c (stpcpy): Include prototype.
-
- * Makefile.in (dist): Remove `copying instead' message.
-
-Wed Aug 2 18:52:03 1995 Ulrich Drepper <drepper@myware>
-
- * Makefile.in (ID, TAGS): Do not use $^.
-
-Tue Aug 1 20:07:11 1995 Ulrich Drepper <drepper@myware>
-
- * Makefile.in (TAGS, ID): Use $^ as command argument.
- (TAGS): Give etags -o option t write to current directory,
- not $(srcdir).
- (ID): Use $(srcdir) instead os $(top_srcdir)/src.
- (distclean): Remove ID.
-
-Sun Jul 30 11:51:46 1995 Ulrich Drepper <drepper@myware>
-
- * Makefile.in (gnulocaledir):
- New variable, always using share/ for data directory.
- (DEFS): Add GNULOCALEDIR, used in finddomain.c.
-
- * finddomain.c (_nl_default_dirname):
- Set to GNULOCALEDIR, because it always has to point
- to the directory where GNU gettext Library writes it to.
-
- * intl-compat.c (textdomain, bindtextdomain):
- Undefine macros before function definition.
-
-Sat Jul 22 01:10:02 1995 Ulrich Drepper <drepper@myware>
-
- * libgettext.h (_LIBINTL_H):
- Protect definition in case where this file is included as
- libgettext.h on Solaris machines. Add comment about this.
-
-Wed Jul 19 02:36:42 1995 Ulrich Drepper <drepper@myware>
-
- * intl-compat.c (textdomain): Correct typo.
-
-Wed Jul 19 01:51:35 1995 Ulrich Drepper <drepper@myware>
-
- * dcgettext.c (dcgettext): Function now called __dcgettext.
-
- * dgettext.c (dgettext): Now called __dgettext and calls
- __dcgettext.
-
- * gettext.c (gettext):
- Function now called __gettext and calls __dgettext.
-
- * textdomain.c (textdomain): Function now called __textdomain.
-
- * bindtextdom.c (bindtextdomain): Function now called
- __bindtextdomain.
-
- * intl-compat.c: Initial revision.
-
- * Makefile.in (SOURCES): Add intl-compat.c.
- (OBJECTS): We always compile the GNU gettext library functions.
- OBJECTS contains all objects but cat-compat.o, ../po/cat-if-tbl.o,
- and intl-compat.o.
- (GETTOBJS): Contains now only intl-compat.o.
-
- * libgettext.h:
- Re-include protection matches dualistic character of libgettext.h.
- For all functions in GNU gettext library define __ counter part.
-
- * finddomain.c (strchr): Define as index if not found in C library.
- (_nl_find_domain): For relative paths paste / in between.
-
-Tue Jul 18 16:37:45 1995 Ulrich Drepper <drepper@myware>
-
- * loadmsgcat.c, finddomain.c: Add inclusion of sys/types.h.
-
- * xopen-msg.sed: Fix bug with `msgstr ""' lines.
- A little bit better comments.
-
-Tue Jul 18 01:18:27 1995 Ulrich Drepper <drepper@myware>
-
- * Makefile.in:
- po-mode.el, makelinks, combine-sh are now found in ../misc.
-
- * po-mode.el, makelinks, combine-sh, elisp-comp:
- Moved to ../misc/.
-
- * libgettext.h, gettextP.h, gettext.h: Uniform test for __STDC__.
-
-Sun Jul 16 22:33:02 1995 Ulrich Drepper <drepper@myware>
-
- * Makefile.in (INSTALL, INSTALL_DATA): New variables.
- (install-data, uninstall): Install/uninstall .elc file.
-
- * po-mode.el (Installation comment):
- Add .pox as possible extension of .po files.
-
-Sun Jul 16 13:23:27 1995 Ulrich Drepper <drepper@myware>
-
- * elisp-comp: Complete new version by Franc,ois: This does not
- fail when not compiling in the source directory.
-
-Sun Jul 16 00:12:17 1995 Ulrich Drepper <drepper@myware>
-
- * Makefile.in (../po/cat-id-tbl.o):
- Use $(MAKE) instead of make for recursive make.
-
- * Makefile.in (.el.elc): Use $(SHELL) instead of /bin/sh.
- (install-exec): Add missing dummy goal.
- (install-data, uninstall): @ in multi-line shell command at
- beginning, not in front of echo. Reported by Eric Backus.
-
-Sat Jul 15 00:21:28 1995 Ulrich Drepper <drepper@myware>
-
- * Makefile.in (DISTFILES):
- Rename libgettext.perl to gettext.perl to fit in 14 chars
- file systems.
-
- * gettext.perl:
- Rename to gettext.perl to fit in 14 chars file systems.
-
-Thu Jul 13 23:17:20 1995 Ulrich Drepper <drepper@myware>
-
- * cat-compat.c: If !STDC_HEADERS try to include malloc.h.
-
-Thu Jul 13 20:55:02 1995 Ulrich Drepper <drepper@myware>
-
- * po2tbl.sed.in: Pretty printing.
-
- * linux-msg.sed, xopen-msg.sed:
- Correct bugs with handling substitute flags in branches.
-
- * hash-string.h (hash_string):
- Old K&R compilers don't under stand `unsigned char'.
-
- * gettext.h (nls_uint32):
- Some old K&R compilers (eg HP) don't understand `unsigned int'.
-
- * cat-compat.c (msg_to_cat_id): De-ANSI-fy prototypes.
-
-Thu Jul 13 01:34:33 1995 Ulrich Drepper <drepper@myware>
-
- * Makefile.in (ELCFILES): New variable.
- (DISTFILES): Add elisp-comp.
- Add implicit rule for .el -> .elc compilation.
- (install-data): install $ELCFILES
- (clean): renamed po-to-tbl and po-to-msg to po2tbl and po2msg resp.
-
- * elisp-comp: Initial revision
-
-Wed Jul 12 16:14:52 1995 Ulrich Drepper <drepper@myware>
-
- * Makefile.in:
- cat-id-tbl.c is now found in po/. This enables us to use an identical
- intl/ directory in all packages.
-
- * dcgettext.c (dcgettext): hashing does not work for table size <= 2.
-
- * textdomain.c: fix typo (#if def -> #if defined)
-
-Tue Jul 11 18:44:43 1995 Ulrich Drepper <drepper@myware>
-
- * Makefile.in (stamp-cat-id): use top_srcdir to address source files
- (DISTFILES,distclean): move tupdate.perl to src/
-
- * po-to-tbl.sed.in:
- add additional jump to clear change flag to recognize multiline strings
-
-Tue Jul 11 01:32:50 1995 Ulrich Drepper <drepper@myware>
-
- * textdomain.c: Protect inclusion of stdlib.h and string.h.
-
- * loadmsgcat.c: Protect inclusion of stdlib.h.
-
- * libgettext.h: Protect inclusion of locale.h.
- Allow use in C++ programs.
- Define NULL is not happened already.
-
- * Makefile.in (DISTFILES): ship po-to-tbl.sed.in instead of
- po-to-tbl.sed.
- (distclean): remove po-to-tbl.sed and tupdate.perl.
-
- * tupdate.perl.in: Substitute Perl path even in exec line.
- Don't include entries without translation from old .po file.
-
-Tue Jul 4 00:41:51 1995 Ulrich Drepper <drepper@myware>
-
- * tupdate.perl.in: use "Updated: " in msgid "".
-
- * cat-compat.c: Fix typo (LOCALDIR -> LOCALEDIR).
- Define getenv if !__STDC__.
-
- * bindtextdom.c: Protect stdlib.h and string.h inclusion.
- Define free if !__STDC__.
-
- * finddomain.c: Change DEF_MSG_DOM_DIR to LOCALEDIR.
- Define free if !__STDC__.
-
- * cat-compat.c: Change DEF_MSG_DOM_DIR to LOCALEDIR.
-
-Mon Jul 3 23:56:30 1995 Ulrich Drepper <drepper@myware>
-
- * Makefile.in: Use LOCALEDIR instead of DEF_MSG_DOM_DIR.
- Remove unneeded $(srcdir) from Makefile.in dependency.
-
- * makelinks: Add copyright and short description.
-
- * po-mode.el: Last version for 0.7.
-
- * tupdate.perl.in: Fix die message.
-
- * dcgettext.c: Protect include of string.h.
-
- * gettext.c: Protect include of stdlib.h and further tries to get NULL.
-
- * finddomain.c: Some corrections in includes.
-
- * Makefile.in (INCLUDES): Prune list correct path to Makefile.in.
-
- * po-to-tbl.sed: Adopt for new .po file format.
-
- * linux-msg.sed, xopen-msg.sed: Adopt for new .po file format.
-
-Sun Jul 2 23:55:03 1995 Ulrich Drepper <drepper@myware>
-
- * tupdate.perl.in: Complete rewrite for new .po file format.
-
-Sun Jul 2 02:06:50 1995 Ulrich Drepper <drepper@myware>
-
- * First official release. This directory contains all the code
- needed to internationalize own packages. It provides functions
- which allow to use the X/Open catgets function with an interface
- like the Uniforum gettext function. For system which does not
- have neither of those a complete implementation is provided.
diff --git a/intl/Makefile.in b/intl/Makefile.in
deleted file mode 100644
index ed579c7b232..00000000000
--- a/intl/Makefile.in
+++ /dev/null
@@ -1,218 +0,0 @@
-# Makefile for directory with message catalog handling in GNU NLS Utilities.
-# Copyright (C) 1995, 1996, 1997, 1998, 2006 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
-
-PACKAGE = @PACKAGE@
-VERSION = @VERSION@
-
-SHELL = /bin/sh
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-VPATH = @srcdir@
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-transform = @program_transform_name@
-libdir = $(exec_prefix)/lib
-includedir = $(prefix)/include
-datadir = $(prefix)/@DATADIRNAME@
-localedir = $(datadir)/locale
-gnulocaledir = $(datadir)/locale
-gettextsrcdir = @datadir@/gettext/intl
-aliaspath = $(localedir):.
-subdir = intl
-
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-MKINSTALLDIRS = @MKINSTALLDIRS@
-
-l = @l@
-
-AR = ar
-CC = @CC@
-LIBTOOL = @LIBTOOL@
-RANLIB = @RANLIB@
-
-DEFS = -DLOCALEDIR=\"$(localedir)\" -DGNULOCALEDIR=\"$(gnulocaledir)\" \
--DLOCALE_ALIAS_PATH=\"$(aliaspath)\" @DEFS@
-CPPFLAGS = @CPPFLAGS@
-CFLAGS = @CFLAGS@
-LDFLAGS = @LDFLAGS@
-
-COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
-
-HEADERS = $(COMHDRS) libgettext.h loadinfo.h
-COMHDRS = gettext.h gettextP.h hash-string.h
-SOURCES = $(COMSRCS) intl-compat.c cat-compat.c
-COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \
-finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \
-explodename.c
-OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \
-finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \
-explodename.$lo
-CATOBJS = cat-compat.$lo ../po/cat-id-tbl.$lo
-GETTOBJS = intl-compat.$lo
-DISTFILES.common = ChangeLog Makefile.in linux-msg.sed po2tbl.sed.in \
-xopen-msg.sed $(HEADERS) $(SOURCES)
-DISTFILES.normal = VERSION
-DISTFILES.gettext = libintl.glibc intlh.inst.in
-
-.SUFFIXES:
-.SUFFIXES: .c .o .lo
-.c.o:
- $(COMPILE) $<
-.c.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) $<
-
-INCLUDES = -I. -I$(srcdir)
-
-all: all-@USE_INCLUDED_LIBINTL@
-
-all-yes: libintl.$la intlh.inst
-all-no:
-install-info:
-
-libintl.a: $(OBJECTS)
- rm -f $@
- $(AR) cru $@ $(OBJECTS)
- $(RANLIB) $@
-
-libintl.la: $(OBJECTS)
- $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(OBJECTS) \
- -version-info 1:0 -rpath $(libdir)
-
-../po/cat-id-tbl.$lo: ../po/cat-id-tbl.c $(top_srcdir)/po/$(PACKAGE).pot
- cd ../po && $(MAKE) cat-id-tbl.$lo
-
-check: all
-
-# This installation goal is only used in GNU gettext. Packages which
-# only use the library should use install instead.
-
-# We must not install the libintl.h/libintl.a files if we are on a
-# system which has the gettext() function in its C library or in a
-# separate library or use the catgets interface. A special case is
-# where configure found a previously installed GNU gettext library.
-# If you want to use the one which comes with this version of the
-# package, you have to use `configure --with-included-gettext'.
-install: install-exec install-data
-install-exec: all
- if test "$(PACKAGE)" = "gettext" \
- && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
- if test -r $(MKINSTALLDIRS); then \
- $(MKINSTALLDIRS) $(libdir) $(includedir); \
- else \
- $(top_srcdir)/mkinstalldirs $(libdir) $(includedir); \
- fi; \
- $(INSTALL_DATA) intlh.inst $(includedir)/libintl.h; \
- $(INSTALL_DATA) libintl.a $(libdir)/libintl.a; \
- else \
- : ; \
- fi
-install-data: all
- if test "$(PACKAGE)" = "gettext"; then \
- if test -r $(MKINSTALLDIRS); then \
- $(MKINSTALLDIRS) $(gettextsrcdir); \
- else \
- $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
- fi; \
- $(INSTALL_DATA) VERSION $(gettextsrcdir)/VERSION; \
- dists="$(DISTFILES.common)"; \
- for file in $$dists; do \
- $(INSTALL_DATA) $(srcdir)/$$file $(gettextsrcdir)/$$file; \
- done; \
- else \
- : ; \
- fi
-
-# Define this as empty until I found a useful application.
-installcheck:
-
-uninstall:
- dists="$(DISTFILES.common)"; \
- for file in $$dists; do \
- rm -f $(gettextsrcdir)/$$file; \
- done
-
-.PHONY: html info dvi
-html info dvi:
-
-.PHONY: install-html
-install-html:
-
-$(OBJECTS): config.h libgettext.h
-bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h
-dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h
-
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES)
- here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
-
-id: ID
-
-ID: $(HEADERS) $(SOURCES)
- here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
-
-
-mostlyclean:
- rm -f *.a *.o *.lo core core.*
-
-clean: mostlyclean
-
-distclean: clean
- rm -f Makefile ID TAGS po2msg.sed po2tbl.sed libintl.h config.log
-
-maintainer-clean: distclean
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-
-# GNU gettext needs not contain the file `VERSION' but contains some
-# other files which should not be distributed in other packages.
-distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
-dist distdir: Makefile $(DISTFILES)
- if test "$(PACKAGE)" = gettext; then \
- additional="$(DISTFILES.gettext)"; \
- else \
- additional="$(DISTFILES.normal)"; \
- fi; \
- for file in $(DISTFILES.common) $$additional; do \
- ln $(srcdir)/$$file $(distdir) 2> /dev/null \
- || cp -p $(srcdir)/$$file $(distdir); \
- done
-
-dist-libc:
- tar zcvf intl-glibc.tar.gz $(COMSRCS) $(COMHDRS) libintl.h.glibc
-
-Makefile: Makefile.in config.status
- CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-# The dependency for intlh.inst is different in gettext and all other
-# packages. Because we cannot you GNU make features we have to solve
-# the problem while rewriting Makefile.in.
-@GT_YES@intlh.inst: intlh.inst.in ../config.status
-@GT_YES@ cd .. \
-@GT_YES@ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \
-@GT_YES@ $(SHELL) ./config.status
-@GT_NO@.PHONY: intlh.inst
-@GT_NO@intlh.inst:
-
-# Tell versions [3.59,3.63) of GNU make not to export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/intl/acconfig.h b/intl/acconfig.h
deleted file mode 100644
index 70f81f80898..00000000000
--- a/intl/acconfig.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Define to 1 if NLS is requested. */
-#undef ENABLE_NLS
-
-/* Define as 1 if you have catgets and don't want to use GNU gettext. */
-#undef HAVE_CATGETS
-
-/* Define as 1 if you have gettext and don't want to use GNU gettext. */
-#undef HAVE_GETTEXT
-
-/* Define as 1 if you have the stpcpy function. */
-#undef HAVE_STPCPY
-
-/* Define if your locale.h file contains LC_MESSAGES. */
-#undef HAVE_LC_MESSAGES
diff --git a/intl/aclocal.m4 b/intl/aclocal.m4
deleted file mode 100644
index 225439f2125..00000000000
--- a/intl/aclocal.m4
+++ /dev/null
@@ -1,387 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.3
-
-dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
-dnl This Makefile.in is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-# Like AC_CONFIG_HEADER, but automatically create stamp file.
-
-AC_DEFUN(AM_CONFIG_HEADER,
-[AC_PREREQ([2.12])
-AC_CONFIG_HEADER([$1])
-dnl When config.status generates a header, we must update the stamp-h file.
-dnl This file resides in the same directory as the config header
-dnl that is generated. We must strip everything past the first ":",
-dnl and everything past the last "/".
-AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
-ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
-<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
-<<am_indx=1
-for am_file in <<$1>>; do
- case " <<$>>CONFIG_HEADERS " in
- *" <<$>>am_file "*<<)>>
- echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
- ;;
- esac
- am_indx=`expr "<<$>>am_indx" + 1`
-done<<>>dnl>>)
-changequote([,]))])
-
-
-# serial 1
-
-AC_DEFUN(AM_PROG_INSTALL,
-[AC_REQUIRE([AC_PROG_INSTALL])
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-AC_SUBST(INSTALL_SCRIPT)dnl
-])
-
-# This file is derived from `gettext.m4'. The difference is that the
-# included macros assume Cygnus-style source and build trees.
-
-# Macro to add for using GNU gettext.
-# Ulrich Drepper <drepper@cygnus.com>, 1995.
-#
-# This file file be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 3
-
-AC_DEFUN(CY_WITH_NLS,
- [AC_MSG_CHECKING([whether NLS is requested])
- dnl Default is enabled NLS
- AC_ARG_ENABLE(nls,
- [ --disable-nls do not use Native Language Support],
- USE_NLS=$enableval, USE_NLS=yes)
- AC_MSG_RESULT($USE_NLS)
- AC_SUBST(USE_NLS)
-
- USE_INCLUDED_LIBINTL=no
-
- dnl If we use NLS figure out what method
- if test "$USE_NLS" = "yes"; then
- AC_DEFINE(ENABLE_NLS)
- AC_MSG_CHECKING([whether included gettext is requested])
- AC_ARG_WITH(included-gettext,
- [ --with-included-gettext use the GNU gettext library included here],
- nls_cv_force_use_gnu_gettext=$withval,
- nls_cv_force_use_gnu_gettext=no)
- AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
-
- nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
- if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
- dnl User does not insist on using GNU NLS library. Figure out what
- dnl to use. If gettext or catgets are available (in this order) we
- dnl use this. Else we have to fall back to GNU NLS library.
- dnl catgets is only used if permitted by option --with-catgets.
- nls_cv_header_intl=
- nls_cv_header_libgt=
- CATOBJEXT=NONE
-
- AC_CHECK_HEADER(libintl.h,
- [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
- [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
- gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
-
- if test "$gt_cv_func_gettext_libc" != "yes"; then
- AC_CHECK_LIB(intl, bindtextdomain,
- [AC_CACHE_CHECK([for gettext in libintl],
- gt_cv_func_gettext_libintl,
- [AC_TRY_LINK([], [return (int) gettext ("")],
- gt_cv_func_gettext_libintl=yes,
- gt_cv_func_gettext_libintl=no)])])
- fi
-
- if test "$gt_cv_func_gettext_libc" = "yes" \
- || test "$gt_cv_func_gettext_libintl" = "yes"; then
- AC_DEFINE(HAVE_GETTEXT)
- AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
- if test "$MSGFMT" != "no"; then
- AC_CHECK_FUNCS(dcgettext)
- AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
- AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
- AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
- return _nl_msg_cat_cntr],
- [CATOBJEXT=.gmo
- DATADIRNAME=share],
- [CATOBJEXT=.mo
- DATADIRNAME=lib])
- INSTOBJEXT=.mo
- fi
- fi
- ])
-
- dnl In the standard gettext, we would now check for catgets.
- dnl However, we never want to use catgets for our releases.
-
- if test "$CATOBJEXT" = "NONE"; then
- dnl Neither gettext nor catgets in included in the C library.
- dnl Fall back on GNU gettext library.
- nls_cv_use_gnu_gettext=yes
- fi
- fi
-
- if test "$nls_cv_use_gnu_gettext" = "yes"; then
- dnl Mark actions used to generate GNU NLS library.
- INTLOBJS="\$(GETTOBJS)"
- AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
- AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
- AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
- AC_SUBST(MSGFMT)
- USE_INCLUDED_LIBINTL=yes
- CATOBJEXT=.gmo
- INSTOBJEXT=.mo
- DATADIRNAME=share
- INTLDEPS='$(top_builddir)/../intl/libintl.a'
- INTLLIBS=$INTLDEPS
- LIBS=`echo $LIBS | sed -e 's/-lintl//'`
- nls_cv_header_intl=libintl.h
- nls_cv_header_libgt=libgettext.h
- fi
-
- dnl Test whether we really found GNU xgettext.
- if test "$XGETTEXT" != ":"; then
- dnl If it is no GNU xgettext we define it as : so that the
- dnl Makefiles still can work.
- if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
- : ;
- else
- AC_MSG_RESULT(
- [found xgettext programs is not GNU xgettext; ignore it])
- XGETTEXT=":"
- fi
- fi
-
- # We need to process the po/ directory.
- POSUB=po
- else
- DATADIRNAME=share
- nls_cv_header_intl=libintl.h
- nls_cv_header_libgt=libgettext.h
- fi
-
- # If this is used in GNU gettext we have to set USE_NLS to `yes'
- # because some of the sources are only built for this goal.
- if test "$PACKAGE" = gettext; then
- USE_NLS=yes
- USE_INCLUDED_LIBINTL=yes
- fi
-
- dnl These rules are solely for the distribution goal. While doing this
- dnl we only have to keep exactly one list of the available catalogs
- dnl in configure.in.
- for lang in $ALL_LINGUAS; do
- GMOFILES="$GMOFILES $lang.gmo"
- POFILES="$POFILES $lang.po"
- done
-
- dnl Make all variables we use known to autoconf.
- AC_SUBST(USE_INCLUDED_LIBINTL)
- AC_SUBST(CATALOGS)
- AC_SUBST(CATOBJEXT)
- AC_SUBST(DATADIRNAME)
- AC_SUBST(GMOFILES)
- AC_SUBST(INSTOBJEXT)
- AC_SUBST(INTLDEPS)
- AC_SUBST(INTLLIBS)
- AC_SUBST(INTLOBJS)
- AC_SUBST(POFILES)
- AC_SUBST(POSUB)
- ])
-
-AC_DEFUN(CY_GNU_GETTEXT,
- [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
- AC_REQUIRE([AC_PROG_CC])dnl
- AC_REQUIRE([AC_PROG_RANLIB])dnl
- AC_REQUIRE([AC_ISC_POSIX])dnl
- AC_REQUIRE([AC_HEADER_STDC])dnl
- AC_REQUIRE([AC_C_CONST])dnl
- AC_REQUIRE([AC_C_INLINE])dnl
- AC_REQUIRE([AC_TYPE_OFF_T])dnl
- AC_REQUIRE([AC_TYPE_SIZE_T])dnl
- AC_REQUIRE([AC_FUNC_ALLOCA])dnl
- AC_REQUIRE([AC_FUNC_MMAP])dnl
-
- AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
-unistd.h values.h sys/param.h])
- AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
-__argz_count __argz_stringify __argz_next])
-
- if test "${ac_cv_func_stpcpy+set}" != "set"; then
- AC_CHECK_FUNCS(stpcpy)
- fi
- if test "${ac_cv_func_stpcpy}" = "yes"; then
- AC_DEFINE(HAVE_STPCPY)
- fi
-
- AM_LC_MESSAGES
- CY_WITH_NLS
-
- if test "x$CATOBJEXT" != "x"; then
- if test "x$ALL_LINGUAS" = "x"; then
- LINGUAS=
- else
- AC_MSG_CHECKING(for catalogs to be installed)
- NEW_LINGUAS=
- for lang in ${LINGUAS=$ALL_LINGUAS}; do
- case "$ALL_LINGUAS" in
- *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
- esac
- done
- LINGUAS=$NEW_LINGUAS
- AC_MSG_RESULT($LINGUAS)
- fi
-
- dnl Construct list of names of catalog files to be constructed.
- if test -n "$LINGUAS"; then
- for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
- fi
- fi
-
- dnl The reference to <locale.h> in the installed <libintl.h> file
- dnl must be resolved because we cannot expect the users of this
- dnl to define HAVE_LOCALE_H.
- if test $ac_cv_header_locale_h = yes; then
- INCLUDE_LOCALE_H="#include <locale.h>"
- else
- INCLUDE_LOCALE_H="\
-/* The system does not provide the header <locale.h>. Take care yourself. */"
- fi
- AC_SUBST(INCLUDE_LOCALE_H)
-
- dnl Determine which catalog format we have (if any is needed)
- dnl For now we know about two different formats:
- dnl Linux libc-5 and the normal X/Open format
- if test -f $srcdir/po2tbl.sed.in; then
- if test "$CATOBJEXT" = ".cat"; then
- AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
-
- dnl Transform the SED scripts while copying because some dumb SEDs
- dnl cannot handle comments.
- sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
- fi
- dnl po2tbl.sed is always needed.
- sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
- $srcdir/po2tbl.sed.in > po2tbl.sed
- fi
-
- dnl In the intl/Makefile.in we have a special dependency which makes
- dnl only sense for gettext. We comment this out for non-gettext
- dnl packages.
- if test "$PACKAGE" = "gettext"; then
- GT_NO="#NO#"
- GT_YES=
- else
- GT_NO=
- GT_YES="#YES#"
- fi
- AC_SUBST(GT_NO)
- AC_SUBST(GT_YES)
-
- MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
- AC_SUBST(MKINSTALLDIRS)
-
- dnl *** For now the libtool support in intl/Makefile is not for real.
- l=
- AC_SUBST(l)
-
- dnl Generate list of files to be processed by xgettext which will
- dnl be included in po/Makefile. But only do this if the po directory
- dnl exists in srcdir.
- if test -d $srcdir/po; then
- test -d po || mkdir po
- if test "x$srcdir" != "x."; then
- if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
- posrcprefix="$srcdir/"
- else
- posrcprefix="../$srcdir/"
- fi
- else
- posrcprefix="../"
- fi
- rm -f po/POTFILES
- sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
- < $srcdir/po/POTFILES.in > po/POTFILES
- fi
- ])
-
-# Search path for a program which passes the given test.
-# Ulrich Drepper <drepper@cygnus.com>, 1996.
-#
-# This file file be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 1
-
-dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
-dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
-AC_DEFUN(AM_PATH_PROG_WITH_TEST,
-[# Extract the first word of "$2", so it can be a program name with args.
-set dummy $2; ac_word=[$]2
-AC_MSG_CHECKING([for $ac_word])
-AC_CACHE_VAL(ac_cv_path_$1,
-[case "[$]$1" in
- /*)
- ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in ifelse([$5], , $PATH, [$5]); do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if [$3]; then
- ac_cv_path_$1="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-dnl If no 4th arg is given, leave the cache variable unset,
-dnl so AC_PATH_PROGS will keep looking.
-ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
-])dnl
- ;;
-esac])dnl
-$1="$ac_cv_path_$1"
-if test -n "[$]$1"; then
- AC_MSG_RESULT([$]$1)
-else
- AC_MSG_RESULT(no)
-fi
-AC_SUBST($1)dnl
-])
-
-# Check whether LC_MESSAGES is available in <locale.h>.
-# Ulrich Drepper <drepper@cygnus.com>, 1995.
-#
-# This file file be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 1
-
-AC_DEFUN(AM_LC_MESSAGES,
- [if test $ac_cv_header_locale_h = yes; then
- AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
- [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
- am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
- if test $am_cv_val_LC_MESSAGES = yes; then
- AC_DEFINE(HAVE_LC_MESSAGES)
- fi
- fi])
-
diff --git a/intl/bindtextdom.c b/intl/bindtextdom.c
deleted file mode 100644
index 42b87d297b8..00000000000
--- a/intl/bindtextdom.c
+++ /dev/null
@@ -1,203 +0,0 @@
-/* Implementation of the bindtextdomain(3) function
- Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if defined STDC_HEADERS || defined _LIBC
-# include <stdlib.h>
-#else
-# ifdef HAVE_MALLOC_H
-# include <malloc.h>
-# else
-void free ();
-# endif
-#endif
-
-#if defined HAVE_STRING_H || defined _LIBC
-# include <string.h>
-#else
-# include <strings.h>
-# ifndef memcpy
-# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
-# endif
-#endif
-
-#ifdef _LIBC
-# include <libintl.h>
-#else
-# include "libgettext.h"
-#endif
-#include "gettext.h"
-#include "gettextP.h"
-
-/* @@ end of prolog @@ */
-
-/* Contains the default location of the message catalogs. */
-extern const char _nl_default_dirname[];
-
-/* List with bindings of specific domains. */
-extern struct binding *_nl_domain_bindings;
-
-
-/* Names for the libintl functions are a problem. They must not clash
- with existing names and they should follow ANSI C. But this source
- code is also used in GNU C Library where the names have a __
- prefix. So we have to make a difference here. */
-#ifdef _LIBC
-# define BINDTEXTDOMAIN __bindtextdomain
-# ifndef strdup
-# define strdup(str) __strdup (str)
-# endif
-#else
-# define BINDTEXTDOMAIN bindtextdomain__
-#endif
-
-/* Specify that the DOMAINNAME message catalog will be found
- in DIRNAME rather than in the system locale data base. */
-char *
-BINDTEXTDOMAIN (domainname, dirname)
- const char *domainname;
- const char *dirname;
-{
- struct binding *binding;
-
- /* Some sanity checks. */
- if (domainname == NULL || domainname[0] == '\0')
- return NULL;
-
- for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
- {
- int compare = strcmp (domainname, binding->domainname);
- if (compare == 0)
- /* We found it! */
- break;
- if (compare < 0)
- {
- /* It is not in the list. */
- binding = NULL;
- break;
- }
- }
-
- if (dirname == NULL)
- /* The current binding has be to returned. */
- return binding == NULL ? (char *) _nl_default_dirname : binding->dirname;
-
- if (binding != NULL)
- {
- /* The domain is already bound. If the new value and the old
- one are equal we simply do nothing. Otherwise replace the
- old binding. */
- if (strcmp (dirname, binding->dirname) != 0)
- {
- char *new_dirname;
-
- if (strcmp (dirname, _nl_default_dirname) == 0)
- new_dirname = (char *) _nl_default_dirname;
- else
- {
-#if defined _LIBC || defined HAVE_STRDUP
- new_dirname = strdup (dirname);
- if (new_dirname == NULL)
- return NULL;
-#else
- size_t len = strlen (dirname) + 1;
- new_dirname = (char *) malloc (len);
- if (new_dirname == NULL)
- return NULL;
-
- memcpy (new_dirname, dirname, len);
-#endif
- }
-
- if (binding->dirname != _nl_default_dirname)
- free (binding->dirname);
-
- binding->dirname = new_dirname;
- }
- }
- else
- {
- /* We have to create a new binding. */
-#if !defined _LIBC && !defined HAVE_STRDUP
- size_t len;
-#endif
- struct binding *new_binding =
- (struct binding *) malloc (sizeof (*new_binding));
-
- if (new_binding == NULL)
- return NULL;
-
-#if defined _LIBC || defined HAVE_STRDUP
- new_binding->domainname = strdup (domainname);
- if (new_binding->domainname == NULL)
- return NULL;
-#else
- len = strlen (domainname) + 1;
- new_binding->domainname = (char *) malloc (len);
- if (new_binding->domainname == NULL)
- return NULL;
- memcpy (new_binding->domainname, domainname, len);
-#endif
-
- if (strcmp (dirname, _nl_default_dirname) == 0)
- new_binding->dirname = (char *) _nl_default_dirname;
- else
- {
-#if defined _LIBC || defined HAVE_STRDUP
- new_binding->dirname = strdup (dirname);
- if (new_binding->dirname == NULL)
- return NULL;
-#else
- len = strlen (dirname) + 1;
- new_binding->dirname = (char *) malloc (len);
- if (new_binding->dirname == NULL)
- return NULL;
- memcpy (new_binding->dirname, dirname, len);
-#endif
- }
-
- /* Now enqueue it. */
- if (_nl_domain_bindings == NULL
- || strcmp (domainname, _nl_domain_bindings->domainname) < 0)
- {
- new_binding->next = _nl_domain_bindings;
- _nl_domain_bindings = new_binding;
- }
- else
- {
- binding = _nl_domain_bindings;
- while (binding->next != NULL
- && strcmp (domainname, binding->next->domainname) > 0)
- binding = binding->next;
-
- new_binding->next = binding->next;
- binding->next = new_binding;
- }
-
- binding = new_binding;
- }
-
- return binding->dirname;
-}
-
-#ifdef _LIBC
-/* Alias for function name in GNU C Library. */
-weak_alias (__bindtextdomain, bindtextdomain);
-#endif
diff --git a/intl/cat-compat.c b/intl/cat-compat.c
deleted file mode 100644
index be4afff87b5..00000000000
--- a/intl/cat-compat.c
+++ /dev/null
@@ -1,262 +0,0 @@
-/* Compatibility code for gettext-using-catgets interface.
- Copyright (C) 1995, 1997 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-# include <string.h>
-#else
-char *getenv ();
-# ifdef HAVE_MALLOC_H
-# include <malloc.h>
-# endif
-#endif
-
-#ifdef HAVE_NL_TYPES_H
-# include <nl_types.h>
-#endif
-
-#include "libgettext.h"
-
-/* @@ end of prolog @@ */
-
-/* XPG3 defines the result of `setlocale (category, NULL)' as:
- ``Directs `setlocale()' to query `category' and return the current
- setting of `local'.''
- However it does not specify the exact format. And even worse: POSIX
- defines this not at all. So we can use this feature only on selected
- system (e.g. those using GNU C Library). */
-#ifdef _LIBC
-# define HAVE_LOCALE_NULL
-#endif
-
-/* The catalog descriptor. */
-static nl_catd catalog = (nl_catd) -1;
-
-/* Name of the default catalog. */
-static const char default_catalog_name[] = "messages";
-
-/* Name of currently used catalog. */
-static const char *catalog_name = default_catalog_name;
-
-/* Get ID for given string. If not found return -1. */
-static int msg_to_cat_id PARAMS ((const char *msg));
-
-/* Substitution for systems lacking this function in their C library. */
-#if !_LIBC && !HAVE_STPCPY
-static char *stpcpy PARAMS ((char *dest, const char *src));
-#endif
-
-
-/* Set currently used domain/catalog. */
-char *
-textdomain (domainname)
- const char *domainname;
-{
- nl_catd new_catalog;
- char *new_name;
- size_t new_name_len;
- char *lang;
-
-#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES \
- && defined HAVE_LOCALE_NULL
- lang = setlocale (LC_MESSAGES, NULL);
-#else
- lang = getenv ("LC_ALL");
- if (lang == NULL || lang[0] == '\0')
- {
- lang = getenv ("LC_MESSAGES");
- if (lang == NULL || lang[0] == '\0')
- lang = getenv ("LANG");
- }
-#endif
- if (lang == NULL || lang[0] == '\0')
- lang = "C";
-
- /* See whether name of currently used domain is asked. */
- if (domainname == NULL)
- return (char *) catalog_name;
-
- if (domainname[0] == '\0')
- domainname = default_catalog_name;
-
- /* Compute length of added path element. */
- new_name_len = sizeof (LOCALEDIR) - 1 + 1 + strlen (lang)
- + sizeof ("/LC_MESSAGES/") - 1 + sizeof (PACKAGE) - 1
- + sizeof (".cat");
-
- new_name = (char *) malloc (new_name_len);
- if (new_name == NULL)
- return NULL;
-
- strcpy (new_name, PACKAGE);
- new_catalog = catopen (new_name, 0);
-
- if (new_catalog == (nl_catd) -1)
- {
- /* NLSPATH search didn't work, try absolute path */
- sprintf (new_name, "%s/%s/LC_MESSAGES/%s.cat", LOCALEDIR, lang,
- PACKAGE);
- new_catalog = catopen (new_name, 0);
-
- if (new_catalog == (nl_catd) -1)
- {
- free (new_name);
- return (char *) catalog_name;
- }
- }
-
- /* Close old catalog. */
- if (catalog != (nl_catd) -1)
- catclose (catalog);
- if (catalog_name != default_catalog_name)
- free ((char *) catalog_name);
-
- catalog = new_catalog;
- catalog_name = new_name;
-
- return (char *) catalog_name;
-}
-
-char *
-bindtextdomain (domainname, dirname)
- const char *domainname;
- const char *dirname;
-{
-#if HAVE_SETENV || HAVE_PUTENV
- char *old_val, *new_val, *cp;
- size_t new_val_len;
-
- /* This does not make much sense here but to be compatible do it. */
- if (domainname == NULL)
- return NULL;
-
- /* Compute length of added path element. If we use setenv we don't need
- the first byts for NLSPATH=, but why complicate the code for this
- peanuts. */
- new_val_len = sizeof ("NLSPATH=") - 1 + strlen (dirname)
- + sizeof ("/%L/LC_MESSAGES/%N.cat");
-
- old_val = getenv ("NLSPATH");
- if (old_val == NULL || old_val[0] == '\0')
- {
- old_val = NULL;
- new_val_len += 1 + sizeof (LOCALEDIR) - 1
- + sizeof ("/%L/LC_MESSAGES/%N.cat");
- }
- else
- new_val_len += strlen (old_val);
-
- new_val = (char *) malloc (new_val_len);
- if (new_val == NULL)
- return NULL;
-
-# if HAVE_SETENV
- cp = new_val;
-# else
- cp = stpcpy (new_val, "NLSPATH=");
-# endif
-
- cp = stpcpy (cp, dirname);
- cp = stpcpy (cp, "/%L/LC_MESSAGES/%N.cat:");
-
- if (old_val == NULL)
- {
-# if __STDC__
- stpcpy (cp, LOCALEDIR "/%L/LC_MESSAGES/%N.cat");
-# else
-
- cp = stpcpy (cp, LOCALEDIR);
- stpcpy (cp, "/%L/LC_MESSAGES/%N.cat");
-# endif
- }
- else
- stpcpy (cp, old_val);
-
-# if HAVE_SETENV
- setenv ("NLSPATH", new_val, 1);
- free (new_val);
-# else
- putenv (new_val);
- /* Do *not* free the environment entry we just entered. It is used
- from now on. */
-# endif
-
-#endif
-
- return (char *) domainname;
-}
-
-#undef gettext
-char *
-gettext (msg)
- const char *msg;
-{
- int msgid;
-
- if (msg == NULL || catalog == (nl_catd) -1)
- return (char *) msg;
-
- /* Get the message from the catalog. We always use set number 1.
- The message ID is computed by the function `msg_to_cat_id'
- which works on the table generated by `po-to-tbl'. */
- msgid = msg_to_cat_id (msg);
- if (msgid == -1)
- return (char *) msg;
-
- return catgets (catalog, 1, msgid, (char *) msg);
-}
-
-/* Look through the table `_msg_tbl' which has `_msg_tbl_length' entries
- for the one equal to msg. If it is found return the ID. In case when
- the string is not found return -1. */
-static int
-msg_to_cat_id (msg)
- const char *msg;
-{
- int cnt;
-
- for (cnt = 0; cnt < _msg_tbl_length; ++cnt)
- if (strcmp (msg, _msg_tbl[cnt]._msg) == 0)
- return _msg_tbl[cnt]._msg_number;
-
- return -1;
-}
-
-
-/* @@ begin of epilog @@ */
-
-/* We don't want libintl.a to depend on any other library. So we
- avoid the non-standard function stpcpy. In GNU C Library this
- function is available, though. Also allow the symbol HAVE_STPCPY
- to be defined. */
-#if !_LIBC && !HAVE_STPCPY
-static char *
-stpcpy (dest, src)
- char *dest;
- const char *src;
-{
- while ((*dest++ = *src++) != '\0')
- /* Do nothing. */ ;
- return dest - 1;
-}
-#endif
diff --git a/intl/config.in b/intl/config.in
deleted file mode 100644
index 8a9049b80de..00000000000
--- a/intl/config.in
+++ /dev/null
@@ -1,128 +0,0 @@
-/* config.in. Generated automatically from configure.in by autoheader. */
-
-/* Define if using alloca.c. */
-#undef C_ALLOCA
-
-/* Define to empty if the keyword does not work. */
-#undef const
-
-/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
- This function is required for alloca.c support on those systems. */
-#undef CRAY_STACKSEG_END
-
-/* Define if you have alloca, as a function or macro. */
-#undef HAVE_ALLOCA
-
-/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
-#undef HAVE_ALLOCA_H
-
-/* Define if you have a working `mmap' system call. */
-#undef HAVE_MMAP
-
-/* Define as __inline if that's what the C compiler calls it. */
-#undef inline
-
-/* Define to `long' if <sys/types.h> doesn't define. */
-#undef off_t
-
-/* Define if you need to in order for stat and other things to work. */
-#undef _POSIX_SOURCE
-
-/* Define to `unsigned' if <sys/types.h> doesn't define. */
-#undef size_t
-
-/* If using the C implementation of alloca, define if you know the
- direction of stack growth for your system; otherwise it will be
- automatically deduced at run-time.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown
- */
-#undef STACK_DIRECTION
-
-/* Define if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Define to 1 if NLS is requested. */
-#undef ENABLE_NLS
-
-/* Define as 1 if you have catgets and don't want to use GNU gettext. */
-#undef HAVE_CATGETS
-
-/* Define as 1 if you have gettext and don't want to use GNU gettext. */
-#undef HAVE_GETTEXT
-
-/* Define as 1 if you have the stpcpy function. */
-#undef HAVE_STPCPY
-
-/* Define if your locale.h file contains LC_MESSAGES. */
-#undef HAVE_LC_MESSAGES
-
-/* Define if you have the __argz_count function. */
-#undef HAVE___ARGZ_COUNT
-
-/* Define if you have the __argz_next function. */
-#undef HAVE___ARGZ_NEXT
-
-/* Define if you have the __argz_stringify function. */
-#undef HAVE___ARGZ_STRINGIFY
-
-/* Define if you have the dcgettext function. */
-#undef HAVE_DCGETTEXT
-
-/* Define if you have the getcwd function. */
-#undef HAVE_GETCWD
-
-/* Define if you have the getpagesize function. */
-#undef HAVE_GETPAGESIZE
-
-/* Define if you have the munmap function. */
-#undef HAVE_MUNMAP
-
-/* Define if you have the putenv function. */
-#undef HAVE_PUTENV
-
-/* Define if you have the setenv function. */
-#undef HAVE_SETENV
-
-/* Define if you have the setlocale function. */
-#undef HAVE_SETLOCALE
-
-/* Define if you have the stpcpy function. */
-#undef HAVE_STPCPY
-
-/* Define if you have the strcasecmp function. */
-#undef HAVE_STRCASECMP
-
-/* Define if you have the strchr function. */
-#undef HAVE_STRCHR
-
-/* Define if you have the <argz.h> header file. */
-#undef HAVE_ARGZ_H
-
-/* Define if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
-
-/* Define if you have the <locale.h> header file. */
-#undef HAVE_LOCALE_H
-
-/* Define if you have the <malloc.h> header file. */
-#undef HAVE_MALLOC_H
-
-/* Define if you have the <nl_types.h> header file. */
-#undef HAVE_NL_TYPES_H
-
-/* Define if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define if you have the <sys/param.h> header file. */
-#undef HAVE_SYS_PARAM_H
-
-/* Define if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define if you have the <values.h> header file. */
-#undef HAVE_VALUES_H
-
-/* Define if you have the i library (-li). */
-#undef HAVE_LIBI
diff --git a/intl/configure b/intl/configure
deleted file mode 100755
index 341eea019ae..00000000000
--- a/intl/configure
+++ /dev/null
@@ -1,2950 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.12.1
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --disable-nls do not use Native Language Support"
-ac_help="$ac_help
- --with-included-gettext use the GNU gettext library included here"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.12.1"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=dgettext.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-
-
-
-ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:562: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:616: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp.
- cat > conftest.$ac_ext <<EOF
-#line 631 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
- cat > conftest.$ac_ext <<EOF
-#line 648 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
- ac_cv_prog_CPP="$CPP"
-fi
- CPP="$ac_cv_prog_CPP"
-else
- ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:677: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:706: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:735: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- ac_prog_rejected=no
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:783: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext <<EOF
-#line 793 "configure"
-#include "confdefs.h"
-main(){return(0);}
-EOF
-if { (eval echo configure:797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
- if (./conftest; exit) 2>/dev/null; then
- ac_cv_prog_cc_cross=no
- else
- ac_cv_prog_cc_cross=yes
- fi
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:817: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:822: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:846: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-# Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:876: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:903: checking for POSIXized ISC" >&5
-if test -d /etc/conf/kconfig.d &&
- grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
-then
- echo "$ac_t""yes" 1>&6
- ISC=yes # If later tests want to check for ISC.
- cat >> confdefs.h <<\EOF
-#define _POSIX_SOURCE 1
-EOF
-
- if test "$GCC" = yes; then
- CC="$CC -posix"
- else
- CC="$CC -Xp"
- fi
-else
- echo "$ac_t""no" 1>&6
- ISC=
-fi
-
-echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:924: checking for ANSI C header files" >&5
-if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 929 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
- rm -rf conftest*
- ac_cv_header_stdc=yes
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 954 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "memchr" >/dev/null 2>&1; then
- :
-else
- rm -rf conftest*
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 972 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "free" >/dev/null 2>&1; then
- :
-else
- rm -rf conftest*
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-if test "$cross_compiling" = yes; then
- :
-else
- cat > conftest.$ac_ext <<EOF
-#line 993 "configure"
-#include "confdefs.h"
-#include <ctype.h>
-#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int main () { int i; for (i = 0; i < 256; i++)
-if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
-exit (0); }
-
-EOF
-if { (eval echo configure:1004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
- :
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_header_stdc=no
-fi
-rm -fr conftest*
-fi
-
-fi
-fi
-
-echo "$ac_t""$ac_cv_header_stdc" 1>&6
-if test $ac_cv_header_stdc = yes; then
- cat >> confdefs.h <<\EOF
-#define STDC_HEADERS 1
-EOF
-
-fi
-
-echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1028: checking for working const" >&5
-if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1033 "configure"
-#include "confdefs.h"
-
-int main() {
-
-/* Ultrix mips cc rejects this. */
-typedef int charset[2]; const charset x;
-/* SunOS 4.1.1 cc rejects this. */
-char const *const *ccp;
-char **p;
-/* NEC SVR4.0.2 mips cc rejects this. */
-struct point {int x, y;};
-static struct point const zero = {0,0};
-/* AIX XL C 1.02.0.0 rejects this.
- It does not let you subtract one const X* pointer from another in an arm
- of an if-expression whose if-part is not a constant expression */
-const char *g = "string";
-ccp = &g + (g ? g-g : 0);
-/* HPUX 7.0 cc rejects these. */
-++ccp;
-p = (char**) ccp;
-ccp = (char const *const *) p;
-{ /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
-
- *t++ = 0;
-}
-{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
- int x[] = {25, 17};
- const int *foo = &x[0];
- ++foo;
-}
-{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
- typedef const int *iptr;
- iptr p = 0;
- ++p;
-}
-{ /* AIX XL C 1.02.0.0 rejects this saying
- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
-}
-{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
- const int foo = 10;
-}
-
-; return 0; }
-EOF
-if { (eval echo configure:1082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_c_const=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_c_const=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_c_const" 1>&6
-if test $ac_cv_c_const = no; then
- cat >> confdefs.h <<\EOF
-#define const
-EOF
-
-fi
-
-echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1103: checking for inline" >&5
-if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_cv_c_inline=no
-for ac_kw in inline __inline__ __inline; do
- cat > conftest.$ac_ext <<EOF
-#line 1110 "configure"
-#include "confdefs.h"
-
-int main() {
-} $ac_kw foo() {
-; return 0; }
-EOF
-if { (eval echo configure:1117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_c_inline=$ac_kw; break
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-done
-
-fi
-
-echo "$ac_t""$ac_cv_c_inline" 1>&6
-case "$ac_cv_c_inline" in
- inline | yes) ;;
- no) cat >> confdefs.h <<\EOF
-#define inline
-EOF
- ;;
- *) cat >> confdefs.h <<EOF
-#define inline $ac_cv_c_inline
-EOF
- ;;
-esac
-
-echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1143: checking for off_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1148 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_type_off_t=yes
-else
- rm -rf conftest*
- ac_cv_type_off_t=no
-fi
-rm -f conftest*
-
-fi
-echo "$ac_t""$ac_cv_type_off_t" 1>&6
-if test $ac_cv_type_off_t = no; then
- cat >> confdefs.h <<\EOF
-#define off_t long
-EOF
-
-fi
-
-echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1176: checking for size_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1181 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_type_size_t=yes
-else
- rm -rf conftest*
- ac_cv_type_size_t=no
-fi
-rm -f conftest*
-
-fi
-echo "$ac_t""$ac_cv_type_size_t" 1>&6
-if test $ac_cv_type_size_t = no; then
- cat >> confdefs.h <<\EOF
-#define size_t unsigned
-EOF
-
-fi
-
-# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
-# for constant arguments. Useless!
-echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:1211: checking for working alloca.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1216 "configure"
-#include "confdefs.h"
-#include <alloca.h>
-int main() {
-char *p = alloca(2 * sizeof(int));
-; return 0; }
-EOF
-if { (eval echo configure:1223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- ac_cv_header_alloca_h=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_alloca_h=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
-if test $ac_cv_header_alloca_h = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_ALLOCA_H 1
-EOF
-
-fi
-
-echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1244: checking for alloca" >&5
-if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1249 "configure"
-#include "confdefs.h"
-
-#ifdef __GNUC__
-# define alloca __builtin_alloca
-#else
-# if HAVE_ALLOCA_H
-# include <alloca.h>
-# else
-# ifdef _AIX
- #pragma alloca
-# else
-# ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
-# endif
-# endif
-# endif
-#endif
-
-int main() {
-char *p = (char *) alloca(1);
-; return 0; }
-EOF
-if { (eval echo configure:1272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- ac_cv_func_alloca_works=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_func_alloca_works=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
-if test $ac_cv_func_alloca_works = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_ALLOCA 1
-EOF
-
-fi
-
-if test $ac_cv_func_alloca_works = no; then
- # The SVR3 libPW and SVR4 libucb both contain incompatible functions
- # that cause trouble. Some versions do not even contain alloca or
- # contain a buggy version. If you still want to use their alloca,
- # use ar to extract alloca.o from them instead of compiling alloca.c.
- ALLOCA=alloca.o
- cat >> confdefs.h <<\EOF
-#define C_ALLOCA 1
-EOF
-
-
-echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1304: checking whether alloca needs Cray hooks" >&5
-if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1309 "configure"
-#include "confdefs.h"
-#if defined(CRAY) && ! defined(CRAY2)
-webecray
-#else
-wenotbecray
-#endif
-
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "webecray" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_os_cray=yes
-else
- rm -rf conftest*
- ac_cv_os_cray=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_os_cray" 1>&6
-if test $ac_cv_os_cray = yes; then
-for ac_func in _getb67 GETB67 getb67; do
- echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1334: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1339 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:1362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
-#define CRAY_STACKSEG_END $ac_func
-EOF
-
- break
-else
- echo "$ac_t""no" 1>&6
-fi
-
-done
-fi
-
-echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1389: checking stack direction for C alloca" >&5
-if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$cross_compiling" = yes; then
- ac_cv_c_stack_direction=0
-else
- cat > conftest.$ac_ext <<EOF
-#line 1397 "configure"
-#include "confdefs.h"
-find_stack_direction ()
-{
- static char *addr = 0;
- auto char dummy;
- if (addr == 0)
- {
- addr = &dummy;
- return find_stack_direction ();
- }
- else
- return (&dummy > addr) ? 1 : -1;
-}
-main ()
-{
- exit (find_stack_direction() < 0);
-}
-EOF
-if { (eval echo configure:1416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
- ac_cv_c_stack_direction=1
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_c_stack_direction=-1
-fi
-rm -fr conftest*
-fi
-
-fi
-
-echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
-cat >> confdefs.h <<EOF
-#define STACK_DIRECTION $ac_cv_c_stack_direction
-EOF
-
-fi
-
-for ac_hdr in unistd.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1441: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1446 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_func in getpagesize
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1480: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1485 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:1508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1533: checking for working mmap" >&5
-if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$cross_compiling" = yes; then
- ac_cv_func_mmap_fixed_mapped=no
-else
- cat > conftest.$ac_ext <<EOF
-#line 1541 "configure"
-#include "confdefs.h"
-
-/* Thanks to Mike Haertel and Jim Avera for this test.
- Here is a matrix of mmap possibilities:
- mmap private not fixed
- mmap private fixed at somewhere currently unmapped
- mmap private fixed at somewhere already mapped
- mmap shared not fixed
- mmap shared fixed at somewhere currently unmapped
- mmap shared fixed at somewhere already mapped
- For private mappings, we should verify that changes cannot be read()
- back from the file, nor mmap's back from the file at a different
- address. (There have been systems where private was not correctly
- implemented like the infamous i386 svr4.0, and systems where the
- VM page cache was not coherent with the filesystem buffer cache
- like early versions of FreeBSD and possibly contemporary NetBSD.)
- For shared mappings, we should conversely verify that changes get
- propogated back to all the places they're supposed to be.
-
- Grep wants private fixed already mapped.
- The main things grep needs to know about mmap are:
- * does it exist and is it safe to write into the mmap'd area
- * how to use it (BSD variants) */
-#include <sys/types.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-
-/* This mess was copied from the GNU getpagesize.h. */
-#ifndef HAVE_GETPAGESIZE
-# ifdef HAVE_UNISTD_H
-# include <unistd.h>
-# endif
-
-/* Assume that all systems that can run configure have sys/param.h. */
-# ifndef HAVE_SYS_PARAM_H
-# define HAVE_SYS_PARAM_H 1
-# endif
-
-# ifdef _SC_PAGESIZE
-# define getpagesize() sysconf(_SC_PAGESIZE)
-# else /* no _SC_PAGESIZE */
-# ifdef HAVE_SYS_PARAM_H
-# include <sys/param.h>
-# ifdef EXEC_PAGESIZE
-# define getpagesize() EXEC_PAGESIZE
-# else /* no EXEC_PAGESIZE */
-# ifdef NBPG
-# define getpagesize() NBPG * CLSIZE
-# ifndef CLSIZE
-# define CLSIZE 1
-# endif /* no CLSIZE */
-# else /* no NBPG */
-# ifdef NBPC
-# define getpagesize() NBPC
-# else /* no NBPC */
-# ifdef PAGESIZE
-# define getpagesize() PAGESIZE
-# endif /* PAGESIZE */
-# endif /* no NBPC */
-# endif /* no NBPG */
-# endif /* no EXEC_PAGESIZE */
-# else /* no HAVE_SYS_PARAM_H */
-# define getpagesize() 8192 /* punt totally */
-# endif /* no HAVE_SYS_PARAM_H */
-# endif /* no _SC_PAGESIZE */
-
-#endif /* no HAVE_GETPAGESIZE */
-
-#ifdef __cplusplus
-extern "C" { void *malloc(unsigned); }
-#else
-char *malloc();
-#endif
-
-int
-main()
-{
- char *data, *data2, *data3;
- int i, pagesize;
- int fd;
-
- pagesize = getpagesize();
-
- /*
- * First, make a file with some known garbage in it.
- */
- data = malloc(pagesize);
- if (!data)
- exit(1);
- for (i = 0; i < pagesize; ++i)
- *(data + i) = rand();
- umask(0);
- fd = creat("conftestmmap", 0600);
- if (fd < 0)
- exit(1);
- if (write(fd, data, pagesize) != pagesize)
- exit(1);
- close(fd);
-
- /*
- * Next, try to mmap the file at a fixed address which
- * already has something else allocated at it. If we can,
- * also make sure that we see the same garbage.
- */
- fd = open("conftestmmap", O_RDWR);
- if (fd < 0)
- exit(1);
- data2 = malloc(2 * pagesize);
- if (!data2)
- exit(1);
- data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
- if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_FIXED, fd, 0L))
- exit(1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data2 + i))
- exit(1);
-
- /*
- * Finally, make sure that changes to the mapped area
- * do not percolate back to the file as seen by read().
- * (This is a bug on some variants of i386 svr4.0.)
- */
- for (i = 0; i < pagesize; ++i)
- *(data2 + i) = *(data2 + i) + 1;
- data3 = malloc(pagesize);
- if (!data3)
- exit(1);
- if (read(fd, data3, pagesize) != pagesize)
- exit(1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data3 + i))
- exit(1);
- close(fd);
- unlink("conftestmmap");
- exit(0);
-}
-
-EOF
-if { (eval echo configure:1681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
- ac_cv_func_mmap_fixed_mapped=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_func_mmap_fixed_mapped=no
-fi
-rm -fr conftest*
-fi
-
-fi
-
-echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
-if test $ac_cv_func_mmap_fixed_mapped = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_MMAP 1
-EOF
-
-fi
-
-
- for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
-unistd.h values.h sys/param.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1709: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1714 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
- for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
-__argz_count __argz_stringify __argz_next
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1749: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1754 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:1777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-
- if test "${ac_cv_func_stpcpy+set}" != "set"; then
- for ac_func in stpcpy
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1806: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1811 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:1834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
- fi
- if test "${ac_cv_func_stpcpy}" = "yes"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_STPCPY 1
-EOF
-
- fi
-
- if test $ac_cv_header_locale_h = yes; then
- echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:1868: checking for LC_MESSAGES" >&5
-if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1873 "configure"
-#include "confdefs.h"
-#include <locale.h>
-int main() {
-return LC_MESSAGES
-; return 0; }
-EOF
-if { (eval echo configure:1880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- am_cv_val_LC_MESSAGES=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- am_cv_val_LC_MESSAGES=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
- if test $am_cv_val_LC_MESSAGES = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_LC_MESSAGES 1
-EOF
-
- fi
- fi
- echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:1901: checking whether NLS is requested" >&5
- # Check whether --enable-nls or --disable-nls was given.
-if test "${enable_nls+set}" = set; then
- enableval="$enable_nls"
- USE_NLS=$enableval
-else
- USE_NLS=yes
-fi
-
- echo "$ac_t""$USE_NLS" 1>&6
-
-
- USE_INCLUDED_LIBINTL=no
-
- if test "$USE_NLS" = "yes"; then
- cat >> confdefs.h <<\EOF
-#define ENABLE_NLS 1
-EOF
-
- echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:1921: checking whether included gettext is requested" >&5
- # Check whether --with-included-gettext or --without-included-gettext was given.
-if test "${with_included_gettext+set}" = set; then
- withval="$with_included_gettext"
- nls_cv_force_use_gnu_gettext=$withval
-else
- nls_cv_force_use_gnu_gettext=no
-fi
-
- echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
-
- nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
- if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
- nls_cv_header_intl=
- nls_cv_header_libgt=
- CATOBJEXT=NONE
-
- ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:1940: checking for libintl.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1945 "configure"
-#include "confdefs.h"
-#include <libintl.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:1967: checking for gettext in libc" >&5
-if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1972 "configure"
-#include "confdefs.h"
-#include <libintl.h>
-int main() {
-return (int) gettext ("")
-; return 0; }
-EOF
-if { (eval echo configure:1979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- gt_cv_func_gettext_libc=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gt_cv_func_gettext_libc=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
-
- if test "$gt_cv_func_gettext_libc" != "yes"; then
- echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:1995: checking for bindtextdomain in -lintl" >&5
-ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lintl $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2003 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char bindtextdomain();
-
-int main() {
-bindtextdomain()
-; return 0; }
-EOF
-if { (eval echo configure:2014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:2030: checking for gettext in libintl" >&5
-if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2035 "configure"
-#include "confdefs.h"
-
-int main() {
-return (int) gettext ("")
-; return 0; }
-EOF
-if { (eval echo configure:2042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- gt_cv_func_gettext_libintl=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gt_cv_func_gettext_libintl=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- fi
-
- if test "$gt_cv_func_gettext_libc" = "yes" \
- || test "$gt_cv_func_gettext_libintl" = "yes"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_GETTEXT 1
-EOF
-
- # Extract the first word of "msgfmt", so it can be a program name with args.
-set dummy msgfmt; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2070: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case "$MSGFMT" in
- /*)
- ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
- ac_cv_path_MSGFMT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
- ;;
-esac
-fi
-MSGFMT="$ac_cv_path_MSGFMT"
-if test -n "$MSGFMT"; then
- echo "$ac_t""$MSGFMT" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
- if test "$MSGFMT" != "no"; then
- for ac_func in dcgettext
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2104: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2109 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:2132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
- # Extract the first word of "gmsgfmt", so it can be a program name with args.
-set dummy gmsgfmt; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2159: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case "$GMSGFMT" in
- /*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
- ;;
- ?:/*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
- ;;
-esac
-fi
-GMSGFMT="$ac_cv_path_GMSGFMT"
-if test -n "$GMSGFMT"; then
- echo "$ac_t""$GMSGFMT" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- # Extract the first word of "xgettext", so it can be a program name with args.
-set dummy xgettext; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2194: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case "$XGETTEXT" in
- /*)
- ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
- ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
- ;;
-esac
-fi
-XGETTEXT="$ac_cv_path_XGETTEXT"
-if test -n "$XGETTEXT"; then
- echo "$ac_t""$XGETTEXT" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- cat > conftest.$ac_ext <<EOF
-#line 2226 "configure"
-#include "confdefs.h"
-
-int main() {
-extern int _nl_msg_cat_cntr;
- return _nl_msg_cat_cntr
-; return 0; }
-EOF
-if { (eval echo configure:2234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- CATOBJEXT=.gmo
- DATADIRNAME=share
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CATOBJEXT=.mo
- DATADIRNAME=lib
-fi
-rm -f conftest*
- INSTOBJEXT=.mo
- fi
- fi
-
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
- if test "$CATOBJEXT" = "NONE"; then
- nls_cv_use_gnu_gettext=yes
- fi
- fi
-
- if test "$nls_cv_use_gnu_gettext" = "yes"; then
- INTLOBJS="\$(GETTOBJS)"
- # Extract the first word of "msgfmt", so it can be a program name with args.
-set dummy msgfmt; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2266: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case "$MSGFMT" in
- /*)
- ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
- ac_cv_path_MSGFMT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
- ;;
-esac
-fi
-MSGFMT="$ac_cv_path_MSGFMT"
-if test -n "$MSGFMT"; then
- echo "$ac_t""$MSGFMT" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- # Extract the first word of "gmsgfmt", so it can be a program name with args.
-set dummy gmsgfmt; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2300: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case "$GMSGFMT" in
- /*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
- ;;
- ?:/*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
- ;;
-esac
-fi
-GMSGFMT="$ac_cv_path_GMSGFMT"
-if test -n "$GMSGFMT"; then
- echo "$ac_t""$GMSGFMT" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- # Extract the first word of "xgettext", so it can be a program name with args.
-set dummy xgettext; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2335: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case "$XGETTEXT" in
- /*)
- ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
- ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
- ;;
-esac
-fi
-XGETTEXT="$ac_cv_path_XGETTEXT"
-if test -n "$XGETTEXT"; then
- echo "$ac_t""$XGETTEXT" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
- USE_INCLUDED_LIBINTL=yes
- CATOBJEXT=.gmo
- INSTOBJEXT=.mo
- DATADIRNAME=share
- INTLDEPS='$(top_builddir)/../intl/libintl.a'
- INTLLIBS=$INTLDEPS
- LIBS=`echo $LIBS | sed -e 's/-lintl//'`
- nls_cv_header_intl=libintl.h
- nls_cv_header_libgt=libgettext.h
- fi
-
- if test "$XGETTEXT" != ":"; then
- if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
- : ;
- else
- echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
- XGETTEXT=":"
- fi
- fi
-
- # We need to process the po/ directory.
- POSUB=po
- else
- DATADIRNAME=share
- nls_cv_header_intl=libintl.h
- nls_cv_header_libgt=libgettext.h
- fi
-
- # If this is used in GNU gettext we have to set USE_NLS to `yes'
- # because some of the sources are only built for this goal.
- if test "$PACKAGE" = gettext; then
- USE_NLS=yes
- USE_INCLUDED_LIBINTL=yes
- fi
-
- for lang in $ALL_LINGUAS; do
- GMOFILES="$GMOFILES $lang.gmo"
- POFILES="$POFILES $lang.po"
- done
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if test "x$CATOBJEXT" != "x"; then
- if test "x$ALL_LINGUAS" = "x"; then
- LINGUAS=
- else
- echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2425: checking for catalogs to be installed" >&5
- NEW_LINGUAS=
- for lang in ${LINGUAS=$ALL_LINGUAS}; do
- case "$ALL_LINGUAS" in
- *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
- esac
- done
- LINGUAS=$NEW_LINGUAS
- echo "$ac_t""$LINGUAS" 1>&6
- fi
-
- if test -n "$LINGUAS"; then
- for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
- fi
- fi
-
- if test $ac_cv_header_locale_h = yes; then
- INCLUDE_LOCALE_H="#include <locale.h>"
- else
- INCLUDE_LOCALE_H="\
-/* The system does not provide the header <locale.h>. Take care yourself. */"
- fi
-
-
- if test -f $srcdir/po2tbl.sed.in; then
- if test "$CATOBJEXT" = ".cat"; then
- ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:2453: checking for linux/version.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2458 "configure"
-#include "confdefs.h"
-#include <linux/version.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- msgformat=linux
-else
- echo "$ac_t""no" 1>&6
-msgformat=xopen
-fi
-
-
- sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
- fi
- sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
- $srcdir/po2tbl.sed.in > po2tbl.sed
- fi
-
- if test "$PACKAGE" = "gettext"; then
- GT_NO="#NO#"
- GT_YES=
- else
- GT_NO=
- GT_YES="#YES#"
- fi
-
-
-
- MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
-
-
- l=
-
-
- if test -d $srcdir/po; then
- test -d po || mkdir po
- if test "x$srcdir" != "x."; then
- if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
- posrcprefix="$srcdir/"
- else
- posrcprefix="../$srcdir/"
- fi
- else
- posrcprefix="../"
- fi
- rm -f po/POTFILES
- sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
- < $srcdir/po/POTFILES.in > po/POTFILES
- fi
-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set) 2>&1 | grep ac_space` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-DEFS=-DHAVE_CONFIG_H
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@RANLIB@%$RANLIB%g
-s%@CPP@%$CPP%g
-s%@ALLOCA@%$ALLOCA%g
-s%@USE_NLS@%$USE_NLS%g
-s%@MSGFMT@%$MSGFMT%g
-s%@GMSGFMT@%$GMSGFMT%g
-s%@XGETTEXT@%$XGETTEXT%g
-s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
-s%@CATALOGS@%$CATALOGS%g
-s%@CATOBJEXT@%$CATOBJEXT%g
-s%@DATADIRNAME@%$DATADIRNAME%g
-s%@GMOFILES@%$GMOFILES%g
-s%@INSTOBJEXT@%$INSTOBJEXT%g
-s%@INTLDEPS@%$INTLDEPS%g
-s%@INTLLIBS@%$INTLLIBS%g
-s%@INTLOBJS@%$INTLOBJS%g
-s%@POFILES@%$POFILES%g
-s%@POSUB@%$POSUB%g
-s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
-s%@GT_NO@%$GT_NO%g
-s%@GT_YES@%$GT_YES%g
-s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
-s%@l@%$l%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
-ac_dC='\3'
-ac_dD='%g'
-# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
-ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_uB='\([ ]\)%\1#\2define\3'
-ac_uC=' '
-ac_uD='\4%g'
-# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_eB='$%\1#\2define\3'
-ac_eC=' '
-ac_eD='%g'
-
-if test "${CONFIG_HEADERS+set}" != set; then
-EOF
-cat >> $CONFIG_STATUS <<EOF
- CONFIG_HEADERS="config.h:config.in"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-fi
-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- echo creating $ac_file
-
- rm -f conftest.frag conftest.in conftest.out
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- cat $ac_file_inputs > conftest.in
-
-EOF
-
-# Transform confdefs.h into a sed script conftest.vals that substitutes
-# the proper values into config.h.in to produce config.h. And first:
-# Protect against being on the right side of a sed subst in config.status.
-# Protect against being in an unquoted here document in config.status.
-rm -f conftest.vals
-cat > conftest.hdr <<\EOF
-s/[\\&%]/\\&/g
-s%[\\$`]%\\&%g
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
-s%ac_d%ac_u%gp
-s%ac_u%ac_e%gp
-EOF
-sed -n -f conftest.hdr confdefs.h > conftest.vals
-rm -f conftest.hdr
-
-# This sed command replaces #undef with comments. This is necessary, for
-# example, in the case of _POSIX_SOURCE, which is predefined and required
-# on some systems where configure will not decide to define it.
-cat >> conftest.vals <<\EOF
-s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
-EOF
-
-# Break up conftest.vals because some shells have a limit on
-# the size of here documents, and old seds have small limits too.
-
-rm -f conftest.tail
-while :
-do
- ac_lines=`grep -c . conftest.vals`
- # grep -c gives empty output for an empty file on some AIX systems.
- if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
- # Write a limited-size here document to conftest.frag.
- echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
- echo 'CEOF
- sed -f conftest.frag conftest.in > conftest.out
- rm -f conftest.in
- mv conftest.out conftest.in
-' >> $CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
- rm -f conftest.vals
- mv conftest.tail conftest.vals
-done
-rm -f conftest.vals
-
-cat >> $CONFIG_STATUS <<\EOF
- rm -f conftest.frag conftest.h
- echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
- cat conftest.in >> conftest.h
- rm -f conftest.in
- if cmp -s $ac_file conftest.h 2>/dev/null; then
- echo "$ac_file is unchanged"
- rm -f conftest.h
- else
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- fi
- rm -f $ac_file
- mv conftest.h $ac_file
- fi
-fi; done
-
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-ac_sources="$nls_cv_header_libgt"
-ac_dests="$nls_cv_header_intl"
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-srcdir=$ac_given_srcdir
-while test -n "$ac_sources"; do
- set $ac_dests; ac_dest=$1; shift; ac_dests=$*
- set $ac_sources; ac_source=$1; shift; ac_sources=$*
-
- echo "linking $srcdir/$ac_source to $ac_dest"
-
- if test ! -r $srcdir/$ac_source; then
- { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
- fi
- rm -f $ac_dest
-
- # Make relative symlinks.
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
- # The dest file is in a subdirectory.
- test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
- ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dest_dir_suffix.
- ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dest_dir_suffix= ac_dots=
- fi
-
- case "$srcdir" in
- [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
- *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
- esac
-
- # Make a symlink if possible; otherwise try a hard link.
- if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
- ln $srcdir/$ac_source $ac_dest; then :
- else
- { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
- fi
-done
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/intl/configure.in b/intl/configure.in
deleted file mode 100644
index 4ba9c244efa..00000000000
--- a/intl/configure.in
+++ /dev/null
@@ -1,10 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-
-AC_INIT(dgettext.c)
-AM_CONFIG_HEADER(config.h:config.in)
-
-AM_PROG_INSTALL
-CY_GNU_GETTEXT
-AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
-
-AC_OUTPUT(Makefile)
diff --git a/intl/dcgettext.c b/intl/dcgettext.c
deleted file mode 100644
index 27586e9159a..00000000000
--- a/intl/dcgettext.c
+++ /dev/null
@@ -1,624 +0,0 @@
-/* Implementation of the dcgettext(3) function.
- Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <sys/types.h>
-
-#ifdef __GNUC__
-# define alloca __builtin_alloca
-# define HAVE_ALLOCA 1
-#else
-# if defined HAVE_ALLOCA_H || defined _LIBC
-# include <alloca.h>
-# else
-# ifdef _AIX
- #pragma alloca
-# else
-# ifndef alloca
-char *alloca ();
-# endif
-# endif
-# endif
-#endif
-
-#include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
-#ifndef __set_errno
-# define __set_errno(val) errno = (val)
-#endif
-
-#if defined STDC_HEADERS || defined _LIBC
-# include <stdlib.h>
-#else
-char *getenv ();
-# ifdef HAVE_MALLOC_H
-# include <malloc.h>
-# else
-void free ();
-# endif
-#endif
-
-#if defined HAVE_STRING_H || defined _LIBC
-# ifndef _GNU_SOURCE
-# define _GNU_SOURCE 1
-# endif
-# include <string.h>
-#else
-# include <strings.h>
-#endif
-#if !HAVE_STRCHR && !defined _LIBC
-# ifndef strchr
-# define strchr index
-# endif
-#endif
-
-#if defined HAVE_UNISTD_H || defined _LIBC
-# include <unistd.h>
-#endif
-
-#include "gettext.h"
-#include "gettextP.h"
-#ifdef _LIBC
-# include <libintl.h>
-#else
-# include "libgettext.h"
-#endif
-#include "hash-string.h"
-
-/* @@ end of prolog @@ */
-
-#ifdef _LIBC
-/* Rename the non ANSI C functions. This is required by the standard
- because some ANSI C functions will require linking with this object
- file and the name space must not be polluted. */
-# define getcwd __getcwd
-# ifndef stpcpy
-# define stpcpy __stpcpy
-# endif
-#else
-# if !defined HAVE_GETCWD
-char *getwd ();
-# define getcwd(buf, max) getwd (buf)
-# else
-char *getcwd ();
-# endif
-# ifndef HAVE_STPCPY
-static char *stpcpy PARAMS ((char *dest, const char *src));
-# endif
-#endif
-
-/* Amount to increase buffer size by in each try. */
-#define PATH_INCR 32
-
-/* The following is from pathmax.h. */
-/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define
- PATH_MAX but might cause redefinition warnings when sys/param.h is
- later included (as on MORE/BSD 4.3). */
-#if defined(_POSIX_VERSION) || (defined(HAVE_LIMITS_H) && !defined(__GNUC__))
-# include <limits.h>
-#endif
-
-#ifndef _POSIX_PATH_MAX
-# define _POSIX_PATH_MAX 255
-#endif
-
-#if !defined(PATH_MAX) && defined(_PC_PATH_MAX)
-# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX))
-#endif
-
-/* Don't include sys/param.h if it already has been. */
-#if defined(HAVE_SYS_PARAM_H) && !defined(PATH_MAX) && !defined(MAXPATHLEN)
-# include <sys/param.h>
-#endif
-
-#if !defined(PATH_MAX) && defined(MAXPATHLEN)
-# define PATH_MAX MAXPATHLEN
-#endif
-
-#ifndef PATH_MAX
-# define PATH_MAX _POSIX_PATH_MAX
-#endif
-
-/* XPG3 defines the result of `setlocale (category, NULL)' as:
- ``Directs `setlocale()' to query `category' and return the current
- setting of `local'.''
- However it does not specify the exact format. And even worse: POSIX
- defines this not at all. So we can use this feature only on selected
- system (e.g. those using GNU C Library). */
-#ifdef _LIBC
-# define HAVE_LOCALE_NULL
-#endif
-
-/* Name of the default domain used for gettext(3) prior any call to
- textdomain(3). The default value for this is "messages". */
-const char _nl_default_default_domain[] = "messages";
-
-/* Value used as the default domain for gettext(3). */
-const char *_nl_current_default_domain = _nl_default_default_domain;
-
-/* Contains the default location of the message catalogs. */
-const char _nl_default_dirname[] = GNULOCALEDIR;
-
-/* List with bindings of specific domains created by bindtextdomain()
- calls. */
-struct binding *_nl_domain_bindings;
-
-/* Prototypes for local functions. */
-static char *find_msg PARAMS ((struct loaded_l10nfile *domain_file,
- const char *msgid)) internal_function;
-static const char *category_to_name PARAMS ((int category)) internal_function;
-static const char *guess_category_value PARAMS ((int category,
- const char *categoryname))
- internal_function;
-
-
-/* For those loosing systems which don't have `alloca' we have to add
- some additional code emulating it. */
-#ifdef HAVE_ALLOCA
-/* Nothing has to be done. */
-# define ADD_BLOCK(list, address) /* nothing */
-# define FREE_BLOCKS(list) /* nothing */
-#else
-struct block_list
-{
- void *address;
- struct block_list *next;
-};
-# define ADD_BLOCK(list, addr) \
- do { \
- struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \
- /* If we cannot get a free block we cannot add the new element to \
- the list. */ \
- if (newp != NULL) { \
- newp->address = (addr); \
- newp->next = (list); \
- (list) = newp; \
- } \
- } while (0)
-# define FREE_BLOCKS(list) \
- do { \
- while (list != NULL) { \
- struct block_list *old = list; \
- list = list->next; \
- free (old); \
- } \
- } while (0)
-# undef alloca
-# define alloca(size) (malloc (size))
-#endif /* have alloca */
-
-
-/* Names for the libintl functions are a problem. They must not clash
- with existing names and they should follow ANSI C. But this source
- code is also used in GNU C Library where the names have a __
- prefix. So we have to make a difference here. */
-#ifdef _LIBC
-# define DCGETTEXT __dcgettext
-#else
-# define DCGETTEXT dcgettext__
-#endif
-
-/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
- locale. */
-char *
-DCGETTEXT (domainname, msgid, category)
- const char *domainname;
- const char *msgid;
- int category;
-{
-#ifndef HAVE_ALLOCA
- struct block_list *block_list = NULL;
-#endif
- struct loaded_l10nfile *domain;
- struct binding *binding;
- const char *categoryname;
- const char *categoryvalue;
- char *dirname, *xdomainname;
- char *single_locale;
- char *retval;
- int saved_errno = errno;
-
- /* If no real MSGID is given return NULL. */
- if (msgid == NULL)
- return NULL;
-
- /* If DOMAINNAME is NULL, we are interested in the default domain. If
- CATEGORY is not LC_MESSAGES this might not make much sense but the
- defintion left this undefined. */
- if (domainname == NULL)
- domainname = _nl_current_default_domain;
-
- /* First find matching binding. */
- for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
- {
- int compare = strcmp (domainname, binding->domainname);
- if (compare == 0)
- /* We found it! */
- break;
- if (compare < 0)
- {
- /* It is not in the list. */
- binding = NULL;
- break;
- }
- }
-
- if (binding == NULL)
- dirname = (char *) _nl_default_dirname;
- else if (binding->dirname[0] == '/')
- dirname = binding->dirname;
- else
- {
- /* We have a relative path. Make it absolute now. */
- size_t dirname_len = strlen (binding->dirname) + 1;
- size_t path_max;
- char *ret;
-
- path_max = (unsigned) PATH_MAX;
- path_max += 2; /* The getcwd docs say to do this. */
-
- dirname = (char *) alloca (path_max + dirname_len);
- ADD_BLOCK (block_list, dirname);
-
- __set_errno (0);
- while ((ret = getcwd (dirname, path_max)) == NULL && errno == ERANGE)
- {
- path_max += PATH_INCR;
- dirname = (char *) alloca (path_max + dirname_len);
- ADD_BLOCK (block_list, dirname);
- __set_errno (0);
- }
-
- if (ret == NULL)
- {
- /* We cannot get the current working directory. Don't signal an
- error but simply return the default string. */
- FREE_BLOCKS (block_list);
- __set_errno (saved_errno);
- return (char *) msgid;
- }
-
- stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname);
- }
-
- /* Now determine the symbolic name of CATEGORY and its value. */
- categoryname = category_to_name (category);
- categoryvalue = guess_category_value (category, categoryname);
-
- xdomainname = (char *) alloca (strlen (categoryname)
- + strlen (domainname) + 5);
- ADD_BLOCK (block_list, xdomainname);
-
- stpcpy (stpcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"),
- domainname),
- ".mo");
-
- /* Creating working area. */
- single_locale = (char *) alloca (strlen (categoryvalue) + 1);
- ADD_BLOCK (block_list, single_locale);
-
-
- /* Search for the given string. This is a loop because we perhaps
- got an ordered list of languages to consider for th translation. */
- while (1)
- {
- /* Make CATEGORYVALUE point to the next element of the list. */
- while (categoryvalue[0] != '\0' && categoryvalue[0] == ':')
- ++categoryvalue;
- if (categoryvalue[0] == '\0')
- {
- /* The whole contents of CATEGORYVALUE has been searched but
- no valid entry has been found. We solve this situation
- by implicitly appending a "C" entry, i.e. no translation
- will take place. */
- single_locale[0] = 'C';
- single_locale[1] = '\0';
- }
- else
- {
- char *cp = single_locale;
- while (categoryvalue[0] != '\0' && categoryvalue[0] != ':')
- *cp++ = *categoryvalue++;
- *cp = '\0';
- }
-
- /* If the current locale value is C (or POSIX) we don't load a
- domain. Return the MSGID. */
- if (strcmp (single_locale, "C") == 0
- || strcmp (single_locale, "POSIX") == 0)
- {
- FREE_BLOCKS (block_list);
- __set_errno (saved_errno);
- return (char *) msgid;
- }
-
-
- /* Find structure describing the message catalog matching the
- DOMAINNAME and CATEGORY. */
- domain = _nl_find_domain (dirname, single_locale, xdomainname);
-
- if (domain != NULL)
- {
- retval = find_msg (domain, msgid);
-
- if (retval == NULL)
- {
- int cnt;
-
- for (cnt = 0; domain->successor[cnt] != NULL; ++cnt)
- {
- retval = find_msg (domain->successor[cnt], msgid);
-
- if (retval != NULL)
- break;
- }
- }
-
- if (retval != NULL)
- {
- FREE_BLOCKS (block_list);
- __set_errno (saved_errno);
- return retval;
- }
- }
- }
- /* NOTREACHED */
-}
-
-#ifdef _LIBC
-/* Alias for function name in GNU C Library. */
-weak_alias (__dcgettext, dcgettext);
-#endif
-
-
-static char *
-internal_function
-find_msg (domain_file, msgid)
- struct loaded_l10nfile *domain_file;
- const char *msgid;
-{
- size_t top, act, bottom;
- struct loaded_domain *domain;
-
- if (domain_file->decided == 0)
- _nl_load_domain (domain_file);
-
- if (domain_file->data == NULL)
- return NULL;
-
- domain = (struct loaded_domain *) domain_file->data;
-
- /* Locate the MSGID and its translation. */
- if (domain->hash_size > 2 && domain->hash_tab != NULL)
- {
- /* Use the hashing table. */
- nls_uint32 len = strlen (msgid);
- nls_uint32 hash_val = hash_string (msgid);
- nls_uint32 idx = hash_val % domain->hash_size;
- nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2));
- nls_uint32 nstr = W (domain->must_swap, domain->hash_tab[idx]);
-
- if (nstr == 0)
- /* Hash table entry is empty. */
- return NULL;
-
- if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len
- && strcmp (msgid,
- domain->data + W (domain->must_swap,
- domain->orig_tab[nstr - 1].offset)) == 0)
- return (char *) domain->data + W (domain->must_swap,
- domain->trans_tab[nstr - 1].offset);
-
- while (1)
- {
- if (idx >= domain->hash_size - incr)
- idx -= domain->hash_size - incr;
- else
- idx += incr;
-
- nstr = W (domain->must_swap, domain->hash_tab[idx]);
- if (nstr == 0)
- /* Hash table entry is empty. */
- return NULL;
-
- if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len
- && strcmp (msgid,
- domain->data + W (domain->must_swap,
- domain->orig_tab[nstr - 1].offset))
- == 0)
- return (char *) domain->data
- + W (domain->must_swap, domain->trans_tab[nstr - 1].offset);
- }
- /* NOTREACHED */
- }
-
- /* Now we try the default method: binary search in the sorted
- array of messages. */
- bottom = 0;
- top = domain->nstrings;
- while (bottom < top)
- {
- int cmp_val;
-
- act = (bottom + top) / 2;
- cmp_val = strcmp (msgid, domain->data
- + W (domain->must_swap,
- domain->orig_tab[act].offset));
- if (cmp_val < 0)
- top = act;
- else if (cmp_val > 0)
- bottom = act + 1;
- else
- break;
- }
-
- /* If an translation is found return this. */
- return bottom >= top ? NULL : (char *) domain->data
- + W (domain->must_swap,
- domain->trans_tab[act].offset);
-}
-
-
-/* Return string representation of locale CATEGORY. */
-static const char *
-internal_function
-category_to_name (category)
- int category;
-{
- const char *retval;
-
- switch (category)
- {
-#ifdef LC_COLLATE
- case LC_COLLATE:
- retval = "LC_COLLATE";
- break;
-#endif
-#ifdef LC_CTYPE
- case LC_CTYPE:
- retval = "LC_CTYPE";
- break;
-#endif
-#ifdef LC_MONETARY
- case LC_MONETARY:
- retval = "LC_MONETARY";
- break;
-#endif
-#ifdef LC_NUMERIC
- case LC_NUMERIC:
- retval = "LC_NUMERIC";
- break;
-#endif
-#ifdef LC_TIME
- case LC_TIME:
- retval = "LC_TIME";
- break;
-#endif
-#ifdef LC_MESSAGES
- case LC_MESSAGES:
- retval = "LC_MESSAGES";
- break;
-#endif
-#ifdef LC_RESPONSE
- case LC_RESPONSE:
- retval = "LC_RESPONSE";
- break;
-#endif
-#ifdef LC_ALL
- case LC_ALL:
- /* This might not make sense but is perhaps better than any other
- value. */
- retval = "LC_ALL";
- break;
-#endif
- default:
- /* If you have a better idea for a default value let me know. */
- retval = "LC_XXX";
- }
-
- return retval;
-}
-
-/* Guess value of current locale from value of the environment variables. */
-static const char *
-internal_function
-guess_category_value (category, categoryname)
- int category;
- const char *categoryname;
-{
- const char *retval;
-
- /* The highest priority value is the `LANGUAGE' environment
- variable. This is a GNU extension. */
- retval = getenv ("LANGUAGE");
- if (retval != NULL && retval[0] != '\0')
- return retval;
-
- /* `LANGUAGE' is not set. So we have to proceed with the POSIX
- methods of looking to `LC_ALL', `LC_xxx', and `LANG'. On some
- systems this can be done by the `setlocale' function itself. */
-#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
- return setlocale (category, NULL);
-#else
- /* Setting of LC_ALL overwrites all other. */
- retval = getenv ("LC_ALL");
- if (retval != NULL && retval[0] != '\0')
- return retval;
-
- /* Next comes the name of the desired category. */
- retval = getenv (categoryname);
- if (retval != NULL && retval[0] != '\0')
- return retval;
-
- /* Last possibility is the LANG environment variable. */
- retval = getenv ("LANG");
- if (retval != NULL && retval[0] != '\0')
- return retval;
-
- /* We use C as the default domain. POSIX says this is implementation
- defined. */
- return "C";
-#endif
-}
-
-/* @@ begin of epilog @@ */
-
-/* We don't want libintl.a to depend on any other library. So we
- avoid the non-standard function stpcpy. In GNU C Library this
- function is available, though. Also allow the symbol HAVE_STPCPY
- to be defined. */
-#if !_LIBC && !HAVE_STPCPY
-static char *
-stpcpy (dest, src)
- char *dest;
- const char *src;
-{
- while ((*dest++ = *src++) != '\0')
- /* Do nothing. */ ;
- return dest - 1;
-}
-#endif
-
-
-#ifdef _LIBC
-/* If we want to free all resources we have to do some work at
- program's end. */
-static void __attribute__ ((unused))
-free_mem (void)
-{
- struct binding *runp;
-
- for (runp = _nl_domain_bindings; runp != NULL; runp = runp->next)
- {
- free (runp->domainname);
- if (runp->dirname != _nl_default_dirname)
- /* Yes, this is a pointer comparison. */
- free (runp->dirname);
- }
-
- if (_nl_current_default_domain != _nl_default_default_domain)
- /* Yes, again a pointer comparison. */
- free ((char *) _nl_current_default_domain);
-}
-
-text_set_element (__libc_subfreeres, free_mem);
-#endif
diff --git a/intl/dgettext.c b/intl/dgettext.c
deleted file mode 100644
index e4a0cfdb6e0..00000000000
--- a/intl/dgettext.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Implementation of the dgettext(3) function
- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if defined HAVE_LOCALE_H || defined _LIBC
-# include <locale.h>
-#endif
-
-#ifdef _LIBC
-# include <libintl.h>
-#else
-# include "libgettext.h"
-#endif
-
-/* @@ end of prolog @@ */
-
-/* Names for the libintl functions are a problem. They must not clash
- with existing names and they should follow ANSI C. But this source
- code is also used in GNU C Library where the names have a __
- prefix. So we have to make a difference here. */
-#ifdef _LIBC
-# define DGETTEXT __dgettext
-# define DCGETTEXT __dcgettext
-#else
-# define DGETTEXT dgettext__
-# define DCGETTEXT dcgettext__
-#endif
-
-/* Look up MSGID in the DOMAINNAME message catalog of the current
- LC_MESSAGES locale. */
-char *
-DGETTEXT (domainname, msgid)
- const char *domainname;
- const char *msgid;
-{
- return DCGETTEXT (domainname, msgid, LC_MESSAGES);
-}
-
-#ifdef _LIBC
-/* Alias for function name in GNU C Library. */
-weak_alias (__dgettext, dgettext);
-#endif
diff --git a/intl/explodename.c b/intl/explodename.c
deleted file mode 100644
index 5a911cee91b..00000000000
--- a/intl/explodename.c
+++ /dev/null
@@ -1,188 +0,0 @@
-/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
- Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if defined STDC_HEADERS || defined _LIBC
-# include <stdlib.h>
-#endif
-
-#if defined HAVE_STRING_H || defined _LIBC
-# include <string.h>
-#else
-# include <strings.h>
-#endif
-#include <sys/types.h>
-
-#include "loadinfo.h"
-
-/* On some strange systems still no definition of NULL is found. Sigh! */
-#ifndef NULL
-# if defined __STDC__ && __STDC__
-# define NULL ((void *) 0)
-# else
-# define NULL 0
-# endif
-#endif
-
-/* @@ end of prolog @@ */
-
-int
-_nl_explode_name (name, language, modifier, territory, codeset,
- normalized_codeset, special, sponsor, revision)
- char *name;
- const char **language;
- const char **modifier;
- const char **territory;
- const char **codeset;
- const char **normalized_codeset;
- const char **special;
- const char **sponsor;
- const char **revision;
-{
- enum { undecided, xpg, cen } syntax;
- char *cp;
- int mask;
-
- *modifier = NULL;
- *territory = NULL;
- *codeset = NULL;
- *normalized_codeset = NULL;
- *special = NULL;
- *sponsor = NULL;
- *revision = NULL;
-
- /* Now we determine the single parts of the locale name. First
- look for the language. Termination symbols are `_' and `@' if
- we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */
- mask = 0;
- syntax = undecided;
- *language = cp = name;
- while (cp[0] != '\0' && cp[0] != '_' && cp[0] != '@'
- && cp[0] != '+' && cp[0] != ',')
- ++cp;
-
- if (*language == cp)
- /* This does not make sense: language has to be specified. Use
- this entry as it is without exploding. Perhaps it is an alias. */
- cp = strchr (*language, '\0');
- else if (cp[0] == '_')
- {
- /* Next is the territory. */
- cp[0] = '\0';
- *territory = ++cp;
-
- while (cp[0] != '\0' && cp[0] != '.' && cp[0] != '@'
- && cp[0] != '+' && cp[0] != ',' && cp[0] != '_')
- ++cp;
-
- mask |= TERRITORY;
-
- if (cp[0] == '.')
- {
- /* Next is the codeset. */
- syntax = xpg;
- cp[0] = '\0';
- *codeset = ++cp;
-
- while (cp[0] != '\0' && cp[0] != '@')
- ++cp;
-
- mask |= XPG_CODESET;
-
- if (*codeset != cp && (*codeset)[0] != '\0')
- {
- *normalized_codeset = _nl_normalize_codeset (*codeset,
- cp - *codeset);
- if (strcmp (*codeset, *normalized_codeset) == 0)
- free ((char *) *normalized_codeset);
- else
- mask |= XPG_NORM_CODESET;
- }
- }
- }
-
- if (cp[0] == '@' || (syntax != xpg && cp[0] == '+'))
- {
- /* Next is the modifier. */
- syntax = cp[0] == '@' ? xpg : cen;
- cp[0] = '\0';
- *modifier = ++cp;
-
- while (syntax == cen && cp[0] != '\0' && cp[0] != '+'
- && cp[0] != ',' && cp[0] != '_')
- ++cp;
-
- mask |= XPG_MODIFIER | CEN_AUDIENCE;
- }
-
- if (syntax != xpg && (cp[0] == '+' || cp[0] == ',' || cp[0] == '_'))
- {
- syntax = cen;
-
- if (cp[0] == '+')
- {
- /* Next is special application (CEN syntax). */
- cp[0] = '\0';
- *special = ++cp;
-
- while (cp[0] != '\0' && cp[0] != ',' && cp[0] != '_')
- ++cp;
-
- mask |= CEN_SPECIAL;
- }
-
- if (cp[0] == ',')
- {
- /* Next is sponsor (CEN syntax). */
- cp[0] = '\0';
- *sponsor = ++cp;
-
- while (cp[0] != '\0' && cp[0] != '_')
- ++cp;
-
- mask |= CEN_SPONSOR;
- }
-
- if (cp[0] == '_')
- {
- /* Next is revision (CEN syntax). */
- cp[0] = '\0';
- *revision = ++cp;
-
- mask |= CEN_REVISION;
- }
- }
-
- /* For CEN syntax values it might be important to have the
- separator character in the file name, not for XPG syntax. */
- if (syntax == xpg)
- {
- if (*territory != NULL && (*territory)[0] == '\0')
- mask &= ~TERRITORY;
-
- if (*codeset != NULL && (*codeset)[0] == '\0')
- mask &= ~XPG_CODESET;
-
- if (*modifier != NULL && (*modifier)[0] == '\0')
- mask &= ~XPG_MODIFIER;
- }
-
- return mask;
-}
diff --git a/intl/finddomain.c b/intl/finddomain.c
deleted file mode 100644
index 5409565fd3d..00000000000
--- a/intl/finddomain.c
+++ /dev/null
@@ -1,216 +0,0 @@
-/* Handle list of needed message catalogs
- Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
- Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <ctype.h>
-#include <errno.h>
-#include <stdio.h>
-#include <sys/types.h>
-
-#if defined STDC_HEADERS || defined _LIBC
-# include <stdlib.h>
-#else
-# ifdef HAVE_MALLOC_H
-# include <malloc.h>
-# else
-void free ();
-# endif
-#endif
-
-#if defined HAVE_STRING_H || defined _LIBC
-# include <string.h>
-#else
-# include <strings.h>
-# ifndef memcpy
-# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
-# endif
-#endif
-#if !HAVE_STRCHR && !defined _LIBC
-# ifndef strchr
-# define strchr index
-# endif
-#endif
-
-#if defined HAVE_UNISTD_H || defined _LIBC
-# include <unistd.h>
-#endif
-
-#include "gettext.h"
-#include "gettextP.h"
-#ifdef _LIBC
-# include <libintl.h>
-#else
-# include "libgettext.h"
-#endif
-
-/* @@ end of prolog @@ */
-/* List of already loaded domains. */
-static struct loaded_l10nfile *_nl_loaded_domains;
-
-
-/* Return a data structure describing the message catalog described by
- the DOMAINNAME and CATEGORY parameters with respect to the currently
- established bindings. */
-struct loaded_l10nfile *
-internal_function
-_nl_find_domain (dirname, locale, domainname)
- const char *dirname;
- char *locale;
- const char *domainname;
-{
- struct loaded_l10nfile *retval;
- const char *language;
- const char *modifier;
- const char *territory;
- const char *codeset;
- const char *normalized_codeset;
- const char *special;
- const char *sponsor;
- const char *revision;
- const char *alias_value;
- int mask;
-
- /* LOCALE can consist of up to four recognized parts for the XPG syntax:
-
- language[_territory[.codeset]][@modifier]
-
- and six parts for the CEN syntax:
-
- language[_territory][+audience][+special][,[sponsor][_revision]]
-
- Beside the first part all of them are allowed to be missing. If
- the full specified locale is not found, the less specific one are
- looked for. The various parts will be stripped off according to
- the following order:
- (1) revision
- (2) sponsor
- (3) special
- (4) codeset
- (5) normalized codeset
- (6) territory
- (7) audience/modifier
- */
-
- /* If we have already tested for this locale entry there has to
- be one data set in the list of loaded domains. */
- retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
- strlen (dirname) + 1, 0, locale, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, domainname, 0);
- if (retval != NULL)
- {
- /* We know something about this locale. */
- int cnt;
-
- if (retval->decided == 0)
- _nl_load_domain (retval);
-
- if (retval->data != NULL)
- return retval;
-
- for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
- {
- if (retval->successor[cnt]->decided == 0)
- _nl_load_domain (retval->successor[cnt]);
-
- if (retval->successor[cnt]->data != NULL)
- break;
- }
- return cnt >= 0 ? retval : NULL;
- /* NOTREACHED */
- }
-
- /* See whether the locale value is an alias. If yes its value
- *overwrites* the alias name. No test for the original value is
- done. */
- alias_value = _nl_expand_alias (locale);
- if (alias_value != NULL)
- {
-#if defined _LIBC || defined HAVE_STRDUP
- locale = strdup (alias_value);
- if (locale == NULL)
- return NULL;
-#else
- size_t len = strlen (alias_value) + 1;
- locale = (char *) malloc (len);
- if (locale == NULL)
- return NULL;
-
- memcpy (locale, alias_value, len);
-#endif
- }
-
- /* Now we determine the single parts of the locale name. First
- look for the language. Termination symbols are `_' and `@' if
- we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */
- mask = _nl_explode_name (locale, &language, &modifier, &territory,
- &codeset, &normalized_codeset, &special,
- &sponsor, &revision);
-
- /* Create all possible locale entries which might be interested in
- generalization. */
- retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
- strlen (dirname) + 1, mask, language, territory,
- codeset, normalized_codeset, modifier, special,
- sponsor, revision, domainname, 1);
- if (retval == NULL)
- /* This means we are out of core. */
- return NULL;
-
- if (retval->decided == 0)
- _nl_load_domain (retval);
- if (retval->data == NULL)
- {
- int cnt;
- for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
- {
- if (retval->successor[cnt]->decided == 0)
- _nl_load_domain (retval->successor[cnt]);
- if (retval->successor[cnt]->data != NULL)
- break;
- }
- }
-
- /* The room for an alias was dynamically allocated. Free it now. */
- if (alias_value != NULL)
- free (locale);
-
- return retval;
-}
-
-
-#ifdef _LIBC
-static void __attribute__ ((unused))
-free_mem (void)
-{
- struct loaded_l10nfile *runp = _nl_loaded_domains;
-
- while (runp != NULL)
- {
- struct loaded_l10nfile *here = runp;
- if (runp->data != NULL)
- _nl_unload_domain ((struct loaded_domain *) runp->data);
- runp = runp->next;
- free (here);
- }
-}
-
-text_set_element (__libc_subfreeres, free_mem);
-#endif
diff --git a/intl/gettext.c b/intl/gettext.c
deleted file mode 100644
index 6bc5b94d3e8..00000000000
--- a/intl/gettext.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Implementation of gettext(3) function.
- Copyright (C) 1995, 1997 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#ifdef _LIBC
-# define __need_NULL
-# include <stddef.h>
-#else
-# ifdef STDC_HEADERS
-# include <stdlib.h> /* Just for NULL. */
-# else
-# ifdef HAVE_STRING_H
-# include <string.h>
-# else
-# define NULL ((void *) 0)
-# endif
-# endif
-#endif
-
-#ifdef _LIBC
-# include <libintl.h>
-#else
-# include "libgettext.h"
-#endif
-
-/* @@ end of prolog @@ */
-
-/* Names for the libintl functions are a problem. They must not clash
- with existing names and they should follow ANSI C. But this source
- code is also used in GNU C Library where the names have a __
- prefix. So we have to make a difference here. */
-#ifdef _LIBC
-# define GETTEXT __gettext
-# define DGETTEXT __dgettext
-#else
-# define GETTEXT gettext__
-# define DGETTEXT dgettext__
-#endif
-
-/* Look up MSGID in the current default message catalog for the current
- LC_MESSAGES locale. If not found, returns MSGID itself (the default
- text). */
-char *
-GETTEXT (msgid)
- const char *msgid;
-{
- return DGETTEXT (NULL, msgid);
-}
-
-#ifdef _LIBC
-/* Alias for function name in GNU C Library. */
-weak_alias (__gettext, gettext);
-#endif
diff --git a/intl/gettext.h b/intl/gettext.h
deleted file mode 100644
index 3887e876402..00000000000
--- a/intl/gettext.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* Internal header for GNU gettext internationalization functions.
- Copyright (C) 1995, 1997 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-#ifndef _GETTEXT_H
-#define _GETTEXT_H 1
-
-#include <stdio.h>
-
-#if HAVE_LIMITS_H || _LIBC
-# include <limits.h>
-#endif
-
-/* @@ end of prolog @@ */
-
-/* The magic number of the GNU message catalog format. */
-#define _MAGIC 0x950412de
-#define _MAGIC_SWAPPED 0xde120495
-
-/* Revision number of the currently used .mo (binary) file format. */
-#define MO_REVISION_NUMBER 0
-
-/* The following contortions are an attempt to use the C preprocessor
- to determine an unsigned integral type that is 32 bits wide. An
- alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
- doing that would require that the configure script compile and *run*
- the resulting executable. Locally running cross-compiled executables
- is usually not possible. */
-
-#if __STDC__
-# define UINT_MAX_32_BITS 4294967295U
-#else
-# define UINT_MAX_32_BITS 0xFFFFFFFF
-#endif
-
-/* If UINT_MAX isn't defined, assume it's a 32-bit type.
- This should be valid for all systems GNU cares about because
- that doesn't include 16-bit systems, and only modern systems
- (that certainly have <limits.h>) have 64+-bit integral types. */
-
-#ifndef UINT_MAX
-# define UINT_MAX UINT_MAX_32_BITS
-#endif
-
-#if UINT_MAX == UINT_MAX_32_BITS
-typedef unsigned nls_uint32;
-#else
-# if USHRT_MAX == UINT_MAX_32_BITS
-typedef unsigned short nls_uint32;
-# else
-# if ULONG_MAX == UINT_MAX_32_BITS
-typedef unsigned long nls_uint32;
-# else
- /* The following line is intended to throw an error. Using #error is
- not portable enough. */
- "Cannot determine unsigned 32-bit data type."
-# endif
-# endif
-#endif
-
-
-/* Header for binary .mo file format. */
-struct mo_file_header
-{
- /* The magic number. */
- nls_uint32 magic;
- /* The revision number of the file format. */
- nls_uint32 revision;
- /* The number of strings pairs. */
- nls_uint32 nstrings;
- /* Offset of table with start offsets of original strings. */
- nls_uint32 orig_tab_offset;
- /* Offset of table with start offsets of translation strings. */
- nls_uint32 trans_tab_offset;
- /* Size of hashing table. */
- nls_uint32 hash_tab_size;
- /* Offset of first hashing entry. */
- nls_uint32 hash_tab_offset;
-};
-
-struct string_desc
-{
- /* Length of addressed string. */
- nls_uint32 length;
- /* Offset of string in file. */
- nls_uint32 offset;
-};
-
-/* @@ begin of epilog @@ */
-
-#endif /* gettext.h */
diff --git a/intl/gettextP.h b/intl/gettextP.h
deleted file mode 100644
index 61e2f871bc8..00000000000
--- a/intl/gettextP.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/* Header describing internals of gettext library
- Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
- Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _GETTEXTP_H
-#define _GETTEXTP_H
-
-#include "loadinfo.h"
-
-/* @@ end of prolog @@ */
-
-#ifndef PARAMS
-# if __STDC__
-# define PARAMS(args) args
-# else
-# define PARAMS(args) ()
-# endif
-#endif
-
-#ifndef internal_function
-# define internal_function
-#endif
-
-#ifndef W
-# define W(flag, data) ((flag) ? SWAP (data) : (data))
-#endif
-
-
-#ifdef _LIBC
-# include <byteswap.h>
-# define SWAP(i) bswap_32 (i)
-#else
-static nls_uint32 SWAP PARAMS ((nls_uint32 i));
-
-static inline nls_uint32
-SWAP (i)
- nls_uint32 i;
-{
- return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
-}
-#endif
-
-
-struct loaded_domain
-{
- const char *data;
- int use_mmap;
- size_t mmap_size;
- int must_swap;
- nls_uint32 nstrings;
- struct string_desc *orig_tab;
- struct string_desc *trans_tab;
- nls_uint32 hash_size;
- nls_uint32 *hash_tab;
-};
-
-struct binding
-{
- struct binding *next;
- char *domainname;
- char *dirname;
-};
-
-struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname,
- char *__locale,
- const char *__domainname))
- internal_function;
-void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain))
- internal_function;
-void _nl_unload_domain PARAMS ((struct loaded_domain *__domain))
- internal_function;
-
-/* @@ begin of epilog @@ */
-
-#endif /* gettextP.h */
diff --git a/intl/hash-string.h b/intl/hash-string.h
deleted file mode 100644
index 66281078364..00000000000
--- a/intl/hash-string.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Implements a string hashing function.
- Copyright (C) 1995, 1997 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-/* @@ end of prolog @@ */
-
-#ifndef PARAMS
-# if __STDC__
-# define PARAMS(Args) Args
-# else
-# define PARAMS(Args) ()
-# endif
-#endif
-
-/* We assume to have `unsigned long int' value with at least 32 bits. */
-#define HASHWORDBITS 32
-
-
-/* Defines the so called `hashpjw' function by P.J. Weinberger
- [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
- 1986, 1987 Bell Telephone Laboratories, Inc.] */
-static unsigned long hash_string PARAMS ((const char *__str_param));
-
-static inline unsigned long
-hash_string (str_param)
- const char *str_param;
-{
- unsigned long int hval, g;
- const char *str = str_param;
-
- /* Compute the hash value for the given string. */
- hval = 0;
- while (*str != '\0')
- {
- hval <<= 4;
- hval += (unsigned long) *str++;
- g = hval & ((unsigned long) 0xf << (HASHWORDBITS - 4));
- if (g != 0)
- {
- hval ^= g >> (HASHWORDBITS - 8);
- hval ^= g;
- }
- }
- return hval;
-}
diff --git a/intl/intl-compat.c b/intl/intl-compat.c
deleted file mode 100644
index 415a0f3b4f8..00000000000
--- a/intl/intl-compat.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/* intl-compat.c - Stub functions to call gettext functions from GNU gettext
- Library.
- Copyright (C) 1995 Software Foundation, Inc.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "libgettext.h"
-
-/* @@ end of prolog @@ */
-
-
-#undef gettext
-#undef dgettext
-#undef dcgettext
-#undef textdomain
-#undef bindtextdomain
-
-
-char *
-bindtextdomain (domainname, dirname)
- const char *domainname;
- const char *dirname;
-{
- return bindtextdomain__ (domainname, dirname);
-}
-
-
-char *
-dcgettext (domainname, msgid, category)
- const char *domainname;
- const char *msgid;
- int category;
-{
- return dcgettext__ (domainname, msgid, category);
-}
-
-
-char *
-dgettext (domainname, msgid)
- const char *domainname;
- const char *msgid;
-{
- return dgettext__ (domainname, msgid);
-}
-
-
-char *
-gettext (msgid)
- const char *msgid;
-{
- return gettext__ (msgid);
-}
-
-
-char *
-textdomain (domainname)
- const char *domainname;
-{
- return textdomain__ (domainname);
-}
diff --git a/intl/intlh.inst.in b/intl/intlh.inst.in
deleted file mode 100644
index 95e15a8f266..00000000000
--- a/intl/intlh.inst.in
+++ /dev/null
@@ -1,111 +0,0 @@
-/* Message catalogs for internationalization.
- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301,
- USA. */
-
-#ifndef _LIBINTL_H
-#define _LIBINTL_H 1
-
-@INCLUDE_LOCALE_H@
-
-/* We define an additional symbol to signal that we use the GNU
- implementation of gettext. */
-#define __USE_GNU_GETTEXT 1
-
-#ifndef PARAMS
-# if __STDC__ || defined __cplusplus
-# define PARAMS(args) args
-# else
-# define PARAMS(args) ()
-# endif
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Look up MSGID in the current default message catalog for the current
- LC_MESSAGES locale. If not found, returns MSGID itself (the default
- text). */
-extern char *gettext PARAMS ((const char *__msgid));
-
-/* Look up MSGID in the DOMAINNAME message catalog for the current
- LC_MESSAGES locale. */
-extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid));
-
-/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
- locale. */
-extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid,
- int __category));
-
-
-/* Set the current default message catalog to DOMAINNAME.
- If DOMAINNAME is null, return the current default.
- If DOMAINNAME is "", reset to the default of "messages". */
-extern char *textdomain PARAMS ((const char *__domainname));
-
-/* Specify that the DOMAINNAME message catalog will be found
- in DIRNAME rather than in the system locale data base. */
-extern char *bindtextdomain PARAMS ((const char *__domainname,
- const char *__dirname));
-
-
-/* Optimized version of the functions above. */
-#if defined __OPTIMIZED
-/* These must be a macro. Inlined functions are useless because the
- `__builtin_constant_p' predicate in dcgettext would always return
- false. */
-
-# define gettext(msgid) dgettext ((char *) 0, msgid)
-
-# define dgettext(domainname, msgid) \
- dcgettext (domainname, msgid, LC_MESSAGES)
-
-# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-/* This global variable is defined in loadmsgcat.c. We need a sign,
- whether a new catalog was loaded, which can be associated with all
- translations. */
-extern int _nl_msg_cat_cntr;
-
-# define dcgettext(domainname, msgid, category) \
- (__extension__ \
- ({ \
- char *__result; \
- if (__builtin_constant_p (msgid)) \
- { \
- static char *__translation__; \
- static int __catalog_counter__; \
- if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr) \
- { \
- __translation__ = \
- (dcgettext) ((domainname), (msgid), (category)); \
- __catalog_counter__ = _nl_msg_cat_cntr; \
- } \
- __result = __translation__; \
- } \
- else \
- __result = (dcgettext) ((domainname), (msgid), (category)); \
- __result; \
- }))
-# endif
-#endif /* Optimizing. */
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* libintl.h */
diff --git a/intl/l10nflist.c b/intl/l10nflist.c
deleted file mode 100644
index 3ef93b84733..00000000000
--- a/intl/l10nflist.c
+++ /dev/null
@@ -1,411 +0,0 @@
-/* Handle list of needed message catalogs
- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
- Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-
-#if defined HAVE_STRING_H || defined _LIBC
-# ifndef _GNU_SOURCE
-# define _GNU_SOURCE 1
-# endif
-# include <string.h>
-#else
-# include <strings.h>
-# ifndef memcpy
-# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
-# endif
-#endif
-#if !HAVE_STRCHR && !defined _LIBC
-# ifndef strchr
-# define strchr index
-# endif
-#endif
-
-#if defined _LIBC || defined HAVE_ARGZ_H
-# include <argz.h>
-#endif
-#include <ctype.h>
-#include <sys/types.h>
-
-#if defined STDC_HEADERS || defined _LIBC
-# include <stdlib.h>
-#endif
-
-#include "loadinfo.h"
-
-/* On some strange systems still no definition of NULL is found. Sigh! */
-#ifndef NULL
-# if defined __STDC__ && __STDC__
-# define NULL ((void *) 0)
-# else
-# define NULL 0
-# endif
-#endif
-
-/* @@ end of prolog @@ */
-
-#ifdef _LIBC
-/* Rename the non ANSI C functions. This is required by the standard
- because some ANSI C functions will require linking with this object
- file and the name space must not be polluted. */
-# ifndef stpcpy
-# define stpcpy(dest, src) __stpcpy(dest, src)
-# endif
-#else
-# ifndef HAVE_STPCPY
-static char *stpcpy PARAMS ((char *dest, const char *src));
-# endif
-#endif
-
-/* Define function which are usually not available. */
-
-#if !defined _LIBC && !defined HAVE___ARGZ_COUNT
-/* Returns the number of strings in ARGZ. */
-static size_t argz_count__ PARAMS ((const char *argz, size_t len));
-
-static size_t
-argz_count__ (argz, len)
- const char *argz;
- size_t len;
-{
- size_t count = 0;
- while (len > 0)
- {
- size_t part_len = strlen (argz);
- argz += part_len + 1;
- len -= part_len + 1;
- count++;
- }
- return count;
-}
-# undef __argz_count
-# define __argz_count(argz, len) argz_count__ (argz, len)
-#endif /* !_LIBC && !HAVE___ARGZ_COUNT */
-
-#if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY
-/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's
- except the last into the character SEP. */
-static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep));
-
-static void
-argz_stringify__ (argz, len, sep)
- char *argz;
- size_t len;
- int sep;
-{
- while (len > 0)
- {
- size_t part_len = strlen (argz);
- argz += part_len;
- len -= part_len + 1;
- if (len > 0)
- *argz++ = sep;
- }
-}
-# undef __argz_stringify
-# define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep)
-#endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */
-
-#if !defined _LIBC && !defined HAVE___ARGZ_NEXT
-static char *argz_next__ PARAMS ((char *argz, size_t argz_len,
- const char *entry));
-
-static char *
-argz_next__ (argz, argz_len, entry)
- char *argz;
- size_t argz_len;
- const char *entry;
-{
- if (entry)
- {
- if (entry < argz + argz_len)
- entry = strchr (entry, '\0') + 1;
-
- return entry >= argz + argz_len ? NULL : (char *) entry;
- }
- else
- if (argz_len > 0)
- return argz;
- else
- return 0;
-}
-# undef __argz_next
-# define __argz_next(argz, len, entry) argz_next__ (argz, len, entry)
-#endif /* !_LIBC && !HAVE___ARGZ_NEXT */
-
-
-/* Return number of bits set in X. */
-static int pop PARAMS ((int x));
-
-static inline int
-pop (x)
- int x;
-{
- /* We assume that no more than 16 bits are used. */
- x = ((x & ~0x5555) >> 1) + (x & 0x5555);
- x = ((x & ~0x3333) >> 2) + (x & 0x3333);
- x = ((x >> 4) + x) & 0x0f0f;
- x = ((x >> 8) + x) & 0xff;
-
- return x;
-}
-
-
-struct loaded_l10nfile *
-_nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
- territory, codeset, normalized_codeset, modifier, special,
- sponsor, revision, filename, do_allocate)
- struct loaded_l10nfile **l10nfile_list;
- const char *dirlist;
- size_t dirlist_len;
- int mask;
- const char *language;
- const char *territory;
- const char *codeset;
- const char *normalized_codeset;
- const char *modifier;
- const char *special;
- const char *sponsor;
- const char *revision;
- const char *filename;
- int do_allocate;
-{
- char *abs_filename;
- struct loaded_l10nfile *last = NULL;
- struct loaded_l10nfile *retval;
- char *cp;
- size_t entries;
- int cnt;
-
- /* Allocate room for the full file name. */
- abs_filename = (char *) malloc (dirlist_len
- + strlen (language)
- + ((mask & TERRITORY) != 0
- ? strlen (territory) + 1 : 0)
- + ((mask & XPG_CODESET) != 0
- ? strlen (codeset) + 1 : 0)
- + ((mask & XPG_NORM_CODESET) != 0
- ? strlen (normalized_codeset) + 1 : 0)
- + (((mask & XPG_MODIFIER) != 0
- || (mask & CEN_AUDIENCE) != 0)
- ? strlen (modifier) + 1 : 0)
- + ((mask & CEN_SPECIAL) != 0
- ? strlen (special) + 1 : 0)
- + (((mask & CEN_SPONSOR) != 0
- || (mask & CEN_REVISION) != 0)
- ? (1 + ((mask & CEN_SPONSOR) != 0
- ? strlen (sponsor) + 1 : 0)
- + ((mask & CEN_REVISION) != 0
- ? strlen (revision) + 1 : 0)) : 0)
- + 1 + strlen (filename) + 1);
-
- if (abs_filename == NULL)
- return NULL;
-
- retval = NULL;
- last = NULL;
-
- /* Construct file name. */
- memcpy (abs_filename, dirlist, dirlist_len);
- __argz_stringify (abs_filename, dirlist_len, ':');
- cp = abs_filename + (dirlist_len - 1);
- *cp++ = '/';
- cp = stpcpy (cp, language);
-
- if ((mask & TERRITORY) != 0)
- {
- *cp++ = '_';
- cp = stpcpy (cp, territory);
- }
- if ((mask & XPG_CODESET) != 0)
- {
- *cp++ = '.';
- cp = stpcpy (cp, codeset);
- }
- if ((mask & XPG_NORM_CODESET) != 0)
- {
- *cp++ = '.';
- cp = stpcpy (cp, normalized_codeset);
- }
- if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0)
- {
- /* This component can be part of both syntaces but has different
- leading characters. For CEN we use `+', else `@'. */
- *cp++ = (mask & CEN_AUDIENCE) != 0 ? '+' : '@';
- cp = stpcpy (cp, modifier);
- }
- if ((mask & CEN_SPECIAL) != 0)
- {
- *cp++ = '+';
- cp = stpcpy (cp, special);
- }
- if ((mask & (CEN_SPONSOR | CEN_REVISION)) != 0)
- {
- *cp++ = ',';
- if ((mask & CEN_SPONSOR) != 0)
- cp = stpcpy (cp, sponsor);
- if ((mask & CEN_REVISION) != 0)
- {
- *cp++ = '_';
- cp = stpcpy (cp, revision);
- }
- }
-
- *cp++ = '/';
- stpcpy (cp, filename);
-
- /* Look in list of already loaded domains whether it is already
- available. */
- last = NULL;
- for (retval = *l10nfile_list; retval != NULL; retval = retval->next)
- if (retval->filename != NULL)
- {
- int compare = strcmp (retval->filename, abs_filename);
- if (compare == 0)
- /* We found it! */
- break;
- if (compare < 0)
- {
- /* It's not in the list. */
- retval = NULL;
- break;
- }
-
- last = retval;
- }
-
- if (retval != NULL || do_allocate == 0)
- {
- free (abs_filename);
- return retval;
- }
-
- retval = (struct loaded_l10nfile *)
- malloc (sizeof (*retval) + (__argz_count (dirlist, dirlist_len)
- * (1 << pop (mask))
- * sizeof (struct loaded_l10nfile *)));
- if (retval == NULL)
- return NULL;
-
- retval->filename = abs_filename;
- retval->decided = (__argz_count (dirlist, dirlist_len) != 1
- || ((mask & XPG_CODESET) != 0
- && (mask & XPG_NORM_CODESET) != 0));
- retval->data = NULL;
-
- if (last == NULL)
- {
- retval->next = *l10nfile_list;
- *l10nfile_list = retval;
- }
- else
- {
- retval->next = last->next;
- last->next = retval;
- }
-
- entries = 0;
- /* If the DIRLIST is a real list the RETVAL entry corresponds not to
- a real file. So we have to use the DIRLIST separation mechanism
- of the inner loop. */
- cnt = __argz_count (dirlist, dirlist_len) == 1 ? mask - 1 : mask;
- for (; cnt >= 0; --cnt)
- if ((cnt & ~mask) == 0
- && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0)
- && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0))
- {
- /* Iterate over all elements of the DIRLIST. */
- char *dir = NULL;
-
- while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir))
- != NULL)
- retval->successor[entries++]
- = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, cnt,
- language, territory, codeset,
- normalized_codeset, modifier, special,
- sponsor, revision, filename, 1);
- }
- retval->successor[entries] = NULL;
-
- return retval;
-}
-
-/* Normalize codeset name. There is no standard for the codeset
- names. Normalization allows the user to use any of the common
- names. */
-const char *
-_nl_normalize_codeset (codeset, name_len)
- const unsigned char *codeset;
- size_t name_len;
-{
- int len = 0;
- int only_digit = 1;
- char *retval;
- char *wp;
- size_t cnt;
-
- for (cnt = 0; cnt < name_len; ++cnt)
- if (isalnum (codeset[cnt]))
- {
- ++len;
-
- if (isalpha (codeset[cnt]))
- only_digit = 0;
- }
-
- retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1);
-
- if (retval != NULL)
- {
- if (only_digit)
- wp = stpcpy (retval, "iso");
- else
- wp = retval;
-
- for (cnt = 0; cnt < name_len; ++cnt)
- if (isalpha (codeset[cnt]))
- *wp++ = tolower (codeset[cnt]);
- else if (isdigit (codeset[cnt]))
- *wp++ = codeset[cnt];
-
- *wp = '\0';
- }
-
- return (const char *) retval;
-}
-
-
-/* @@ begin of epilog @@ */
-
-/* We don't want libintl.a to depend on any other library. So we
- avoid the non-standard function stpcpy. In GNU C Library this
- function is available, though. Also allow the symbol HAVE_STPCPY
- to be defined. */
-#if !_LIBC && !HAVE_STPCPY
-static char *
-stpcpy (dest, src)
- char *dest;
- const char *src;
-{
- while ((*dest++ = *src++) != '\0')
- /* Do nothing. */ ;
- return dest - 1;
-}
-#endif
diff --git a/intl/libgettext.h b/intl/libgettext.h
deleted file mode 100644
index f8c224e47f7..00000000000
--- a/intl/libgettext.h
+++ /dev/null
@@ -1,182 +0,0 @@
-/* Message catalogs for internationalization.
- Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* Because on some systems (e.g. Solaris) we sometimes have to include
- the systems libintl.h as well as this file we have more complex
- include protection above. But the systems header might perhaps also
- define _LIBINTL_H and therefore we have to protect the definition here. */
-
-#if !defined _LIBINTL_H || !defined _LIBGETTEXT_H
-#ifndef _LIBINTL_H
-# define _LIBINTL_H 1
-#endif
-#define _LIBGETTEXT_H 1
-
-/* We define an additional symbol to signal that we use the GNU
- implementation of gettext. */
-#define __USE_GNU_GETTEXT 1
-
-#include <sys/types.h>
-
-#if HAVE_LOCALE_H
-# include <locale.h>
-#endif
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* @@ end of prolog @@ */
-
-#ifndef PARAMS
-# if __STDC__ || defined __cplusplus
-# define PARAMS(args) args
-# else
-# define PARAMS(args) ()
-# endif
-#endif
-
-#ifndef NULL
-# if !defined __cplusplus || defined __GNUC__
-# define NULL ((void *) 0)
-# else
-# define NULL (0)
-# endif
-#endif
-
-#if !HAVE_LC_MESSAGES
-/* This value determines the behaviour of the gettext() and dgettext()
- function. But some system does not have this defined. Define it
- to a default value. */
-# define LC_MESSAGES (-1)
-#endif
-
-
-/* Declarations for gettext-using-catgets interface. Derived from
- Jim Meyering's libintl.h. */
-struct _msg_ent
-{
- const char *_msg;
- int _msg_number;
-};
-
-
-#if HAVE_CATGETS
-/* These two variables are defined in the automatically by po-to-tbl.sed
- generated file `cat-id-tbl.c'. */
-extern const struct _msg_ent _msg_tbl[];
-extern int _msg_tbl_length;
-#endif
-
-
-/* For automatical extraction of messages sometimes no real
- translation is needed. Instead the string itself is the result. */
-#define gettext_noop(Str) (Str)
-
-/* Look up MSGID in the current default message catalog for the current
- LC_MESSAGES locale. If not found, returns MSGID itself (the default
- text). */
-extern char *gettext PARAMS ((const char *__msgid));
-extern char *gettext__ PARAMS ((const char *__msgid));
-
-/* Look up MSGID in the DOMAINNAME message catalog for the current
- LC_MESSAGES locale. */
-extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid));
-extern char *dgettext__ PARAMS ((const char *__domainname,
- const char *__msgid));
-
-/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
- locale. */
-extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid,
- int __category));
-extern char *dcgettext__ PARAMS ((const char *__domainname,
- const char *__msgid, int __category));
-
-
-/* Set the current default message catalog to DOMAINNAME.
- If DOMAINNAME is null, return the current default.
- If DOMAINNAME is "", reset to the default of "messages". */
-extern char *textdomain PARAMS ((const char *__domainname));
-extern char *textdomain__ PARAMS ((const char *__domainname));
-
-/* Specify that the DOMAINNAME message catalog will be found
- in DIRNAME rather than in the system locale data base. */
-extern char *bindtextdomain PARAMS ((const char *__domainname,
- const char *__dirname));
-extern char *bindtextdomain__ PARAMS ((const char *__domainname,
- const char *__dirname));
-
-#if ENABLE_NLS
-
-/* Solaris 2.3 has the gettext function but dcgettext is missing.
- So we omit this optimization for Solaris 2.3. BTW, Solaris 2.4
- has dcgettext. */
-# if !HAVE_CATGETS && (!HAVE_GETTEXT || HAVE_DCGETTEXT)
-
-# define gettext(Msgid) \
- dgettext (NULL, Msgid)
-
-# define dgettext(Domainname, Msgid) \
- dcgettext (Domainname, Msgid, LC_MESSAGES)
-
-# if defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ >= 7
-/* This global variable is defined in loadmsgcat.c. We need a sign,
- whether a new catalog was loaded, which can be associated with all
- translations. */
-extern int _nl_msg_cat_cntr;
-
-# define dcgettext(Domainname, Msgid, Category) \
- (__extension__ \
- ({ \
- char *__result; \
- if (__builtin_constant_p (Msgid)) \
- { \
- static char *__translation__; \
- static int __catalog_counter__; \
- if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr) \
- { \
- __translation__ = \
- dcgettext__ (Domainname, Msgid, Category); \
- __catalog_counter__ = _nl_msg_cat_cntr; \
- } \
- __result = __translation__; \
- } \
- else \
- __result = dcgettext__ (Domainname, Msgid, Category); \
- __result; \
- }))
-# endif
-# endif
-
-#else
-
-# define gettext(Msgid) (Msgid)
-# define dgettext(Domainname, Msgid) (Msgid)
-# define dcgettext(Domainname, Msgid, Category) (Msgid)
-# define textdomain(Domainname) ((char *) Domainname)
-# define bindtextdomain(Domainname, Dirname) ((char *) Dirname)
-
-#endif
-
-/* @@ begin of epilog @@ */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/intl/libintl.glibc b/intl/libintl.glibc
deleted file mode 100644
index c55b447678b..00000000000
--- a/intl/libintl.glibc
+++ /dev/null
@@ -1,120 +0,0 @@
-/* Message catalogs for internationalization.
- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
- Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
- This file is derived from the file libgettext.h in the GNU gettext package.
-
- This file is part of the GNU C Library. Its master source is NOT part of
- the C library, however.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-#ifndef _LIBINTL_H
-#define _LIBINTL_H 1
-
-#include <features.h>
-
-/* We define an additional symbol to signal that we use the GNU
- implementation of gettext. */
-#define __USE_GNU_GETTEXT 1
-
-__BEGIN_DECLS
-
-/* Look up MSGID in the current default message catalog for the current
- LC_MESSAGES locale. If not found, returns MSGID itself (the default
- text). */
-extern char *gettext __P ((__const char *__msgid));
-extern char *__gettext __P ((__const char *__msgid));
-
-/* Look up MSGID in the DOMAINNAME message catalog for the current
- LC_MESSAGES locale. */
-extern char *dgettext __P ((__const char *__domainname,
- __const char *__msgid));
-extern char *__dgettext __P ((__const char *__domainname,
- __const char *__msgid));
-
-/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
- locale. */
-extern char *dcgettext __P ((__const char *__domainname,
- __const char *__msgid, int __category));
-extern char *__dcgettext __P ((__const char *__domainname,
- __const char *__msgid, int __category));
-
-
-/* Set the current default message catalog to DOMAINNAME.
- If DOMAINNAME is null, return the current default.
- If DOMAINNAME is "", reset to the default of "messages". */
-extern char *textdomain __P ((__const char *__domainname));
-extern char *__textdomain __P ((__const char *__domainname));
-
-/* Specify that the DOMAINNAME message catalog will be found
- in DIRNAME rather than in the system locale data base. */
-extern char *bindtextdomain __P ((__const char *__domainname,
- __const char *__dirname));
-extern char *__bindtextdomain __P ((__const char *__domainname,
- __const char *__dirname));
-
-
-/* Optimized version of the function above. */
-#if defined __OPTIMIZE__
-
-/* We need NULL for `gettext'. */
-# define __need_NULL
-# include <stddef.h>
-
-/* We need LC_MESSAGES for `dgettext'. */
-# include <locale.h>
-
-/* These must be macros. Inlined functions are useless because the
- `__builtin_constant_p' predicate in dcgettext would always return
- false. */
-
-# define gettext(msgid) dgettext (NULL, msgid)
-
-# define dgettext(domainname, msgid) \
- dcgettext (domainname, msgid, LC_MESSAGES)
-
-# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-/* Variable defined in loadmsgcat.c which gets incremented every time a
- new catalog is loaded. */
-extern int _nl_msg_cat_cntr;
-
-# define dcgettext(domainname, msgid, category) \
- (__extension__ \
- ({ \
- char *__result; \
- if (__builtin_constant_p (msgid)) \
- { \
- static char *__translation__; \
- static int __catalog_counter__; \
- if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr) \
- { \
- __translation__ = \
- __dcgettext ((domainname), (msgid), (category)); \
- __catalog_counter__ = _nl_msg_cat_cntr; \
- } \
- __result = __translation__; \
- } \
- else \
- __result = __dcgettext ((domainname), (msgid), (category)); \
- __result; \
- }))
-# endif
-#endif /* Optimizing. */
-
-
-__END_DECLS
-
-#endif /* libintl.h */
diff --git a/intl/linux-msg.sed b/intl/linux-msg.sed
deleted file mode 100644
index f9b8188d783..00000000000
--- a/intl/linux-msg.sed
+++ /dev/null
@@ -1,100 +0,0 @@
-# po2msg.sed - Convert Uniforum style .po file to Linux style .msg file
-# Copyright 1995, 2002 Free Software Foundation, Inc.
-# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
-#
-#
-# The first directive in the .msg should be the definition of the
-# message set number. We use always set number 1.
-#
-1 {
- i\
-$set 1 # Automatically created by po2msg.sed
- h
- s/.*/0/
- x
-}
-#
-# Mitch's old catalog format does not allow comments.
-#
-# We copy the original message as a comment into the .msg file.
-#
-/^msgid/ {
- s/msgid[ ]*"//
-#
-# This does not work now with the new format.
-# /"$/! {
-# s/\\$//
-# s/$/ ... (more lines following)"/
-# }
- x
-# The following nice solution is by
-# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
- td
-# Increment a decimal number in pattern space.
-# First hide trailing `9' digits.
- :d
- s/9\(_*\)$/_\1/
- td
-# Assure at least one digit is available.
- s/^\(_*\)$/0\1/
-# Increment the last digit.
- s/8\(_*\)$/9\1/
- s/7\(_*\)$/8\1/
- s/6\(_*\)$/7\1/
- s/5\(_*\)$/6\1/
- s/4\(_*\)$/5\1/
- s/3\(_*\)$/4\1/
- s/2\(_*\)$/3\1/
- s/1\(_*\)$/2\1/
- s/0\(_*\)$/1\1/
-# Convert the hidden `9' digits to `0's.
- s/_/0/g
- x
- G
- s/\(.*\)"\n\([0-9]*\)/$ #\2 Original Message:(\1)/p
-}
-#
-# The .msg file contains, other than the .po file, only the translations
-# but each given a unique ID. Starting from 1 and incrementing by 1 for
-# each message we assign them to the messages.
-# It is important that the .po file used to generate the cat-id-tbl.c file
-# (with po-to-tbl) is the same as the one used here. (At least the order
-# of declarations must not be changed.)
-#
-/^msgstr/ {
- s/msgstr[ ]*"\(.*\)"/# \1/
-# Clear substitution flag.
- tb
-# Append the next line.
- :b
- N
-# Look whether second part is continuation line.
- s/\(.*\n\)"\(.*\)"/\1\2/
-# Yes, then branch.
- ta
- P
- D
-# Note that D includes a jump to the start!!
-# We found a continuation line. But before printing insert '\'.
- :a
- s/\(.*\)\(\n.*\)/\1\\\2/
- P
-# We cannot use D here.
- s/.*\n\(.*\)/\1/
- tb
-}
-d
diff --git a/intl/loadinfo.h b/intl/loadinfo.h
deleted file mode 100644
index b797c0c5bae..00000000000
--- a/intl/loadinfo.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef PARAMS
-# if __STDC__
-# define PARAMS(args) args
-# else
-# define PARAMS(args) ()
-# endif
-#endif
-
-/* Encoding of locale name parts. */
-#define CEN_REVISION 1
-#define CEN_SPONSOR 2
-#define CEN_SPECIAL 4
-#define XPG_NORM_CODESET 8
-#define XPG_CODESET 16
-#define TERRITORY 32
-#define CEN_AUDIENCE 64
-#define XPG_MODIFIER 128
-
-#define CEN_SPECIFIC (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE)
-#define XPG_SPECIFIC (XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER)
-
-
-struct loaded_l10nfile
-{
- const char *filename;
- int decided;
-
- const void *data;
-
- struct loaded_l10nfile *next;
- struct loaded_l10nfile *successor[1];
-};
-
-
-extern const char *_nl_normalize_codeset PARAMS ((const unsigned char *codeset,
- size_t name_len));
-
-extern struct loaded_l10nfile *
-_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list,
- const char *dirlist, size_t dirlist_len, int mask,
- const char *language, const char *territory,
- const char *codeset,
- const char *normalized_codeset,
- const char *modifier, const char *special,
- const char *sponsor, const char *revision,
- const char *filename, int do_allocate));
-
-
-extern const char *_nl_expand_alias PARAMS ((const char *name));
-
-extern int _nl_explode_name PARAMS ((char *name, const char **language,
- const char **modifier,
- const char **territory,
- const char **codeset,
- const char **normalized_codeset,
- const char **special,
- const char **sponsor,
- const char **revision));
diff --git a/intl/loadmsgcat.c b/intl/loadmsgcat.c
deleted file mode 100644
index ab11bc95d5c..00000000000
--- a/intl/loadmsgcat.c
+++ /dev/null
@@ -1,222 +0,0 @@
-/* Load needed message catalogs.
- Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#if defined STDC_HEADERS || defined _LIBC
-# include <stdlib.h>
-#endif
-
-#if defined HAVE_UNISTD_H || defined _LIBC
-# include <unistd.h>
-#endif
-
-#if (defined HAVE_MMAP && defined HAVE_MUNMAP) || defined _LIBC
-# include <sys/mman.h>
-#endif
-
-#include "gettext.h"
-#include "gettextP.h"
-
-/* @@ end of prolog @@ */
-
-#ifdef _LIBC
-/* Rename the non ISO C functions. This is required by the standard
- because some ISO C functions will require linking with this object
- file and the name space must not be polluted. */
-# define open __open
-# define close __close
-# define read __read
-# define mmap __mmap
-# define munmap __munmap
-#endif
-
-/* We need a sign, whether a new catalog was loaded, which can be associated
- with all translations. This is important if the translations are
- cached by one of GCC's features. */
-int _nl_msg_cat_cntr = 0;
-
-
-/* Load the message catalogs specified by FILENAME. If it is no valid
- message catalog do nothing. */
-void
-internal_function
-_nl_load_domain (domain_file)
- struct loaded_l10nfile *domain_file;
-{
- int fd;
- size_t size;
- struct stat st;
- struct mo_file_header *data = (struct mo_file_header *) -1;
-#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
- || defined _LIBC
- int use_mmap = 0;
-#endif
- struct loaded_domain *domain;
-
- domain_file->decided = 1;
- domain_file->data = NULL;
-
- /* If the record does not represent a valid locale the FILENAME
- might be NULL. This can happen when according to the given
- specification the locale file name is different for XPG and CEN
- syntax. */
- if (domain_file->filename == NULL)
- return;
-
- /* Try to open the addressed file. */
- fd = open (domain_file->filename, O_RDONLY);
- if (fd == -1)
- return;
-
- /* We must know about the size of the file. */
- if (fstat (fd, &st) != 0
- || (size = (size_t) st.st_size) != st.st_size
- || size < sizeof (struct mo_file_header))
- {
- /* Something went wrong. */
- close (fd);
- return;
- }
-
-#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
- || defined _LIBC
- /* Now we are ready to load the file. If mmap() is available we try
- this first. If not available or it failed we try to load it. */
- data = (struct mo_file_header *) mmap (NULL, size, PROT_READ,
- MAP_PRIVATE, fd, 0);
-
- if (data != (struct mo_file_header *) -1)
- {
- /* mmap() call was successful. */
- close (fd);
- use_mmap = 1;
- }
-#endif
-
- /* If the data is not yet available (i.e. mmap'ed) we try to load
- it manually. */
- if (data == (struct mo_file_header *) -1)
- {
- size_t to_read;
- char *read_ptr;
-
- data = (struct mo_file_header *) malloc (size);
- if (data == NULL)
- return;
-
- to_read = size;
- read_ptr = (char *) data;
- do
- {
- long int nb = (long int) read (fd, read_ptr, to_read);
- if (nb == -1)
- {
- close (fd);
- return;
- }
-
- read_ptr += nb;
- to_read -= nb;
- }
- while (to_read > 0);
-
- close (fd);
- }
-
- /* Using the magic number we can test whether it really is a message
- catalog file. */
- if (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED)
- {
- /* The magic number is wrong: not a message catalog file. */
-#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
- || defined _LIBC
- if (use_mmap)
- munmap ((caddr_t) data, size);
- else
-#endif
- free (data);
- return;
- }
-
- domain_file->data
- = (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
- if (domain_file->data == NULL)
- return;
-
- domain = (struct loaded_domain *) domain_file->data;
- domain->data = (char *) data;
-#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
- || defined _LIBC
- domain->use_mmap = use_mmap;
-#endif
- domain->mmap_size = size;
- domain->must_swap = data->magic != _MAGIC;
-
- /* Fill in the information about the available tables. */
- switch (W (domain->must_swap, data->revision))
- {
- case 0:
- domain->nstrings = W (domain->must_swap, data->nstrings);
- domain->orig_tab = (struct string_desc *)
- ((char *) data + W (domain->must_swap, data->orig_tab_offset));
- domain->trans_tab = (struct string_desc *)
- ((char *) data + W (domain->must_swap, data->trans_tab_offset));
- domain->hash_size = W (domain->must_swap, data->hash_tab_size);
- domain->hash_tab = (nls_uint32 *)
- ((char *) data + W (domain->must_swap, data->hash_tab_offset));
- break;
- default:
- /* This is an illegal revision. */
-#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
- || defined _LIBC
- if (use_mmap)
- munmap ((caddr_t) data, size);
- else
-#endif
- free (data);
- free (domain);
- domain_file->data = NULL;
- return;
- }
-
- /* Show that one domain is changed. This might make some cached
- translations invalid. */
- ++_nl_msg_cat_cntr;
-}
-
-
-#ifdef _LIBC
-void
-internal_function
-_nl_unload_domain (domain)
- struct loaded_domain *domain;
-{
- if (domain->use_mmap)
- munmap ((caddr_t) domain->data, domain->mmap_size);
- else
- free ((void *) domain->data);
-
- free (domain);
-}
-#endif
diff --git a/intl/localealias.c b/intl/localealias.c
deleted file mode 100644
index 833df0351aa..00000000000
--- a/intl/localealias.c
+++ /dev/null
@@ -1,424 +0,0 @@
-/* Handle aliases for locale names.
- Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
- Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <ctype.h>
-#include <stdio.h>
-#include <sys/types.h>
-
-#ifdef __GNUC__
-# define alloca __builtin_alloca
-# define HAVE_ALLOCA 1
-#else
-# if defined HAVE_ALLOCA_H || defined _LIBC
-# include <alloca.h>
-# else
-# ifdef _AIX
- #pragma alloca
-# else
-# ifndef alloca
-char *alloca ();
-# endif
-# endif
-# endif
-#endif
-
-#if defined STDC_HEADERS || defined _LIBC
-# include <stdlib.h>
-#else
-char *getenv ();
-# ifdef HAVE_MALLOC_H
-# include <malloc.h>
-# else
-void free ();
-# endif
-#endif
-
-#if defined HAVE_STRING_H || defined _LIBC
-# ifndef _GNU_SOURCE
-# define _GNU_SOURCE 1
-# endif
-# include <string.h>
-#else
-# include <strings.h>
-# ifndef memcpy
-# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
-# endif
-#endif
-#if !HAVE_STRCHR && !defined _LIBC
-# ifndef strchr
-# define strchr index
-# endif
-#endif
-
-#include "gettext.h"
-#include "gettextP.h"
-
-/* @@ end of prolog @@ */
-
-#ifdef _LIBC
-/* Rename the non ANSI C functions. This is required by the standard
- because some ANSI C functions will require linking with this object
- file and the name space must not be polluted. */
-# define strcasecmp __strcasecmp
-
-# define mempcpy __mempcpy
-# define HAVE_MEMPCPY 1
-
-/* We need locking here since we can be called from different places. */
-# include <bits/libc-lock.h>
-
-__libc_lock_define_initialized (static, lock);
-#endif
-
-
-/* For those loosing systems which don't have `alloca' we have to add
- some additional code emulating it. */
-#ifdef HAVE_ALLOCA
-/* Nothing has to be done. */
-# define ADD_BLOCK(list, address) /* nothing */
-# define FREE_BLOCKS(list) /* nothing */
-#else
-struct block_list
-{
- void *address;
- struct block_list *next;
-};
-# define ADD_BLOCK(list, addr) \
- do { \
- struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \
- /* If we cannot get a free block we cannot add the new element to \
- the list. */ \
- if (newp != NULL) { \
- newp->address = (addr); \
- newp->next = (list); \
- (list) = newp; \
- } \
- } while (0)
-# define FREE_BLOCKS(list) \
- do { \
- while (list != NULL) { \
- struct block_list *old = list; \
- list = list->next; \
- free (old); \
- } \
- } while (0)
-# undef alloca
-# define alloca(size) (malloc (size))
-#endif /* have alloca */
-
-
-struct alias_map
-{
- const char *alias;
- const char *value;
-};
-
-
-static char *string_space = NULL;
-static size_t string_space_act = 0;
-static size_t string_space_max = 0;
-static struct alias_map *map;
-static size_t nmap = 0;
-static size_t maxmap = 0;
-
-
-/* Prototypes for local functions. */
-static size_t read_alias_file PARAMS ((const char *fname, int fname_len))
- internal_function;
-static void extend_alias_table PARAMS ((void));
-static int alias_compare PARAMS ((const struct alias_map *map1,
- const struct alias_map *map2));
-
-
-const char *
-_nl_expand_alias (name)
- const char *name;
-{
- static const char *locale_alias_path = LOCALE_ALIAS_PATH;
- struct alias_map *retval;
- const char *result = NULL;
- size_t added;
-
-#ifdef _LIBC
- __libc_lock_lock (lock);
-#endif
-
- do
- {
- struct alias_map item;
-
- item.alias = name;
-
- if (nmap > 0)
- retval = (struct alias_map *) bsearch (&item, map, nmap,
- sizeof (struct alias_map),
- (int (*) PARAMS ((const void *,
- const void *))
- ) alias_compare);
- else
- retval = NULL;
-
- /* We really found an alias. Return the value. */
- if (retval != NULL)
- {
- result = retval->value;
- break;
- }
-
- /* Perhaps we can find another alias file. */
- added = 0;
- while (added == 0 && locale_alias_path[0] != '\0')
- {
- const char *start;
-
- while (locale_alias_path[0] == ':')
- ++locale_alias_path;
- start = locale_alias_path;
-
- while (locale_alias_path[0] != '\0' && locale_alias_path[0] != ':')
- ++locale_alias_path;
-
- if (start < locale_alias_path)
- added = read_alias_file (start, locale_alias_path - start);
- }
- }
- while (added != 0);
-
-#ifdef _LIBC
- __libc_lock_unlock (lock);
-#endif
-
- return result;
-}
-
-
-static size_t
-internal_function
-read_alias_file (fname, fname_len)
- const char *fname;
- int fname_len;
-{
-#ifndef HAVE_ALLOCA
- struct block_list *block_list = NULL;
-#endif
- FILE *fp;
- char *full_fname;
- size_t added;
- static const char aliasfile[] = "/locale.alias";
-
- full_fname = (char *) alloca (fname_len + sizeof aliasfile);
- ADD_BLOCK (block_list, full_fname);
-#ifdef HAVE_MEMPCPY
- mempcpy (mempcpy (full_fname, fname, fname_len),
- aliasfile, sizeof aliasfile);
-#else
- memcpy (full_fname, fname, fname_len);
- memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile);
-#endif
-
- fp = fopen (full_fname, "r");
- if (fp == NULL)
- {
- FREE_BLOCKS (block_list);
- return 0;
- }
-
- added = 0;
- while (!feof (fp))
- {
- /* It is a reasonable approach to use a fix buffer here because
- a) we are only interested in the first two fields
- b) these fields must be usable as file names and so must not
- be that long
- */
- unsigned char buf[BUFSIZ];
- unsigned char *alias;
- unsigned char *value;
- unsigned char *cp;
-
- if (fgets (buf, sizeof buf, fp) == NULL)
- /* EOF reached. */
- break;
-
- /* Possibly not the whole line fits into the buffer. Ignore
- the rest of the line. */
- if (strchr (buf, '\n') == NULL)
- {
- char altbuf[BUFSIZ];
- do
- if (fgets (altbuf, sizeof altbuf, fp) == NULL)
- /* Make sure the inner loop will be left. The outer loop
- will exit at the `feof' test. */
- break;
- while (strchr (altbuf, '\n') == NULL);
- }
-
- cp = buf;
- /* Ignore leading white space. */
- while (isspace (cp[0]))
- ++cp;
-
- /* A leading '#' signals a comment line. */
- if (cp[0] != '\0' && cp[0] != '#')
- {
- alias = cp++;
- while (cp[0] != '\0' && !isspace (cp[0]))
- ++cp;
- /* Terminate alias name. */
- if (cp[0] != '\0')
- *cp++ = '\0';
-
- /* Now look for the beginning of the value. */
- while (isspace (cp[0]))
- ++cp;
-
- if (cp[0] != '\0')
- {
- size_t alias_len;
- size_t value_len;
-
- value = cp++;
- while (cp[0] != '\0' && !isspace (cp[0]))
- ++cp;
- /* Terminate value. */
- if (cp[0] == '\n')
- {
- /* This has to be done to make the following test
- for the end of line possible. We are looking for
- the terminating '\n' which do not overwrite here. */
- *cp++ = '\0';
- *cp = '\n';
- }
- else if (cp[0] != '\0')
- *cp++ = '\0';
-
- if (nmap >= maxmap)
- extend_alias_table ();
-
- alias_len = strlen (alias) + 1;
- value_len = strlen (value) + 1;
-
- if (string_space_act + alias_len + value_len > string_space_max)
- {
- /* Increase size of memory pool. */
- size_t new_size = (string_space_max
- + (alias_len + value_len > 1024
- ? alias_len + value_len : 1024));
- char *new_pool = (char *) realloc (string_space, new_size);
- if (new_pool == NULL)
- {
- FREE_BLOCKS (block_list);
- return added;
- }
- string_space = new_pool;
- string_space_max = new_size;
- }
-
- map[nmap].alias = memcpy (&string_space[string_space_act],
- alias, alias_len);
- string_space_act += alias_len;
-
- map[nmap].value = memcpy (&string_space[string_space_act],
- value, value_len);
- string_space_act += value_len;
-
- ++nmap;
- ++added;
- }
- }
- }
-
- /* Should we test for ferror()? I think we have to silently ignore
- errors. --drepper */
- fclose (fp);
-
- if (added > 0)
- qsort (map, nmap, sizeof (struct alias_map),
- (int (*) PARAMS ((const void *, const void *))) alias_compare);
-
- FREE_BLOCKS (block_list);
- return added;
-}
-
-
-static void
-extend_alias_table ()
-{
- size_t new_size;
- struct alias_map *new_map;
-
- new_size = maxmap == 0 ? 100 : 2 * maxmap;
- new_map = (struct alias_map *) realloc (map, (new_size
- * sizeof (struct alias_map)));
- if (new_map == NULL)
- /* Simply don't extend: we don't have any more core. */
- return;
-
- map = new_map;
- maxmap = new_size;
-}
-
-
-#ifdef _LIBC
-static void __attribute__ ((unused))
-free_mem (void)
-{
- if (string_space != NULL)
- free (string_space);
- if (map != NULL)
- free (map);
-}
-text_set_element (__libc_subfreeres, free_mem);
-#endif
-
-
-static int
-alias_compare (map1, map2)
- const struct alias_map *map1;
- const struct alias_map *map2;
-{
-#if defined _LIBC || defined HAVE_STRCASECMP
- return strcasecmp (map1->alias, map2->alias);
-#else
- const unsigned char *p1 = (const unsigned char *) map1->alias;
- const unsigned char *p2 = (const unsigned char *) map2->alias;
- unsigned char c1, c2;
-
- if (p1 == p2)
- return 0;
-
- do
- {
- /* I know this seems to be odd but the tolower() function in
- some systems libc cannot handle nonalpha characters. */
- c1 = isupper (*p1) ? tolower (*p1) : *p1;
- c2 = isupper (*p2) ? tolower (*p2) : *p2;
- if (c1 == '\0')
- break;
- ++p1;
- ++p2;
- }
- while (c1 == c2);
-
- return c1 - c2;
-#endif
-}
diff --git a/intl/po2tbl.sed.in b/intl/po2tbl.sed.in
deleted file mode 100644
index ebb32f29353..00000000000
--- a/intl/po2tbl.sed.in
+++ /dev/null
@@ -1,102 +0,0 @@
-# po2tbl.sed - Convert Uniforum style .po file to lookup table for catgets
-# Copyright (C) 1995 Free Software Foundation, Inc.
-# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
-#
-1 {
- i\
-/* Automatically generated by po2tbl.sed from @PACKAGE NAME@.pot. */\
-\
-#if HAVE_CONFIG_H\
-# include <config.h>\
-#endif\
-\
-#include "libgettext.h"\
-\
-const struct _msg_ent _msg_tbl[] = {
- h
- s/.*/0/
- x
-}
-#
-# Write msgid entries in C array form.
-#
-/^msgid/ {
- s/msgid[ ]*\(".*"\)/ {\1/
- tb
-# Append the next line
- :b
- N
-# Look whether second part is continuation line.
- s/\(.*\)"\(\n\)"\(.*"\)/\1\2\3/
-# Yes, then branch.
- ta
-# Because we assume that the input file correctly formed the line
-# just read cannot be again be a msgid line. So it's safe to ignore
-# it.
- s/\(.*\)\n.*/\1/
- bc
-# We found a continuation line. But before printing insert '\'.
- :a
- s/\(.*\)\(\n.*\)/\1\\\2/
- P
-# We cannot use D here.
- s/.*\n\(.*\)/\1/
-# Some buggy seds do not clear the `successful substitution since last ``t'''
-# flag on `N', so we do a `t' here to clear it.
- tb
-# Not reached
- :c
- x
-# The following nice solution is by
-# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
- td
-# Increment a decimal number in pattern space.
-# First hide trailing `9' digits.
- :d
- s/9\(_*\)$/_\1/
- td
-# Assure at least one digit is available.
- s/^\(_*\)$/0\1/
-# Increment the last digit.
- s/8\(_*\)$/9\1/
- s/7\(_*\)$/8\1/
- s/6\(_*\)$/7\1/
- s/5\(_*\)$/6\1/
- s/4\(_*\)$/5\1/
- s/3\(_*\)$/4\1/
- s/2\(_*\)$/3\1/
- s/1\(_*\)$/2\1/
- s/0\(_*\)$/1\1/
-# Convert the hidden `9' digits to `0's.
- s/_/0/g
- x
- G
- s/\(.*\)\n\([0-9]*\)/\1, \2},/
- s/\(.*\)"$/\1/
- p
-}
-#
-# Last line.
-#
-$ {
- i\
-};\
-
- g
- s/0*\(.*\)/int _msg_tbl_length = \1;/p
-}
-d
diff --git a/intl/textdomain.c b/intl/textdomain.c
deleted file mode 100644
index 9cec75cb5e3..00000000000
--- a/intl/textdomain.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/* Implementation of the textdomain(3) function.
- Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
- Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if defined STDC_HEADERS || defined _LIBC
-# include <stdlib.h>
-#endif
-
-#if defined STDC_HEADERS || defined HAVE_STRING_H || defined _LIBC
-# include <string.h>
-#else
-# include <strings.h>
-# ifndef memcpy
-# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
-# endif
-#endif
-
-#ifdef _LIBC
-# include <libintl.h>
-#else
-# include "libgettext.h"
-#endif
-
-/* @@ end of prolog @@ */
-
-/* Name of the default text domain. */
-extern const char _nl_default_default_domain[];
-
-/* Default text domain in which entries for gettext(3) are to be found. */
-extern const char *_nl_current_default_domain;
-
-
-/* Names for the libintl functions are a problem. They must not clash
- with existing names and they should follow ANSI C. But this source
- code is also used in GNU C Library where the names have a __
- prefix. So we have to make a difference here. */
-#ifdef _LIBC
-# define TEXTDOMAIN __textdomain
-# ifndef strdup
-# define strdup(str) __strdup (str)
-# endif
-#else
-# define TEXTDOMAIN textdomain__
-#endif
-
-/* Set the current default message catalog to DOMAINNAME.
- If DOMAINNAME is null, return the current default.
- If DOMAINNAME is "", reset to the default of "messages". */
-char *
-TEXTDOMAIN (domainname)
- const char *domainname;
-{
- char *old;
-
- /* A NULL pointer requests the current setting. */
- if (domainname == NULL)
- return (char *) _nl_current_default_domain;
-
- old = (char *) _nl_current_default_domain;
-
- /* If domain name is the null string set to default domain "messages". */
- if (domainname[0] == '\0'
- || strcmp (domainname, _nl_default_default_domain) == 0)
- _nl_current_default_domain = _nl_default_default_domain;
- else
- {
- /* If the following malloc fails `_nl_current_default_domain'
- will be NULL. This value will be returned and so signals we
- are out of core. */
-#if defined _LIBC || defined HAVE_STRDUP
- _nl_current_default_domain = strdup (domainname);
-#else
- size_t len = strlen (domainname) + 1;
- char *cp = (char *) malloc (len);
- if (cp != NULL)
- memcpy (cp, domainname, len);
- _nl_current_default_domain = cp;
-#endif
- }
-
- if (old != _nl_default_default_domain)
- free (old);
-
- return (char *) _nl_current_default_domain;
-}
-
-#ifdef _LIBC
-/* Alias for function name in GNU C Library. */
-weak_alias (__textdomain, textdomain);
-#endif
diff --git a/intl/xopen-msg.sed b/intl/xopen-msg.sed
deleted file mode 100644
index 1d257d3e0b9..00000000000
--- a/intl/xopen-msg.sed
+++ /dev/null
@@ -1,104 +0,0 @@
-# po2msg.sed - Convert Uniforum style .po file to X/Open style .msg file
-# Copyright 1995, 2002 Free Software Foundation, Inc.
-# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
-#
-#
-# The first directive in the .msg should be the definition of the
-# message set number. We use always set number 1.
-#
-1 {
- i\
-$set 1 # Automatically created by po2msg.sed
- h
- s/.*/0/
- x
-}
-#
-# We copy all comments into the .msg file. Perhaps they can help.
-#
-/^#/ s/^#[ ]*/$ /p
-#
-# We copy the original message as a comment into the .msg file.
-#
-/^msgid/ {
-# Does not work now
-# /"$/! {
-# s/\\$//
-# s/$/ ... (more lines following)"/
-# }
- s/^msgid[ ]*"\(.*\)"$/$ Original Message: \1/
- p
-}
-#
-# The .msg file contains, other than the .po file, only the translations
-# but each given a unique ID. Starting from 1 and incrementing by 1 for
-# each message we assign them to the messages.
-# It is important that the .po file used to generate the cat-id-tbl.c file
-# (with po-to-tbl) is the same as the one used here. (At least the order
-# of declarations must not be changed.)
-#
-/^msgstr/ {
- s/msgstr[ ]*"\(.*\)"/\1/
- x
-# The following nice solution is by
-# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
- td
-# Increment a decimal number in pattern space.
-# First hide trailing `9' digits.
- :d
- s/9\(_*\)$/_\1/
- td
-# Assure at least one digit is available.
- s/^\(_*\)$/0\1/
-# Increment the last digit.
- s/8\(_*\)$/9\1/
- s/7\(_*\)$/8\1/
- s/6\(_*\)$/7\1/
- s/5\(_*\)$/6\1/
- s/4\(_*\)$/5\1/
- s/3\(_*\)$/4\1/
- s/2\(_*\)$/3\1/
- s/1\(_*\)$/2\1/
- s/0\(_*\)$/1\1/
-# Convert the hidden `9' digits to `0's.
- s/_/0/g
- x
-# Bring the line in the format `<number> <message>'
- G
- s/^[^\n]*$/& /
- s/\(.*\)\n\([0-9]*\)/\2 \1/
-# Clear flag from last substitution.
- tb
-# Append the next line.
- :b
- N
-# Look whether second part is a continuation line.
- s/\(.*\n\)"\(.*\)"/\1\2/
-# Yes, then branch.
- ta
- P
- D
-# Note that `D' includes a jump to the start!!
-# We found a continuation line. But before printing insert '\'.
- :a
- s/\(.*\)\(\n.*\)/\1\\\2/
- P
-# We cannot use the sed command `D' here
- s/.*\n\(.*\)/\1/
- tb
-}
-d
diff --git a/readline/CHANGELOG b/readline/CHANGELOG
index 350defafe1b..b6499c3b716 100644
--- a/readline/CHANGELOG
+++ b/readline/CHANGELOG
@@ -697,3 +697,224 @@ doc/Makefile.in
- new maybe-clean target that removes the generated documentation if
the build directory differs from the source directory
- distclean target now depends on maybe-clean
+
+ 7/17
+ ----
+[readline-4.3 released]
+
+ 7/18
+ ----
+shlib/Makefile.in
+ - fix bad dependency: text.so: terminal.c, make it depend on text.c
+
+ 8/7
+ ---
+support/shlib-install
+ - break `linux' out into its own stanza: it seems that linux
+ distributions are all moving to the following scheme:
+
+ libreadline.so.4.3 installed version
+ libreadline.so.4 -> libreadline.so.4.3 symlink
+ libreadline.so -> libreadline.so.4 symlink
+
+ 10/29
+ -----
+support/shlib-install
+ - change INSTALL_LINK[12] to use `&&' instead of `;' so it only
+ tries the link if the cd succeeds; put ${echo} in there, too
+ - use $LN instead of `ln -s' so it works on machines without symlinks
+ - change special linux stanza to use cd before ln also
+ - change to use $INSTALL_LINK1 and $INSTALL_LINK2 appropriately
+ instead of explicit commands in various stanzas
+
+ 2/1
+ ---
+config.h.in
+ - add HAVE_MBRTOWC and HAVE_MBRLEN
+ - add NO_MULTIBYTE_SUPPORT for new configure argument
+ - add STDC_HEADERS
+
+configure.in
+ - new argument --enable-multibyte (enabled by default), allows
+ multibyte support to be turned off even on systems that support it
+ - add check for ansi stdc headers with call to AC_HEADER_STDC
+
+ 2/3
+ ---
+configure.in
+ - add call to BASH_FUNC_CTYPE_NONASCII
+
+config.h.in
+ - add CTYPE_NON_ASCII
+
+ 2/20
+ ----
+
+doc/manvers.texinfo
+ - renamed to version.texi to match other GNU software
+ - UPDATE-MONTH variable is now `UPDATED-MONTH'
+
+doc/{hist,rlman,rluserman}.texinfo
+ - include version.texi
+
+doc/{rltech,rluser,hstech,hsuser}.texi
+ - changed the suffix from `texinfo' to `texi'
+
+doc/Makefile.in
+ - made appropriate changes for {{rl,hs}tech,{rl,hs}user}.texi
+
+doc/{rlman,rluserman}.texinfo
+ - changed the suffix from `texinfo' to `texi'
+
+doc/hist.texinfo
+ - renamed to history.texi to be more consistent
+
+ 6/11
+ ----
+shlib/Makefile.in
+ - have configure substitute value of `@LDFLAGS@' into the assignment
+ to SHLIB_XLDFLAGS
+
+ 6/16
+ ----
+configure.in
+ - readline and history libraries are now at version 5.0
+
+ 8/18
+ ----
+support/shlib-install
+ - support for FreeBSD-gnu (from Robert Millan)
+
+ 12/4
+ ----
+Makefile.in
+ - add variables for localedir and the PACKAGE_* variables, auto-set
+ by configure
+
+ 12/9
+ ----
+Makefile.in
+ - use mkinstalldirs instead of mkdirs
+
+ 4/22
+ ----
+Makefile.in
+ - separate doc install/uninstall out into two new targets:
+ install-doc and uninstall-doc
+ - make install-doc and uninstall-doc prerequisites of appropriate
+ install and uninstall targets
+
+examples/rl-fgets.c
+ - new example from Harold Levy that wraps fgets replacement functions
+ that call readline in a shared library that can be interposed with
+ LD_PRELOAD
+
+ 7/27
+ ----
+[readline-5.0 released]
+
+ 11/15
+ -----
+examples/rlfe/{ChangeLog,Makefile.in,README,config.h.in,configure,configure.in,extern.h,os.h,pty.c,rlfe.c,screen.h}
+ - new version of rlfe, rlfe-0.4, from Per Bothner; now a standalone
+ application
+
+ 11/16
+ -----
+shlib/Makefile.in
+ - substitute TERMCAP_LIB in from configure
+
+configure.in
+ - if SHLIB_LIBS doesn't include a termcap library (curses, ncurses,
+ termcap, termlib), append the value of $TERMCAP_LIB to it
+
+ 11/30
+ -----
+configure.in
+ - take out change from 11/16; it doesn't work for some systems (e.g.,
+ SunOS 4.x and Solaris 2.6)
+ - add support for --enable-purify configure argument
+ - pass TERMCAP_LIB in environment when calling shobj-conf
+
+examples/Makefile.in
+ - add support for building examples with purify
+
+ 1/23/2005
+ ---------
+configure.in
+ - set BUILD_DIR to contain backslashes to escape any spaces in the
+ directory name -- this is what make will accept in targets and
+ prerequisites, so it's better than trying to use double quotes
+
+ 2/25
+ ----
+configure.in
+ - change check for sys/ptem.h to include sys/stream.h if present, to
+ avoid the `present but cannot be compiled' messages on Solaris and
+ SVR4.2 (does anyone still use SVR4.2?)
+
+ 5/7
+ ---
+configure.in
+ - add cross-compiling support from the bash configure.in, which cygwin
+ and mingw have apparently adopted
+ - add check for pwd.h, fcntl.h
+ - add checks for fcntl, kill system calls
+ - add checks for getpw{ent,nam,uid} C library functions
+ - pass a compile-time option through to Makefiles if cross-compiling
+
+config.h.in
+ - add HAVE_PWD_H for <pwd.h>, HAVE_FCNTL_H for <fcntl.h>
+ - add HAVE_FCNTL, HAVE_KILL for respective system calls
+ - add HAVE_GETPW{ENT,NAM,UID} for passwd functions
+
+Makefile.in,shlib/Makefile.in
+ - @CROSS_COMPILE@ is substituted into DEFS (equal to -DCROSS_COMPILING
+ if bash is being cross-compiled)
+
+ 8/2
+ ---
+examples/Makefile.in
+ - use $(READLINE_LIB) instead of -lreadline to get around MacOS X 10.4's
+ preference for (incompatible) shared libraries over static libraries
+ in the load path
+
+ 8/11
+ ----
+support/shobj-conf
+ - new variable: SHLIB_LIBPREF, prefix for shared library name (defaults
+ to `lib'
+ - new variable: SHLIB_DLLVERSION, used on Cygwin to set the library
+ version number
+ - new variable: SHLIB_DOT, separator character between library name and
+ suffix and version information (defaults to `.')
+ - new stanza for cygwin to generate windows-compatible dll
+
+support/shlib-install
+ - add new option `-b bindir' for systems like cygwin/windows that
+ require it
+ - new stanza for cygwin that installs a dll into $bindir and an implied
+ link library into $libdir
+
+configure.in
+ - substitute new variables from shobj-conf
+
+shlib/Makefile.in
+ - substitute bindir, SHLIB_DOT, SHLIB_LIBPREF, SHLIB_DLLVERSION from
+ configure
+ - pass `-b $(bindir)' to shlib-install for install and uninstall targets
+ - library names now use $SHLIB_LIBPREF and $SHLIB_DOT
+
+INSTALL,README
+ - document new SHLIB_DOT, SHLIB_LIBPREF, and SHLIB_DLLVERSION variables
+
+ 10/4
+ ----
+[readline-5.1-beta1 frozen]
+
+ 12/1
+ ----
+configure.in
+ - changed release status to `release'
+
+[readline-5.1 frozen]
diff --git a/readline/CHANGES b/readline/CHANGES
index bc9fe94e992..1ba0c1256df 100644
--- a/readline/CHANGES
+++ b/readline/CHANGES
@@ -1,3 +1,312 @@
+This document details the changes between this version, readline-5.1,
+and the previous version, readline-5.0.
+
+1. Changes to Readline
+
+a. Fixed a bug that caused multiliine prompts to be wrapped and displayed
+ incorrectly.
+
+b. Fixed a bug that caused ^P/^N in emacs mode to fail to display the current
+ line correctly.
+
+c. Fixed a problem in computing the number of invisible characters on the first
+ line of a prompt whose length exceeds the screen width.
+
+d. Fixed vi-mode searching so that failure preserves the current line rather
+ than the last line in the history list.
+
+e. Fixed the vi-mode `~' command (change-case) to have the correct behavior at
+ end-of-line when manipulating multibyte characters.
+
+f. Fixed the vi-mode `r' command (change-char) to have the correct behavior at
+ end-of-line when manipulating multibyte characters.
+
+g. Fixed multiple bugs in the redisplay of multibyte characters: displaying
+ prompts longer than the screen width containing multibyte characters,
+
+h. Fix the calculation of the number of physical characters in the prompt
+ string when it contains multibyte characters.
+
+i. A non-zero value for the `rl_complete_suppress_append' variable now causes
+ no `/' to be appended to a directory name.
+
+j. Fixed forward-word and backward-word to work when words contained
+ multibyte characters.
+
+k. Fixed a bug in finding the delimiter of a `?' substring when performing
+ history expansion in a locale that supports multibyte characters.
+
+l. Fixed a memory leak caused by not freeing the timestamp in a history entry.
+
+m. Fixed a bug that caused "\M-x" style key bindings to not obey the setting
+ of the `convert-meta' variable.
+
+n. Fixed saving and restoring primary prompt when prompting for incremental
+ and non-incremental searches; search prompts now display multibyte
+ characters correctly.
+
+o. Fixed a bug that caused keys originally bound to self-insert but shadowed
+ by a multi-character key sequence to not be inserted.
+
+p. Fixed code so rl_prep_term_function and rl_deprep_term_function aren't
+ dereferenced if NULL (matching the documentation).
+
+q. Extensive changes to readline to add enough state so that commands
+ requiring additional characters (searches, multi-key sequences, numeric
+ arguments, commands requiring an additional specifier character like
+ vi-mode change-char, etc.) work without synchronously waiting for
+ additional input.
+
+r. Lots of changes so readline builds and runs on MinGW.
+
+s. Readline no longer tries to modify the terminal settings when running in
+ callback mode.
+
+t. The Readline display code no longer sets the location of the last invisible
+ character in the prompt if the \[\] sequence is empty.
+
+u. The `change-case' command now correctly changes the case of multibyte
+ characters.
+
+v. Changes to the shared library construction scripts to deal with Windows
+ DLL naming conventions for Cygwin.
+
+w. Fixed the redisplay code to avoid core dumps resulting from a poorly-timed
+ SIGWINCH.
+
+x. Fixed the non-incremental search code in vi mode to dispose of any current
+ undo list when copying a line from the history into the current editing
+ buffer.
+
+y. Fixed a bug that caused reversing the incremental search direction to
+ not work correctly.
+
+z. Fixed the vi-mode `U' command to only undo up to the first time insert mode
+ was entered, as Posix specifies.
+
+aa. Fixed a bug in the vi-mode `r' command that left the cursor in the wrong
+ place.
+
+bb. Fixed a redisplay bug caused by moving the cursor vertically to a line
+ with invisible characters in the prompt in a multibyte locale.
+
+cc. Fixed a bug that could cause the terminal special chars to be bound in the
+ wrong keymap in vi mode.
+
+2. New Features in Readline
+
+a. The key sequence sent by the keypad `delete' key is now automatically
+ bound to delete-char.
+
+b. A negative argument to menu-complete now cycles backward through the
+ completion list.
+
+c. A new bindable readline variable: bind-tty-special-chars. If non-zero,
+ readline will bind the terminal special characters to their readline
+ equivalents when it's called (on by default).
+
+d. New bindable command: vi-rubout. Saves deleted text for possible
+ reinsertion, as with any vi-mode `text modification' command; `X' is bound
+ to this in vi command mode.
+
+e. If the rl_completion_query_items is set to a value < 0, readline never
+ asks the user whether or not to view the possible completions.
+
+f. The `C-w' binding in incremental search now understands multibyte
+ characters.
+
+g. New application-callable auxiliary function, rl_variable_value, returns
+ a string corresponding to a readline variable's value.
+
+h. When parsing inputrc files and variable binding commands, the parser
+ strips trailing whitespace from values assigned to boolean variables
+ before checking them.
+
+i. A new external application-controllable variable that allows the LINES
+ and COLUMNS environment variables to set the window size regardless of
+ what the kernel returns.
+
+-------------------------------------------------------------------------------
+This document details the changes between this version, readline-5.0,
+and the previous version, readline-4.3.
+
+1. Changes to Readline
+
+a. Fixes to avoid core dumps because of null pointer references in the
+ multibyte character code.
+
+b. Fix to avoid infinite recursion caused by certain key combinations.
+
+c. Fixed a bug that caused the vi-mode `last command' to be set incorrectly.
+
+d. Readline no longer tries to read ahead more than one line of input, even
+ when more is available.
+
+e. Fixed the code that adjusts the point to not mishandle null wide
+ characters.
+
+f. Fixed a bug in the history expansion `g' modifier that caused it to skip
+ every other match.
+
+g. Fixed a bug that caused the prompt to overwrite previous output when the
+ output doesn't contain a newline and the locale supports multibyte
+ characters. This same change fixes the problem of readline redisplay
+ slowing down dramatically as the line gets longer in multibyte locales.
+
+h. History traversal with arrow keys in vi insertion mode causes the cursor
+ to be placed at the end of the new line, like in emacs mode.
+
+i. The locale initialization code does a better job of using the right
+ precedence and defaulting when checking the appropriate environment
+ variables.
+
+j. Fixed the history word tokenizer to handle <( and >( better when used as
+ part of bash.
+
+k. The overwrite mode code received several bug fixes to improve undo.
+
+l. Many speedups to the multibyte character redisplay code.
+
+m. The callback character reading interface should not hang waiting to read
+ keyboard input.
+
+n. Fixed a bug with redoing vi-mode `s' command.
+
+o. The code that initializes the terminal tracks changes made to the terminal
+ special characters with stty(1) (or equivalent), so that these changes
+ are reflected in the readline bindings. New application-callable function
+ to make it work: rl_tty_unset_default_bindings().
+
+p. Fixed a bug that could cause garbage to be inserted in the buffer when
+ changing character case in vi mode when using a multibyte locale.
+
+q. Fixed a bug in the redisplay code that caused problems on systems
+ supporting multibyte characters when moving between history lines when the
+ new line has more glyphs but fewer bytes.
+
+r. Undo and redo now work better after exiting vi insertion mode.
+
+s. Make sure system calls are restarted after a SIGWINCH is received using
+ SA_RESTART.
+
+t. Improvements to the code that displays possible completions when using
+ multibyte characters.
+
+u. Fixed a problem when parsing nested if statements in inputrc files.
+
+v. The completer now takes multibyte characters into account when looking for
+ quoted substrings on which to perform completion.
+
+w. The history search functions now perform better bounds checking on the
+ history list.
+
+x. Change to history expansion functions to treat `^' as equivalent to word
+ one, as the documention states.
+
+y. Some changes to the display code to improve display and redisplay of
+ multibyte characters.
+
+z. Changes to speed up the multibyte character redisplay code.
+
+aa. Fixed a bug in the vi-mode `E' command that caused it to skip over the
+ last character of a word if invoked while point was on the word's
+ next-to-last character.
+
+bb. Fixed a bug that could cause incorrect filename quoting when
+ case-insensitive completion was enabled and the word being completed
+ contained backslashes quoting word break characters.
+
+cc. Fixed a bug in redisplay triggered when the prompt string contains
+ invisible characters.
+
+dd. Fixed some display (and other) bugs encountered in multibyte locales
+ when a non-ascii character was the last character on a line.
+
+ee. Fixed some display bugs caused by multibyte characters in prompt strings.
+
+ff. Fixed a problem with history expansion caused by non-whitespace characters
+ used as history word delimiters.
+
+gg. Fixed a problem that could cause readline to refer to freed memory when
+ moving between history lines while doing searches.
+
+hh. Improvements to the code that expands and displays prompt strings
+ containing multibyte characters.
+
+ii. Fixed a problem with vi-mode not correctly remembering the numeric argument
+ to the last `c'hange command for later use with `.'.
+
+jj. Fixed a bug in vi-mode that caused multi-digit count arguments to work
+ incorrectly.
+
+kk. Fixed a problem in vi-mode that caused the last text modification command
+ to not be remembered across different command lines.
+
+ll. Fixed problems with changing characters and changing case at the end of
+ the line.
+
+mm. Fixed a problem with readline saving the contents of the current line
+ before beginning a non-interactive search.
+
+nn. Fixed a problem with EOF detection when using rl_event_hook.
+
+oo. Fixed a problem with the vi mode `p' and `P' commands ignoring numeric
+ arguments.
+
+2. New Features in Readline
+
+a. History expansion has a new `a' modifier equivalent to the `g' modifier
+ for compatibility with the BSD csh.
+
+b. History expansion has a new `G' modifier equivalent to the BSD csh `g'
+ modifier, which performs a substitution once per word.
+
+c. All non-incremental search operations may now undo the operation of
+ replacing the current line with the history line.
+
+d. The text inserted by an `a' command in vi mode can be reinserted with
+ `.'.
+
+e. New bindable variable, `show-all-if-unmodified'. If set, the readline
+ completer will list possible completions immediately if there is more
+ than one completion and partial completion cannot be performed.
+
+f. There is a new application-callable `free_history_entry()' function.
+
+g. History list entries now contain timestamp information; the history file
+ functions know how to read and write timestamp information associated
+ with each entry.
+
+h. Four new key binding functions have been added:
+
+ rl_bind_key_if_unbound()
+ rl_bind_key_if_unbound_in_map()
+ rl_bind_keyseq_if_unbound()
+ rl_bind_keyseq_if_unbound_in_map()
+
+i. New application variable, rl_completion_quote_character, set to any
+ quote character readline finds before it calls the application completion
+ function.
+
+j. New application variable, rl_completion_suppress_quote, settable by an
+ application completion function. If set to non-zero, readline does not
+ attempt to append a closing quote to a completed word.
+
+k. New application variable, rl_completion_found_quote, set to a non-zero
+ value if readline determines that the word to be completed is quoted.
+ Set before readline calls any application completion function.
+
+l. New function hook, rl_completion_word_break_hook, called when readline
+ needs to break a line into words when completion is attempted. Allows
+ the word break characters to vary based on position in the line.
+
+m. New bindable command: unix-filename-rubout. Does the same thing as
+ unix-word-rubout, but adds `/' to the set of word delimiters.
+
+n. When listing completions, directories have a `/' appended if the
+ `mark-directories' option has been enabled.
+
+-------------------------------------------------------------------------------
This document details the changes between this version, readline-4.3,
and the previous version, readline-4.2a.
diff --git a/readline/ChangeLog.gdb b/readline/ChangeLog.gdb
index e95619318ea..c35742655eb 100644
--- a/readline/ChangeLog.gdb
+++ b/readline/ChangeLog.gdb
@@ -1,3 +1,7 @@
+2006-04-24 Daniel Jacobowitz <dan@codesourcery.com>
+
+ Imported readline 5.1, and upstream patches 001-004.
+
2006-03-21 Denis Pilat <denis.pilat@st.com>
* histfile.c (read_history_range): Remove '\r' character from
diff --git a/readline/INSTALL b/readline/INSTALL
index adb27a9f222..1a73c779000 100644
--- a/readline/INSTALL
+++ b/readline/INSTALL
@@ -1,7 +1,7 @@
Basic Installation
==================
-These are installation instructions for Readline-4.3.
+These are installation instructions for Readline-5.1.
The simplest way to compile readline is:
@@ -238,6 +238,9 @@ SHLIB_XLDFLAGS Additional flags to pass to SHOBJ_LD for shared library
SHLIB_LIBS Any additional libraries that shared libraries should be
linked against when they are created.
+SHLIB_LIBPREF The prefix to use when generating the filename of the shared
+ library. The default is `lib'; Cygwin uses `cyg'.
+
SHLIB_LIBSUFF The suffix to add to `libreadline' and `libhistory' when
generating the filename of the shared library. Many systems
use `so'; HP-UX uses `sl'.
@@ -254,6 +257,17 @@ SHLIB_LIBVERSION The string to append to the filename to indicate the version
numbers; use `$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' on those systems.
Other Unix versions use different schemes.
+SHLIB_DLLVERSION The version number for shared libraries that determines API
+ compatibility between readline versions and the underlying
+ system. Used only on Cygwin. Defaults to $SHLIB_MAJOR, but
+ can be overridden at configuration time by defining DLLVERSION
+ in the environment.
+
+SHLIB_DOT The character used to separate the name of the shared library
+ from the suffix and version information. The default is `.';
+ systems like Cygwin which don't separate version information
+ from the library name should set this to the empty string.
+
SHLIB_STATUS Set this to `supported' when you have defined the other
necessary variables. Make uses this to determine whether
or not shared library creation should be attempted. If
diff --git a/readline/MANIFEST b/readline/MANIFEST
index 1507eda6f94..b288fb6f80a 100644
--- a/readline/MANIFEST
+++ b/readline/MANIFEST
@@ -3,6 +3,7 @@
#
doc d
examples d
+examples/rlfe d
support d
shlib d
COPYING f
@@ -11,6 +12,7 @@ MANIFEST f
INSTALL f
CHANGELOG f
CHANGES f
+NEWS f
USAGE f
aclocal.m4 f
config.h.in f
@@ -74,23 +76,26 @@ histfile.c f
histsearch.c f
shlib/Makefile.in f
support/config.guess f
+support/config.rpath f
support/config.sub f
support/install.sh f
support/mkdirs f
support/mkdist f
+support/mkinstalldirs f
support/shobj-conf f
support/shlib-install f
support/wcwidth.c f
doc/Makefile.in f
doc/texinfo.tex f
-doc/manvers.texinfo f
-doc/rlman.texinfo f
-doc/rltech.texinfo f
-doc/rluser.texinfo f
-doc/rluserman.texinfo f
-doc/hist.texinfo f
-doc/hstech.texinfo f
-doc/hsuser.texinfo f
+doc/version.texi f
+doc/fdl.texi f
+doc/rlman.texi f
+doc/rltech.texi f
+doc/rluser.texi f
+doc/rluserman.texi f
+doc/history.texi f
+doc/hstech.texi f
+doc/hsuser.texi f
doc/readline.3 f
doc/history.3 f
doc/texi2dvi f
@@ -100,13 +105,25 @@ examples/excallback.c f
examples/fileman.c f
examples/manexamp.c f
examples/readlinebuf.h f
+examples/rl-fgets.c f
examples/rlcat.c f
-examples/rlfe.c f
examples/rltest.c f
examples/rl.c f
+examples/rlptytest.c f
examples/rlversion.c f
examples/histexamp.c f
examples/Inputrc f
+examples/rlfe/ChangeLog f
+examples/rlfe/Makefile.in f
+examples/rlfe/README f
+examples/rlfe/config.h.in f
+examples/rlfe/configure f
+examples/rlfe/configure.in f
+examples/rlfe/extern.h f
+examples/rlfe/os.h f
+examples/rlfe/pty.c f
+examples/rlfe/rlfe.c f
+examples/rlfe/screen.h f
# formatted documentation, from MANIFEST.doc
doc/readline.ps f
doc/history.ps f
@@ -124,3 +141,6 @@ doc/readline.0 f
doc/history.0 f
doc/readline_3.ps f
doc/history_3.ps f
+doc/history.pdf f
+doc/readline.pdf f
+doc/rluserman.pdf f
diff --git a/readline/Makefile.in b/readline/Makefile.in
index f039ec627f4..2dbd4bb9589 100644
--- a/readline/Makefile.in
+++ b/readline/Makefile.in
@@ -1,6 +1,6 @@
## -*- text -*- ##
# Master Makefile for the GNU readline library.
-# Copyright (C) 1994, 1998 Free Software Foundation, Inc.
+# Copyright (C) 1994-2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,6 +18,14 @@
RL_LIBRARY_VERSION = @LIBVERSION@
RL_LIBRARY_NAME = readline
+PACKAGE = @PACKAGE_NAME@
+VERSION = @PACKAGE_VERSION@
+
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
@@ -35,6 +43,8 @@ RM = rm -f
CP = cp
MV = mv
+PURIFY = @PURIFY@
+
@SET_MAKE@
SHELL = @MAKE_SHELL@
@@ -45,6 +55,8 @@ bindir = @bindir@
libdir = @libdir@
mandir = @mandir@
includedir = @includedir@
+datadir = @datadir@
+localedir = $(datadir)/locale
infodir = @infodir@
@@ -61,7 +73,7 @@ CFLAGS = @CFLAGS@
LOCAL_CFLAGS = @LOCAL_CFLAGS@ -DRL_LIBRARY_VERSION='"$(RL_LIBRARY_VERSION)"'
CPPFLAGS = @CPPFLAGS@
-DEFS = @DEFS@
+DEFS = @DEFS@ @CROSS_COMPILE@
LOCAL_DEFS = @LOCAL_DEFS@
TERMCAP_LIB = @TERMCAP_LIB@
@@ -211,7 +223,7 @@ uninstall-headers:
maybe-uninstall-headers: uninstall-headers
-## CYGNUS LOCAL
+## GDB LOCAL
## Don't mess with people's installed readline's.
## This tries to install this version of readline over whatever
## version is already installed on the system (which could be a
@@ -223,38 +235,42 @@ install:
#install: $(INSTALL_TARGETS)
-install-static: installdirs $(STATIC_LIBS) install-headers
+install-static: installdirs $(STATIC_LIBS) install-headers install-doc
-$(MV) $(DESTDIR)$(libdir)/libreadline.a $(DESTDIR)$(libdir)/libreadline.old
$(INSTALL_DATA) libreadline.a $(DESTDIR)$(libdir)/libreadline.a
-test -n "$(RANLIB)" && $(RANLIB) $(DESTDIR)$(libdir)/libreadline.a
-$(MV) $(DESTDIR)$(libdir)/libhistory.a $(DESTDIR)$(libdir)/libhistory.old
$(INSTALL_DATA) libhistory.a $(DESTDIR)$(libdir)/libhistory.a
-test -n "$(RANLIB)" && $(RANLIB) $(DESTDIR)$(libdir)/libhistory.a
- -( if test -d doc ; then \
- cd doc && \
- ${MAKE} ${MFLAGS} infodir=$(infodir) DESTDIR=${DESTDIR} install; \
- fi )
-installdirs: $(srcdir)/support/mkdirs
- -$(SHELL) $(srcdir)/support/mkdirs $(DESTDIR)$(includedir) \
+installdirs: $(srcdir)/support/mkinstalldirs
+ -$(SHELL) $(srcdir)/support/mkinstalldirs $(DESTDIR)$(includedir) \
$(DESTDIR)$(includedir)/readline $(DESTDIR)$(libdir) \
$(DESTDIR)$(infodir) $(DESTDIR)$(man3dir)
-uninstall: uninstall-headers
+uninstall: uninstall-headers uninstall-doc
-test -n "$(DESTDIR)$(libdir)" && cd $(DESTDIR)$(libdir) && \
${RM} libreadline.a libreadline.old libhistory.a libhistory.old $(SHARED_LIBS)
- -( if test -d doc ; then \
- cd doc && \
- ${MAKE} ${MFLAGS} infodir=$(infodir) DESTDIR=${DESTDIR} $@; \
- fi )
-( cd shlib; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} uninstall )
-install-shared: installdirs install-headers shared
+install-shared: installdirs install-headers shared install-doc
-( cd shlib ; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} install )
-
+
uninstall-shared: maybe-uninstall-headers
-( cd shlib; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} uninstall )
+install-doc: installdirs
+ -( if test -d doc ; then \
+ cd doc && \
+ ${MAKE} ${MFLAGS} infodir=$(infodir) DESTDIR=${DESTDIR} install; \
+ fi )
+
+uninstall-doc:
+ -( if test -d doc ; then \
+ cd doc && \
+ ${MAKE} ${MFLAGS} infodir=$(infodir) DESTDIR=${DESTDIR} uninstall; \
+ fi )
+
TAGS: force
$(ETAGS) $(CSOURCES) $(HSOURCES)
diff --git a/readline/README b/readline/README
index 7aa939452fb..8dd09cc5373 100644
--- a/readline/README
+++ b/readline/README
@@ -1,7 +1,7 @@
Introduction
============
-This is the Gnu Readline library, version 4.3.
+This is the Gnu Readline library, version 5.1.
The Readline library provides a set of functions for use by applications
that allow users to edit command lines as they are typed in. Both
@@ -102,6 +102,9 @@ SHLIB_XLDFLAGS Additional flags to pass to SHOBJ_LD for shared library
SHLIB_LIBS Any additional libraries that shared libraries should be
linked against when they are created.
+SHLIB_LIBPREF The prefix to use when generating the filename of the shared
+ library. The default is `lib'; Cygwin uses `cyg'.
+
SHLIB_LIBSUFF The suffix to add to `libreadline' and `libhistory' when
generating the filename of the shared library. Many systems
use `so'; HP-UX uses `sl'.
@@ -118,6 +121,17 @@ SHLIB_LIBVERSION The string to append to the filename to indicate the version
numbers; use `$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' on those systems.
Other Unix versions use different schemes.
+SHLIB_DLLVERSION The version number for shared libraries that determines API
+ compatibility between readline versions and the underlying
+ system. Used only on Cygwin. Defaults to $SHLIB_MAJOR, but
+ can be overridden at configuration time by defining DLLVERSION
+ in the environment.
+
+SHLIB_DOT The character used to separate the name of the shared library
+ from the suffix and version information. The default is `.';
+ systems like Cygwin which don't separate version information
+ from the library name should set this to the empty string.
+
SHLIB_STATUS Set this to `supported' when you have defined the other
necessary variables. Make uses this to determine whether
or not shared library creation should be attempted.
diff --git a/readline/acconfig.h b/readline/acconfig.h
deleted file mode 100644
index 577cf9c7d49..00000000000
--- a/readline/acconfig.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* acconfig.h
- This file is in the public domain.
-
- Descriptive text for the C preprocessor macros that
- the distributed Autoconf macros can define.
- No software package will use all of them; autoheader copies the ones
- your configure.in uses into your configuration header file templates.
-
- The entries are in sort -df order: alphabetical, case insensitive,
- ignoring punctuation (such as underscores). Although this order
- can split up related entries, it makes it easier to check whether
- a given entry is in the file.
-
- Leave the following blank line there!! Autoheader needs it. */
-
-
-/* Definitions pulled in from aclocal.m4. */
-#undef VOID_SIGHANDLER
-
-#undef GWINSZ_IN_SYS_IOCTL
-
-#undef TIOCSTAT_IN_SYS_IOCTL
-
-#undef HAVE_GETPW_DECLS
-
-#undef FIONREAD_IN_SYS_IOCTL
-
-#undef HAVE_BSD_SIGNALS
-
-#undef HAVE_LSTAT
-
-#undef HAVE_POSIX_SIGNALS
-
-#undef HAVE_POSIX_SIGSETJMP
-
-#undef HAVE_USG_SIGHOLD
-
-#undef MUST_REINSTALL_SIGHANDLERS
-
-#undef SPEED_T_IN_SYS_TYPES
-
-#undef STRCOLL_BROKEN
-
-#undef STRUCT_DIRENT_HAS_D_FILENO
-
-#undef STRUCT_DIRENT_HAS_D_INO
-
-#undef STRUCT_WINSIZE_IN_SYS_IOCTL
-
-#undef STRUCT_WINSIZE_IN_TERMIOS
-
-
-/* Leave that blank line there!! Autoheader needs it.
- If you're adding to this file, keep in mind:
- The entries are in sort -df order: alphabetical, case insensitive,
- ignoring punctuation (such as underscores). */
diff --git a/readline/aclocal.m4 b/readline/aclocal.m4
index 35613c2702f..485ca491c1d 100644
--- a/readline/aclocal.m4
+++ b/readline/aclocal.m4
@@ -685,65 +685,26 @@ fi
])
AC_DEFUN(BASH_FUNC_GETCWD,
-[AC_MSG_CHECKING([if getcwd() calls popen()])
-AC_CACHE_VAL(bash_cv_getcwd_calls_popen,
+[AC_MSG_CHECKING([if getcwd() will dynamically allocate memory])
+AC_CACHE_VAL(bash_cv_getcwd_malloc,
[AC_TRY_RUN([
#include <stdio.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
-#ifndef __STDC__
-#ifndef const
-#define const
-#endif
-#endif
-
-int popen_called;
-
-FILE *
-popen(command, type)
- const char *command;
- const char *type;
-{
- popen_called = 1;
- return (FILE *)NULL;
-}
-
-FILE *_popen(command, type)
- const char *command;
- const char *type;
-{
- return (popen (command, type));
-}
-
-int
-pclose(stream)
-FILE *stream;
-{
- return 0;
-}
-
-int
-_pclose(stream)
-FILE *stream;
-{
- return 0;
-}
-
main()
{
- char lbuf[32];
- popen_called = 0;
- getcwd(lbuf, 32);
- exit (popen_called);
+ char *xpwd;
+ xpwd = getcwd(0, 0);
+ exit (xpwd == 0);
}
-], bash_cv_getcwd_calls_popen=no, bash_cv_getcwd_calls_popen=yes,
- [AC_MSG_WARN(cannot check whether getcwd calls popen if cross compiling -- defaulting to no)
- bash_cv_getcwd_calls_popen=no]
+], bash_cv_getcwd_malloc=yes, bash_cv_getcwd_malloc=no,
+ [AC_MSG_WARN(cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no)
+ bash_cv_getcwd_malloc=no]
)])
-AC_MSG_RESULT($bash_cv_getcwd_calls_popen)
-if test $bash_cv_getcwd_calls_popen = yes; then
+AC_MSG_RESULT($bash_cv_getcwd_malloc)
+if test $bash_cv_getcwd_malloc = no; then
AC_DEFINE(GETCWD_BROKEN)
AC_LIBOBJ(getcwd)
fi
@@ -981,11 +942,12 @@ AC_MSG_CHECKING(which library has the termcap functions)
_bash_needmsg=
fi
AC_CACHE_VAL(bash_cv_termcap_lib,
-[AC_CHECK_LIB(termcap, tgetent, bash_cv_termcap_lib=libtermcap,
+[AC_CHECK_FUNC(tgetent, bash_cv_termcap_lib=libc,
+ [AC_CHECK_LIB(termcap, tgetent, bash_cv_termcap_lib=libtermcap,
[AC_CHECK_LIB(tinfo, tgetent, bash_cv_termcap_lib=libtinfo,
[AC_CHECK_LIB(curses, tgetent, bash_cv_termcap_lib=libcurses,
[AC_CHECK_LIB(ncurses, tgetent, bash_cv_termcap_lib=libncurses,
- bash_cv_termcap_lib=gnutermcap)])])])])
+ bash_cv_termcap_lib=gnutermcap)])])])])])
if test "X$_bash_needmsg" = "Xyes"; then
AC_MSG_CHECKING(which library has the termcap functions)
fi
@@ -1003,6 +965,9 @@ TERMCAP_DEP=
elif test $bash_cv_termcap_lib = libncurses; then
TERMCAP_LIB=-lncurses
TERMCAP_DEP=
+elif test $bash_cv_termcap_lib = libc; then
+TERMCAP_LIB=
+TERMCAP_DEP=
else
TERMCAP_LIB=-lcurses
TERMCAP_DEP=
@@ -1061,7 +1026,7 @@ fi
AC_DEFUN(BASH_STRUCT_DIRENT_D_INO,
[AC_REQUIRE([AC_HEADER_DIRENT])
-AC_MSG_CHECKING(if struct dirent has a d_ino member)
+AC_MSG_CHECKING(for struct dirent.d_ino)
AC_CACHE_VAL(bash_cv_dirent_has_dino,
[AC_TRY_COMPILE([
#include <stdio.h>
@@ -1088,13 +1053,13 @@ struct dirent d; int z; z = d.d_ino;
], bash_cv_dirent_has_dino=yes, bash_cv_dirent_has_dino=no)])
AC_MSG_RESULT($bash_cv_dirent_has_dino)
if test $bash_cv_dirent_has_dino = yes; then
-AC_DEFINE(STRUCT_DIRENT_HAS_D_INO)
+AC_DEFINE(HAVE_STRUCT_DIRENT_D_INO)
fi
])
AC_DEFUN(BASH_STRUCT_DIRENT_D_FILENO,
[AC_REQUIRE([AC_HEADER_DIRENT])
-AC_MSG_CHECKING(if struct dirent has a d_fileno member)
+AC_MSG_CHECKING(for struct dirent.d_fileno)
AC_CACHE_VAL(bash_cv_dirent_has_d_fileno,
[AC_TRY_COMPILE([
#include <stdio.h>
@@ -1121,7 +1086,40 @@ struct dirent d; int z; z = d.d_fileno;
], bash_cv_dirent_has_d_fileno=yes, bash_cv_dirent_has_d_fileno=no)])
AC_MSG_RESULT($bash_cv_dirent_has_d_fileno)
if test $bash_cv_dirent_has_d_fileno = yes; then
-AC_DEFINE(STRUCT_DIRENT_HAS_D_FILENO)
+AC_DEFINE(HAVE_STRUCT_DIRENT_D_FILENO)
+fi
+])
+
+AC_DEFUN(BASH_STRUCT_DIRENT_D_NAMLEN,
+[AC_REQUIRE([AC_HEADER_DIRENT])
+AC_MSG_CHECKING(for struct dirent.d_namlen)
+AC_CACHE_VAL(bash_cv_dirent_has_d_namlen,
+[AC_TRY_COMPILE([
+#include <stdio.h>
+#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#if defined(HAVE_DIRENT_H)
+# include <dirent.h>
+#else
+# define dirent direct
+# ifdef HAVE_SYS_NDIR_H
+# include <sys/ndir.h>
+# endif /* SYSNDIR */
+# ifdef HAVE_SYS_DIR_H
+# include <sys/dir.h>
+# endif /* SYSDIR */
+# ifdef HAVE_NDIR_H
+# include <ndir.h>
+# endif
+#endif /* HAVE_DIRENT_H */
+],[
+struct dirent d; int z; z = d.d_namlen;
+], bash_cv_dirent_has_d_namlen=yes, bash_cv_dirent_has_d_namlen=no)])
+AC_MSG_RESULT($bash_cv_dirent_has_d_namlen)
+if test $bash_cv_dirent_has_d_namlen = yes; then
+AC_DEFINE(HAVE_STRUCT_DIRENT_D_NAMLEN)
fi
])
@@ -1141,6 +1139,22 @@ if test $bash_cv_struct_timeval = yes; then
fi
])
+AC_DEFUN(BASH_STRUCT_TIMEZONE,
+[AC_MSG_CHECKING(for struct timezone in sys/time.h and time.h)
+AC_CACHE_VAL(bash_cv_struct_timezone,
+[
+AC_EGREP_HEADER(struct timezone, sys/time.h,
+ bash_cv_struct_timezone=yes,
+ AC_EGREP_HEADER(struct timezone, time.h,
+ bash_cv_struct_timezone=yes,
+ bash_cv_struct_timezone=no))
+])
+AC_MSG_RESULT($bash_cv_struct_timezone)
+if test $bash_cv_struct_timezone = yes; then
+ AC_DEFINE(HAVE_STRUCT_TIMEZONE)
+fi
+])
+
AC_DEFUN(BASH_STRUCT_WINSIZE,
[AC_MSG_CHECKING(for struct winsize in sys/ioctl.h and termios.h)
AC_CACHE_VAL(bash_cv_struct_winsize_header,
@@ -1526,9 +1540,16 @@ fi
AC_DEFUN(BASH_CHECK_DEV_FD,
[AC_MSG_CHECKING(whether /dev/fd is available)
AC_CACHE_VAL(bash_cv_dev_fd,
-[if test -d /dev/fd && test -r /dev/fd/0; then
- bash_cv_dev_fd=standard
- elif test -d /proc/self/fd && test -r /proc/self/fd/0; then
+[if test -d /dev/fd && test -r /dev/fd/0 < /dev/null; then
+# check for systems like FreeBSD 5 that only provide /dev/fd/[012]
+ exec 3<&0
+ if test -r /dev/fd/3; then
+ bash_cv_dev_fd=standard
+ else
+ bash_cv_dev_fd=absent
+ fi
+ exec 3<&-
+ elif test -d /proc/self/fd && test -r /proc/self/fd/0 < /dev/null; then
bash_cv_dev_fd=whacky
else
bash_cv_dev_fd=absent
@@ -1547,9 +1568,9 @@ fi
AC_DEFUN(BASH_CHECK_DEV_STDIN,
[AC_MSG_CHECKING(whether /dev/stdin stdout stderr are available)
AC_CACHE_VAL(bash_cv_dev_stdin,
-[if test -d /dev/fd && test -r /dev/stdin; then
+[if test -d /dev/fd && test -r /dev/stdin < /dev/null; then
bash_cv_dev_stdin=present
- elif test -d /proc/self/fd && test -r /dev/stdin; then
+ elif test -d /proc/self/fd && test -r /dev/stdin < /dev/null; then
bash_cv_dev_stdin=present
else
bash_cv_dev_stdin=absent
@@ -1652,9 +1673,13 @@ AC_CHECK_HEADERS(wctype.h)
AC_CHECK_HEADERS(wchar.h)
AC_CHECK_HEADERS(langinfo.h)
-AC_CHECK_FUNC(mbrtowc, AC_DEFINE(HAVE_MBRTOWC))
AC_CHECK_FUNC(mbsrtowcs, AC_DEFINE(HAVE_MBSRTOWCS))
+AC_CHECK_FUNC(mbrtowc, AC_DEFINE(HAVE_MBRTOWC))
+AC_CHECK_FUNC(mbrlen, AC_DEFINE(HAVE_MBRLEN))
+AC_CHECK_FUNC(wctomb, AC_DEFINE(HAVE_WCTOMB))
AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH))
+AC_CHECK_FUNC(wcsdup, AC_DEFINE(HAVE_WCSDUP))
+
if test "$ac_cv_func_wcwidth" = no && test "$ac_cv_header_wchar_h" = yes; then
WCWIDTH_OBJ=wcwidth.o
else
@@ -1663,14 +1688,12 @@ fi
AC_SUBST(WCWIDTH_OBJ)
AC_CACHE_CHECK([for mbstate_t], bash_cv_have_mbstate_t,
-[AC_TRY_LINK(
-[#include <wchar.h>],
-[int
-main ()
-{
+[AC_TRY_COMPILE([
+#include <wchar.h>], [
mbstate_t ps;
- return 0;
-}], bash_cv_have_mbstate_t=yes, bash_cv_have_mbstate_t=no)])
+ mbstate_t *psp;
+ psp = (mbstate_t *)0;
+], bash_cv_have_mbstate_t=yes, bash_cv_have_mbstate_t=no)])
if test $bash_cv_have_mbstate_t = yes; then
AC_DEFINE(HAVE_MBSTATE_T)
fi
@@ -1719,23 +1742,30 @@ LIBS="$LIBS -lreadline ${TERMCAP_LIB}"
CFLAGS="$CFLAGS -I${ac_cv_rl_includedir}"
LDFLAGS="$LDFLAGS -L${ac_cv_rl_libdir}"
-AC_TRY_RUN([
+AC_CACHE_VAL(ac_cv_rl_version,
+[AC_TRY_RUN([
#include <stdio.h>
#include <readline/readline.h>
+extern int rl_gnu_readline_p;
+
main()
{
FILE *fp;
fp = fopen("conftest.rlv", "w");
- if (fp == 0) exit(1);
- fprintf(fp, "%s\n", rl_library_version ? rl_library_version : "0.0");
+ if (fp == 0)
+ exit(1);
+ if (rl_gnu_readline_p != 1)
+ fprintf(fp, "0.0\n");
+ else
+ fprintf(fp, "%s\n", rl_library_version ? rl_library_version : "0.0");
fclose(fp);
exit(0);
}
],
ac_cv_rl_version=`cat conftest.rlv`,
ac_cv_rl_version='0.0',
-ac_cv_rl_version='4.2')
+ac_cv_rl_version='4.2')])
CFLAGS="$_save_CFLAGS"
LDFLAGS="$_save_LDFLAGS"
@@ -1797,3 +1827,2140 @@ AC_MSG_RESULT($ac_cv_rl_version)
fi
])
+
+AC_DEFUN(BASH_FUNC_CTYPE_NONASCII,
+[
+AC_MSG_CHECKING(whether the ctype macros accept non-ascii characters)
+AC_CACHE_VAL(bash_cv_func_ctype_nonascii,
+[AC_TRY_RUN([
+#ifdef HAVE_LOCALE_H
+#include <locale.h>
+#endif
+#include <stdio.h>
+#include <ctype.h>
+
+main(c, v)
+int c;
+char *v[];
+{
+ char *deflocale;
+ unsigned char x;
+ int r1, r2;
+
+#ifdef HAVE_SETLOCALE
+ /* We take a shot here. If that locale is not known, try the
+ system default. We try this one because '\342' (226) is
+ known to be a printable character in that locale. */
+ deflocale = setlocale(LC_ALL, "en_US.ISO8859-1");
+ if (deflocale == 0)
+ deflocale = setlocale(LC_ALL, "");
+#endif
+
+ x = '\342';
+ r1 = isprint(x);
+ x -= 128;
+ r2 = isprint(x);
+ exit (r1 == 0 || r2 == 0);
+}
+], bash_cv_func_ctype_nonascii=yes, bash_cv_func_ctype_nonascii=no,
+ [AC_MSG_WARN(cannot check ctype macros if cross compiling -- defaulting to no)
+ bash_cv_func_ctype_nonascii=no]
+)])
+AC_MSG_RESULT($bash_cv_func_ctype_nonascii)
+if test $bash_cv_func_ctype_nonascii = yes; then
+AC_DEFINE(CTYPE_NON_ASCII)
+fi
+])
+
+AC_DEFUN(BASH_CHECK_WCONTINUED,
+[
+AC_MSG_CHECKING(whether WCONTINUED flag to waitpid is unavailable or available but broken)
+AC_CACHE_VAL(bash_cv_wcontinued_broken,
+[AC_TRY_RUN([
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <unistd.h>
+#include <errno.h>
+
+#ifndef errno
+extern int errno;
+#endif
+main()
+{
+ int x;
+
+ x = waitpid(-1, (int *)0, WNOHANG|WCONTINUED);
+ if (x == -1 && errno == EINVAL)
+ exit (1);
+ else
+ exit (0);
+}
+], bash_cv_wcontinued_broken=no,bash_cv_wcontinued_broken=yes,
+ [AC_MSG_WARN(cannot check WCONTINUED if cross compiling -- defaulting to no)
+ bash_cv_wcontinued_broken=no]
+)])
+AC_MSG_RESULT($bash_cv_wcontinued_broken)
+if test $bash_cv_wcontinued_broken = yes; then
+AC_DEFINE(WCONTINUED_BROKEN)
+fi
+])
+
+dnl
+dnl tests added for bashdb
+dnl
+
+
+AC_DEFUN([AM_PATH_LISPDIR],
+ [AC_ARG_WITH(lispdir, AC_HELP_STRING([--with-lispdir], [override the default lisp directory]),
+ [ lispdir="$withval"
+ AC_MSG_CHECKING([where .elc files should go])
+ AC_MSG_RESULT([$lispdir])],
+ [
+ # If set to t, that means we are running in a shell under Emacs.
+ # If you have an Emacs named "t", then use the full path.
+ test x"$EMACS" = xt && EMACS=
+ AC_CHECK_PROGS(EMACS, emacs xemacs, no)
+ if test $EMACS != "no"; then
+ if test x${lispdir+set} != xset; then
+ AC_CACHE_CHECK([where .elc files should go], [am_cv_lispdir], [dnl
+ am_cv_lispdir=`$EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' | sed -n -e 's,/$,,' -e '/.*\/lib\/\(x\?emacs\/site-lisp\)$/{s,,${libdir}/\1,;p;q;}' -e '/.*\/share\/\(x\?emacs\/site-lisp\)$/{s,,${datadir}/\1,;p;q;}'`
+ if test -z "$am_cv_lispdir"; then
+ am_cv_lispdir='${datadir}/emacs/site-lisp'
+ fi
+ ])
+ lispdir="$am_cv_lispdir"
+ fi
+ fi
+ ])
+ AC_SUBST(lispdir)
+])
+
+dnl
+dnl tests added for gettext
+dnl
+# codeset.m4 serial AM1 (gettext-0.10.40)
+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_LANGINFO_CODESET],
+[
+ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
+ [AC_TRY_LINK([#include <langinfo.h>],
+ [char* cs = nl_langinfo(CODESET);],
+ am_cv_langinfo_codeset=yes,
+ am_cv_langinfo_codeset=no)
+ ])
+ if test $am_cv_langinfo_codeset = yes; then
+ AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
+ [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
+ fi
+])
+# gettext.m4 serial 20 (gettext-0.12)
+dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+dnl Macro to add for using GNU gettext.
+
+dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
+dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
+dnl default (if it is not specified or empty) is 'no-libtool'.
+dnl INTLSYMBOL should be 'external' for packages with no intl directory,
+dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
+dnl If INTLSYMBOL is 'use-libtool', then a libtool library
+dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
+dnl depending on --{enable,disable}-{shared,static} and on the presence of
+dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
+dnl $(top_builddir)/intl/libintl.a will be created.
+dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
+dnl implementations (in libc or libintl) without the ngettext() function
+dnl will be ignored. If NEEDSYMBOL is specified and is
+dnl 'need-formatstring-macros', then GNU gettext implementations that don't
+dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
+dnl INTLDIR is used to find the intl libraries. If empty,
+dnl the value `$(top_builddir)/intl/' is used.
+dnl
+dnl The result of the configuration is one of three cases:
+dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
+dnl and used.
+dnl Catalog format: GNU --> install in $(datadir)
+dnl Catalog extension: .mo after installation, .gmo in source tree
+dnl 2) GNU gettext has been found in the system's C library.
+dnl Catalog format: GNU --> install in $(datadir)
+dnl Catalog extension: .mo after installation, .gmo in source tree
+dnl 3) No internationalization, always use English msgid.
+dnl Catalog format: none
+dnl Catalog extension: none
+dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
+dnl The use of .gmo is historical (it was needed to avoid overwriting the
+dnl GNU format catalogs when building on a platform with an X/Open gettext),
+dnl but we keep it in order not to force irrelevant filename changes on the
+dnl maintainers.
+dnl
+AC_DEFUN([AM_GNU_GETTEXT],
+[
+ dnl Argument checking.
+ ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
+ [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
+])])])])])
+ ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
+ [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
+])])])])
+ define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
+ define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
+
+ AC_REQUIRE([AM_PO_SUBDIRS])dnl
+ ifelse(gt_included_intl, yes, [
+ AC_REQUIRE([AM_INTL_SUBDIR])dnl
+ ])
+
+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+
+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
+ dnl Ideally we would do this search only after the
+ dnl if test "$USE_NLS" = "yes"; then
+ dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
+ dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
+ dnl the configure script would need to contain the same shell code
+ dnl again, outside any 'if'. There are two solutions:
+ dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
+ dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
+ dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
+ dnl documented, we avoid it.
+ ifelse(gt_included_intl, yes, , [
+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+ ])
+
+ dnl Set USE_NLS.
+ AM_NLS
+
+ ifelse(gt_included_intl, yes, [
+ BUILD_INCLUDED_LIBINTL=no
+ USE_INCLUDED_LIBINTL=no
+ ])
+ LIBINTL=
+ LTLIBINTL=
+ POSUB=
+
+ dnl If we use NLS figure out what method
+ if test "$USE_NLS" = "yes"; then
+ gt_use_preinstalled_gnugettext=no
+ ifelse(gt_included_intl, yes, [
+ AC_MSG_CHECKING([whether included gettext is requested])
+ AC_ARG_WITH(included-gettext,
+ [ --with-included-gettext use the GNU gettext library included here],
+ nls_cv_force_use_gnu_gettext=$withval,
+ nls_cv_force_use_gnu_gettext=no)
+ AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
+
+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+ ])
+ dnl User does not insist on using GNU NLS library. Figure out what
+ dnl to use. If GNU gettext is available we use this. Else we have
+ dnl to fall back to GNU NLS library.
+
+ dnl Add a version number to the cache macros.
+ define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
+ define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
+ define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
+
+ AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
+ [AC_TRY_LINK([#include <libintl.h>
+]ifelse([$2], [need-formatstring-macros],
+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+], [])[extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;],
+ [bindtextdomain ("", "");
+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
+ gt_cv_func_gnugettext_libc=yes,
+ gt_cv_func_gnugettext_libc=no)])
+
+ if test "$gt_cv_func_gnugettext_libc" != "yes"; then
+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
+ ifelse(gt_included_intl, yes, , [
+ AM_ICONV_LINK
+ ])
+ dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
+ dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
+ dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
+ dnl even if libiconv doesn't exist.
+ AC_LIB_LINKFLAGS_BODY([intl])
+ AC_CACHE_CHECK([for GNU gettext in libintl],
+ gt_cv_func_gnugettext_libintl,
+ [gt_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $INCINTL"
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBINTL"
+ dnl Now see whether libintl exists and does not depend on libiconv.
+ AC_TRY_LINK([#include <libintl.h>
+]ifelse([$2], [need-formatstring-macros],
+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+], [])[extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias ();],
+ [bindtextdomain ("", "");
+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
+ gt_cv_func_gnugettext_libintl=yes,
+ gt_cv_func_gnugettext_libintl=no)
+ dnl Now see whether libintl exists and depends on libiconv.
+ if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
+ LIBS="$LIBS $LIBICONV"
+ AC_TRY_LINK([#include <libintl.h>
+]ifelse([$2], [need-formatstring-macros],
+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+], [])[extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias ();],
+ [bindtextdomain ("", "");
+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
+ [LIBINTL="$LIBINTL $LIBICONV"
+ LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+ gt_cv_func_gnugettext_libintl=yes
+ ])
+ fi
+ CPPFLAGS="$gt_save_CPPFLAGS"
+ LIBS="$gt_save_LIBS"])
+ fi
+
+ dnl If an already present or preinstalled GNU gettext() is found,
+ dnl use it. But if this macro is used in GNU gettext, and GNU
+ dnl gettext is already preinstalled in libintl, we update this
+ dnl libintl. (Cf. the install rule in intl/Makefile.in.)
+ if test "$gt_cv_func_gnugettext_libc" = "yes" \
+ || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
+ && test "$PACKAGE" != gettext-runtime \
+ && test "$PACKAGE" != gettext-tools; }; then
+ gt_use_preinstalled_gnugettext=yes
+ else
+ dnl Reset the values set by searching for libintl.
+ LIBINTL=
+ LTLIBINTL=
+ INCINTL=
+ fi
+
+ ifelse(gt_included_intl, yes, [
+ if test "$gt_use_preinstalled_gnugettext" != "yes"; then
+ dnl GNU gettext is not found in the C library.
+ dnl Fall back on included GNU gettext library.
+ nls_cv_use_gnu_gettext=yes
+ fi
+ fi
+
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions used to generate GNU NLS library.
+ BUILD_INCLUDED_LIBINTL=yes
+ USE_INCLUDED_LIBINTL=yes
+ LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
+ LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
+ LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+ fi
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions to use GNU gettext tools.
+ CATOBJEXT=.gmo
+ fi
+ ])
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ AC_DEFINE(ENABLE_NLS, 1,
+ [Define to 1 if translation of program messages to the user's native language
+ is requested.])
+ else
+ USE_NLS=no
+ fi
+ fi
+
+ AC_MSG_CHECKING([whether to use NLS])
+ AC_MSG_RESULT([$USE_NLS])
+ if test "$USE_NLS" = "yes"; then
+ AC_MSG_CHECKING([where the gettext function comes from])
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
+ gt_source="external libintl"
+ else
+ gt_source="libc"
+ fi
+ else
+ gt_source="included intl directory"
+ fi
+ AC_MSG_RESULT([$gt_source])
+ fi
+
+ if test "$USE_NLS" = "yes"; then
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
+ AC_MSG_CHECKING([how to link with libintl])
+ AC_MSG_RESULT([$LIBINTL])
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
+ fi
+
+ dnl For backward compatibility. Some packages may be using this.
+ AC_DEFINE(HAVE_GETTEXT, 1,
+ [Define if the GNU gettext() function is already present or preinstalled.])
+ AC_DEFINE(HAVE_DCGETTEXT, 1,
+ [Define if the GNU dcgettext() function is already present or preinstalled.])
+ fi
+
+ dnl We need to process the po/ directory.
+ POSUB=po
+ fi
+
+ ifelse(gt_included_intl, yes, [
+ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
+ dnl to 'yes' because some of the testsuite requires it.
+ if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
+ BUILD_INCLUDED_LIBINTL=yes
+ fi
+
+ dnl Make all variables we use known to autoconf.
+ AC_SUBST(BUILD_INCLUDED_LIBINTL)
+ AC_SUBST(USE_INCLUDED_LIBINTL)
+ AC_SUBST(CATOBJEXT)
+
+ dnl For backward compatibility. Some configure.ins may be using this.
+ nls_cv_header_intl=
+ nls_cv_header_libgt=
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ DATADIRNAME=share
+ AC_SUBST(DATADIRNAME)
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ INSTOBJEXT=.mo
+ AC_SUBST(INSTOBJEXT)
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ GENCAT=gencat
+ AC_SUBST(GENCAT)
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ if test "$USE_INCLUDED_LIBINTL" = yes; then
+ INTLOBJS="\$(GETTOBJS)"
+ fi
+ AC_SUBST(INTLOBJS)
+
+ dnl Enable libtool support if the surrounding package wishes it.
+ INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
+ AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
+ ])
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ INTLLIBS="$LIBINTL"
+ AC_SUBST(INTLLIBS)
+
+ dnl Make all documented variables known to autoconf.
+ AC_SUBST(LIBINTL)
+ AC_SUBST(LTLIBINTL)
+ AC_SUBST(POSUB)
+])
+
+
+dnl Checks for all prerequisites of the intl subdirectory,
+dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
+dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
+AC_DEFUN([AM_INTL_SUBDIR],
+[
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+ AC_REQUIRE([AM_MKINSTALLDIRS])dnl
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ AC_REQUIRE([AC_PROG_RANLIB])dnl
+ AC_REQUIRE([AC_ISC_POSIX])dnl
+ AC_REQUIRE([AC_HEADER_STDC])dnl
+ AC_REQUIRE([AC_C_CONST])dnl
+ AC_REQUIRE([AC_C_INLINE])dnl
+ AC_REQUIRE([AC_TYPE_OFF_T])dnl
+ AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+ AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+ AC_REQUIRE([AC_FUNC_MMAP])dnl
+ AC_REQUIRE([jm_GLIBC21])dnl
+ AC_REQUIRE([gt_INTDIV0])dnl
+ AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
+ AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
+ AC_REQUIRE([gt_INTTYPES_PRI])dnl
+
+ AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
+stdlib.h string.h unistd.h sys/param.h])
+ AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
+geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
+strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next \
+__fsetlocking])
+
+ AM_ICONV
+ AM_LANGINFO_CODESET
+ if test $ac_cv_header_locale_h = yes; then
+ AM_LC_MESSAGES
+ fi
+
+ dnl intl/plural.c is generated from intl/plural.y. It requires bison,
+ dnl because plural.y uses bison specific features. It requires at least
+ dnl bison-1.26 because earlier versions generate a plural.c that doesn't
+ dnl compile.
+ dnl bison is only needed for the maintainer (who touches plural.y). But in
+ dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
+ dnl the rule in general Makefile. Now, some people carelessly touch the
+ dnl files or have a broken "make" program, hence the plural.c rule will
+ dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
+ dnl present or too old.
+ AC_CHECK_PROGS([INTLBISON], [bison])
+ if test -z "$INTLBISON"; then
+ ac_verc_fail=yes
+ else
+ dnl Found it, now check the version.
+ AC_MSG_CHECKING([version of bison])
+changequote(<<,>>)dnl
+ ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+ case $ac_prog_version in
+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+ 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
+changequote([,])dnl
+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+ esac
+ AC_MSG_RESULT([$ac_prog_version])
+ fi
+ if test $ac_verc_fail = yes; then
+ INTLBISON=:
+ fi
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
+AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
+# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+# Test for the GNU C Library, version 2.1 or newer.
+# From Bruno Haible.
+
+AC_DEFUN([jm_GLIBC21],
+ [
+ AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
+ ac_cv_gnu_library_2_1,
+ [AC_EGREP_CPP([Lucky GNU user],
+ [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+ Lucky GNU user
+ #endif
+#endif
+ ],
+ ac_cv_gnu_library_2_1=yes,
+ ac_cv_gnu_library_2_1=no)
+ ]
+ )
+ AC_SUBST(GLIBC21)
+ GLIBC21="$ac_cv_gnu_library_2_1"
+ ]
+)
+# iconv.m4 serial AM4 (gettext-0.11.3)
+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
+[
+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([iconv])
+])
+
+AC_DEFUN([AM_ICONV_LINK],
+[
+ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+ dnl those with the standalone portable GNU libiconv installed).
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+
+ dnl Add $INCICONV to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed libiconv and not disabled its use
+ dnl via --without-libiconv-prefix, he wants to use it. The first
+ dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
+ am_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
+
+ AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ am_cv_func_iconv=yes)
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ am_cv_lib_iconv=yes
+ am_cv_func_iconv=yes)
+ LIBS="$am_save_LIBS"
+ fi
+ ])
+ if test "$am_cv_func_iconv" = yes; then
+ AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
+ fi
+ if test "$am_cv_lib_iconv" = yes; then
+ AC_MSG_CHECKING([how to link with libiconv])
+ AC_MSG_RESULT([$LIBICONV])
+ else
+ dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
+ dnl either.
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBICONV=
+ LTLIBICONV=
+ fi
+ AC_SUBST(LIBICONV)
+ AC_SUBST(LTLIBICONV)
+])
+
+AC_DEFUN([AM_ICONV],
+[
+ AM_ICONV_LINK
+ if test "$am_cv_func_iconv" = yes; then
+ AC_MSG_CHECKING([for iconv declaration])
+ AC_CACHE_VAL(am_cv_proto_iconv, [
+ AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
+ am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+ AC_MSG_RESULT([$]{ac_t:-
+ }[$]am_cv_proto_iconv)
+ AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
+ [Define as const if the declaration of iconv() needs const.])
+ fi
+])
+# intdiv0.m4 serial 1 (gettext-0.11.3)
+dnl Copyright (C) 2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([gt_INTDIV0],
+[
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
+
+ AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
+ gt_cv_int_divbyzero_sigfpe,
+ [
+ AC_TRY_RUN([
+#include <stdlib.h>
+#include <signal.h>
+
+static void
+#ifdef __cplusplus
+sigfpe_handler (int sig)
+#else
+sigfpe_handler (sig) int sig;
+#endif
+{
+ /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
+ exit (sig != SIGFPE);
+}
+
+int x = 1;
+int y = 0;
+int z;
+int nan;
+
+int main ()
+{
+ signal (SIGFPE, sigfpe_handler);
+/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
+#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
+ signal (SIGTRAP, sigfpe_handler);
+#endif
+/* Linux/SPARC yields signal SIGILL. */
+#if defined (__sparc__) && defined (__linux__)
+ signal (SIGILL, sigfpe_handler);
+#endif
+
+ z = x / y;
+ nan = y / y;
+ exit (1);
+}
+], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
+ [
+ # Guess based on the CPU.
+ case "$host_cpu" in
+ alpha* | i[34567]86 | m68k | s390*)
+ gt_cv_int_divbyzero_sigfpe="guessing yes";;
+ *)
+ gt_cv_int_divbyzero_sigfpe="guessing no";;
+ esac
+ ])
+ ])
+ case "$gt_cv_int_divbyzero_sigfpe" in
+ *yes) value=1;;
+ *) value=0;;
+ esac
+ AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
+ [Define if integer division by zero raises signal SIGFPE.])
+])
+# inttypes.m4 serial 1 (gettext-0.11.4)
+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
+# <sys/types.h>.
+
+AC_DEFUN([gt_HEADER_INTTYPES_H],
+[
+ AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
+ [
+ AC_TRY_COMPILE(
+ [#include <sys/types.h>
+#include <inttypes.h>],
+ [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
+ ])
+ if test $gt_cv_header_inttypes_h = yes; then
+ AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
+ [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
+ fi
+])
+# inttypes_h.m4 serial 5 (gettext-0.12)
+dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
+AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
+[
+ AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
+ [AC_TRY_COMPILE(
+ [#include <sys/types.h>
+#include <inttypes.h>],
+ [uintmax_t i = (uintmax_t) -1;],
+ jm_ac_cv_header_inttypes_h=yes,
+ jm_ac_cv_header_inttypes_h=no)])
+ if test $jm_ac_cv_header_inttypes_h = yes; then
+ AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
+ [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
+ and declares uintmax_t. ])
+ fi
+])
+# inttypes-pri.m4 serial 1 (gettext-0.11.4)
+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
+# macros to non-string values. This is the case on AIX 4.3.3.
+
+AC_DEFUN([gt_INTTYPES_PRI],
+[
+ AC_REQUIRE([gt_HEADER_INTTYPES_H])
+ if test $gt_cv_header_inttypes_h = yes; then
+ AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
+ gt_cv_inttypes_pri_broken,
+ [
+ AC_TRY_COMPILE([#include <inttypes.h>
+#ifdef PRId32
+char *p = PRId32;
+#endif
+], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
+ ])
+ fi
+ if test "$gt_cv_inttypes_pri_broken" = yes; then
+ AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
+ [Define if <inttypes.h> exists and defines unusable PRI* macros.])
+ fi
+])
+# isc-posix.m4 serial 2 (gettext-0.11.2)
+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
+
+# This test replaces the one in autoconf.
+# Currently this macro should have the same name as the autoconf macro
+# because gettext's gettext.m4 (distributed in the automake package)
+# still uses it. Otherwise, the use in gettext.m4 makes autoheader
+# give these diagnostics:
+# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
+# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
+
+undefine([AC_ISC_POSIX])
+
+AC_DEFUN([AC_ISC_POSIX],
+ [
+ dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
+ AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
+ ]
+)
+# lcmessage.m4 serial 3 (gettext-0.11.3)
+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+
+AC_DEFUN([AM_LC_MESSAGES],
+[
+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ AC_DEFINE(HAVE_LC_MESSAGES, 1,
+ [Define if your <locale.h> file defines LC_MESSAGES.])
+ fi
+])
+# lib-ld.m4 serial 2 (gettext-0.12)
+dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl Subroutines of libtool.m4,
+dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
+dnl with libtool.m4.
+
+dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
+AC_DEFUN([AC_LIB_PROG_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+ acl_cv_prog_gnu_ld=yes
+else
+ acl_cv_prog_gnu_ld=no
+fi])
+with_gnu_ld=$acl_cv_prog_gnu_ld
+])
+
+dnl From libtool-1.4. Sets the variable LD.
+AC_DEFUN([AC_LIB_PROG_LD],
+[AC_ARG_WITH(gnu-ld,
+[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by GCC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]* | [A-Za-z]:[\\/]*)]
+ [re_direlt='/[^/][^/]*/\.\./']
+ # Canonicalize the path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(acl_cv_path_LD,
+[if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ acl_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ test "$with_gnu_ld" != no && break
+ else
+ test "$with_gnu_ld" != yes && break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_LIB_PROG_LD_GNU
+])
+# lib-link.m4 serial 4 (gettext-0.12)
+dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
+dnl augments the CPPFLAGS variable.
+AC_DEFUN([AC_LIB_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ define([Name],[translit([$1],[./-], [___])])
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+ ac_cv_lib[]Name[]_libs="$LIB[]NAME"
+ ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
+ ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+ ])
+ LIB[]NAME="$ac_cv_lib[]Name[]_libs"
+ LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
+ INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
+ dnl results of this search when this library appears as a dependency.
+ HAVE_LIB[]NAME=yes
+ undefine([Name])
+ undefine([NAME])
+])
+
+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
+dnl searches for libname and the libraries corresponding to explicit and
+dnl implicit dependencies, together with the specified include files and
+dnl the ability to compile and link the specified testcode. If found, it
+dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
+dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ define([Name],[translit([$1],[./-], [___])])
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+
+ dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+
+ dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed lib[]Name and not disabled its use
+ dnl via --without-lib[]Name-prefix, he wants to use it.
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+
+ AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIB[]NAME"
+ AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
+ LIBS="$ac_save_LIBS"
+ ])
+ if test "$ac_cv_lib[]Name" = yes; then
+ HAVE_LIB[]NAME=yes
+ AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
+ AC_MSG_CHECKING([how to link with lib[]$1])
+ AC_MSG_RESULT([$LIB[]NAME])
+ else
+ HAVE_LIB[]NAME=no
+ dnl If $LIB[]NAME didn't lead to a usable library, we don't need
+ dnl $INC[]NAME either.
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LIB[]NAME=
+ LTLIB[]NAME=
+ fi
+ AC_SUBST([HAVE_LIB]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ undefine([Name])
+ undefine([NAME])
+])
+
+dnl Determine the platform dependent parameters needed to use rpath:
+dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
+dnl hardcode_direct, hardcode_minus_L.
+AC_DEFUN([AC_LIB_RPATH],
+[
+ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
+ AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
+ AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
+ AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+ . ./conftest.sh
+ rm -f ./conftest.sh
+ acl_cv_rpath=done
+ ])
+ wl="$acl_cv_wl"
+ libext="$acl_cv_libext"
+ shlibext="$acl_cv_shlibext"
+ hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+ hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+ hardcode_direct="$acl_cv_hardcode_direct"
+ hardcode_minus_L="$acl_cv_hardcode_minus_L"
+ dnl Determine whether the user wants rpath handling at all.
+ AC_ARG_ENABLE(rpath,
+ [ --disable-rpath do not hardcode runtime library paths],
+ :, enable_rpath=yes)
+])
+
+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+[
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ AC_LIB_ARG_WITH([lib$1-prefix],
+[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
+ --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/lib"
+ fi
+ fi
+])
+ dnl Search the library and its dependencies in $additional_libdir and
+ dnl $LDFLAGS. Using breadth-first-seach.
+ LIB[]NAME=
+ LTLIB[]NAME=
+ INC[]NAME=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='$1 $2'
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
+ dnl or AC_LIB_HAVE_LINKFLAGS call.
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
+ else
+ dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
+ dnl that this library doesn't exist. So just drop it.
+ :
+ fi
+ else
+ dnl Search the library lib$name in $additional_libdir and $LDFLAGS
+ dnl and the already constructed $LIBNAME/$LTLIBNAME.
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ if test $use_additional = yes; then
+ if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+ found_dir="$additional_libdir"
+ found_so="$additional_libdir/lib$name.$shlibext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ else
+ if test -f "$additional_libdir/lib$name.$libext"; then
+ found_dir="$additional_libdir"
+ found_a="$additional_libdir/lib$name.$libext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+ found_dir="$dir"
+ found_so="$dir/lib$name.$shlibext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ else
+ if test -f "$dir/lib$name.$libext"; then
+ found_dir="$dir"
+ found_a="$dir/lib$name.$libext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ dnl Found the library.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ dnl Linking with a shared library. We attempt to hardcode its
+ dnl directory into the executable's runpath, unless it's the
+ dnl standard /usr/lib.
+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
+ dnl No hardcoding is needed.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ dnl The hardcoding into $LIBNAME is system dependent.
+ if test "$hardcode_direct" = yes; then
+ dnl Using DIR/libNAME.so during linking hardcodes DIR into the
+ dnl resulting binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ dnl Rely on "-L$found_dir".
+ dnl But don't add it if it's already contained in the LDFLAGS
+ dnl or the already constructed $LIBNAME
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
+ fi
+ if test "$hardcode_minus_L" != no; then
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
+ dnl here, because this doesn't fit in flags passed to the
+ dnl compiler. So give up. No hardcoding. This affects only
+ dnl very old systems.
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ dnl Linking with a static library.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
+ else
+ dnl We shouldn't come here, but anyway it's good to have a
+ dnl fallback.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
+ fi
+ fi
+ dnl Assume the include files are nearby.
+ additional_includedir=
+ case "$found_dir" in
+ */lib | */lib/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ dnl Potentially add $additional_includedir to $INCNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 3. if it's already present in $CPPFLAGS or the already
+ dnl constructed $INCNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INC[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $INCNAME.
+ INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ dnl Look for dependencies.
+ if test -n "$found_la"; then
+ dnl Read the .la file. It defines the variables
+ dnl dlname, library_names, old_library, dependency_libs, current,
+ dnl age, revision, installed, dlopen, dlpreopen, libdir.
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ dnl We use only dependency_libs.
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 3. if it's already present in $LDFLAGS or the already
+ dnl constructed $LIBNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_libdir" != "X/usr/lib"; then
+ haveit=
+ if test "X$additional_libdir" = "X/usr/local/lib"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LIBNAME.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LTLIBNAME.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ dnl Handle this in the next round.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ dnl Handle this in the next round. Throw away the .la's
+ dnl directory; it is already contained in a preceding -L
+ dnl option.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ dnl Most likely an immediate library name.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ dnl Didn't find the library; assume it is in the system directories
+ dnl known to the linker and runtime loader. (All the system
+ dnl directories known to the linker should also be known to the
+ dnl runtime loader, otherwise the system is severely misconfigured.)
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$hardcode_libdir_separator"; then
+ dnl Weird platform: only the last -rpath option counts, the user must
+ dnl pass all path elements in one option. We can arrange that for a
+ dnl single library, but not when more than one $LIBNAMEs are used.
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+ done
+ dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ else
+ dnl The -rpath options are cumulative.
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ dnl When using libtool, the option that works for both libraries and
+ dnl executables is -R. The -R options are cumulative.
+ for found_dir in $ltrpathdirs; do
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
+ done
+ fi
+])
+
+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
+dnl unless already present in VAR.
+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
+dnl contains two or three consecutive elements that belong together.
+AC_DEFUN([AC_LIB_APPENDTOVAR],
+[
+ for element in [$2]; do
+ haveit=
+ for x in $[$1]; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ [$1]="${[$1]}${[$1]:+ }$element"
+ fi
+ done
+])
+# lib-prefix.m4 serial 2 (gettext-0.12)
+dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
+dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
+dnl require excessive bracketing.
+ifdef([AC_HELP_STRING],
+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
+
+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
+dnl to access previously installed libraries. The basic assumption is that
+dnl a user will want packages to use other packages he previously installed
+dnl with the same --prefix option.
+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
+dnl libraries, but is otherwise very convenient.
+AC_DEFUN([AC_LIB_PREFIX],
+[
+ AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ AC_LIB_ARG_WITH([lib-prefix],
+[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
+ --without-lib-prefix don't search for libraries in includedir and libdir],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/lib"
+ fi
+ fi
+])
+ if test $use_additional = yes; then
+ dnl Potentially add $additional_includedir to $CPPFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's already present in $CPPFLAGS,
+ dnl 3. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ for x in $CPPFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $CPPFLAGS.
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ dnl Potentially add $additional_libdir to $LDFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's already present in $LDFLAGS,
+ dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_libdir" != "X/usr/lib"; then
+ haveit=
+ for x in $LDFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_libdir" = "X/usr/local/lib"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LDFLAGS.
+ LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ fi
+])
+
+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
+dnl acl_final_exec_prefix, containing the values to which $prefix and
+dnl $exec_prefix will expand at the end of the configure script.
+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
+[
+ dnl Unfortunately, prefix and exec_prefix get only finally determined
+ dnl at the end of configure.
+ if test "X$prefix" = "XNONE"; then
+ acl_final_prefix="$ac_default_prefix"
+ else
+ acl_final_prefix="$prefix"
+ fi
+ if test "X$exec_prefix" = "XNONE"; then
+ acl_final_exec_prefix='${prefix}'
+ else
+ acl_final_exec_prefix="$exec_prefix"
+ fi
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+ prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
+dnl variables prefix and exec_prefix bound to the values they will have
+dnl at the end of the configure script.
+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
+[
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ $1
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+])
+# nls.m4 serial 1 (gettext-0.12)
+dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+AC_DEFUN([AM_NLS],
+[
+ AC_MSG_CHECKING([whether NLS is requested])
+ dnl Default is enabled NLS
+ AC_ARG_ENABLE(nls,
+ [ --disable-nls do not use Native Language Support],
+ USE_NLS=$enableval, USE_NLS=yes)
+ AC_MSG_RESULT($USE_NLS)
+ AC_SUBST(USE_NLS)
+])
+
+AC_DEFUN([AM_MKINSTALLDIRS],
+[
+ dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
+ dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
+ dnl Try to locate it.
+ MKINSTALLDIRS=
+ if test -n "$ac_aux_dir"; then
+ case "$ac_aux_dir" in
+ /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
+ *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
+ esac
+ fi
+ if test -z "$MKINSTALLDIRS"; then
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+ fi
+ AC_SUBST(MKINSTALLDIRS)
+])
+# po.m4 serial 1 (gettext-0.12)
+dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+dnl Checks for all prerequisites of the po subdirectory.
+AC_DEFUN([AM_PO_SUBDIRS],
+[
+ AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+ AC_REQUIRE([AM_MKINSTALLDIRS])dnl
+ AC_REQUIRE([AM_NLS])dnl
+
+ dnl Perform the following tests also if --disable-nls has been given,
+ dnl because they are needed for "make dist" to work.
+
+ dnl Search for GNU msgfmt in the PATH.
+ dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
+ dnl The second test excludes FreeBSD msgfmt.
+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+ :)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+
+ dnl Search for GNU xgettext 0.12 or newer in the PATH.
+ dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
+ dnl The second test excludes FreeBSD xgettext.
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
+ (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+ :)
+ dnl Remove leftover from FreeBSD xgettext call.
+ rm -f messages.po
+
+ dnl Search for GNU msgmerge 0.11 or newer in the PATH.
+ AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
+ [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
+
+ dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
+ dnl Test whether we really found GNU msgfmt.
+ if test "$GMSGFMT" != ":"; then
+ dnl If it is no GNU msgfmt we define it as : so that the
+ dnl Makefiles still can work.
+ if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
+ (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ : ;
+ else
+ GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
+ AC_MSG_RESULT(
+ [found $GMSGFMT program is not GNU msgfmt; ignore it])
+ GMSGFMT=":"
+ fi
+ fi
+
+ dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
+ dnl Test whether we really found GNU xgettext.
+ if test "$XGETTEXT" != ":"; then
+ dnl If it is no GNU xgettext we define it as : so that the
+ dnl Makefiles still can work.
+ if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
+ (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ : ;
+ else
+ AC_MSG_RESULT(
+ [found xgettext program is not GNU xgettext; ignore it])
+ XGETTEXT=":"
+ fi
+ dnl Remove leftover from FreeBSD xgettext call.
+ rm -f messages.po
+ fi
+
+ AC_OUTPUT_COMMANDS([
+ for ac_file in $CONFIG_FILES; do
+ # Support "outfile[:infile[:infile...]]"
+ case "$ac_file" in
+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ esac
+ # PO directories have a Makefile.in generated from Makefile.in.in.
+ case "$ac_file" in */Makefile.in)
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+ rm -f "$ac_dir/POTFILES"
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+ POMAKEFILEDEPS="POTFILES.in"
+ # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
+ # on $ac_dir but don't depend on user-specified configuration
+ # parameters.
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ # Hide the ALL_LINGUAS assigment from automake.
+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # The set of available languages was given in configure.in.
+ eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+ fi
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ GMOFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ done
+ fi
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+ if test -f "$f"; then
+ case "$f" in
+ *.orig | *.bak | *~) ;;
+ *) cat "$f" >> "$ac_dir/Makefile" ;;
+ esac
+ fi
+ done
+ fi
+ ;;
+ esac
+ done],
+ [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+ # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
+ # from automake.
+ eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
+ LINGUAS="${LINGUAS-%UNSET%}"
+ ])
+])
+# progtest.m4 serial 3 (gettext-0.12)
+dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+# Search path for a program which passes the given test.
+
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN([AM_PATH_PROG_WITH_TEST],
+[
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+ [[\\/]]* | ?:[[\\/]]*)
+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ if [$3]; then
+ ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+ ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
+ AC_MSG_RESULT([$]$1)
+else
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
+# stdint_h.m4 serial 3 (gettext-0.12)
+dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
+AC_DEFUN([jm_AC_HEADER_STDINT_H],
+[
+ AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
+ [AC_TRY_COMPILE(
+ [#include <sys/types.h>
+#include <stdint.h>],
+ [uintmax_t i = (uintmax_t) -1;],
+ jm_ac_cv_header_stdint_h=yes,
+ jm_ac_cv_header_stdint_h=no)])
+ if test $jm_ac_cv_header_stdint_h = yes; then
+ AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
+ [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
+ and declares uintmax_t. ])
+ fi
+])
+# uintmax_t.m4 serial 7 (gettext-0.12)
+dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+AC_PREREQ(2.13)
+
+# Define uintmax_t to 'unsigned long' or 'unsigned long long'
+# if it is not already defined in <stdint.h> or <inttypes.h>.
+
+AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
+[
+ AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
+ AC_REQUIRE([jm_AC_HEADER_STDINT_H])
+ if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
+ AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
+ test $ac_cv_type_unsigned_long_long = yes \
+ && ac_type='unsigned long long' \
+ || ac_type='unsigned long'
+ AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
+ [Define to unsigned long or unsigned long long
+ if <stdint.h> and <inttypes.h> don't define.])
+ else
+ AC_DEFINE(HAVE_UINTMAX_T, 1,
+ [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
+ fi
+])
+# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40)
+dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
+[
+ AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
+ [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
+ [unsigned long long ullmax = (unsigned long long) -1;
+ return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
+ ac_cv_type_unsigned_long_long=yes,
+ ac_cv_type_unsigned_long_long=no)])
+ if test $ac_cv_type_unsigned_long_long = yes; then
+ AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
+ [Define if you have the unsigned long long type.])
+ fi
+])
diff --git a/readline/bind.c b/readline/bind.c
index 71038881482..7559d32f6b3 100644
--- a/readline/bind.c
+++ b/readline/bind.c
@@ -1,6 +1,6 @@
/* bind.c -- key binding and startup file support for the readline library. */
-/* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -19,8 +19,13 @@
is generally kept in a file called COPYING or LICENSE. If you do not
have a copy of the license, write to the Free Software Foundation,
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
+
#define READLINE_LIBRARY
+#if defined (__TANDEM)
+# include <floss.h>
+#endif
+
#if defined (HAVE_CONFIG_H)
# include <config.h>
#endif
@@ -72,6 +77,9 @@ static char *_rl_read_file PARAMS((char *, size_t *));
static void _rl_init_file_error PARAMS((const char *));
static int _rl_read_init_file PARAMS((const char *, int));
static int glean_key_from_name PARAMS((char *));
+static int find_boolean_var PARAMS((const char *));
+
+static char *_rl_get_string_variable_value PARAMS((const char *));
static int substring_member_of_array PARAMS((char *, const char **));
static int currently_reading_init_file;
@@ -148,6 +156,34 @@ rl_bind_key_in_map (key, function, map)
return (result);
}
+/* Bind key sequence KEYSEQ to DEFAULT_FUNC if KEYSEQ is unbound. Right
+ now, this is always used to attempt to bind the arrow keys, hence the
+ check for rl_vi_movement_mode. */
+int
+rl_bind_key_if_unbound_in_map (key, default_func, kmap)
+ int key;
+ rl_command_func_t *default_func;
+ Keymap kmap;
+{
+ char keyseq[2];
+
+ keyseq[0] = (unsigned char)key;
+ keyseq[1] = '\0';
+ return (rl_bind_keyseq_if_unbound_in_map (keyseq, default_func, kmap));
+}
+
+int
+rl_bind_key_if_unbound (key, default_func)
+ int key;
+ rl_command_func_t *default_func;
+{
+ char keyseq[2];
+
+ keyseq[0] = (unsigned char)key;
+ keyseq[1] = '\0';
+ return (rl_bind_keyseq_if_unbound_in_map (keyseq, default_func, _rl_keymap));
+}
+
/* Make KEY do nothing in the currently selected keymap.
Returns non-zero in case of error. */
int
@@ -200,9 +236,30 @@ rl_unbind_command_in_map (command, map)
}
/* Bind the key sequence represented by the string KEYSEQ to
+ FUNCTION, starting in the current keymap. This makes new
+ keymaps as necessary. */
+int
+rl_bind_keyseq (keyseq, function)
+ const char *keyseq;
+ rl_command_func_t *function;
+{
+ return (rl_generic_bind (ISFUNC, keyseq, (char *)function, _rl_keymap));
+}
+
+/* Bind the key sequence represented by the string KEYSEQ to
FUNCTION. This makes new keymaps as necessary. The initial
place to do bindings is in MAP. */
int
+rl_bind_keyseq_in_map (keyseq, function, map)
+ const char *keyseq;
+ rl_command_func_t *function;
+ Keymap map;
+{
+ return (rl_generic_bind (ISFUNC, keyseq, (char *)function, map));
+}
+
+/* Backwards compatibility; equivalent to rl_bind_keyseq_in_map() */
+int
rl_set_key (keyseq, function, map)
const char *keyseq;
rl_command_func_t *function;
@@ -211,6 +268,40 @@ rl_set_key (keyseq, function, map)
return (rl_generic_bind (ISFUNC, keyseq, (char *)function, map));
}
+/* Bind key sequence KEYSEQ to DEFAULT_FUNC if KEYSEQ is unbound. Right
+ now, this is always used to attempt to bind the arrow keys, hence the
+ check for rl_vi_movement_mode. */
+int
+rl_bind_keyseq_if_unbound_in_map (keyseq, default_func, kmap)
+ const char *keyseq;
+ rl_command_func_t *default_func;
+ Keymap kmap;
+{
+ rl_command_func_t *func;
+
+ if (keyseq)
+ {
+ func = rl_function_of_keyseq (keyseq, kmap, (int *)NULL);
+#if defined (VI_MODE)
+ if (!func || func == rl_do_lowercase_version || func == rl_vi_movement_mode)
+#else
+ if (!func || func == rl_do_lowercase_version)
+#endif
+ return (rl_bind_keyseq_in_map (keyseq, default_func, kmap));
+ else
+ return 1;
+ }
+ return 0;
+}
+
+int
+rl_bind_keyseq_if_unbound (keyseq, default_func)
+ const char *keyseq;
+ rl_command_func_t *default_func;
+{
+ return (rl_bind_keyseq_if_unbound_in_map (keyseq, default_func, _rl_keymap));
+}
+
/* Bind the key sequence represented by the string KEYSEQ to
the string of characters MACRO. This makes new keymaps as
necessary. The initial place to do bindings is in MAP. */
@@ -253,7 +344,7 @@ rl_generic_bind (type, keyseq, data, map)
k.function = 0;
/* If no keys to bind to, exit right away. */
- if (!keyseq || !*keyseq)
+ if (keyseq == 0 || *keyseq == 0)
{
if (type == ISMACR)
free (data);
@@ -281,7 +372,7 @@ rl_generic_bind (type, keyseq, data, map)
if (ic < 0 || ic >= KEYMAP_SIZE)
return -1;
- if (_rl_convert_meta_chars_to_ascii && META_CHAR (ic))
+ if (META_CHAR (ic) && _rl_convert_meta_chars_to_ascii)
{
ic = UNMETA (ic);
if (map[ESC].type == ISKMAP)
@@ -372,7 +463,14 @@ rl_translate_keyseq (seq, array, len)
else if (c == 'M')
{
i++;
- array[l++] = ESC; /* ESC is meta-prefix */
+ /* XXX - should obey convert-meta setting? */
+ if (_rl_convert_meta_chars_to_ascii && _rl_keymap[ESC].type == ISKMAP)
+ array[l++] = ESC; /* ESC is meta-prefix */
+ else
+ {
+ i++;
+ array[l++] = META (seq[i]);
+ }
}
else if (c == 'C')
{
@@ -912,9 +1010,15 @@ parser_else (args)
return 0;
}
+#if 0
/* Check the previous (n - 1) levels of the stack to make sure that
we haven't previously turned off parsing. */
for (i = 0; i < if_stack_depth - 1; i++)
+#else
+ /* Check the previous (n) levels of the stack to make sure that
+ we haven't previously turned off parsing. */
+ for (i = 0; i < if_stack_depth; i++)
+#endif
if (if_stack[i] == 1)
return 0;
@@ -1091,9 +1195,9 @@ rl_parse_and_bind (string)
/* If this is a command to set a variable, then do that. */
if (_rl_stricmp (string, "set") == 0)
{
- char *var = string + i;
- char *value;
+ char *var, *value, *e;
+ var = string + i;
/* Make VAR point to start of variable name. */
while (*var && whitespace (*var)) var++;
@@ -1104,6 +1208,20 @@ rl_parse_and_bind (string)
*value++ = '\0';
while (*value && whitespace (*value)) value++;
+ /* Strip trailing whitespace from values to boolean variables. Temp
+ fix until I get a real quoted-string parser here. */
+ i = find_boolean_var (var);
+ if (i >= 0)
+ {
+ /* remove trailing whitespace */
+ e = value + strlen (value) - 1;
+ while (e >= value && whitespace (*e))
+ e--;
+ e++; /* skip back to whitespace or EOS */
+ if (*e && e >= value)
+ *e = '\0';
+ }
+
rl_variable_bind (var, value);
return 0;
}
@@ -1124,8 +1242,9 @@ rl_parse_and_bind (string)
the quoted string delimiter, like the shell. */
if (*funname == '\'' || *funname == '"')
{
- int delimiter = string[i++], passc;
+ int delimiter, passc;
+ delimiter = string[i++];
for (passc = 0; c = string[i]; i++)
{
if (passc)
@@ -1161,7 +1280,7 @@ rl_parse_and_bind (string)
}
/* If this is a new-style key-binding, then do the binding with
- rl_set_key (). Otherwise, let the older code deal with it. */
+ rl_bind_keyseq (). Otherwise, let the older code deal with it. */
if (*string == '"')
{
char *seq;
@@ -1200,7 +1319,7 @@ rl_parse_and_bind (string)
rl_macro_bind (seq, &funname[1], _rl_keymap);
}
else
- rl_set_key (seq, rl_named_function (funname), _rl_keymap);
+ rl_bind_keyseq (seq, rl_named_function (funname));
free (seq);
return 0;
@@ -1261,6 +1380,7 @@ static struct {
int *value;
int flags;
} boolean_varlist [] = {
+ { "bind-tty-special-chars", &_rl_bind_stty_chars, 0 },
{ "blink-matching-paren", &rl_blink_matching_paren, V_SPECIAL },
{ "byte-oriented", &rl_byte_oriented, 0 },
{ "completion-ignore-case", &_rl_completion_case_fold, 0 },
@@ -1281,6 +1401,7 @@ static struct {
{ "prefer-visible-bell", &_rl_prefer_visible_bell, V_SPECIAL },
{ "print-completions-horizontally", &_rl_print_completions_horizontally, 0 },
{ "show-all-if-ambiguous", &_rl_complete_show_all, 0 },
+ { "show-all-if-unmodified", &_rl_complete_show_unmodified, 0 },
#if defined (VISIBLE_STATS)
{ "visible-stats", &rl_visible_stats, 0 },
#endif /* VISIBLE_STATS */
@@ -1373,13 +1494,34 @@ find_string_var (name)
values result in 0 (false). */
static int
bool_to_int (value)
- char *value;
+ const char *value;
{
return (value == 0 || *value == '\0' ||
(_rl_stricmp (value, "on") == 0) ||
(value[0] == '1' && value[1] == '\0'));
}
+char *
+rl_variable_value (name)
+ const char *name;
+{
+ register int i;
+ int v;
+ char *ret;
+
+ /* Check for simple variables first. */
+ i = find_boolean_var (name);
+ if (i >= 0)
+ return (*boolean_varlist[i].value ? "on" : "off");
+
+ i = find_string_var (name);
+ if (i >= 0)
+ return (_rl_get_string_variable_value (string_varlist[i].name));
+
+ /* Unknown variable names return NULL. */
+ return 0;
+}
+
int
rl_variable_bind (name, value)
const char *name, *value;
@@ -1650,7 +1792,7 @@ rl_get_keymap_name_from_edit_mode ()
/* Each of the following functions produces information about the
state of keybindings and functions known to Readline. The info
is always printed to rl_outstream, and in such a way that it can
- be read back in (i.e., passed to rl_parse_and_bind (). */
+ be read back in (i.e., passed to rl_parse_and_bind ()). */
/* Print the names of functions known to Readline. */
void
@@ -2022,12 +2164,68 @@ rl_dump_macros (count, key)
return (0);
}
+static char *
+_rl_get_string_variable_value (name)
+ const char *name;
+{
+ static char numbuf[32];
+ char *ret;
+ int n;
+
+ if (_rl_stricmp (name, "bell-style") == 0)
+ {
+ switch (_rl_bell_preference)
+ {
+ case NO_BELL:
+ return "none";
+ case VISIBLE_BELL:
+ return "visible";
+ case AUDIBLE_BELL:
+ default:
+ return "audible";
+ }
+ }
+ else if (_rl_stricmp (name, "comment-begin") == 0)
+ return (_rl_comment_begin ? _rl_comment_begin : RL_COMMENT_BEGIN_DEFAULT);
+ else if (_rl_stricmp (name, "completion-query-items") == 0)
+ {
+ sprintf (numbuf, "%d", rl_completion_query_items);
+ return (numbuf);
+ }
+ else if (_rl_stricmp (name, "editing-mode") == 0)
+ return (rl_get_keymap_name_from_edit_mode ());
+ else if (_rl_stricmp (name, "isearch-terminators") == 0)
+ {
+ if (_rl_isearch_terminators == 0)
+ return 0;
+ ret = _rl_untranslate_macro_value (_rl_isearch_terminators);
+ if (ret)
+ {
+ strncpy (numbuf, ret, sizeof (numbuf) - 1);
+ free (ret);
+ numbuf[sizeof(numbuf) - 1] = '\0';
+ }
+ else
+ numbuf[0] = '\0';
+ return numbuf;
+ }
+ else if (_rl_stricmp (name, "keymap") == 0)
+ {
+ ret = rl_get_keymap_name (_rl_keymap);
+ if (ret == 0)
+ ret = rl_get_keymap_name_from_edit_mode ();
+ return (ret ? ret : "none");
+ }
+ else
+ return (0);
+}
+
void
rl_variable_dumper (print_readably)
int print_readably;
{
int i;
- const char *kname;
+ char *v;
for (i = 0; boolean_varlist[i].name; i++)
{
@@ -2039,63 +2237,16 @@ rl_variable_dumper (print_readably)
*boolean_varlist[i].value ? "on" : "off");
}
- /* bell-style */
- switch (_rl_bell_preference)
- {
- case NO_BELL:
- kname = "none"; break;
- case VISIBLE_BELL:
- kname = "visible"; break;
- case AUDIBLE_BELL:
- default:
- kname = "audible"; break;
- }
- if (print_readably)
- fprintf (rl_outstream, "set bell-style %s\n", kname);
- else
- fprintf (rl_outstream, "bell-style is set to `%s'\n", kname);
-
- /* comment-begin */
- if (print_readably)
- fprintf (rl_outstream, "set comment-begin %s\n", _rl_comment_begin ? _rl_comment_begin : RL_COMMENT_BEGIN_DEFAULT);
- else
- fprintf (rl_outstream, "comment-begin is set to `%s'\n", _rl_comment_begin ? _rl_comment_begin : RL_COMMENT_BEGIN_DEFAULT);
-
- /* completion-query-items */
- if (print_readably)
- fprintf (rl_outstream, "set completion-query-items %d\n", rl_completion_query_items);
- else
- fprintf (rl_outstream, "completion-query-items is set to `%d'\n", rl_completion_query_items);
-
- /* editing-mode */
- if (print_readably)
- fprintf (rl_outstream, "set editing-mode %s\n", (rl_editing_mode == emacs_mode) ? "emacs" : "vi");
- else
- fprintf (rl_outstream, "editing-mode is set to `%s'\n", (rl_editing_mode == emacs_mode) ? "emacs" : "vi");
-
- /* isearch-terminators */
- if (_rl_isearch_terminators)
+ for (i = 0; string_varlist[i].name; i++)
{
- char *disp;
-
- disp = _rl_untranslate_macro_value (_rl_isearch_terminators);
-
+ v = _rl_get_string_variable_value (string_varlist[i].name);
+ if (v == 0) /* _rl_isearch_terminators can be NULL */
+ continue;
if (print_readably)
- fprintf (rl_outstream, "set isearch-terminators \"%s\"\n", disp);
+ fprintf (rl_outstream, "set %s %s\n", string_varlist[i].name, v);
else
- fprintf (rl_outstream, "isearch-terminators is set to \"%s\"\n", disp);
-
- free (disp);
+ fprintf (rl_outstream, "%s is set to `%s'\n", string_varlist[i].name, v);
}
-
- /* keymap */
- kname = rl_get_keymap_name (_rl_keymap);
- if (kname == 0)
- kname = rl_get_keymap_name_from_edit_mode ();
- if (print_readably)
- fprintf (rl_outstream, "set keymap %s\n", kname ? kname : "none");
- else
- fprintf (rl_outstream, "keymap is set to `%s'\n", kname ? kname : "none");
}
/* Print all of the current variables and their values to
@@ -2112,28 +2263,6 @@ rl_dump_variables (count, key)
return (0);
}
-/* Bind key sequence KEYSEQ to DEFAULT_FUNC if KEYSEQ is unbound. Right
- now, this is always used to attempt to bind the arrow keys, hence the
- check for rl_vi_movement_mode. */
-void
-_rl_bind_if_unbound (keyseq, default_func)
- const char *keyseq;
- rl_command_func_t *default_func;
-{
- rl_command_func_t *func;
-
- if (keyseq)
- {
- func = rl_function_of_keyseq (keyseq, _rl_keymap, (int *)NULL);
-#if defined (VI_MODE)
- if (!func || func == rl_do_lowercase_version || func == rl_vi_movement_mode)
-#else
- if (!func || func == rl_do_lowercase_version)
-#endif
- rl_set_key (keyseq, default_func, _rl_keymap);
- }
-}
-
/* Return non-zero if any members of ARRAY are a substring in STRING. */
static int
substring_member_of_array (string, array)
diff --git a/readline/callback.c b/readline/callback.c
index a8f4323c929..9120969ca23 100644
--- a/readline/callback.c
+++ b/readline/callback.c
@@ -1,6 +1,6 @@
/* callback.c -- functions to use readline as an X `callback' mechanism. */
-/* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -44,9 +44,14 @@
#include "readline.h"
#include "rlprivate.h"
+/* Private data for callback registration functions. See comments in
+ rl_callback_read_char for more details. */
+_rl_callback_func_t *_rl_callback_func = 0;
+_rl_callback_generic_arg *_rl_callback_data = 0;
+
/* **************************************************************** */
/* */
-/* Callback Readline Functions */
+/* Callback Readline Functions */
/* */
/* **************************************************************** */
@@ -72,7 +77,8 @@ _rl_callback_newline ()
{
in_handler = 1;
- (*rl_prep_term_function) (_rl_meta_flag);
+ if (rl_prep_term_function)
+ (*rl_prep_term_function) (_rl_meta_flag);
#if defined (HANDLE_SIGNALS)
rl_set_signals ();
@@ -89,6 +95,7 @@ rl_callback_handler_install (prompt, linefunc)
rl_vcpfunc_t *linefunc;
{
rl_set_prompt (prompt);
+ RL_SETSTATE (RL_STATE_CALLBACK);
rl_linefunc = linefunc;
_rl_callback_newline ();
}
@@ -98,7 +105,8 @@ void
rl_callback_read_char ()
{
char *line;
- int eof;
+ int eof, jcode;
+ static procenv_t olevel;
if (rl_linefunc == NULL)
{
@@ -106,7 +114,79 @@ rl_callback_read_char ()
abort ();
}
- eof = readline_internal_char ();
+ memcpy ((void *)olevel, (void *)readline_top_level, sizeof (procenv_t));
+ jcode = setjmp (readline_top_level);
+ if (jcode)
+ {
+ (*rl_redisplay_function) ();
+ _rl_want_redisplay = 0;
+ memcpy ((void *)readline_top_level, (void *)olevel, sizeof (procenv_t));
+ return;
+ }
+
+ if (RL_ISSTATE (RL_STATE_ISEARCH))
+ {
+ eof = _rl_isearch_callback (_rl_iscxt);
+ if (eof == 0 && (RL_ISSTATE (RL_STATE_ISEARCH) == 0) && RL_ISSTATE (RL_STATE_INPUTPENDING))
+ rl_callback_read_char ();
+
+ return;
+ }
+ else if (RL_ISSTATE (RL_STATE_NSEARCH))
+ {
+ eof = _rl_nsearch_callback (_rl_nscxt);
+ return;
+ }
+ else if (RL_ISSTATE (RL_STATE_NUMERICARG))
+ {
+ eof = _rl_arg_callback (_rl_argcxt);
+ if (eof == 0 && (RL_ISSTATE (RL_STATE_NUMERICARG) == 0) && RL_ISSTATE (RL_STATE_INPUTPENDING))
+ rl_callback_read_char ();
+ /* XXX - this should handle _rl_last_command_was_kill better */
+ else if (RL_ISSTATE (RL_STATE_NUMERICARG) == 0)
+ _rl_internal_char_cleanup ();
+
+ return;
+ }
+ else if (RL_ISSTATE (RL_STATE_MULTIKEY))
+ {
+ eof = _rl_dispatch_callback (_rl_kscxt); /* For now */
+ while ((eof == -1 || eof == -2) && RL_ISSTATE (RL_STATE_MULTIKEY) && _rl_kscxt && (_rl_kscxt->flags & KSEQ_DISPATCHED))
+ eof = _rl_dispatch_callback (_rl_kscxt);
+ if (RL_ISSTATE (RL_STATE_MULTIKEY) == 0)
+ {
+ _rl_internal_char_cleanup ();
+ _rl_want_redisplay = 1;
+ }
+ }
+ else if (_rl_callback_func)
+ {
+ /* This allows functions that simply need to read an additional character
+ (like quoted-insert) to register a function to be called when input is
+ available. _rl_callback_data is simply a pointer to a struct that has
+ the argument count originally passed to the registering function and
+ space for any additional parameters. */
+ eof = (*_rl_callback_func) (_rl_callback_data);
+ /* If the function `deregisters' itself, make sure the data is cleaned
+ up. */
+ if (_rl_callback_func == 0)
+ {
+ if (_rl_callback_data)
+ {
+ _rl_callback_data_dispose (_rl_callback_data);
+ _rl_callback_data = 0;
+ }
+ _rl_internal_char_cleanup ();
+ }
+ }
+ else
+ eof = readline_internal_char ();
+
+ if (rl_done == 0 && _rl_want_redisplay)
+ {
+ (*rl_redisplay_function) ();
+ _rl_want_redisplay = 0;
+ }
/* We loop in case some function has pushed input back with rl_execute_next. */
for (;;)
@@ -115,7 +195,8 @@ rl_callback_read_char ()
{
line = readline_internal_teardown (eof);
- (*rl_deprep_term_function) ();
+ if (rl_deprep_term_function)
+ (*rl_deprep_term_function) ();
#if defined (HANDLE_SIGNALS)
rl_clear_signals ();
#endif
@@ -131,10 +212,10 @@ rl_callback_read_char ()
if (in_handler == 0 && rl_linefunc)
_rl_callback_newline ();
}
- if (rl_pending_input)
+ if (rl_pending_input || _rl_pushed_input_available () || RL_ISSTATE (RL_STATE_MACROINPUT))
eof = readline_internal_char ();
else
- break;
+ break;
}
}
@@ -143,14 +224,37 @@ void
rl_callback_handler_remove ()
{
rl_linefunc = NULL;
+ RL_UNSETSTATE (RL_STATE_CALLBACK);
if (in_handler)
{
in_handler = 0;
- (*rl_deprep_term_function) ();
+ if (rl_deprep_term_function)
+ (*rl_deprep_term_function) ();
#if defined (HANDLE_SIGNALS)
rl_clear_signals ();
#endif
}
}
+_rl_callback_generic_arg *
+_rl_callback_data_alloc (count)
+ int count;
+{
+ _rl_callback_generic_arg *arg;
+
+ arg = (_rl_callback_generic_arg *)xmalloc (sizeof (_rl_callback_generic_arg));
+ arg->count = count;
+
+ arg->i1 = arg->i2 = 0;
+
+ return arg;
+}
+
+void _rl_callback_data_dispose (arg)
+ _rl_callback_generic_arg *arg;
+{
+ if (arg)
+ free (arg);
+}
+
#endif
diff --git a/readline/chardefs.h b/readline/chardefs.h
index a537be220b0..def3a111bd3 100644
--- a/readline/chardefs.h
+++ b/readline/chardefs.h
@@ -77,11 +77,17 @@
# define isxdigit(c) (isdigit((c)) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F'))
#endif
-#define NON_NEGATIVE(c) ((unsigned char)(c) == (c))
+#if defined (CTYPE_NON_ASCII)
+# define NON_NEGATIVE(c) 1
+#else
+# define NON_NEGATIVE(c) ((unsigned char)(c) == (c))
+#endif
/* Some systems define these; we want our definitions. */
#undef ISPRINT
+/* Beware: these only work with single-byte ASCII characters. */
+
#define ISALNUM(c) (IN_CTYPE_DOMAIN (c) && isalnum (c))
#define ISALPHA(c) (IN_CTYPE_DOMAIN (c) && isalpha (c))
#define ISDIGIT(c) (IN_CTYPE_DOMAIN (c) && isdigit (c))
diff --git a/readline/complete.c b/readline/complete.c
index a4ff24e8720..d93c15ae55d 100644
--- a/readline/complete.c
+++ b/readline/complete.c
@@ -1,6 +1,6 @@
/* complete.c -- filename completion for readline. */
-/* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -28,7 +28,7 @@
#include <sys/types.h>
#include <fcntl.h>
#if defined (HAVE_SYS_FILE_H)
-#include <sys/file.h>
+# include <sys/file.h>
#endif
#if defined (HAVE_UNISTD_H)
@@ -48,7 +48,7 @@
extern int errno;
#endif /* !errno */
-#ifdef HAVE_PWD_H
+#if defined (HAVE_PWD_H)
#include <pwd.h>
#endif
@@ -81,10 +81,9 @@ typedef int QSFUNC ();
/* Most systems don't declare getpwent in <pwd.h> if _POSIX_SOURCE is
defined. */
-#if defined(HAVE_GETPWENT) && \
- (!defined (HAVE_GETPW_DECLS) || defined (_POSIX_SOURCE))
+#if defined (HAVE_GETPWENT) && (!defined (HAVE_GETPW_DECLS) || defined (_POSIX_SOURCE))
extern struct passwd *getpwent PARAMS((void));
-#endif /* defiend (HAVE_GETPWENT) && (!HAVE_GETPW_DECLS || _POSIX_SOURCE) */
+#endif /* HAVE_GETPWENT && (!HAVE_GETPW_DECLS || _POSIX_SOURCE) */
/* If non-zero, then this is the address of a function to call when
completing a word would normally display the list of possible matches.
@@ -102,12 +101,16 @@ rl_compdisp_func_t *rl_completion_display_matches_hook = (rl_compdisp_func_t *)N
static int stat_char PARAMS((char *));
#endif
+static int path_isdir PARAMS((const char *));
+
static char *rl_quote_filename PARAMS((char *, int, char *));
static void set_completion_defaults PARAMS((int));
static int get_y_or_n PARAMS((int));
static int _rl_internal_pager PARAMS((int));
static char *printable_part PARAMS((char *));
+static int fnwidth PARAMS((const char *));
+static int fnprint PARAMS((const char *));
static int print_filename PARAMS((char *, char *));
static char **gen_completion_matches PARAMS((char *, int, int, rl_compentry_func_t *, int, int));
@@ -133,6 +136,10 @@ static char *make_quoted_replacement PARAMS((char *, int, char *));
/* If non-zero, non-unique completions always show the list of matches. */
int _rl_complete_show_all = 0;
+/* If non-zero, non-unique completions show the list of matches, unless it
+ is not possible to do partial completion and modify the line. */
+int _rl_complete_show_unmodified = 0;
+
/* If non-zero, completed directory names have a slash appended. */
int _rl_complete_mark_directories = 1;
@@ -201,7 +208,8 @@ int rl_completion_type = 0;
/* Up to this many items will be displayed in response to a
possible-completions call. After that, we ask the user if
- she is sure she wants to see them all. */
+ she is sure she wants to see them all. A negative value means
+ don't ask. */
int rl_completion_query_items = 100;
int _rl_page_completions = 1;
@@ -217,7 +225,12 @@ const char *rl_basic_quote_characters = "\"'";
/* The list of characters that signal a break between words for
rl_complete_internal. The default list is the contents of
rl_basic_word_break_characters. */
-const char *rl_completer_word_break_characters = (const char *)NULL;
+/*const*/ char *rl_completer_word_break_characters = (/*const*/ char *)NULL;
+
+/* Hook function to allow an application to set the completion word
+ break characters before readline breaks up the line. Allows
+ position-dependent word break characters. */
+rl_cpvfunc_t *rl_completion_word_break_hook = (rl_cpvfunc_t *)NULL;
/* List of characters which can be used to quote a substring of the line.
Completion occurs on the entire substring, and within the substring
@@ -285,6 +298,19 @@ int rl_completion_suppress_append = 0;
default is a space. */
int rl_completion_append_character = ' ';
+/* If non-zero, the completion functions don't append any closing quote.
+ This is set to 0 by rl_complete_internal and may be changed by an
+ application-specific completion function. */
+int rl_completion_suppress_quote = 0;
+
+/* Set to any quote character readline thinks it finds before any application
+ completion function is called. */
+int rl_completion_quote_character;
+
+/* Set to a non-zero value if readline found quoting anywhere in the word to
+ be completed; set before any application completion function is called. */
+int rl_completion_found_quote;
+
/* If non-zero, a slash will be appended to completed filenames that are
symbolic links to directory names, subject to the value of the
mark-directories variable (which is user-settable). This exists so
@@ -323,6 +349,8 @@ rl_complete (ignore, invoking_key)
return (rl_complete_internal ('?'));
else if (_rl_complete_show_all)
return (rl_complete_internal ('!'));
+ else if (_rl_complete_show_unmodified)
+ return (rl_complete_internal ('@'));
else
return (rl_complete_internal (TAB));
}
@@ -355,6 +383,8 @@ rl_completion_mode (cfunc)
return '?';
else if (_rl_complete_show_all)
return '!';
+ else if (_rl_complete_show_unmodified)
+ return '@';
else
return TAB;
}
@@ -375,7 +405,7 @@ set_completion_defaults (what_to_do)
rl_filename_completion_desired = 0;
rl_filename_quoting_desired = 1;
rl_completion_type = what_to_do;
- rl_completion_suppress_append = 0;
+ rl_completion_suppress_append = rl_completion_suppress_quote = 0;
/* The completion entry function may optionally change this. */
rl_completion_mark_symlink_dirs = _rl_complete_mark_symlink_dirs;
@@ -426,6 +456,15 @@ _rl_internal_pager (lines)
return 0;
}
+static int
+path_isdir (filename)
+ const char *filename;
+{
+ struct stat finfo;
+
+ return (stat (filename, &finfo) == 0 && S_ISDIR (finfo.st_mode));
+}
+
#if defined (VISIBLE_STATS)
/* Return the character which best describes FILENAME.
`@' for symbolic links
@@ -523,53 +562,149 @@ printable_part (pathname)
return ++temp;
}
+/* Compute width of STRING when displayed on screen by print_filename */
+static int
+fnwidth (string)
+ const char *string;
+{
+ int width, pos;
+#if defined (HANDLE_MULTIBYTE)
+ mbstate_t ps;
+ int left, w;
+ size_t clen;
+ wchar_t wc;
+
+ left = strlen (string) + 1;
+ memset (&ps, 0, sizeof (mbstate_t));
+#endif
+
+ width = pos = 0;
+ while (string[pos])
+ {
+ if (CTRL_CHAR (*string) || *string == RUBOUT)
+ {
+ width += 2;
+ pos++;
+ }
+ else
+ {
+#if defined (HANDLE_MULTIBYTE)
+ clen = mbrtowc (&wc, string + pos, left - pos, &ps);
+ if (MB_INVALIDCH (clen))
+ {
+ width++;
+ pos++;
+ memset (&ps, 0, sizeof (mbstate_t));
+ }
+ else if (MB_NULLWCH (clen))
+ break;
+ else
+ {
+ pos += clen;
+ w = wcwidth (wc);
+ width += (w >= 0) ? w : 1;
+ }
+#else
+ width++;
+ pos++;
+#endif
+ }
+ }
+
+ return width;
+}
+
+static int
+fnprint (to_print)
+ const char *to_print;
+{
+ int printed_len;
+ const char *s;
+#if defined (HANDLE_MULTIBYTE)
+ mbstate_t ps;
+ const char *end;
+ size_t tlen;
+ int width, w;
+ wchar_t wc;
+
+ end = to_print + strlen (to_print) + 1;
+ memset (&ps, 0, sizeof (mbstate_t));
+#endif
+
+ printed_len = 0;
+ s = to_print;
+ while (*s)
+ {
+ if (CTRL_CHAR (*s))
+ {
+ putc ('^', rl_outstream);
+ putc (UNCTRL (*s), rl_outstream);
+ printed_len += 2;
+ s++;
+#if defined (HANDLE_MULTIBYTE)
+ memset (&ps, 0, sizeof (mbstate_t));
+#endif
+ }
+ else if (*s == RUBOUT)
+ {
+ putc ('^', rl_outstream);
+ putc ('?', rl_outstream);
+ printed_len += 2;
+ s++;
+#if defined (HANDLE_MULTIBYTE)
+ memset (&ps, 0, sizeof (mbstate_t));
+#endif
+ }
+ else
+ {
+#if defined (HANDLE_MULTIBYTE)
+ tlen = mbrtowc (&wc, s, end - s, &ps);
+ if (MB_INVALIDCH (tlen))
+ {
+ tlen = 1;
+ width = 1;
+ memset (&ps, 0, sizeof (mbstate_t));
+ }
+ else if (MB_NULLWCH (tlen))
+ break;
+ else
+ {
+ w = wcwidth (wc);
+ width = (w >= 0) ? w : 1;
+ }
+ fwrite (s, 1, tlen, rl_outstream);
+ s += tlen;
+ printed_len += width;
+#else
+ putc (*s, rl_outstream);
+ s++;
+ printed_len++;
+#endif
+ }
+ }
+
+ return printed_len;
+}
+
/* Output TO_PRINT to rl_outstream. If VISIBLE_STATS is defined and we
are using it, check for and output a single character for `special'
filenames. Return the number of characters we output. */
-#define PUTX(c) \
- do { \
- if (CTRL_CHAR (c)) \
- { \
- putc ('^', rl_outstream); \
- putc (UNCTRL (c), rl_outstream); \
- printed_len += 2; \
- } \
- else if (c == RUBOUT) \
- { \
- putc ('^', rl_outstream); \
- putc ('?', rl_outstream); \
- printed_len += 2; \
- } \
- else \
- { \
- putc (c, rl_outstream); \
- printed_len++; \
- } \
- } while (0)
-
static int
print_filename (to_print, full_pathname)
char *to_print, *full_pathname;
{
- int printed_len = 0;
-#if !defined (VISIBLE_STATS)
- char *s;
+ int printed_len, extension_char, slen, tlen;
+ char *s, c, *new_full_pathname, *dn;
- for (s = to_print; *s; s++)
- {
- PUTX (*s);
- }
-#else
- char *s, c, *new_full_pathname;
- int extension_char, slen, tlen;
+ extension_char = 0;
+ printed_len = fnprint (to_print);
- for (s = to_print; *s; s++)
- {
- PUTX (*s);
- }
-
- if (rl_filename_completion_desired && rl_visible_stats)
+#if defined (VISIBLE_STATS)
+ if (rl_filename_completion_desired && (rl_visible_stats || _rl_complete_mark_directories))
+#else
+ if (rl_filename_completion_desired && _rl_complete_mark_directories)
+#endif
{
/* If to_print != full_pathname, to_print is the basename of the
path passed. In this case, we try to expand the directory
@@ -585,7 +720,17 @@ print_filename (to_print, full_pathname)
files in the root directory. If we pass a null string to the
bash directory completion hook, for example, it will expand it
to the current directory. We just want the `/'. */
- s = tilde_expand (full_pathname && *full_pathname ? full_pathname : "/");
+ if (full_pathname == 0 || *full_pathname == 0)
+ dn = "/";
+ else if (full_pathname[0] != '/')
+ dn = full_pathname;
+ else if (full_pathname[1] == 0)
+ dn = "//"; /* restore trailing slash to `//' */
+ else if (full_pathname[1] == '/' && full_pathname[2] == 0)
+ dn = "/"; /* don't turn /// into // */
+ else
+ dn = full_pathname;
+ s = tilde_expand (dn);
if (rl_directory_completion_hook)
(*rl_directory_completion_hook) (&s);
@@ -593,10 +738,20 @@ print_filename (to_print, full_pathname)
tlen = strlen (to_print);
new_full_pathname = (char *)xmalloc (slen + tlen + 2);
strcpy (new_full_pathname, s);
+ if (s[slen - 1] == '/')
+ slen--;
+ else
+ new_full_pathname[slen] = '/';
new_full_pathname[slen] = '/';
strcpy (new_full_pathname + slen + 1, to_print);
- extension_char = stat_char (new_full_pathname);
+#if defined (VISIBLE_STATS)
+ if (rl_visible_stats)
+ extension_char = stat_char (new_full_pathname);
+ else
+#endif
+ if (path_isdir (new_full_pathname))
+ extension_char = '/';
free (new_full_pathname);
to_print[-1] = c;
@@ -604,7 +759,13 @@ print_filename (to_print, full_pathname)
else
{
s = tilde_expand (full_pathname);
- extension_char = stat_char (s);
+#if defined (VISIBLE_STATS)
+ if (rl_visible_stats)
+ extension_char = stat_char (s);
+ else
+#endif
+ if (path_isdir (s))
+ extension_char = '/';
}
free (s);
@@ -614,7 +775,7 @@ print_filename (to_print, full_pathname)
printed_len++;
}
}
-#endif /* VISIBLE_STATS */
+
return printed_len;
}
@@ -654,19 +815,25 @@ _rl_find_completion_word (fp, dp)
int *fp, *dp;
{
int scan, end, found_quote, delimiter, pass_next, isbrk;
- char quote_char;
+ char quote_char, *brkchars;
end = rl_point;
found_quote = delimiter = 0;
quote_char = '\0';
+ brkchars = 0;
+ if (rl_completion_word_break_hook)
+ brkchars = (*rl_completion_word_break_hook) ();
+ if (brkchars == 0)
+ brkchars = rl_completer_word_break_characters;
+
if (rl_completer_quote_characters)
{
/* We have a list of characters which can be used in pairs to
quote substrings for the completer. Try to find the start
of an unclosed quoted substring. */
/* FOUND_QUOTE is set so we know what kind of quotes we found. */
- for (scan = pass_next = 0; scan < end; scan++)
+ for (scan = pass_next = 0; scan < end; scan = MB_NEXTCHAR (rl_line_buffer, scan, 1, MB_FIND_ANY))
{
if (pass_next)
{
@@ -716,15 +883,11 @@ _rl_find_completion_word (fp, dp)
/* We didn't find an unclosed quoted substring upon which to do
completion, so use the word break characters to find the
substring on which to complete. */
-#if defined (HANDLE_MULTIBYTE)
- while (rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_ANY))
-#else
- while (--rl_point)
-#endif
+ while (rl_point = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_ANY))
{
scan = rl_line_buffer[rl_point];
- if (strchr (rl_completer_word_break_characters, scan) == 0)
+ if (strchr (brkchars, scan) == 0)
continue;
/* Call the application-specific function to tell us whether
@@ -752,9 +915,9 @@ _rl_find_completion_word (fp, dp)
if (rl_char_is_quoted_p)
isbrk = (found_quote == 0 ||
(*rl_char_is_quoted_p) (rl_line_buffer, rl_point) == 0) &&
- strchr (rl_completer_word_break_characters, scan) != 0;
+ strchr (brkchars, scan) != 0;
else
- isbrk = strchr (rl_completer_word_break_characters, scan) != 0;
+ isbrk = strchr (brkchars, scan) != 0;
if (isbrk)
{
@@ -789,6 +952,9 @@ gen_completion_matches (text, start, end, our_func, found_quote, quote_char)
{
char **matches, *temp;
+ rl_completion_found_quote = found_quote;
+ rl_completion_quote_character = quote_char;
+
/* If the user wants to TRY to complete, but then wants to give
up and use the default completion function, they set the
variable rl_attempted_completion_function. */
@@ -892,6 +1058,7 @@ compute_lcd_of_matches (match_list, matches, text)
{
register int i, c1, c2, si;
int low; /* Count of max-matched characters. */
+ char *dtext; /* dequoted TEXT, if needed */
#if defined (HANDLE_MULTIBYTE)
int v;
mbstate_t ps1, ps2;
@@ -983,6 +1150,26 @@ compute_lcd_of_matches (match_list, matches, text)
the user typed in the face of multiple matches differing in case. */
if (_rl_completion_case_fold)
{
+ /* We're making an assumption here:
+ IF we're completing filenames AND
+ the application has defined a filename dequoting function AND
+ we found a quote character AND
+ the application has requested filename quoting
+ THEN
+ we assume that TEXT was dequoted before checking against
+ the file system and needs to be dequoted here before we
+ check against the list of matches
+ FI */
+ dtext = (char *)NULL;
+ if (rl_filename_completion_desired &&
+ rl_filename_dequoting_function &&
+ rl_completion_found_quote &&
+ rl_filename_quoting_desired)
+ {
+ dtext = (*rl_filename_dequoting_function) ((char *)text, rl_completion_quote_character);
+ text = dtext;
+ }
+
/* sort the list to get consistent answers. */
qsort (match_list+1, matches, sizeof(char *), (QSFUNC *)_rl_qsort_string_compare);
@@ -1002,6 +1189,8 @@ compute_lcd_of_matches (match_list, matches, text)
else
/* otherwise, just use the text the user typed. */
strncpy (match_list[0], text, low);
+
+ FREE (dtext);
}
else
strncpy (match_list[0], match_list[1], low);
@@ -1206,7 +1395,7 @@ display_matches (matches)
for (max = 0, i = 1; matches[i]; i++)
{
temp = printable_part (matches[i]);
- len = strlen (temp);
+ len = fnwidth (temp);
if (len > max)
max = len;
@@ -1223,7 +1412,7 @@ display_matches (matches)
/* If there are many items, then ask the user if she really wants to
see them all. */
- if (len >= rl_completion_query_items)
+ if (rl_completion_query_items > 0 && len >= rl_completion_query_items)
{
rl_crlf ();
fprintf (rl_outstream, "Display all %d possibilities? (y or n)", len);
@@ -1341,7 +1530,8 @@ append_to_match (text, delimiter, quote_char, nontrivial_match)
struct stat finfo;
temp_string_index = 0;
- if (quote_char && rl_point && rl_line_buffer[rl_point - 1] != quote_char)
+ if (quote_char && rl_point && rl_completion_suppress_quote == 0 &&
+ rl_line_buffer[rl_point - 1] != quote_char)
temp_string[temp_string_index++] = quote_char;
if (delimiter)
@@ -1359,7 +1549,7 @@ append_to_match (text, delimiter, quote_char, nontrivial_match)
: stat (filename, &finfo);
if (s == 0 && S_ISDIR (finfo.st_mode))
{
- if (_rl_complete_mark_directories)
+ if (_rl_complete_mark_directories /* && rl_completion_suppress_append == 0 */)
{
/* This is clumsy. Avoid putting in a double slash if point
is at the end of the line and the previous character is a
@@ -1452,7 +1642,9 @@ _rl_free_match_list (matches)
TAB means do standard completion.
`*' means insert all of the possible completions.
`!' means to do standard completion, and list all possible completions if
- there is more than one. */
+ there is more than one.
+ `@' means to do standard completion, and list all possible completions if
+ there is more than one and partial completion is not possible. */
int
rl_complete_internal (what_to_do)
int what_to_do;
@@ -1471,7 +1663,6 @@ rl_complete_internal (what_to_do)
our_func = rl_completion_entry_function
? rl_completion_entry_function
: rl_filename_completion_function;
-
/* We now look backwards for the start of a filename/variable word. */
end = rl_point;
found_quote = delimiter = 0;
@@ -1519,6 +1710,7 @@ rl_complete_internal (what_to_do)
{
case TAB:
case '!':
+ case '@':
/* Insert the first match with proper quoting. */
if (*matches[0])
insert_match (matches[0], start, matches[1] ? MULT_MATCH : SINGLE_MATCH, &quote_char);
@@ -1538,6 +1730,12 @@ rl_complete_internal (what_to_do)
display_matches (matches);
break;
}
+ else if (what_to_do == '@')
+ {
+ if (nontrivial_lcd == 0)
+ display_matches (matches);
+ break;
+ }
else if (rl_editing_mode != vi_mode)
rl_ding (); /* There are other matches remaining. */
}
@@ -1665,7 +1863,7 @@ rl_username_completion_function (text, state)
setpwent ();
}
-#ifdef HAVE_GETPWENT
+#if defined (HAVE_GETPWENT)
while (entry = getpwent ())
{
/* Null usernames should result in all users as possible completions. */
@@ -1676,7 +1874,7 @@ rl_username_completion_function (text, state)
if (entry == 0)
{
-#ifdef HAVE_GETPWENT
+#if defined (HAVE_GETPWENT)
endpwent ();
#endif
return ((char *)NULL);
@@ -1990,9 +2188,11 @@ rl_menu_complete (count, ignore)
return (0);
}
- match_list_index = (match_list_index + count) % match_list_size;
+ match_list_index += count;
if (match_list_index < 0)
match_list_index += match_list_size;
+ else
+ match_list_index %= match_list_size;
if (match_list_index == 0 && match_list_size > 1)
{
diff --git a/readline/config.h.bot b/readline/config.h.bot
deleted file mode 100644
index d7a6dc45ce4..00000000000
--- a/readline/config.h.bot
+++ /dev/null
@@ -1,22 +0,0 @@
-/* config.h.bot */
-/* modify settings or make new ones based on what autoconf tells us. */
-
-/* Ultrix botches type-ahead when switching from canonical to
- non-canonical mode, at least through version 4.3 */
-#if !defined (HAVE_TERMIOS_H) || !defined (HAVE_TCGETATTR) || defined (ultrix)
-# define TERMIOS_MISSING
-#endif
-
-#if defined (STRCOLL_BROKEN)
-# undef HAVE_STRCOLL
-#endif
-
-#if defined (__STDC__) && defined (HAVE_STDARG_H)
-# define PREFER_STDARG
-# define USE_VARARGS
-#else
-# if defined (HAVE_VARARGS_H)
-# define PREFER_VARARGS
-# define USE_VARARGS
-# endif
-#endif
diff --git a/readline/config.h.in b/readline/config.h.in
index 8d1f0bcafa4..b4aae982a7b 100644
--- a/readline/config.h.in
+++ b/readline/config.h.in
@@ -1,11 +1,17 @@
/* config.h.in. Maintained by hand. */
+/* Define NO_MULTIBYTE_SUPPORT to not compile in support for multibyte
+ characters, even if the OS supports them. */
+#undef NO_MULTIBYTE_SUPPORT
+
/* Define if on MINIX. */
#undef _MINIX
/* Define as the return type of signal handlers (int or void). */
#undef RETSIGTYPE
+#undef VOID_SIGHANDLER
+
/* Characteristics of the compiler. */
#undef const
@@ -20,11 +26,18 @@
/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
#undef STAT_MACROS_BROKEN
-#undef VOID_SIGHANDLER
-
/* Define if you have the fcntl function. */
-#undef HAVE_FCNTL
-
+#undef HAVE_FCNTL
+
+/* Define if you have the getpwent function. */
+#undef HAVE_GETPWENT
+
+/* Define if you have the getpwnam function. */
+#undef HAVE_GETPWNAM
+
+/* Define if you have the getpwuid function. */
+#undef HAVE_GETPWUID
+
/* Define if you have the isascii function. */
#undef HAVE_ISASCII
@@ -37,6 +50,9 @@
/* Define if you have the lstat function. */
#undef HAVE_LSTAT
+/* Define if you have the mbrlen function. */
+#undef HAVE_MBRLEN
+
/* Define if you have the mbrtowc function. */
#undef HAVE_MBRTOWC
@@ -49,15 +65,6 @@
/* Define if you have the putenv function. */
#undef HAVE_PUTENV
-/* Define if you have the getpwent function. */
-#undef HAVE_GETPWENT
-
-/* Define if you have the getpwnam function. */
-#undef HAVE_GETPWNAM
-
-/* Define if you have the getpwnam function. */
-#undef HAVE_GETPWUID
-
/* Define if you have the select function. */
#undef HAVE_SELECT
@@ -84,12 +91,20 @@
/* Define if you have the vsnprintf function. */
#undef HAVE_VSNPRINTF
+/* Define if you have the wctomb function. */
+#undef HAVE_WCTOMB
+
/* Define if you have the wcwidth function. */
#undef HAVE_WCWIDTH
+#undef STDC_HEADERS
+
/* Define if you have the <dirent.h> header file. */
#undef HAVE_DIRENT_H
+/* Define if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
/* Define if you have the <langinfo.h> header file. */
#undef HAVE_LANGINFO_H
@@ -198,6 +213,8 @@
#undef HAVE_POSIX_SIGSETJMP
+#undef CTYPE_NON_ASCII
+
/* modify settings or make new ones based on what autoconf tells us. */
/* Ultrix botches type-ahead when switching from canonical to
diff --git a/readline/configure b/readline/configure
index 720d789bae0..17b6f52f4f7 100755
--- a/readline/configure
+++ b/readline/configure
@@ -1,7 +1,7 @@
#! /bin/sh
-# From configure.in for Readline 4.3, version 2.45, from autoconf version AC_ACVERSION.
+# From configure.in for Readline 5.1, version 2.59.
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for readline 4.3.
+# Generated by GNU Autoconf 2.59 for readline 5.1-release.
#
# Report bugs to <bug-readline@gnu.org>.
#
@@ -270,8 +270,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='readline'
PACKAGE_TARNAME='readline'
-PACKAGE_VERSION='4.3'
-PACKAGE_STRING='readline 4.3'
+PACKAGE_VERSION='5.1-release'
+PACKAGE_STRING='readline 5.1-release'
PACKAGE_BUGREPORT='bug-readline@gnu.org'
ac_unique_file="readline.h"
@@ -312,7 +312,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP CROSS_COMPILING_FLAG CC_FOR_BUILD INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AR RANLIB ac_ct_RANLIB MAKE_SHELL WCWIDTH_OBJ SHOBJ_CC SHOBJ_CFLAGS SHOBJ_LD SHOBJ_LDFLAGS SHOBJ_XLDFLAGS SHOBJ_LIBS SHOBJ_STATUS SHLIB_STATUS SHLIB_XLDFLAGS SHLIB_LIBSUFF SHLIB_LIBVERSION SHLIB_LIBS SHLIB_MAJOR SHLIB_MINOR STATIC_TARGET SHARED_TARGET STATIC_INSTALL_TARGET SHARED_INSTALL_TARGET BUILD_DIR LOCAL_CFLAGS LOCAL_LDFLAGS LOCAL_DEFS ARFLAGS LIBVERSION TERMCAP_LIB LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os CROSS_COMPILE SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP CC_FOR_BUILD INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AR RANLIB ac_ct_RANLIB MAKE_SHELL WCWIDTH_OBJ SHOBJ_CC SHOBJ_CFLAGS SHOBJ_LD SHOBJ_LDFLAGS SHOBJ_XLDFLAGS SHOBJ_LIBS SHOBJ_STATUS SHLIB_STATUS SHLIB_XLDFLAGS SHLIB_DOT SHLIB_LIBPREF SHLIB_LIBSUFF SHLIB_LIBVERSION SHLIB_DLLVERSION SHLIB_LIBS SHLIB_MAJOR SHLIB_MINOR STATIC_TARGET SHARED_TARGET STATIC_INSTALL_TARGET SHARED_INSTALL_TARGET PURIFY BUILD_DIR LOCAL_CFLAGS LOCAL_LDFLAGS LOCAL_DEFS ARFLAGS LIBVERSION TERMCAP_LIB LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -781,7 +781,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures readline 4.3 to adapt to many kinds of systems.
+\`configure' configures readline 5.1-release to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -842,17 +842,14 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of readline 4.3:";;
+ short | recursive ) echo "Configuration of readline 5.1-release:";;
esac
cat <<\_ACEOF
Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
-<<<<<<< configure
- --enable-shared build shared libraries [default=NO]
-=======
->>>>>>> 1.6
+ --enable-multibyte enable multibyte characters if OS supports them
--enable-static build static libraries [default=YES]
Optional Packages:
@@ -860,6 +857,7 @@ Optional Packages:
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-curses use the curses library instead of the termcap
library
+ --with-purify configure to postprocess with purify
Some influential environment variables:
CC C compiler command
@@ -962,14 +960,14 @@ esac
else
echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi
- cd $ac_popdir
+ cd "$ac_popdir"
done
fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-readline configure 4.3
+readline configure 5.1-release
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
@@ -983,7 +981,7 @@ cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by readline $as_me 4.3, which was
+It was created by readline $as_me 5.1-release, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -1323,13 +1321,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
- ac_config_headers="$ac_config_headers config.h"
-
-
-LIBVERSION=4.3
-
ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
if test -f $ac_dir/install-sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
@@ -1345,14 +1338,19 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
fi
done
if test -z "$ac_aux_dir"; then
- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
-echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \`cd $srcdir;pwd\`/.. $srcdir/\`cd $srcdir;pwd\`/.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in \`cd $srcdir;pwd\`/.. $srcdir/\`cd $srcdir;pwd\`/.." >&2;}
{ (exit 1); exit 1; }; }
fi
ac_config_guess="$SHELL $ac_aux_dir/config.guess"
ac_config_sub="$SHELL $ac_aux_dir/config.sub"
ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+ ac_config_headers="$ac_config_headers config.h"
+
+
+LIBVERSION=5.1
+
# Make sure we can run config.sub.
$ac_config_sub sun4 >/dev/null 2>&1 ||
{ { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
@@ -1409,6 +1407,7 @@ host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
opt_curses=no
+opt_purify=no
# Check whether --with-curses or --without-curses was given.
@@ -1417,19 +1416,69 @@ if test "${with_curses+set}" = set; then
opt_curses=$withval
fi;
+# Check whether --with-purify or --without-purify was given.
+if test "${with_purify+set}" = set; then
+ withval="$with_purify"
+ opt_purify=$withval
+fi;
+
if test "$opt_curses" = "yes"; then
prefer_curses=yes
fi
+if test "$opt_purify" = yes; then
+ PURIFY="purify"
+else
+ PURIFY=
+fi
+
+opt_multibyte=yes
opt_static_libs=yes
opt_shared_libs=no
+# Check whether --enable-multibyte or --disable-multibyte was given.
+if test "${enable_multibyte+set}" = set; then
+ enableval="$enable_multibyte"
+ opt_multibyte=$enableval
+fi;
# Check whether --enable-static or --disable-static was given.
if test "${enable_static+set}" = set; then
enableval="$enable_static"
opt_static_libs=$enableval
fi;
+if test $opt_multibyte = no; then
+cat >>confdefs.h <<\_ACEOF
+#define NO_MULTIBYTE_SUPPORT 1
+_ACEOF
+
+fi
+
+
+
+if test "x$cross_compiling" = "xyes"; then
+ case "${host}" in
+ *-cygwin*)
+ cross_cache=${srcdir}/cross-build/cygwin.cache
+ ;;
+ *-mingw*)
+ cross_cache=${srcdir}/cross-build/mingw.cache
+ ;;
+ i[3456]86-*-beos*)
+ cross_cache=${srcdir}/cross-build/x86-beos.cache
+ ;;
+ *) echo "configure: cross-compiling for $host is not supported" >&2
+ ;;
+ esac
+ if test -n "${cross_cache}" && test -r "${cross_cache}"; then
+ echo "loading cross-build cache file ${cross_cache}"
+ . ${cross_cache}
+ fi
+ unset cross_cache
+ CROSS_COMPILE='-DCROSS_COMPILING'
+
+fi
+
echo ""
echo "Beginning configuration for readline-$LIBVERSION for ${host_cpu}-${host_vendor}-${host_os}"
echo ""
@@ -2034,8 +2083,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2093,8 +2141,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2210,8 +2257,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2265,8 +2311,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2311,8 +2356,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2356,8 +2400,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2680,8 +2723,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2851,8 +2893,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2915,8 +2956,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3071,13 +3111,6 @@ if test "x$cross_compiling" = "xyes"; then
fi
fi
-if test "x$cross_compiling" = "xyes"; then
- CROSS_COMPILING_FLAG=-DCROSS_COMPILING
-else
- CROSS_COMPILING_FLAG=
-fi
-
-
if test -z "$CC_FOR_BUILD"; then
if test "x$cross_compiling" = "xno"; then
CC_FOR_BUILD='$(CC)'
@@ -3416,8 +3449,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3500,8 +3532,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3571,8 +3602,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3634,8 +3664,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3700,8 +3729,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3735,6 +3763,172 @@ _ACEOF
fi
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_header_stdc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ exit(2);
+ exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+
echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5
echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6
if test "${ac_cv_header_stat_broken+set}" = set; then
@@ -3833,8 +4027,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3906,8 +4099,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3961,8 +4153,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4033,8 +4224,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4088,8 +4278,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4127,23 +4316,322 @@ fi
+for ac_func in fcntl kill lstat
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+
+
+
+
+
+
+
+for ac_func in memmove putenv select setenv setlocale \
+ strcasecmp strpbrk tcgetattr vsnprintf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+#undef $ac_func
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+for ac_func in isascii isxdigit
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+#undef $ac_func
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+fi
+done
-for ac_func in fcntl kill lstat memmove putenv select setenv setlocale \
- strcasecmp strpbrk tcgetattr vsnprintf isascii isxdigit \
- getpwnam getpwent getpwuid
+for ac_func in getpwent getpwnam getpwuid
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -4211,8 +4699,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4318,14 +4805,160 @@ fi
+for ac_header in fcntl.h unistd.h stdlib.h varargs.h stdarg.h string.h strings.h \
+ limits.h locale.h pwd.h memory.h termcap.h termios.h termio.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ----------------------------------- ##
+## Report this to bug-readline@gnu.org ##
+## ----------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
-for ac_header in unistd.h stdlib.h varargs.h stdarg.h string.h strings.h \
- limits.h sys/ptem.h sys/pte.h sys/stream.h sys/select.h \
- termcap.h termios.h termio.h sys/file.h locale.h memory.h \
- pwd.h
+
+
+
+for ac_header in sys/pte.h sys/stream.h sys/select.h sys/file.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
@@ -4358,8 +4991,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4476,6 +5108,71 @@ done
+for ac_header in sys/ptem.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#if HAVE_SYS_STREAM_H
+# include <sys/stream.h>
+#endif
+
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
echo "$as_me:$LINENO: checking for type of signal functions" >&5
echo $ECHO_N "checking for type of signal functions... $ECHO_C" >&6
if test "${bash_cv_signal_vintage+set}" = set; then
@@ -4512,8 +5209,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4558,8 +5254,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4607,8 +5302,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4880,8 +5574,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5001,6 +5694,89 @@ _ACEOF
fi
+echo "$as_me:$LINENO: checking whether the ctype macros accept non-ascii characters" >&5
+echo $ECHO_N "checking whether the ctype macros accept non-ascii characters... $ECHO_C" >&6
+if test "${bash_cv_func_ctype_nonascii+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then
+ { echo "$as_me:$LINENO: WARNING: cannot check ctype macros if cross compiling -- defaulting to no" >&5
+echo "$as_me: WARNING: cannot check ctype macros if cross compiling -- defaulting to no" >&2;}
+ bash_cv_func_ctype_nonascii=no
+
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef HAVE_LOCALE_H
+#include <locale.h>
+#endif
+#include <stdio.h>
+#include <ctype.h>
+
+main(c, v)
+int c;
+char *v[];
+{
+ char *deflocale;
+ unsigned char x;
+ int r1, r2;
+
+#ifdef HAVE_SETLOCALE
+ /* We take a shot here. If that locale is not known, try the
+ system default. We try this one because '\342' (226) is
+ known to be a printable character in that locale. */
+ deflocale = setlocale(LC_ALL, "en_US.ISO8859-1");
+ if (deflocale == 0)
+ deflocale = setlocale(LC_ALL, "");
+#endif
+
+ x = '\342';
+ r1 = isprint(x);
+ x -= 128;
+ r2 = isprint(x);
+ exit (r1 == 0 || r2 == 0);
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ bash_cv_func_ctype_nonascii=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+bash_cv_func_ctype_nonascii=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+
+echo "$as_me:$LINENO: result: $bash_cv_func_ctype_nonascii" >&5
+echo "${ECHO_T}$bash_cv_func_ctype_nonascii" >&6
+if test $bash_cv_func_ctype_nonascii = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define CTYPE_NON_ASCII 1
+_ACEOF
+
+fi
+
+
echo "$as_me:$LINENO: checking whether getpw functions are declared in pwd.h" >&5
echo $ECHO_N "checking whether getpw functions are declared in pwd.h... $ECHO_C" >&6
if test "${bash_cv_getpw_declared+set}" = set; then
@@ -5148,8 +5924,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5209,8 +5984,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5271,8 +6045,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5332,8 +6105,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5394,8 +6166,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5437,8 +6208,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5483,8 +6253,8 @@ echo "${ECHO_T}not found" >&6
fi
-echo "$as_me:$LINENO: checking if struct dirent has a d_ino member" >&5
-echo $ECHO_N "checking if struct dirent has a d_ino member... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking for struct dirent.d_ino" >&5
+echo $ECHO_N "checking for struct dirent.d_ino... $ECHO_C" >&6
if test "${bash_cv_dirent_has_dino+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -5534,8 +6304,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5561,14 +6330,14 @@ echo "$as_me:$LINENO: result: $bash_cv_dirent_has_dino" >&5
echo "${ECHO_T}$bash_cv_dirent_has_dino" >&6
if test $bash_cv_dirent_has_dino = yes; then
cat >>confdefs.h <<\_ACEOF
-#define STRUCT_DIRENT_HAS_D_INO 1
+#define HAVE_STRUCT_DIRENT_D_INO 1
_ACEOF
fi
-echo "$as_me:$LINENO: checking if struct dirent has a d_fileno member" >&5
-echo $ECHO_N "checking if struct dirent has a d_fileno member... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking for struct dirent.d_fileno" >&5
+echo $ECHO_N "checking for struct dirent.d_fileno... $ECHO_C" >&6
if test "${bash_cv_dirent_has_d_fileno+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -5618,8 +6387,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5645,7 +6413,7 @@ echo "$as_me:$LINENO: result: $bash_cv_dirent_has_d_fileno" >&5
echo "${ECHO_T}$bash_cv_dirent_has_d_fileno" >&6
if test $bash_cv_dirent_has_d_fileno = yes; then
cat >>confdefs.h <<\_ACEOF
-#define STRUCT_DIRENT_HAS_D_FILENO 1
+#define HAVE_STRUCT_DIRENT_D_FILENO 1
_ACEOF
fi
@@ -5665,6 +6433,98 @@ fi
if test "${bash_cv_termcap_lib+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
+ echo "$as_me:$LINENO: checking for tgetent" >&5
+echo $ECHO_N "checking for tgetent... $ECHO_C" >&6
+if test "${ac_cv_func_tgetent+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define tgetent to an innocuous variant, in case <limits.h> declares tgetent.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define tgetent innocuous_tgetent
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char tgetent (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef tgetent
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char tgetent ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_tgetent) || defined (__stub___tgetent)
+choke me
+#else
+char (*f) () = tgetent;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != tgetent;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_tgetent=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_tgetent=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_tgetent" >&5
+echo "${ECHO_T}$ac_cv_func_tgetent" >&6
+if test $ac_cv_func_tgetent = yes; then
+ bash_cv_termcap_lib=libc
+else
echo "$as_me:$LINENO: checking for tgetent in -ltermcap" >&5
echo $ECHO_N "checking for tgetent in -ltermcap... $ECHO_C" >&6
if test "${ac_cv_lib_termcap_tgetent+set}" = set; then
@@ -5703,8 +6563,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5770,8 +6629,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5837,8 +6695,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5904,8 +6761,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5944,6 +6800,8 @@ fi
fi
+fi
+
if test "X$_bash_needmsg" = "Xyes"; then
echo "$as_me:$LINENO: checking which library has the termcap functions" >&5
echo $ECHO_N "checking which library has the termcap functions... $ECHO_C" >&6
@@ -5963,6 +6821,9 @@ TERMCAP_DEP=
elif test $bash_cv_termcap_lib = libncurses; then
TERMCAP_LIB=-lncurses
TERMCAP_DEP=
+elif test $bash_cv_termcap_lib = libc; then
+TERMCAP_LIB=
+TERMCAP_DEP=
else
TERMCAP_LIB=-lcurses
TERMCAP_DEP=
@@ -6011,8 +6872,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -6161,8 +7021,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -6311,8 +7170,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -6428,6 +7286,102 @@ fi
done
+echo "$as_me:$LINENO: checking for mbsrtowcs" >&5
+echo $ECHO_N "checking for mbsrtowcs... $ECHO_C" >&6
+if test "${ac_cv_func_mbsrtowcs+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define mbsrtowcs to an innocuous variant, in case <limits.h> declares mbsrtowcs.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define mbsrtowcs innocuous_mbsrtowcs
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char mbsrtowcs (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef mbsrtowcs
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char mbsrtowcs ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_mbsrtowcs) || defined (__stub___mbsrtowcs)
+choke me
+#else
+char (*f) () = mbsrtowcs;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != mbsrtowcs;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_mbsrtowcs=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_mbsrtowcs=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_mbsrtowcs" >&5
+echo "${ECHO_T}$ac_cv_func_mbsrtowcs" >&6
+if test $ac_cv_func_mbsrtowcs = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MBSRTOWCS 1
+_ACEOF
+
+fi
+
echo "$as_me:$LINENO: checking for mbrtowc" >&5
echo $ECHO_N "checking for mbrtowc... $ECHO_C" >&6
if test "${ac_cv_func_mbrtowc+set}" = set; then
@@ -6493,8 +7447,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -6525,9 +7478,9 @@ _ACEOF
fi
-echo "$as_me:$LINENO: checking for mbsrtowcs" >&5
-echo $ECHO_N "checking for mbsrtowcs... $ECHO_C" >&6
-if test "${ac_cv_func_mbsrtowcs+set}" = set; then
+echo "$as_me:$LINENO: checking for mbrlen" >&5
+echo $ECHO_N "checking for mbrlen... $ECHO_C" >&6
+if test "${ac_cv_func_mbrlen+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -6536,12 +7489,12 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define mbsrtowcs to an innocuous variant, in case <limits.h> declares mbsrtowcs.
+/* Define mbrlen to an innocuous variant, in case <limits.h> declares mbrlen.
For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define mbsrtowcs innocuous_mbsrtowcs
+#define mbrlen innocuous_mbrlen
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char mbsrtowcs (); below.
+ which can conflict with char mbrlen (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
@@ -6551,7 +7504,7 @@ cat >>conftest.$ac_ext <<_ACEOF
# include <assert.h>
#endif
-#undef mbsrtowcs
+#undef mbrlen
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -6560,14 +7513,14 @@ extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char mbsrtowcs ();
+char mbrlen ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
-#if defined (__stub_mbsrtowcs) || defined (__stub___mbsrtowcs)
+#if defined (__stub_mbrlen) || defined (__stub___mbrlen)
choke me
#else
-char (*f) () = mbsrtowcs;
+char (*f) () = mbrlen;
#endif
#ifdef __cplusplus
}
@@ -6576,7 +7529,7 @@ char (*f) () = mbsrtowcs;
int
main ()
{
-return f != mbsrtowcs;
+return f != mbrlen;
;
return 0;
}
@@ -6590,8 +7543,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -6603,21 +7555,117 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_func_mbsrtowcs=yes
+ ac_cv_func_mbrlen=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_func_mbsrtowcs=no
+ac_cv_func_mbrlen=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_func_mbsrtowcs" >&5
-echo "${ECHO_T}$ac_cv_func_mbsrtowcs" >&6
-if test $ac_cv_func_mbsrtowcs = yes; then
+echo "$as_me:$LINENO: result: $ac_cv_func_mbrlen" >&5
+echo "${ECHO_T}$ac_cv_func_mbrlen" >&6
+if test $ac_cv_func_mbrlen = yes; then
cat >>confdefs.h <<\_ACEOF
-#define HAVE_MBSRTOWCS 1
+#define HAVE_MBRLEN 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for wctomb" >&5
+echo $ECHO_N "checking for wctomb... $ECHO_C" >&6
+if test "${ac_cv_func_wctomb+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define wctomb to an innocuous variant, in case <limits.h> declares wctomb.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define wctomb innocuous_wctomb
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char wctomb (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef wctomb
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char wctomb ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_wctomb) || defined (__stub___wctomb)
+choke me
+#else
+char (*f) () = wctomb;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != wctomb;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_wctomb=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_wctomb=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_wctomb" >&5
+echo "${ECHO_T}$ac_cv_func_wctomb" >&6
+if test $ac_cv_func_wctomb = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCTOMB 1
_ACEOF
fi
@@ -6687,8 +7735,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -6719,6 +7766,103 @@ _ACEOF
fi
+echo "$as_me:$LINENO: checking for wcsdup" >&5
+echo $ECHO_N "checking for wcsdup... $ECHO_C" >&6
+if test "${ac_cv_func_wcsdup+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define wcsdup to an innocuous variant, in case <limits.h> declares wcsdup.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define wcsdup innocuous_wcsdup
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char wcsdup (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef wcsdup
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char wcsdup ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_wcsdup) || defined (__stub___wcsdup)
+choke me
+#else
+char (*f) () = wcsdup;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != wcsdup;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_wcsdup=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_wcsdup=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_wcsdup" >&5
+echo "${ECHO_T}$ac_cv_func_wcsdup" >&6
+if test $ac_cv_func_wcsdup = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCSDUP 1
+_ACEOF
+
+fi
+
+
if test "$ac_cv_func_wcwidth" = no && test "$ac_cv_header_wchar_h" = yes; then
WCWIDTH_OBJ=wcwidth.o
else
@@ -6737,37 +7881,36 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+
#include <wchar.h>
int
main ()
{
-int
-main ()
-{
+
mbstate_t ps;
- return 0;
-}
+ mbstate_t *psp;
+ psp = (mbstate_t *)0;
+
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -6780,8 +7923,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
bash_cv_have_mbstate_t=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $bash_cv_have_mbstate_t" >&5
echo "${ECHO_T}$bash_cv_have_mbstate_t" >&6
@@ -6821,8 +7963,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -6872,7 +8013,16 @@ esac
if test -f ${srcdir}/support/shobj-conf; then
echo "$as_me:$LINENO: checking configuration for building shared libraries" >&5
echo $ECHO_N "checking configuration for building shared libraries... $ECHO_C" >&6
- eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
+ eval `TERMCAP_LIB=$TERMCAP_LIB ${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
+
+# case "$SHLIB_LIBS" in
+# *curses*|*termcap*|*termlib*) ;;
+# *) SHLIB_LIBS="$SHLIB_LIBS $TERMCAP_LIB" ;;
+# esac
+
+
+
+
@@ -6921,6 +8071,12 @@ msdosdjgpp*) BUILD_DIR=`pwd.exe` ;; # to prevent //d/path/file
*) BUILD_DIR=`pwd` ;;
esac
+case "$BUILD_DIR" in
+*\ *) BUILD_DIR=`echo "$BUILD_DIR" | sed 's: :\\\\ :g'` ;;
+*) ;;
+esac
+
+
@@ -7302,7 +8458,7 @@ _ASBOX
} >&5
cat >&5 <<_CSEOF
-This file was extended by readline $as_me 4.3, which was
+This file was extended by readline $as_me 5.1-release, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -7365,7 +8521,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-readline config.status 4.3
+readline config.status 5.1-release
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
@@ -7567,6 +8723,7 @@ s,@host@,$host,;t t
s,@host_cpu@,$host_cpu,;t t
s,@host_vendor@,$host_vendor,;t t
s,@host_os@,$host_os,;t t
+s,@CROSS_COMPILE@,$CROSS_COMPILE,;t t
s,@SET_MAKE@,$SET_MAKE,;t t
s,@CC@,$CC,;t t
s,@CFLAGS@,$CFLAGS,;t t
@@ -7577,7 +8734,6 @@ s,@EXEEXT@,$EXEEXT,;t t
s,@OBJEXT@,$OBJEXT,;t t
s,@CPP@,$CPP,;t t
s,@EGREP@,$EGREP,;t t
-s,@CROSS_COMPILING_FLAG@,$CROSS_COMPILING_FLAG,;t t
s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
@@ -7596,8 +8752,11 @@ s,@SHOBJ_LIBS@,$SHOBJ_LIBS,;t t
s,@SHOBJ_STATUS@,$SHOBJ_STATUS,;t t
s,@SHLIB_STATUS@,$SHLIB_STATUS,;t t
s,@SHLIB_XLDFLAGS@,$SHLIB_XLDFLAGS,;t t
+s,@SHLIB_DOT@,$SHLIB_DOT,;t t
+s,@SHLIB_LIBPREF@,$SHLIB_LIBPREF,;t t
s,@SHLIB_LIBSUFF@,$SHLIB_LIBSUFF,;t t
s,@SHLIB_LIBVERSION@,$SHLIB_LIBVERSION,;t t
+s,@SHLIB_DLLVERSION@,$SHLIB_DLLVERSION,;t t
s,@SHLIB_LIBS@,$SHLIB_LIBS,;t t
s,@SHLIB_MAJOR@,$SHLIB_MAJOR,;t t
s,@SHLIB_MINOR@,$SHLIB_MINOR,;t t
@@ -7605,6 +8764,7 @@ s,@STATIC_TARGET@,$STATIC_TARGET,;t t
s,@SHARED_TARGET@,$SHARED_TARGET,;t t
s,@STATIC_INSTALL_TARGET@,$STATIC_INSTALL_TARGET,;t t
s,@SHARED_INSTALL_TARGET@,$SHARED_INSTALL_TARGET,;t t
+s,@PURIFY@,$PURIFY,;t t
s,@BUILD_DIR@,$BUILD_DIR,;t t
s,@LOCAL_CFLAGS@,$LOCAL_CFLAGS,;t t
s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
@@ -7780,11 +8940,6 @@ esac
*) ac_INSTALL=$ac_top_builddir$INSTALL ;;
esac
- if test x"$ac_file" != x-; then
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
- rm -f "$ac_file"
- fi
# Let's still pretend it is `configure' which instantiates (i.e., don't
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
@@ -7823,6 +8978,12 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
fi;;
esac
done` || { (exit 1); exit 1; }
+
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
sed "$ac_vpsub
diff --git a/readline/configure.in b/readline/configure.in
index c436cca914a..6c7b8187f6e 100644
--- a/readline/configure.in
+++ b/readline/configure.in
@@ -4,38 +4,102 @@ dnl
dnl report bugs to chet@po.cwru.edu
dnl
dnl Process this file with autoconf to produce a configure script.
-AC_REVISION([for Readline 4.3, version 2.45, from autoconf version] AC_ACVERSION)
-AC_INIT(readline, 4.3, bug-readline@gnu.org)
+# Copyright (C) 1987-2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+AC_REVISION([for Readline 5.1, version 2.59])
+
+AC_INIT(readline, 5.1-release, bug-readline@gnu.org)
dnl make sure we are using a recent autoconf version
AC_PREREQ(2.50)
AC_CONFIG_SRCDIR(readline.h)
+dnl GDB LOCAL
dnl AC_CONFIG_AUX_DIR(./support)
+AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..)
AC_CONFIG_HEADERS(config.h)
dnl update the value of RL_READLINE_VERSION in readline.h when this changes
-LIBVERSION=4.3
+LIBVERSION=5.1
AC_CANONICAL_HOST
dnl configure defaults
opt_curses=no
+opt_purify=no
dnl arguments to configure
AC_ARG_WITH(curses, AC_HELP_STRING([--with-curses], [use the curses library instead of the termcap library]), opt_curses=$withval)
+AC_ARG_WITH(purify, AC_HELP_STRING([--with-purify], [configure to postprocess with purify]), opt_purify=$withval)
if test "$opt_curses" = "yes"; then
prefer_curses=yes
fi
+if test "$opt_purify" = yes; then
+ PURIFY="purify"
+else
+ PURIFY=
+fi
+
dnl option parsing for optional features
+opt_multibyte=yes
opt_static_libs=yes
opt_shared_libs=no
+AC_ARG_ENABLE(multibyte, AC_HELP_STRING([--enable-multibyte], [enable multibyte characters if OS supports them]), opt_multibyte=$enableval)
+dnl AC_ARG_ENABLE(shared, AC_HELP_STRING([--enable-shared], [build shared libraries [[default=YES]]]), opt_shared_libs=$enableval)
AC_ARG_ENABLE(static, AC_HELP_STRING([--enable-static], [build static libraries [[default=YES]]]), opt_static_libs=$enableval)
+if test $opt_multibyte = no; then
+AC_DEFINE(NO_MULTIBYTE_SUPPORT)
+fi
+
+dnl load up the cross-building cache file -- add more cases and cache
+dnl files as necessary
+
+dnl Note that host and target machine are the same, and different than the
+dnl build machine.
+
+if test "x$cross_compiling" = "xyes"; then
+ case "${host}" in
+ *-cygwin*)
+ cross_cache=${srcdir}/cross-build/cygwin.cache
+ ;;
+ *-mingw*)
+ cross_cache=${srcdir}/cross-build/mingw.cache
+ ;;
+ i[[3456]]86-*-beos*)
+ cross_cache=${srcdir}/cross-build/x86-beos.cache
+ ;;
+ *) echo "configure: cross-compiling for $host is not supported" >&2
+ ;;
+ esac
+ if test -n "${cross_cache}" && test -r "${cross_cache}"; then
+ echo "loading cross-build cache file ${cross_cache}"
+ . ${cross_cache}
+ fi
+ unset cross_cache
+ CROSS_COMPILE='-DCROSS_COMPILING'
+ AC_SUBST(CROSS_COMPILE)
+fi
+
echo ""
echo "Beginning configuration for readline-$LIBVERSION for ${host_cpu}-${host_vendor}-${host_os}"
echo ""
@@ -49,7 +113,8 @@ dnl AC_AIX
AC_MINIX
dnl BEGIN changes for CYGNUS cross-building for Cygwin
-
+dnl NOTE: Some of these changes may no longer be necessary.
+
dnl load up the cross-building cache file -- add more cases and cache
dnl files as necessary
if test "x$cross_compiling" = "xyes"; then
@@ -73,14 +138,7 @@ if test "x$cross_compiling" = "xyes"; then
unset cross_cache
fi
fi
-
-if test "x$cross_compiling" = "xyes"; then
- CROSS_COMPILING_FLAG=-DCROSS_COMPILING
-else
- CROSS_COMPILING_FLAG=
-fi
-AC_SUBST(CROSS_COMPILING_FLAG)
-
+
if test -z "$CC_FOR_BUILD"; then
if test "x$cross_compiling" = "xno"; then
CC_FOR_BUILD='$(CC)'
@@ -115,19 +173,29 @@ AC_TYPE_SIGNAL
AC_TYPE_SIZE_T
AC_CHECK_TYPE(ssize_t, int)
+AC_HEADER_STDC
+
AC_HEADER_STAT
AC_HEADER_DIRENT
-AC_CHECK_FUNCS(fcntl kill lstat memmove putenv select setenv setlocale \
- strcasecmp strpbrk tcgetattr vsnprintf isascii isxdigit \
- getpwnam getpwent getpwuid)
+AC_CHECK_FUNCS(fcntl kill lstat)
+AC_CHECK_FUNCS(memmove putenv select setenv setlocale \
+ strcasecmp strpbrk tcgetattr vsnprintf)
+AC_CHECK_FUNCS(isascii isxdigit)
+AC_CHECK_FUNCS(getpwent getpwnam getpwuid)
AC_FUNC_STRCOLL
-AC_CHECK_HEADERS(unistd.h stdlib.h varargs.h stdarg.h string.h strings.h \
- limits.h sys/ptem.h sys/pte.h sys/stream.h sys/select.h \
- termcap.h termios.h termio.h sys/file.h locale.h memory.h \
- pwd.h)
+AC_CHECK_HEADERS(fcntl.h unistd.h stdlib.h varargs.h stdarg.h string.h strings.h \
+ limits.h locale.h pwd.h memory.h termcap.h termios.h termio.h)
+AC_CHECK_HEADERS(sys/pte.h sys/stream.h sys/select.h sys/file.h)
+
+AC_CHECK_HEADERS(sys/ptem.h,,,
+[[
+#if HAVE_SYS_STREAM_H
+# include <sys/stream.h>
+#endif
+]])
BASH_SYS_SIGNAL_VINTAGE
BASH_SYS_REINSTALL_SIGHANDLERS
@@ -135,6 +203,7 @@ BASH_SYS_REINSTALL_SIGHANDLERS
BASH_FUNC_POSIX_SETJMP
BASH_FUNC_LSTAT
BASH_FUNC_STRCOLL
+BASH_FUNC_CTYPE_NONASCII
BASH_CHECK_GETPW_FUNCS
@@ -179,7 +248,13 @@ esac
#
if test -f ${srcdir}/support/shobj-conf; then
AC_MSG_CHECKING(configuration for building shared libraries)
- eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
+ eval `TERMCAP_LIB=$TERMCAP_LIB ${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
+
+# case "$SHLIB_LIBS" in
+# *curses*|*termcap*|*termlib*) ;;
+# *) SHLIB_LIBS="$SHLIB_LIBS $TERMCAP_LIB" ;;
+# esac
+
AC_SUBST(SHOBJ_CC)
AC_SUBST(SHOBJ_CFLAGS)
AC_SUBST(SHOBJ_LD)
@@ -189,8 +264,11 @@ if test -f ${srcdir}/support/shobj-conf; then
AC_SUBST(SHOBJ_STATUS)
AC_SUBST(SHLIB_STATUS)
AC_SUBST(SHLIB_XLDFLAGS)
+ AC_SUBST(SHLIB_DOT)
+ AC_SUBST(SHLIB_LIBPREF)
AC_SUBST(SHLIB_LIBSUFF)
AC_SUBST(SHLIB_LIBVERSION)
+ AC_SUBST(SHLIB_DLLVERSION)
AC_SUBST(SHLIB_LIBS)
AC_MSG_RESULT($SHLIB_STATUS)
@@ -227,6 +305,12 @@ msdosdjgpp*) BUILD_DIR=`pwd.exe` ;; # to prevent //d/path/file
*) BUILD_DIR=`pwd` ;;
esac
+case "$BUILD_DIR" in
+*\ *) BUILD_DIR=`echo "$BUILD_DIR" | sed 's: :\\\\ :g'` ;;
+*) ;;
+esac
+
+AC_SUBST(PURIFY)
AC_SUBST(BUILD_DIR)
AC_SUBST(CFLAGS)
diff --git a/readline/display.c b/readline/display.c
index b9bb2d3e8ac..08580987712 100644
--- a/readline/display.c
+++ b/readline/display.c
@@ -1,6 +1,6 @@
/* display.c -- readline redisplay facility. */
-/* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -122,16 +122,24 @@ rl_voidfunc_t *rl_redisplay_function = rl_redisplay;
int rl_display_fixed = 0;
int _rl_suppress_redisplay = 0;
+int _rl_want_redisplay = 0;
/* The stuff that gets printed out before the actual text of the line.
This is usually pointing to rl_prompt. */
char *rl_display_prompt = (char *)NULL;
/* Pseudo-global variables declared here. */
+
/* The visible cursor position. If you print some text, adjust this. */
+/* NOTE: _rl_last_c_pos is used as a buffer index when not in a locale
+ supporting multibyte characters, and an absolute cursor position when
+ in such a locale. This is an artifact of the donated multibyte support.
+ Care must be taken when modifying its value. */
int _rl_last_c_pos = 0;
int _rl_last_v_pos = 0;
+static int cpos_adjusted;
+
/* Number of lines currently on screen minus 1. */
int _rl_vis_botlin = 0;
@@ -182,12 +190,27 @@ static int prompt_invis_chars_first_line;
static int prompt_last_screen_line;
+static int prompt_physical_chars;
+
+/* Variables to save and restore prompt and display information. */
+
+/* These are getting numerous enough that it's time to create a struct. */
+
+static char *saved_local_prompt;
+static char *saved_local_prefix;
+static int saved_last_invisible;
+static int saved_visible_length;
+static int saved_prefix_length;
+static int saved_invis_chars_first_line;
+static int saved_physical_chars;
+
/* Expand the prompt string S and return the number of visible
characters in *LP, if LP is not null. This is currently more-or-less
a placeholder for expansion. LIP, if non-null is a place to store the
index of the last invisible character in the returned string. NIFLP,
if non-zero, is a place to store the number of invisible characters in
- the first prompt line. */
+ the first prompt line. The previous are used as byte counts -- indexes
+ into a character buffer. */
/* Current implementation:
\001 (^A) start non-visible characters
@@ -197,19 +220,25 @@ static int prompt_last_screen_line;
\002 are assumed to be `visible'. */
static char *
-expand_prompt (pmt, lp, lip, niflp)
+expand_prompt (pmt, lp, lip, niflp, vlp)
char *pmt;
- int *lp, *lip, *niflp;
+ int *lp, *lip, *niflp, *vlp;
{
char *r, *ret, *p;
- int l, rl, last, ignoring, ninvis, invfl;
+ int l, rl, last, ignoring, ninvis, invfl, invflset, ind, pind, physchars;
/* Short-circuit if we can. */
- if (strchr (pmt, RL_PROMPT_START_IGNORE) == 0)
+ if ((MB_CUR_MAX <= 1 || rl_byte_oriented) && strchr (pmt, RL_PROMPT_START_IGNORE) == 0)
{
r = savestring (pmt);
if (lp)
*lp = strlen (r);
+ if (lip)
+ *lip = 0;
+ if (niflp)
+ *niflp = 0;
+ if (vlp)
+ *vlp = lp ? *lp : strlen (r);
return r;
}
@@ -217,8 +246,9 @@ expand_prompt (pmt, lp, lip, niflp)
r = ret = (char *)xmalloc (l + 1);
invfl = 0; /* invisible chars in first line of prompt */
+ invflset = 0; /* we only want to set invfl once */
- for (rl = ignoring = last = ninvis = 0, p = pmt; p && *p; p++)
+ for (rl = ignoring = last = ninvis = physchars = 0, p = pmt; p && *p; p++)
{
/* This code strips the invisible character string markers
RL_PROMPT_START_IGNORE and RL_PROMPT_END_IGNORE */
@@ -230,18 +260,47 @@ expand_prompt (pmt, lp, lip, niflp)
else if (ignoring && *p == RL_PROMPT_END_IGNORE)
{
ignoring = 0;
- last = r - ret - 1;
+ if (p[-1] != RL_PROMPT_START_IGNORE)
+ last = r - ret - 1;
continue;
}
else
{
- *r++ = *p;
- if (!ignoring)
- rl++;
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ pind = p - pmt;
+ ind = _rl_find_next_mbchar (pmt, pind, 1, MB_FIND_NONZERO);
+ l = ind - pind;
+ while (l--)
+ *r++ = *p++;
+ if (!ignoring)
+ {
+ rl += ind - pind;
+ physchars += _rl_col_width (pmt, pind, ind);
+ }
+ else
+ ninvis += ind - pind;
+ p--; /* compensate for later increment */
+ }
else
- ninvis++;
- if (rl == _rl_screenwidth)
- invfl = ninvis;
+#endif
+ {
+ *r++ = *p;
+ if (!ignoring)
+ {
+ rl++; /* visible length byte counter */
+ physchars++;
+ }
+ else
+ ninvis++; /* invisible chars byte counter */
+ }
+
+ if (invflset == 0 && rl >= _rl_screenwidth)
+ {
+ invfl = ninvis;
+ invflset = 1;
+ }
}
}
@@ -255,6 +314,8 @@ expand_prompt (pmt, lp, lip, niflp)
*lip = last;
if (niflp)
*niflp = invfl;
+ if (vlp)
+ *vlp = physchars;
return ret;
}
@@ -266,7 +327,7 @@ _rl_strip_prompt (pmt)
{
char *ret;
- ret = expand_prompt (pmt, (int *)NULL, (int *)NULL, (int *)NULL);
+ ret = expand_prompt (pmt, (int *)NULL, (int *)NULL, (int *)NULL, (int *)NULL);
return ret;
}
@@ -299,7 +360,8 @@ rl_expand_prompt (prompt)
FREE (local_prompt_prefix);
local_prompt = local_prompt_prefix = (char *)0;
- prompt_last_invisible = prompt_visible_length = 0;
+ prompt_last_invisible = prompt_invis_chars_first_line = 0;
+ prompt_visible_length = prompt_physical_chars = 0;
if (prompt == 0 || *prompt == 0)
return (0);
@@ -310,7 +372,8 @@ rl_expand_prompt (prompt)
/* The prompt is only one logical line, though it might wrap. */
local_prompt = expand_prompt (prompt, &prompt_visible_length,
&prompt_last_invisible,
- &prompt_invis_chars_first_line);
+ &prompt_invis_chars_first_line,
+ &prompt_physical_chars);
local_prompt_prefix = (char *)0;
return (prompt_visible_length);
}
@@ -320,13 +383,15 @@ rl_expand_prompt (prompt)
t = ++p;
local_prompt = expand_prompt (p, &prompt_visible_length,
&prompt_last_invisible,
- &prompt_invis_chars_first_line);
+ (int *)NULL,
+ &prompt_physical_chars);
c = *t; *t = '\0';
/* The portion of the prompt string up to and including the
final newline is now null-terminated. */
local_prompt_prefix = expand_prompt (prompt, &prompt_prefix_length,
(int *)NULL,
- &prompt_invis_chars_first_line);
+ &prompt_invis_chars_first_line,
+ (int *)NULL);
*t = c;
return (prompt_prefix_length);
}
@@ -384,8 +449,8 @@ rl_redisplay ()
{
register int in, out, c, linenum, cursor_linenum;
register char *line;
- int c_pos, inv_botlin, lb_botlin, lb_linenum;
- int newlines, lpos, temp;
+ int c_pos, inv_botlin, lb_botlin, lb_linenum, o_cpos;
+ int newlines, lpos, temp, modmark, n0, num;
char *prompt_this_line;
#if defined (HANDLE_MULTIBYTE)
wchar_t wc;
@@ -401,7 +466,7 @@ rl_redisplay ()
if (!rl_display_prompt)
rl_display_prompt = "";
- if (invisible_line == 0)
+ if (invisible_line == 0 || vis_lbreaks == 0)
{
init_line_structures (0);
rl_on_new_line ();
@@ -415,10 +480,12 @@ rl_redisplay ()
/* Mark the line as modified or not. We only do this for history
lines. */
+ modmark = 0;
if (_rl_mark_modified_lines && current_history () && rl_undo_list)
{
line[out++] = '*';
line[out] = '\0';
+ modmark = 1;
}
/* If someone thought that the redisplay was handled, but the currently
@@ -472,7 +539,7 @@ rl_redisplay ()
}
}
- pmtlen = strlen (prompt_this_line);
+ prompt_physical_chars = pmtlen = strlen (prompt_this_line);
temp = pmtlen + out + 2;
if (temp >= line_size)
{
@@ -531,9 +598,15 @@ rl_redisplay ()
/* inv_lbreaks[i] is where line i starts in the buffer. */
inv_lbreaks[newlines = 0] = 0;
+#if 0
lpos = out - wrap_offset;
+#else
+ lpos = prompt_physical_chars + modmark;
+#endif
+
#if defined (HANDLE_MULTIBYTE)
memset (_rl_wrapped_line, 0, vis_lbsize);
+ num = 0;
#endif
/* prompt_invis_chars_first_line is the number of invisible characters in
@@ -550,17 +623,34 @@ rl_redisplay ()
prompt_invis_chars_first_line variable could be made into an array
saying how many invisible characters there are per line, but that's
probably too much work for the benefit gained. How many people have
- prompts that exceed two physical lines? */
- temp = ((newlines + 1) * _rl_screenwidth) +
-#if 0
- ((newlines == 0) ? prompt_invis_chars_first_line : 0) +
+ prompts that exceed two physical lines?
+ Additional logic fix from Edward Catmur <ed@catmur.co.uk> */
+#if defined (HANDLE_MULTIBYTE)
+ n0 = num;
+ temp = local_prompt ? strlen (local_prompt) : 0;
+ while (num < temp)
+ {
+ if (_rl_col_width (local_prompt, n0, num) > _rl_screenwidth)
+ {
+ num = _rl_find_prev_mbchar (local_prompt, num, MB_FIND_ANY);
+ break;
+ }
+ num++;
+ }
+ temp = num +
#else
- ((newlines == 0 && local_prompt_prefix == 0) ? prompt_invis_chars_first_line : 0) +
-#endif
- ((newlines == 1) ? wrap_offset : 0);
-
+ temp = ((newlines + 1) * _rl_screenwidth) +
+#endif /* !HANDLE_MULTIBYTE */
+ ((local_prompt_prefix == 0) ? ((newlines == 0) ? prompt_invis_chars_first_line
+ : ((newlines == 1) ? wrap_offset : 0))
+ : ((newlines == 0) ? wrap_offset :0));
+
inv_lbreaks[++newlines] = temp;
+#if defined (HANDLE_MULTIBYTE)
+ lpos -= _rl_col_width (local_prompt, n0, num);
+#else
lpos -= _rl_screenwidth;
+#endif
}
prompt_last_screen_line = newlines;
@@ -590,7 +680,7 @@ rl_redisplay ()
#if defined (HANDLE_MULTIBYTE)
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
{
- if (wc_bytes == (size_t)-1 || wc_bytes == (size_t)-2)
+ if (MB_INVALIDCH (wc_bytes))
{
/* Byte sequence is invalid or shortened. Assume that the
first byte represents a character. */
@@ -599,12 +689,12 @@ rl_redisplay ()
wc_width = 1;
memset (&ps, 0, sizeof (mbstate_t));
}
- else if (wc_bytes == (size_t)0)
+ else if (MB_NULLWCH (wc_bytes))
break; /* Found '\0' */
else
{
temp = wcwidth (wc);
- wc_width = (temp < 0) ? 1 : temp;
+ wc_width = (temp >= 0) ? temp : 1;
}
}
#endif
@@ -769,7 +859,7 @@ rl_redisplay ()
if (_rl_horizontal_scroll_mode == 0 && _rl_term_up && *_rl_term_up)
{
- int nleft, pos, changed_screen_line;
+ int nleft, pos, changed_screen_line, tx;
if (!rl_display_fixed || forced_display)
{
@@ -800,9 +890,26 @@ rl_redisplay ()
/* For each line in the buffer, do the updating display. */
for (linenum = 0; linenum <= inv_botlin; linenum++)
{
+ o_cpos = _rl_last_c_pos;
+ cpos_adjusted = 0;
update_line (VIS_LINE(linenum), INV_LINE(linenum), linenum,
VIS_LLEN(linenum), INV_LLEN(linenum), inv_botlin);
+ /* update_line potentially changes _rl_last_c_pos, but doesn't
+ take invisible characters into account, since _rl_last_c_pos
+ is an absolute cursor position in a multibyte locale. See
+ if compensating here is the right thing, or if we have to
+ change update_line itself. There is one case in which
+ update_line adjusts _rl_last_c_pos itself (so it can pass
+ _rl_move_cursor_relative accurate values); it communicates
+ this back by setting cpos_adjusted */
+ if (linenum == 0 && (MB_CUR_MAX > 1 && rl_byte_oriented == 0) &&
+ cpos_adjusted == 0 &&
+ _rl_last_c_pos != o_cpos &&
+ _rl_last_c_pos > wrap_offset &&
+ o_cpos < prompt_last_invisible)
+ _rl_last_c_pos -= wrap_offset;
+
/* If this is the line with the prompt, we might need to
compensate for invisible characters in the new line. Do
this only if there is not more than one new line (which
@@ -814,7 +921,10 @@ rl_redisplay ()
(wrap_offset > visible_wrap_offset) &&
(_rl_last_c_pos < visible_first_line_len))
{
- nleft = _rl_screenwidth + wrap_offset - _rl_last_c_pos;
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ nleft = _rl_screenwidth - _rl_last_c_pos;
+ else
+ nleft = _rl_screenwidth + wrap_offset - _rl_last_c_pos;
if (nleft)
_rl_clear_to_eol (nleft);
}
@@ -850,7 +960,7 @@ rl_redisplay ()
the physical cursor position on the screen stays the same,
but the buffer position needs to be adjusted to account
for invisible characters. */
- if (cursor_linenum == 0 && wrap_offset)
+ if ((MB_CUR_MAX == 1 || rl_byte_oriented) && cursor_linenum == 0 && wrap_offset)
_rl_last_c_pos += wrap_offset;
}
@@ -871,7 +981,7 @@ rl_redisplay ()
#endif
_rl_output_some_chars (local_prompt, nleft);
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- _rl_last_c_pos = _rl_col_width(local_prompt, 0, nleft);
+ _rl_last_c_pos = _rl_col_width (local_prompt, 0, nleft) - wrap_offset;
else
_rl_last_c_pos = nleft;
}
@@ -883,18 +993,31 @@ rl_redisplay ()
start of the line and the cursor position. */
nleft = c_pos - pos;
+ /* NLEFT is now a number of characters in a buffer. When in a
+ multibyte locale, however, _rl_last_c_pos is an absolute cursor
+ position that doesn't take invisible characters in the prompt
+ into account. We use a fudge factor to compensate. */
+
/* Since _rl_backspace() doesn't know about invisible characters in the
prompt, and there's no good way to tell it, we compensate for
those characters here and call _rl_backspace() directly. */
if (wrap_offset && cursor_linenum == 0 && nleft < _rl_last_c_pos)
{
- _rl_backspace (_rl_last_c_pos - nleft);
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- _rl_last_c_pos = _rl_col_width (&visible_line[pos], 0, nleft);
+ tx = _rl_col_width (&visible_line[pos], 0, nleft) - visible_wrap_offset;
else
- _rl_last_c_pos = nleft;
+ tx = nleft;
+ if (_rl_last_c_pos > tx)
+ {
+ _rl_backspace (_rl_last_c_pos - tx); /* XXX */
+ _rl_last_c_pos = tx;
+ }
}
+ /* We need to note that in a multibyte locale we are dealing with
+ _rl_last_c_pos as an absolute cursor position, but moving to a
+ point specified by a buffer position (NLEFT) that doesn't take
+ invisible characters into account. */
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
_rl_move_cursor_relative (nleft, &invisible_line[pos]);
else if (nleft != _rl_last_c_pos)
@@ -1053,7 +1176,10 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
the exact cursor position and cut-and-paste with certain terminal
emulators. In this calculation, TEMP is the physical screen
position of the cursor. */
- temp = _rl_last_c_pos - W_OFFSET(_rl_last_v_pos, visible_wrap_offset);
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ temp = _rl_last_c_pos;
+ else
+ temp = _rl_last_c_pos - W_OFFSET(_rl_last_v_pos, visible_wrap_offset);
if (temp == _rl_screenwidth && _rl_term_autowrap && !_rl_horizontal_scroll_mode
&& _rl_last_v_pos == current_line - 1)
{
@@ -1073,12 +1199,12 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
memset (&ps, 0, sizeof (mbstate_t));
ret = mbrtowc (&wc, new, MB_CUR_MAX, &ps);
- if (ret == (size_t)-1 || ret == (size_t)-2)
+ if (MB_INVALIDCH (ret))
{
tempwidth = 1;
ret = 1;
}
- else if (ret == 0)
+ else if (MB_NULLWCH (ret))
tempwidth = 0;
else
tempwidth = wcwidth (wc);
@@ -1095,7 +1221,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
ret = mbrtowc (&wc, old, MB_CUR_MAX, &ps);
if (ret != 0 && bytes != 0)
{
- if (ret == (size_t)-1 || ret == (size_t)-2)
+ if (MB_INVALIDCH (ret))
memmove (old+bytes, old+1, strlen (old+1));
else
memmove (old+bytes, old+ret, strlen (old+ret));
@@ -1118,7 +1244,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
putc (new[0], rl_outstream);
else
putc (' ', rl_outstream);
- _rl_last_c_pos = 1; /* XXX */
+ _rl_last_c_pos = 1;
_rl_last_v_pos++;
if (old[0] && new[0])
old[0] = new[0];
@@ -1130,18 +1256,37 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
#if defined (HANDLE_MULTIBYTE)
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
{
- memset (&ps_new, 0, sizeof(mbstate_t));
- memset (&ps_old, 0, sizeof(mbstate_t));
-
- new_offset = old_offset = 0;
- for (ofd = old, nfd = new;
- (ofd - old < omax) && *ofd &&
- _rl_compare_chars(old, old_offset, &ps_old, new, new_offset, &ps_new); )
+ /* See if the old line is a subset of the new line, so that the
+ only change is adding characters. */
+ temp = (omax < nmax) ? omax : nmax;
+ if (memcmp (old, new, temp) == 0)
{
- old_offset = _rl_find_next_mbchar (old, old_offset, 1, MB_FIND_ANY);
- new_offset = _rl_find_next_mbchar (new, new_offset, 1, MB_FIND_ANY);
- ofd = old + old_offset;
- nfd = new + new_offset;
+ ofd = old + temp;
+ nfd = new + temp;
+ }
+ else
+ {
+ memset (&ps_new, 0, sizeof(mbstate_t));
+ memset (&ps_old, 0, sizeof(mbstate_t));
+
+ if (omax == nmax && STREQN (new, old, omax))
+ {
+ ofd = old + omax;
+ nfd = new + nmax;
+ }
+ else
+ {
+ new_offset = old_offset = 0;
+ for (ofd = old, nfd = new;
+ (ofd - old < omax) && *ofd &&
+ _rl_compare_chars(old, old_offset, &ps_old, new, new_offset, &ps_new); )
+ {
+ old_offset = _rl_find_next_mbchar (old, old_offset, 1, MB_FIND_ANY);
+ new_offset = _rl_find_next_mbchar (new, new_offset, 1, MB_FIND_ANY);
+ ofd = old + old_offset;
+ nfd = new + new_offset;
+ }
+ }
}
}
else
@@ -1173,8 +1318,11 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
memset (&ps_old, 0, sizeof (mbstate_t));
memset (&ps_new, 0, sizeof (mbstate_t));
+#if 0
+ /* On advice from jir@yamato.ibm.com */
_rl_adjust_point (old, ols - old, &ps_old);
_rl_adjust_point (new, nls - new, &ps_new);
+#endif
if (_rl_compare_chars (old, ols - old, &ps_old, new, nls - new, &ps_new) == 0)
break;
@@ -1237,7 +1385,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
if (_rl_last_v_pos != current_line)
{
_rl_move_vert (current_line);
- if (current_line == 0 && visible_wrap_offset)
+ if ((MB_CUR_MAX == 1 || rl_byte_oriented) && current_line == 0 && visible_wrap_offset)
_rl_last_c_pos += visible_wrap_offset;
}
@@ -1266,7 +1414,12 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
#endif
_rl_output_some_chars (local_prompt, lendiff);
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- _rl_last_c_pos = _rl_col_width (local_prompt, 0, lendiff);
+ {
+ /* We take wrap_offset into account here so we can pass correct
+ information to _rl_move_cursor_relative. */
+ _rl_last_c_pos = _rl_col_width (local_prompt, 0, lendiff) - wrap_offset;
+ cpos_adjusted = 1;
+ }
else
_rl_last_c_pos = lendiff;
}
@@ -1328,7 +1481,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
insert_some_chars (nfd, lendiff, col_lendiff);
_rl_last_c_pos += col_lendiff;
}
- else if (*ols == 0)
+ else if ((MB_CUR_MAX == 1 || rl_byte_oriented != 0) && *ols == 0 && lendiff > 0)
{
/* At the end of a line the characters do not have to
be "inserted". They can just be placed on the screen. */
@@ -1351,7 +1504,11 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
if ((temp - lendiff) > 0)
{
_rl_output_some_chars (nfd + lendiff, temp - lendiff);
-#if 0
+#if 1
+ /* XXX -- this bears closer inspection. Fixes a redisplay bug
+ reported against bash-3.0-alpha by Andreas Schwab involving
+ multibyte characters and prompt strings with invisible
+ characters, but was previously disabled. */
_rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-col_lendiff);
#else
_rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-lendiff);
@@ -1363,6 +1520,10 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
/* cannot insert chars, write to EOL */
_rl_output_some_chars (nfd, temp);
_rl_last_c_pos += col_temp;
+ /* If we're in a multibyte locale and were before the last invisible
+ char in the current line (which implies we just output some invisible
+ characters) we need to adjust _rl_last_c_pos, since it represents
+ a physical character position. */
}
}
else /* Delete characters from line. */
@@ -1394,7 +1555,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
if (temp > 0)
{
_rl_output_some_chars (nfd, temp);
- _rl_last_c_pos += col_temp;
+ _rl_last_c_pos += col_temp; /* XXX */
}
lendiff = (oe - old) - (ne - new);
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
@@ -1430,12 +1591,13 @@ rl_on_new_line ()
/* Tell the update routines that we have moved onto a new line with the
prompt already displayed. Code originally from the version of readline
- distributed with CLISP. */
+ distributed with CLISP. rl_expand_prompt must have already been called
+ (explicitly or implicitly). This still doesn't work exactly right. */
int
rl_on_new_line_with_prompt ()
{
int prompt_size, i, l, real_screenwidth, newlines;
- char *prompt_last_line;
+ char *prompt_last_line, *lprompt;
/* Initialize visible_line and invisible_line to ensure that they can hold
the already-displayed prompt. */
@@ -1444,8 +1606,9 @@ rl_on_new_line_with_prompt ()
/* Make sure the line structures hold the already-displayed prompt for
redisplay. */
- strcpy (visible_line, rl_prompt);
- strcpy (invisible_line, rl_prompt);
+ lprompt = local_prompt ? local_prompt : rl_prompt;
+ strcpy (visible_line, lprompt);
+ strcpy (invisible_line, lprompt);
/* If the prompt contains newlines, take the last tail. */
prompt_last_line = strrchr (rl_prompt, '\n');
@@ -1454,7 +1617,7 @@ rl_on_new_line_with_prompt ()
l = strlen (prompt_last_line);
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- _rl_last_c_pos = _rl_col_width (prompt_last_line, 0, l);
+ _rl_last_c_pos = _rl_col_width (prompt_last_line, 0, l); /* XXX */
else
_rl_last_c_pos = l;
@@ -1480,6 +1643,8 @@ rl_on_new_line_with_prompt ()
vis_lbreaks[newlines] = l;
visible_wrap_offset = 0;
+ rl_display_prompt = rl_prompt; /* XXX - make sure it's set */
+
return 0;
}
@@ -1501,6 +1666,8 @@ rl_forced_update_display ()
}
/* Move the cursor from _rl_last_c_pos to NEW, which are buffer indices.
+ (Well, when we don't have multibyte characters, _rl_last_c_pos is a
+ buffer index.)
DATA is the contents of the screen line of interest; i.e., where
the movement is being done. */
void
@@ -1509,28 +1676,40 @@ _rl_move_cursor_relative (new, data)
const char *data;
{
register int i;
+ int woff; /* number of invisible chars on current line */
+ int cpos, dpos; /* current and desired cursor positions */
- /* If we don't have to do anything, then return. */
+ woff = W_OFFSET (_rl_last_v_pos, wrap_offset);
+ cpos = _rl_last_c_pos;
#if defined (HANDLE_MULTIBYTE)
/* If we have multibyte characters, NEW is indexed by the buffer point in
a multibyte string, but _rl_last_c_pos is the display position. In
this case, NEW's display position is not obvious and must be
- calculated. */
- if (MB_CUR_MAX == 1 || rl_byte_oriented)
+ calculated. We need to account for invisible characters in this line,
+ as long as we are past them and they are counted by _rl_col_width. */
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
{
- if (_rl_last_c_pos == new)
- return;
+ dpos = _rl_col_width (data, 0, new);
+ if (dpos > woff)
+ dpos -= woff;
}
- else if (_rl_last_c_pos == _rl_col_width (data, 0, new))
- return;
-#else
- if (_rl_last_c_pos == new) return;
+ else
#endif
+ dpos = new;
+
+ /* If we don't have to do anything, then return. */
+ if (cpos == dpos)
+ return;
/* It may be faster to output a CR, and then move forwards instead
of moving backwards. */
/* i == current physical cursor position. */
- i = _rl_last_c_pos - W_OFFSET(_rl_last_v_pos, visible_wrap_offset);
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ i = _rl_last_c_pos;
+ else
+#endif
+ i = _rl_last_c_pos - woff;
if (new == 0 || CR_FASTER (new, _rl_last_c_pos) ||
(_rl_term_autowrap && i == _rl_screenwidth))
{
@@ -1539,10 +1718,10 @@ _rl_move_cursor_relative (new, data)
#else
tputs (_rl_term_cr, 1, _rl_output_character_function);
#endif /* !__MSDOS__ */
- _rl_last_c_pos = 0;
+ cpos = _rl_last_c_pos = 0;
}
- if (_rl_last_c_pos < new)
+ if (cpos < dpos)
{
/* Move the cursor forward. We do it by printing the command
to move the cursor forward if there is one, else print that
@@ -1556,31 +1735,11 @@ _rl_move_cursor_relative (new, data)
#if defined (HACK_TERMCAP_MOTION)
if (_rl_term_forward_char)
{
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- {
- int width;
- width = _rl_col_width (data, _rl_last_c_pos, new);
- for (i = 0; i < width; i++)
- tputs (_rl_term_forward_char, 1, _rl_output_character_function);
- }
- else
- {
- for (i = _rl_last_c_pos; i < new; i++)
- tputs (_rl_term_forward_char, 1, _rl_output_character_function);
- }
- }
- else if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- {
- tputs (_rl_term_cr, 1, _rl_output_character_function);
- for (i = 0; i < new; i++)
- putc (data[i], rl_outstream);
+ for (i = cpos; i < dpos; i++)
+ tputs (_rl_term_forward_char, 1, _rl_output_character_function);
}
else
- for (i = _rl_last_c_pos; i < new; i++)
- putc (data[i], rl_outstream);
-
-#else /* !HACK_TERMCAP_MOTION */
-
+#endif /* HACK_TERMCAP_MOTION */
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
{
tputs (_rl_term_cr, 1, _rl_output_character_function);
@@ -1588,32 +1747,20 @@ _rl_move_cursor_relative (new, data)
putc (data[i], rl_outstream);
}
else
- for (i = _rl_last_c_pos; i < new; i++)
+ for (i = cpos; i < new; i++)
putc (data[i], rl_outstream);
-
-#endif /* !HACK_TERMCAP_MOTION */
-
}
+
#if defined (HANDLE_MULTIBYTE)
/* NEW points to the buffer point, but _rl_last_c_pos is the display point.
The byte length of the string is probably bigger than the column width
of the string, which means that if NEW == _rl_last_c_pos, then NEW's
display point is less than _rl_last_c_pos. */
- else if (_rl_last_c_pos >= new)
-#else
- else if (_rl_last_c_pos > new)
#endif
- {
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- _rl_backspace (_rl_last_c_pos - _rl_col_width (data, 0, new));
- else
- _rl_backspace (_rl_last_c_pos - new);
- }
+ else if (cpos > dpos)
+ _rl_backspace (cpos - dpos);
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- _rl_last_c_pos = _rl_col_width (data, 0, new);
- else
- _rl_last_c_pos = new;
+ _rl_last_c_pos = dpos;
}
/* PWP: move the cursor up or down. */
@@ -1711,9 +1858,9 @@ rl_character_len (c, pos)
return ((ISPRINT (uc)) ? 1 : 2);
}
-
/* How to print things in the "echo-area". The prompt is treated as a
mini-modeline. */
+static int msg_saved_prompt = 0;
#if defined (USE_VARARGS)
int
@@ -1744,8 +1891,19 @@ rl_message (va_alist)
#endif
va_end (args);
+ if (saved_local_prompt == 0)
+ {
+ rl_save_prompt ();
+ msg_saved_prompt = 1;
+ }
rl_display_prompt = msg_buf;
+ local_prompt = expand_prompt (msg_buf, &prompt_visible_length,
+ &prompt_last_invisible,
+ &prompt_invis_chars_first_line,
+ &prompt_physical_chars);
+ local_prompt_prefix = (char *)NULL;
(*rl_redisplay_function) ();
+
return 0;
}
#else /* !USE_VARARGS */
@@ -1755,8 +1913,20 @@ rl_message (format, arg1, arg2)
{
sprintf (msg_buf, format, arg1, arg2);
msg_buf[sizeof(msg_buf) - 1] = '\0'; /* overflow? */
+
rl_display_prompt = msg_buf;
+ if (saved_local_prompt == 0)
+ {
+ rl_save_prompt ();
+ msg_saved_prompt = 1;
+ }
+ local_prompt = expand_prompt (msg_buf, &prompt_visible_length,
+ &prompt_last_invisible,
+ &prompt_invis_chars_first_line,
+ &prompt_physical_chars);
+ local_prompt_prefix = (char *)NULL;
(*rl_redisplay_function) ();
+
return 0;
}
#endif /* !USE_VARARGS */
@@ -1766,6 +1936,11 @@ int
rl_clear_message ()
{
rl_display_prompt = rl_prompt;
+ if (msg_saved_prompt)
+ {
+ rl_restore_prompt ();
+ msg_saved_prompt = 0;
+ }
(*rl_redisplay_function) ();
return 0;
}
@@ -1780,21 +1955,20 @@ rl_reset_line_state ()
return 0;
}
-static char *saved_local_prompt;
-static char *saved_local_prefix;
-static int saved_last_invisible;
-static int saved_visible_length;
-
void
rl_save_prompt ()
{
saved_local_prompt = local_prompt;
saved_local_prefix = local_prompt_prefix;
+ saved_prefix_length = prompt_prefix_length;
saved_last_invisible = prompt_last_invisible;
saved_visible_length = prompt_visible_length;
+ saved_invis_chars_first_line = prompt_invis_chars_first_line;
+ saved_physical_chars = prompt_physical_chars;
local_prompt = local_prompt_prefix = (char *)0;
- prompt_last_invisible = prompt_visible_length = 0;
+ prompt_last_invisible = prompt_visible_length = prompt_prefix_length = 0;
+ prompt_invis_chars_first_line = prompt_physical_chars = 0;
}
void
@@ -1805,8 +1979,16 @@ rl_restore_prompt ()
local_prompt = saved_local_prompt;
local_prompt_prefix = saved_local_prefix;
+ prompt_prefix_length = saved_prefix_length;
prompt_last_invisible = saved_last_invisible;
prompt_visible_length = saved_visible_length;
+ prompt_invis_chars_first_line = saved_invis_chars_first_line;
+ prompt_physical_chars = saved_physical_chars;
+
+ /* can test saved_local_prompt to see if prompt info has been saved. */
+ saved_local_prompt = saved_local_prefix = (char *)0;
+ saved_last_invisible = saved_visible_length = saved_prefix_length = 0;
+ saved_invis_chars_first_line = saved_physical_chars = 0;
}
char *
@@ -1814,11 +1996,15 @@ _rl_make_prompt_for_search (pchar)
int pchar;
{
int len;
- char *pmt;
+ char *pmt, *p;
rl_save_prompt ();
- if (saved_local_prompt == 0)
+ /* We've saved the prompt, and can do anything with the various prompt
+ strings we need before they're restored. We want the unexpanded
+ portion of the prompt string after any final newline. */
+ p = rl_prompt ? strrchr (rl_prompt, '\n') : 0;
+ if (p == 0)
{
len = (rl_prompt && *rl_prompt) ? strlen (rl_prompt) : 0;
pmt = (char *)xmalloc (len + 2);
@@ -1829,16 +2015,17 @@ _rl_make_prompt_for_search (pchar)
}
else
{
- len = *saved_local_prompt ? strlen (saved_local_prompt) : 0;
+ p++;
+ len = strlen (p);
pmt = (char *)xmalloc (len + 2);
if (len)
- strcpy (pmt, saved_local_prompt);
+ strcpy (pmt, p);
pmt[len] = pchar;
pmt[len+1] = '\0';
- local_prompt = savestring (pmt);
- prompt_last_invisible = saved_last_invisible;
- prompt_visible_length = saved_visible_length + 1;
- }
+ }
+
+ /* will be overwritten by expand_prompt, called from rl_message */
+ prompt_physical_chars = saved_physical_chars + 1;
return pmt;
}
@@ -1907,9 +2094,9 @@ insert_some_chars (string, count, col)
char *string;
int count, col;
{
-#if defined(__MSDOS__) || defined(__MINGW32__)
+#if defined (__MSDOS__) || defined (__MINGW32__)
_rl_output_some_chars (string, count);
-#else /* !__MSDOS__ && !__MINGW32__ */
+#else
/* DEBUGGING */
if (MB_CUR_MAX == 1 || rl_byte_oriented)
if (count != col)
@@ -1948,7 +2135,7 @@ insert_some_chars (string, count, col)
if (_rl_term_ei && *_rl_term_ei)
tputs (_rl_term_ei, 1, _rl_output_character_function);
}
-#endif /* !__MSDOS__ */
+#endif /* __MSDOS__ || __MINGW32__ */
}
/* Delete COUNT characters from the display line. */
@@ -1959,7 +2146,7 @@ delete_chars (count)
if (count > _rl_screenwidth) /* XXX */
return;
-#if !defined(__MSDOS__) && !defined(__MINGW32__)
+#if !defined (__MSDOS__) && !defined (__MINGW32__)
if (_rl_term_DC && *_rl_term_DC)
{
char *buffer;
@@ -2028,32 +2215,22 @@ static void
redraw_prompt (t)
char *t;
{
- char *oldp, *oldl, *oldlprefix;
- int oldlen, oldlast, oldplen, oldninvis;
+ char *oldp;
- /* Geez, I should make this a struct. */
oldp = rl_display_prompt;
- oldl = local_prompt;
- oldlprefix = local_prompt_prefix;
- oldlen = prompt_visible_length;
- oldplen = prompt_prefix_length;
- oldlast = prompt_last_invisible;
- oldninvis = prompt_invis_chars_first_line;
+ rl_save_prompt ();
rl_display_prompt = t;
local_prompt = expand_prompt (t, &prompt_visible_length,
&prompt_last_invisible,
- &prompt_invis_chars_first_line);
+ &prompt_invis_chars_first_line,
+ &prompt_physical_chars);
local_prompt_prefix = (char *)NULL;
+
rl_forced_update_display ();
rl_display_prompt = oldp;
- local_prompt = oldl;
- local_prompt_prefix = oldlprefix;
- prompt_visible_length = oldlen;
- prompt_prefix_length = oldplen;
- prompt_last_invisible = oldlast;
- prompt_invis_chars_first_line = oldninvis;
+ rl_restore_prompt();
}
/* Redisplay the current line after a SIGWINCH is received. */
@@ -2163,7 +2340,7 @@ _rl_col_width (str, start, end)
while (point < start)
{
tmp = mbrlen (str + point, max, &ps);
- if ((size_t)tmp == (size_t)-1 || (size_t)tmp == (size_t)-2)
+ if (MB_INVALIDCH ((size_t)tmp))
{
/* In this case, the bytes are invalid or too short to compose a
multibyte character, so we assume that the first byte represents
@@ -2175,8 +2352,8 @@ _rl_col_width (str, start, end)
effect of mbstate is undefined. */
memset (&ps, 0, sizeof (mbstate_t));
}
- else if (tmp == 0)
- break; /* Found '\0' */
+ else if (MB_NULLWCH (tmp))
+ break; /* Found '\0' */
else
{
point += tmp;
@@ -2192,7 +2369,7 @@ _rl_col_width (str, start, end)
while (point < end)
{
tmp = mbrtowc (&wc, str + point, max, &ps);
- if ((size_t)tmp == (size_t)-1 || (size_t)tmp == (size_t)-2)
+ if (MB_INVALIDCH ((size_t)tmp))
{
/* In this case, the bytes are invalid or too short to compose a
multibyte character, so we assume that the first byte represents
@@ -2207,8 +2384,8 @@ _rl_col_width (str, start, end)
effect of mbstate is undefined. */
memset (&ps, 0, sizeof (mbstate_t));
}
- else if (tmp == 0)
- break; /* Found '\0' */
+ else if (MB_NULLWCH (tmp))
+ break; /* Found '\0' */
else
{
point += tmp;
diff --git a/readline/doc/ChangeLog.gdb b/readline/doc/ChangeLog.gdb
index 1253d9c4aed..14d32f67c09 100644
--- a/readline/doc/ChangeLog.gdb
+++ b/readline/doc/ChangeLog.gdb
@@ -1,3 +1,7 @@
+2006-04-24 Daniel Jacobowitz <dan@codesourcery.com>
+
+ Imported readline 5.1, and upstream patches 001-004.
+
2003-09-14 Andrew Cagney <cagney@redhat.com>
* history.0: Delete generated file.
diff --git a/readline/doc/Makefile.in b/readline/doc/Makefile.in
index 8a85ae17c8b..692a4e87db1 100644
--- a/readline/doc/Makefile.in
+++ b/readline/doc/Makefile.in
@@ -1,7 +1,7 @@
# This makefile for Readline library documentation is in -*- text -*- mode.
# Emacs likes it that way.
-# Copyright (C) 1996 Free Software Foundation, Inc.
+# Copyright (C) 1996-2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -52,14 +52,18 @@ TEXI2DVI = $(srcdir)/texi2dvi
TEXI2HTML = $(srcdir)/texi2html
QUIETPS = #set this to -q to shut up dvips
PAPERSIZE = letter
-PSDPI = 300 # I don't have any 600-dpi printers
+PSDPI = 600
DVIPS = dvips -D ${PSDPI} $(QUIETPS) -t ${PAPERSIZE} -o $@ # tricky
-RLSRC = $(srcdir)/rlman.texinfo $(srcdir)/rluser.texinfo \
- $(srcdir)/rltech.texinfo $(srcdir)/manvers.texinfo \
- $(srcdir)/rluserman.texinfo
-HISTSRC = $(srcdir)/hist.texinfo $(srcdir)/hsuser.texinfo \
- $(srcdir)/hstech.texinfo $(srcdir)/manvers.texinfo
+# These tools might not be available; they're not required
+DVIPDF = dvipdfm -o $@ -p ${PAPERSIZE}
+PSPDF = gs -sPAPERSIZE=${PAPERSIZE} -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=$@
+
+RLSRC = $(srcdir)/rlman.texi $(srcdir)/rluser.texi \
+ $(srcdir)/rltech.texi $(srcdir)/version.texi \
+ $(srcdir)/rluserman.texi
+HISTSRC = $(srcdir)/history.texi $(srcdir)/hsuser.texi \
+ $(srcdir)/hstech.texi $(srcdir)/version.texi
# This should be a program that converts troff to an ascii-readable format
NROFF = groff -Tascii
@@ -72,39 +76,54 @@ INFOOBJ = readline.info history.info rluserman.info
PSOBJ = readline.ps history.ps rluserman.ps readline_3.ps history_3.ps
HTMLOBJ = readline.html history.html rluserman.html
TEXTOBJ = readline.0 history.0
+PDFOBJ = readline.pdf history.pdf rluserman.pdf
-INTERMEDIATE_OBJ = rlman.dvi hist.dvi rluserman.dvi
+INTERMEDIATE_OBJ = rlman.dvi
DIST_DOCS = $(DVIOBJ) $(PSOBJ) $(HTMLOBJ) $(INFOOBJ) $(TEXTOBJ)
-.SUFFIXES: .0 .3 .ps .txt .dvi
+.SUFFIXES: .0 .3 .ps .txt .dvi .html .pdf
.3.0:
$(RM) $@
-${NROFF} -man $< > $@
+.ps.pdf:
+ $(RM) $@
+ -${PSPDF} $<
+
+.dvi.pdf:
+ $(RM) $@
+ -${DVIPDF} $<
+
all: info dvi html ps text
nodvi: info html text
+info: $(INFOOBJ)
+dvi: $(DVIOBJ)
+ps: $(PSOBJ)
+html: $(HTMLOBJ)
+text: $(TEXTOBJ)
+pdf: $(PDFOBJ)
+
readline.dvi: $(RLSRC)
- TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rlman.texinfo
+ TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rlman.texi
mv rlman.dvi readline.dvi
readline.info: $(RLSRC)
- $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rlman.texinfo
+ $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rlman.texi
rluserman.dvi: $(RLSRC)
- TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rluserman.texinfo
+ TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rluserman.texi
rluserman.info: $(RLSRC)
- $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rluserman.texinfo
+ $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rluserman.texi
history.dvi: ${HISTSRC}
- TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/hist.texinfo
- mv hist.dvi history.dvi
+ TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/history.texi
history.info: ${HISTSRC}
- $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/hist.texinfo
+ $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/history.texi
readline.ps: readline.dvi
$(RM) $@
@@ -122,22 +141,15 @@ history.ps: history.dvi
# This leaves readline.html and rlman.html -- rlman.html is for www.gnu.org
#
readline.html: ${RLSRC}
- $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rlman.texinfo
+ $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rlman.texi
sed -e 's:rlman.html:readline.html:g' rlman.html > readline.html
+ $(RM) rlman.html
rluserman.html: ${RLSRC}
- $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rluserman.texinfo
+ $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rluserman.texi
history.html: ${HISTSRC}
- $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/hist.texinfo
- sed -e 's:hist.html:history.html:g' hist.html > history.html
- $(RM) hist.html
-
-info: $(INFOOBJ)
-dvi: $(DVIOBJ)
-ps: $(PSOBJ)
-html: $(HTMLOBJ)
-text: $(TEXTOBJ)
+ $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/history.texi
readline.0: readline.3
@@ -151,9 +163,14 @@ history_3.ps: history.3
${RM} $@
${GROFF} -man < $(srcdir)/history.3 > $@
+readline.pdf: readline.dvi
+history.pdf: history.dvi
+rluserman.pdf: rluserman.dvi
+
clean:
- $(RM) *.aux *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps *.pgs \
- *.fns *.kys *.tps *.vrs *.bt *.bts *.o core *.core
+ $(RM) *.aux *.bak *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps \
+ *.pgs *.bt *.bts *.rw *.rws *.fns *.kys *.tps *.vrs *.o \
+ core *.core
mostlyclean: clean
@@ -169,6 +186,7 @@ maybe-clean:
maintainer-clean: clean
$(RM) $(DIST_DOCS)
$(RM) $(INTERMEDIATE_OBJ)
+ $(RM) $(PDFOBJ)
$(RM) Makefile
installdirs: $(topdir)/support/mkdirs
diff --git a/readline/doc/hist.texinfo b/readline/doc/hist.texinfo
deleted file mode 100644
index 63ceb16e607..00000000000
--- a/readline/doc/hist.texinfo
+++ /dev/null
@@ -1,110 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header (This is for running Texinfo on a region.)
-@setfilename history.info
-@settitle GNU History Library
-@c %**end of header (This is for running Texinfo on a region.)
-
-@setchapternewpage odd
-
-@include manvers.texinfo
-
-@ifinfo
-@dircategory Libraries
-@direntry
-* History: (history). The GNU history library API
-@end direntry
-
-This document describes the GNU History library, a programming tool that
-provides a consistent user interface for recalling lines of previously
-typed input.
-
-Copyright (C) 1988-2002 Free Software Foundation, Inc.
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-pare preserved on all copies.
-
-@ignore
-Permission is granted to process this file through TeX and print the
-results, provided the printed document carries copying permission
-notice identical to this one except for the removal of this paragraph
-(this paragraph not being relevant to the printed manual).
-@end ignore
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the entire
-resulting derived work is distributed under the terms of a permission
-notice identical to this one.
-
-Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions,
-except that this permission notice may be stated in a translation approved
-by the Free Software Foundation.
-@end ifinfo
-
-@titlepage
-@title GNU History Library
-@subtitle Edition @value{EDITION}, for @code{History Library} Version @value{VERSION}.
-@subtitle @value{UPDATE-MONTH}
-@author Brian Fox, Free Software Foundation
-@author Chet Ramey, Case Western Reserve University
-
-@page
-This document describes the GNU History library, a programming tool that
-provides a consistent user interface for recalling lines of previously
-typed input.
-
-Published by the Free Software Foundation @*
-59 Temple Place, Suite 330, @*
-Boston, MA 02111 USA
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the entire
-resulting derived work is distributed under the terms of a permission
-notice identical to this one.
-
-Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions,
-except that this permission notice may be stated in a translation approved
-by the Free Software Foundation.
-
-@vskip 0pt plus 1filll
-Copyright @copyright{} 1988-2002 Free Software Foundation, Inc.
-@end titlepage
-
-@ifinfo
-@node Top
-@top GNU History Library
-
-This document describes the GNU History library, a programming tool that
-provides a consistent user interface for recalling lines of previously
-typed input.
-
-@menu
-* Using History Interactively:: GNU History User's Manual.
-* Programming with GNU History:: GNU History Programmer's Manual.
-* Concept Index:: Index of concepts described in this manual.
-* Function and Variable Index:: Index of externally visible functions
- and variables.
-@end menu
-@end ifinfo
-
-@syncodeindex fn vr
-
-@include hsuser.texinfo
-@include hstech.texinfo
-
-@node Concept Index
-@appendix Concept Index
-@printindex cp
-
-@node Function and Variable Index
-@appendix Function and Variable Index
-@printindex vr
-
-@contents
-@bye
diff --git a/readline/doc/history.3 b/readline/doc/history.3
index ed0cb9f84e0..3ade839ff7d 100644
--- a/readline/doc/history.3
+++ b/readline/doc/history.3
@@ -6,9 +6,9 @@
.\" Case Western Reserve University
.\" chet@ins.CWRU.Edu
.\"
-.\" Last Change: Thu Jan 31 16:08:07 EST 2002
+.\" Last Change: Thu Jul 31 08:46:08 EDT 2003
.\"
-.TH HISTORY 3 "2002 January 31" "GNU History 4.3"
+.TH HISTORY 3 "2003 July 31" "GNU History 5.0"
.\"
.\" File Name macro. This used to be `.PN', for Path Name,
.\" but Sun doesn't seem to like that very much.
@@ -249,6 +249,10 @@ or `\fB:&\fP'. If used with
`\fB:s\fP', any delimiter can be used
in place of /, and the final delimiter is optional
if it is the last character of the event line.
+An \fBa\fP may be used as a synonym for \fBg\fP.
+.TP
+.B G
+Apply the following `\fBs\fP' modifier once to each word in the event line.
.PD
.SH "PROGRAMMING WITH HISTORY FUNCTIONS"
This section describes how to use the History library in other programs.
@@ -292,6 +296,7 @@ declared as follows:
.nf
typedef struct _hist_entry {
char *line;
+ char *timestamp;
histdata_t data;
} HIST_ENTRY;
.fi
@@ -345,14 +350,24 @@ parameters managing the list itself.
Place \fIstring\fP at the end of the history list. The associated data
field (if any) is set to \fBNULL\fP.
+.Fn1 void add_history_time "const char *string"
+Change the time stamp associated with the most recent history entry to
+\fIstring\fP.
+
.Fn1 "HIST_ENTRY *" remove_history "int which"
Remove history entry at offset \fIwhich\fP from the history. The
removed element is returned so you can free the line, data,
and containing structure.
+.Fn1 "histdata_t" free_history_entry "HIST_ENTRY *histent"
+Free the history entry \fIhistent\fP and any history library private
+data associated with it. Returns the application-specific data
+so the caller can dispose of it.
+
.Fn3 "HIST_ENTRY *" replace_history_entry "int which" "const char *line" "histdata_t data"
Make the history entry at offset \fIwhich\fP have \fIline\fP and \fIdata\fP.
-This returns the old entry so you can dispose of the data. In the case
+This returns the old entry so the caller can dispose of any
+application-specific data. In the case
of an invalid \fIwhich\fP, a \fBNULL\fP pointer is returned.
.Fn1 void clear_history "void"
@@ -394,6 +409,9 @@ Return the history entry at position \fIoffset\fP, starting from
If there is no entry there, or if \fIoffset\fP
is greater than the history length, return a \fBNULL\fP pointer.
+.Fn1 "time_t" history_get_time "HIST_ENTRY *"
+Return the time stamp associated with the history entry passed as the argument.
+
.Fn1 int history_total_bytes "void"
Return the number of bytes that the primary history entries are using.
This function returns the sum of the lengths of all the lines in the
@@ -551,6 +569,11 @@ The number of entries currently stored in the history list.
The maximum number of history entries. This must be changed using
\fBstifle_history()\fP.
+.Vb int history_write_timestamps
+If non-zero, timestamps are written to the history file, so they can be
+preserved between sessions. The default value is 0, meaning that
+timestamps are not saved.
+
.Vb char history_expansion_char
The character that introduces a history event. The default is \fB!\fP.
Setting this to 0 inhibits history expansion.
diff --git a/readline/doc/history.pdf b/readline/doc/history.pdf
deleted file mode 100644
index 2ed10c44da0..00000000000
--- a/readline/doc/history.pdf
+++ /dev/null
Binary files differ
diff --git a/readline/doc/hstech.texinfo b/readline/doc/hstech.texinfo
deleted file mode 100644
index 949444668fc..00000000000
--- a/readline/doc/hstech.texinfo
+++ /dev/null
@@ -1,550 +0,0 @@
-@ignore
-This file documents the user interface to the GNU History library.
-
-Copyright (C) 1988-2002 Free Software Foundation, Inc.
-Authored by Brian Fox and Chet Ramey.
-
-Permission is granted to make and distribute verbatim copies of this manual
-provided the copyright notice and this permission notice are preserved on
-all copies.
-
-Permission is granted to process this file through Tex and print the
-results, provided the printed document carries copying permission notice
-identical to this one except for the removal of this paragraph (this
-paragraph not being relevant to the printed manual).
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided also that the
-GNU Copyright statement is available to the distributee, and provided that
-the entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions.
-@end ignore
-
-@node Programming with GNU History
-@chapter Programming with GNU History
-
-This chapter describes how to interface programs that you write
-with the @sc{gnu} History Library.
-It should be considered a technical guide.
-For information on the interactive use of @sc{gnu} History, @pxref{Using
-History Interactively}.
-
-@menu
-* Introduction to History:: What is the GNU History library for?
-* History Storage:: How information is stored.
-* History Functions:: Functions that you can use.
-* History Variables:: Variables that control behaviour.
-* History Programming Example:: Example of using the GNU History Library.
-@end menu
-
-@node Introduction to History
-@section Introduction to History
-
-Many programs read input from the user a line at a time. The @sc{gnu}
-History library is able to keep track of those lines, associate arbitrary
-data with each line, and utilize information from previous lines in
-composing new ones.
-
-The programmer using the History library has available functions
-for remembering lines on a history list, associating arbitrary data
-with a line, removing lines from the list, searching through the list
-for a line containing an arbitrary text string, and referencing any line
-in the list directly. In addition, a history @dfn{expansion} function
-is available which provides for a consistent user interface across
-different programs.
-
-The user using programs written with the History library has the
-benefit of a consistent user interface with a set of well-known
-commands for manipulating the text of previous lines and using that text
-in new commands. The basic history manipulation commands are similar to
-the history substitution provided by @code{csh}.
-
-If the programmer desires, he can use the Readline library, which
-includes some history manipulation by default, and has the added
-advantage of command line editing.
-
-Before declaring any functions using any functionality the History
-library provides in other code, an application writer should include
-the file @code{<readline/history.h>} in any file that uses the
-History library's features. It supplies extern declarations for all
-of the library's public functions and variables, and declares all of
-the public data structures.
-
-@node History Storage
-@section History Storage
-
-The history list is an array of history entries. A history entry is
-declared as follows:
-
-@example
-typedef void *histdata_t;
-
-typedef struct _hist_entry @{
- char *line;
- histdata_t data;
-@} HIST_ENTRY;
-@end example
-
-The history list itself might therefore be declared as
-
-@example
-HIST_ENTRY **the_history_list;
-@end example
-
-The state of the History library is encapsulated into a single structure:
-
-@example
-/*
- * A structure used to pass around the current state of the history.
- */
-typedef struct _hist_state @{
- HIST_ENTRY **entries; /* Pointer to the entries themselves. */
- int offset; /* The location pointer within this array. */
- int length; /* Number of elements within this array. */
- int size; /* Number of slots allocated to this array. */
- int flags;
-@} HISTORY_STATE;
-@end example
-
-If the flags member includes @code{HS_STIFLED}, the history has been
-stifled.
-
-@node History Functions
-@section History Functions
-
-This section describes the calling sequence for the various functions
-exported by the @sc{gnu} History library.
-
-@menu
-* Initializing History and State Management:: Functions to call when you
- want to use history in a
- program.
-* History List Management:: Functions used to manage the list
- of history entries.
-* Information About the History List:: Functions returning information about
- the history list.
-* Moving Around the History List:: Functions used to change the position
- in the history list.
-* Searching the History List:: Functions to search the history list
- for entries containing a string.
-* Managing the History File:: Functions that read and write a file
- containing the history list.
-* History Expansion:: Functions to perform csh-like history
- expansion.
-@end menu
-
-@node Initializing History and State Management
-@subsection Initializing History and State Management
-
-This section describes functions used to initialize and manage
-the state of the History library when you want to use the history
-functions in your program.
-
-@deftypefun void using_history (void)
-Begin a session in which the history functions might be used. This
-initializes the interactive variables.
-@end deftypefun
-
-@deftypefun {HISTORY_STATE *} history_get_history_state (void)
-Return a structure describing the current state of the input history.
-@end deftypefun
-
-@deftypefun void history_set_history_state (HISTORY_STATE *state)
-Set the state of the history list according to @var{state}.
-@end deftypefun
-
-@node History List Management
-@subsection History List Management
-
-These functions manage individual entries on the history list, or set
-parameters managing the list itself.
-
-@deftypefun void add_history (const char *string)
-Place @var{string} at the end of the history list. The associated data
-field (if any) is set to @code{NULL}.
-@end deftypefun
-
-@deftypefun {HIST_ENTRY *} remove_history (int which)
-Remove history entry at offset @var{which} from the history. The
-removed element is returned so you can free the line, data,
-and containing structure.
-@end deftypefun
-
-@deftypefun {HIST_ENTRY *} replace_history_entry (int which, const char *line, histdata_t data)
-Make the history entry at offset @var{which} have @var{line} and @var{data}.
-This returns the old entry so you can dispose of the data. In the case
-of an invalid @var{which}, a @code{NULL} pointer is returned.
-@end deftypefun
-
-@deftypefun void clear_history (void)
-Clear the history list by deleting all the entries.
-@end deftypefun
-
-@deftypefun void stifle_history (int max)
-Stifle the history list, remembering only the last @var{max} entries.
-@end deftypefun
-
-@deftypefun int unstifle_history (void)
-Stop stifling the history. This returns the previously-set
-maximum number of history entries (as set by @code{stifle_history()}).
-The value is positive if the history was
-stifled, negative if it wasn't.
-@end deftypefun
-
-@deftypefun int history_is_stifled (void)
-Returns non-zero if the history is stifled, zero if it is not.
-@end deftypefun
-
-@node Information About the History List
-@subsection Information About the History List
-
-These functions return information about the entire history list or
-individual list entries.
-
-@deftypefun {HIST_ENTRY **} history_list (void)
-Return a @code{NULL} terminated array of @code{HIST_ENTRY *} which is the
-current input history. Element 0 of this list is the beginning of time.
-If there is no history, return @code{NULL}.
-@end deftypefun
-
-@deftypefun int where_history (void)
-Returns the offset of the current history element.
-@end deftypefun
-
-@deftypefun {HIST_ENTRY *} current_history (void)
-Return the history entry at the current position, as determined by
-@code{where_history()}. If there is no entry there, return a @code{NULL}
-pointer.
-@end deftypefun
-
-@deftypefun {HIST_ENTRY *} history_get (int offset)
-Return the history entry at position @var{offset}, starting from
-@code{history_base} (@pxref{History Variables}).
-If there is no entry there, or if @var{offset}
-is greater than the history length, return a @code{NULL} pointer.
-@end deftypefun
-
-@deftypefun int history_total_bytes (void)
-Return the number of bytes that the primary history entries are using.
-This function returns the sum of the lengths of all the lines in the
-history.
-@end deftypefun
-
-@node Moving Around the History List
-@subsection Moving Around the History List
-
-These functions allow the current index into the history list to be
-set or changed.
-
-@deftypefun int history_set_pos (int pos)
-Set the current history offset to @var{pos}, an absolute index
-into the list.
-Returns 1 on success, 0 if @var{pos} is less than zero or greater
-than the number of history entries.
-@end deftypefun
-
-@deftypefun {HIST_ENTRY *} previous_history (void)
-Back up the current history offset to the previous history entry, and
-return a pointer to that entry. If there is no previous entry, return
-a @code{NULL} pointer.
-@end deftypefun
-
-@deftypefun {HIST_ENTRY *} next_history (void)
-Move the current history offset forward to the next history entry, and
-return the a pointer to that entry. If there is no next entry, return
-a @code{NULL} pointer.
-@end deftypefun
-
-@node Searching the History List
-@subsection Searching the History List
-@cindex History Searching
-
-These functions allow searching of the history list for entries containing
-a specific string. Searching may be performed both forward and backward
-from the current history position. The search may be @dfn{anchored},
-meaning that the string must match at the beginning of the history entry.
-@cindex anchored search
-
-@deftypefun int history_search (const char *string, int direction)
-Search the history for @var{string}, starting at the current history offset.
-If @var{direction} is less than 0, then the search is through
-previous entries, otherwise through subsequent entries.
-If @var{string} is found, then
-the current history index is set to that history entry, and the value
-returned is the offset in the line of the entry where
-@var{string} was found. Otherwise, nothing is changed, and a -1 is
-returned.
-@end deftypefun
-
-@deftypefun int history_search_prefix (const char *string, int direction)
-Search the history for @var{string}, starting at the current history
-offset. The search is anchored: matching lines must begin with
-@var{string}. If @var{direction} is less than 0, then the search is
-through previous entries, otherwise through subsequent entries.
-If @var{string} is found, then the
-current history index is set to that entry, and the return value is 0.
-Otherwise, nothing is changed, and a -1 is returned.
-@end deftypefun
-
-@deftypefun int history_search_pos (const char *string, int direction, int pos)
-Search for @var{string} in the history list, starting at @var{pos}, an
-absolute index into the list. If @var{direction} is negative, the search
-proceeds backward from @var{pos}, otherwise forward. Returns the absolute
-index of the history element where @var{string} was found, or -1 otherwise.
-@end deftypefun
-
-@node Managing the History File
-@subsection Managing the History File
-
-The History library can read the history from and write it to a file.
-This section documents the functions for managing a history file.
-
-@deftypefun int read_history (const char *filename)
-Add the contents of @var{filename} to the history list, a line at a time.
-If @var{filename} is @code{NULL}, then read from @file{~/.history}.
-Returns 0 if successful, or @code{errno} if not.
-@end deftypefun
-
-@deftypefun int read_history_range (const char *filename, int from, int to)
-Read a range of lines from @var{filename}, adding them to the history list.
-Start reading at line @var{from} and end at @var{to}.
-If @var{from} is zero, start at the beginning. If @var{to} is less than
-@var{from}, then read until the end of the file. If @var{filename} is
-@code{NULL}, then read from @file{~/.history}. Returns 0 if successful,
-or @code{errno} if not.
-@end deftypefun
-
-@deftypefun int write_history (const char *filename)
-Write the current history to @var{filename}, overwriting @var{filename}
-if necessary.
-If @var{filename} is @code{NULL}, then write the history list to
-@file{~/.history}.
-Returns 0 on success, or @code{errno} on a read or write error.
-@end deftypefun
-
-@deftypefun int append_history (int nelements, const char *filename)
-Append the last @var{nelements} of the history list to @var{filename}.
-If @var{filename} is @code{NULL}, then append to @file{~/.history}.
-Returns 0 on success, or @code{errno} on a read or write error.
-@end deftypefun
-
-@deftypefun int history_truncate_file (const char *filename, int nlines)
-Truncate the history file @var{filename}, leaving only the last
-@var{nlines} lines.
-If @var{filename} is @code{NULL}, then @file{~/.history} is truncated.
-Returns 0 on success, or @code{errno} on failure.
-@end deftypefun
-
-@node History Expansion
-@subsection History Expansion
-
-These functions implement history expansion.
-
-@deftypefun int history_expand (char *string, char **output)
-Expand @var{string}, placing the result into @var{output}, a pointer
-to a string (@pxref{History Interaction}). Returns:
-@table @code
-@item 0
-If no expansions took place (or, if the only change in
-the text was the removal of escape characters preceding the history expansion
-character);
-@item 1
-if expansions did take place;
-@item -1
-if there was an error in expansion;
-@item 2
-if the returned line should be displayed, but not executed,
-as with the @code{:p} modifier (@pxref{Modifiers}).
-@end table
-
-If an error ocurred in expansion, then @var{output} contains a descriptive
-error message.
-@end deftypefun
-
-@deftypefun {char *} get_history_event (const char *string, int *cindex, int qchar)
-Returns the text of the history event beginning at @var{string} +
-@var{*cindex}. @var{*cindex} is modified to point to after the event
-specifier. At function entry, @var{cindex} points to the index into
-@var{string} where the history event specification begins. @var{qchar}
-is a character that is allowed to end the event specification in addition
-to the ``normal'' terminating characters.
-@end deftypefun
-
-@deftypefun {char **} history_tokenize (const char *string)
-Return an array of tokens parsed out of @var{string}, much as the
-shell might. The tokens are split on the characters in the
-@var{history_word_delimiters} variable,
-and shell quoting conventions are obeyed.
-@end deftypefun
-
-@deftypefun {char *} history_arg_extract (int first, int last, const char *string)
-Extract a string segment consisting of the @var{first} through @var{last}
-arguments present in @var{string}. Arguments are split using
-@code{history_tokenize}.
-@end deftypefun
-
-@node History Variables
-@section History Variables
-
-This section describes the externally-visible variables exported by
-the @sc{gnu} History Library.
-
-@deftypevar int history_base
-The logical offset of the first entry in the history list.
-@end deftypevar
-
-@deftypevar int history_length
-The number of entries currently stored in the history list.
-@end deftypevar
-
-@deftypevar int history_max_entries
-The maximum number of history entries. This must be changed using
-@code{stifle_history()}.
-@end deftypevar
-
-@deftypevar char history_expansion_char
-The character that introduces a history event. The default is @samp{!}.
-Setting this to 0 inhibits history expansion.
-@end deftypevar
-
-@deftypevar char history_subst_char
-The character that invokes word substitution if found at the start of
-a line. The default is @samp{^}.
-@end deftypevar
-
-@deftypevar char history_comment_char
-During tokenization, if this character is seen as the first character
-of a word, then it and all subsequent characters up to a newline are
-ignored, suppressing history expansion for the remainder of the line.
-This is disabled by default.
-@end deftypevar
-
-@deftypevar {char *} history_word_delimiters
-The characters that separate tokens for @code{history_tokenize()}.
-The default value is @code{" \t\n()<>;&|"}.
-@end deftypevar
-
-@deftypevar {char *} history_no_expand_chars
-The list of characters which inhibit history expansion if found immediately
-following @var{history_expansion_char}. The default is space, tab, newline,
-carriage return, and @samp{=}.
-@end deftypevar
-
-@deftypevar {char *} history_search_delimiter_chars
-The list of additional characters which can delimit a history search
-string, in addition to space, TAB, @samp{:} and @samp{?} in the case of
-a substring search. The default is empty.
-@end deftypevar
-
-@deftypevar int history_quotes_inhibit_expansion
-If non-zero, single-quoted words are not scanned for the history expansion
-character. The default value is 0.
-@end deftypevar
-
-@deftypevar {rl_linebuf_func_t *} history_inhibit_expansion_function
-This should be set to the address of a function that takes two arguments:
-a @code{char *} (@var{string})
-and an @code{int} index into that string (@var{i}).
-It should return a non-zero value if the history expansion starting at
-@var{string[i]} should not be performed; zero if the expansion should
-be done.
-It is intended for use by applications like Bash that use the history
-expansion character for additional purposes.
-By default, this variable is set to @code{NULL}.
-@end deftypevar
-
-@node History Programming Example
-@section History Programming Example
-
-The following program demonstrates simple use of the @sc{gnu} History Library.
-
-@smallexample
-#include <stdio.h>
-#include <readline/history.h>
-
-main (argc, argv)
- int argc;
- char **argv;
-@{
- char line[1024], *t;
- int len, done = 0;
-
- line[0] = 0;
-
- using_history ();
- while (!done)
- @{
- printf ("history$ ");
- fflush (stdout);
- t = fgets (line, sizeof (line) - 1, stdin);
- if (t && *t)
- @{
- len = strlen (t);
- if (t[len - 1] == '\n')
- t[len - 1] = '\0';
- @}
-
- if (!t)
- strcpy (line, "quit");
-
- if (line[0])
- @{
- char *expansion;
- int result;
-
- result = history_expand (line, &expansion);
- if (result)
- fprintf (stderr, "%s\n", expansion);
-
- if (result < 0 || result == 2)
- @{
- free (expansion);
- continue;
- @}
-
- add_history (expansion);
- strncpy (line, expansion, sizeof (line) - 1);
- free (expansion);
- @}
-
- if (strcmp (line, "quit") == 0)
- done = 1;
- else if (strcmp (line, "save") == 0)
- write_history ("history_file");
- else if (strcmp (line, "read") == 0)
- read_history ("history_file");
- else if (strcmp (line, "list") == 0)
- @{
- register HIST_ENTRY **the_list;
- register int i;
-
- the_list = history_list ();
- if (the_list)
- for (i = 0; the_list[i]; i++)
- printf ("%d: %s\n", i + history_base, the_list[i]->line);
- @}
- else if (strncmp (line, "delete", 6) == 0)
- @{
- int which;
- if ((sscanf (line + 6, "%d", &which)) == 1)
- @{
- HIST_ENTRY *entry = remove_history (which);
- if (!entry)
- fprintf (stderr, "No such entry %d\n", which);
- else
- @{
- free (entry->line);
- free (entry);
- @}
- @}
- else
- @{
- fprintf (stderr, "non-numeric arg given to `delete'\n");
- @}
- @}
- @}
-@}
-@end smallexample
diff --git a/readline/doc/hsuser.texinfo b/readline/doc/hsuser.texinfo
deleted file mode 100644
index 418bfa8eff6..00000000000
--- a/readline/doc/hsuser.texinfo
+++ /dev/null
@@ -1,437 +0,0 @@
-@ignore
-This file documents the user interface to the GNU History library.
-
-Copyright (C) 1988-2002 Free Software Foundation, Inc.
-Authored by Brian Fox and Chet Ramey.
-
-Permission is granted to make and distribute verbatim copies of this manual
-provided the copyright notice and this permission notice are preserved on
-all copies.
-
-Permission is granted to process this file through Tex and print the
-results, provided the printed document carries copying permission notice
-identical to this one except for the removal of this paragraph (this
-paragraph not being relevant to the printed manual).
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided also that the
-GNU Copyright statement is available to the distributee, and provided that
-the entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions.
-@end ignore
-
-@node Using History Interactively
-@chapter Using History Interactively
-
-@ifclear BashFeatures
-@defcodeindex bt
-@end ifclear
-
-@ifset BashFeatures
-This chapter describes how to use the @sc{gnu} History Library
-interactively, from a user's standpoint.
-It should be considered a user's guide.
-For information on using the @sc{gnu} History Library in other programs,
-see the @sc{gnu} Readline Library Manual.
-@end ifset
-@ifclear BashFeatures
-This chapter describes how to use the @sc{gnu} History Library interactively,
-from a user's standpoint. It should be considered a user's guide. For
-information on using the @sc{gnu} History Library in your own programs,
-@pxref{Programming with GNU History}.
-@end ifclear
-
-@ifset BashFeatures
-@menu
-* Bash History Facilities:: How Bash lets you manipulate your command
- history.
-* Bash History Builtins:: The Bash builtin commands that manipulate
- the command history.
-* History Interaction:: What it feels like using History as a user.
-@end menu
-@end ifset
-@ifclear BashFeatures
-@menu
-* History Interaction:: What it feels like using History as a user.
-@end menu
-@end ifclear
-
-@ifset BashFeatures
-@node Bash History Facilities
-@section Bash History Facilities
-@cindex command history
-@cindex history list
-
-When the @option{-o history} option to the @code{set} builtin
-is enabled (@pxref{The Set Builtin}),
-the shell provides access to the @dfn{command history},
-the list of commands previously typed.
-The value of the @env{HISTSIZE} shell variable is used as the
-number of commands to save in a history list.
-The text of the last @env{$HISTSIZE}
-commands (default 500) is saved.
-The shell stores each command in the history list prior to
-parameter and variable expansion
-but after history expansion is performed, subject to the
-values of the shell variables
-@env{HISTIGNORE} and @env{HISTCONTROL}.
-
-When the shell starts up, the history is initialized from the
-file named by the @env{HISTFILE} variable (default @file{~/.bash_history}).
-The file named by the value of @env{HISTFILE} is truncated, if
-necessary, to contain no more than the number of lines specified by
-the value of the @env{HISTFILESIZE} variable.
-When an interactive shell exits, the last
-@env{$HISTSIZE} lines are copied from the history list to the file
-named by @env{$HISTFILE}.
-If the @code{histappend} shell option is set (@pxref{Bash Builtins}),
-the lines are appended to the history file,
-otherwise the history file is overwritten.
-If @env{HISTFILE}
-is unset, or if the history file is unwritable, the history is
-not saved. After saving the history, the history file is truncated
-to contain no more than @env{$HISTFILESIZE}
-lines. If @env{HISTFILESIZE} is not set, no truncation is performed.
-
-The builtin command @code{fc} may be used to list or edit and re-execute
-a portion of the history list.
-The @code{history} builtin may be used to display or modify the history
-list and manipulate the history file.
-When using command-line editing, search commands
-are available in each editing mode that provide access to the
-history list (@pxref{Commands For History}).
-
-The shell allows control over which commands are saved on the history
-list. The @env{HISTCONTROL} and @env{HISTIGNORE}
-variables may be set to cause the shell to save only a subset of the
-commands entered.
-The @code{cmdhist}
-shell option, if enabled, causes the shell to attempt to save each
-line of a multi-line command in the same history entry, adding
-semicolons where necessary to preserve syntactic correctness.
-The @code{lithist}
-shell option causes the shell to save the command with embedded newlines
-instead of semicolons.
-The @code{shopt} builtin is used to set these options.
-@xref{Bash Builtins}, for a description of @code{shopt}.
-
-@node Bash History Builtins
-@section Bash History Builtins
-@cindex history builtins
-
-Bash provides two builtin commands which manipulate the
-history list and history file.
-
-@table @code
-
-@item fc
-@btindex fc
-@example
-@code{fc [-e @var{ename}] [-nlr] [@var{first}] [@var{last}]}
-@code{fc -s [@var{pat}=@var{rep}] [@var{command}]}
-@end example
-
-Fix Command. In the first form, a range of commands from @var{first} to
-@var{last} is selected from the history list. Both @var{first} and
-@var{last} may be specified as a string (to locate the most recent
-command beginning with that string) or as a number (an index into the
-history list, where a negative number is used as an offset from the
-current command number). If @var{last} is not specified it is set to
-@var{first}. If @var{first} is not specified it is set to the previous
-command for editing and @minus{}16 for listing. If the @option{-l} flag is
-given, the commands are listed on standard output. The @option{-n} flag
-suppresses the command numbers when listing. The @option{-r} flag
-reverses the order of the listing. Otherwise, the editor given by
-@var{ename} is invoked on a file containing those commands. If
-@var{ename} is not given, the value of the following variable expansion
-is used: @code{$@{FCEDIT:-$@{EDITOR:-vi@}@}}. This says to use the
-value of the @env{FCEDIT} variable if set, or the value of the
-@env{EDITOR} variable if that is set, or @code{vi} if neither is set.
-When editing is complete, the edited commands are echoed and executed.
-
-In the second form, @var{command} is re-executed after each instance
-of @var{pat} in the selected command is replaced by @var{rep}.
-
-A useful alias to use with the @code{fc} command is @code{r='fc -s'}, so
-that typing @samp{r cc} runs the last command beginning with @code{cc}
-and typing @samp{r} re-executes the last command (@pxref{Aliases}).
-
-@item history
-@btindex history
-@example
-history [@var{n}]
-history -c
-history -d @var{offset}
-history [-anrw] [@var{filename}]
-history -ps @var{arg}
-@end example
-
-With no options, display the history list with line numbers.
-Lines prefixed with a @samp{*} have been modified.
-An argument of @var{n} lists only the last @var{n} lines.
-Options, if supplied, have the following meanings:
-
-@table @code
-@item -c
-Clear the history list. This may be combined
-with the other options to replace the history list completely.
-
-@item -d @var{offset}
-Delete the history entry at position @var{offset}.
-@var{offset} should be specified as it appears when the history is
-displayed.
-
-@item -a
-Append the new
-history lines (history lines entered since the beginning of the
-current Bash session) to the history file.
-
-@item -n
-Append the history lines not already read from the history file
-to the current history list. These are lines appended to the history
-file since the beginning of the current Bash session.
-
-@item -r
-Read the current history file and append its contents to
-the history list.
-
-@item -w
-Write out the current history to the history file.
-
-@item -p
-Perform history substitution on the @var{arg}s and display the result
-on the standard output, without storing the results in the history list.
-
-@item -s
-The @var{arg}s are added to the end of
-the history list as a single entry.
-
-@end table
-
-When any of the @option{-w}, @option{-r}, @option{-a}, or @option{-n} options is
-used, if @var{filename}
-is given, then it is used as the history file. If not, then
-the value of the @env{HISTFILE} variable is used.
-
-@end table
-@end ifset
-
-@node History Interaction
-@section History Expansion
-@cindex history expansion
-
-The History library provides a history expansion feature that is similar
-to the history expansion provided by @code{csh}. This section
-describes the syntax used to manipulate the history information.
-
-History expansions introduce words from the history list into
-the input stream, making it easy to repeat commands, insert the
-arguments to a previous command into the current input line, or
-fix errors in previous commands quickly.
-
-History expansion takes place in two parts. The first is to determine
-which line from the history list should be used during substitution.
-The second is to select portions of that line for inclusion into the
-current one. The line selected from the history is called the
-@dfn{event}, and the portions of that line that are acted upon are
-called @dfn{words}. Various @dfn{modifiers} are available to manipulate
-the selected words. The line is broken into words in the same fashion
-that Bash does, so that several words
-surrounded by quotes are considered one word.
-History expansions are introduced by the appearance of the
-history expansion character, which is @samp{!} by default.
-@ifset BashFeatures
-Only @samp{\} and @samp{'} may be used to escape the history expansion
-character.
-@end ifset
-
-@ifset BashFeatures
-Several shell options settable with the @code{shopt}
-builtin (@pxref{Bash Builtins}) may be used to tailor
-the behavior of history expansion. If the
-@code{histverify} shell option is enabled, and Readline
-is being used, history substitutions are not immediately passed to
-the shell parser.
-Instead, the expanded line is reloaded into the Readline
-editing buffer for further modification.
-If Readline is being used, and the @code{histreedit}
-shell option is enabled, a failed history expansion will be
-reloaded into the Readline editing buffer for correction.
-The @option{-p} option to the @code{history} builtin command
-may be used to see what a history expansion will do before using it.
-The @option{-s} option to the @code{history} builtin may be used to
-add commands to the end of the history list without actually executing
-them, so that they are available for subsequent recall.
-This is most useful in conjunction with Readline.
-
-The shell allows control of the various characters used by the
-history expansion mechanism with the @code{histchars} variable.
-@end ifset
-
-@menu
-* Event Designators:: How to specify which history line to use.
-* Word Designators:: Specifying which words are of interest.
-* Modifiers:: Modifying the results of substitution.
-@end menu
-
-@node Event Designators
-@subsection Event Designators
-@cindex event designators
-
-An event designator is a reference to a command line entry in the
-history list.
-@cindex history events
-
-@table @asis
-
-@item @code{!}
-Start a history substitution, except when followed by a space, tab,
-the end of the line, @samp{=} or @samp{(}.
-
-@item @code{!@var{n}}
-Refer to command line @var{n}.
-
-@item @code{!-@var{n}}
-Refer to the command @var{n} lines back.
-
-@item @code{!!}
-Refer to the previous command. This is a synonym for @samp{!-1}.
-
-@item @code{!@var{string}}
-Refer to the most recent command starting with @var{string}.
-
-@item @code{!?@var{string}[?]}
-Refer to the most recent command containing @var{string}. The trailing
-@samp{?} may be omitted if the @var{string} is followed immediately by
-a newline.
-
-@item @code{^@var{string1}^@var{string2}^}
-Quick Substitution. Repeat the last command, replacing @var{string1}
-with @var{string2}. Equivalent to
-@code{!!:s/@var{string1}/@var{string2}/}.
-
-@item @code{!#}
-The entire command line typed so far.
-
-@end table
-
-@node Word Designators
-@subsection Word Designators
-
-Word designators are used to select desired words from the event.
-A @samp{:} separates the event specification from the word designator. It
-may be omitted if the word designator begins with a @samp{^}, @samp{$},
-@samp{*}, @samp{-}, or @samp{%}. Words are numbered from the beginning
-of the line, with the first word being denoted by 0 (zero). Words are
-inserted into the current line separated by single spaces.
-
-@need 0.75
-For example,
-
-@table @code
-@item !!
-designates the preceding command. When you type this, the preceding
-command is repeated in toto.
-
-@item !!:$
-designates the last argument of the preceding command. This may be
-shortened to @code{!$}.
-
-@item !fi:2
-designates the second argument of the most recent command starting with
-the letters @code{fi}.
-@end table
-
-@need 0.75
-Here are the word designators:
-
-@table @code
-
-@item 0 (zero)
-The @code{0}th word. For many applications, this is the command word.
-
-@item @var{n}
-The @var{n}th word.
-
-@item ^
-The first argument; that is, word 1.
-
-@item $
-The last argument.
-
-@item %
-The word matched by the most recent @samp{?@var{string}?} search.
-
-@item @var{x}-@var{y}
-A range of words; @samp{-@var{y}} abbreviates @samp{0-@var{y}}.
-
-@item *
-All of the words, except the @code{0}th. This is a synonym for @samp{1-$}.
-It is not an error to use @samp{*} if there is just one word in the event;
-the empty string is returned in that case.
-
-@item @var{x}*
-Abbreviates @samp{@var{x}-$}
-
-@item @var{x}-
-Abbreviates @samp{@var{x}-$} like @samp{@var{x}*}, but omits the last word.
-
-@end table
-
-If a word designator is supplied without an event specification, the
-previous command is used as the event.
-
-@node Modifiers
-@subsection Modifiers
-
-After the optional word designator, you can add a sequence of one or more
-of the following modifiers, each preceded by a @samp{:}.
-
-@table @code
-
-@item h
-Remove a trailing pathname component, leaving only the head.
-
-@item t
-Remove all leading pathname components, leaving the tail.
-
-@item r
-Remove a trailing suffix of the form @samp{.@var{suffix}}, leaving
-the basename.
-
-@item e
-Remove all but the trailing suffix.
-
-@item p
-Print the new command but do not execute it.
-
-@ifset BashFeatures
-@item q
-Quote the substituted words, escaping further substitutions.
-
-@item x
-Quote the substituted words as with @samp{q},
-but break into words at spaces, tabs, and newlines.
-@end ifset
-
-@item s/@var{old}/@var{new}/
-Substitute @var{new} for the first occurrence of @var{old} in the
-event line. Any delimiter may be used in place of @samp{/}.
-The delimiter may be quoted in @var{old} and @var{new}
-with a single backslash. If @samp{&} appears in @var{new},
-it is replaced by @var{old}. A single backslash will quote
-the @samp{&}. The final delimiter is optional if it is the last
-character on the input line.
-
-@item &
-Repeat the previous substitution.
-
-@item g
-Cause changes to be applied over the entire event line. Used in
-conjunction with @samp{s}, as in @code{gs/@var{old}/@var{new}/},
-or with @samp{&}.
-
-@end table
diff --git a/readline/doc/inc-hist.texinfo b/readline/doc/inc-hist.texinfo
index 37ed15f4dd1..b5ed3cb4830 100644
--- a/readline/doc/inc-hist.texinfo
+++ b/readline/doc/inc-hist.texinfo
@@ -1,7 +1,7 @@
@ignore
This file documents the user interface to the GNU History library.
-Copyright (C) 1988-1999 Free Software Foundation, Inc.
+Copyright (C) 1988-2002 Free Software Foundation, Inc.
Authored by Brian Fox and Chet Ramey.
Permission is granted to make and distribute verbatim copies of this manual
@@ -38,11 +38,10 @@ For information on using the @sc{gnu} History Library in other programs,
see the @sc{gnu} Readline Library Manual.
@end ifset
@ifclear BashFeatures
-This chapter describes how to use the GNU History Library interactively,
+This chapter describes how to use the @sc{gnu} History Library interactively,
from a user's standpoint. It should be considered a user's guide.
-@c For
-@c information on using the GNU History Library in your own programs,
-@c @pxref{Programming with GNU History}.
+For information on using the @sc{gnu} History Library in other programs,
+see the @sc{gnu} Readline Library Manual.
@end ifclear
@ifset BashFeatures
@@ -66,36 +65,39 @@ from a user's standpoint. It should be considered a user's guide.
@cindex command history
@cindex history list
-When the @samp{-o history} option to the @code{set} builtin
+When the @option{-o history} option to the @code{set} builtin
is enabled (@pxref{The Set Builtin}),
-the shell provides access to the @var{command history},
+the shell provides access to the @dfn{command history},
the list of commands previously typed.
-The value of the @code{HISTSIZE} shell variable is used as the
+The value of the @env{HISTSIZE} shell variable is used as the
number of commands to save in a history list.
-The text of the last @code{$HISTSIZE}
+The text of the last @env{$HISTSIZE}
commands (default 500) is saved.
The shell stores each command in the history list prior to
parameter and variable expansion
but after history expansion is performed, subject to the
values of the shell variables
-@code{HISTIGNORE} and @code{HISTCONTROL}.
+@env{HISTIGNORE} and @env{HISTCONTROL}.
When the shell starts up, the history is initialized from the
-file named by the @code{HISTFILE} variable (default @file{~/.bash_history}).
-The file named by the value of @code{HISTFILE} is truncated, if
+file named by the @env{HISTFILE} variable (default @file{~/.bash_history}).
+The file named by the value of @env{HISTFILE} is truncated, if
necessary, to contain no more than the number of lines specified by
-the value of the @code{HISTFILESIZE} variable.
+the value of the @env{HISTFILESIZE} variable.
When an interactive shell exits, the last
-@code{$HISTSIZE} lines are copied from the history list to the file
-named by @code{$HISTFILE}.
+@env{$HISTSIZE} lines are copied from the history list to the file
+named by @env{$HISTFILE}.
If the @code{histappend} shell option is set (@pxref{Bash Builtins}),
the lines are appended to the history file,
otherwise the history file is overwritten.
-If @code{HISTFILE}
+If @env{HISTFILE}
is unset, or if the history file is unwritable, the history is
not saved. After saving the history, the history file is truncated
-to contain no more than @code{$HISTFILESIZE}
-lines. If @code{HISTFILESIZE} is not set, no truncation is performed.
+to contain no more than @env{$HISTFILESIZE}
+lines. If @env{HISTFILESIZE} is not set, no truncation is performed.
+
+If the @env{HISTTIMEFORMAT} is set, the time stamp information
+associated with each history entry is written to the history file.
The builtin command @code{fc} may be used to list or edit and re-execute
a portion of the history list.
@@ -106,7 +108,7 @@ are available in each editing mode that provide access to the
history list (@pxref{Commands For History}).
The shell allows control over which commands are saved on the history
-list. The @code{HISTCONTROL} and @code{HISTIGNORE}
+list. The @env{HISTCONTROL} and @env{HISTIGNORE}
variables may be set to cause the shell to save only a subset of the
commands entered.
The @code{cmdhist}
@@ -142,15 +144,15 @@ command beginning with that string) or as a number (an index into the
history list, where a negative number is used as an offset from the
current command number). If @var{last} is not specified it is set to
@var{first}. If @var{first} is not specified it is set to the previous
-command for editing and @minus{}16 for listing. If the @samp{-l} flag is
-given, the commands are listed on standard output. The @samp{-n} flag
-suppresses the command numbers when listing. The @samp{-r} flag
+command for editing and @minus{}16 for listing. If the @option{-l} flag is
+given, the commands are listed on standard output. The @option{-n} flag
+suppresses the command numbers when listing. The @option{-r} flag
reverses the order of the listing. Otherwise, the editor given by
@var{ename} is invoked on a file containing those commands. If
@var{ename} is not given, the value of the following variable expansion
is used: @code{$@{FCEDIT:-$@{EDITOR:-vi@}@}}. This says to use the
-value of the @code{FCEDIT} variable if set, or the value of the
-@code{EDITOR} variable if that is set, or @code{vi} if neither is set.
+value of the @env{FCEDIT} variable if set, or the value of the
+@env{EDITOR} variable if that is set, or @code{vi} if neither is set.
When editing is complete, the edited commands are echoed and executed.
In the second form, @var{command} is re-executed after each instance
@@ -171,8 +173,14 @@ history -ps @var{arg}
@end example
With no options, display the history list with line numbers.
-Lines prefixed with with a @samp{*} have been modified.
+Lines prefixed with a @samp{*} have been modified.
An argument of @var{n} lists only the last @var{n} lines.
+If the shell variable @env{HISTTIMEFORMAT} is set and not null,
+it is used as a format string for @var{strftime} to display
+the time stamp associated with each displayed history entry.
+No intervening blank is printed between the formatted time stamp
+and the history line.
+
Options, if supplied, have the following meanings:
@table @code
@@ -212,10 +220,10 @@ the history list as a single entry.
@end table
-When any of the @samp{-w}, @samp{-r}, @samp{-a}, or @samp{-n} options is
+When any of the @option{-w}, @option{-r}, @option{-a}, or @option{-n} options is
used, if @var{filename}
is given, then it is used as the history file. If not, then
-the value of the @code{HISTFILE} variable is used.
+the value of the @env{HISTFILE} variable is used.
@end table
@end ifset
@@ -261,9 +269,9 @@ editing buffer for further modification.
If Readline is being used, and the @code{histreedit}
shell option is enabled, a failed history expansion will be
reloaded into the Readline editing buffer for correction.
-The @samp{-p} option to the @code{history} builtin command
+The @option{-p} option to the @code{history} builtin command
may be used to see what a history expansion will do before using it.
-The @samp{-s} option to the @code{history} builtin may be used to
+The @option{-s} option to the @code{history} builtin may be used to
add commands to the end of the history list without actually executing
them, so that they are available for subsequent recall.
This is most useful in conjunction with Readline.
@@ -289,8 +297,15 @@ history list.
@table @asis
@item @code{!}
+@ifset BashFeatures
Start a history substitution, except when followed by a space, tab,
-the end of the line, @samp{=} or @samp{(}.
+the end of the line, @samp{=} or @samp{(} (when the
+@code{extglob} shell option is enabled using the @code{shopt} builtin).
+@end ifset
+@ifclear BashFeatures
+Start a history substitution, except when followed by a space, tab,
+the end of the line, or @samp{=}.
+@end ifclear
@item @code{!@var{n}}
Refer to command line @var{n}.
@@ -431,8 +446,12 @@ character on the input line.
Repeat the previous substitution.
@item g
+@itemx a
Cause changes to be applied over the entire event line. Used in
conjunction with @samp{s}, as in @code{gs/@var{old}/@var{new}/},
or with @samp{&}.
+@item G
+Apply the following @samp{s} modifier once to each word in the event.
+
@end table
diff --git a/readline/doc/manvers.texinfo b/readline/doc/manvers.texinfo
deleted file mode 100644
index 1206cf0f235..00000000000
--- a/readline/doc/manvers.texinfo
+++ /dev/null
@@ -1,10 +0,0 @@
-@ignore
-Copyright (C) 1988-2002 Free Software Foundation, Inc.
-@end ignore
-
-@set EDITION 4.3
-@set VERSION 4.3
-@set UPDATED 2002 March 4
-@set UPDATE-MONTH March 2002
-
-@set LASTCHANGE Mon Mar 4 12:00:16 EST 2002
diff --git a/readline/doc/readline.3 b/readline/doc/readline.3
index afd6ba29362..90cd9971e8e 100644
--- a/readline/doc/readline.3
+++ b/readline/doc/readline.3
@@ -6,9 +6,9 @@
.\" Case Western Reserve University
.\" chet@ins.CWRU.Edu
.\"
-.\" Last Change: Tue Jan 22 09:18:25 EST 2002
+.\" Last Change: Tue Sep 13 12:07:26 EDT 2005
.\"
-.TH READLINE 3 "2002 January 22" "GNU Readline 4.3"
+.TH READLINE 3 "2005 Sep 13" "GNU Readline 5.1-beta1"
.\"
.\" File Name macro. This used to be `.PN', for Path Name,
.\" but Sun doesn't seem to like that very much.
@@ -34,8 +34,8 @@ readline \- get a line from a user with editing
\fBreadline\fP (\fIconst char *prompt\fP);
.fi
.SH COPYRIGHT
-.if n Readline is Copyright (C) 1989\-2002 by the Free Software Foundation, Inc.
-.if t Readline is Copyright \(co 1989\-2002 by the Free Software Foundation, Inc.
+.if n Readline is Copyright (C) 1989\-2004 by the Free Software Foundation, Inc.
+.if t Readline is Copyright \(co 1989\-2004 by the Free Software Foundation, Inc.
.SH DESCRIPTION
.LP
.B readline
@@ -328,6 +328,10 @@ Except where noted, readline variables can take the values
or
.B Off
(without regard to case).
+Unrecognized variable names are ignored.
+When a variable value is read, empty or null values, "on" (case-insensitive),
+and "1" are equivalent to \fBOn\fP. All other values are equivalent to
+\fBOff\fP.
The variables and their default values are:
.PP
.PD 0
@@ -338,6 +342,11 @@ If set to \fBnone\fP, readline never rings the bell. If set to
\fBvisible\fP, readline uses a visible bell if one is available.
If set to \fBaudible\fP, readline attempts to ring the terminal's bell.
.TP
+.B bind\-tty\-special\-chars (On)
+If set to \fBOn\fP, readline attempts to bind the control characters
+treated specially by the kernel's terminal driver to their readline
+equivalents.
+.TP
.B comment\-begin (``#'')
The string that is inserted in \fBvi\fP mode when the
.B insert\-comment
@@ -360,7 +369,7 @@ It may be set to any integer value greater than or equal to
zero. If the number of possible completions is greater than
or equal to the value of this variable, the user is asked whether
or not he wishes to view them; otherwise they are simply listed
-on the terminal.
+on the terminal. A negative value causes readline to never ask.
.TP
.B convert\-meta (On)
If set to \fBOn\fP, readline will convert characters with the
@@ -391,9 +400,9 @@ arrow keys.
If set to \fBon\fP, tilde expansion is performed when readline
attempts word completion.
.TP
-.B history-preserve-point
+.B history\-preserve\-point (Off)
If set to \fBon\fP, the history code attempts to place point at the
-same location on each history line retrived with \fBprevious-history\fP
+same location on each history line retrieved with \fBprevious-history\fP
or \fBnext-history\fP.
.TP
.B horizontal\-scroll\-mode (Off)
@@ -465,6 +474,16 @@ set to
words which have more than one possible completion cause the
matches to be listed immediately instead of ringing the bell.
.TP
+.B show\-all\-if\-unmodified (Off)
+This alters the default behavior of the completion functions in
+a fashion similar to \fBshow\-all\-if\-ambiguous\fP.
+If set to
+.BR on ,
+words which have more than one possible completion without any
+possible partial completion (the possible completions don't share
+a common prefix) cause the matches to be listed immediately instead
+of ringing the bell.
+.TP
.B visible\-stats (Off)
If set to \fBOn\fP, a character denoting a file's type as reported
by \fIstat\fP(2) is appended to the filename when listing possible
@@ -681,6 +700,8 @@ With an argument
insert the \fIn\fPth word from the previous command (the words
in the previous command begin with word 0). A negative argument
inserts the \fIn\fPth word from the end of the previous command.
+Once the argument \fIn\fP is computed, the argument is extracted
+as if the "!\fIn\fP" history expansion had been specified.
.TP
.B
yank\-last\-arg (M\-.\^, M\-_\^)
@@ -689,6 +710,8 @@ the previous history entry). With an argument,
behave exactly like \fByank\-nth\-arg\fP.
Successive calls to \fByank\-last\-arg\fP move back through the history
list, inserting the last argument of each line in turn.
+The history expansion facilities are used to extract the last argument,
+as if the "!$" history expansion had been specified.
.PD
.SS Commands for Changing Text
.PP
@@ -787,6 +810,11 @@ Word boundaries are the same as those used by \fBbackward\-word\fP.
Kill the word behind point, using white space as a word boundary.
The killed text is saved on the kill-ring.
.TP
+.B unix\-filename\-rubout
+Kill the word behind point, using white space and the slash character
+as the word boundaries.
+The killed text is saved on the kill-ring.
+.TP
.B delete\-horizontal\-space (M\-\e)
Delete all spaces and tabs around point.
.TP
@@ -868,7 +896,7 @@ with a single match from the list of possible completions.
Repeated execution of \fBmenu\-complete\fP steps through the list
of possible completions, inserting each match in turn.
At the end of the list of completions, the bell is rung
-(subject to the setting of \Bbell\-style\fP)
+(subject to the setting of \fBbell\-style\fP)
and the original text is restored.
An argument of \fIn\fP moves \fIn\fP positions forward in the list
of matches; a negative argument may be used to move backward
@@ -979,7 +1007,7 @@ of an \fIinputrc\fP file.
.TP
.B dump\-macros
Print all of the readline key sequences bound to macros and the
-strings they ouput. If a numeric argument is supplied,
+strings they output. If a numeric argument is supplied,
the output is formatted in such a way that it can be made part
of an \fIinputrc\fP file.
.TP
diff --git a/readline/doc/readline.pdf b/readline/doc/readline.pdf
deleted file mode 100644
index 7fc2dfeddaa..00000000000
--- a/readline/doc/readline.pdf
+++ /dev/null
Binary files differ
diff --git a/readline/doc/rlman.texinfo b/readline/doc/rlman.texinfo
deleted file mode 100644
index 1ffebad08a7..00000000000
--- a/readline/doc/rlman.texinfo
+++ /dev/null
@@ -1,108 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@comment %**start of header (This is for running Texinfo on a region.)
-@setfilename readline.info
-@settitle GNU Readline Library
-@comment %**end of header (This is for running Texinfo on a region.)
-@synindex vr fn
-@setchapternewpage odd
-
-@include manvers.texinfo
-
-@ifinfo
-@dircategory Libraries
-@direntry
-* Readline: (readline). The GNU readline library API
-@end direntry
-
-This document describes the GNU Readline Library, a utility which aids
-in the consistency of user interface across discrete programs that need
-to provide a command line interface.
-
-Copyright (C) 1988-2002 Free Software Foundation, Inc.
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-pare preserved on all copies.
-
-@ignore
-Permission is granted to process this file through TeX and print the
-results, provided the printed document carries copying permission
-notice identical to this one except for the removal of this paragraph
-(this paragraph not being relevant to the printed manual).
-@end ignore
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the entire
-resulting derived work is distributed under the terms of a permission
-notice identical to this one.
-
-Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions,
-except that this permission notice may be stated in a translation approved
-by the Free Software Foundation.
-@end ifinfo
-
-@titlepage
-@title GNU Readline Library
-@subtitle Edition @value{EDITION}, for @code{Readline Library} Version @value{VERSION}.
-@subtitle @value{UPDATE-MONTH}
-@author Brian Fox, Free Software Foundation
-@author Chet Ramey, Case Western Reserve University
-
-@page
-This document describes the GNU Readline Library, a utility which aids
-in the consistency of user interface across discrete programs that need
-to provide a command line interface.
-
-Published by the Free Software Foundation @*
-59 Temple Place, Suite 330, @*
-Boston, MA 02111 USA
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the entire
-resulting derived work is distributed under the terms of a permission
-notice identical to this one.
-
-Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions,
-except that this permission notice may be stated in a translation approved
-by the Free Software Foundation.
-
-@vskip 0pt plus 1filll
-Copyright @copyright{} 1988-2002 Free Software Foundation, Inc.
-@end titlepage
-
-@ifinfo
-@node Top
-@top GNU Readline Library
-
-This document describes the GNU Readline Library, a utility which aids
-in the consistency of user interface across discrete programs that need
-to provide a command line interface.
-
-@menu
-* Command Line Editing:: GNU Readline User's Manual.
-* Programming with GNU Readline:: GNU Readline Programmer's Manual.
-* Concept Index:: Index of concepts described in this manual.
-* Function and Variable Index:: Index of externally visible functions
- and variables.
-@end menu
-@end ifinfo
-
-@include rluser.texinfo
-@include rltech.texinfo
-
-@node Concept Index
-@unnumbered Concept Index
-@printindex cp
-
-@node Function and Variable Index
-@unnumbered Function and Variable Index
-@printindex fn
-
-@contents
-@bye
diff --git a/readline/doc/rltech.texinfo b/readline/doc/rltech.texinfo
deleted file mode 100644
index 037e824e28a..00000000000
--- a/readline/doc/rltech.texinfo
+++ /dev/null
@@ -1,2165 +0,0 @@
-@comment %**start of header (This is for running Texinfo on a region.)
-@setfilename rltech.info
-@comment %**end of header (This is for running Texinfo on a region.)
-@setchapternewpage odd
-
-@ifinfo
-This document describes the GNU Readline Library, a utility for aiding
-in the consitency of user interface across discrete programs that need
-to provide a command line interface.
-
-Copyright (C) 1988-2002 Free Software Foundation, Inc.
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-pare preserved on all copies.
-
-@ignore
-Permission is granted to process this file through TeX and print the
-results, provided the printed document carries copying permission
-notice identical to this one except for the removal of this paragraph
-(this paragraph not being relevant to the printed manual).
-@end ignore
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the entire
-resulting derived work is distributed under the terms of a permission
-notice identical to this one.
-
-Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions,
-except that this permission notice may be stated in a translation approved
-by the Foundation.
-@end ifinfo
-
-@node Programming with GNU Readline
-@chapter Programming with GNU Readline
-
-This chapter describes the interface between the @sc{gnu} Readline Library and
-other programs. If you are a programmer, and you wish to include the
-features found in @sc{gnu} Readline
-such as completion, line editing, and interactive history manipulation
-in your own programs, this section is for you.
-
-@menu
-* Basic Behavior:: Using the default behavior of Readline.
-* Custom Functions:: Adding your own functions to Readline.
-* Readline Variables:: Variables accessible to custom
- functions.
-* Readline Convenience Functions:: Functions which Readline supplies to
- aid in writing your own custom
- functions.
-* Readline Signal Handling:: How Readline behaves when it receives signals.
-* Custom Completers:: Supplanting or supplementing Readline's
- completion functions.
-@end menu
-
-@node Basic Behavior
-@section Basic Behavior
-
-Many programs provide a command line interface, such as @code{mail},
-@code{ftp}, and @code{sh}. For such programs, the default behaviour of
-Readline is sufficient. This section describes how to use Readline in
-the simplest way possible, perhaps to replace calls in your code to
-@code{gets()} or @code{fgets()}.
-
-@findex readline
-@cindex readline, function
-
-The function @code{readline()} prints a prompt @var{prompt}
-and then reads and returns a single line of text from the user.
-If @var{prompt} is @code{NULL} or the empty string, no prompt is displayed.
-The line @code{readline} returns is allocated with @code{malloc()};
-the caller should @code{free()} the line when it has finished with it.
-The declaration for @code{readline} in ANSI C is
-
-@example
-@code{char *readline (const char *@var{prompt});}
-@end example
-
-@noindent
-So, one might say
-@example
-@code{char *line = readline ("Enter a line: ");}
-@end example
-@noindent
-in order to read a line of text from the user.
-The line returned has the final newline removed, so only the
-text remains.
-
-If @code{readline} encounters an @code{EOF} while reading the line, and the
-line is empty at that point, then @code{(char *)NULL} is returned.
-Otherwise, the line is ended just as if a newline had been typed.
-
-If you want the user to be able to get at the line later, (with
-@key{C-p} for example), you must call @code{add_history()} to save the
-line away in a @dfn{history} list of such lines.
-
-@example
-@code{add_history (line)};
-@end example
-
-@noindent
-For full details on the GNU History Library, see the associated manual.
-
-It is preferable to avoid saving empty lines on the history list, since
-users rarely have a burning need to reuse a blank line. Here is
-a function which usefully replaces the standard @code{gets()} library
-function, and has the advantage of no static buffer to overflow:
-
-@example
-/* A static variable for holding the line. */
-static char *line_read = (char *)NULL;
-
-/* Read a string, and return a pointer to it.
- Returns NULL on EOF. */
-char *
-rl_gets ()
-@{
- /* If the buffer has already been allocated,
- return the memory to the free pool. */
- if (line_read)
- @{
- free (line_read);
- line_read = (char *)NULL;
- @}
-
- /* Get a line from the user. */
- line_read = readline ("");
-
- /* If the line has any text in it,
- save it on the history. */
- if (line_read && *line_read)
- add_history (line_read);
-
- return (line_read);
-@}
-@end example
-
-This function gives the user the default behaviour of @key{TAB}
-completion: completion on file names. If you do not want Readline to
-complete on filenames, you can change the binding of the @key{TAB} key
-with @code{rl_bind_key()}.
-
-@example
-@code{int rl_bind_key (int @var{key}, rl_command_func_t *@var{function});}
-@end example
-
-@code{rl_bind_key()} takes two arguments: @var{key} is the character that
-you want to bind, and @var{function} is the address of the function to
-call when @var{key} is pressed. Binding @key{TAB} to @code{rl_insert()}
-makes @key{TAB} insert itself.
-@code{rl_bind_key()} returns non-zero if @var{key} is not a valid
-ASCII character code (between 0 and 255).
-
-Thus, to disable the default @key{TAB} behavior, the following suffices:
-@example
-@code{rl_bind_key ('\t', rl_insert);}
-@end example
-
-This code should be executed once at the start of your program; you
-might write a function called @code{initialize_readline()} which
-performs this and other desired initializations, such as installing
-custom completers (@pxref{Custom Completers}).
-
-@node Custom Functions
-@section Custom Functions
-
-Readline provides many functions for manipulating the text of
-the line, but it isn't possible to anticipate the needs of all
-programs. This section describes the various functions and variables
-defined within the Readline library which allow a user program to add
-customized functionality to Readline.
-
-Before declaring any functions that customize Readline's behavior, or
-using any functionality Readline provides in other code, an
-application writer should include the file @code{<readline/readline.h>}
-in any file that uses Readline's features. Since some of the definitions
-in @code{readline.h} use the @code{stdio} library, the file
-@code{<stdio.h>} should be included before @code{readline.h}.
-
-@code{readline.h} defines a C preprocessor variable that should
-be treated as an integer, @code{RL_READLINE_VERSION}, which may
-be used to conditionally compile application code depending on
-the installed Readline version. The value is a hexadecimal
-encoding of the major and minor version numbers of the library,
-of the form 0x@var{MMmm}. @var{MM} is the two-digit major
-version number; @var{mm} is the two-digit minor version number.
-For Readline 4.2, for example, the value of
-@code{RL_READLINE_VERSION} would be @code{0x0402}.
-
-@menu
-* Readline Typedefs:: C declarations to make code readable.
-* Function Writing:: Variables and calling conventions.
-@end menu
-
-@node Readline Typedefs
-@subsection Readline Typedefs
-
-For readabilty, we declare a number of new object types, all pointers
-to functions.
-
-The reason for declaring these new types is to make it easier to write
-code describing pointers to C functions with appropriately prototyped
-arguments and return values.
-
-For instance, say we want to declare a variable @var{func} as a pointer
-to a function which takes two @code{int} arguments and returns an
-@code{int} (this is the type of all of the Readline bindable functions).
-Instead of the classic C declaration
-
-@code{int (*func)();}
-
-@noindent
-or the ANSI-C style declaration
-
-@code{int (*func)(int, int);}
-
-@noindent
-we may write
-
-@code{rl_command_func_t *func;}
-
-The full list of function pointer types available is
-
-@table @code
-@item typedef int rl_command_func_t (int, int);
-
-@item typedef char *rl_compentry_func_t (const char *, int);
-
-@item typedef char **rl_completion_func_t (const char *, int, int);
-
-@item typedef char *rl_quote_func_t (char *, int, char *);
-
-@item typedef char *rl_dequote_func_t (char *, int);
-
-@item typedef int rl_compignore_func_t (char **);
-
-@item typedef void rl_compdisp_func_t (char **, int, int);
-
-@item typedef int rl_hook_func_t (void);
-
-@item typedef int rl_getc_func_t (FILE *);
-
-@item typedef int rl_linebuf_func_t (char *, int);
-
-@item typedef int rl_intfunc_t (int);
-@item #define rl_ivoidfunc_t rl_hook_func_t
-@item typedef int rl_icpfunc_t (char *);
-@item typedef int rl_icppfunc_t (char **);
-
-@item typedef void rl_voidfunc_t (void);
-@item typedef void rl_vintfunc_t (int);
-@item typedef void rl_vcpfunc_t (char *);
-@item typedef void rl_vcppfunc_t (char **);
-
-@end table
-
-@node Function Writing
-@subsection Writing a New Function
-
-In order to write new functions for Readline, you need to know the
-calling conventions for keyboard-invoked functions, and the names of the
-variables that describe the current state of the line read so far.
-
-The calling sequence for a command @code{foo} looks like
-
-@example
-@code{int foo (int count, int key)}
-@end example
-
-@noindent
-where @var{count} is the numeric argument (or 1 if defaulted) and
-@var{key} is the key that invoked this function.
-
-It is completely up to the function as to what should be done with the
-numeric argument. Some functions use it as a repeat count, some
-as a flag, and others to choose alternate behavior (refreshing the current
-line as opposed to refreshing the screen, for example). Some choose to
-ignore it. In general, if a
-function uses the numeric argument as a repeat count, it should be able
-to do something useful with both negative and positive arguments.
-At the very least, it should be aware that it can be passed a
-negative argument.
-
-A command function should return 0 if its action completes successfully,
-and a non-zero value if some error occurs.
-
-@node Readline Variables
-@section Readline Variables
-
-These variables are available to function writers.
-
-@deftypevar {char *} rl_line_buffer
-This is the line gathered so far. You are welcome to modify the
-contents of the line, but see @ref{Allowing Undoing}. The
-function @code{rl_extend_line_buffer} is available to increase
-the memory allocated to @code{rl_line_buffer}.
-@end deftypevar
-
-@deftypevar int rl_point
-The offset of the current cursor position in @code{rl_line_buffer}
-(the @emph{point}).
-@end deftypevar
-
-@deftypevar int rl_end
-The number of characters present in @code{rl_line_buffer}. When
-@code{rl_point} is at the end of the line, @code{rl_point} and
-@code{rl_end} are equal.
-@end deftypevar
-
-@deftypevar int rl_mark
-The @var{mark} (saved position) in the current line. If set, the mark
-and point define a @emph{region}.
-@end deftypevar
-
-@deftypevar int rl_done
-Setting this to a non-zero value causes Readline to return the current
-line immediately.
-@end deftypevar
-
-@deftypevar int rl_num_chars_to_read
-Setting this to a positive value before calling @code{readline()} causes
-Readline to return after accepting that many characters, rather
-than reading up to a character bound to @code{accept-line}.
-@end deftypevar
-
-@deftypevar int rl_pending_input
-Setting this to a value makes it the next keystroke read. This is a
-way to stuff a single character into the input stream.
-@end deftypevar
-
-@deftypevar int rl_dispatching
-Set to a non-zero value if a function is being called from a key binding;
-zero otherwise. Application functions can test this to discover whether
-they were called directly or by Readline's dispatching mechanism.
-@end deftypevar
-
-@deftypevar int rl_erase_empty_line
-Setting this to a non-zero value causes Readline to completely erase
-the current line, including any prompt, any time a newline is typed as
-the only character on an otherwise-empty line. The cursor is moved to
-the beginning of the newly-blank line.
-@end deftypevar
-
-@deftypevar {char *} rl_prompt
-The prompt Readline uses. This is set from the argument to
-@code{readline()}, and should not be assigned to directly.
-The @code{rl_set_prompt()} function (@pxref{Redisplay}) may
-be used to modify the prompt string after calling @code{readline()}.
-@end deftypevar
-
-@deftypevar int rl_already_prompted
-If an application wishes to display the prompt itself, rather than have
-Readline do it the first time @code{readline()} is called, it should set
-this variable to a non-zero value after displaying the prompt.
-The prompt must also be passed as the argument to @code{readline()} so
-the redisplay functions can update the display properly.
-The calling application is responsible for managing the value; Readline
-never sets it.
-@end deftypevar
-
-@deftypevar {const char *} rl_library_version
-The version number of this revision of the library.
-@end deftypevar
-
-@deftypevar int rl_readline_version
-An integer encoding the current version of the library. The encoding is
-of the form 0x@var{MMmm}, where @var{MM} is the two-digit major version
-number, and @var{mm} is the two-digit minor version number.
-For example, for Readline-4.2, @code{rl_readline_version} would have the
-value 0x0402.
-@end deftypevar
-
-@deftypevar {int} rl_gnu_readline_p
-Always set to 1, denoting that this is @sc{gnu} readline rather than some
-emulation.
-@end deftypevar
-
-@deftypevar {const char *} rl_terminal_name
-The terminal type, used for initialization. If not set by the application,
-Readline sets this to the value of the @env{TERM} environment variable
-the first time it is called.
-@end deftypevar
-
-@deftypevar {const char *} rl_readline_name
-This variable is set to a unique name by each application using Readline.
-The value allows conditional parsing of the inputrc file
-(@pxref{Conditional Init Constructs}).
-@end deftypevar
-
-@deftypevar {FILE *} rl_instream
-The stdio stream from which Readline reads input.
-If @code{NULL}, Readline defaults to @var{stdin}.
-@end deftypevar
-
-@deftypevar {FILE *} rl_outstream
-The stdio stream to which Readline performs output.
-If @code{NULL}, Readline defaults to @var{stdout}.
-@end deftypevar
-
-@deftypevar {rl_command_func_t *} rl_last_func
-The address of the last command function Readline executed. May be used to
-test whether or not a function is being executed twice in succession, for
-example.
-@end deftypevar
-
-@deftypevar {rl_hook_func_t *} rl_startup_hook
-If non-zero, this is the address of a function to call just
-before @code{readline} prints the first prompt.
-@end deftypevar
-
-@deftypevar {rl_hook_func_t *} rl_pre_input_hook
-If non-zero, this is the address of a function to call after
-the first prompt has been printed and just before @code{readline}
-starts reading input characters.
-@end deftypevar
-
-@deftypevar {rl_hook_func_t *} rl_event_hook
-If non-zero, this is the address of a function to call periodically
-when Readline is waiting for terminal input.
-By default, this will be called at most ten times a second if there
-is no keyboard input.
-@end deftypevar
-
-@deftypevar {rl_getc_func_t *} rl_getc_function
-If non-zero, Readline will call indirectly through this pointer
-to get a character from the input stream. By default, it is set to
-@code{rl_getc}, the default Readline character input function
-(@pxref{Character Input}).
-@end deftypevar
-
-@deftypevar {rl_voidfunc_t *} rl_redisplay_function
-If non-zero, Readline will call indirectly through this pointer
-to update the display with the current contents of the editing buffer.
-By default, it is set to @code{rl_redisplay}, the default Readline
-redisplay function (@pxref{Redisplay}).
-@end deftypevar
-
-@deftypevar {rl_vintfunc_t *} rl_prep_term_function
-If non-zero, Readline will call indirectly through this pointer
-to initialize the terminal. The function takes a single argument, an
-@code{int} flag that says whether or not to use eight-bit characters.
-By default, this is set to @code{rl_prep_terminal}
-(@pxref{Terminal Management}).
-@end deftypevar
-
-@deftypevar {rl_voidfunc_t *} rl_deprep_term_function
-If non-zero, Readline will call indirectly through this pointer
-to reset the terminal. This function should undo the effects of
-@code{rl_prep_term_function}.
-By default, this is set to @code{rl_deprep_terminal}
-(@pxref{Terminal Management}).
-@end deftypevar
-
-@deftypevar {Keymap} rl_executing_keymap
-This variable is set to the keymap (@pxref{Keymaps}) in which the
-currently executing readline function was found.
-@end deftypevar
-
-@deftypevar {Keymap} rl_binding_keymap
-This variable is set to the keymap (@pxref{Keymaps}) in which the
-last key binding occurred.
-@end deftypevar
-
-@deftypevar {char *} rl_executing_macro
-This variable is set to the text of any currently-executing macro.
-@end deftypevar
-
-@deftypevar {int} rl_readline_state
-A variable with bit values that encapsulate the current Readline state.
-A bit is set with the @code{RL_SETSTATE} macro, and unset with the
-@code{RL_UNSETSTATE} macro. Use the @code{RL_ISSTATE} macro to test
-whether a particular state bit is set. Current state bits include:
-
-@table @code
-@item RL_STATE_NONE
-Readline has not yet been called, nor has it begun to intialize.
-@item RL_STATE_INITIALIZING
-Readline is initializing its internal data structures.
-@item RL_STATE_INITIALIZED
-Readline has completed its initialization.
-@item RL_STATE_TERMPREPPED
-Readline has modified the terminal modes to do its own input and redisplay.
-@item RL_STATE_READCMD
-Readline is reading a command from the keyboard.
-@item RL_STATE_METANEXT
-Readline is reading more input after reading the meta-prefix character.
-@item RL_STATE_DISPATCHING
-Readline is dispatching to a command.
-@item RL_STATE_MOREINPUT
-Readline is reading more input while executing an editing command.
-@item RL_STATE_ISEARCH
-Readline is performing an incremental history search.
-@item RL_STATE_NSEARCH
-Readline is performing a non-incremental history search.
-@item RL_STATE_SEARCH
-Readline is searching backward or forward through the history for a string.
-@item RL_STATE_NUMERICARG
-Readline is reading a numeric argument.
-@item RL_STATE_MACROINPUT
-Readline is currently getting its input from a previously-defined keyboard
-macro.
-@item RL_STATE_MACRODEF
-Readline is currently reading characters defining a keyboard macro.
-@item RL_STATE_OVERWRITE
-Readline is in overwrite mode.
-@item RL_STATE_COMPLETING
-Readline is performing word completion.
-@item RL_STATE_SIGHANDLER
-Readline is currently executing the readline signal handler.
-@item RL_STATE_UNDOING
-Readline is performing an undo.
-@item RL_STATE_DONE
-Readline has read a key sequence bound to @code{accept-line}
-and is about to return the line to the caller.
-@end table
-
-@end deftypevar
-
-@deftypevar {int} rl_explicit_arg
-Set to a non-zero value if an explicit numeric argument was specified by
-the user. Only valid in a bindable command function.
-@end deftypevar
-
-@deftypevar {int} rl_numeric_arg
-Set to the value of any numeric argument explicitly specified by the user
-before executing the current Readline function. Only valid in a bindable
-command function.
-@end deftypevar
-
-@deftypevar {int} rl_editing_mode
-Set to a value denoting Readline's current editing mode. A value of
-@var{1} means Readline is currently in emacs mode; @var{0}
-means that vi mode is active.
-@end deftypevar
-
-
-@node Readline Convenience Functions
-@section Readline Convenience Functions
-
-@menu
-* Function Naming:: How to give a function you write a name.
-* Keymaps:: Making keymaps.
-* Binding Keys:: Changing Keymaps.
-* Associating Function Names and Bindings:: Translate function names to
- key sequences.
-* Allowing Undoing:: How to make your functions undoable.
-* Redisplay:: Functions to control line display.
-* Modifying Text:: Functions to modify @code{rl_line_buffer}.
-* Character Input:: Functions to read keyboard input.
-* Terminal Management:: Functions to manage terminal settings.
-* Utility Functions:: Generally useful functions and hooks.
-* Miscellaneous Functions:: Functions that don't fall into any category.
-* Alternate Interface:: Using Readline in a `callback' fashion.
-* A Readline Example:: An example Readline function.
-@end menu
-
-@node Function Naming
-@subsection Naming a Function
-
-The user can dynamically change the bindings of keys while using
-Readline. This is done by representing the function with a descriptive
-name. The user is able to type the descriptive name when referring to
-the function. Thus, in an init file, one might find
-
-@example
-Meta-Rubout: backward-kill-word
-@end example
-
-This binds the keystroke @key{Meta-Rubout} to the function
-@emph{descriptively} named @code{backward-kill-word}. You, as the
-programmer, should bind the functions you write to descriptive names as
-well. Readline provides a function for doing that:
-
-@deftypefun int rl_add_defun (const char *name, rl_command_func_t *function, int key)
-Add @var{name} to the list of named functions. Make @var{function} be
-the function that gets called. If @var{key} is not -1, then bind it to
-@var{function} using @code{rl_bind_key()}.
-@end deftypefun
-
-Using this function alone is sufficient for most applications. It is
-the recommended way to add a few functions to the default functions that
-Readline has built in. If you need to do something other
-than adding a function to Readline, you may need to use the
-underlying functions described below.
-
-@node Keymaps
-@subsection Selecting a Keymap
-
-Key bindings take place on a @dfn{keymap}. The keymap is the
-association between the keys that the user types and the functions that
-get run. You can make your own keymaps, copy existing keymaps, and tell
-Readline which keymap to use.
-
-@deftypefun Keymap rl_make_bare_keymap (void)
-Returns a new, empty keymap. The space for the keymap is allocated with
-@code{malloc()}; the caller should free it by calling
-@code{rl_discard_keymap()} when done.
-@end deftypefun
-
-@deftypefun Keymap rl_copy_keymap (Keymap map)
-Return a new keymap which is a copy of @var{map}.
-@end deftypefun
-
-@deftypefun Keymap rl_make_keymap (void)
-Return a new keymap with the printing characters bound to rl_insert,
-the lowercase Meta characters bound to run their equivalents, and
-the Meta digits bound to produce numeric arguments.
-@end deftypefun
-
-@deftypefun void rl_discard_keymap (Keymap keymap)
-Free the storage associated with @var{keymap}.
-@end deftypefun
-
-Readline has several internal keymaps. These functions allow you to
-change which keymap is active.
-
-@deftypefun Keymap rl_get_keymap (void)
-Returns the currently active keymap.
-@end deftypefun
-
-@deftypefun void rl_set_keymap (Keymap keymap)
-Makes @var{keymap} the currently active keymap.
-@end deftypefun
-
-@deftypefun Keymap rl_get_keymap_by_name (const char *name)
-Return the keymap matching @var{name}. @var{name} is one which would
-be supplied in a @code{set keymap} inputrc line (@pxref{Readline Init File}).
-@end deftypefun
-
-@deftypefun {char *} rl_get_keymap_name (Keymap keymap)
-Return the name matching @var{keymap}. @var{name} is one which would
-be supplied in a @code{set keymap} inputrc line (@pxref{Readline Init File}).
-@end deftypefun
-
-@node Binding Keys
-@subsection Binding Keys
-
-Key sequences are associate with functions through the keymap.
-Readline has several internal keymaps: @code{emacs_standard_keymap},
-@code{emacs_meta_keymap}, @code{emacs_ctlx_keymap},
-@code{vi_movement_keymap}, and @code{vi_insertion_keymap}.
-@code{emacs_standard_keymap} is the default, and the examples in
-this manual assume that.
-
-Since @code{readline()} installs a set of default key bindings the first
-time it is called, there is always the danger that a custom binding
-installed before the first call to @code{readline()} will be overridden.
-An alternate mechanism is to install custom key bindings in an
-initialization function assigned to the @code{rl_startup_hook} variable
-(@pxref{Readline Variables}).
-
-These functions manage key bindings.
-
-@deftypefun int rl_bind_key (int key, rl_command_func_t *function)
-Binds @var{key} to @var{function} in the currently active keymap.
-Returns non-zero in the case of an invalid @var{key}.
-@end deftypefun
-
-@deftypefun int rl_bind_key_in_map (int key, rl_command_func_t *function, Keymap map)
-Bind @var{key} to @var{function} in @var{map}. Returns non-zero in the case
-of an invalid @var{key}.
-@end deftypefun
-
-@deftypefun int rl_unbind_key (int key)
-Bind @var{key} to the null function in the currently active keymap.
-Returns non-zero in case of error.
-@end deftypefun
-
-@deftypefun int rl_unbind_key_in_map (int key, Keymap map)
-Bind @var{key} to the null function in @var{map}.
-Returns non-zero in case of error.
-@end deftypefun
-
-@deftypefun int rl_unbind_function_in_map (rl_command_func_t *function, Keymap map)
-Unbind all keys that execute @var{function} in @var{map}.
-@end deftypefun
-
-@deftypefun int rl_unbind_command_in_map (const char *command, Keymap map)
-Unbind all keys that are bound to @var{command} in @var{map}.
-@end deftypefun
-
-@deftypefun int rl_set_key (const char *keyseq, rl_command_func_t *function, Keymap map)
-Bind the key sequence represented by the string @var{keyseq} to the function
-@var{function}. This makes new keymaps as
-necessary. The initial keymap in which to do bindings is @var{map}.
-@end deftypefun
-
-@deftypefun int rl_generic_bind (int type, const char *keyseq, char *data, Keymap map)
-Bind the key sequence represented by the string @var{keyseq} to the arbitrary
-pointer @var{data}. @var{type} says what kind of data is pointed to by
-@var{data}; this can be a function (@code{ISFUNC}), a macro
-(@code{ISMACR}), or a keymap (@code{ISKMAP}). This makes new keymaps as
-necessary. The initial keymap in which to do bindings is @var{map}.
-@end deftypefun
-
-@deftypefun int rl_parse_and_bind (char *line)
-Parse @var{line} as if it had been read from the @code{inputrc} file and
-perform any key bindings and variable assignments found
-(@pxref{Readline Init File}).
-@end deftypefun
-
-@deftypefun int rl_read_init_file (const char *filename)
-Read keybindings and variable assignments from @var{filename}
-(@pxref{Readline Init File}).
-@end deftypefun
-
-@node Associating Function Names and Bindings
-@subsection Associating Function Names and Bindings
-
-These functions allow you to find out what keys invoke named functions
-and the functions invoked by a particular key sequence. You may also
-associate a new function name with an arbitrary function.
-
-@deftypefun {rl_command_func_t *} rl_named_function (const char *name)
-Return the function with name @var{name}.
-@end deftypefun
-
-@deftypefun {rl_command_func_t *} rl_function_of_keyseq (const char *keyseq, Keymap map, int *type)
-Return the function invoked by @var{keyseq} in keymap @var{map}.
-If @var{map} is @code{NULL}, the current keymap is used. If @var{type} is
-not @code{NULL}, the type of the object is returned in the @code{int} variable
-it points to (one of @code{ISFUNC}, @code{ISKMAP}, or @code{ISMACR}).
-@end deftypefun
-
-@deftypefun {char **} rl_invoking_keyseqs (rl_command_func_t *function)
-Return an array of strings representing the key sequences used to
-invoke @var{function} in the current keymap.
-@end deftypefun
-
-@deftypefun {char **} rl_invoking_keyseqs_in_map (rl_command_func_t *function, Keymap map)
-Return an array of strings representing the key sequences used to
-invoke @var{function} in the keymap @var{map}.
-@end deftypefun
-
-@deftypefun void rl_function_dumper (int readable)
-Print the readline function names and the key sequences currently
-bound to them to @code{rl_outstream}. If @var{readable} is non-zero,
-the list is formatted in such a way that it can be made part of an
-@code{inputrc} file and re-read.
-@end deftypefun
-
-@deftypefun void rl_list_funmap_names (void)
-Print the names of all bindable Readline functions to @code{rl_outstream}.
-@end deftypefun
-
-@deftypefun {const char **} rl_funmap_names (void)
-Return a NULL terminated array of known function names. The array is
-sorted. The array itself is allocated, but not the strings inside. You
-should @code{free()} the array when you are done, but not the pointers.
-@end deftypefun
-
-@deftypefun int rl_add_funmap_entry (const char *name, rl_command_func_t *function)
-Add @var{name} to the list of bindable Readline command names, and make
-@var{function} the function to be called when @var{name} is invoked.
-@end deftypefun
-
-@node Allowing Undoing
-@subsection Allowing Undoing
-
-Supporting the undo command is a painless thing, and makes your
-functions much more useful. It is certainly easy to try
-something if you know you can undo it.
-
-If your function simply inserts text once, or deletes text once, and
-uses @code{rl_insert_text()} or @code{rl_delete_text()} to do it, then
-undoing is already done for you automatically.
-
-If you do multiple insertions or multiple deletions, or any combination
-of these operations, you should group them together into one operation.
-This is done with @code{rl_begin_undo_group()} and
-@code{rl_end_undo_group()}.
-
-The types of events that can be undone are:
-
-@smallexample
-enum undo_code @{ UNDO_DELETE, UNDO_INSERT, UNDO_BEGIN, UNDO_END @};
-@end smallexample
-
-Notice that @code{UNDO_DELETE} means to insert some text, and
-@code{UNDO_INSERT} means to delete some text. That is, the undo code
-tells what to undo, not how to undo it. @code{UNDO_BEGIN} and
-@code{UNDO_END} are tags added by @code{rl_begin_undo_group()} and
-@code{rl_end_undo_group()}.
-
-@deftypefun int rl_begin_undo_group (void)
-Begins saving undo information in a group construct. The undo
-information usually comes from calls to @code{rl_insert_text()} and
-@code{rl_delete_text()}, but could be the result of calls to
-@code{rl_add_undo()}.
-@end deftypefun
-
-@deftypefun int rl_end_undo_group (void)
-Closes the current undo group started with @code{rl_begin_undo_group
-()}. There should be one call to @code{rl_end_undo_group()}
-for each call to @code{rl_begin_undo_group()}.
-@end deftypefun
-
-@deftypefun void rl_add_undo (enum undo_code what, int start, int end, char *text)
-Remember how to undo an event (according to @var{what}). The affected
-text runs from @var{start} to @var{end}, and encompasses @var{text}.
-@end deftypefun
-
-@deftypefun void rl_free_undo_list (void)
-Free the existing undo list.
-@end deftypefun
-
-@deftypefun int rl_do_undo (void)
-Undo the first thing on the undo list. Returns @code{0} if there was
-nothing to undo, non-zero if something was undone.
-@end deftypefun
-
-Finally, if you neither insert nor delete text, but directly modify the
-existing text (e.g., change its case), call @code{rl_modifying()}
-once, just before you modify the text. You must supply the indices of
-the text range that you are going to modify.
-
-@deftypefun int rl_modifying (int start, int end)
-Tell Readline to save the text between @var{start} and @var{end} as a
-single undo unit. It is assumed that you will subsequently modify
-that text.
-@end deftypefun
-
-@node Redisplay
-@subsection Redisplay
-
-@deftypefun void rl_redisplay (void)
-Change what's displayed on the screen to reflect the current contents
-of @code{rl_line_buffer}.
-@end deftypefun
-
-@deftypefun int rl_forced_update_display (void)
-Force the line to be updated and redisplayed, whether or not
-Readline thinks the screen display is correct.
-@end deftypefun
-
-@deftypefun int rl_on_new_line (void)
-Tell the update functions that we have moved onto a new (empty) line,
-usually after ouputting a newline.
-@end deftypefun
-
-@deftypefun int rl_on_new_line_with_prompt (void)
-Tell the update functions that we have moved onto a new line, with
-@var{rl_prompt} already displayed.
-This could be used by applications that want to output the prompt string
-themselves, but still need Readline to know the prompt string length for
-redisplay.
-It should be used after setting @var{rl_already_prompted}.
-@end deftypefun
-
-@deftypefun int rl_reset_line_state (void)
-Reset the display state to a clean state and redisplay the current line
-starting on a new line.
-@end deftypefun
-
-@deftypefun int rl_crlf (void)
-Move the cursor to the start of the next screen line.
-@end deftypefun
-
-@deftypefun int rl_show_char (int c)
-Display character @var{c} on @code{rl_outstream}.
-If Readline has not been set to display meta characters directly, this
-will convert meta characters to a meta-prefixed key sequence.
-This is intended for use by applications which wish to do their own
-redisplay.
-@end deftypefun
-
-@deftypefun int rl_message (const char *, @dots{})
-The arguments are a format string as would be supplied to @code{printf},
-possibly containing conversion specifications such as @samp{%d}, and
-any additional arguments necessary to satisfy the conversion specifications.
-The resulting string is displayed in the @dfn{echo area}. The echo area
-is also used to display numeric arguments and search strings.
-@end deftypefun
-
-@deftypefun int rl_clear_message (void)
-Clear the message in the echo area.
-@end deftypefun
-
-@deftypefun void rl_save_prompt (void)
-Save the local Readline prompt display state in preparation for
-displaying a new message in the message area with @code{rl_message()}.
-@end deftypefun
-
-@deftypefun void rl_restore_prompt (void)
-Restore the local Readline prompt display state saved by the most
-recent call to @code{rl_save_prompt}.
-@end deftypefun
-
-@deftypefun int rl_expand_prompt (char *prompt)
-Expand any special character sequences in @var{prompt} and set up the
-local Readline prompt redisplay variables.
-This function is called by @code{readline()}. It may also be called to
-expand the primary prompt if the @code{rl_on_new_line_with_prompt()}
-function or @code{rl_already_prompted} variable is used.
-It returns the number of visible characters on the last line of the
-(possibly multi-line) prompt.
-@end deftypefun
-
-@deftypefun int rl_set_prompt (const char *prompt)
-Make Readline use @var{prompt} for subsequent redisplay. This calls
-@code{rl_expand_prompt()} to expand the prompt and sets @code{rl_prompt}
-to the result.
-@end deftypefun
-
-@node Modifying Text
-@subsection Modifying Text
-
-@deftypefun int rl_insert_text (const char *text)
-Insert @var{text} into the line at the current cursor position.
-Returns the number of characters inserted.
-@end deftypefun
-
-@deftypefun int rl_delete_text (int start, int end)
-Delete the text between @var{start} and @var{end} in the current line.
-Returns the number of characters deleted.
-@end deftypefun
-
-@deftypefun {char *} rl_copy_text (int start, int end)
-Return a copy of the text between @var{start} and @var{end} in
-the current line.
-@end deftypefun
-
-@deftypefun int rl_kill_text (int start, int end)
-Copy the text between @var{start} and @var{end} in the current line
-to the kill ring, appending or prepending to the last kill if the
-last command was a kill command. The text is deleted.
-If @var{start} is less than @var{end},
-the text is appended, otherwise prepended. If the last command was
-not a kill, a new kill ring slot is used.
-@end deftypefun
-
-@deftypefun int rl_push_macro_input (char *macro)
-Cause @var{macro} to be inserted into the line, as if it had been invoked
-by a key bound to a macro. Not especially useful; use
-@code{rl_insert_text()} instead.
-@end deftypefun
-
-@node Character Input
-@subsection Character Input
-
-@deftypefun int rl_read_key (void)
-Return the next character available from Readline's current input stream.
-This handles input inserted into
-the input stream via @var{rl_pending_input} (@pxref{Readline Variables})
-and @code{rl_stuff_char()}, macros, and characters read from the keyboard.
-While waiting for input, this function will call any function assigned to
-the @code{rl_event_hook} variable.
-@end deftypefun
-
-@deftypefun int rl_getc (FILE *stream)
-Return the next character available from @var{stream}, which is assumed to
-be the keyboard.
-@end deftypefun
-
-@deftypefun int rl_stuff_char (int c)
-Insert @var{c} into the Readline input stream. It will be "read"
-before Readline attempts to read characters from the terminal with
-@code{rl_read_key()}. Up to 512 characters may be pushed back.
-@code{rl_stuff_char} returns 1 if the character was successfully inserted;
-0 otherwise.
-@end deftypefun
-
-@deftypefun int rl_execute_next (int c)
-Make @var{c} be the next command to be executed when @code{rl_read_key()}
-is called. This sets @var{rl_pending_input}.
-@end deftypefun
-
-@deftypefun int rl_clear_pending_input (void)
-Unset @var{rl_pending_input}, effectively negating the effect of any
-previous call to @code{rl_execute_next()}. This works only if the
-pending input has not already been read with @code{rl_read_key()}.
-@end deftypefun
-
-@deftypefun int rl_set_keyboard_input_timeout (int u)
-While waiting for keyboard input in @code{rl_read_key()}, Readline will
-wait for @var{u} microseconds for input before calling any function
-assigned to @code{rl_event_hook}. The default waiting period is
-one-tenth of a second. Returns the old timeout value.
-@end deftypefun
-
-@node Terminal Management
-@subsection Terminal Management
-
-@deftypefun void rl_prep_terminal (int meta_flag)
-Modify the terminal settings for Readline's use, so @code{readline()}
-can read a single character at a time from the keyboard.
-The @var{meta_flag} argument should be non-zero if Readline should
-read eight-bit input.
-@end deftypefun
-
-@deftypefun void rl_deprep_terminal (void)
-Undo the effects of @code{rl_prep_terminal()}, leaving the terminal in
-the state in which it was before the most recent call to
-@code{rl_prep_terminal()}.
-@end deftypefun
-
-@deftypefun void rl_tty_set_default_bindings (Keymap kmap)
-Read the operating system's terminal editing characters (as would be displayed
-by @code{stty}) to their Readline equivalents. The bindings are performed
-in @var{kmap}.
-@end deftypefun
-
-@deftypefun int rl_reset_terminal (const char *terminal_name)
-Reinitialize Readline's idea of the terminal settings using
-@var{terminal_name} as the terminal type (e.g., @code{vt100}).
-If @var{terminal_name} is @code{NULL}, the value of the @code{TERM}
-environment variable is used.
-@end deftypefun
-
-@node Utility Functions
-@subsection Utility Functions
-
-@deftypefun void rl_replace_line (const char *text, int clear_undo)
-Replace the contents of @code{rl_line_buffer} with @var{text}.
-The point and mark are preserved, if possible.
-If @var{clear_undo} is non-zero, the undo list associated with the
-current line is cleared.
-@end deftypefun
-
-@deftypefun int rl_extend_line_buffer (int len)
-Ensure that @code{rl_line_buffer} has enough space to hold @var{len}
-characters, possibly reallocating it if necessary.
-@end deftypefun
-
-@deftypefun int rl_initialize (void)
-Initialize or re-initialize Readline's internal state.
-It's not strictly necessary to call this; @code{readline()} calls it before
-reading any input.
-@end deftypefun
-
-@deftypefun int rl_ding (void)
-Ring the terminal bell, obeying the setting of @code{bell-style}.
-@end deftypefun
-
-@deftypefun int rl_alphabetic (int c)
-Return 1 if @var{c} is an alphabetic character.
-@end deftypefun
-
-@deftypefun void rl_display_match_list (char **matches, int len, int max)
-A convenience function for displaying a list of strings in
-columnar format on Readline's output stream. @code{matches} is the list
-of strings, in argv format, such as a list of completion matches.
-@code{len} is the number of strings in @code{matches}, and @code{max}
-is the length of the longest string in @code{matches}. This function uses
-the setting of @code{print-completions-horizontally} to select how the
-matches are displayed (@pxref{Readline Init File Syntax}).
-@end deftypefun
-
-The following are implemented as macros, defined in @code{chardefs.h}.
-Applications should refrain from using them.
-
-@deftypefun int _rl_uppercase_p (int c)
-Return 1 if @var{c} is an uppercase alphabetic character.
-@end deftypefun
-
-@deftypefun int _rl_lowercase_p (int c)
-Return 1 if @var{c} is a lowercase alphabetic character.
-@end deftypefun
-
-@deftypefun int _rl_digit_p (int c)
-Return 1 if @var{c} is a numeric character.
-@end deftypefun
-
-@deftypefun int _rl_to_upper (int c)
-If @var{c} is a lowercase alphabetic character, return the corresponding
-uppercase character.
-@end deftypefun
-
-@deftypefun int _rl_to_lower (int c)
-If @var{c} is an uppercase alphabetic character, return the corresponding
-lowercase character.
-@end deftypefun
-
-@deftypefun int _rl_digit_value (int c)
-If @var{c} is a number, return the value it represents.
-@end deftypefun
-
-@node Miscellaneous Functions
-@subsection Miscellaneous Functions
-
-@deftypefun int rl_macro_bind (const char *keyseq, const char *macro, Keymap map)
-Bind the key sequence @var{keyseq} to invoke the macro @var{macro}.
-The binding is performed in @var{map}. When @var{keyseq} is invoked, the
-@var{macro} will be inserted into the line. This function is deprecated;
-use @code{rl_generic_bind()} instead.
-@end deftypefun
-
-@deftypefun void rl_macro_dumper (int readable)
-Print the key sequences bound to macros and their values, using
-the current keymap, to @code{rl_outstream}.
-If @var{readable} is non-zero, the list is formatted in such a way
-that it can be made part of an @code{inputrc} file and re-read.
-@end deftypefun
-
-@deftypefun int rl_variable_bind (const char *variable, const char *value)
-Make the Readline variable @var{variable} have @var{value}.
-This behaves as if the readline command
-@samp{set @var{variable} @var{value}} had been executed in an @code{inputrc}
-file (@pxref{Readline Init File Syntax}).
-@end deftypefun
-
-@deftypefun void rl_variable_dumper (int readable)
-Print the readline variable names and their current values
-to @code{rl_outstream}.
-If @var{readable} is non-zero, the list is formatted in such a way
-that it can be made part of an @code{inputrc} file and re-read.
-@end deftypefun
-
-@deftypefun int rl_set_paren_blink_timeout (int u)
-Set the time interval (in microseconds) that Readline waits when showing
-a balancing character when @code{blink-matching-paren} has been enabled.
-@end deftypefun
-
-@deftypefun {char *} rl_get_termcap (const char *cap)
-Retrieve the string value of the termcap capability @var{cap}.
-Readline fetches the termcap entry for the current terminal name and
-uses those capabilities to move around the screen line and perform other
-terminal-specific operations, like erasing a line. Readline does not
-use all of a terminal's capabilities, and this function will return
-values for only those capabilities Readline uses.
-@end deftypefun
-
-@node Alternate Interface
-@subsection Alternate Interface
-
-An alternate interface is available to plain @code{readline()}. Some
-applications need to interleave keyboard I/O with file, device, or
-window system I/O, typically by using a main loop to @code{select()}
-on various file descriptors. To accomodate this need, readline can
-also be invoked as a `callback' function from an event loop. There
-are functions available to make this easy.
-
-@deftypefun void rl_callback_handler_install (const char *prompt, rl_vcpfunc_t *lhandler)
-Set up the terminal for readline I/O and display the initial
-expanded value of @var{prompt}. Save the value of @var{lhandler} to
-use as a function to call when a complete line of input has been entered.
-The function takes the text of the line as an argument.
-@end deftypefun
-
-@deftypefun void rl_callback_read_char (void)
-Whenever an application determines that keyboard input is available, it
-should call @code{rl_callback_read_char()}, which will read the next
-character from the current input source.
-If that character completes the line, @code{rl_callback_read_char} will
-invoke the @var{lhandler} function saved by @code{rl_callback_handler_install}
-to process the line.
-Before calling the @var{lhandler} function, the terminal settings are
-reset to the values they had before calling
-@code{rl_callback_handler_install}.
-If the @var{lhandler} function returns,
-the terminal settings are modified for Readline's use again.
-@code{EOF} is indicated by calling @var{lhandler} with a
-@code{NULL} line.
-@end deftypefun
-
-@deftypefun void rl_callback_handler_remove (void)
-Restore the terminal to its initial state and remove the line handler.
-This may be called from within a callback as well as independently.
-If the @var{lhandler} installed by @code{rl_callback_handler_install}
-does not exit the program, either this function or the function referred
-to by the value of @code{rl_deprep_term_function} should be called before
-the program exits to reset the terminal settings.
-@end deftypefun
-
-@node A Readline Example
-@subsection A Readline Example
-
-Here is a function which changes lowercase characters to their uppercase
-equivalents, and uppercase characters to lowercase. If
-this function was bound to @samp{M-c}, then typing @samp{M-c} would
-change the case of the character under point. Typing @samp{M-1 0 M-c}
-would change the case of the following 10 characters, leaving the cursor on
-the last character changed.
-
-@example
-/* Invert the case of the COUNT following characters. */
-int
-invert_case_line (count, key)
- int count, key;
-@{
- register int start, end, i;
-
- start = rl_point;
-
- if (rl_point >= rl_end)
- return (0);
-
- if (count < 0)
- @{
- direction = -1;
- count = -count;
- @}
- else
- direction = 1;
-
- /* Find the end of the range to modify. */
- end = start + (count * direction);
-
- /* Force it to be within range. */
- if (end > rl_end)
- end = rl_end;
- else if (end < 0)
- end = 0;
-
- if (start == end)
- return (0);
-
- if (start > end)
- @{
- int temp = start;
- start = end;
- end = temp;
- @}
-
- /* Tell readline that we are modifying the line,
- so it will save the undo information. */
- rl_modifying (start, end);
-
- for (i = start; i != end; i++)
- @{
- if (_rl_uppercase_p (rl_line_buffer[i]))
- rl_line_buffer[i] = _rl_to_lower (rl_line_buffer[i]);
- else if (_rl_lowercase_p (rl_line_buffer[i]))
- rl_line_buffer[i] = _rl_to_upper (rl_line_buffer[i]);
- @}
- /* Move point to on top of the last character changed. */
- rl_point = (direction == 1) ? end - 1 : start;
- return (0);
-@}
-@end example
-
-@node Readline Signal Handling
-@section Readline Signal Handling
-
-Signals are asynchronous events sent to a process by the Unix kernel,
-sometimes on behalf of another process. They are intended to indicate
-exceptional events, like a user pressing the interrupt key on his terminal,
-or a network connection being broken. There is a class of signals that can
-be sent to the process currently reading input from the keyboard. Since
-Readline changes the terminal attributes when it is called, it needs to
-perform special processing when such a signal is received in order to
-restore the terminal to a sane state, or provide application writers with
-functions to do so manually.
-
-Readline contains an internal signal handler that is installed for a
-number of signals (@code{SIGINT}, @code{SIGQUIT}, @code{SIGTERM},
-@code{SIGALRM}, @code{SIGTSTP}, @code{SIGTTIN}, and @code{SIGTTOU}).
-When one of these signals is received, the signal handler
-will reset the terminal attributes to those that were in effect before
-@code{readline()} was called, reset the signal handling to what it was
-before @code{readline()} was called, and resend the signal to the calling
-application.
-If and when the calling application's signal handler returns, Readline
-will reinitialize the terminal and continue to accept input.
-When a @code{SIGINT} is received, the Readline signal handler performs
-some additional work, which will cause any partially-entered line to be
-aborted (see the description of @code{rl_free_line_state()} below).
-
-There is an additional Readline signal handler, for @code{SIGWINCH}, which
-the kernel sends to a process whenever the terminal's size changes (for
-example, if a user resizes an @code{xterm}). The Readline @code{SIGWINCH}
-handler updates Readline's internal screen size information, and then calls
-any @code{SIGWINCH} signal handler the calling application has installed.
-Readline calls the application's @code{SIGWINCH} signal handler without
-resetting the terminal to its original state. If the application's signal
-handler does more than update its idea of the terminal size and return (for
-example, a @code{longjmp} back to a main processing loop), it @emph{must}
-call @code{rl_cleanup_after_signal()} (described below), to restore the
-terminal state.
-
-Readline provides two variables that allow application writers to
-control whether or not it will catch certain signals and act on them
-when they are received. It is important that applications change the
-values of these variables only when calling @code{readline()}, not in
-a signal handler, so Readline's internal signal state is not corrupted.
-
-@deftypevar int rl_catch_signals
-If this variable is non-zero, Readline will install signal handlers for
-@code{SIGINT}, @code{SIGQUIT}, @code{SIGTERM}, @code{SIGALRM},
-@code{SIGTSTP}, @code{SIGTTIN}, and @code{SIGTTOU}.
-
-The default value of @code{rl_catch_signals} is 1.
-@end deftypevar
-
-@deftypevar int rl_catch_sigwinch
-If this variable is non-zero, Readline will install a signal handler for
-@code{SIGWINCH}.
-
-The default value of @code{rl_catch_sigwinch} is 1.
-@end deftypevar
-
-If an application does not wish to have Readline catch any signals, or
-to handle signals other than those Readline catches (@code{SIGHUP},
-for example),
-Readline provides convenience functions to do the necessary terminal
-and internal state cleanup upon receipt of a signal.
-
-@deftypefun void rl_cleanup_after_signal (void)
-This function will reset the state of the terminal to what it was before
-@code{readline()} was called, and remove the Readline signal handlers for
-all signals, depending on the values of @code{rl_catch_signals} and
-@code{rl_catch_sigwinch}.
-@end deftypefun
-
-@deftypefun void rl_free_line_state (void)
-This will free any partial state associated with the current input line
-(undo information, any partial history entry, any partially-entered
-keyboard macro, and any partially-entered numeric argument). This
-should be called before @code{rl_cleanup_after_signal()}. The
-Readline signal handler for @code{SIGINT} calls this to abort the
-current input line.
-@end deftypefun
-
-@deftypefun void rl_reset_after_signal (void)
-This will reinitialize the terminal and reinstall any Readline signal
-handlers, depending on the values of @code{rl_catch_signals} and
-@code{rl_catch_sigwinch}.
-@end deftypefun
-
-If an application does not wish Readline to catch @code{SIGWINCH}, it may
-call @code{rl_resize_terminal()} or @code{rl_set_screen_size()} to force
-Readline to update its idea of the terminal size when a @code{SIGWINCH}
-is received.
-
-@deftypefun void rl_resize_terminal (void)
-Update Readline's internal screen size by reading values from the kernel.
-@end deftypefun
-
-@deftypefun void rl_set_screen_size (int rows, int cols)
-Set Readline's idea of the terminal size to @var{rows} rows and
-@var{cols} columns.
-@end deftypefun
-
-If an application does not want to install a @code{SIGWINCH} handler, but
-is still interested in the screen dimensions, Readline's idea of the screen
-size may be queried.
-
-@deftypefun void rl_get_screen_size (int *rows, int *cols)
-Return Readline's idea of the terminal's size in the
-variables pointed to by the arguments.
-@end deftypefun
-
-The following functions install and remove Readline's signal handlers.
-
-@deftypefun int rl_set_signals (void)
-Install Readline's signal handler for @code{SIGINT}, @code{SIGQUIT},
-@code{SIGTERM}, @code{SIGALRM}, @code{SIGTSTP}, @code{SIGTTIN},
-@code{SIGTTOU}, and @code{SIGWINCH}, depending on the values of
-@code{rl_catch_signals} and @code{rl_catch_sigwinch}.
-@end deftypefun
-
-@deftypefun int rl_clear_signals (void)
-Remove all of the Readline signal handlers installed by
-@code{rl_set_signals()}.
-@end deftypefun
-
-@node Custom Completers
-@section Custom Completers
-
-Typically, a program that reads commands from the user has a way of
-disambiguating commands and data. If your program is one of these, then
-it can provide completion for commands, data, or both.
-The following sections describe how your program and Readline
-cooperate to provide this service.
-
-@menu
-* How Completing Works:: The logic used to do completion.
-* Completion Functions:: Functions provided by Readline.
-* Completion Variables:: Variables which control completion.
-* A Short Completion Example:: An example of writing completer subroutines.
-@end menu
-
-@node How Completing Works
-@subsection How Completing Works
-
-In order to complete some text, the full list of possible completions
-must be available. That is, it is not possible to accurately
-expand a partial word without knowing all of the possible words
-which make sense in that context. The Readline library provides
-the user interface to completion, and two of the most common
-completion functions: filename and username. For completing other types
-of text, you must write your own completion function. This section
-describes exactly what such functions must do, and provides an example.
-
-There are three major functions used to perform completion:
-
-@enumerate
-@item
-The user-interface function @code{rl_complete()}. This function is
-called with the same arguments as other bindable Readline functions:
-@var{count} and @var{invoking_key}.
-It isolates the word to be completed and calls
-@code{rl_completion_matches()} to generate a list of possible completions.
-It then either lists the possible completions, inserts the possible
-completions, or actually performs the
-completion, depending on which behavior is desired.
-
-@item
-The internal function @code{rl_completion_matches()} uses an
-application-supplied @dfn{generator} function to generate the list of
-possible matches, and then returns the array of these matches.
-The caller should place the address of its generator function in
-@code{rl_completion_entry_function}.
-
-@item
-The generator function is called repeatedly from
-@code{rl_completion_matches()}, returning a string each time. The
-arguments to the generator function are @var{text} and @var{state}.
-@var{text} is the partial word to be completed. @var{state} is zero the
-first time the function is called, allowing the generator to perform
-any necessary initialization, and a positive non-zero integer for
-each subsequent call. The generator function returns
-@code{(char *)NULL} to inform @code{rl_completion_matches()} that there are
-no more possibilities left. Usually the generator function computes the
-list of possible completions when @var{state} is zero, and returns them
-one at a time on subsequent calls. Each string the generator function
-returns as a match must be allocated with @code{malloc()}; Readline
-frees the strings when it has finished with them.
-
-@end enumerate
-
-@deftypefun int rl_complete (int ignore, int invoking_key)
-Complete the word at or before point. You have supplied the function
-that does the initial simple matching selection algorithm (see
-@code{rl_completion_matches()}). The default is to do filename completion.
-@end deftypefun
-
-@deftypevar {rl_compentry_func_t *} rl_completion_entry_function
-This is a pointer to the generator function for
-@code{rl_completion_matches()}.
-If the value of @code{rl_completion_entry_function} is
-@code{NULL} then the default filename generator
-function, @code{rl_filename_completion_function()}, is used.
-@end deftypevar
-
-@node Completion Functions
-@subsection Completion Functions
-
-Here is the complete list of callable completion functions present in
-Readline.
-
-@deftypefun int rl_complete_internal (int what_to_do)
-Complete the word at or before point. @var{what_to_do} says what to do
-with the completion. A value of @samp{?} means list the possible
-completions. @samp{TAB} means do standard completion. @samp{*} means
-insert all of the possible completions. @samp{!} means to display
-all of the possible completions, if there is more than one, as well as
-performing partial completion.
-@end deftypefun
-
-@deftypefun int rl_complete (int ignore, int invoking_key)
-Complete the word at or before point. You have supplied the function
-that does the initial simple matching selection algorithm (see
-@code{rl_completion_matches()} and @code{rl_completion_entry_function}).
-The default is to do filename
-completion. This calls @code{rl_complete_internal()} with an
-argument depending on @var{invoking_key}.
-@end deftypefun
-
-@deftypefun int rl_possible_completions (int count, int invoking_key)
-List the possible completions. See description of @code{rl_complete
-()}. This calls @code{rl_complete_internal()} with an argument of
-@samp{?}.
-@end deftypefun
-
-@deftypefun int rl_insert_completions (int count, int invoking_key)
-Insert the list of possible completions into the line, deleting the
-partially-completed word. See description of @code{rl_complete()}.
-This calls @code{rl_complete_internal()} with an argument of @samp{*}.
-@end deftypefun
-
-@deftypefun int rl_completion_mode (rl_command_func_t *cfunc)
-Returns the apppriate value to pass to @code{rl_complete_internal()}
-depending on whether @var{cfunc} was called twice in succession and
-the value of the @code{show-all-if-ambiguous} variable.
-Application-specific completion functions may use this function to present
-the same interface as @code{rl_complete()}.
-@end deftypefun
-
-@deftypefun {char **} rl_completion_matches (const char *text, rl_compentry_func_t *entry_func)
-Returns an array of strings which is a list of completions for
-@var{text}. If there are no completions, returns @code{NULL}.
-The first entry in the returned array is the substitution for @var{text}.
-The remaining entries are the possible completions. The array is
-terminated with a @code{NULL} pointer.
-
-@var{entry_func} is a function of two args, and returns a
-@code{char *}. The first argument is @var{text}. The second is a
-state argument; it is zero on the first call, and non-zero on subsequent
-calls. @var{entry_func} returns a @code{NULL} pointer to the caller
-when there are no more matches.
-@end deftypefun
-
-@deftypefun {char *} rl_filename_completion_function (const char *text, int state)
-A generator function for filename completion in the general case.
-@var{text} is a partial filename.
-The Bash source is a useful reference for writing custom
-completion functions (the Bash completion functions call this and other
-Readline functions).
-@end deftypefun
-
-@deftypefun {char *} rl_username_completion_function (const char *text, int state)
-A completion generator for usernames. @var{text} contains a partial
-username preceded by a random character (usually @samp{~}). As with all
-completion generators, @var{state} is zero on the first call and non-zero
-for subsequent calls.
-@end deftypefun
-
-@node Completion Variables
-@subsection Completion Variables
-
-@deftypevar {rl_compentry_func_t *} rl_completion_entry_function
-A pointer to the generator function for @code{rl_completion_matches()}.
-@code{NULL} means to use @code{rl_filename_completion_function()}, the default
-filename completer.
-@end deftypevar
-
-@deftypevar {rl_completion_func_t *} rl_attempted_completion_function
-A pointer to an alternative function to create matches.
-The function is called with @var{text}, @var{start}, and @var{end}.
-@var{start} and @var{end} are indices in @code{rl_line_buffer} defining
-the boundaries of @var{text}, which is a character string.
-If this function exists and returns @code{NULL}, or if this variable is
-set to @code{NULL}, then @code{rl_complete()} will call the value of
-@code{rl_completion_entry_function} to generate matches, otherwise the
-array of strings returned will be used.
-If this function sets the @code{rl_attempted_completion_over}
-variable to a non-zero value, Readline will not perform its default
-completion even if this function returns no matches.
-@end deftypevar
-
-@deftypevar {rl_quote_func_t *} rl_filename_quoting_function
-A pointer to a function that will quote a filename in an
-application-specific fashion. This is called if filename completion is being
-attempted and one of the characters in @code{rl_filename_quote_characters}
-appears in a completed filename. The function is called with
-@var{text}, @var{match_type}, and @var{quote_pointer}. The @var{text}
-is the filename to be quoted. The @var{match_type} is either
-@code{SINGLE_MATCH}, if there is only one completion match, or
-@code{MULT_MATCH}. Some functions use this to decide whether or not to
-insert a closing quote character. The @var{quote_pointer} is a pointer
-to any opening quote character the user typed. Some functions choose
-to reset this character.
-@end deftypevar
-
-@deftypevar {rl_dequote_func_t *} rl_filename_dequoting_function
-A pointer to a function that will remove application-specific quoting
-characters from a filename before completion is attempted, so those
-characters do not interfere with matching the text against names in
-the filesystem. It is called with @var{text}, the text of the word
-to be dequoted, and @var{quote_char}, which is the quoting character
-that delimits the filename (usually @samp{'} or @samp{"}). If
-@var{quote_char} is zero, the filename was not in an embedded string.
-@end deftypevar
-
-@deftypevar {rl_linebuf_func_t *} rl_char_is_quoted_p
-A pointer to a function to call that determines whether or not a specific
-character in the line buffer is quoted, according to whatever quoting
-mechanism the program calling Readline uses. The function is called with
-two arguments: @var{text}, the text of the line, and @var{index}, the
-index of the character in the line. It is used to decide whether a
-character found in @code{rl_completer_word_break_characters} should be
-used to break words for the completer.
-@end deftypevar
-
-@deftypevar {rl_compignore_func_t *} rl_ignore_some_completions_function
-This function, if defined, is called by the completer when real filename
-completion is done, after all the matching names have been generated.
-It is passed a @code{NULL} terminated array of matches.
-The first element (@code{matches[0]}) is the
-maximal substring common to all matches. This function can
-re-arrange the list of matches as required, but each element deleted
-from the array must be freed.
-@end deftypevar
-
-@deftypevar {rl_icppfunc_t *} rl_directory_completion_hook
-This function, if defined, is allowed to modify the directory portion
-of filenames Readline completes. It is called with the address of a
-string (the current directory name) as an argument, and may modify that string.
-If the string is replaced with a new string, the old value should be freed.
-Any modified directory name should have a trailing slash.
-The modified value will be displayed as part of the completion, replacing
-the directory portion of the pathname the user typed.
-It returns an integer that should be non-zero if the function modifies
-its directory argument.
-It could be used to expand symbolic links or shell variables in pathnames.
-@end deftypevar
-
-@deftypevar {rl_compdisp_func_t *} rl_completion_display_matches_hook
-If non-zero, then this is the address of a function to call when
-completing a word would normally display the list of possible matches.
-This function is called in lieu of Readline displaying the list.
-It takes three arguments:
-(@code{char **}@var{matches}, @code{int} @var{num_matches}, @code{int} @var{max_length})
-where @var{matches} is the array of matching strings,
-@var{num_matches} is the number of strings in that array, and
-@var{max_length} is the length of the longest string in that array.
-Readline provides a convenience function, @code{rl_display_match_list},
-that takes care of doing the display to Readline's output stream. That
-function may be called from this hook.
-@end deftypevar
-
-@deftypevar {const char *} rl_basic_word_break_characters
-The basic list of characters that signal a break between words for the
-completer routine. The default value of this variable is the characters
-which break words for completion in Bash:
-@code{" \t\n\"\\'`@@$><=;|&@{("}.
-@end deftypevar
-
-@deftypevar {const char *} rl_basic_quote_characters
-A list of quote characters which can cause a word break.
-@end deftypevar
-
-@deftypevar {const char *} rl_completer_word_break_characters
-The list of characters that signal a break between words for
-@code{rl_complete_internal()}. The default list is the value of
-@code{rl_basic_word_break_characters}.
-@end deftypevar
-
-@deftypevar {const char *} rl_completer_quote_characters
-A list of characters which can be used to quote a substring of the line.
-Completion occurs on the entire substring, and within the substring
-@code{rl_completer_word_break_characters} are treated as any other character,
-unless they also appear within this list.
-@end deftypevar
-
-@deftypevar {const char *} rl_filename_quote_characters
-A list of characters that cause a filename to be quoted by the completer
-when they appear in a completed filename. The default is the null string.
-@end deftypevar
-
-@deftypevar {const char *} rl_special_prefixes
-The list of characters that are word break characters, but should be
-left in @var{text} when it is passed to the completion function.
-Programs can use this to help determine what kind of completing to do.
-For instance, Bash sets this variable to "$@@" so that it can complete
-shell variables and hostnames.
-@end deftypevar
-
-@deftypevar int rl_completion_query_items
-Up to this many items will be displayed in response to a
-possible-completions call. After that, we ask the user if she is sure
-she wants to see them all. The default value is 100.
-@end deftypevar
-
-@deftypevar {int} rl_completion_append_character
-When a single completion alternative matches at the end of the command
-line, this character is appended to the inserted completion text. The
-default is a space character (@samp{ }). Setting this to the null
-character (@samp{\0}) prevents anything being appended automatically.
-This can be changed in custom completion functions to
-provide the ``most sensible word separator character'' according to
-an application-specific command line syntax specification.
-@end deftypevar
-
-@deftypevar int rl_completion_suppress_append
-If non-zero, @var{rl_completion_append_character} is not appended to
-matches at the end of the command line, as described above. It is
-set to 0 before any application-specific completion function is called.
-@end deftypevar
-
-@deftypevar int rl_completion_mark_symlink_dirs
-If non-zero, a slash will be appended to completed filenames that are
-symbolic links to directory names, subject to the value of the
-user-settable @var{mark-directories} variable.
-This variable exists so that application completion functions can
-override the user's global preference (set via the
-@var{mark-symlinked-directories} Readline variable) if appropriate.
-This variable is set to the user's preference before any
-application completion function is called, so unless that function
-modifies the value, the user's preferences are honored.
-@end deftypevar
-
-@deftypevar int rl_ignore_completion_duplicates
-If non-zero, then duplicates in the matches are removed.
-The default is 1.
-@end deftypevar
-
-@deftypevar int rl_filename_completion_desired
-Non-zero means that the results of the matches are to be treated as
-filenames. This is @emph{always} zero on entry, and can only be changed
-within a completion entry generator function. If it is set to a non-zero
-value, directory names have a slash appended and Readline attempts to
-quote completed filenames if they contain any characters in
-@code{rl_filename_quote_characters} and @code{rl_filename_quoting_desired}
-is set to a non-zero value.
-@end deftypevar
-
-@deftypevar int rl_filename_quoting_desired
-Non-zero means that the results of the matches are to be quoted using
-double quotes (or an application-specific quoting mechanism) if the
-completed filename contains any characters in
-@code{rl_filename_quote_chars}. This is @emph{always} non-zero
-on entry, and can only be changed within a completion entry generator
-function. The quoting is effected via a call to the function pointed to
-by @code{rl_filename_quoting_function}.
-@end deftypevar
-
-@deftypevar int rl_attempted_completion_over
-If an application-specific completion function assigned to
-@code{rl_attempted_completion_function} sets this variable to a non-zero
-value, Readline will not perform its default filename completion even
-if the application's completion function returns no matches.
-It should be set only by an application's completion function.
-@end deftypevar
-
-@deftypevar int rl_completion_type
-Set to a character describing the type of completion Readline is currently
-attempting; see the description of @code{rl_complete_internal()}
-(@pxref{Completion Functions}) for the list of characters.
-@end deftypevar
-
-@deftypevar int rl_inhibit_completion
-If this variable is non-zero, completion is inhibited. The completion
-character will be inserted as any other bound to @code{self-insert}.
-@end deftypevar
-
-@node A Short Completion Example
-@subsection A Short Completion Example
-
-Here is a small application demonstrating the use of the GNU Readline
-library. It is called @code{fileman}, and the source code resides in
-@file{examples/fileman.c}. This sample application provides
-completion of command names, line editing features, and access to the
-history list.
-
-@page
-@smallexample
-/* fileman.c -- A tiny application which demonstrates how to use the
- GNU Readline library. This application interactively allows users
- to manipulate files and their modes. */
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/file.h>
-#include <sys/stat.h>
-#include <sys/errno.h>
-
-#include <readline/readline.h>
-#include <readline/history.h>
-
-extern char *xmalloc ();
-
-/* The names of functions that actually do the manipulation. */
-int com_list __P((char *));
-int com_view __P((char *));
-int com_rename __P((char *));
-int com_stat __P((char *));
-int com_pwd __P((char *));
-int com_delete __P((char *));
-int com_help __P((char *));
-int com_cd __P((char *));
-int com_quit __P((char *));
-
-/* A structure which contains information on the commands this program
- can understand. */
-
-typedef struct @{
- char *name; /* User printable name of the function. */
- rl_icpfunc_t *func; /* Function to call to do the job. */
- char *doc; /* Documentation for this function. */
-@} COMMAND;
-
-COMMAND commands[] = @{
- @{ "cd", com_cd, "Change to directory DIR" @},
- @{ "delete", com_delete, "Delete FILE" @},
- @{ "help", com_help, "Display this text" @},
- @{ "?", com_help, "Synonym for `help'" @},
- @{ "list", com_list, "List files in DIR" @},
- @{ "ls", com_list, "Synonym for `list'" @},
- @{ "pwd", com_pwd, "Print the current working directory" @},
- @{ "quit", com_quit, "Quit using Fileman" @},
- @{ "rename", com_rename, "Rename FILE to NEWNAME" @},
- @{ "stat", com_stat, "Print out statistics on FILE" @},
- @{ "view", com_view, "View the contents of FILE" @},
- @{ (char *)NULL, (rl_icpfunc_t *)NULL, (char *)NULL @}
-@};
-
-/* Forward declarations. */
-char *stripwhite ();
-COMMAND *find_command ();
-
-/* The name of this program, as taken from argv[0]. */
-char *progname;
-
-/* When non-zero, this means the user is done using this program. */
-int done;
-
-char *
-dupstr (s)
- int s;
-@{
- char *r;
-
- r = xmalloc (strlen (s) + 1);
- strcpy (r, s);
- return (r);
-@}
-
-main (argc, argv)
- int argc;
- char **argv;
-@{
- char *line, *s;
-
- progname = argv[0];
-
- initialize_readline (); /* Bind our completer. */
-
- /* Loop reading and executing lines until the user quits. */
- for ( ; done == 0; )
- @{
- line = readline ("FileMan: ");
-
- if (!line)
- break;
-
- /* Remove leading and trailing whitespace from the line.
- Then, if there is anything left, add it to the history list
- and execute it. */
- s = stripwhite (line);
-
- if (*s)
- @{
- add_history (s);
- execute_line (s);
- @}
-
- free (line);
- @}
- exit (0);
-@}
-
-/* Execute a command line. */
-int
-execute_line (line)
- char *line;
-@{
- register int i;
- COMMAND *command;
- char *word;
-
- /* Isolate the command word. */
- i = 0;
- while (line[i] && whitespace (line[i]))
- i++;
- word = line + i;
-
- while (line[i] && !whitespace (line[i]))
- i++;
-
- if (line[i])
- line[i++] = '\0';
-
- command = find_command (word);
-
- if (!command)
- @{
- fprintf (stderr, "%s: No such command for FileMan.\n", word);
- return (-1);
- @}
-
- /* Get argument to command, if any. */
- while (whitespace (line[i]))
- i++;
-
- word = line + i;
-
- /* Call the function. */
- return ((*(command->func)) (word));
-@}
-
-/* Look up NAME as the name of a command, and return a pointer to that
- command. Return a NULL pointer if NAME isn't a command name. */
-COMMAND *
-find_command (name)
- char *name;
-@{
- register int i;
-
- for (i = 0; commands[i].name; i++)
- if (strcmp (name, commands[i].name) == 0)
- return (&commands[i]);
-
- return ((COMMAND *)NULL);
-@}
-
-/* Strip whitespace from the start and end of STRING. Return a pointer
- into STRING. */
-char *
-stripwhite (string)
- char *string;
-@{
- register char *s, *t;
-
- for (s = string; whitespace (*s); s++)
- ;
-
- if (*s == 0)
- return (s);
-
- t = s + strlen (s) - 1;
- while (t > s && whitespace (*t))
- t--;
- *++t = '\0';
-
- return s;
-@}
-
-/* **************************************************************** */
-/* */
-/* Interface to Readline Completion */
-/* */
-/* **************************************************************** */
-
-char *command_generator __P((const char *, int));
-char **fileman_completion __P((const char *, int, int));
-
-/* Tell the GNU Readline library how to complete. We want to try to
- complete on command names if this is the first word in the line, or
- on filenames if not. */
-initialize_readline ()
-@{
- /* Allow conditional parsing of the ~/.inputrc file. */
- rl_readline_name = "FileMan";
-
- /* Tell the completer that we want a crack first. */
- rl_attempted_completion_function = fileman_completion;
-@}
-
-/* Attempt to complete on the contents of TEXT. START and END
- bound the region of rl_line_buffer that contains the word to
- complete. TEXT is the word to complete. We can use the entire
- contents of rl_line_buffer in case we want to do some simple
- parsing. Returnthe array of matches, or NULL if there aren't any. */
-char **
-fileman_completion (text, start, end)
- const char *text;
- int start, end;
-@{
- char **matches;
-
- matches = (char **)NULL;
-
- /* If this word is at the start of the line, then it is a command
- to complete. Otherwise it is the name of a file in the current
- directory. */
- if (start == 0)
- matches = rl_completion_matches (text, command_generator);
-
- return (matches);
-@}
-
-/* Generator function for command completion. STATE lets us
- know whether to start from scratch; without any state
- (i.e. STATE == 0), then we start at the top of the list. */
-char *
-command_generator (text, state)
- const char *text;
- int state;
-@{
- static int list_index, len;
- char *name;
-
- /* If this is a new word to complete, initialize now. This
- includes saving the length of TEXT for efficiency, and
- initializing the index variable to 0. */
- if (!state)
- @{
- list_index = 0;
- len = strlen (text);
- @}
-
- /* Return the next name which partially matches from the
- command list. */
- while (name = commands[list_index].name)
- @{
- list_index++;
-
- if (strncmp (name, text, len) == 0)
- return (dupstr(name));
- @}
-
- /* If no names matched, then return NULL. */
- return ((char *)NULL);
-@}
-
-/* **************************************************************** */
-/* */
-/* FileMan Commands */
-/* */
-/* **************************************************************** */
-
-/* String to pass to system (). This is for the LIST, VIEW and RENAME
- commands. */
-static char syscom[1024];
-
-/* List the file(s) named in arg. */
-com_list (arg)
- char *arg;
-@{
- if (!arg)
- arg = "";
-
- sprintf (syscom, "ls -FClg %s", arg);
- return (system (syscom));
-@}
-
-com_view (arg)
- char *arg;
-@{
- if (!valid_argument ("view", arg))
- return 1;
-
- sprintf (syscom, "more %s", arg);
- return (system (syscom));
-@}
-
-com_rename (arg)
- char *arg;
-@{
- too_dangerous ("rename");
- return (1);
-@}
-
-com_stat (arg)
- char *arg;
-@{
- struct stat finfo;
-
- if (!valid_argument ("stat", arg))
- return (1);
-
- if (stat (arg, &finfo) == -1)
- @{
- perror (arg);
- return (1);
- @}
-
- printf ("Statistics for `%s':\n", arg);
-
- printf ("%s has %d link%s, and is %d byte%s in length.\n", arg,
- finfo.st_nlink,
- (finfo.st_nlink == 1) ? "" : "s",
- finfo.st_size,
- (finfo.st_size == 1) ? "" : "s");
- printf ("Inode Last Change at: %s", ctime (&finfo.st_ctime));
- printf (" Last access at: %s", ctime (&finfo.st_atime));
- printf (" Last modified at: %s", ctime (&finfo.st_mtime));
- return (0);
-@}
-
-com_delete (arg)
- char *arg;
-@{
- too_dangerous ("delete");
- return (1);
-@}
-
-/* Print out help for ARG, or for all of the commands if ARG is
- not present. */
-com_help (arg)
- char *arg;
-@{
- register int i;
- int printed = 0;
-
- for (i = 0; commands[i].name; i++)
- @{
- if (!*arg || (strcmp (arg, commands[i].name) == 0))
- @{
- printf ("%s\t\t%s.\n", commands[i].name, commands[i].doc);
- printed++;
- @}
- @}
-
- if (!printed)
- @{
- printf ("No commands match `%s'. Possibilties are:\n", arg);
-
- for (i = 0; commands[i].name; i++)
- @{
- /* Print in six columns. */
- if (printed == 6)
- @{
- printed = 0;
- printf ("\n");
- @}
-
- printf ("%s\t", commands[i].name);
- printed++;
- @}
-
- if (printed)
- printf ("\n");
- @}
- return (0);
-@}
-
-/* Change to the directory ARG. */
-com_cd (arg)
- char *arg;
-@{
- if (chdir (arg) == -1)
- @{
- perror (arg);
- return 1;
- @}
-
- com_pwd ("");
- return (0);
-@}
-
-/* Print out the current working directory. */
-com_pwd (ignore)
- char *ignore;
-@{
- char dir[1024], *s;
-
- s = getcwd (dir, sizeof(dir) - 1);
- if (s == 0)
- @{
- printf ("Error getting pwd: %s\n", dir);
- return 1;
- @}
-
- printf ("Current directory is %s\n", dir);
- return 0;
-@}
-
-/* The user wishes to quit using this program. Just set DONE
- non-zero. */
-com_quit (arg)
- char *arg;
-@{
- done = 1;
- return (0);
-@}
-
-/* Function which tells you that you can't do this. */
-too_dangerous (caller)
- char *caller;
-@{
- fprintf (stderr,
- "%s: Too dangerous for me to distribute.\n"
- caller);
- fprintf (stderr, "Write it yourself.\n");
-@}
-
-/* Return non-zero if ARG is a valid argument for CALLER,
- else print an error message and return zero. */
-int
-valid_argument (caller, arg)
- char *caller, *arg;
-@{
- if (!arg || !*arg)
- @{
- fprintf (stderr, "%s: Argument required.\n", caller);
- return (0);
- @}
-
- return (1);
-@}
-@end smallexample
diff --git a/readline/doc/rluser.texinfo b/readline/doc/rluser.texinfo
deleted file mode 100644
index 94f851e67f2..00000000000
--- a/readline/doc/rluser.texinfo
+++ /dev/null
@@ -1,1796 +0,0 @@
-@comment %**start of header (This is for running Texinfo on a region.)
-@setfilename rluser.info
-@comment %**end of header (This is for running Texinfo on a region.)
-@setchapternewpage odd
-
-@ignore
-This file documents the end user interface to the GNU command line
-editing features. It is to be an appendix to manuals for programs which
-use these features. There is a document entitled "readline.texinfo"
-which contains both end-user and programmer documentation for the
-GNU Readline Library.
-
-Copyright (C) 1988-2002 Free Software Foundation, Inc.
-
-Authored by Brian Fox and Chet Ramey.
-
-Permission is granted to process this file through Tex and print the
-results, provided the printed document carries copying permission notice
-identical to this one except for the removal of this paragraph (this
-paragraph not being relevant to the printed manual).
-
-Permission is granted to make and distribute verbatim copies of this manual
-provided the copyright notice and this permission notice are preserved on
-all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided also that the
-GNU Copyright statement is available to the distributee, and provided that
-the entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions.
-@end ignore
-
-@comment If you are including this manual as an appendix, then set the
-@comment variable readline-appendix.
-
-@ifclear BashFeatures
-@defcodeindex bt
-@end ifclear
-
-@node Command Line Editing
-@chapter Command Line Editing
-
-This chapter describes the basic features of the @sc{gnu}
-command line editing interface.
-@ifset BashFeatures
-Command line editing is provided by the Readline library, which is
-used by several different programs, including Bash.
-@end ifset
-
-@menu
-* Introduction and Notation:: Notation used in this text.
-* Readline Interaction:: The minimum set of commands for editing a line.
-* Readline Init File:: Customizing Readline from a user's view.
-* Bindable Readline Commands:: A description of most of the Readline commands
- available for binding
-* Readline vi Mode:: A short description of how to make Readline
- behave like the vi editor.
-@ifset BashFeatures
-* Programmable Completion:: How to specify the possible completions for
- a specific command.
-* Programmable Completion Builtins:: Builtin commands to specify how to
- complete arguments for a particular command.
-@end ifset
-@end menu
-
-@node Introduction and Notation
-@section Introduction to Line Editing
-
-The following paragraphs describe the notation used to represent
-keystrokes.
-
-The text @kbd{C-k} is read as `Control-K' and describes the character
-produced when the @key{k} key is pressed while the Control key
-is depressed.
-
-The text @kbd{M-k} is read as `Meta-K' and describes the character
-produced when the Meta key (if you have one) is depressed, and the @key{k}
-key is pressed.
-The Meta key is labeled @key{ALT} on many keyboards.
-On keyboards with two keys labeled @key{ALT} (usually to either side of
-the space bar), the @key{ALT} on the left side is generally set to
-work as a Meta key.
-The @key{ALT} key on the right may also be configured to work as a
-Meta key or may be configured as some other modifier, such as a
-Compose key for typing accented characters.
-
-If you do not have a Meta or @key{ALT} key, or another key working as
-a Meta key, the identical keystroke can be generated by typing @key{ESC}
-@emph{first}, and then typing @key{k}.
-Either process is known as @dfn{metafying} the @key{k} key.
-
-The text @kbd{M-C-k} is read as `Meta-Control-k' and describes the
-character produced by @dfn{metafying} @kbd{C-k}.
-
-In addition, several keys have their own names. Specifically,
-@key{DEL}, @key{ESC}, @key{LFD}, @key{SPC}, @key{RET}, and @key{TAB} all
-stand for themselves when seen in this text, or in an init file
-(@pxref{Readline Init File}).
-If your keyboard lacks a @key{LFD} key, typing @key{C-j} will
-produce the desired character.
-The @key{RET} key may be labeled @key{Return} or @key{Enter} on
-some keyboards.
-
-@node Readline Interaction
-@section Readline Interaction
-@cindex interaction, readline
-
-Often during an interactive session you type in a long line of text,
-only to notice that the first word on the line is misspelled. The
-Readline library gives you a set of commands for manipulating the text
-as you type it in, allowing you to just fix your typo, and not forcing
-you to retype the majority of the line. Using these editing commands,
-you move the cursor to the place that needs correction, and delete or
-insert the text of the corrections. Then, when you are satisfied with
-the line, you simply press @key{RET}. You do not have to be at the
-end of the line to press @key{RET}; the entire line is accepted
-regardless of the location of the cursor within the line.
-
-@menu
-* Readline Bare Essentials:: The least you need to know about Readline.
-* Readline Movement Commands:: Moving about the input line.
-* Readline Killing Commands:: How to delete text, and how to get it back!
-* Readline Arguments:: Giving numeric arguments to commands.
-* Searching:: Searching through previous lines.
-@end menu
-
-@node Readline Bare Essentials
-@subsection Readline Bare Essentials
-@cindex notation, readline
-@cindex command editing
-@cindex editing command lines
-
-In order to enter characters into the line, simply type them. The typed
-character appears where the cursor was, and then the cursor moves one
-space to the right. If you mistype a character, you can use your
-erase character to back up and delete the mistyped character.
-
-Sometimes you may mistype a character, and
-not notice the error until you have typed several other characters. In
-that case, you can type @kbd{C-b} to move the cursor to the left, and then
-correct your mistake. Afterwards, you can move the cursor to the right
-with @kbd{C-f}.
-
-When you add text in the middle of a line, you will notice that characters
-to the right of the cursor are `pushed over' to make room for the text
-that you have inserted. Likewise, when you delete text behind the cursor,
-characters to the right of the cursor are `pulled back' to fill in the
-blank space created by the removal of the text. A list of the bare
-essentials for editing the text of an input line follows.
-
-@table @asis
-@item @kbd{C-b}
-Move back one character.
-@item @kbd{C-f}
-Move forward one character.
-@item @key{DEL} or @key{Backspace}
-Delete the character to the left of the cursor.
-@item @kbd{C-d}
-Delete the character underneath the cursor.
-@item @w{Printing characters}
-Insert the character into the line at the cursor.
-@item @kbd{C-_} or @kbd{C-x C-u}
-Undo the last editing command. You can undo all the way back to an
-empty line.
-@end table
-
-@noindent
-(Depending on your configuration, the @key{Backspace} key be set to
-delete the character to the left of the cursor and the @key{DEL} key set
-to delete the character underneath the cursor, like @kbd{C-d}, rather
-than the character to the left of the cursor.)
-
-@node Readline Movement Commands
-@subsection Readline Movement Commands
-
-
-The above table describes the most basic keystrokes that you need
-in order to do editing of the input line. For your convenience, many
-other commands have been added in addition to @kbd{C-b}, @kbd{C-f},
-@kbd{C-d}, and @key{DEL}. Here are some commands for moving more rapidly
-about the line.
-
-@table @kbd
-@item C-a
-Move to the start of the line.
-@item C-e
-Move to the end of the line.
-@item M-f
-Move forward a word, where a word is composed of letters and digits.
-@item M-b
-Move backward a word.
-@item C-l
-Clear the screen, reprinting the current line at the top.
-@end table
-
-Notice how @kbd{C-f} moves forward a character, while @kbd{M-f} moves
-forward a word. It is a loose convention that control keystrokes
-operate on characters while meta keystrokes operate on words.
-
-@node Readline Killing Commands
-@subsection Readline Killing Commands
-
-@cindex killing text
-@cindex yanking text
-
-@dfn{Killing} text means to delete the text from the line, but to save
-it away for later use, usually by @dfn{yanking} (re-inserting)
-it back into the line.
-(`Cut' and `paste' are more recent jargon for `kill' and `yank'.)
-
-If the description for a command says that it `kills' text, then you can
-be sure that you can get the text back in a different (or the same)
-place later.
-
-When you use a kill command, the text is saved in a @dfn{kill-ring}.
-Any number of consecutive kills save all of the killed text together, so
-that when you yank it back, you get it all. The kill
-ring is not line specific; the text that you killed on a previously
-typed line is available to be yanked back later, when you are typing
-another line.
-@cindex kill ring
-
-Here is the list of commands for killing text.
-
-@table @kbd
-@item C-k
-Kill the text from the current cursor position to the end of the line.
-
-@item M-d
-Kill from the cursor to the end of the current word, or, if between
-words, to the end of the next word.
-Word boundaries are the same as those used by @kbd{M-f}.
-
-@item M-@key{DEL}
-Kill from the cursor the start of the current word, or, if between
-words, to the start of the previous word.
-Word boundaries are the same as those used by @kbd{M-b}.
-
-@item C-w
-Kill from the cursor to the previous whitespace. This is different than
-@kbd{M-@key{DEL}} because the word boundaries differ.
-
-@end table
-
-Here is how to @dfn{yank} the text back into the line. Yanking
-means to copy the most-recently-killed text from the kill buffer.
-
-@table @kbd
-@item C-y
-Yank the most recently killed text back into the buffer at the cursor.
-
-@item M-y
-Rotate the kill-ring, and yank the new top. You can only do this if
-the prior command is @kbd{C-y} or @kbd{M-y}.
-@end table
-
-@node Readline Arguments
-@subsection Readline Arguments
-
-You can pass numeric arguments to Readline commands. Sometimes the
-argument acts as a repeat count, other times it is the @i{sign} of the
-argument that is significant. If you pass a negative argument to a
-command which normally acts in a forward direction, that command will
-act in a backward direction. For example, to kill text back to the
-start of the line, you might type @samp{M-- C-k}.
-
-The general way to pass numeric arguments to a command is to type meta
-digits before the command. If the first `digit' typed is a minus
-sign (@samp{-}), then the sign of the argument will be negative. Once
-you have typed one meta digit to get the argument started, you can type
-the remainder of the digits, and then the command. For example, to give
-the @kbd{C-d} command an argument of 10, you could type @samp{M-1 0 C-d},
-which will delete the next ten characters on the input line.
-
-@node Searching
-@subsection Searching for Commands in the History
-
-Readline provides commands for searching through the command history
-@ifset BashFeatures
-(@pxref{Bash History Facilities})
-@end ifset
-for lines containing a specified string.
-There are two search modes: @dfn{incremental} and @dfn{non-incremental}.
-
-Incremental searches begin before the user has finished typing the
-search string.
-As each character of the search string is typed, Readline displays
-the next entry from the history matching the string typed so far.
-An incremental search requires only as many characters as needed to
-find the desired history entry.
-To search backward in the history for a particular string, type
-@kbd{C-r}. Typing @kbd{C-s} searches forward through the history.
-The characters present in the value of the @code{isearch-terminators} variable
-are used to terminate an incremental search.
-If that variable has not been assigned a value, the @key{ESC} and
-@kbd{C-J} characters will terminate an incremental search.
-@kbd{C-g} will abort an incremental search and restore the original line.
-When the search is terminated, the history entry containing the
-search string becomes the current line.
-
-To find other matching entries in the history list, type @kbd{C-r} or
-@kbd{C-s} as appropriate.
-This will search backward or forward in the history for the next
-entry matching the search string typed so far.
-Any other key sequence bound to a Readline command will terminate
-the search and execute that command.
-For instance, a @key{RET} will terminate the search and accept
-the line, thereby executing the command from the history list.
-A movement command will terminate the search, make the last line found
-the current line, and begin editing.
-
-Readline remembers the last incremental search string. If two
-@kbd{C-r}s are typed without any intervening characters defining a new
-search string, any remembered search string is used.
-
-Non-incremental searches read the entire search string before starting
-to search for matching history lines. The search string may be
-typed by the user or be part of the contents of the current line.
-
-@node Readline Init File
-@section Readline Init File
-@cindex initialization file, readline
-
-Although the Readline library comes with a set of Emacs-like
-keybindings installed by default, it is possible to use a different set
-of keybindings.
-Any user can customize programs that use Readline by putting
-commands in an @dfn{inputrc} file, conventionally in his home directory.
-The name of this
-@ifset BashFeatures
-file is taken from the value of the shell variable @env{INPUTRC}. If
-@end ifset
-@ifclear BashFeatures
-file is taken from the value of the environment variable @env{INPUTRC}. If
-@end ifclear
-that variable is unset, the default is @file{~/.inputrc}.
-
-When a program which uses the Readline library starts up, the
-init file is read, and the key bindings are set.
-
-In addition, the @code{C-x C-r} command re-reads this init file, thus
-incorporating any changes that you might have made to it.
-
-@menu
-* Readline Init File Syntax:: Syntax for the commands in the inputrc file.
-
-* Conditional Init Constructs:: Conditional key bindings in the inputrc file.
-
-* Sample Init File:: An example inputrc file.
-@end menu
-
-@node Readline Init File Syntax
-@subsection Readline Init File Syntax
-
-There are only a few basic constructs allowed in the
-Readline init file. Blank lines are ignored.
-Lines beginning with a @samp{#} are comments.
-Lines beginning with a @samp{$} indicate conditional
-constructs (@pxref{Conditional Init Constructs}). Other lines
-denote variable settings and key bindings.
-
-@table @asis
-@item Variable Settings
-You can modify the run-time behavior of Readline by
-altering the values of variables in Readline
-using the @code{set} command within the init file.
-The syntax is simple:
-
-@example
-set @var{variable} @var{value}
-@end example
-
-@noindent
-Here, for example, is how to
-change from the default Emacs-like key binding to use
-@code{vi} line editing commands:
-
-@example
-set editing-mode vi
-@end example
-
-Variable names and values, where appropriate, are recognized without regard
-to case.
-
-@ifset BashFeatures
-The @w{@code{bind -V}} command lists the current Readline variable names
-and values. @xref{Bash Builtins}.
-@end ifset
-
-A great deal of run-time behavior is changeable with the following
-variables.
-
-@cindex variables, readline
-@table @code
-
-@item bell-style
-@vindex bell-style
-Controls what happens when Readline wants to ring the terminal bell.
-If set to @samp{none}, Readline never rings the bell. If set to
-@samp{visible}, Readline uses a visible bell if one is available.
-If set to @samp{audible} (the default), Readline attempts to ring
-the terminal's bell.
-
-@item comment-begin
-@vindex comment-begin
-The string to insert at the beginning of the line when the
-@code{insert-comment} command is executed. The default value
-is @code{"#"}.
-
-@item completion-ignore-case
-If set to @samp{on}, Readline performs filename matching and completion
-in a case-insensitive fashion.
-The default value is @samp{off}.
-
-@item completion-query-items
-@vindex completion-query-items
-The number of possible completions that determines when the user is
-asked whether he wants to see the list of possibilities. If the
-number of possible completions is greater than this value,
-Readline will ask the user whether or not he wishes to view
-them; otherwise, they are simply listed.
-This variable must be set to an integer value greater than or equal to 0.
-The default limit is @code{100}.
-
-@item convert-meta
-@vindex convert-meta
-If set to @samp{on}, Readline will convert characters with the
-eighth bit set to an @sc{ascii} key sequence by stripping the eighth
-bit and prefixing an @key{ESC} character, converting them to a
-meta-prefixed key sequence. The default value is @samp{on}.
-
-@item disable-completion
-@vindex disable-completion
-If set to @samp{On}, Readline will inhibit word completion.
-Completion characters will be inserted into the line as if they had
-been mapped to @code{self-insert}. The default is @samp{off}.
-
-@item editing-mode
-@vindex editing-mode
-The @code{editing-mode} variable controls which default set of
-key bindings is used. By default, Readline starts up in Emacs editing
-mode, where the keystrokes are most similar to Emacs. This variable can be
-set to either @samp{emacs} or @samp{vi}.
-
-@item enable-keypad
-@vindex enable-keypad
-When set to @samp{on}, Readline will try to enable the application
-keypad when it is called. Some systems need this to enable the
-arrow keys. The default is @samp{off}.
-
-@item expand-tilde
-@vindex expand-tilde
-If set to @samp{on}, tilde expansion is performed when Readline
-attempts word completion. The default is @samp{off}.
-
-@vindex history-preserve-point
-If set to @samp{on}, the history code attempts to place point at the
-same location on each history line retrived with @code{previous-history}
-or @code{next-history}.
-
-@item horizontal-scroll-mode
-@vindex horizontal-scroll-mode
-This variable can be set to either @samp{on} or @samp{off}. Setting it
-to @samp{on} means that the text of the lines being edited will scroll
-horizontally on a single screen line when they are longer than the width
-of the screen, instead of wrapping onto a new screen line. By default,
-this variable is set to @samp{off}.
-
-@item input-meta
-@vindex input-meta
-@vindex meta-flag
-If set to @samp{on}, Readline will enable eight-bit input (it
-will not clear the eighth bit in the characters it reads),
-regardless of what the terminal claims it can support. The
-default value is @samp{off}. The name @code{meta-flag} is a
-synonym for this variable.
-
-@item isearch-terminators
-@vindex isearch-terminators
-The string of characters that should terminate an incremental search without
-subsequently executing the character as a command (@pxref{Searching}).
-If this variable has not been given a value, the characters @key{ESC} and
-@kbd{C-J} will terminate an incremental search.
-
-@item keymap
-@vindex keymap
-Sets Readline's idea of the current keymap for key binding commands.
-Acceptable @code{keymap} names are
-@code{emacs},
-@code{emacs-standard},
-@code{emacs-meta},
-@code{emacs-ctlx},
-@code{vi},
-@code{vi-move},
-@code{vi-command}, and
-@code{vi-insert}.
-@code{vi} is equivalent to @code{vi-command}; @code{emacs} is
-equivalent to @code{emacs-standard}. The default value is @code{emacs}.
-The value of the @code{editing-mode} variable also affects the
-default keymap.
-
-@item mark-directories
-If set to @samp{on}, completed directory names have a slash
-appended. The default is @samp{on}.
-
-@item mark-modified-lines
-@vindex mark-modified-lines
-This variable, when set to @samp{on}, causes Readline to display an
-asterisk (@samp{*}) at the start of history lines which have been modified.
-This variable is @samp{off} by default.
-
-@item mark-symlinked-directories
-@vindex mark-symlinked-directories
-If set to @samp{on}, completed names which are symbolic links
-to directories have a slash appended (subject to the value of
-@code{mark-directories}).
-The default is @samp{off}.
-
-@item match-hidden-files
-@vindex match-hidden-files
-This variable, when set to @samp{on}, causes Readline to match files whose
-names begin with a @samp{.} (hidden files) when performing filename
-completion, unless the leading @samp{.} is
-supplied by the user in the filename to be completed.
-This variable is @samp{on} by default.
-
-@item output-meta
-@vindex output-meta
-If set to @samp{on}, Readline will display characters with the
-eighth bit set directly rather than as a meta-prefixed escape
-sequence. The default is @samp{off}.
-
-@item page-completions
-@vindex page-completions
-If set to @samp{on}, Readline uses an internal @code{more}-like pager
-to display a screenful of possible completions at a time.
-This variable is @samp{on} by default.
-
-@item print-completions-horizontally
-If set to @samp{on}, Readline will display completions with matches
-sorted horizontally in alphabetical order, rather than down the screen.
-The default is @samp{off}.
-
-@item show-all-if-ambiguous
-@vindex show-all-if-ambiguous
-This alters the default behavior of the completion functions. If
-set to @samp{on},
-words which have more than one possible completion cause the
-matches to be listed immediately instead of ringing the bell.
-The default value is @samp{off}.
-
-@item visible-stats
-@vindex visible-stats
-If set to @samp{on}, a character denoting a file's type
-is appended to the filename when listing possible
-completions. The default is @samp{off}.
-
-@end table
-
-@item Key Bindings
-The syntax for controlling key bindings in the init file is
-simple. First you need to find the name of the command that you
-want to change. The following sections contain tables of the command
-name, the default keybinding, if any, and a short description of what
-the command does.
-
-Once you know the name of the command, simply place on a line
-in the init file the name of the key
-you wish to bind the command to, a colon, and then the name of the
-command. The name of the key
-can be expressed in different ways, depending on what you find most
-comfortable.
-
-In addition to command names, readline allows keys to be bound
-to a string that is inserted when the key is pressed (a @var{macro}).
-
-@ifset BashFeatures
-The @w{@code{bind -p}} command displays Readline function names and
-bindings in a format that can put directly into an initialization file.
-@xref{Bash Builtins}.
-@end ifset
-
-@table @asis
-@item @w{@var{keyname}: @var{function-name} or @var{macro}}
-@var{keyname} is the name of a key spelled out in English. For example:
-@example
-Control-u: universal-argument
-Meta-Rubout: backward-kill-word
-Control-o: "> output"
-@end example
-
-In the above example, @kbd{C-u} is bound to the function
-@code{universal-argument},
-@kbd{M-DEL} is bound to the function @code{backward-kill-word}, and
-@kbd{C-o} is bound to run the macro
-expressed on the right hand side (that is, to insert the text
-@samp{> output} into the line).
-
-A number of symbolic character names are recognized while
-processing this key binding syntax:
-@var{DEL},
-@var{ESC},
-@var{ESCAPE},
-@var{LFD},
-@var{NEWLINE},
-@var{RET},
-@var{RETURN},
-@var{RUBOUT},
-@var{SPACE},
-@var{SPC},
-and
-@var{TAB}.
-
-@item @w{"@var{keyseq}": @var{function-name} or @var{macro}}
-@var{keyseq} differs from @var{keyname} above in that strings
-denoting an entire key sequence can be specified, by placing
-the key sequence in double quotes. Some @sc{gnu} Emacs style key
-escapes can be used, as in the following example, but the
-special character names are not recognized.
-
-@example
-"\C-u": universal-argument
-"\C-x\C-r": re-read-init-file
-"\e[11~": "Function Key 1"
-@end example
-
-In the above example, @kbd{C-u} is again bound to the function
-@code{universal-argument} (just as it was in the first example),
-@samp{@kbd{C-x} @kbd{C-r}} is bound to the function @code{re-read-init-file},
-and @samp{@key{ESC} @key{[} @key{1} @key{1} @key{~}} is bound to insert
-the text @samp{Function Key 1}.
-
-@end table
-
-The following @sc{gnu} Emacs style escape sequences are available when
-specifying key sequences:
-
-@table @code
-@item @kbd{\C-}
-control prefix
-@item @kbd{\M-}
-meta prefix
-@item @kbd{\e}
-an escape character
-@item @kbd{\\}
-backslash
-@item @kbd{\"}
-@key{"}, a double quotation mark
-@item @kbd{\'}
-@key{'}, a single quote or apostrophe
-@end table
-
-In addition to the @sc{gnu} Emacs style escape sequences, a second
-set of backslash escapes is available:
-
-@table @code
-@item \a
-alert (bell)
-@item \b
-backspace
-@item \d
-delete
-@item \f
-form feed
-@item \n
-newline
-@item \r
-carriage return
-@item \t
-horizontal tab
-@item \v
-vertical tab
-@item \@var{nnn}
-the eight-bit character whose value is the octal value @var{nnn}
-(one to three digits)
-@item \x@var{HH}
-the eight-bit character whose value is the hexadecimal value @var{HH}
-(one or two hex digits)
-@end table
-
-When entering the text of a macro, single or double quotes must
-be used to indicate a macro definition.
-Unquoted text is assumed to be a function name.
-In the macro body, the backslash escapes described above are expanded.
-Backslash will quote any other character in the macro text,
-including @samp{"} and @samp{'}.
-For example, the following binding will make @samp{@kbd{C-x} \}
-insert a single @samp{\} into the line:
-@example
-"\C-x\\": "\\"
-@end example
-
-@end table
-
-@node Conditional Init Constructs
-@subsection Conditional Init Constructs
-
-Readline implements a facility similar in spirit to the conditional
-compilation features of the C preprocessor which allows key
-bindings and variable settings to be performed as the result
-of tests. There are four parser directives used.
-
-@table @code
-@item $if
-The @code{$if} construct allows bindings to be made based on the
-editing mode, the terminal being used, or the application using
-Readline. The text of the test extends to the end of the line;
-no characters are required to isolate it.
-
-@table @code
-@item mode
-The @code{mode=} form of the @code{$if} directive is used to test
-whether Readline is in @code{emacs} or @code{vi} mode.
-This may be used in conjunction
-with the @samp{set keymap} command, for instance, to set bindings in
-the @code{emacs-standard} and @code{emacs-ctlx} keymaps only if
-Readline is starting out in @code{emacs} mode.
-
-@item term
-The @code{term=} form may be used to include terminal-specific
-key bindings, perhaps to bind the key sequences output by the
-terminal's function keys. The word on the right side of the
-@samp{=} is tested against both the full name of the terminal and
-the portion of the terminal name before the first @samp{-}. This
-allows @code{sun} to match both @code{sun} and @code{sun-cmd},
-for instance.
-
-@item application
-The @var{application} construct is used to include
-application-specific settings. Each program using the Readline
-library sets the @var{application name}, and you can test for
-a particular value.
-This could be used to bind key sequences to functions useful for
-a specific program. For instance, the following command adds a
-key sequence that quotes the current or previous word in Bash:
-@example
-$if Bash
-# Quote the current or previous word
-"\C-xq": "\eb\"\ef\""
-$endif
-@end example
-@end table
-
-@item $endif
-This command, as seen in the previous example, terminates an
-@code{$if} command.
-
-@item $else
-Commands in this branch of the @code{$if} directive are executed if
-the test fails.
-
-@item $include
-This directive takes a single filename as an argument and reads commands
-and bindings from that file.
-For example, the following directive reads from @file{/etc/inputrc}:
-@example
-$include /etc/inputrc
-@end example
-@end table
-
-@node Sample Init File
-@subsection Sample Init File
-
-Here is an example of an @var{inputrc} file. This illustrates key
-binding, variable assignment, and conditional syntax.
-
-@example
-@page
-# This file controls the behaviour of line input editing for
-# programs that use the GNU Readline library. Existing
-# programs include FTP, Bash, and GDB.
-#
-# You can re-read the inputrc file with C-x C-r.
-# Lines beginning with '#' are comments.
-#
-# First, include any systemwide bindings and variable
-# assignments from /etc/Inputrc
-$include /etc/Inputrc
-
-#
-# Set various bindings for emacs mode.
-
-set editing-mode emacs
-
-$if mode=emacs
-
-Meta-Control-h: backward-kill-word Text after the function name is ignored
-
-#
-# Arrow keys in keypad mode
-#
-#"\M-OD": backward-char
-#"\M-OC": forward-char
-#"\M-OA": previous-history
-#"\M-OB": next-history
-#
-# Arrow keys in ANSI mode
-#
-"\M-[D": backward-char
-"\M-[C": forward-char
-"\M-[A": previous-history
-"\M-[B": next-history
-#
-# Arrow keys in 8 bit keypad mode
-#
-#"\M-\C-OD": backward-char
-#"\M-\C-OC": forward-char
-#"\M-\C-OA": previous-history
-#"\M-\C-OB": next-history
-#
-# Arrow keys in 8 bit ANSI mode
-#
-#"\M-\C-[D": backward-char
-#"\M-\C-[C": forward-char
-#"\M-\C-[A": previous-history
-#"\M-\C-[B": next-history
-
-C-q: quoted-insert
-
-$endif
-
-# An old-style binding. This happens to be the default.
-TAB: complete
-
-# Macros that are convenient for shell interaction
-$if Bash
-# edit the path
-"\C-xp": "PATH=$@{PATH@}\e\C-e\C-a\ef\C-f"
-# prepare to type a quoted word --
-# insert open and close double quotes
-# and move to just after the open quote
-"\C-x\"": "\"\"\C-b"
-# insert a backslash (testing backslash escapes
-# in sequences and macros)
-"\C-x\\": "\\"
-# Quote the current or previous word
-"\C-xq": "\eb\"\ef\""
-# Add a binding to refresh the line, which is unbound
-"\C-xr": redraw-current-line
-# Edit variable on current line.
-"\M-\C-v": "\C-a\C-k$\C-y\M-\C-e\C-a\C-y="
-$endif
-
-# use a visible bell if one is available
-set bell-style visible
-
-# don't strip characters to 7 bits when reading
-set input-meta on
-
-# allow iso-latin1 characters to be inserted rather
-# than converted to prefix-meta sequences
-set convert-meta off
-
-# display characters with the eighth bit set directly
-# rather than as meta-prefixed characters
-set output-meta on
-
-# if there are more than 150 possible completions for
-# a word, ask the user if he wants to see all of them
-set completion-query-items 150
-
-# For FTP
-$if Ftp
-"\C-xg": "get \M-?"
-"\C-xt": "put \M-?"
-"\M-.": yank-last-arg
-$endif
-@end example
-
-@node Bindable Readline Commands
-@section Bindable Readline Commands
-
-@menu
-* Commands For Moving:: Moving about the line.
-* Commands For History:: Getting at previous lines.
-* Commands For Text:: Commands for changing text.
-* Commands For Killing:: Commands for killing and yanking.
-* Numeric Arguments:: Specifying numeric arguments, repeat counts.
-* Commands For Completion:: Getting Readline to do the typing for you.
-* Keyboard Macros:: Saving and re-executing typed characters
-* Miscellaneous Commands:: Other miscellaneous commands.
-@end menu
-
-This section describes Readline commands that may be bound to key
-sequences.
-@ifset BashFeatures
-You can list your key bindings by executing
-@w{@code{bind -P}} or, for a more terse format, suitable for an
-@var{inputrc} file, @w{@code{bind -p}}. (@xref{Bash Builtins}.)
-@end ifset
-Command names without an accompanying key sequence are unbound by default.
-
-In the following descriptions, @dfn{point} refers to the current cursor
-position, and @dfn{mark} refers to a cursor position saved by the
-@code{set-mark} command.
-The text between the point and mark is referred to as the @dfn{region}.
-
-@node Commands For Moving
-@subsection Commands For Moving
-@ftable @code
-@item beginning-of-line (C-a)
-Move to the start of the current line.
-
-@item end-of-line (C-e)
-Move to the end of the line.
-
-@item forward-char (C-f)
-Move forward a character.
-
-@item backward-char (C-b)
-Move back a character.
-
-@item forward-word (M-f)
-Move forward to the end of the next word. Words are composed of
-letters and digits.
-
-@item backward-word (M-b)
-Move back to the start of the current or previous word. Words are
-composed of letters and digits.
-
-@item clear-screen (C-l)
-Clear the screen and redraw the current line,
-leaving the current line at the top of the screen.
-
-@item redraw-current-line ()
-Refresh the current line. By default, this is unbound.
-
-@end ftable
-
-@node Commands For History
-@subsection Commands For Manipulating The History
-
-@ftable @code
-@item accept-line (Newline or Return)
-@ifset BashFeatures
-Accept the line regardless of where the cursor is.
-If this line is
-non-empty, add it to the history list according to the setting of
-the @env{HISTCONTROL} and @env{HISTIGNORE} variables.
-If this line is a modified history line, then restore the history line
-to its original state.
-@end ifset
-@ifclear BashFeatures
-Accept the line regardless of where the cursor is.
-If this line is
-non-empty, it may be added to the history list for future recall with
-@code{add_history()}.
-If this line is a modified history line, the history line is restored
-to its original state.
-@end ifclear
-
-@item previous-history (C-p)
-Move `back' through the history list, fetching the previous command.
-
-@item next-history (C-n)
-Move `forward' through the history list, fetching the next command.
-
-@item beginning-of-history (M-<)
-Move to the first line in the history.
-
-@item end-of-history (M->)
-Move to the end of the input history, i.e., the line currently
-being entered.
-
-@item reverse-search-history (C-r)
-Search backward starting at the current line and moving `up' through
-the history as necessary. This is an incremental search.
-
-@item forward-search-history (C-s)
-Search forward starting at the current line and moving `down' through
-the the history as necessary. This is an incremental search.
-
-@item non-incremental-reverse-search-history (M-p)
-Search backward starting at the current line and moving `up'
-through the history as necessary using a non-incremental search
-for a string supplied by the user.
-
-@item non-incremental-forward-search-history (M-n)
-Search forward starting at the current line and moving `down'
-through the the history as necessary using a non-incremental search
-for a string supplied by the user.
-
-@item history-search-forward ()
-Search forward through the history for the string of characters
-between the start of the current line and the point.
-This is a non-incremental search.
-By default, this command is unbound.
-
-@item history-search-backward ()
-Search backward through the history for the string of characters
-between the start of the current line and the point. This
-is a non-incremental search. By default, this command is unbound.
-
-@item yank-nth-arg (M-C-y)
-Insert the first argument to the previous command (usually
-the second word on the previous line) at point.
-With an argument @var{n},
-insert the @var{n}th word from the previous command (the words
-in the previous command begin with word 0). A negative argument
-inserts the @var{n}th word from the end of the previous command.
-
-@item yank-last-arg (M-. or M-_)
-Insert last argument to the previous command (the last word of the
-previous history entry). With an
-argument, behave exactly like @code{yank-nth-arg}.
-Successive calls to @code{yank-last-arg} move back through the history
-list, inserting the last argument of each line in turn.
-
-@end ftable
-
-@node Commands For Text
-@subsection Commands For Changing Text
-
-@ftable @code
-@item delete-char (C-d)
-Delete the character at point. If point is at the
-beginning of the line, there are no characters in the line, and
-the last character typed was not bound to @code{delete-char}, then
-return @sc{eof}.
-
-@item backward-delete-char (Rubout)
-Delete the character behind the cursor. A numeric argument means
-to kill the characters instead of deleting them.
-
-@item forward-backward-delete-char ()
-Delete the character under the cursor, unless the cursor is at the
-end of the line, in which case the character behind the cursor is
-deleted. By default, this is not bound to a key.
-
-@item quoted-insert (C-q or C-v)
-Add the next character typed to the line verbatim. This is
-how to insert key sequences like @kbd{C-q}, for example.
-
-@ifclear BashFeatures
-@item tab-insert (M-@key{TAB})
-Insert a tab character.
-@end ifclear
-
-@item self-insert (a, b, A, 1, !, @dots{})
-Insert yourself.
-
-@item transpose-chars (C-t)
-Drag the character before the cursor forward over
-the character at the cursor, moving the
-cursor forward as well. If the insertion point
-is at the end of the line, then this
-transposes the last two characters of the line.
-Negative arguments have no effect.
-
-@item transpose-words (M-t)
-Drag the word before point past the word after point,
-moving point past that word as well.
-If the insertion point is at the end of the line, this transposes
-the last two words on the line.
-
-@item upcase-word (M-u)
-Uppercase the current (or following) word. With a negative argument,
-uppercase the previous word, but do not move the cursor.
-
-@item downcase-word (M-l)
-Lowercase the current (or following) word. With a negative argument,
-lowercase the previous word, but do not move the cursor.
-
-@item capitalize-word (M-c)
-Capitalize the current (or following) word. With a negative argument,
-capitalize the previous word, but do not move the cursor.
-
-@item overwrite-mode ()
-Toggle overwrite mode. With an explicit positive numeric argument,
-switches to overwrite mode. With an explicit non-positive numeric
-argument, switches to insert mode. This command affects only
-@code{emacs} mode; @code{vi} mode does overwrite differently.
-Each call to @code{readline()} starts in insert mode.
-
-In overwrite mode, characters bound to @code{self-insert} replace
-the text at point rather than pushing the text to the right.
-Characters bound to @code{backward-delete-char} replace the character
-before point with a space.
-
-By default, this command is unbound.
-
-@end ftable
-
-@node Commands For Killing
-@subsection Killing And Yanking
-
-@ftable @code
-
-@item kill-line (C-k)
-Kill the text from point to the end of the line.
-
-@item backward-kill-line (C-x Rubout)
-Kill backward to the beginning of the line.
-
-@item unix-line-discard (C-u)
-Kill backward from the cursor to the beginning of the current line.
-
-@item kill-whole-line ()
-Kill all characters on the current line, no matter where point is.
-By default, this is unbound.
-
-@item kill-word (M-d)
-Kill from point to the end of the current word, or if between
-words, to the end of the next word.
-Word boundaries are the same as @code{forward-word}.
-
-@item backward-kill-word (M-@key{DEL})
-Kill the word behind point.
-Word boundaries are the same as @code{backward-word}.
-
-@item unix-word-rubout (C-w)
-Kill the word behind point, using white space as a word boundary.
-The killed text is saved on the kill-ring.
-
-@item delete-horizontal-space ()
-Delete all spaces and tabs around point. By default, this is unbound.
-
-@item kill-region ()
-Kill the text in the current region.
-By default, this command is unbound.
-
-@item copy-region-as-kill ()
-Copy the text in the region to the kill buffer, so it can be yanked
-right away. By default, this command is unbound.
-
-@item copy-backward-word ()
-Copy the word before point to the kill buffer.
-The word boundaries are the same as @code{backward-word}.
-By default, this command is unbound.
-
-@item copy-forward-word ()
-Copy the word following point to the kill buffer.
-The word boundaries are the same as @code{forward-word}.
-By default, this command is unbound.
-
-@item yank (C-y)
-Yank the top of the kill ring into the buffer at point.
-
-@item yank-pop (M-y)
-Rotate the kill-ring, and yank the new top. You can only do this if
-the prior command is @code{yank} or @code{yank-pop}.
-@end ftable
-
-@node Numeric Arguments
-@subsection Specifying Numeric Arguments
-@ftable @code
-
-@item digit-argument (@kbd{M-0}, @kbd{M-1}, @dots{} @kbd{M--})
-Add this digit to the argument already accumulating, or start a new
-argument. @kbd{M--} starts a negative argument.
-
-@item universal-argument ()
-This is another way to specify an argument.
-If this command is followed by one or more digits, optionally with a
-leading minus sign, those digits define the argument.
-If the command is followed by digits, executing @code{universal-argument}
-again ends the numeric argument, but is otherwise ignored.
-As a special case, if this command is immediately followed by a
-character that is neither a digit or minus sign, the argument count
-for the next command is multiplied by four.
-The argument count is initially one, so executing this function the
-first time makes the argument count four, a second time makes the
-argument count sixteen, and so on.
-By default, this is not bound to a key.
-@end ftable
-
-@node Commands For Completion
-@subsection Letting Readline Type For You
-
-@ftable @code
-@item complete (@key{TAB})
-Attempt to perform completion on the text before point.
-The actual completion performed is application-specific.
-@ifset BashFeatures
-Bash attempts completion treating the text as a variable (if the
-text begins with @samp{$}), username (if the text begins with
-@samp{~}), hostname (if the text begins with @samp{@@}), or
-command (including aliases and functions) in turn. If none
-of these produces a match, filename completion is attempted.
-@end ifset
-@ifclear BashFeatures
-The default is filename completion.
-@end ifclear
-
-@item possible-completions (M-?)
-List the possible completions of the text before point.
-
-@item insert-completions (M-*)
-Insert all completions of the text before point that would have
-been generated by @code{possible-completions}.
-
-@item menu-complete ()
-Similar to @code{complete}, but replaces the word to be completed
-with a single match from the list of possible completions.
-Repeated execution of @code{menu-complete} steps through the list
-of possible completions, inserting each match in turn.
-At the end of the list of completions, the bell is rung
-(subject to the setting of @code{bell-style})
-and the original text is restored.
-An argument of @var{n} moves @var{n} positions forward in the list
-of matches; a negative argument may be used to move backward
-through the list.
-This command is intended to be bound to @key{TAB}, but is unbound
-by default.
-
-@item delete-char-or-list ()
-Deletes the character under the cursor if not at the beginning or
-end of the line (like @code{delete-char}).
-If at the end of the line, behaves identically to
-@code{possible-completions}.
-This command is unbound by default.
-
-@ifset BashFeatures
-@item complete-filename (M-/)
-Attempt filename completion on the text before point.
-
-@item possible-filename-completions (C-x /)
-List the possible completions of the text before point,
-treating it as a filename.
-
-@item complete-username (M-~)
-Attempt completion on the text before point, treating
-it as a username.
-
-@item possible-username-completions (C-x ~)
-List the possible completions of the text before point,
-treating it as a username.
-
-@item complete-variable (M-$)
-Attempt completion on the text before point, treating
-it as a shell variable.
-
-@item possible-variable-completions (C-x $)
-List the possible completions of the text before point,
-treating it as a shell variable.
-
-@item complete-hostname (M-@@)
-Attempt completion on the text before point, treating
-it as a hostname.
-
-@item possible-hostname-completions (C-x @@)
-List the possible completions of the text before point,
-treating it as a hostname.
-
-@item complete-command (M-!)
-Attempt completion on the text before point, treating
-it as a command name. Command completion attempts to
-match the text against aliases, reserved words, shell
-functions, shell builtins, and finally executable filenames,
-in that order.
-
-@item possible-command-completions (C-x !)
-List the possible completions of the text before point,
-treating it as a command name.
-
-@item dynamic-complete-history (M-@key{TAB})
-Attempt completion on the text before point, comparing
-the text against lines from the history list for possible
-completion matches.
-
-@item complete-into-braces (M-@{)
-Perform filename completion and insert the list of possible completions
-enclosed within braces so the list is available to the shell
-(@pxref{Brace Expansion}).
-
-@end ifset
-@end ftable
-
-@node Keyboard Macros
-@subsection Keyboard Macros
-@ftable @code
-
-@item start-kbd-macro (C-x ()
-Begin saving the characters typed into the current keyboard macro.
-
-@item end-kbd-macro (C-x ))
-Stop saving the characters typed into the current keyboard macro
-and save the definition.
-
-@item call-last-kbd-macro (C-x e)
-Re-execute the last keyboard macro defined, by making the characters
-in the macro appear as if typed at the keyboard.
-
-@end ftable
-
-@node Miscellaneous Commands
-@subsection Some Miscellaneous Commands
-@ftable @code
-
-@item re-read-init-file (C-x C-r)
-Read in the contents of the @var{inputrc} file, and incorporate
-any bindings or variable assignments found there.
-
-@item abort (C-g)
-Abort the current editing command and
-ring the terminal's bell (subject to the setting of
-@code{bell-style}).
-
-@item do-uppercase-version (M-a, M-b, M-@var{x}, @dots{})
-If the metafied character @var{x} is lowercase, run the command
-that is bound to the corresponding uppercase character.
-
-@item prefix-meta (@key{ESC})
-Metafy the next character typed. This is for keyboards
-without a meta key. Typing @samp{@key{ESC} f} is equivalent to typing
-@kbd{M-f}.
-
-@item undo (C-_ or C-x C-u)
-Incremental undo, separately remembered for each line.
-
-@item revert-line (M-r)
-Undo all changes made to this line. This is like executing the @code{undo}
-command enough times to get back to the beginning.
-
-@ifset BashFeatures
-@item tilde-expand (M-&)
-@end ifset
-@ifclear BashFeatures
-@item tilde-expand (M-~)
-@end ifclear
-Perform tilde expansion on the current word.
-
-@item set-mark (C-@@)
-Set the mark to the point. If a
-numeric argument is supplied, the mark is set to that position.
-
-@item exchange-point-and-mark (C-x C-x)
-Swap the point with the mark. The current cursor position is set to
-the saved position, and the old cursor position is saved as the mark.
-
-@item character-search (C-])
-A character is read and point is moved to the next occurrence of that
-character. A negative count searches for previous occurrences.
-
-@item character-search-backward (M-C-])
-A character is read and point is moved to the previous occurrence
-of that character. A negative count searches for subsequent
-occurrences.
-
-@item insert-comment (M-#)
-Without a numeric argument, the value of the @code{comment-begin}
-variable is inserted at the beginning of the current line.
-If a numeric argument is supplied, this command acts as a toggle: if
-the characters at the beginning of the line do not match the value
-of @code{comment-begin}, the value is inserted, otherwise
-the characters in @code{comment-begin} are deleted from the beginning of
-the line.
-In either case, the line is accepted as if a newline had been typed.
-@ifset BashFeatures
-The default value of @code{comment-begin} causes this command
-to make the current line a shell comment.
-If a numeric argument causes the comment character to be removed, the line
-will be executed by the shell.
-@end ifset
-
-@item dump-functions ()
-Print all of the functions and their key bindings to the
-Readline output stream. If a numeric argument is supplied,
-the output is formatted in such a way that it can be made part
-of an @var{inputrc} file. This command is unbound by default.
-
-@item dump-variables ()
-Print all of the settable variables and their values to the
-Readline output stream. If a numeric argument is supplied,
-the output is formatted in such a way that it can be made part
-of an @var{inputrc} file. This command is unbound by default.
-
-@item dump-macros ()
-Print all of the Readline key sequences bound to macros and the
-strings they output. If a numeric argument is supplied,
-the output is formatted in such a way that it can be made part
-of an @var{inputrc} file. This command is unbound by default.
-
-@ifset BashFeatures
-@item glob-complete-word (M-g)
-The word before point is treated as a pattern for pathname expansion,
-with an asterisk implicitly appended. This pattern is used to
-generate a list of matching file names for possible completions.
-
-@item glob-expand-word (C-x *)
-The word before point is treated as a pattern for pathname expansion,
-and the list of matching file names is inserted, replacing the word.
-If a numeric argument is supplied, a @samp{*} is appended before
-pathname expansion.
-
-@item glob-list-expansions (C-x g)
-The list of expansions that would have been generated by
-@code{glob-expand-word} is displayed, and the line is redrawn.
-If a numeric argument is supplied, a @samp{*} is appended before
-pathname expansion.
-
-@item display-shell-version (C-x C-v)
-Display version information about the current instance of Bash.
-
-@item shell-expand-line (M-C-e)
-Expand the line as the shell does.
-This performs alias and history expansion as well as all of the shell
-word expansions (@pxref{Shell Expansions}).
-
-@item history-expand-line (M-^)
-Perform history expansion on the current line.
-
-@item magic-space ()
-Perform history expansion on the current line and insert a space
-(@pxref{History Interaction}).
-
-@item alias-expand-line ()
-Perform alias expansion on the current line (@pxref{Aliases}).
-
-@item history-and-alias-expand-line ()
-Perform history and alias expansion on the current line.
-
-@item insert-last-argument (M-. or M-_)
-A synonym for @code{yank-last-arg}.
-
-@item operate-and-get-next (C-o)
-Accept the current line for execution and fetch the next line
-relative to the current line from the history for editing. Any
-argument is ignored.
-
-@item edit-and-execute-command (C-xC-e)
-Invoke an editor on the current command line, and execute the result as shell
-commands.
-Bash attempts to invoke
-@code{$FCEDIT}, @code{$EDITOR}, and @code{emacs}
-as the editor, in that order.
-
-@end ifset
-
-@ifclear BashFeatures
-@item emacs-editing-mode (C-e)
-When in @code{vi} command mode, this causes a switch to @code{emacs}
-editing mode.
-
-@item vi-editing-mode (M-C-j)
-When in @code{emacs} editing mode, this causes a switch to @code{vi}
-editing mode.
-
-@end ifclear
-
-@end ftable
-
-@node Readline vi Mode
-@section Readline vi Mode
-
-While the Readline library does not have a full set of @code{vi}
-editing functions, it does contain enough to allow simple editing
-of the line. The Readline @code{vi} mode behaves as specified in
-the @sc{posix} 1003.2 standard.
-
-@ifset BashFeatures
-In order to switch interactively between @code{emacs} and @code{vi}
-editing modes, use the @samp{set -o emacs} and @samp{set -o vi}
-commands (@pxref{The Set Builtin}).
-@end ifset
-@ifclear BashFeatures
-In order to switch interactively between @code{emacs} and @code{vi}
-editing modes, use the command @kbd{M-C-j} (bound to emacs-editing-mode
-when in @code{vi} mode and to vi-editing-mode in @code{emacs} mode).
-@end ifclear
-The Readline default is @code{emacs} mode.
-
-When you enter a line in @code{vi} mode, you are already placed in
-`insertion' mode, as if you had typed an @samp{i}. Pressing @key{ESC}
-switches you into `command' mode, where you can edit the text of the
-line with the standard @code{vi} movement keys, move to previous
-history lines with @samp{k} and subsequent lines with @samp{j}, and
-so forth.
-
-@ifset BashFeatures
-@node Programmable Completion
-@section Programmable Completion
-@cindex programmable completion
-
-When word completion is attempted for an argument to a command for
-which a completion specification (a @var{compspec}) has been defined
-using the @code{complete} builtin (@pxref{Programmable Completion Builtins}),
-the programmable completion facilities are invoked.
-
-First, the command name is identified.
-If a compspec has been defined for that command, the
-compspec is used to generate the list of possible completions for the word.
-If the command word is a full pathname, a compspec for the full
-pathname is searched for first.
-If no compspec is found for the full pathname, an attempt is made to
-find a compspec for the portion following the final slash.
-
-Once a compspec has been found, it is used to generate the list of
-matching words.
-If a compspec is not found, the default Bash completion
-described above (@pxref{Commands For Completion}) is performed.
-
-First, the actions specified by the compspec are used.
-Only matches which are prefixed by the word being completed are
-returned.
-When the @option{-f} or @option{-d} option is used for filename or
-directory name completion, the shell variable @env{FIGNORE} is
-used to filter the matches.
-@xref{Bash Variables}, for a description of @env{FIGNORE}.
-
-Any completions specified by a filename expansion pattern to the
-@option{-G} option are generated next.
-The words generated by the pattern need not match the word being completed.
-The @env{GLOBIGNORE} shell variable is not used to filter the matches,
-but the @env{FIGNORE} shell variable is used.
-
-Next, the string specified as the argument to the @option{-W} option
-is considered.
-The string is first split using the characters in the @env{IFS}
-special variable as delimiters.
-Shell quoting is honored.
-Each word is then expanded using
-brace expansion, tilde expansion, parameter and variable expansion,
-command substitution, arithmetic expansion, and pathname expansion,
-as described above (@pxref{Shell Expansions}).
-The results are split using the rules described above
-(@pxref{Word Splitting}).
-The results of the expansion are prefix-matched against the word being
-completed, and the matching words become the possible completions.
-
-After these matches have been generated, any shell function or command
-specified with the @option{-F} and @option{-C} options is invoked.
-When the command or function is invoked, the @env{COMP_LINE} and
-@env{COMP_POINT} variables are assigned values as described above
-(@pxref{Bash Variables}).
-If a shell function is being invoked, the @env{COMP_WORDS} and
-@env{COMP_CWORD} variables are also set.
-When the function or command is invoked, the first argument is the
-name of the command whose arguments are being completed, the
-second argument is the word being completed, and the third argument
-is the word preceding the word being completed on the current command line.
-No filtering of the generated completions against the word being completed
-is performed; the function or command has complete freedom in generating
-the matches.
-
-Any function specified with @option{-F} is invoked first.
-The function may use any of the shell facilities, including the
-@code{compgen} builtin described below
-(@pxref{Programmable Completion Builtins}), to generate the matches.
-It must put the possible completions in the @env{COMPREPLY} array
-variable.
-
-Next, any command specified with the @option{-C} option is invoked
-in an environment equivalent to command substitution.
-It should print a list of completions, one per line, to
-the standard output.
-Backslash may be used to escape a newline, if necessary.
-
-After all of the possible completions are generated, any filter
-specified with the @option{-X} option is applied to the list.
-The filter is a pattern as used for pathname expansion; a @samp{&}
-in the pattern is replaced with the text of the word being completed.
-A literal @samp{&} may be escaped with a backslash; the backslash
-is removed before attempting a match.
-Any completion that matches the pattern will be removed from the list.
-A leading @samp{!} negates the pattern; in this case any completion
-not matching the pattern will be removed.
-
-Finally, any prefix and suffix specified with the @option{-P} and @option{-S}
-options are added to each member of the completion list, and the result is
-returned to the Readline completion code as the list of possible
-completions.
-
-If the previously-applied actions do not generate any matches, and the
-@option{-o dirnames} option was supplied to @code{complete} when the
-compspec was defined, directory name completion is attempted.
-
-By default, if a compspec is found, whatever it generates is returned to
-the completion code as the full set of possible completions.
-The default Bash completions are not attempted, and the Readline default
-of filename completion is disabled.
-If the @option{-o default} option was supplied to @code{complete} when the
-compspec was defined, Readline's default completion will be performed
-if the compspec generates no matches.
-
-When a compspec indicates that directory name completion is desired,
-the programmable completion functions force Readline to append a slash
-to completed names which are symbolic links to directories, subject to
-the value of the @var{mark-directories} Readline variable, regardless
-of the setting of the @var{mark-symlinked-directories} Readline variable.
-
-@node Programmable Completion Builtins
-@section Programmable Completion Builtins
-@cindex completion builtins
-
-Two builtin commands are available to manipulate the programmable completion
-facilities.
-
-@table @code
-@item compgen
-@btindex compgen
-@example
-@code{compgen [@var{option}] [@var{word}]}
-@end example
-
-Generate possible completion matches for @var{word} according to
-the @var{option}s, which may be any option accepted by the
-@code{complete}
-builtin with the exception of @option{-p} and @option{-r}, and write
-the matches to the standard output.
-When using the @option{-F} or @option{-C} options, the various shell variables
-set by the programmable completion facilities, while available, will not
-have useful values.
-
-The matches will be generated in the same way as if the programmable
-completion code had generated them directly from a completion specification
-with the same flags.
-If @var{word} is specified, only those completions matching @var{word}
-will be displayed.
-
-The return value is true unless an invalid option is supplied, or no
-matches were generated.
-
-@item complete
-@btindex complete
-@example
-@code{complete [-abcdefgjksuv] [-o @var{comp-option}] [-A @var{action}] [-G @var{globpat}] [-W @var{wordlist}]
-[-P @var{prefix}] [-S @var{suffix}] [-X @var{filterpat}] [-F @var{function}]
-[-C @var{command}] @var{name} [@var{name} @dots{}]}
-@code{complete -pr [@var{name} @dots{}]}
-@end example
-
-Specify how arguments to each @var{name} should be completed.
-If the @option{-p} option is supplied, or if no options are supplied, existing
-completion specifications are printed in a way that allows them to be
-reused as input.
-The @option{-r} option removes a completion specification for
-each @var{name}, or, if no @var{name}s are supplied, all
-completion specifications.
-
-The process of applying these completion specifications when word completion
-is attempted is described above (@pxref{Programmable Completion}).
-
-Other options, if specified, have the following meanings.
-The arguments to the @option{-G}, @option{-W}, and @option{-X} options
-(and, if necessary, the @option{-P} and @option{-S} options)
-should be quoted to protect them from expansion before the
-@code{complete} builtin is invoked.
-
-
-@table @code
-@item -o @var{comp-option}
-The @var{comp-option} controls several aspects of the compspec's behavior
-beyond the simple generation of completions.
-@var{comp-option} may be one of:
-
-@table @code
-
-@item default
-Use Readline's default filename completion if the compspec generates
-no matches.
-
-@item dirnames
-Perform directory name completion if the compspec generates no matches.
-
-@item filenames
-Tell Readline that the compspec generates filenames, so it can perform any
-filename\-specific processing (like adding a slash to directory names or
-suppressing trailing spaces). This option is intended to be used with
-shell functions specified with @option{-F}.
-
-@item nospace
-Tell Readline not to append a space (the default) to words completed at
-the end of the line.
-@end table
-
-@item -A @var{action}
-The @var{action} may be one of the following to generate a list of possible
-completions:
-
-@table @code
-@item alias
-Alias names. May also be specified as @option{-a}.
-
-@item arrayvar
-Array variable names.
-
-@item binding
-Readline key binding names (@pxref{Bindable Readline Commands}).
-
-@item builtin
-Names of shell builtin commands. May also be specified as @option{-b}.
-
-@item command
-Command names. May also be specified as @option{-c}.
-
-@item directory
-Directory names. May also be specified as @option{-d}.
-
-@item disabled
-Names of disabled shell builtins.
-
-@item enabled
-Names of enabled shell builtins.
-
-@item export
-Names of exported shell variables. May also be specified as @option{-e}.
-
-@item file
-File names. May also be specified as @option{-f}.
-
-@item function
-Names of shell functions.
-
-@item group
-Group names. May also be specified as @option{-g}.
-
-@item helptopic
-Help topics as accepted by the @code{help} builtin (@pxref{Bash Builtins}).
-
-@item hostname
-Hostnames, as taken from the file specified by the
-@env{HOSTFILE} shell variable (@pxref{Bash Variables}).
-
-@item job
-Job names, if job control is active. May also be specified as @option{-j}.
-
-@item keyword
-Shell reserved words. May also be specified as @option{-k}.
-
-@item running
-Names of running jobs, if job control is active.
-
-@item service
-Service names. May also be specified as @option{-s}.
-
-@item setopt
-Valid arguments for the @option{-o} option to the @code{set} builtin
-(@pxref{The Set Builtin}).
-
-@item shopt
-Shell option names as accepted by the @code{shopt} builtin
-(@pxref{Bash Builtins}).
-
-@item signal
-Signal names.
-
-@item stopped
-Names of stopped jobs, if job control is active.
-
-@item user
-User names. May also be specified as @option{-u}.
-
-@item variable
-Names of all shell variables. May also be specified as @option{-v}.
-@end table
-
-@item -G @var{globpat}
-The filename expansion pattern @var{globpat} is expanded to generate
-the possible completions.
-
-@item -W @var{wordlist}
-The @var{wordlist} is split using the characters in the
-@env{IFS} special variable as delimiters, and each resultant word
-is expanded.
-The possible completions are the members of the resultant list which
-match the word being completed.
-
-@item -C @var{command}
-@var{command} is executed in a subshell environment, and its output is
-used as the possible completions.
-
-@item -F @var{function}
-The shell function @var{function} is executed in the current shell
-environment.
-When it finishes, the possible completions are retrieved from the value
-of the @env{COMPREPLY} array variable.
-
-@item -X @var{filterpat}
-@var{filterpat} is a pattern as used for filename expansion.
-It is applied to the list of possible completions generated by the
-preceding options and arguments, and each completion matching
-@var{filterpat} is removed from the list.
-A leading @samp{!} in @var{filterpat} negates the pattern; in this
-case, any completion not matching @var{filterpat} is removed.
-
-@item -P @var{prefix}
-@var{prefix} is added at the beginning of each possible completion
-after all other options have been applied.
-
-@item -S @var{suffix}
-@var{suffix} is appended to each possible completion
-after all other options have been applied.
-@end table
-
-The return value is true unless an invalid option is supplied, an option
-other than @option{-p} or @option{-r} is supplied without a @var{name}
-argument, an attempt is made to remove a completion specification for
-a @var{name} for which no specification exists, or
-an error occurs adding a completion specification.
-
-@end table
-@end ifset
diff --git a/readline/doc/rluserman.pdf b/readline/doc/rluserman.pdf
deleted file mode 100644
index 4a2184bf461..00000000000
--- a/readline/doc/rluserman.pdf
+++ /dev/null
Binary files differ
diff --git a/readline/doc/rluserman.texinfo b/readline/doc/rluserman.texinfo
deleted file mode 100644
index 89abe31aeb5..00000000000
--- a/readline/doc/rluserman.texinfo
+++ /dev/null
@@ -1,94 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@comment %**start of header (This is for running Texinfo on a region.)
-@setfilename rluserman.info
-@settitle GNU Readline Library
-@comment %**end of header (This is for running Texinfo on a region.)
-@setchapternewpage odd
-
-@include manvers.texinfo
-
-@ifinfo
-@dircategory Libraries
-@direntry
-* RLuserman: (rluserman). The GNU readline library User's Manual.
-@end direntry
-
-This document describes the end user interface of the GNU Readline Library,
-a utility which aids in the consistency of user interface across discrete
-programs that need to provide a command line interface.
-
-Copyright (C) 1988-2002 Free Software Foundation, Inc.
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-pare preserved on all copies.
-
-@ignore
-Permission is granted to process this file through TeX and print the
-results, provided the printed document carries copying permission
-notice identical to this one except for the removal of this paragraph
-(this paragraph not being relevant to the printed manual).
-@end ignore
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the entire
-resulting derived work is distributed under the terms of a permission
-notice identical to this one.
-
-Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions,
-except that this permission notice may be stated in a translation approved
-by the Free Software Foundation.
-@end ifinfo
-
-@titlepage
-@title GNU Readline Library User Interface
-@subtitle Edition @value{EDITION}, for @code{Readline Library} Version @value{VERSION}.
-@subtitle @value{UPDATE-MONTH}
-@author Brian Fox, Free Software Foundation
-@author Chet Ramey, Case Western Reserve University
-
-@page
-This document describes the end user interface of the GNU Readline Library,
-a utility which aids in the consistency of user interface across discrete
-programs that need to provide a command line interface.
-
-Published by the Free Software Foundation @*
-59 Temple Place, Suite 330, @*
-Boston, MA 02111 USA
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the entire
-resulting derived work is distributed under the terms of a permission
-notice identical to this one.
-
-Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions,
-except that this permission notice may be stated in a translation approved
-by the Free Software Foundation.
-
-@vskip 0pt plus 1filll
-Copyright @copyright{} 1988-2002 Free Software Foundation, Inc.
-@end titlepage
-
-@ifinfo
-@node Top
-@top GNU Readline Library
-
-This document describes the end user interface of the GNU Readline Library,
-a utility which aids in the consistency of user interface across discrete
-programs that need to provide a command line interface.
-
-@menu
-* Command Line Editing:: GNU Readline User's Manual.
-@end menu
-@end ifinfo
-
-@include rluser.texinfo
-
-@contents
-@bye
diff --git a/readline/doc/texi2dvi b/readline/doc/texi2dvi
index 5439e081fdd..010b586b422 100755
--- a/readline/doc/texi2dvi
+++ b/readline/doc/texi2dvi
@@ -1,8 +1,9 @@
#! /bin/sh
# texi2dvi --- produce DVI (or PDF) files from Texinfo (or LaTeX) sources.
-# $Id: texi2dvi,v 0.43 1999/09/28 19:36:53 karl Exp $
+# $Id: texi2dvi,v 1.14 2003/02/05 00:42:33 karl Exp $
#
-# Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001,
+# 2002, 2003 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -26,12 +27,12 @@
# the `--debug' option when making a bug report.
# This string is expanded by rcs automatically when this file is checked out.
-rcs_revision='$Revision: 0.43 $'
+rcs_revision='$Revision: 1.14 $'
rcs_version=`set - $rcs_revision; echo $2`
program=`echo $0 | sed -e 's!.*/!!'`
-version="texi2dvi (GNU Texinfo 4.0) $rcs_version
+version="texi2dvi (GNU Texinfo 4.5) $rcs_version
-Copyright (C) 1999 Free Software Foundation, Inc.
+Copyright (C) 2003 Free Software Foundation, Inc.
There is NO warranty. You may redistribute this software
under the terms of the GNU General Public License.
For more information about these matters, see the files named COPYING."
@@ -46,46 +47,52 @@ is used to determine its language (LaTeX or Texinfo).
Makeinfo is used to perform Texinfo macro expansion before running TeX
when needed.
-Options:
- -@ Use @input instead of \input; for preloaded Texinfo.
- -b, --batch No interaction.
- -c, --clean Remove all auxiliary files.
- -D, --debug Turn on shell debugging (set -x).
- -e, --expand Force macro expansion using makeinfo.
- -I DIR Search DIR for Texinfo files.
- -h, --help Display this help and exit successfully.
- -l, --language=LANG Specify the LANG of FILE: LaTeX or Texinfo.
- -p, --pdf Use pdftex or pdflatex for processing.
- -q, --quiet No output unless errors (implies --batch).
- -s, --silent Same as --quiet.
- -t, --texinfo=CMD Insert CMD after @setfilename in copy of input file.
- Multiple values accumulate.
- -v, --version Display version information and exit successfully.
- -V, --verbose Report on what is done.
+Operation modes:
+ -b, --batch no interaction
+ -c, --clean remove all auxiliary files
+ -D, --debug turn on shell debugging (set -x)
+ -h, --help display this help and exit successfully
+ -o, --output=OFILE leave output in OFILE (implies --clean);
+ Only one input FILE may be specified in this case
+ -q, --quiet no output unless errors (implies --batch)
+ -s, --silent same as --quiet
+ -v, --version display version information and exit successfully
+ -V, --verbose report on what is done
+
+TeX tuning:
+ -@ use @input instead of \input; for preloaded Texinfo
+ -e, -E, --expand force macro expansion using makeinfo
+ -I DIR search DIR for Texinfo files
+ -l, --language=LANG specify the LANG of FILE (LaTeX or Texinfo)
+ -p, --pdf use pdftex or pdflatex for processing
+ -t, --texinfo=CMD insert CMD after @setfilename in copy of input file
+ multiple values accumulate
The values of the BIBTEX, LATEX (or PDFLATEX), MAKEINDEX, MAKEINFO,
TEX (or PDFTEX), and TEXINDEX environment variables are used to run
those commands, if they are set.
Email bug reports to <bug-texinfo@gnu.org>,
-general questions and discussion to <help-texinfo@gnu.org>."
+general questions and discussion to <help-texinfo@gnu.org>.
+Texinfo home page: http://www.gnu.org/software/texinfo/"
# Initialize variables for option overriding and otherwise.
# Don't use `unset' since old bourne shells don't have this command.
# Instead, assign them an empty value.
-escape='\'
batch=false # eval for batch mode
clean=
debug=
+escape='\'
expand= # t for expansion via makeinfo
+miincludes= # makeinfo include path
oformat=dvi
+oname= # --output
+quiet= # by default let the tools' message be displayed
set_language=
-miincludes= # makeinfo include path
textra=
tmpdir=${TMPDIR:-/tmp}/t2d$$ # avoid collisions on 8.3 filesystems.
-txincludes= # TEXINPUTS extensions
+txincludes= # TEXINPUTS extensions, with trailing colon
txiprereq=19990129 # minimum texinfo.tex version to have macro expansion
-quiet= # by default let the tools' message be displayed
verbose=false # echo for verbose mode
orig_pwd=`pwd`
@@ -98,6 +105,12 @@ else
path_sep=":"
fi
+# Pacify verbose cds.
+CDPATH=${ZSH_VERSION+.}$path_sep
+
+# In case someone crazy insists on using grep -E.
+: ${EGREP=egrep}
+
# Save this so we can construct a new TEXINPUTS path for each file.
TEXINPUTS_orig="$TEXINPUTS"
# Unfortunately makeindex does not read TEXINPUTS.
@@ -136,14 +149,21 @@ while test x"$1" != x"$arg_sep"; do
-q | -s | --q* | --s*) quiet=t; batch=eval;;
-c | --c*) clean=t;;
-D | --d*) debug=t;;
- -e | --e*) expand=t;;
+ -e | -E | --e*) expand=t;;
-h | --h*) echo "$usage"; exit 0;;
-I | --I*)
shift
miincludes="$miincludes -I $1"
- txincludes="$txincludes$path_sep$1"
+ txincludes="$txincludes$1$path_sep"
;;
-l | --l*) shift; set_language=$1;;
+ -o | --o*)
+ shift
+ clean=t
+ case "$1" in
+ /* | ?:/*) oname=$1;;
+ *) oname="$orig_pwd/$1";;
+ esac;;
-p | --p*) oformat=pdf;;
-t | --t*) shift; textra="$textra\\
$1";;
@@ -168,11 +188,20 @@ done
shift
# Interpret remaining command line args as filenames.
-if test $# = 0; then
+case $# in
+ 0)
echo "$0: Missing file arguments." >&2
echo "$0: Try \`--help' for more information." >&2
exit 2
-fi
+ ;;
+ 1) ;;
+ *)
+ if test -n "$oname"; then
+ echo "$0: Can't use option \`--output' with more than one argument." >&2
+ exit 2
+ fi
+ ;;
+esac
# Prepare the temporary directory. Remove it at exit, unless debugging.
if test -z "$debug"; then
@@ -205,14 +234,23 @@ cat <<EOF >$comment_iftex_sed
s/^@c texi2dvi//
}
}
-/^@html/,/^@end html/d
-/^@ifhtml/,/^@end ifhtml/d
-/^@ifnottex/,/^@end ifnottex/d
+/^@html/,/^@end html/{
+ s/^/@c (texi2dvi)/
+}
+/^@ifhtml/,/^@end ifhtml/{
+ s/^/@c (texi2dvi)/
+}
+/^@ifnottex/,/^@end ifnottex/{
+ s/^/@c (texi2dvi)/
+}
/^@ifinfo/,/^@end ifinfo/{
/^@node/p
/^@menu/,/^@end menu/p
- d
+ t
+ s/^/@c (texi2dvi)/
}
+s/^@ifnotinfo/@c texi2dvi@ifnotinfo/
+s/^@end ifnotinfo/@c texi2dvi@end ifnotinfo/
EOF
# Uncommenting is simple: Remove any leading `@c texi2dvi'.
uncomment_iftex_sed=$utildir/uncomment.sed
@@ -230,7 +268,7 @@ cat <<\EOF >$get_xref_files
# Get list of xref files (indexes, tables and lists).
# Find all files having root filename with a two-letter extension,
# saves the ones that are really Texinfo-related files. .?o? catches
-# LaTeX tables and lists.
+# many files: .toc, .log, LaTeX tables and lists, FiXme's .lox, maybe more.
for this_file in "$1".?o? "$1".aux "$1".?? "$1".idx; do
# If file is empty, skip it.
test -s "$this_file" || continue
@@ -273,7 +311,7 @@ for command_line_filename in ${1+"$@"}; do
# If the COMMAND_LINE_FILENAME is not absolute (e.g., --debug.tex),
# prepend `./' in order to avoid that the tools take it as an option.
- echo "$command_line_filename" | egrep '^(/|[A-z]:/)' >/dev/null \
+ echo "$command_line_filename" | $EGREP '^(/|[A-z]:/)' >/dev/null \
|| command_line_filename="./$command_line_filename"
# See if the file exists. If it doesn't we're in trouble since, even
@@ -314,22 +352,67 @@ for command_line_filename in ${1+"$@"}; do
# Make all those directories and give up if we can't succeed.
mkdir $tmpdir_src $tmpdir_xtr $tmpdir_bak || exit 1
- # Source file might include additional sources. Put `.' and
- # directory where source file(s) reside in TEXINPUTS before anything
- # else. `.' goes first to ensure that any old .aux, .cps,
+ # Source file might include additional sources.
+ # We want `.:$orig_pwd' before anything else. (We'll add `.:' later
+ # after all other directories have been turned into absolute paths.)
+ # `.' goes first to ensure that any old .aux, .cps,
# etc. files in ${directory} don't get used in preference to fresher
# files in `.'. Include orig_pwd in case we are in clean mode, where
# we've cd'd to a temp directory.
- common=".$path_sep$orig_pwd$path_sep$filename_dir$path_sep$txincludes$path_sep"
+ common="$orig_pwd$path_sep$filename_dir$path_sep$txincludes"
TEXINPUTS="$common$TEXINPUTS_orig"
INDEXSTYLE="$common$INDEXSTYLE_orig"
+ # Convert relative paths to absolute paths, so we can run in another
+ # directory (e.g., in --clean mode, or during the macro-support
+ # detection.)
+ #
+ # Empty path components are meaningful to tex. We rewrite them
+ # as `EMPTY' so they don't get lost when we split on $path_sep.
+ TEXINPUTS=`echo $TEXINPUTS |sed 's/^:/EMPTY:/;s/:$/:EMPTY/;s/::/:EMPTY:/g'`
+ INDEXSTYLE=`echo $INDEXSTYLE |sed 's/^:/EMPTY:/;s/:$/:EMPTY/;s/::/:EMPTY:/g'`
+ save_IFS=$IFS
+ IFS=$path_sep
+ set x $TEXINPUTS; shift
+ TEXINPUTS=.
+ for dir
+ do
+ case $dir in
+ EMPTY)
+ TEXINPUTS=$TEXINPUTS$path_sep
+ ;;
+ [\\/]* | ?:[\\/]*) # Absolute paths don't need to be expansed.
+ TEXINPUTS=$TEXINPUTS$path_sep$dir
+ ;;
+ *)
+ abs=`cd "$dir" && pwd` && TEXINPUTS=$TEXINPUTS$path_sep$abs
+ ;;
+ esac
+ done
+ set x $INDEXSTYLE; shift
+ INDEXSTYLE=.
+ for dir
+ do
+ case $dir in
+ EMPTY)
+ INDEXSTYLE=$INDEXSTYLE$path_sep
+ ;;
+ [\\/]* | ?:[\\/]*) # Absolute paths don't need to be expansed.
+ INDEXSTYLE=$INDEXSTYLE$path_sep$dir
+ ;;
+ *)
+ abs=`cd "$dir" && pwd` && INDEXSTYLE=$INDEXSTYLE$path_sep$abs
+ ;;
+ esac
+ done
+ IFS=$save_IFS
+
# If the user explicitly specified the language, use that.
# Otherwise, if the first line is \input texinfo, assume it's texinfo.
# Otherwise, guess from the file extension.
if test -n "$set_language"; then
language=$set_language
- elif sed 1q "$command_line_filename" | fgrep 'input texinfo' >/dev/null; then
+ elif sed 1q "$command_line_filename" | grep 'input texinfo' >/dev/null; then
language=texinfo
else
language=
@@ -373,9 +456,9 @@ for command_line_filename in ${1+"$@"}; do
txiversion_tex=txiversion.tex
echo '\input texinfo.tex @bye' >$tmpdir/$txiversion_tex
# Run in the tmpdir to avoid leaving files.
- eval `cd $tmpdir >/dev/null \
- && $tex $txiversion_tex 2>/dev/null \
-| sed -n 's/^.*\[\(.*\)version \(....\)-\(..\)-\(..\).*$/txiformat=\1 txiversion="\2\3\4"/p'`
+ eval `cd $tmpdir >/dev/null &&
+ $tex $txiversion_tex 2>/dev/null |
+ sed -n 's/^.*\[\(.*\)version \(....\)-\(..\)-\(..\).*$/txiformat=\1 txiversion="\2\3\4"/p'`
$verbose "texinfo.tex preloaded as \`$txiformat', version is \`$txiversion' ..."
if test "$txiprereq" -le "$txiversion" >/dev/null 2>&1; then
makeinfo=
@@ -467,10 +550,14 @@ for command_line_filename in ${1+"$@"}; do
# What we'll run texindex on -- exclude non-index files.
# Since we know index files are last, it is correct to remove everything
- # before .aux and .?o?.
+ # before .aux and .?o?. But don't really do <anything>o<anything>
+ # -- don't match whitespace as <anything>.
+ # Otherwise, if orig_xref_files contains something like
+ # foo.xo foo.whatever
+ # the space after the o will get matched.
index_files=`echo "$orig_xref_files" \
| sed "s!.*\.aux!!g;
- s!./$filename_noext\..o.!!g;
+ s!./$filename_noext\.[^ ]o[^ ]!!g;
s/^[ ]*//;s/[ ]*$//"`
# Run texindex (or makeindex) on current index files. If they
# already exist, and after running TeX a first time the index
@@ -489,8 +576,8 @@ for command_line_filename in ${1+"$@"}; do
# Prevent $ESCAPE from being interpreted by the shell if it happens
# to be `/'.
$batch tex_args="\\${escape}nonstopmode\ \\${escape}input"
- $verbose "Running $cmd ..."
cmd="$tex $tex_args $filename_input"
+ $verbose "Running $cmd ..."
if $cmd >&5; then :; else
echo "$0: $tex exited with bad status, quitting." >&2
echo "$0: see $filename_noext.log for errors." >&2
@@ -508,7 +595,7 @@ for command_line_filename in ${1+"$@"}; do
# subdirs, since texi2dvi does not try to compare xref files in
# subdirs. Performing xref files test is still good since LaTeX
# does not report changes in xref files.
- if fgrep "Rerun to get" "$filename_noext.log" >/dev/null 2>&1; then
+ if grep "Rerun to get" "$filename_noext.log" >/dev/null 2>&1; then
finished=
fi
@@ -550,8 +637,13 @@ for command_line_filename in ${1+"$@"}; do
# - the next file is processed in correct conditions
# - the temporary file can be removed
if test -n "$clean"; then
- $verbose "Copying $oformat file from `pwd` to $orig_pwd"
- cp -p "./$filename_noext.$oformat" "$orig_pwd"
+ if test -n "$oname"; then
+ dest=$oname
+ else
+ dest=$orig_pwd
+ fi
+ $verbose "Copying $oformat file from `pwd` to $dest"
+ cp -p "./$filename_noext.$oformat" "$dest"
cd / # in case $orig_pwd is on a different drive (for DOS)
cd $orig_pwd || exit 1
fi
diff --git a/readline/emacs_keymap.c b/readline/emacs_keymap.c
index ca9d1343b65..c7399534fdb 100644
--- a/readline/emacs_keymap.c
+++ b/readline/emacs_keymap.c
@@ -278,7 +278,13 @@ KEYMAP_ENTRY_ARRAY emacs_standard_keymap = {
{ ISFUNC, rl_insert }, /* Latin capital letter Y with acute */
{ ISFUNC, rl_insert }, /* Latin capital letter thorn (Icelandic) */
{ ISFUNC, rl_insert }, /* Latin small letter sharp s (German) */
+#ifndef __MINGW32__
{ ISFUNC, rl_insert }, /* Latin small letter a with grave */
+#else
+ /* Temporary - this is a bug in readline 5.1 that should be fixed in
+ readline 5.2. */
+ { ISFUNC, 0 }, /* Must leave this unbound for the arrow keys to work. */
+#endif
{ ISFUNC, rl_insert }, /* Latin small letter a with acute */
{ ISFUNC, rl_insert }, /* Latin small letter a with circumflex */
{ ISFUNC, rl_insert }, /* Latin small letter a with tilde */
diff --git a/readline/examples/ChangeLog.gdb b/readline/examples/ChangeLog.gdb
index 5ff9ba18ddc..48966545f7c 100644
--- a/readline/examples/ChangeLog.gdb
+++ b/readline/examples/ChangeLog.gdb
@@ -1,3 +1,7 @@
+2006-04-24 Daniel Jacobowitz <dan@codesourcery.com>
+
+ Imported readline 5.1, and upstream patches 001-004.
+
2002-02-24 Elena Zannoni <ezannoni@redhat.com>
* ChangeLog.gdb: Rename from ChangeLog.Cygnus.
diff --git a/readline/examples/Makefile.in b/readline/examples/Makefile.in
index 72c9904ff0f..e27bbc0cf6a 100644
--- a/readline/examples/Makefile.in
+++ b/readline/examples/Makefile.in
@@ -40,6 +40,8 @@ INCLUDES = -I$(srcdir) -I$(top_srcdir) -I..
CCFLAGS = $(DEFS) $(LOCAL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(CFLAGS)
LDFLAGS = -g -L.. @LDFLAGS@
+PURIFY = @PURIFY@
+
READLINE_LIB = ../libreadline.a
HISTORY_LIB = ../libhistory.a
@@ -50,33 +52,35 @@ TERMCAP_LIB = @TERMCAP_LIB@
$(CC) $(CCFLAGS) -c $<
EXECUTABLES = fileman rltest rl rlcat rlversion histexamp
-OBJECTS = fileman.o rltest.o rl.o rlversion.o histexamp.o
+OBJECTS = fileman.o rltest.o rl.o rlcat.o rlversion.o histexamp.o
all: $(EXECUTABLES)
-everything: all rlfe
+everything: all
rl: rl.o $(READLINE_LIB)
- $(CC) $(LDFLAGS) -o $@ rl.o -lreadline $(TERMCAP_LIB)
+ $(PURIFY) $(CC) $(LDFLAGS) -o $@ rl.o $(READLINE_LIB) $(TERMCAP_LIB)
rlcat: rlcat.o $(READLINE_LIB)
- $(CC) $(LDFLAGS) -o $@ rlcat.o -lreadline $(TERMCAP_LIB)
+ $(PURIFY) $(CC) $(LDFLAGS) -o $@ rlcat.o $(READLINE_LIB) $(TERMCAP_LIB)
fileman: fileman.o $(READLINE_LIB)
- $(CC) $(LDFLAGS) -o $@ fileman.o -lreadline $(TERMCAP_LIB)
+ $(PURIFY) $(CC) $(LDFLAGS) -o $@ fileman.o $(READLINE_LIB) $(TERMCAP_LIB)
rltest: rltest.o $(READLINE_LIB)
- $(CC) $(LDFLAGS) -o $@ rltest.o -lreadline $(TERMCAP_LIB)
+ $(PURIFY) $(CC) $(LDFLAGS) -o $@ rltest.o $(READLINE_LIB) $(TERMCAP_LIB)
+
+rlptytest: rlptytest.o $(READLINE_LIB)
+ $(PURIFY) $(CC) $(LDFLAGS) -o $@ rlptytest.o $(READLINE_LIB) $(TERMCAP_LIB)
rlversion: rlversion.o $(READLINE_LIB)
- $(CC) $(LDFLAGS) -o $@ rlversion.o -lreadline $(TERMCAP_LIB)
+ $(CC) $(LDFLAGS) -o $@ rlversion.o $(READLINE_LIB) $(TERMCAP_LIB)
histexamp: histexamp.o $(HISTORY_LIB)
- $(CC) $(LDFLAGS) -o $@ histexamp.o -lhistory $(TERMCAP_LIB)
+ $(PURIFY) $(CC) $(LDFLAGS) -o $@ histexamp.o -lhistory $(TERMCAP_LIB)
clean mostlyclean:
$(RM) $(OBJECTS)
$(RM) $(EXECUTABLES) *.exe
- $(RM) rlfe.o rlfe
distclean maintainer-clean: clean
$(RM) Makefile
@@ -86,19 +90,13 @@ rltest.o: rltest.c
rl.o: rl.c
rlversion.o: rlversion.c
histexamp.o: histexamp.c
+rlcat.o: rlcat.c
+rlptytest.o: rlptytest.c
fileman.o: $(top_srcdir)/readline.h
rltest.o: $(top_srcdir)/readline.h
rl.o: $(top_srcdir)/readline.h
rlversion.o: $(top_srcdir)/readline.h
histexamp.o: $(top_srcdir)/history.h
-
-# Stuff for Per Bothner's `rlfe' program
-
-rlfe: rlfe.o $(READLINE_LIB) $(HISTORY_LIB)
- $(CC) $(LDFLAGS) -o $@ rlfe.o -lreadline -lhistory ${TERMCAP_LIB}
-
-rlfe.o: rlfe.c
-
-rlfe.o: $(top_srcdir)/readline.h
-rlfe.o: $(top_srcdir)/history.h
+rlcat.o: $(top_srcdir)/readline.h $(top_srcdir)/history.h
+rlptytest.o: $(top_srcdir)/readline.h $(top_srcdir)/history.h
diff --git a/readline/examples/histexamp.c b/readline/examples/histexamp.c
index 45651dfb137..4f059c17cc3 100644
--- a/readline/examples/histexamp.c
+++ b/readline/examples/histexamp.c
@@ -26,14 +26,17 @@
# include <readline/history.h>
#endif
+#include <string.h>
+
main (argc, argv)
int argc;
char **argv;
{
char line[1024], *t;
- int len, done = 0;
+ int len, done;
line[0] = 0;
+ done = 0;
using_history ();
while (!done)
@@ -42,71 +45,80 @@ main (argc, argv)
fflush (stdout);
t = fgets (line, sizeof (line) - 1, stdin);
if (t && *t)
- {
- len = strlen (t);
- if (t[len - 1] == '\n')
- t[len - 1] = '\0';
- }
+ {
+ len = strlen (t);
+ if (t[len - 1] == '\n')
+ t[len - 1] = '\0';
+ }
if (!t)
- strcpy (line, "quit");
+ strcpy (line, "quit");
if (line[0])
- {
- char *expansion;
- int result;
+ {
+ char *expansion;
+ int result;
- using_history ();
+ using_history ();
- result = history_expand (line, &expansion);
- if (result)
- fprintf (stderr, "%s\n", expansion);
+ result = history_expand (line, &expansion);
+ if (result)
+ fprintf (stderr, "%s\n", expansion);
- if (result < 0 || result == 2)
- {
- free (expansion);
- continue;
- }
+ if (result < 0 || result == 2)
+ {
+ free (expansion);
+ continue;
+ }
- add_history (expansion);
- strncpy (line, expansion, sizeof (line) - 1);
- free (expansion);
- }
+ add_history (expansion);
+ strncpy (line, expansion, sizeof (line) - 1);
+ free (expansion);
+ }
if (strcmp (line, "quit") == 0)
- done = 1;
+ done = 1;
else if (strcmp (line, "save") == 0)
- write_history ("history_file");
+ write_history ("history_file");
else if (strcmp (line, "read") == 0)
- read_history ("history_file");
+ read_history ("history_file");
else if (strcmp (line, "list") == 0)
- {
- register HIST_ENTRY **the_list;
- register int i;
-
- the_list = history_list ();
- if (the_list)
- for (i = 0; the_list[i]; i++)
- printf ("%d: %s\n", i + history_base, the_list[i]->line);
- }
+ {
+ register HIST_ENTRY **the_list;
+ register int i;
+ time_t tt;
+ char timestr[128];
+
+ the_list = history_list ();
+ if (the_list)
+ for (i = 0; the_list[i]; i++)
+ {
+ tt = history_get_time (the_list[i]);
+ if (tt)
+ strftime (timestr, sizeof (timestr), "%a %R", localtime(&tt));
+ else
+ strcpy (timestr, "??");
+ printf ("%d: %s: %s\n", i + history_base, timestr, the_list[i]->line);
+ }
+ }
else if (strncmp (line, "delete", 6) == 0)
- {
- int which;
- if ((sscanf (line + 6, "%d", &which)) == 1)
- {
- HIST_ENTRY *entry = remove_history (which);
- if (!entry)
- fprintf (stderr, "No such entry %d\n", which);
- else
- {
- free (entry->line);
- free (entry);
- }
- }
- else
- {
- fprintf (stderr, "non-numeric arg given to `delete'\n");
- }
- }
+ {
+ int which;
+ if ((sscanf (line + 6, "%d", &which)) == 1)
+ {
+ HIST_ENTRY *entry = remove_history (which);
+ if (!entry)
+ fprintf (stderr, "No such entry %d\n", which);
+ else
+ {
+ free (entry->line);
+ free (entry);
+ }
+ }
+ else
+ {
+ fprintf (stderr, "non-numeric arg given to `delete'\n");
+ }
+ }
}
}
diff --git a/readline/examples/rl.c b/readline/examples/rl.c
index d2604895e52..c608c15f3d6 100644
--- a/readline/examples/rl.c
+++ b/readline/examples/rl.c
@@ -31,12 +31,19 @@
#include <stdio.h>
#include <sys/types.h>
-#include "posixstat.h"
+
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+extern void exit();
+#endif
#if defined (READLINE_LIBRARY)
+# include "posixstat.h"
# include "readline.h"
# include "history.h"
#else
+# include <sys/stat.h>
# include <readline/readline.h>
# include <readline/history.h>
#endif
diff --git a/readline/examples/rlcat.c b/readline/examples/rlcat.c
index 176b9f44b68..33aea4a3007 100644
--- a/readline/examples/rlcat.c
+++ b/readline/examples/rlcat.c
@@ -40,6 +40,12 @@
#include <string.h>
#include <errno.h>
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+extern void exit();
+#endif
+
#ifndef errno
extern int errno;
#endif
diff --git a/readline/examples/rlfe.c b/readline/examples/rlfe.c
deleted file mode 100644
index d634d7ce878..00000000000
--- a/readline/examples/rlfe.c
+++ /dev/null
@@ -1,1042 +0,0 @@
-/* A front-end using readline to "cook" input lines for Kawa.
- *
- * Copyright (C) 1999 Per Bothner
- *
- * This front-end program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as published
- * by the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * Some code from Johnson & Troan: "Linux Application Development"
- * (Addison-Wesley, 1998) was used directly or for inspiration.
- */
-
-/* PROBLEMS/TODO:
- *
- * Only tested under Linux; needs to be ported.
- *
- * When running mc -c under the Linux console, mc does not recognize
- * mouse clicks, which mc does when not running under fep.
- *
- * Pasting selected text containing tabs is like hitting the tab character,
- * which invokes readline completion. We don't want this. I don't know
- * if this is fixable without integrating fep into a terminal emulator.
- *
- * Echo suppression is a kludge, but can only be avoided with better kernel
- * support: We need a tty mode to disable "real" echoing, while still
- * letting the inferior think its tty driver to doing echoing.
- * Stevens's book claims SCR$ and BSD4.3+ have TIOCREMOTE.
- *
- * The latest readline may have some hooks we can use to avoid having
- * to back up the prompt.
- *
- * Desirable readline feature: When in cooked no-echo mode (e.g. password),
- * echo characters are they are types with '*', but remove them when done.
- *
- * A synchronous output while we're editing an input line should be
- * inserted in the output view *before* the input line, so that the
- * lines being edited (with the prompt) float at the end of the input.
- *
- * A "page mode" option to emulate more/less behavior: At each page of
- * output, pause for a user command. This required parsing the output
- * to keep track of line lengths. It also requires remembering the
- * output, if we want an option to scroll back, which suggests that
- * this should be integrated with a terminal emulator like xterm.
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdio.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <signal.h>
-#include <netdb.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <grp.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <sys/ioctl.h>
-#include <termios.h>
-#include <limits.h>
-#include <dirent.h>
-
-#ifdef READLINE_LIBRARY
-# include "readline.h"
-# include "history.h"
-#else
-# include <readline/readline.h>
-# include <readline/history.h>
-#endif
-
-#ifndef COMMAND
-#define COMMAND "/bin/sh"
-#endif
-#ifndef COMMAND_ARGS
-#define COMMAND_ARGS COMMAND
-#endif
-
-#ifndef HAVE_MEMMOVE
-#ifndef memmove
-# if __GNUC__ > 1
-# define memmove(d, s, n) __builtin_memcpy(d, s, n)
-# else
-# define memmove(d, s, n) memcpy(d, s, n)
-# endif
-#else
-# define memmove(d, s, n) memcpy(d, s, n)
-#endif
-#endif
-
-#define APPLICATION_NAME "Rlfe"
-
-#ifndef errno
-extern int errno;
-#endif
-
-extern int optind;
-extern char *optarg;
-
-static char *progname;
-static char *progversion;
-
-static int in_from_inferior_fd;
-static int out_to_inferior_fd;
-
-/* Unfortunately, we cannot safely display echo from the inferior process.
- The reason is that the echo bit in the pty is "owned" by the inferior,
- and if we try to turn it off, we could confuse the inferior.
- Thus, when echoing, we get echo twice: First readline echoes while
- we're actually editing. Then we send the line to the inferior, and the
- terminal driver send back an extra echo.
- The work-around is to remember the input lines, and when we see that
- line come back, we supress the output.
- A better solution (supposedly available on SVR4) would be a smarter
- terminal driver, with more flags ... */
-#define ECHO_SUPPRESS_MAX 1024
-char echo_suppress_buffer[ECHO_SUPPRESS_MAX];
-int echo_suppress_start = 0;
-int echo_suppress_limit = 0;
-
-/* #define DEBUG */
-
-static FILE *logfile = NULL;
-
-#ifdef DEBUG
-FILE *debugfile = NULL;
-#define DPRINT0(FMT) (fprintf(debugfile, FMT), fflush(debugfile))
-#define DPRINT1(FMT, V1) (fprintf(debugfile, FMT, V1), fflush(debugfile))
-#define DPRINT2(FMT, V1, V2) (fprintf(debugfile, FMT, V1, V2), fflush(debugfile))
-#else
-#define DPRINT0(FMT) /* Do nothing */
-#define DPRINT1(FMT, V1) /* Do nothing */
-#define DPRINT2(FMT, V1, V2) /* Do nothing */
-#endif
-
-struct termios orig_term;
-
-static int rlfe_directory_completion_hook __P((char **));
-static int rlfe_directory_rewrite_hook __P((char **));
-static char *rlfe_filename_completion_function __P((const char *, int));
-
-/* Pid of child process. */
-static pid_t child = -1;
-
-static void
-sig_child (int signo)
-{
- int status;
- wait (&status);
- DPRINT0 ("(Child process died.)\n");
- tcsetattr(STDIN_FILENO, TCSANOW, &orig_term);
- exit (0);
-}
-
-volatile int propagate_sigwinch = 0;
-
-/* sigwinch_handler
- * propagate window size changes from input file descriptor to
- * master side of pty.
- */
-void sigwinch_handler(int signal) {
- propagate_sigwinch = 1;
-}
-
-/* get_master_pty() takes a double-indirect character pointer in which
- * to put a slave name, and returns an integer file descriptor.
- * If it returns < 0, an error has occurred.
- * Otherwise, it has returned the master pty file descriptor, and fills
- * in *name with the name of the corresponding slave pty.
- * Once the slave pty has been opened, you are responsible to free *name.
- */
-
-int get_master_pty(char **name) {
- int i, j;
- /* default to returning error */
- int master = -1;
-
- /* create a dummy name to fill in */
- *name = strdup("/dev/ptyXX");
-
- /* search for an unused pty */
- for (i=0; i<16 && master <= 0; i++) {
- for (j=0; j<16 && master <= 0; j++) {
- (*name)[5] = 'p';
- (*name)[8] = "pqrstuvwxyzPQRST"[i];
- (*name)[9] = "0123456789abcdef"[j];
- /* open the master pty */
- if ((master = open(*name, O_RDWR)) < 0) {
- if (errno == ENOENT) {
- /* we are out of pty devices */
- free (*name);
- return (master);
- }
- }
- else {
- /* By substituting a letter, we change the master pty
- * name into the slave pty name.
- */
- (*name)[5] = 't';
- if (access(*name, R_OK|W_OK) != 0)
- {
- close(master);
- master = -1;
- }
- }
- }
- }
- if ((master < 0) && (i == 16) && (j == 16)) {
- /* must have tried every pty unsuccessfully */
- free (*name);
- return (master);
- }
-
- (*name)[5] = 't';
-
- return (master);
-}
-
-/* get_slave_pty() returns an integer file descriptor.
- * If it returns < 0, an error has occurred.
- * Otherwise, it has returned the slave file descriptor.
- */
-
-int get_slave_pty(char *name) {
- struct group *gptr;
- gid_t gid;
- int slave = -1;
-
- /* chown/chmod the corresponding pty, if possible.
- * This will only work if the process has root permissions.
- * Alternatively, write and exec a small setuid program that
- * does just this.
- */
- if ((gptr = getgrnam("tty")) != 0) {
- gid = gptr->gr_gid;
- } else {
- /* if the tty group does not exist, don't change the
- * group on the slave pty, only the owner
- */
- gid = -1;
- }
-
- /* Note that we do not check for errors here. If this is code
- * where these actions are critical, check for errors!
- */
- chown(name, getuid(), gid);
- /* This code only makes the slave read/writeable for the user.
- * If this is for an interactive shell that will want to
- * receive "write" and "wall" messages, OR S_IWGRP into the
- * second argument below.
- */
- chmod(name, S_IRUSR|S_IWUSR);
-
- /* open the corresponding slave pty */
- slave = open(name, O_RDWR);
- return (slave);
-}
-
-/* Certain special characters, such as ctrl/C, we want to pass directly
- to the inferior, rather than letting readline handle them. */
-
-static char special_chars[20];
-static int special_chars_count;
-
-static void
-add_special_char(int ch)
-{
- if (ch != 0)
- special_chars[special_chars_count++] = ch;
-}
-
-static int eof_char;
-
-static int
-is_special_char(int ch)
-{
- int i;
-#if 0
- if (ch == eof_char && rl_point == rl_end)
- return 1;
-#endif
- for (i = special_chars_count; --i >= 0; )
- if (special_chars[i] == ch)
- return 1;
- return 0;
-}
-
-static char buf[1024];
-/* buf[0 .. buf_count-1] is the what has been emitted on the current line.
- It is used as the readline prompt. */
-static int buf_count = 0;
-
-int num_keys = 0;
-
-static void
-null_prep_terminal (int meta)
-{
-}
-
-static void
-null_deprep_terminal ()
-{
-}
-
-char pending_special_char;
-
-static void
-line_handler (char *line)
-{
- if (line == NULL)
- {
- char buf[1];
- DPRINT0("saw eof!\n");
- buf[0] = '\004'; /* ctrl/d */
- write (out_to_inferior_fd, buf, 1);
- }
- else
- {
- static char enter[] = "\r";
- /* Send line to inferior: */
- int length = strlen (line);
- if (length > ECHO_SUPPRESS_MAX-2)
- {
- echo_suppress_start = 0;
- echo_suppress_limit = 0;
- }
- else
- {
- if (echo_suppress_limit + length > ECHO_SUPPRESS_MAX - 2)
- {
- if (echo_suppress_limit - echo_suppress_start + length
- <= ECHO_SUPPRESS_MAX - 2)
- {
- memmove (echo_suppress_buffer,
- echo_suppress_buffer + echo_suppress_start,
- echo_suppress_limit - echo_suppress_start);
- echo_suppress_limit -= echo_suppress_start;
- echo_suppress_start = 0;
- }
- else
- {
- echo_suppress_limit = 0;
- }
- echo_suppress_start = 0;
- }
- memcpy (echo_suppress_buffer + echo_suppress_limit,
- line, length);
- echo_suppress_limit += length;
- echo_suppress_buffer[echo_suppress_limit++] = '\r';
- echo_suppress_buffer[echo_suppress_limit++] = '\n';
- }
- write (out_to_inferior_fd, line, length);
- if (pending_special_char == 0)
- {
- write (out_to_inferior_fd, enter, sizeof(enter)-1);
- if (*line)
- add_history (line);
- }
- free (line);
- }
- rl_callback_handler_remove ();
- buf_count = 0;
- num_keys = 0;
- if (pending_special_char != 0)
- {
- write (out_to_inferior_fd, &pending_special_char, 1);
- pending_special_char = 0;
- }
-}
-
-/* Value of rl_getc_function.
- Use this because readline should read from stdin, not rl_instream,
- points to the pty (so readline has monitor its terminal modes). */
-
-int
-my_rl_getc (FILE *dummy)
-{
- int ch = rl_getc (stdin);
- if (is_special_char (ch))
- {
- pending_special_char = ch;
- return '\r';
- }
- return ch;
-}
-
-static void
-usage()
-{
- fprintf (stderr, "%s: usage: %s [-l filename] [-a] [-n appname] [-hv] [command [arguments...]]\n",
- progname, progname);
-}
-
-int
-main(int argc, char** argv)
-{
- char *path;
- int i, append;
- int master;
- char *name, *logfname, *appname;
- int in_from_tty_fd;
- struct sigaction act;
- struct winsize ws;
- struct termios t;
- int maxfd;
- fd_set in_set;
- static char empty_string[1] = "";
- char *prompt = empty_string;
- int ioctl_err = 0;
-
- if ((progname = strrchr (argv[0], '/')) == 0)
- progname = argv[0];
- else
- progname++;
- progversion = RL_LIBRARY_VERSION;
-
- append = 0;
- appname = APPLICATION_NAME;
- logfname = (char *)NULL;
-
- while ((i = getopt (argc, argv, "ahl:n:v")) != EOF)
- {
- switch (i)
- {
- case 'l':
- logfname = optarg;
- break;
- case 'n':
- appname = optarg;
- break;
- case 'a':
- append = 1;
- break;
- case 'h':
- usage ();
- exit (0);
- case 'v':
- fprintf (stderr, "%s version %s\n", progname, progversion);
- exit (0);
- default:
- usage ();
- exit (2);
- }
- }
-
- argc -= optind;
- argv += optind;
-
- if (logfname)
- {
- logfile = fopen (logfname, append ? "a" : "w");
- if (logfile == 0)
- fprintf (stderr, "%s: warning: could not open log file %s: %s\n",
- progname, logfname, strerror (errno));
- }
-
- rl_readline_name = appname;
-
-#ifdef DEBUG
- debugfile = fopen("LOG", "w");
-#endif
-
- if ((master = get_master_pty(&name)) < 0)
- {
- perror("ptypair: could not open master pty");
- exit(1);
- }
-
- DPRINT1("pty name: '%s'\n", name);
-
- /* set up SIGWINCH handler */
- act.sa_handler = sigwinch_handler;
- sigemptyset(&(act.sa_mask));
- act.sa_flags = 0;
- if (sigaction(SIGWINCH, &act, NULL) < 0)
- {
- perror("ptypair: could not handle SIGWINCH ");
- exit(1);
- }
-
- if (ioctl(STDIN_FILENO, TIOCGWINSZ, &ws) < 0)
- {
- perror("ptypair: could not get window size");
- exit(1);
- }
-
- if ((child = fork()) < 0)
- {
- perror("cannot fork");
- exit(1);
- }
-
- if (child == 0)
- {
- int slave; /* file descriptor for slave pty */
-
- /* We are in the child process */
- close(master);
-
-#ifdef TIOCSCTTY
- if ((slave = get_slave_pty(name)) < 0)
- {
- perror("ptypair: could not open slave pty");
- exit(1);
- }
- free(name);
-#endif
-
- /* We need to make this process a session group leader, because
- * it is on a new PTY, and things like job control simply will
- * not work correctly unless there is a session group leader
- * and process group leader (which a session group leader
- * automatically is). This also disassociates us from our old
- * controlling tty.
- */
- if (setsid() < 0)
- {
- perror("could not set session leader");
- }
-
- /* Tie us to our new controlling tty. */
-#ifdef TIOCSCTTY
- if (ioctl(slave, TIOCSCTTY, NULL))
- {
- perror("could not set new controlling tty");
- }
-#else
- if ((slave = get_slave_pty(name)) < 0)
- {
- perror("ptypair: could not open slave pty");
- exit(1);
- }
- free(name);
-#endif
-
- /* make slave pty be standard in, out, and error */
- dup2(slave, STDIN_FILENO);
- dup2(slave, STDOUT_FILENO);
- dup2(slave, STDERR_FILENO);
-
- /* at this point the slave pty should be standard input */
- if (slave > 2)
- {
- close(slave);
- }
-
- /* Try to restore window size; failure isn't critical */
- if (ioctl(STDOUT_FILENO, TIOCSWINSZ, &ws) < 0)
- {
- perror("could not restore window size");
- }
-
- /* now start the shell */
- {
- static char* command_args[] = { COMMAND_ARGS, NULL };
- if (argc < 1)
- execvp(COMMAND, command_args);
- else
- execvp(argv[0], &argv[0]);
- }
-
- /* should never be reached */
- exit(1);
- }
-
- /* parent */
- signal (SIGCHLD, sig_child);
- free(name);
-
- /* Note that we only set termios settings for standard input;
- * the master side of a pty is NOT a tty.
- */
- tcgetattr(STDIN_FILENO, &orig_term);
-
- t = orig_term;
- eof_char = t.c_cc[VEOF];
- /* add_special_char(t.c_cc[VEOF]);*/
- add_special_char(t.c_cc[VINTR]);
- add_special_char(t.c_cc[VQUIT]);
- add_special_char(t.c_cc[VSUSP]);
-#if defined (VDISCARD)
- add_special_char(t.c_cc[VDISCARD]);
-#endif
-
-#if 0
- t.c_lflag |= (ICANON | ISIG | ECHO | ECHOCTL | ECHOE | \
- ECHOK | ECHOKE | ECHONL | ECHOPRT );
-#else
- t.c_lflag &= ~(ICANON | ISIG | ECHO | ECHOCTL | ECHOE | \
- ECHOK | ECHOKE | ECHONL | ECHOPRT );
-#endif
- t.c_iflag |= IGNBRK;
- t.c_cc[VMIN] = 1;
- t.c_cc[VTIME] = 0;
- tcsetattr(STDIN_FILENO, TCSANOW, &t);
- in_from_inferior_fd = master;
- out_to_inferior_fd = master;
- rl_instream = fdopen (master, "r");
- rl_getc_function = my_rl_getc;
-
- rl_prep_term_function = null_prep_terminal;
- rl_deprep_term_function = null_deprep_terminal;
- rl_callback_handler_install (prompt, line_handler);
-
-#if 1
- rl_directory_completion_hook = rlfe_directory_completion_hook;
- rl_completion_entry_function = rlfe_filename_completion_function;
-#else
- rl_directory_rewrite_hook = rlfe_directory_rewrite_hook;
-#endif
-
- in_from_tty_fd = STDIN_FILENO;
- FD_ZERO (&in_set);
- maxfd = in_from_inferior_fd > in_from_tty_fd ? in_from_inferior_fd
- : in_from_tty_fd;
- for (;;)
- {
- int num;
- FD_SET (in_from_inferior_fd, &in_set);
- FD_SET (in_from_tty_fd, &in_set);
-
- num = select(maxfd+1, &in_set, NULL, NULL, NULL);
-
- if (propagate_sigwinch)
- {
- struct winsize ws;
- if (ioctl (STDIN_FILENO, TIOCGWINSZ, &ws) >= 0)
- {
- ioctl (master, TIOCSWINSZ, &ws);
- }
- propagate_sigwinch = 0;
- continue;
- }
-
- if (num <= 0)
- {
- perror ("select");
- exit (-1);
- }
- if (FD_ISSET (in_from_tty_fd, &in_set))
- {
- extern int readline_echoing_p;
- struct termios term_master;
- int do_canon = 1;
- int ioctl_ret;
-
- DPRINT1("[tty avail num_keys:%d]\n", num_keys);
-
- /* If we can't get tty modes for the master side of the pty, we
- can't handle non-canonical-mode programs. Always assume the
- master is in canonical echo mode if we can't tell. */
- ioctl_ret = tcgetattr(master, &term_master);
-
- if (ioctl_ret >= 0)
- {
- DPRINT2 ("echo:%d, canon:%d\n",
- (term_master.c_lflag & ECHO) != 0,
- (term_master.c_lflag & ICANON) != 0);
- do_canon = (term_master.c_lflag & ICANON) != 0;
- readline_echoing_p = (term_master.c_lflag & ECHO) != 0;
- }
- else
- {
- if (ioctl_err == 0)
- DPRINT1("tcgetattr on master fd failed: errno = %d\n", errno);
- ioctl_err = 1;
- }
-
- if (do_canon == 0 && num_keys == 0)
- {
- char ch[10];
- int count = read (STDIN_FILENO, ch, sizeof(ch));
- write (out_to_inferior_fd, ch, count);
- }
- else
- {
- if (num_keys == 0)
- {
- int i;
- /* Re-install callback handler for new prompt. */
- if (prompt != empty_string)
- free (prompt);
- prompt = malloc (buf_count + 1);
- if (prompt == NULL)
- prompt = empty_string;
- else
- {
- memcpy (prompt, buf, buf_count);
- prompt[buf_count] = '\0';
- DPRINT1("New prompt '%s'\n", prompt);
-#if 0 /* ifdef HAVE_RL_ALREADY_PROMPTED -- doesn't work */
- rl_already_prompted = buf_count > 0;
-#else
- if (buf_count > 0)
- write (1, "\r", 1);
-#endif
- }
- rl_callback_handler_install (prompt, line_handler);
- }
- num_keys++;
- rl_callback_read_char ();
- }
- }
- else /* input from inferior. */
- {
- int i;
- int count;
- int old_count;
- if (buf_count > (sizeof(buf) >> 2))
- buf_count = 0;
- count = read (in_from_inferior_fd, buf+buf_count,
- sizeof(buf) - buf_count);
- if (count <= 0)
- {
- DPRINT0 ("(Connection closed by foreign host.)\n");
- tcsetattr(STDIN_FILENO, TCSANOW, &orig_term);
- exit (0);
- }
- old_count = buf_count;
-
- /* Do some minimal carriage return translation and backspace
- processing before logging the input line. */
- if (logfile)
- {
-#ifndef __GNUC__
- char *b;
-#else
- char b[count + 1];
-#endif
- int i, j;
-
-#ifndef __GNUC__
- b = malloc (count + 1);
- if (b) {
-#endif
- for (i = 0; i < count; i++)
- b[i] = buf[buf_count + i];
- b[i] = '\0';
- for (i = j = 0; i <= count; i++)
- {
- if (b[i] == '\r')
- {
- if (b[i+1] != '\n')
- b[j++] = '\n';
- }
- else if (b[i] == '\b')
- {
- if (i)
- j--;
- }
- else
- b[j++] = b[i];
- }
- fprintf (logfile, "%s", b);
-
-#ifndef __GNUC__
- free (b);
- }
-#endif
- }
-
- /* Look for any pending echo that we need to suppress. */
- while (echo_suppress_start < echo_suppress_limit
- && count > 0
- && buf[buf_count] == echo_suppress_buffer[echo_suppress_start])
- {
- count--;
- buf_count++;
- echo_suppress_start++;
- }
-
- /* Write to the terminal anything that was not suppressed. */
- if (count > 0)
- write (1, buf + buf_count, count);
-
- /* Finally, look for a prompt candidate.
- * When we get around to going input (from the keyboard),
- * we will consider the prompt to be anything since the last
- * line terminator. So we need to save that text in the
- * initial part of buf. However, anything before the
- * most recent end-of-line is not interesting. */
- buf_count += count;
-#if 1
- for (i = buf_count; --i >= old_count; )
-#else
- for (i = buf_count - 1; i-- >= buf_count - count; )
-#endif
- {
- if (buf[i] == '\n' || buf[i] == '\r')
- {
- i++;
- memmove (buf, buf+i, buf_count - i);
- buf_count -= i;
- break;
- }
- }
- DPRINT2("-> i: %d, buf_count: %d\n", i, buf_count);
- }
- }
-}
-
-/*
- *
- * FILENAME COMPLETION FOR RLFE
- *
- */
-
-#ifndef PATH_MAX
-# define PATH_MAX 1024
-#endif
-
-#define DIRSEP '/'
-#define ISDIRSEP(x) ((x) == '/')
-#define PATHSEP(x) (ISDIRSEP(x) || (x) == 0)
-
-#define DOT_OR_DOTDOT(x) \
- ((x)[0] == '.' && (PATHSEP((x)[1]) || \
- ((x)[1] == '.' && PATHSEP((x)[2]))))
-
-#define FREE(x) if (x) free(x)
-
-#define STRDUP(s, x) do { \
- s = strdup (x);\
- if (s == 0) \
- return ((char *)NULL); \
- } while (0)
-
-static int
-get_inferior_cwd (path, psize)
- char *path;
- size_t psize;
-{
- int n;
- static char procfsbuf[PATH_MAX] = { '\0' };
-
- if (procfsbuf[0] == '\0')
- sprintf (procfsbuf, "/proc/%d/cwd", (int)child);
- n = readlink (procfsbuf, path, psize);
- if (n < 0)
- return n;
- if (n > psize)
- return -1;
- path[n] = '\0';
- return n;
-}
-
-static int
-rlfe_directory_rewrite_hook (dirnamep)
- char **dirnamep;
-{
- char *ldirname, cwd[PATH_MAX], *retdir, *ld;
- int n, ldlen;
-
- ldirname = *dirnamep;
-
- if (*ldirname == '/')
- return 0;
-
- n = get_inferior_cwd (cwd, sizeof(cwd) - 1);
- if (n < 0)
- return 0;
- if (n == 0) /* current directory */
- {
- cwd[0] = '.';
- cwd[1] = '\0';
- n = 1;
- }
-
- /* Minimally canonicalize ldirname by removing leading `./' */
- for (ld = ldirname; *ld; )
- {
- if (ISDIRSEP (ld[0]))
- ld++;
- else if (ld[0] == '.' && PATHSEP(ld[1]))
- ld++;
- else
- break;
- }
- ldlen = (ld && *ld) ? strlen (ld) : 0;
-
- retdir = (char *)malloc (n + ldlen + 3);
- if (retdir == 0)
- return 0;
- if (ldlen)
- sprintf (retdir, "%s/%s", cwd, ld);
- else
- strcpy (retdir, cwd);
- free (ldirname);
-
- *dirnamep = retdir;
-
- DPRINT1("rl_directory_rewrite_hook returns %s\n", retdir);
- return 1;
-}
-
-/* Translate *DIRNAMEP to be relative to the inferior's CWD. Leave a trailing
- slash on the result. */
-static int
-rlfe_directory_completion_hook (dirnamep)
- char **dirnamep;
-{
- char *ldirname, *retdir;
- int n, ldlen;
-
- ldirname = *dirnamep;
-
- if (*ldirname == '/')
- return 0;
-
- n = rlfe_directory_rewrite_hook (dirnamep);
- if (n == 0)
- return 0;
-
- ldirname = *dirnamep;
- ldlen = (ldirname && *ldirname) ? strlen (ldirname) : 0;
-
- if (ldlen == 0 || ldirname[ldlen - 1] != '/')
- {
- retdir = (char *)malloc (ldlen + 3);
- if (retdir == 0)
- return 0;
- if (ldlen)
- strcpy (retdir, ldirname);
- else
- retdir[ldlen++] = '.';
- retdir[ldlen] = '/';
- retdir[ldlen+1] = '\0';
- free (ldirname);
-
- *dirnamep = retdir;
- }
-
- DPRINT1("rl_directory_completion_hook returns %s\n", retdir);
- return 1;
-}
-
-static char *
-rlfe_filename_completion_function (text, state)
- const char *text;
- int state;
-{
- static DIR *directory;
- static char *filename = (char *)NULL;
- static char *dirname = (char *)NULL, *ud = (char *)NULL;
- static int flen, udlen;
- char *temp;
- struct dirent *dentry;
-
- if (state == 0)
- {
- if (directory)
- {
- closedir (directory);
- directory = 0;
- }
- FREE (dirname);
- FREE (filename);
- FREE (ud);
-
- if (text && *text)
- STRDUP (filename, text);
- else
- {
- filename = malloc(1);
- if (filename == 0)
- return ((char *)NULL);
- filename[0] = '\0';
- }
- dirname = (text && *text) ? strdup (text) : strdup (".");
- if (dirname == 0)
- return ((char *)NULL);
-
- temp = strrchr (dirname, '/');
- if (temp)
- {
- strcpy (filename, ++temp);
- *temp = '\0';
- }
- else
- {
- dirname[0] = '.';
- dirname[1] = '\0';
- }
-
- STRDUP (ud, dirname);
- udlen = strlen (ud);
-
- rlfe_directory_completion_hook (&dirname);
-
- directory = opendir (dirname);
- flen = strlen (filename);
-
- rl_filename_completion_desired = 1;
- }
-
- dentry = 0;
- while (directory && (dentry = readdir (directory)))
- {
- if (flen == 0)
- {
- if (DOT_OR_DOTDOT(dentry->d_name) == 0)
- break;
- }
- else
- {
- if ((dentry->d_name[0] == filename[0]) &&
- (strlen (dentry->d_name) >= flen) &&
- (strncmp (filename, dentry->d_name, flen) == 0))
- break;
- }
- }
-
- if (dentry == 0)
- {
- if (directory)
- {
- closedir (directory);
- directory = 0;
- }
- FREE (dirname);
- FREE (filename);
- FREE (ud);
- dirname = filename = ud = 0;
- return ((char *)NULL);
- }
-
- if (ud == 0 || (ud[0] == '.' && ud[1] == '\0'))
- temp = strdup (dentry->d_name);
- else
- {
- temp = malloc (1 + udlen + strlen (dentry->d_name));
- strcpy (temp, ud);
- strcpy (temp + udlen, dentry->d_name);
- }
- return (temp);
-}
diff --git a/readline/examples/rltest.c b/readline/examples/rltest.c
index 99f083b2b9c..cb67bab80c5 100644
--- a/readline/examples/rltest.c
+++ b/readline/examples/rltest.c
@@ -31,6 +31,12 @@
#include <stdio.h>
#include <sys/types.h>
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+extern void exit();
+#endif
+
#ifdef READLINE_LIBRARY
# include "readline.h"
# include "history.h"
diff --git a/readline/examples/rlversion.c b/readline/examples/rlversion.c
index 53949d1e3b7..6c8687488e9 100644
--- a/readline/examples/rlversion.c
+++ b/readline/examples/rlversion.c
@@ -30,6 +30,12 @@
#include <sys/types.h>
#include "posixstat.h"
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+extern void exit();
+#endif
+
#ifdef READLINE_LIBRARY
# include "readline.h"
#else
diff --git a/readline/funmap.c b/readline/funmap.c
index fe9a1da43d7..9c760cc3475 100644
--- a/readline/funmap.c
+++ b/readline/funmap.c
@@ -131,6 +131,7 @@ static FUNMAP default_funmap[] = {
{ "tty-status", rl_tty_status },
{ "undo", rl_undo_command },
{ "universal-argument", rl_universal_argument },
+ { "unix-filename-rubout", rl_unix_filename_rubout },
{ "unix-line-discard", rl_unix_line_discard },
{ "unix-word-rubout", rl_unix_word_rubout },
{ "upcase-word", rl_upcase_word },
@@ -175,6 +176,7 @@ static FUNMAP default_funmap[] = {
{ "vi-put", rl_vi_put },
{ "vi-redo", rl_vi_redo },
{ "vi-replace", rl_vi_replace },
+ { "vi-rubout", rl_vi_rubout },
{ "vi-search", rl_vi_search },
{ "vi-search-again", rl_vi_search_again },
{ "vi-set-mark", rl_vi_set_mark },
diff --git a/readline/histexpand.c b/readline/histexpand.c
index 6c81196161d..68470146902 100644
--- a/readline/histexpand.c
+++ b/readline/histexpand.c
@@ -1,6 +1,6 @@
/* histexpand.c -- history expansion. */
-/* Copyright (C) 1989, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1989-2004 Free Software Foundation, Inc.
This file contains the GNU History Library (the Library), a set of
routines for managing the text of previously typed lines.
@@ -52,6 +52,8 @@
#define HISTORY_WORD_DELIMITERS " \t\n;&()|<>"
#define HISTORY_QUOTE_CHARACTERS "\"'`"
+#define slashify_in_quotes "\\`\"$"
+
typedef int _hist_search_func_t PARAMS((const char *, int));
extern int rl_byte_oriented; /* declared in mbutil.c */
@@ -65,6 +67,8 @@ static int subst_rhs_len;
static char *get_history_word_specifier PARAMS((char *, char *, int *));
static char *history_find_word PARAMS((char *, int));
+static int history_tokenize_word PARAMS((const char *, int));
+static char *history_substring PARAMS((const char *, int, int));
static char *quote_breaks PARAMS((char *));
@@ -202,23 +206,24 @@ get_history_event (string, caller_index, delimiting_quote)
/* Only a closing `?' or a newline delimit a substring search string. */
for (local_index = i; c = string[i]; i++)
+ {
#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- {
- int v;
- mbstate_t ps;
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ int v;
+ mbstate_t ps;
+
+ memset (&ps, 0, sizeof (mbstate_t));
+ /* These produce warnings because we're passing a const string to a
+ function that takes a non-const string. */
+ _rl_adjust_point ((char *)string, i, &ps);
+ if ((v = _rl_get_char_len ((char *)string + i, &ps)) > 1)
+ {
+ i += v - 1;
+ continue;
+ }
+ }
- memset (&ps, 0, sizeof (mbstate_t));
- /* These produce warnings because we're passing a const string to a
- function that takes a non-const string. */
- _rl_adjust_point (string, i, &ps);
- if ((v = _rl_get_char_len (string + i, &ps)) > 1)
- {
- i += v - 1;
- continue;
- }
- }
- else
#endif /* HANDLE_MULTIBYTE */
if ((!substring_okay && (whitespace (c) || c == ':' ||
(history_search_delimiter_chars && member (c, history_search_delimiter_chars)) ||
@@ -226,6 +231,7 @@ get_history_event (string, caller_index, delimiting_quote)
string[i] == '\n' ||
(substring_okay && string[i] == '?'))
break;
+ }
which = i - local_index;
temp = (char *)xmalloc (1 + which);
@@ -517,7 +523,7 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line)
char *current_line; /* for !# */
{
int i, n, starting_index;
- int substitute_globally, want_quotes, print_only;
+ int substitute_globally, subst_bywords, want_quotes, print_only;
char *event, *temp, *result, *tstr, *t, c, *word_spec;
int result_len;
#if defined (HANDLE_MULTIBYTE)
@@ -599,19 +605,25 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line)
FREE (word_spec);
/* Perhaps there are other modifiers involved. Do what they say. */
- want_quotes = substitute_globally = print_only = 0;
+ want_quotes = substitute_globally = subst_bywords = print_only = 0;
starting_index = i;
while (string[i] == ':')
{
c = string[i + 1];
- if (c == 'g')
+ if (c == 'g' || c == 'a')
{
substitute_globally = 1;
i++;
c = string[i + 1];
}
+ else if (c == 'G')
+ {
+ subst_bywords = 1;
+ i++;
+ c = string[i + 1];
+ }
switch (c)
{
@@ -683,7 +695,7 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line)
case 's':
{
char *new_event;
- int delimiter, failed, si, l_temp;
+ int delimiter, failed, si, l_temp, ws, we;
if (c == 's')
{
@@ -760,33 +772,67 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line)
}
/* Find the first occurrence of THIS in TEMP. */
- si = 0;
+ /* Substitute SUBST_RHS for SUBST_LHS in TEMP. There are three
+ cases to consider:
+
+ 1. substitute_globally == subst_bywords == 0
+ 2. substitute_globally == 1 && subst_bywords == 0
+ 3. substitute_globally == 0 && subst_bywords == 1
+
+ In the first case, we substitute for the first occurrence only.
+ In the second case, we substitute for every occurrence.
+ In the third case, we tokenize into words and substitute the
+ first occurrence of each word. */
+
+ si = we = 0;
for (failed = 1; (si + subst_lhs_len) <= l_temp; si++)
- if (STREQN (temp+si, subst_lhs, subst_lhs_len))
- {
- int len = subst_rhs_len - subst_lhs_len + l_temp;
- new_event = (char *)xmalloc (1 + len);
- strncpy (new_event, temp, si);
- strncpy (new_event + si, subst_rhs, subst_rhs_len);
- strncpy (new_event + si + subst_rhs_len,
- temp + si + subst_lhs_len,
- l_temp - (si + subst_lhs_len));
- new_event[len] = '\0';
- free (temp);
- temp = new_event;
-
- failed = 0;
-
- if (substitute_globally)
- {
- si += subst_rhs_len;
- l_temp = strlen (temp);
- substitute_globally++;
- continue;
- }
- else
- break;
- }
+ {
+ /* First skip whitespace and find word boundaries if
+ we're past the end of the word boundary we found
+ the last time. */
+ if (subst_bywords && si > we)
+ {
+ for (; temp[si] && whitespace (temp[si]); si++)
+ ;
+ ws = si;
+ we = history_tokenize_word (temp, si);
+ }
+
+ if (STREQN (temp+si, subst_lhs, subst_lhs_len))
+ {
+ int len = subst_rhs_len - subst_lhs_len + l_temp;
+ new_event = (char *)xmalloc (1 + len);
+ strncpy (new_event, temp, si);
+ strncpy (new_event + si, subst_rhs, subst_rhs_len);
+ strncpy (new_event + si + subst_rhs_len,
+ temp + si + subst_lhs_len,
+ l_temp - (si + subst_lhs_len));
+ new_event[len] = '\0';
+ free (temp);
+ temp = new_event;
+
+ failed = 0;
+
+ if (substitute_globally)
+ {
+ /* Reported to fix a bug that causes it to skip every
+ other match when matching a single character. Was
+ si += subst_rhs_len previously. */
+ si += subst_rhs_len - 1;
+ l_temp = strlen (temp);
+ substitute_globally++;
+ continue;
+ }
+ else if (subst_bywords)
+ {
+ si = we;
+ l_temp = strlen (temp);
+ continue;
+ }
+ else
+ break;
+ }
+ }
if (substitute_globally > 1)
{
@@ -879,7 +925,7 @@ history_expand (hstring, output)
char **output;
{
register int j;
- int i, r, l, passc, cc, modified, eindex, only_printing;
+ int i, r, l, passc, cc, modified, eindex, only_printing, dquote;
char *string;
/* The output string, and its length. */
@@ -942,7 +988,7 @@ history_expand (hstring, output)
/* `!' followed by one of the characters in history_no_expand_chars
is NOT an expansion. */
- for (i = 0; string[i]; i++)
+ for (i = dquote = 0; string[i]; i++)
{
#if defined (HANDLE_MULTIBYTE)
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
@@ -984,9 +1030,19 @@ history_expand (hstring, output)
else
break;
}
- /* XXX - at some point, might want to extend this to handle
- double quotes as well. */
- else if (history_quotes_inhibit_expansion && string[i] == '\'')
+ /* Shell-like quoting: allow backslashes to quote double quotes
+ inside a double-quoted string. */
+ else if (dquote && string[i] == '\\' && cc == '"')
+ i++;
+ /* More shell-like quoting: if we're paying attention to single
+ quotes and letting them quote the history expansion character,
+ then we need to pay attention to double quotes, because single
+ quotes are not special inside double-quoted strings. */
+ else if (history_quotes_inhibit_expansion && string[i] == '"')
+ {
+ dquote = 1 - dquote;
+ }
+ else if (dquote == 0 && history_quotes_inhibit_expansion && string[i] == '\'')
{
/* If this is bash, single quotes inhibit history expansion. */
i++;
@@ -999,6 +1055,7 @@ history_expand (hstring, output)
if (cc == '\'' || cc == history_expansion_char)
i++;
}
+
}
if (string[i] != history_expansion_char)
@@ -1010,7 +1067,7 @@ history_expand (hstring, output)
}
/* Extract and perform the substitution. */
- for (passc = i = j = 0; i < l; i++)
+ for (passc = dquote = i = j = 0; i < l; i++)
{
int tchar = string[i];
@@ -1061,11 +1118,16 @@ history_expand (hstring, output)
ADD_CHAR (tchar);
break;
+ case '"':
+ dquote = 1 - dquote;
+ ADD_CHAR (tchar);
+ break;
+
case '\'':
{
/* If history_quotes_inhibit_expansion is set, single quotes
inhibit history expansion. */
- if (history_quotes_inhibit_expansion)
+ if (dquote == 0 && history_quotes_inhibit_expansion)
{
int quote, slen;
@@ -1160,7 +1222,9 @@ history_expand (hstring, output)
if (only_printing)
{
+#if 0
add_history (result);
+#endif
return (2);
}
@@ -1223,7 +1287,10 @@ get_history_word_specifier (spec, from, caller_index)
if (spec[i] == '-')
first = 0;
else if (spec[i] == '^')
- first = 1;
+ {
+ first = 1;
+ i++;
+ }
else if (_rl_digit_p (spec[i]) && expecting_word_spec)
{
for (first = 0; _rl_digit_p (spec[i]); i++)
@@ -1338,7 +1405,103 @@ history_arg_extract (first, last, string)
return (result);
}
-#define slashify_in_quotes "\\`\"$"
+static int
+history_tokenize_word (string, ind)
+ const char *string;
+ int ind;
+{
+ register int i;
+ int delimiter;
+
+ i = ind;
+ delimiter = 0;
+
+ if (member (string[i], "()\n"))
+ {
+ i++;
+ return i;
+ }
+
+ if (member (string[i], "<>;&|$"))
+ {
+ int peek = string[i + 1];
+
+ if (peek == string[i] && peek != '$')
+ {
+ if (peek == '<' && string[i + 2] == '-')
+ i++;
+ i += 2;
+ return i;
+ }
+ else
+ {
+ if ((peek == '&' && (string[i] == '>' || string[i] == '<')) ||
+ (peek == '>' && string[i] == '&') ||
+ (peek == '(' && (string[i] == '>' || string[i] == '<')) || /* ) */
+ (peek == '(' && string[i] == '$')) /* ) */
+ {
+ i += 2;
+ return i;
+ }
+ }
+
+ if (string[i] != '$')
+ {
+ i++;
+ return i;
+ }
+ }
+
+ /* Get word from string + i; */
+
+ if (member (string[i], HISTORY_QUOTE_CHARACTERS))
+ delimiter = string[i++];
+
+ for (; string[i]; i++)
+ {
+ if (string[i] == '\\' && string[i + 1] == '\n')
+ {
+ i++;
+ continue;
+ }
+
+ if (string[i] == '\\' && delimiter != '\'' &&
+ (delimiter != '"' || member (string[i], slashify_in_quotes)))
+ {
+ i++;
+ continue;
+ }
+
+ if (delimiter && string[i] == delimiter)
+ {
+ delimiter = 0;
+ continue;
+ }
+
+ if (!delimiter && (member (string[i], history_word_delimiters)))
+ break;
+
+ if (!delimiter && member (string[i], HISTORY_QUOTE_CHARACTERS))
+ delimiter = string[i];
+ }
+
+ return i;
+}
+
+static char *
+history_substring (string, start, end)
+ const char *string;
+ int start, end;
+{
+ register int len;
+ register char *result;
+
+ len = end - start;
+ result = (char *)xmalloc (len + 1);
+ strncpy (result, string + start, len);
+ result[len] = '\0';
+ return result;
+}
/* Parse STRING into tokens and return an array of strings. If WIND is
not -1 and INDP is not null, we also want the word surrounding index
@@ -1351,7 +1514,6 @@ history_tokenize_internal (string, wind, indp)
{
char **result;
register int i, start, result_index, size;
- int len, delimiter;
/* If we're searching for a string that's not part of a word (e.g., " "),
make sure we set *INDP to a reasonable value. */
@@ -1362,8 +1524,6 @@ history_tokenize_internal (string, wind, indp)
exactly where the shell would split them. */
for (i = result_index = size = 0, result = (char **)NULL; string[i]; )
{
- delimiter = 0;
-
/* Skip leading whitespace. */
for (; string[i] && whitespace (string[i]); i++)
;
@@ -1371,88 +1531,30 @@ history_tokenize_internal (string, wind, indp)
return (result);
start = i;
-
- if (member (string[i], "()\n"))
- {
- i++;
- goto got_token;
- }
- if (member (string[i], "<>;&|$"))
- {
- int peek = string[i + 1];
+ i = history_tokenize_word (string, start);
- if (peek == string[i] && peek != '$')
- {
- if (peek == '<' && string[i + 2] == '-')
- i++;
- i += 2;
- goto got_token;
- }
- else
- {
- if ((peek == '&' && (string[i] == '>' || string[i] == '<')) ||
- ((peek == '>') && (string[i] == '&')) ||
- ((peek == '(') && (string[i] == '$')))
- {
- i += 2;
- goto got_token;
- }
- }
- if (string[i] != '$')
- {
- i++;
- goto got_token;
- }
- }
-
- /* Get word from string + i; */
-
- if (member (string[i], HISTORY_QUOTE_CHARACTERS))
- delimiter = string[i++];
-
- for (; string[i]; i++)
+ /* If we have a non-whitespace delimiter character (which would not be
+ skipped by the loop above), use it and any adjacent delimiters to
+ make a separate field. Any adjacent white space will be skipped the
+ next time through the loop. */
+ if (i == start && history_word_delimiters)
{
- if (string[i] == '\\' && string[i + 1] == '\n')
- {
- i++;
- continue;
- }
-
- if (string[i] == '\\' && delimiter != '\'' &&
- (delimiter != '"' || member (string[i], slashify_in_quotes)))
- {
- i++;
- continue;
- }
-
- if (delimiter && string[i] == delimiter)
- {
- delimiter = 0;
- continue;
- }
-
- if (!delimiter && (member (string[i], history_word_delimiters)))
- break;
-
- if (!delimiter && member (string[i], HISTORY_QUOTE_CHARACTERS))
- delimiter = string[i];
+ i++;
+ while (string[i] && member (string[i], history_word_delimiters))
+ i++;
}
- got_token:
-
/* If we are looking for the word in which the character at a
particular index falls, remember it. */
if (indp && wind != -1 && wind >= start && wind < i)
*indp = result_index;
- len = i - start;
if (result_index + 2 >= size)
result = (char **)xrealloc (result, ((size += 10) * sizeof (char *)));
- result[result_index] = (char *)xmalloc (1 + len);
- strncpy (result[result_index], string + start, len);
- result[result_index][len] = '\0';
- result[++result_index] = (char *)NULL;
+
+ result[result_index++] = history_substring (string, start, i);
+ result[result_index] = (char *)NULL;
}
return (result);
diff --git a/readline/histfile.c b/readline/histfile.c
index c19630dc8f3..d1e54cc4c62 100644
--- a/readline/histfile.c
+++ b/readline/histfile.c
@@ -1,6 +1,6 @@
/* histfile.c - functions to manipulate the history file. */
-/* Copyright (C) 1989, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1989-2003 Free Software Foundation, Inc.
This file contains the GNU History Library (the Library), a set of
routines for managing the text of previously typed lines.
@@ -23,8 +23,13 @@
/* The goal is to make the implementation transparent, so that you
don't have to know what data types are used, just what functions
you can call. I think I have done that. */
+
#define READLINE_LIBRARY
+#if defined (__TANDEM)
+# include <floss.h>
+#endif
+
#if defined (HAVE_CONFIG_H)
# include <config.h>
#endif
@@ -32,7 +37,7 @@
#include <stdio.h>
#include <sys/types.h>
-#ifndef _MINIX
+#if ! defined (_MINIX) && defined (HAVE_SYS_FILE_H)
# include <sys/file.h>
#endif
#include "posixstat.h"
@@ -52,7 +57,7 @@
# undef HAVE_MMAP
#endif
-#ifdef HAVE_MMAP
+#ifdef HISTORY_USE_MMAP
# include <sys/mman.h>
# ifdef MAP_FILE
@@ -67,7 +72,7 @@
# define MAP_FAILED ((void *)-1)
# endif
-#endif /* HAVE_MMAP */
+#endif /* HISTORY_USE_MMAP */
/* If we're compiling for __EMX__ (OS/2) or __CYGWIN__ (cygwin32 environment
on win 95/98/nt), we want to open files with O_BINARY mode so that there
@@ -93,6 +98,13 @@ extern int errno;
#include "rlshell.h"
#include "xmalloc.h"
+/* If non-zero, we write timestamps to the history file in history_do_write() */
+int history_write_timestamps = 0;
+
+/* Does S look like the beginning of a history timestamp entry? Placeholder
+ for more extensive tests. */
+#define HIST_TIMESTAMP_START(s) (*(s) == history_comment_char)
+
/* Return the string that should be used in the place of this
filename. This only matters when you don't specify the
filename to read_history (), or write_history (). */
@@ -151,13 +163,20 @@ read_history_range (filename, from, to)
const char *filename;
int from, to;
{
- register char *line_start, *line_end;
- char *input, *buffer, *bufend;
+ register char *line_start, *line_end, *p;
+ char *input, *buffer, *bufend, *last_ts;
int file, current_line, chars_read;
struct stat finfo;
size_t file_size;
+#if defined (EFBIG)
+ int overflow_errno = EFBIG;
+#elif defined (EOVERFLOW)
+ int overflow_errno = EOVERFLOW;
+#else
+ int overflow_errno = EIO;
+#endif
- buffer = (char *)NULL;
+ buffer = last_ts = (char *)NULL;
input = history_filename (filename);
file = open (input, O_RDONLY|O_BINARY, 0666);
@@ -169,37 +188,42 @@ read_history_range (filename, from, to)
/* check for overflow on very large files */
if (file_size != finfo.st_size || file_size + 1 < file_size)
{
-#if defined (EFBIG)
- errno = EFBIG;
-#elif defined (EOVERFLOW)
- errno = EOVERFLOW;
-#endif
+ errno = overflow_errno;
goto error_and_exit;
}
-#ifdef HAVE_MMAP
+#ifdef HISTORY_USE_MMAP
/* We map read/write and private so we can change newlines to NULs without
affecting the underlying object. */
buffer = (char *)mmap (0, file_size, PROT_READ|PROT_WRITE, MAP_RFLAGS, file, 0);
if ((void *)buffer == MAP_FAILED)
- goto error_and_exit;
+ {
+ errno = overflow_errno;
+ goto error_and_exit;
+ }
chars_read = file_size;
#else
buffer = (char *)malloc (file_size + 1);
if (buffer == 0)
- goto error_and_exit;
+ {
+ errno = overflow_errno;
+ goto error_and_exit;
+ }
chars_read = read (file, buffer, file_size);
#endif
if (chars_read < 0)
{
error_and_exit:
- chars_read = errno;
+ if (errno != 0)
+ chars_read = errno;
+ else
+ chars_read = EIO;
if (file >= 0)
close (file);
FREE (input);
-#ifndef HAVE_MMAP
+#ifndef HISTORY_USE_MMAP
FREE (buffer);
#endif
@@ -220,8 +244,12 @@ read_history_range (filename, from, to)
for (line_start = line_end = buffer; line_end < bufend && current_line < from; line_end++)
if (*line_end == '\n')
{
- current_line++;
- line_start = line_end + 1;
+ p = line_end + 1;
+ /* If we see something we think is a timestamp, continue with this
+ line. We should check more extensively here... */
+ if (HIST_TIMESTAMP_START(p) == 0)
+ current_line++;
+ line_start = p;
}
/* If there are lines left to gobble, then gobble them now. */
@@ -234,7 +262,22 @@ read_history_range (filename, from, to)
*line_end = '\0';
if (*line_start)
- add_history (line_start);
+ {
+ if (HIST_TIMESTAMP_START(line_start) == 0)
+ {
+ add_history (line_start);
+ if (last_ts)
+ {
+ add_history_time (last_ts);
+ last_ts = NULL;
+ }
+ }
+ else
+ {
+ last_ts = line_start;
+ current_line--;
+ }
+ }
current_line++;
@@ -245,7 +288,7 @@ read_history_range (filename, from, to)
}
FREE (input);
-#ifndef HAVE_MMAP
+#ifndef HISTORY_USE_MMAP
FREE (buffer);
#else
munmap (buffer, file_size);
@@ -262,7 +305,7 @@ history_truncate_file (fname, lines)
const char *fname;
int lines;
{
- char *buffer, *filename, *bp;
+ char *buffer, *filename, *bp, *bp1; /* bp1 == bp+1 */
int file, chars_read, rv;
struct stat finfo;
size_t file_size;
@@ -325,11 +368,14 @@ history_truncate_file (fname, lines)
}
/* Count backwards from the end of buffer until we have passed
- LINES lines. */
- for (bp = buffer + chars_read - 1; lines && bp > buffer; bp--)
+ LINES lines. bp1 is set funny initially. But since bp[1] can't
+ be a comment character (since it's off the end) and *bp can't be
+ both a newline and the history comment character, it should be OK. */
+ for (bp1 = bp = buffer + chars_read - 1; lines && bp > buffer; bp--)
{
- if (*bp == '\n')
+ if (*bp == '\n' && HIST_TIMESTAMP_START(bp1) == 0)
lines--;
+ bp1 = bp;
}
/* If this is the first line, then the file contains exactly the
@@ -338,11 +384,14 @@ history_truncate_file (fname, lines)
the current value of i and 0. Otherwise, write from the start of
this line until the end of the buffer. */
for ( ; bp > buffer; bp--)
- if (*bp == '\n')
- {
- bp++;
- break;
- }
+ {
+ if (*bp == '\n' && HIST_TIMESTAMP_START(bp1) == 0)
+ {
+ bp++;
+ break;
+ }
+ bp1 = bp;
+ }
/* Write only if there are more lines in the file than we want to
truncate to. */
@@ -377,9 +426,9 @@ history_do_write (filename, nelements, overwrite)
register int i;
char *output;
int file, mode, rv;
+#ifdef HISTORY_USE_MMAP
size_t cursize;
-#ifdef HAVE_MMAP
mode = overwrite ? O_RDWR|O_CREAT|O_TRUNC|O_BINARY : O_RDWR|O_APPEND|O_BINARY;
#else
mode = overwrite ? O_WRONLY|O_CREAT|O_TRUNC|O_BINARY : O_WRONLY|O_APPEND|O_BINARY;
@@ -393,7 +442,7 @@ history_do_write (filename, nelements, overwrite)
return (errno);
}
-#ifdef HAVE_MMAP
+#ifdef HISTORY_USE_MMAP
cursize = overwrite ? 0 : lseek (file, 0, SEEK_END);
#endif
@@ -411,10 +460,18 @@ history_do_write (filename, nelements, overwrite)
the_history = history_list ();
/* Calculate the total number of bytes to write. */
for (buffer_size = 0, i = history_length - nelements; i < history_length; i++)
- buffer_size += 1 + strlen (the_history[i]->line);
+#if 0
+ buffer_size += 2 + HISTENT_BYTES (the_history[i]);
+#else
+ {
+ if (history_write_timestamps && the_history[i]->timestamp && the_history[i]->timestamp[0])
+ buffer_size += strlen (the_history[i]->timestamp) + 1;
+ buffer_size += strlen (the_history[i]->line) + 1;
+ }
+#endif
/* Allocate the buffer, and fill it. */
-#ifdef HAVE_MMAP
+#ifdef HISTORY_USE_MMAP
if (ftruncate (file, buffer_size+cursize) == -1)
goto mmap_error;
buffer = (char *)mmap (0, buffer_size, PROT_READ|PROT_WRITE, MAP_WFLAGS, file, cursize);
@@ -439,12 +496,18 @@ mmap_error:
for (j = 0, i = history_length - nelements; i < history_length; i++)
{
+ if (history_write_timestamps && the_history[i]->timestamp && the_history[i]->timestamp[0])
+ {
+ strcpy (buffer + j, the_history[i]->timestamp);
+ j += strlen (the_history[i]->timestamp);
+ buffer[j++] = '\n';
+ }
strcpy (buffer + j, the_history[i]->line);
j += strlen (the_history[i]->line);
buffer[j++] = '\n';
}
-#ifdef HAVE_MMAP
+#ifdef HISTORY_USE_MMAP
if (msync (buffer, buffer_size, 0) != 0 || munmap (buffer, buffer_size) != 0)
rv = errno;
#else
diff --git a/readline/history.c b/readline/history.c
index 4242f33efe1..a538f91c0d7 100644
--- a/readline/history.c
+++ b/readline/history.c
@@ -1,6 +1,6 @@
-/* History.c -- standalone history library */
+/* history.c -- standalone history library */
-/* Copyright (C) 1989, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1989-2005 Free Software Foundation, Inc.
This file contains the GNU History Library (the Library), a set of
routines for managing the text of previously typed lines.
@@ -52,6 +52,8 @@
/* The number of slots to increase the_history by. */
#define DEFAULT_HISTORY_GROW_SIZE 50
+static char *hist_inittime PARAMS((void));
+
/* **************************************************************** */
/* */
/* History Functions */
@@ -123,14 +125,15 @@ using_history ()
}
/* Return the number of bytes that the primary history entries are using.
- This just adds up the lengths of the_history->lines. */
+ This just adds up the lengths of the_history->lines and the associated
+ timestamps. */
int
history_total_bytes ()
{
register int i, result;
for (i = result = 0; the_history && the_history[i]; i++)
- result += strlen (the_history[i]->line);
+ result += HISTENT_BYTES (the_history[i]);
return (result);
}
@@ -201,11 +204,45 @@ history_get (offset)
int local_index;
local_index = offset - history_base;
- return (local_index >= history_length || local_index < 0 || !the_history)
+ return (local_index >= history_length || local_index < 0 || the_history == 0)
? (HIST_ENTRY *)NULL
: the_history[local_index];
}
+time_t
+history_get_time (hist)
+ HIST_ENTRY *hist;
+{
+ char *ts;
+ time_t t;
+
+ if (hist == 0 || hist->timestamp == 0)
+ return 0;
+ ts = hist->timestamp;
+ if (ts[0] != history_comment_char)
+ return 0;
+ t = (time_t) atol (ts + 1); /* XXX - should use strtol() here */
+ return t;
+}
+
+static char *
+hist_inittime ()
+{
+ time_t t;
+ char ts[64], *ret;
+
+ t = (time_t) time ((time_t *)0);
+#if defined (HAVE_VSNPRINTF) /* assume snprintf if vsnprintf exists */
+ snprintf (ts, sizeof (ts) - 1, "X%lu", (unsigned long) t);
+#else
+ sprintf (ts, "X%lu", (unsigned long) t);
+#endif
+ ret = savestring (ts);
+ ret[0] = history_comment_char;
+
+ return ret;
+}
+
/* Place STRING at the end of the history list. The data field
is set to NULL. */
void
@@ -225,10 +262,7 @@ add_history (string)
/* If there is something in the slot, then remove it. */
if (the_history[0])
- {
- free (the_history[0]->line);
- free (the_history[0]);
- }
+ (void) free_history_entry (the_history[0]);
/* Copy the rest of the entries, moving down one slot. */
for (i = 0; i < history_length; i++)
@@ -260,10 +294,41 @@ add_history (string)
temp->line = savestring (string);
temp->data = (char *)NULL;
+ temp->timestamp = hist_inittime ();
+
the_history[history_length] = (HIST_ENTRY *)NULL;
the_history[history_length - 1] = temp;
}
+/* Change the time stamp of the most recent history entry to STRING. */
+void
+add_history_time (string)
+ const char *string;
+{
+ HIST_ENTRY *hs;
+
+ hs = the_history[history_length - 1];
+ FREE (hs->timestamp);
+ hs->timestamp = savestring (string);
+}
+
+/* Free HIST and return the data so the calling application can free it
+ if necessary and desired. */
+histdata_t
+free_history_entry (hist)
+ HIST_ENTRY *hist;
+{
+ histdata_t x;
+
+ if (hist == 0)
+ return ((histdata_t) 0);
+ FREE (hist->line);
+ FREE (hist->timestamp);
+ x = hist->data;
+ free (hist);
+ return (x);
+}
+
/* Make the history entry at WHICH have LINE and DATA. This returns
the old entry so you can dispose of the data. In the case of an
invalid WHICH, a NULL pointer is returned. */
@@ -275,7 +340,7 @@ replace_history_entry (which, line, data)
{
HIST_ENTRY *temp, *old_value;
- if (which >= history_length)
+ if (which < 0 || which >= history_length)
return ((HIST_ENTRY *)NULL);
temp = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY));
@@ -283,6 +348,7 @@ replace_history_entry (which, line, data)
temp->line = savestring (line);
temp->data = data;
+ temp->timestamp = savestring (old_value->timestamp);
the_history[which] = temp;
return (old_value);
@@ -298,17 +364,15 @@ remove_history (which)
HIST_ENTRY *return_value;
register int i;
- if (which >= history_length || !history_length)
- return_value = (HIST_ENTRY *)NULL;
- else
- {
- return_value = the_history[which];
+ if (which < 0 || which >= history_length || history_length == 0 || the_history == 0)
+ return ((HIST_ENTRY *)NULL);
- for (i = which; i < history_length; i++)
- the_history[i] = the_history[i + 1];
+ return_value = the_history[which];
- history_length--;
- }
+ for (i = which; i < history_length; i++)
+ the_history[i] = the_history[i + 1];
+
+ history_length--;
return (return_value);
}
@@ -327,10 +391,7 @@ stifle_history (max)
{
/* This loses because we cannot free the data. */
for (i = 0, j = history_length - max; i < j; i++)
- {
- free (the_history[i]->line);
- free (the_history[i]);
- }
+ free_history_entry (the_history[i]);
history_base = i;
for (j = 0, i = history_length - max; j < max; i++, j++)
@@ -372,8 +433,7 @@ clear_history ()
/* This loses because we cannot free the data. */
for (i = 0; i < history_length; i++)
{
- free (the_history[i]->line);
- free (the_history[i]);
+ free_history_entry (the_history[i]);
the_history[i] = (HIST_ENTRY *)NULL;
}
diff --git a/readline/history.h b/readline/history.h
index 58b5de4655f..14ca2a996c7 100644
--- a/readline/history.h
+++ b/readline/history.h
@@ -1,5 +1,5 @@
-/* History.h -- the names of functions that you can call in history. */
-/* Copyright (C) 1989, 1992 Free Software Foundation, Inc.
+/* history.h -- the names of functions that you can call in history. */
+/* Copyright (C) 1989-2003 Free Software Foundation, Inc.
This file contains the GNU History Library (the Library), a set of
routines for managing the text of previously typed lines.
@@ -26,6 +26,8 @@
extern "C" {
#endif
+#include <time.h> /* XXX - for history timestamp code */
+
#if defined READLINE_LIBRARY
# include "rlstdc.h"
# include "rltypedefs.h"
@@ -43,9 +45,13 @@ typedef char *histdata_t;
/* The structure used to store a history entry. */
typedef struct _hist_entry {
char *line;
+ char *timestamp; /* char * rather than time_t for read/write */
histdata_t data;
} HIST_ENTRY;
+/* Size of the history-library-managed space in history entry HS. */
+#define HISTENT_BYTES(hs) (strlen ((hs)->line) + strlen ((hs)->timestamp))
+
/* A structure used to pass the current state of the history stuff around. */
typedef struct _hist_state {
HIST_ENTRY **entries; /* Pointer to the entries themselves. */
@@ -76,11 +82,19 @@ extern void history_set_history_state PARAMS((HISTORY_STATE *));
The associated data field (if any) is set to NULL. */
extern void add_history PARAMS((const char *));
+/* Change the timestamp associated with the most recent history entry to
+ STRING. */
+extern void add_history_time PARAMS((const char *));
+
/* A reasonably useless function, only here for completeness. WHICH
is the magic number that tells us which element to delete. The
elements are numbered from 0. */
extern HIST_ENTRY *remove_history PARAMS((int));
+/* Free the history entry H and return any application-specific data
+ associated with it. */
+extern histdata_t free_history_entry PARAMS((HIST_ENTRY *));
+
/* Make the history entry at WHICH have LINE and DATA. This returns
the old entry so you can dispose of the data. In the case of an
invalid WHICH, a NULL pointer is returned. */
@@ -119,6 +133,10 @@ extern HIST_ENTRY *current_history PARAMS((void));
array. OFFSET is relative to history_base. */
extern HIST_ENTRY *history_get PARAMS((int));
+/* Return the timestamp associated with the HIST_ENTRY * passed as an
+ argument */
+extern time_t history_get_time PARAMS((HIST_ENTRY *));
+
/* Return the number of bytes that the primary history entries are using.
This just adds up the lengths of the_history->lines. */
extern int history_total_bytes PARAMS((void));
@@ -231,6 +249,8 @@ extern char *history_no_expand_chars;
extern char *history_search_delimiter_chars;
extern int history_quotes_inhibit_expansion;
+extern int history_write_timestamps;
+
/* Backwards compatibility */
extern int max_input_history;
diff --git a/readline/histsearch.c b/readline/histsearch.c
index d94fd6cd9c6..1cc5875a4b4 100644
--- a/readline/histsearch.c
+++ b/readline/histsearch.c
@@ -77,11 +77,11 @@ history_search_internal (string, direction, anchored)
if (string == 0 || *string == '\0')
return (-1);
- if (!history_length || ((i == history_length) && !reverse))
+ if (!history_length || ((i >= history_length) && !reverse))
return (-1);
- if (reverse && (i == history_length))
- i--;
+ if (reverse && (i >= history_length))
+ i = history_length - 1;
#define NEXT_LINE() do { if (reverse) i--; else i++; } while (0)
diff --git a/readline/input.c b/readline/input.c
index 9120dfa8a8d..9f8905384d2 100644
--- a/readline/input.c
+++ b/readline/input.c
@@ -1,6 +1,6 @@
/* input.c -- character input functions for readline. */
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -21,6 +21,10 @@
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#define READLINE_LIBRARY
+#if defined (__TANDEM)
+# include <floss.h>
+#endif
+
#if defined (HAVE_CONFIG_H)
# include <config.h>
#endif
@@ -154,6 +158,12 @@ _rl_unget_char (key)
return (0);
}
+int
+_rl_pushed_input_available ()
+{
+ return (push_index != pop_index);
+}
+
/* If a character is available to be read, then read it and stuff it into
IBUFFER. Otherwise, just return. Returns number of characters read
(0 if none available) and -1 on error (EIO). */
@@ -162,7 +172,7 @@ rl_gather_tyi ()
{
int tty;
register int tem, result;
- int chars_avail;
+ int chars_avail, k;
char input;
#if defined(HAVE_SELECT)
fd_set readfds, exceptfds;
@@ -202,9 +212,24 @@ rl_gather_tyi ()
fcntl (tty, F_SETFL, tem);
if (chars_avail == -1 && errno == EAGAIN)
return 0;
+ if (chars_avail == 0) /* EOF */
+ {
+ rl_stuff_char (EOF);
+ return (0);
+ }
}
#endif /* O_NDELAY */
+#if defined (__MINGW32__)
+ /* We use getch to read console input, so use the same
+ mechanism to check for more. Otherwise, we don't know. */
+ if (isatty (fileno (rl_instream)))
+ chars_avail = _kbhit ();
+ else
+ chars_avail = 0;
+ result = 0;
+#endif
+
/* If there's nothing available, don't waste time trying to read
something. */
if (chars_avail <= 0)
@@ -225,7 +250,12 @@ rl_gather_tyi ()
if (result != -1)
{
while (chars_avail--)
- rl_stuff_char ((*rl_getc_function) (rl_instream));
+ {
+ k = (*rl_getc_function) (rl_instream);
+ rl_stuff_char (k);
+ if (k == NEWLINE || k == RETURN)
+ break;
+ }
}
else
{
@@ -285,6 +315,13 @@ _rl_input_available ()
#endif
+#if defined (__MINGW32__)
+ /* We use getch to read console input, so use the same
+ mechanism to check for more. Otherwise, we don't know. */
+ if (isatty (fileno (rl_instream)))
+ return _kbhit ();
+#endif
+
return 0;
}
@@ -424,12 +461,9 @@ rl_getc (stream)
while (1)
{
-#ifdef __MINGW32__
- /* On Windows, use a special routine to read a single character
- from the console. (Otherwise, no characters are available
- until the user hits the return key.) */
+#if defined (__MINGW32__)
if (isatty (fileno (stream)))
- return getch ();
+ return (getch ());
#endif
result = read (fileno (stream), &c, sizeof (unsigned char));
@@ -506,6 +540,12 @@ _rl_read_mbchar (mbchar, size)
ps = ps_back;
continue;
}
+ else if (mbchar_bytes_length == 0)
+ {
+ mbchar[0] = '\0'; /* null wide character */
+ mb_len = 1;
+ break;
+ }
else if (mbchar_bytes_length > (size_t)(0))
break;
}
diff --git a/readline/isearch.c b/readline/isearch.c
index c1ea5b30852..d7d8520ed85 100644
--- a/readline/isearch.c
+++ b/readline/isearch.c
@@ -4,7 +4,7 @@
/* */
/* **************************************************************** */
-/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file contains the Readline Library (the Library), a set of
routines for providing Emacs style line input to programs that ask
@@ -56,12 +56,17 @@
/* Variables exported to other files in the readline library. */
char *_rl_isearch_terminators = (char *)NULL;
+_rl_search_cxt *_rl_iscxt = 0;
+
/* Variables imported from other files in the readline library. */
extern HIST_ENTRY *_rl_saved_line_for_history;
-/* Forward declarations */
static int rl_search_history PARAMS((int, int));
+static _rl_search_cxt *_rl_isearch_init PARAMS((int));
+static void _rl_isearch_fini PARAMS((_rl_search_cxt *));
+static int _rl_isearch_cleanup PARAMS((_rl_search_cxt *, int));
+
/* Last line found by the current incremental search, so we don't `find'
identical lines many times in a row. */
static char *prev_line_found;
@@ -72,6 +77,57 @@ static int last_isearch_string_len;
static char *default_isearch_terminators = "\033\012";
+_rl_search_cxt *
+_rl_scxt_alloc (type, flags)
+ int type, flags;
+{
+ _rl_search_cxt *cxt;
+
+ cxt = (_rl_search_cxt *)xmalloc (sizeof (_rl_search_cxt));
+
+ cxt->type = type;
+ cxt->sflags = flags;
+
+ cxt->search_string = 0;
+ cxt->search_string_size = cxt->search_string_index = 0;
+
+ cxt->lines = 0;
+ cxt->allocated_line = 0;
+ cxt->hlen = cxt->hindex = 0;
+
+ cxt->save_point = rl_point;
+ cxt->save_mark = rl_mark;
+ cxt->save_line = where_history ();
+ cxt->last_found_line = cxt->save_line;
+ cxt->prev_line_found = 0;
+
+ cxt->save_undo_list = 0;
+
+ cxt->history_pos = 0;
+ cxt->direction = 0;
+
+ cxt->lastc = 0;
+
+ cxt->sline = 0;
+ cxt->sline_len = cxt->sline_index = 0;
+
+ cxt->search_terminators = 0;
+
+ return cxt;
+}
+
+void
+_rl_scxt_dispose (cxt, flags)
+ _rl_search_cxt *cxt;
+ int flags;
+{
+ FREE (cxt->search_string);
+ FREE (cxt->allocated_line);
+ FREE (cxt->lines);
+
+ free (cxt);
+}
+
/* Search backwards through the history looking for a string which is typed
interactively. Start with the current line. */
int
@@ -92,7 +148,7 @@ rl_forward_search_history (sign, key)
/* Display the current state of the search in the echo-area.
SEARCH_STRING contains the string that is being searched for,
- DIRECTION is zero for forward, or 1 for reverse,
+ DIRECTION is zero for forward, or non-zero for reverse,
WHERE is the history list number of the current line. If it is
-1, then this line is the starting one. */
static void
@@ -140,66 +196,23 @@ rl_display_search (search_string, reverse_p, where)
(*rl_redisplay_function) ();
}
-/* Search through the history looking for an interactively typed string.
- This is analogous to i-search. We start the search in the current line.
- DIRECTION is which direction to search; >= 0 means forward, < 0 means
- backwards. */
-static int
-rl_search_history (direction, invoking_key)
- int direction, invoking_key;
+static _rl_search_cxt *
+_rl_isearch_init (direction)
+ int direction;
{
- /* The string that the user types in to search for. */
- char *search_string;
-
- /* The current length of SEARCH_STRING. */
- int search_string_index;
-
- /* The amount of space that SEARCH_STRING has allocated to it. */
- int search_string_size;
-
- /* The list of lines to search through. */
- char **lines, *allocated_line;
-
- /* The length of LINES. */
- int hlen;
-
- /* Where we get LINES from. */
- HIST_ENTRY **hlist;
-
+ _rl_search_cxt *cxt;
register int i;
- int orig_point, orig_mark, orig_line, last_found_line;
- int c, found, failed, sline_len;
- int n, wstart, wlen;
-#if defined (HANDLE_MULTIBYTE)
- char mb[MB_LEN_MAX];
-#endif
-
- /* The line currently being searched. */
- char *sline;
-
- /* Offset in that line. */
- int line_index;
-
- /* Non-zero if we are doing a reverse search. */
- int reverse;
+ HIST_ENTRY **hlist;
- /* The list of characters which terminate the search, but are not
- subsequently executed. If the variable isearch-terminators has
- been set, we use that value, otherwise we use ESC and C-J. */
- char *isearch_terminators;
+ cxt = _rl_scxt_alloc (RL_SEARCH_ISEARCH, 0);
+ if (direction < 0)
+ cxt->sflags |= SF_REVERSE;
- RL_SETSTATE(RL_STATE_ISEARCH);
- orig_point = rl_point;
- orig_mark = rl_mark;
- last_found_line = orig_line = where_history ();
- reverse = direction < 0;
- hlist = history_list ();
- allocated_line = (char *)NULL;
-
- isearch_terminators = _rl_isearch_terminators ? _rl_isearch_terminators
+ cxt->search_terminators = _rl_isearch_terminators ? _rl_isearch_terminators
: default_isearch_terminators;
/* Create an arrary of pointers to the lines that we want to search. */
+ hlist = history_list ();
rl_maybe_replace_line ();
i = 0;
if (hlist)
@@ -207,354 +220,447 @@ rl_search_history (direction, invoking_key)
/* Allocate space for this many lines, +1 for the current input line,
and remember those lines. */
- lines = (char **)xmalloc ((1 + (hlen = i)) * sizeof (char *));
- for (i = 0; i < hlen; i++)
- lines[i] = hlist[i]->line;
+ cxt->lines = (char **)xmalloc ((1 + (cxt->hlen = i)) * sizeof (char *));
+ for (i = 0; i < cxt->hlen; i++)
+ cxt->lines[i] = hlist[i]->line;
if (_rl_saved_line_for_history)
- lines[i] = _rl_saved_line_for_history->line;
+ cxt->lines[i] = _rl_saved_line_for_history->line;
else
{
/* Keep track of this so we can free it. */
- allocated_line = (char *)xmalloc (1 + strlen (rl_line_buffer));
- strcpy (allocated_line, &rl_line_buffer[0]);
- lines[i] = allocated_line;
+ cxt->allocated_line = (char *)xmalloc (1 + strlen (rl_line_buffer));
+ strcpy (cxt->allocated_line, &rl_line_buffer[0]);
+ cxt->lines[i] = cxt->allocated_line;
}
- hlen++;
+ cxt->hlen++;
/* The line where we start the search. */
- i = orig_line;
+ cxt->history_pos = cxt->save_line;
rl_save_prompt ();
/* Initialize search parameters. */
- search_string = (char *)xmalloc (search_string_size = 128);
- *search_string = '\0';
- search_string_index = 0;
- prev_line_found = (char *)0; /* XXX */
+ cxt->search_string = (char *)xmalloc (cxt->search_string_size = 128);
+ cxt->search_string[cxt->search_string_index = 0] = '\0';
/* Normalize DIRECTION into 1 or -1. */
- direction = (direction >= 0) ? 1 : -1;
+ cxt->direction = (direction >= 0) ? 1 : -1;
- rl_display_search (search_string, reverse, -1);
+ cxt->sline = rl_line_buffer;
+ cxt->sline_len = strlen (cxt->sline);
+ cxt->sline_index = rl_point;
- sline = rl_line_buffer;
- sline_len = strlen (sline);
- line_index = rl_point;
+ _rl_iscxt = cxt; /* save globally */
- found = failed = 0;
- for (;;)
+ return cxt;
+}
+
+static void
+_rl_isearch_fini (cxt)
+ _rl_search_cxt *cxt;
+{
+ /* First put back the original state. */
+ strcpy (rl_line_buffer, cxt->lines[cxt->save_line]);
+
+ rl_restore_prompt ();
+
+ /* Save the search string for possible later use. */
+ FREE (last_isearch_string);
+ last_isearch_string = cxt->search_string;
+ last_isearch_string_len = cxt->search_string_index;
+ cxt->search_string = 0;
+
+ if (cxt->last_found_line < cxt->save_line)
+ rl_get_previous_history (cxt->save_line - cxt->last_found_line, 0);
+ else
+ rl_get_next_history (cxt->last_found_line - cxt->save_line, 0);
+
+ /* If the string was not found, put point at the end of the last matching
+ line. If last_found_line == orig_line, we didn't find any matching
+ history lines at all, so put point back in its original position. */
+ if (cxt->sline_index < 0)
{
- rl_command_func_t *f = (rl_command_func_t *)NULL;
+ if (cxt->last_found_line == cxt->save_line)
+ cxt->sline_index = cxt->save_point;
+ else
+ cxt->sline_index = strlen (rl_line_buffer);
+ rl_mark = cxt->save_mark;
+ }
- /* Read a key and decide how to proceed. */
- RL_SETSTATE(RL_STATE_MOREINPUT);
- c = rl_read_key ();
- RL_UNSETSTATE(RL_STATE_MOREINPUT);
+ rl_point = cxt->sline_index;
+ /* Don't worry about where to put the mark here; rl_get_previous_history
+ and rl_get_next_history take care of it. */
+
+ rl_clear_message ();
+}
+
+int
+_rl_search_getchar (cxt)
+ _rl_search_cxt *cxt;
+{
+ int c;
+
+ /* Read a key and decide how to proceed. */
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ c = cxt->lastc = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- c = _rl_read_mbstring (c, mb, MB_LEN_MAX);
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ c = cxt->lastc = _rl_read_mbstring (cxt->lastc, cxt->mb, MB_LEN_MAX);
#endif
- /* Translate the keys we do something with to opcodes. */
- if (c >= 0 && _rl_keymap[c].type == ISFUNC)
- {
- f = _rl_keymap[c].function;
-
- if (f == rl_reverse_search_history)
- c = reverse ? -1 : -2;
- else if (f == rl_forward_search_history)
- c = !reverse ? -1 : -2;
- else if (f == rl_rubout)
- c = -3;
- else if (c == CTRL ('G'))
- c = -4;
- else if (c == CTRL ('W')) /* XXX */
- c = -5;
- else if (c == CTRL ('Y')) /* XXX */
- c = -6;
- }
+ return c;
+}
- /* The characters in isearch_terminators (set from the user-settable
- variable isearch-terminators) are used to terminate the search but
- not subsequently execute the character as a command. The default
- value is "\033\012" (ESC and C-J). */
- if (strchr (isearch_terminators, c))
- {
- /* ESC still terminates the search, but if there is pending
- input or if input arrives within 0.1 seconds (on systems
- with select(2)) it is used as a prefix character
- with rl_execute_next. WATCH OUT FOR THIS! This is intended
- to allow the arrow keys to be used like ^F and ^B are used
- to terminate the search and execute the movement command.
- XXX - since _rl_input_available depends on the application-
- settable keyboard timeout value, this could alternatively
- use _rl_input_queued(100000) */
- if (c == ESC && _rl_input_available ())
- rl_execute_next (ESC);
- break;
- }
+/* Process just-read character C according to isearch context CXT. Return
+ -1 if the caller should just free the context and return, 0 if we should
+ break out of the loop, and 1 if we should continue to read characters. */
+int
+_rl_isearch_dispatch (cxt, c)
+ _rl_search_cxt *cxt;
+ int c;
+{
+ int n, wstart, wlen, limit, cval;
+ rl_command_func_t *f;
+
+ f = (rl_command_func_t *)NULL;
+
+ /* Translate the keys we do something with to opcodes. */
+ if (c >= 0 && _rl_keymap[c].type == ISFUNC)
+ {
+ f = _rl_keymap[c].function;
+
+ if (f == rl_reverse_search_history)
+ cxt->lastc = (cxt->sflags & SF_REVERSE) ? -1 : -2;
+ else if (f == rl_forward_search_history)
+ cxt->lastc = (cxt->sflags & SF_REVERSE) ? -2 : -1;
+ else if (f == rl_rubout)
+ cxt->lastc = -3;
+ else if (c == CTRL ('G'))
+ cxt->lastc = -4;
+ else if (c == CTRL ('W')) /* XXX */
+ cxt->lastc = -5;
+ else if (c == CTRL ('Y')) /* XXX */
+ cxt->lastc = -6;
+ }
+
+ /* The characters in isearch_terminators (set from the user-settable
+ variable isearch-terminators) are used to terminate the search but
+ not subsequently execute the character as a command. The default
+ value is "\033\012" (ESC and C-J). */
+ if (strchr (cxt->search_terminators, cxt->lastc))
+ {
+ /* ESC still terminates the search, but if there is pending
+ input or if input arrives within 0.1 seconds (on systems
+ with select(2)) it is used as a prefix character
+ with rl_execute_next. WATCH OUT FOR THIS! This is intended
+ to allow the arrow keys to be used like ^F and ^B are used
+ to terminate the search and execute the movement command.
+ XXX - since _rl_input_available depends on the application-
+ settable keyboard timeout value, this could alternatively
+ use _rl_input_queued(100000) */
+ if (cxt->lastc == ESC && _rl_input_available ())
+ rl_execute_next (ESC);
+ return (0);
+ }
#define ENDSRCH_CHAR(c) \
((CTRL_CHAR (c) || META_CHAR (c) || (c) == RUBOUT) && ((c) != CTRL ('G')))
#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ if (cxt->lastc >= 0 && (cxt->mb[0] && cxt->mb[1] == '\0') && ENDSRCH_CHAR (cxt->lastc))
+ {
+ /* This sets rl_pending_input to c; it will be picked up the next
+ time rl_read_key is called. */
+ rl_execute_next (cxt->lastc);
+ return (0);
+ }
+ }
+ else
+#endif
+ if (cxt->lastc >= 0 && ENDSRCH_CHAR (cxt->lastc))
+ {
+ /* This sets rl_pending_input to LASTC; it will be picked up the next
+ time rl_read_key is called. */
+ rl_execute_next (cxt->lastc);
+ return (0);
+ }
+
+ /* Now dispatch on the character. `Opcodes' affect the search string or
+ state. Other characters are added to the string. */
+ switch (cxt->lastc)
+ {
+ /* search again */
+ case -1:
+ if (cxt->search_string_index == 0)
{
- if (c >= 0 && strlen (mb) == 1 && ENDSRCH_CHAR (c))
+ if (last_isearch_string)
{
- /* This sets rl_pending_input to c; it will be picked up the next
- time rl_read_key is called. */
- rl_execute_next (c);
+ cxt->search_string_size = 64 + last_isearch_string_len;
+ cxt->search_string = (char *)xrealloc (cxt->search_string, cxt->search_string_size);
+ strcpy (cxt->search_string, last_isearch_string);
+ cxt->search_string_index = last_isearch_string_len;
+ rl_display_search (cxt->search_string, (cxt->sflags & SF_REVERSE), -1);
break;
}
+ return (1);
}
+ else if (cxt->sflags & SF_REVERSE)
+ cxt->sline_index--;
+ else if (cxt->sline_index != cxt->sline_len)
+ cxt->sline_index++;
else
-#endif
- if (c >= 0 && ENDSRCH_CHAR (c))
+ rl_ding ();
+ break;
+
+ /* switch directions */
+ case -2:
+ cxt->direction = -cxt->direction;
+ if (cxt->direction < 0)
+ cxt->sflags |= SF_REVERSE;
+ else
+ cxt->sflags &= ~SF_REVERSE;
+ break;
+
+ /* delete character from search string. */
+ case -3: /* C-H, DEL */
+ /* This is tricky. To do this right, we need to keep a
+ stack of search positions for the current search, with
+ sentinels marking the beginning and end. But this will
+ do until we have a real isearch-undo. */
+ if (cxt->search_string_index == 0)
+ rl_ding ();
+ else
+ cxt->search_string[--cxt->search_string_index] = '\0';
+ break;
+
+ case -4: /* C-G, abort */
+ rl_replace_line (cxt->lines[cxt->save_line], 0);
+ rl_point = cxt->save_point;
+ rl_mark = cxt->save_mark;
+ rl_restore_prompt();
+ rl_clear_message ();
+
+ return -1;
+
+ case -5: /* C-W */
+ /* skip over portion of line we already matched and yank word */
+ wstart = rl_point + cxt->search_string_index;
+ if (wstart >= rl_end)
{
- /* This sets rl_pending_input to c; it will be picked up the next
- time rl_read_key is called. */
- rl_execute_next (c);
+ rl_ding ();
break;
}
- switch (c)
+ /* if not in a word, move to one. */
+ cval = _rl_char_value (rl_line_buffer, wstart);
+ if (_rl_walphabetic (cval) == 0)
{
- case -1:
- if (search_string_index == 0)
- {
- if (last_isearch_string)
- {
- search_string_size = 64 + last_isearch_string_len;
- search_string = (char *)xrealloc (search_string, search_string_size);
- strcpy (search_string, last_isearch_string);
- search_string_index = last_isearch_string_len;
- rl_display_search (search_string, reverse, -1);
- break;
- }
- continue;
- }
- else if (reverse)
- --line_index;
- else if (line_index != sline_len)
- ++line_index;
- else
- rl_ding ();
+ rl_ding ();
break;
-
- /* switch directions */
- case -2:
- direction = -direction;
- reverse = direction < 0;
+ }
+ n = MB_NEXTCHAR (rl_line_buffer, wstart, 1, MB_FIND_NONZERO);;
+ while (n < rl_end)
+ {
+ cval = _rl_char_value (rl_line_buffer, n);
+ if (_rl_walphabetic (cval) == 0)
+ break;
+ n = MB_NEXTCHAR (rl_line_buffer, n, 1, MB_FIND_NONZERO);;
+ }
+ wlen = n - wstart + 1;
+ if (cxt->search_string_index + wlen + 1 >= cxt->search_string_size)
+ {
+ cxt->search_string_size += wlen + 1;
+ cxt->search_string = (char *)xrealloc (cxt->search_string, cxt->search_string_size);
+ }
+ for (; wstart < n; wstart++)
+ cxt->search_string[cxt->search_string_index++] = rl_line_buffer[wstart];
+ cxt->search_string[cxt->search_string_index] = '\0';
+ break;
+
+ case -6: /* C-Y */
+ /* skip over portion of line we already matched and yank rest */
+ wstart = rl_point + cxt->search_string_index;
+ if (wstart >= rl_end)
+ {
+ rl_ding ();
break;
+ }
+ n = rl_end - wstart + 1;
+ if (cxt->search_string_index + n + 1 >= cxt->search_string_size)
+ {
+ cxt->search_string_size += n + 1;
+ cxt->search_string = (char *)xrealloc (cxt->search_string, cxt->search_string_size);
+ }
+ for (n = wstart; n < rl_end; n++)
+ cxt->search_string[cxt->search_string_index++] = rl_line_buffer[n];
+ cxt->search_string[cxt->search_string_index] = '\0';
+ break;
+
+ /* Add character to search string and continue search. */
+ default:
+ if (cxt->search_string_index + 2 >= cxt->search_string_size)
+ {
+ cxt->search_string_size += 128;
+ cxt->search_string = (char *)xrealloc (cxt->search_string, cxt->search_string_size);
+ }
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ int j, l;
+ for (j = 0, l = strlen (cxt->mb); j < l; )
+ cxt->search_string[cxt->search_string_index++] = cxt->mb[j++];
+ }
+ else
+#endif
+ cxt->search_string[cxt->search_string_index++] = c;
+ cxt->search_string[cxt->search_string_index] = '\0';
+ break;
+ }
- /* delete character from search string. */
- case -3: /* C-H, DEL */
- /* This is tricky. To do this right, we need to keep a
- stack of search positions for the current search, with
- sentinels marking the beginning and end. But this will
- do until we have a real isearch-undo. */
- if (search_string_index == 0)
- rl_ding ();
- else
- search_string[--search_string_index] = '\0';
-
- break;
+ for (cxt->sflags &= ~(SF_FOUND|SF_FAILED);; )
+ {
+ limit = cxt->sline_len - cxt->search_string_index + 1;
- case -4: /* C-G */
- rl_replace_line (lines[orig_line], 0);
- rl_point = orig_point;
- rl_mark = orig_mark;
- rl_restore_prompt();
- rl_clear_message ();
- if (allocated_line)
- free (allocated_line);
- free (lines);
- RL_UNSETSTATE(RL_STATE_ISEARCH);
- return 0;
-
- case -5: /* C-W */
- /* skip over portion of line we already matched */
- wstart = rl_point + search_string_index;
- if (wstart >= rl_end)
+ /* Search the current line. */
+ while ((cxt->sflags & SF_REVERSE) ? (cxt->sline_index >= 0) : (cxt->sline_index < limit))
+ {
+ if (STREQN (cxt->search_string, cxt->sline + cxt->sline_index, cxt->search_string_index))
{
- rl_ding ();
+ cxt->sflags |= SF_FOUND;
break;
}
+ else
+ cxt->sline_index += cxt->direction;
+ }
+ if (cxt->sflags & SF_FOUND)
+ break;
- /* if not in a word, move to one. */
- if (rl_alphabetic(rl_line_buffer[wstart]) == 0)
- {
- rl_ding ();
- break;
- }
- n = wstart;
- while (n < rl_end && rl_alphabetic(rl_line_buffer[n]))
- n++;
- wlen = n - wstart + 1;
- if (search_string_index + wlen + 1 >= search_string_size)
- {
- search_string_size += wlen + 1;
- search_string = (char *)xrealloc (search_string, search_string_size);
- }
- for (; wstart < n; wstart++)
- search_string[search_string_index++] = rl_line_buffer[wstart];
- search_string[search_string_index] = '\0';
- break;
+ /* Move to the next line, but skip new copies of the line
+ we just found and lines shorter than the string we're
+ searching for. */
+ do
+ {
+ /* Move to the next line. */
+ cxt->history_pos += cxt->direction;
- case -6: /* C-Y */
- /* skip over portion of line we already matched */
- wstart = rl_point + search_string_index;
- if (wstart >= rl_end)
+ /* At limit for direction? */
+ if ((cxt->sflags & SF_REVERSE) ? (cxt->history_pos < 0) : (cxt->history_pos == cxt->hlen))
{
- rl_ding ();
+ cxt->sflags |= SF_FAILED;
break;
}
- n = rl_end - wstart + 1;
- if (search_string_index + n + 1 >= search_string_size)
- {
- search_string_size += n + 1;
- search_string = (char *)xrealloc (search_string, search_string_size);
- }
- for (n = wstart; n < rl_end; n++)
- search_string[search_string_index++] = rl_line_buffer[n];
- search_string[search_string_index] = '\0';
- break;
- default:
- /* Add character to search string and continue search. */
- if (search_string_index + 2 >= search_string_size)
- {
- search_string_size += 128;
- search_string = (char *)xrealloc (search_string, search_string_size);
- }
-#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- {
- int j, l;
- for (j = 0, l = strlen (mb); j < l; )
- search_string[search_string_index++] = mb[j++];
- }
- else
-#endif
- search_string[search_string_index++] = c;
- search_string[search_string_index] = '\0';
- break;
+ /* We will need these later. */
+ cxt->sline = cxt->lines[cxt->history_pos];
+ cxt->sline_len = strlen (cxt->sline);
}
+ while ((cxt->prev_line_found && STREQ (cxt->prev_line_found, cxt->lines[cxt->history_pos])) ||
+ (cxt->search_string_index > cxt->sline_len));
- for (found = failed = 0;;)
- {
- int limit = sline_len - search_string_index + 1;
+ if (cxt->sflags & SF_FAILED)
+ break;
- /* Search the current line. */
- while (reverse ? (line_index >= 0) : (line_index < limit))
- {
- if (STREQN (search_string, sline + line_index, search_string_index))
- {
- found++;
- break;
- }
- else
- line_index += direction;
- }
- if (found)
- break;
+ /* Now set up the line for searching... */
+ cxt->sline_index = (cxt->sflags & SF_REVERSE) ? cxt->sline_len - cxt->search_string_index : 0;
+ }
- /* Move to the next line, but skip new copies of the line
- we just found and lines shorter than the string we're
- searching for. */
- do
- {
- /* Move to the next line. */
- i += direction;
-
- /* At limit for direction? */
- if (reverse ? (i < 0) : (i == hlen))
- {
- failed++;
- break;
- }
-
- /* We will need these later. */
- sline = lines[i];
- sline_len = strlen (sline);
- }
- while ((prev_line_found && STREQ (prev_line_found, lines[i])) ||
- (search_string_index > sline_len));
+ if (cxt->sflags & SF_FAILED)
+ {
+ /* We cannot find the search string. Ding the bell. */
+ rl_ding ();
+ cxt->history_pos = cxt->last_found_line;
+ return 1;
+ }
- if (failed)
- break;
+ /* We have found the search string. Just display it. But don't
+ actually move there in the history list until the user accepts
+ the location. */
+ if (cxt->sflags & SF_FOUND)
+ {
+ cxt->prev_line_found = cxt->lines[cxt->history_pos];
+ rl_replace_line (cxt->lines[cxt->history_pos], 0);
+ rl_point = cxt->sline_index;
+ cxt->last_found_line = cxt->history_pos;
+ rl_display_search (cxt->search_string, (cxt->sflags & SF_REVERSE), (cxt->history_pos == cxt->save_line) ? -1 : cxt->history_pos);
+ }
- /* Now set up the line for searching... */
- line_index = reverse ? sline_len - search_string_index : 0;
- }
+ return 1;
+}
- if (failed)
- {
- /* We cannot find the search string. Ding the bell. */
- rl_ding ();
- i = last_found_line;
- continue; /* XXX - was break */
- }
+static int
+_rl_isearch_cleanup (cxt, r)
+ _rl_search_cxt *cxt;
+ int r;
+{
+ if (r >= 0)
+ _rl_isearch_fini (cxt);
+ _rl_scxt_dispose (cxt, 0);
+ _rl_iscxt = 0;
- /* We have found the search string. Just display it. But don't
- actually move there in the history list until the user accepts
- the location. */
- if (found)
- {
- prev_line_found = lines[i];
- rl_replace_line (lines[i], 0);
- rl_point = line_index;
- last_found_line = i;
- rl_display_search (search_string, reverse, (i == orig_line) ? -1 : i);
- }
- }
+ RL_UNSETSTATE(RL_STATE_ISEARCH);
- /* The searching is over. The user may have found the string that she
- was looking for, or else she may have exited a failing search. If
- LINE_INDEX is -1, then that shows that the string searched for was
- not found. We use this to determine where to place rl_point. */
+ return (r != 0);
+}
- /* First put back the original state. */
- strcpy (rl_line_buffer, lines[orig_line]);
+/* Search through the history looking for an interactively typed string.
+ This is analogous to i-search. We start the search in the current line.
+ DIRECTION is which direction to search; >= 0 means forward, < 0 means
+ backwards. */
+static int
+rl_search_history (direction, invoking_key)
+ int direction, invoking_key;
+{
+ _rl_search_cxt *cxt; /* local for now, but saved globally */
+ int c, r;
- rl_restore_prompt ();
+ RL_SETSTATE(RL_STATE_ISEARCH);
+ cxt = _rl_isearch_init (direction);
- /* Save the search string for possible later use. */
- FREE (last_isearch_string);
- last_isearch_string = search_string;
- last_isearch_string_len = search_string_index;
+ rl_display_search (cxt->search_string, (cxt->sflags & SF_REVERSE), -1);
- if (last_found_line < orig_line)
- rl_get_previous_history (orig_line - last_found_line, 0);
- else
- rl_get_next_history (last_found_line - orig_line, 0);
+ /* If we are using the callback interface, all we do is set up here and
+ return. The key is that we leave RL_STATE_ISEARCH set. */
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ return (0);
- /* If the string was not found, put point at the end of the last matching
- line. If last_found_line == orig_line, we didn't find any matching
- history lines at all, so put point back in its original position. */
- if (line_index < 0)
+ r = -1;
+ for (;;)
{
- if (last_found_line == orig_line)
- line_index = orig_point;
- else
- line_index = strlen (rl_line_buffer);
- rl_mark = orig_mark;
+ c = _rl_search_getchar (cxt);
+ /* We might want to handle EOF here (c == 0) */
+ r = _rl_isearch_dispatch (cxt, cxt->lastc);
+ if (r <= 0)
+ break;
}
- rl_point = line_index;
- /* Don't worry about where to put the mark here; rl_get_previous_history
- and rl_get_next_history take care of it. */
-
- rl_clear_message ();
+ /* The searching is over. The user may have found the string that she
+ was looking for, or else she may have exited a failing search. If
+ LINE_INDEX is -1, then that shows that the string searched for was
+ not found. We use this to determine where to place rl_point. */
+ return (_rl_isearch_cleanup (cxt, r));
+}
- FREE (allocated_line);
- free (lines);
+#if defined (READLINE_CALLBACKS)
+/* Called from the callback functions when we are ready to read a key. The
+ callback functions know to call this because RL_ISSTATE(RL_STATE_ISEARCH).
+ If _rl_isearch_dispatch finishes searching, this function is responsible
+ for turning off RL_STATE_ISEARCH, which it does using _rl_isearch_cleanup. */
+int
+_rl_isearch_callback (cxt)
+ _rl_search_cxt *cxt;
+{
+ int c, r;
- RL_UNSETSTATE(RL_STATE_ISEARCH);
+ c = _rl_search_getchar (cxt);
+ /* We might want to handle EOF here */
+ r = _rl_isearch_dispatch (cxt, cxt->lastc);
- return 0;
+ return (r <= 0) ? _rl_isearch_cleanup (cxt, r) : 0;
}
+#endif
diff --git a/readline/keymaps.c b/readline/keymaps.c
index 12506d3aab2..70d0cc08d3f 100644
--- a/readline/keymaps.c
+++ b/readline/keymaps.c
@@ -64,11 +64,13 @@ rl_make_bare_keymap ()
keymap[i].function = (rl_command_func_t *)NULL;
}
+#if 0
for (i = 'A'; i < ('Z' + 1); i++)
{
keymap[i].type = ISFUNC;
keymap[i].function = rl_do_lowercase_version;
}
+#endif
return (keymap);
}
@@ -79,8 +81,9 @@ rl_copy_keymap (map)
Keymap map;
{
register int i;
- Keymap temp = rl_make_bare_keymap ();
+ Keymap temp;
+ temp = rl_make_bare_keymap ();
for (i = 0; i < KEYMAP_SIZE; i++)
{
temp[i].type = map[i].type;
@@ -109,12 +112,8 @@ rl_make_keymap ()
newmap[CTRL('H')].function = rl_rubout;
#if KEYMAP_SIZE > 128
- /* Printing characters in some 8-bit character sets. */
- for (i = 128; i < 160; i++)
- newmap[i].function = rl_insert;
-
- /* ISO Latin-1 printing characters should self-insert. */
- for (i = 160; i < 256; i++)
+ /* Printing characters in ISO Latin-1 and some 8-bit character sets. */
+ for (i = 128; i < 256; i++)
newmap[i].function = rl_insert;
#endif /* KEYMAP_SIZE > 128 */
diff --git a/readline/kill.c b/readline/kill.c
index a616b920d90..1d3254c3275 100644
--- a/readline/kill.c
+++ b/readline/kill.c
@@ -339,6 +339,47 @@ rl_unix_word_rubout (count, key)
if (rl_editing_mode == emacs_mode)
rl_mark = rl_point;
}
+
+ return 0;
+}
+
+/* This deletes one filename component in a Unix pathname. That is, it
+ deletes backward to directory separator (`/') or whitespace. */
+int
+rl_unix_filename_rubout (count, key)
+ int count, key;
+{
+ int orig_point, c;
+
+ if (rl_point == 0)
+ rl_ding ();
+ else
+ {
+ orig_point = rl_point;
+ if (count <= 0)
+ count = 1;
+
+ while (count--)
+ {
+ c = rl_line_buffer[rl_point - 1];
+ while (rl_point && (whitespace (c) || c == '/'))
+ {
+ rl_point--;
+ c = rl_line_buffer[rl_point - 1];
+ }
+
+ while (rl_point && (whitespace (c) == 0) && c != '/')
+ {
+ rl_point--;
+ c = rl_line_buffer[rl_point - 1];
+ }
+ }
+
+ rl_kill_text (orig_point, rl_point);
+ if (rl_editing_mode == emacs_mode)
+ rl_mark = rl_point;
+ }
+
return 0;
}
diff --git a/readline/macro.c b/readline/macro.c
index b73c3af9aa4..2975bf1f74f 100644
--- a/readline/macro.c
+++ b/readline/macro.c
@@ -100,6 +100,8 @@ _rl_with_macro_input (string)
int
_rl_next_macro_key ()
{
+ int c;
+
if (rl_executing_macro == 0)
return (0);
@@ -109,7 +111,14 @@ _rl_next_macro_key ()
return (_rl_next_macro_key ());
}
+#if defined (READLINE_CALLBACKS)
+ c = rl_executing_macro[executing_macro_index++];
+ if (RL_ISSTATE (RL_STATE_CALLBACK) && RL_ISSTATE (RL_STATE_READCMD) && rl_executing_macro[executing_macro_index] == 0)
+ _rl_pop_executing_macro ();
+ return c;
+#else
return (rl_executing_macro[executing_macro_index++]);
+#endif
}
/* Save the currently executing macro on a stack of saved macros. */
diff --git a/readline/mbutil.c b/readline/mbutil.c
index 8794d02ddca..17dde53ed7b 100644
--- a/readline/mbutil.c
+++ b/readline/mbutil.c
@@ -1,6 +1,6 @@
/* mbutil.c -- readline multibyte character utility functions */
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -77,27 +77,29 @@ _rl_find_next_mbchar_internal (string, seed, count, find_non_zero)
char *string;
int seed, count, find_non_zero;
{
- size_t tmp = 0;
+ size_t tmp;
mbstate_t ps;
- int point = 0;
+ int point;
wchar_t wc;
+ tmp = 0;
+
memset(&ps, 0, sizeof (mbstate_t));
if (seed < 0)
seed = 0;
if (count <= 0)
return seed;
- point = seed + _rl_adjust_point(string, seed, &ps);
+ point = seed + _rl_adjust_point (string, seed, &ps);
/* if this is true, means that seed was not pointed character
started byte. So correct the point and consume count */
if (seed < point)
- count --;
+ count--;
while (count > 0)
{
tmp = mbrtowc (&wc, string+point, strlen(string + point), &ps);
- if ((size_t)(tmp) == (size_t)-1 || (size_t)(tmp) == (size_t)-2)
+ if (MB_INVALIDCH ((size_t)tmp))
{
/* invalid bytes. asume a byte represents a character */
point++;
@@ -105,9 +107,8 @@ _rl_find_next_mbchar_internal (string, seed, count, find_non_zero)
/* reset states. */
memset(&ps, 0, sizeof(mbstate_t));
}
- else if (tmp == (size_t)0)
- /* found '\0' char */
- break;
+ else if (MB_NULLWCH (tmp))
+ break; /* found wide '\0' */
else
{
/* valid bytes */
@@ -127,15 +128,16 @@ _rl_find_next_mbchar_internal (string, seed, count, find_non_zero)
if (find_non_zero)
{
tmp = mbrtowc (&wc, string + point, strlen (string + point), &ps);
- while (wcwidth (wc) == 0)
+ while (tmp > 0 && wcwidth (wc) == 0)
{
point += tmp;
tmp = mbrtowc (&wc, string + point, strlen (string + point), &ps);
- if (tmp == (size_t)(0) || tmp == (size_t)(-1) || tmp == (size_t)(-2))
+ if (MB_NULLWCH (tmp) || MB_INVALIDCH (tmp))
break;
}
}
- return point;
+
+ return point;
}
static int
@@ -160,7 +162,7 @@ _rl_find_prev_mbchar_internal (string, seed, find_non_zero)
while (point < seed)
{
tmp = mbrtowc (&wc, string + point, length - point, &ps);
- if ((size_t)(tmp) == (size_t)-1 || (size_t)(tmp) == (size_t)-2)
+ if (MB_INVALIDCH ((size_t)tmp))
{
/* in this case, bytes are invalid or shorted to compose
multibyte char, so assume that the first byte represents
@@ -169,8 +171,12 @@ _rl_find_prev_mbchar_internal (string, seed, find_non_zero)
/* clear the state of the byte sequence, because
in this case effect of mbstate is undefined */
memset(&ps, 0, sizeof (mbstate_t));
+
+ /* Since we're assuming that this byte represents a single
+ non-zero-width character, don't forget about it. */
+ prev = point;
}
- else if (tmp == 0)
+ else if (MB_NULLWCH (tmp))
break; /* Found '\0' char. Can this happen? */
else
{
@@ -273,7 +279,7 @@ _rl_adjust_point(string, point, ps)
while (pos < point)
{
tmp = mbrlen (string + pos, length - pos, ps);
- if((size_t)(tmp) == (size_t)-1 || (size_t)(tmp) == (size_t)-2)
+ if (MB_INVALIDCH ((size_t)tmp))
{
/* in this case, bytes are invalid or shorted to compose
multibyte char, so assume that the first byte represents
@@ -284,7 +290,7 @@ _rl_adjust_point(string, point, ps)
if (ps)
memset (ps, 0, sizeof (mbstate_t));
}
- else if (tmp == 0)
+ else if (MB_NULLWCH (tmp))
pos++;
else
pos += tmp;
@@ -310,6 +316,28 @@ _rl_is_mbchar_matched (string, seed, end, mbchar, length)
return 0;
return 1;
}
+
+wchar_t
+_rl_char_value (buf, ind)
+ char *buf;
+ int ind;
+{
+ size_t tmp;
+ wchar_t wc;
+ mbstate_t ps;
+ int l;
+
+ if (MB_LEN_MAX == 1 || rl_byte_oriented)
+ return ((wchar_t) buf[ind]);
+ l = strlen (buf);
+ if (ind >= l - 1)
+ return ((wchar_t) buf[ind]);
+ memset (&ps, 0, sizeof (mbstate_t));
+ tmp = mbrtowc (&wc, buf + ind, l - ind, &ps);
+ if (MB_INVALIDCH (tmp) || MB_NULLWCH (tmp))
+ return ((wchar_t) buf[ind]);
+ return wc;
+}
#endif /* HANDLE_MULTIBYTE */
/* Find next `count' characters started byte point of the specified seed.
diff --git a/readline/misc.c b/readline/misc.c
index f3775d30ecb..d4558321dec 100644
--- a/readline/misc.c
+++ b/readline/misc.c
@@ -1,6 +1,6 @@
/* misc.c -- miscellaneous bindable readline functions. */
-/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -63,6 +63,8 @@ void _rl_free_history_entry PARAMS((HIST_ENTRY *));
to preserve the value of rl_point from line to line. */
int _rl_history_preserve_point = 0;
+_rl_arg_cxt _rl_argcxt;
+
/* Saved target point for when _rl_history_preserve_point is set. Special
value of -1 means that point is at the end of the line. */
int _rl_history_saved_point = -1;
@@ -73,77 +75,74 @@ int _rl_history_saved_point = -1;
/* */
/* **************************************************************** */
-/* Handle C-u style numeric args, as well as M--, and M-digits. */
-static int
-rl_digit_loop ()
+int
+_rl_arg_overflow ()
{
- int key, c, sawminus, sawdigits;
+ if (rl_numeric_arg > 1000000)
+ {
+ _rl_argcxt = 0;
+ rl_explicit_arg = rl_numeric_arg = 0;
+ rl_ding ();
+ rl_restore_prompt ();
+ rl_clear_message ();
+ RL_UNSETSTATE(RL_STATE_NUMERICARG);
+ return 1;
+ }
+ return 0;
+}
+void
+_rl_arg_init ()
+{
rl_save_prompt ();
-
+ _rl_argcxt = 0;
RL_SETSTATE(RL_STATE_NUMERICARG);
- sawminus = sawdigits = 0;
- while (1)
- {
- if (rl_numeric_arg > 1000000)
- {
- sawdigits = rl_explicit_arg = rl_numeric_arg = 0;
- rl_ding ();
- rl_restore_prompt ();
- rl_clear_message ();
- RL_UNSETSTATE(RL_STATE_NUMERICARG);
- return 1;
- }
- rl_message ("(arg: %d) ", rl_arg_sign * rl_numeric_arg);
- RL_SETSTATE(RL_STATE_MOREINPUT);
- key = c = rl_read_key ();
- RL_UNSETSTATE(RL_STATE_MOREINPUT);
+}
- if (c < 0)
- {
- _rl_abort_internal ();
- return -1;
- }
+int
+_rl_arg_getchar ()
+{
+ int c;
- /* If we see a key bound to `universal-argument' after seeing digits,
- it ends the argument but is otherwise ignored. */
- if (_rl_keymap[c].type == ISFUNC &&
- _rl_keymap[c].function == rl_universal_argument)
- {
- if (sawdigits == 0)
- {
- rl_numeric_arg *= 4;
- continue;
- }
- else
- {
- RL_SETSTATE(RL_STATE_MOREINPUT);
- key = rl_read_key ();
- RL_UNSETSTATE(RL_STATE_MOREINPUT);
- rl_restore_prompt ();
- rl_clear_message ();
- RL_UNSETSTATE(RL_STATE_NUMERICARG);
- return (_rl_dispatch (key, _rl_keymap));
- }
- }
+ rl_message ("(arg: %d) ", rl_arg_sign * rl_numeric_arg);
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ c = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
- c = UNMETA (c);
+ return c;
+}
- if (_rl_digit_p (c))
- {
- rl_numeric_arg = rl_explicit_arg ? (rl_numeric_arg * 10) + c - '0' : c - '0';
- sawdigits = rl_explicit_arg = 1;
- }
- else if (c == '-' && rl_explicit_arg == 0)
+/* Process C as part of the current numeric argument. Return -1 if the
+ argument should be aborted, 0 if we should not read any more chars, and
+ 1 if we should continue to read chars. */
+int
+_rl_arg_dispatch (cxt, c)
+ _rl_arg_cxt cxt;
+ int c;
+{
+ int key, r;
+
+ key = c;
+
+ /* If we see a key bound to `universal-argument' after seeing digits,
+ it ends the argument but is otherwise ignored. */
+ if (_rl_keymap[c].type == ISFUNC && _rl_keymap[c].function == rl_universal_argument)
+ {
+ if ((cxt & NUM_SAWDIGITS) == 0)
{
- rl_numeric_arg = sawminus = 1;
- rl_arg_sign = -1;
+ rl_numeric_arg *= 4;
+ return 1;
}
+ else if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ _rl_argcxt |= NUM_READONE;
+ return 0; /* XXX */
+ }
else
{
- /* Make M-- command equivalent to M--1 command. */
- if (sawminus && rl_numeric_arg == 1 && rl_explicit_arg == 0)
- rl_explicit_arg = 1;
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ key = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
rl_restore_prompt ();
rl_clear_message ();
RL_UNSETSTATE(RL_STATE_NUMERICARG);
@@ -151,35 +150,96 @@ rl_digit_loop ()
}
}
- /*NOTREACHED*/
-}
+ c = UNMETA (c);
-/* Add the current digit to the argument in progress. */
-int
-rl_digit_argument (ignore, key)
- int ignore, key;
-{
- rl_execute_next (key);
- return (rl_digit_loop ());
+ if (_rl_digit_p (c))
+ {
+ r = _rl_digit_value (c);
+ rl_numeric_arg = rl_explicit_arg ? (rl_numeric_arg * 10) + r : r;
+ rl_explicit_arg = 1;
+ _rl_argcxt |= NUM_SAWDIGITS;
+ }
+ else if (c == '-' && rl_explicit_arg == 0)
+ {
+ rl_numeric_arg = 1;
+ _rl_argcxt |= NUM_SAWMINUS;
+ rl_arg_sign = -1;
+ }
+ else
+ {
+ /* Make M-- command equivalent to M--1 command. */
+ if ((_rl_argcxt & NUM_SAWMINUS) && rl_numeric_arg == 1 && rl_explicit_arg == 0)
+ rl_explicit_arg = 1;
+ rl_restore_prompt ();
+ rl_clear_message ();
+ RL_UNSETSTATE(RL_STATE_NUMERICARG);
+
+ r = _rl_dispatch (key, _rl_keymap);
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ /* At worst, this will cause an extra redisplay. Otherwise,
+ we have to wait until the next character comes in. */
+ if (rl_done == 0)
+ (*rl_redisplay_function) ();
+ r = 0;
+ }
+ return r;
+ }
+
+ return 1;
}
-/* What to do when you abort reading an argument. */
-int
-rl_discard_argument ()
+/* Handle C-u style numeric args, as well as M--, and M-digits. */
+static int
+rl_digit_loop ()
{
- rl_ding ();
- rl_clear_message ();
- _rl_init_argument ();
- return 0;
+ int c, r;
+
+ while (1)
+ {
+ if (_rl_arg_overflow ())
+ return 1;
+
+ c = _rl_arg_getchar ();
+
+ if (c < 0)
+ {
+ _rl_abort_internal ();
+ return -1;
+ }
+
+ r = _rl_arg_dispatch (_rl_argcxt, c);
+ if (r <= 0 || (RL_ISSTATE (RL_STATE_NUMERICARG) == 0))
+ break;
+ }
}
/* Create a default argument. */
-int
-_rl_init_argument ()
+void
+_rl_reset_argument ()
{
rl_numeric_arg = rl_arg_sign = 1;
rl_explicit_arg = 0;
- return 0;
+ _rl_argcxt = 0;
+}
+
+/* Start a numeric argument with initial value KEY */
+int
+rl_digit_argument (ignore, key)
+ int ignore, key;
+{
+ _rl_arg_init ();
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ _rl_arg_dispatch (_rl_argcxt, key);
+ rl_message ("(arg: %d) ", rl_arg_sign * rl_numeric_arg);
+ return 0;
+ }
+ else
+ {
+ rl_execute_next (key);
+ return (rl_digit_loop ());
+ }
}
/* C-u, universal argument. Multiply the current argument by 4.
@@ -189,8 +249,43 @@ int
rl_universal_argument (count, key)
int count, key;
{
+ _rl_arg_init ();
rl_numeric_arg *= 4;
- return (rl_digit_loop ());
+
+ return (RL_ISSTATE (RL_STATE_CALLBACK) ? 0 : rl_digit_loop ());
+}
+
+int
+_rl_arg_callback (cxt)
+ _rl_arg_cxt cxt;
+{
+ int c, r;
+
+ c = _rl_arg_getchar ();
+
+ if (_rl_argcxt & NUM_READONE)
+ {
+ _rl_argcxt &= ~NUM_READONE;
+ rl_restore_prompt ();
+ rl_clear_message ();
+ RL_UNSETSTATE(RL_STATE_NUMERICARG);
+ rl_execute_next (c);
+ return 0;
+ }
+
+ r = _rl_arg_dispatch (cxt, c);
+ return (r != 1);
+}
+
+/* What to do when you abort reading an argument. */
+int
+rl_discard_argument ()
+{
+ rl_ding ();
+ rl_clear_message ();
+ _rl_reset_argument ();
+
+ return 0;
}
/* **************************************************************** */
@@ -225,8 +320,10 @@ _rl_free_history_entry (entry)
{
if (entry == 0)
return;
- if (entry->line)
- free (entry->line);
+
+ FREE (entry->line);
+ FREE (entry->timestamp);
+
free (entry);
}
@@ -242,6 +339,7 @@ rl_maybe_replace_line ()
{
temp = replace_history_entry (where_history (), rl_line_buffer, (histdata_t)rl_undo_list);
free (temp->line);
+ FREE (temp->timestamp);
free (temp);
}
return 0;
@@ -253,6 +351,8 @@ rl_maybe_unsave_line ()
{
if (_rl_saved_line_for_history)
{
+ /* Can't call with `1' because rl_undo_list might point to an undo
+ list from a history entry, as in rl_replace_from_history() below. */
rl_replace_line (_rl_saved_line_for_history->line, 0);
rl_undo_list = (UNDO_LIST *)_rl_saved_line_for_history->data;
_rl_free_history_entry (_rl_saved_line_for_history);
@@ -272,8 +372,10 @@ rl_maybe_save_line ()
{
_rl_saved_line_for_history = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY));
_rl_saved_line_for_history->line = savestring (rl_line_buffer);
+ _rl_saved_line_for_history->timestamp = (char *)NULL;
_rl_saved_line_for_history->data = (char *)rl_undo_list;
}
+
return 0;
}
@@ -298,7 +400,7 @@ _rl_history_set_point ()
rl_point = rl_end;
#if defined (VI_MODE)
- if (rl_editing_mode == vi_mode)
+ if (rl_editing_mode == vi_mode && _rl_keymap != vi_insertion_keymap)
rl_point = 0;
#endif /* VI_MODE */
@@ -311,6 +413,8 @@ rl_replace_from_history (entry, flags)
HIST_ENTRY *entry;
int flags; /* currently unused */
{
+ /* Can't call with `1' because rl_undo_list might point to an undo list
+ from a history entry, just like we're setting up here. */
rl_replace_line (entry->line, 0);
rl_undo_list = (UNDO_LIST *)entry->data;
rl_point = rl_end;
@@ -435,6 +539,7 @@ rl_get_previous_history (count, key)
rl_replace_from_history (temp, 0);
_rl_history_set_point ();
}
+
return 0;
}
diff --git a/readline/nls.c b/readline/nls.c
index 706c8195c10..bcee87561aa 100644
--- a/readline/nls.c
+++ b/readline/nls.c
@@ -75,6 +75,23 @@ static char *normalize_codeset PARAMS((char *));
static char *find_codeset PARAMS((char *, size_t *));
#endif /* !HAVE_SETLOCALE */
+static char *_rl_get_locale_var PARAMS((const char *));
+
+static char *
+_rl_get_locale_var (v)
+ const char *v;
+{
+ char *lspec;
+
+ lspec = sh_get_env_value ("LC_ALL");
+ if (lspec == 0 || *lspec == 0)
+ lspec = sh_get_env_value (v);
+ if (lspec == 0 || *lspec == 0)
+ lspec = sh_get_env_value ("LANG");
+
+ return lspec;
+}
+
/* Check for LC_ALL, LC_CTYPE, and LANG and use the first with a value
to decide the defaults for 8-bit character input and output. Returns
1 if we set eight-bit mode. */
@@ -84,10 +101,21 @@ _rl_init_eightbit ()
/* If we have setlocale(3), just check the current LC_CTYPE category
value, and go into eight-bit mode if it's not C or POSIX. */
#if defined (HAVE_SETLOCALE)
- char *t;
+ char *lspec, *t;
/* Set the LC_CTYPE locale category from environment variables. */
- t = setlocale (LC_CTYPE, "");
+ lspec = _rl_get_locale_var ("LC_CTYPE");
+ /* Since _rl_get_locale_var queries the right environment variables,
+ we query the current locale settings with setlocale(), and, if
+ that doesn't return anything, we set lspec to the empty string to
+ force the subsequent call to setlocale() to define the `native'
+ environment. */
+ if (lspec == 0 || *lspec == 0)
+ lspec = setlocale (LC_CTYPE, (char *)NULL);
+ if (lspec == 0)
+ lspec = "";
+ t = setlocale (LC_CTYPE, lspec);
+
if (t && *t && (t[0] != 'C' || t[1]) && (STREQ (t, "POSIX") == 0))
{
_rl_meta_flag = 1;
@@ -105,9 +133,8 @@ _rl_init_eightbit ()
/* We don't have setlocale. Finesse it. Check the environment for the
appropriate variables and set eight-bit mode if they have the right
values. */
- lspec = sh_get_env_value ("LC_ALL");
- if (lspec == 0) lspec = sh_get_env_value ("LC_CTYPE");
- if (lspec == 0) lspec = sh_get_env_value ("LANG");
+ lspec = _rl_get_locale_var ("LC_CTYPE");
+
if (lspec == 0 || (t = normalize_codeset (lspec)) == 0)
return (0);
for (i = 0; t && legal_lang_values[i]; i++)
diff --git a/readline/parens.c b/readline/parens.c
index 54ef1f3695f..737f7675e93 100644
--- a/readline/parens.c
+++ b/readline/parens.c
@@ -21,6 +21,10 @@
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#define READLINE_LIBRARY
+#if defined (__TANDEM)
+# include <floss.h>
+#endif
+
#include "rlconf.h"
#if defined (HAVE_CONFIG_H)
diff --git a/readline/posixdir.h b/readline/posixdir.h
index 505e27954f1..91f6d96111d 100644
--- a/readline/posixdir.h
+++ b/readline/posixdir.h
@@ -25,7 +25,11 @@
#if defined (HAVE_DIRENT_H)
# include <dirent.h>
-# define D_NAMLEN(d) (strlen ((d)->d_name))
+# if defined (HAVE_STRUCT_DIRENT_D_NAMLEN)
+# define D_NAMLEN(d) ((d)->d_namlen)
+# else
+# define D_NAMLEN(d) (strlen ((d)->d_name))
+# endif /* !HAVE_STRUCT_DIRENT_D_NAMLEN */
#else
# if defined (HAVE_SYS_NDIR_H)
# include <sys/ndir.h>
@@ -42,11 +46,11 @@
# define D_NAMLEN(d) ((d)->d_namlen)
#endif /* !HAVE_DIRENT_H */
-#if defined (STRUCT_DIRENT_HAS_D_INO) && !defined (STRUCT_DIRENT_HAS_D_FILENO)
+#if defined (HAVE_STRUCT_DIRENT_D_INO) && !defined (HAVE_STRUCT_DIRENT_D_FILENO)
# define d_fileno d_ino
#endif
-#if defined (_POSIX_SOURCE) && (!defined (STRUCT_DIRENT_HAS_D_INO) || defined (BROKEN_DIRENT_D_INO))
+#if defined (_POSIX_SOURCE) && (!defined (HAVE_STRUCT_DIRENT_D_INO) || defined (BROKEN_DIRENT_D_INO))
/* Posix does not require that the d_ino field be present, and some
systems do not provide it. */
# define REAL_DIR_ENTRY(dp) 1
diff --git a/readline/readline.c b/readline/readline.c
index 07fb58fd210..5eaaf47435e 100644
--- a/readline/readline.c
+++ b/readline/readline.c
@@ -1,7 +1,7 @@
/* readline.c -- a general facility for reading lines of input
with emacs style editing and completion. */
-/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -68,11 +68,11 @@
#include "xmalloc.h"
#ifndef RL_LIBRARY_VERSION
-# define RL_LIBRARY_VERSION "4.3"
+# define RL_LIBRARY_VERSION "5.1"
#endif
#ifndef RL_READLINE_VERSION
-# define RL_READLINE_VERSION 0x0403
+# define RL_READLINE_VERSION 0x0501
#endif
extern void _rl_free_history_entry PARAMS((HIST_ENTRY *));
@@ -85,6 +85,10 @@ static void bind_arrow_keys_internal PARAMS((Keymap));
static void bind_arrow_keys PARAMS((void));
static void readline_default_bindings PARAMS((void));
+static void reset_default_bindings PARAMS((void));
+
+static int _rl_subseq_result PARAMS((int, Keymap, int, int));
+static int _rl_subseq_getchar PARAMS((int));
/* **************************************************************** */
/* */
@@ -103,6 +107,7 @@ int rl_gnu_readline_p = 1;
By default, it is the standard emacs keymap. */
Keymap _rl_keymap = emacs_standard_keymap;
+
/* The current style of editing. */
int rl_editing_mode = emacs_mode;
@@ -218,6 +223,9 @@ char *_rl_comment_begin;
/* Keymap holding the function currently being executed. */
Keymap rl_executing_keymap;
+/* Keymap we're currently using to dispatch. */
+Keymap _rl_dispatching_keymap;
+
/* Non-zero means to erase entire line, including prompt, on empty input lines. */
int rl_erase_empty_line = 0;
@@ -229,6 +237,9 @@ int rl_num_chars_to_read;
char *rl_line_buffer = (char *)NULL;
int rl_line_buffer_len = 0;
+/* Key sequence `contexts' */
+_rl_keyseq_cxt *_rl_kscxt = 0;
+
/* Forward declarations used by the display, termcap, and history code. */
/* **************************************************************** */
@@ -250,6 +261,10 @@ int _rl_convert_meta_chars_to_ascii = 1;
rather than as a meta-prefixed escape sequence. */
int _rl_output_meta_chars = 0;
+/* Non-zero means to look at the termios special characters and bind
+ them to equivalent readline functions at startup. */
+int _rl_bind_stty_chars = 1;
+
/* **************************************************************** */
/* */
/* Top Level Functions */
@@ -267,6 +282,7 @@ rl_set_prompt (prompt)
{
FREE (rl_prompt);
rl_prompt = prompt ? savestring (prompt) : (char *)NULL;
+ rl_display_prompt = rl_prompt ? rl_prompt : "";
rl_visible_prompt_length = rl_expand_prompt (rl_prompt);
return 0;
@@ -290,14 +306,16 @@ readline (prompt)
rl_set_prompt (prompt);
rl_initialize ();
- (*rl_prep_term_function) (_rl_meta_flag);
+ if (rl_prep_term_function)
+ (*rl_prep_term_function) (_rl_meta_flag);
#if defined (HANDLE_SIGNALS)
rl_set_signals ();
#endif
value = readline_internal ();
- (*rl_deprep_term_function) ();
+ if (rl_deprep_term_function)
+ (*rl_deprep_term_function) ();
#if defined (HANDLE_SIGNALS)
rl_clear_signals ();
@@ -347,7 +365,7 @@ readline_internal_setup ()
#if defined (VI_MODE)
if (rl_editing_mode == vi_mode)
- rl_vi_insertion_mode (1, 0);
+ rl_vi_insertion_mode (1, 'i');
#endif /* VI_MODE */
if (rl_pre_input_hook)
@@ -387,6 +405,36 @@ readline_internal_teardown (eof)
return (eof ? (char *)NULL : savestring (the_line));
}
+void
+_rl_internal_char_cleanup ()
+{
+#if defined (VI_MODE)
+ /* In vi mode, when you exit insert mode, the cursor moves back
+ over the previous character. We explicitly check for that here. */
+ if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap)
+ rl_vi_check ();
+#endif /* VI_MODE */
+
+ if (rl_num_chars_to_read && rl_end >= rl_num_chars_to_read)
+ {
+ (*rl_redisplay_function) ();
+ _rl_want_redisplay = 0;
+ rl_newline (1, '\n');
+ }
+
+ if (rl_done == 0)
+ {
+ (*rl_redisplay_function) ();
+ _rl_want_redisplay = 0;
+ }
+
+ /* If the application writer has told us to erase the entire line if
+ the only character typed was something bound to rl_newline, do so. */
+ if (rl_erase_empty_line && rl_done && rl_last_func == rl_newline &&
+ rl_point == 0 && rl_end == 0)
+ _rl_erase_entire_line ();
+}
+
STATIC_CALLBACK int
#if defined (READLINE_CALLBACKS)
readline_internal_char ()
@@ -409,12 +457,21 @@ readline_internal_charloop ()
code = setjmp (readline_top_level);
if (code)
- (*rl_redisplay_function) ();
+ {
+ (*rl_redisplay_function) ();
+ _rl_want_redisplay = 0;
+ /* If we get here, we're not being called from something dispatched
+ from _rl_callback_read_char(), which sets up its own value of
+ readline_top_level (saving and restoring the old, of course), so
+ we can just return here. */
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ return (0);
+ }
if (rl_pending_input == 0)
{
/* Then initialize the argument and number of keys read. */
- _rl_init_argument ();
+ _rl_reset_argument ();
rl_key_sequence_length = 0;
}
@@ -448,27 +505,7 @@ readline_internal_charloop ()
if (rl_pending_input == 0 && lk == _rl_last_command_was_kill)
_rl_last_command_was_kill = 0;
-#if defined (VI_MODE)
- /* In vi mode, when you exit insert mode, the cursor moves back
- over the previous character. We explicitly check for that here. */
- if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap)
- rl_vi_check ();
-#endif /* VI_MODE */
-
- if (rl_num_chars_to_read && rl_end >= rl_num_chars_to_read)
- {
- (*rl_redisplay_function) ();
- rl_newline (1, '\n');
- }
-
- if (rl_done == 0)
- (*rl_redisplay_function) ();
-
- /* If the application writer has told us to erase the entire line if
- the only character typed was something bound to rl_newline, do so. */
- if (rl_erase_empty_line && rl_done && rl_last_func == rl_newline &&
- rl_point == 0 && rl_end == 0)
- _rl_erase_entire_line ();
+ _rl_internal_char_cleanup ();
#if defined (READLINE_CALLBACKS)
return 0;
@@ -518,6 +555,107 @@ _rl_set_the_line ()
the_line = rl_line_buffer;
}
+#if defined (READLINE_CALLBACKS)
+_rl_keyseq_cxt *
+_rl_keyseq_cxt_alloc ()
+{
+ _rl_keyseq_cxt *cxt;
+
+ cxt = (_rl_keyseq_cxt *)xmalloc (sizeof (_rl_keyseq_cxt));
+
+ cxt->flags = cxt->subseq_arg = cxt->subseq_retval = 0;
+
+ cxt->okey = 0;
+ cxt->ocxt = _rl_kscxt;
+ cxt->childval = 42; /* sentinel value */
+
+ return cxt;
+}
+
+void
+_rl_keyseq_cxt_dispose (cxt)
+ _rl_keyseq_cxt *cxt;
+{
+ free (cxt);
+}
+
+void
+_rl_keyseq_chain_dispose ()
+{
+ _rl_keyseq_cxt *cxt;
+
+ while (_rl_kscxt)
+ {
+ cxt = _rl_kscxt;
+ _rl_kscxt = _rl_kscxt->ocxt;
+ _rl_keyseq_cxt_dispose (cxt);
+ }
+}
+#endif
+
+static int
+_rl_subseq_getchar (key)
+ int key;
+{
+ int k;
+
+ if (key == ESC)
+ RL_SETSTATE(RL_STATE_METANEXT);
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ k = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+ if (key == ESC)
+ RL_UNSETSTATE(RL_STATE_METANEXT);
+
+ return k;
+}
+
+#if defined (READLINE_CALLBACKS)
+int
+_rl_dispatch_callback (cxt)
+ _rl_keyseq_cxt *cxt;
+{
+ int nkey, r;
+
+ /* For now */
+#if 1
+ /* The first time this context is used, we want to read input and dispatch
+ on it. When traversing the chain of contexts back `up', we want to use
+ the value from the next context down. We're simulating recursion using
+ a chain of contexts. */
+ if ((cxt->flags & KSEQ_DISPATCHED) == 0)
+ {
+ nkey = _rl_subseq_getchar (cxt->okey);
+ r = _rl_dispatch_subseq (nkey, cxt->dmap, cxt->subseq_arg);
+ cxt->flags |= KSEQ_DISPATCHED;
+ }
+ else
+ r = cxt->childval;
+#else
+ r = _rl_dispatch_subseq (nkey, cxt->dmap, cxt->subseq_arg);
+#endif
+
+ /* For now */
+ r = _rl_subseq_result (r, cxt->oldmap, cxt->okey, (cxt->flags & KSEQ_SUBSEQ));
+
+ if (r == 0) /* success! */
+ {
+ _rl_keyseq_chain_dispose ();
+ RL_UNSETSTATE (RL_STATE_MULTIKEY);
+ return r;
+ }
+
+ if (r != -3) /* magic value that says we added to the chain */
+ _rl_kscxt = cxt->ocxt;
+ if (_rl_kscxt)
+ _rl_kscxt->childval = r;
+ if (r != -3)
+ _rl_keyseq_cxt_dispose (cxt);
+
+ return r;
+}
+#endif /* READLINE_CALLBACKS */
+
/* Do the command associated with KEY in MAP.
If the associated command is really a keymap, then read
another key, and dispatch into that map. */
@@ -526,6 +664,7 @@ _rl_dispatch (key, map)
register int key;
Keymap map;
{
+ _rl_dispatching_keymap = map;
return _rl_dispatch_subseq (key, map, 0);
}
@@ -538,6 +677,9 @@ _rl_dispatch_subseq (key, map, got_subseq)
int r, newkey;
char *macro;
rl_command_func_t *func;
+#if defined (READLINE_CALLBACKS)
+ _rl_keyseq_cxt *cxt;
+#endif
if (META_CHAR (key) && _rl_convert_meta_chars_to_ascii)
{
@@ -571,13 +713,9 @@ _rl_dispatch_subseq (key, map, got_subseq)
rl_executing_keymap = map;
-#if 0
- _rl_suppress_redisplay = (map[key].function == rl_insert) && _rl_input_available ();
-#endif
-
rl_dispatching = 1;
RL_SETSTATE(RL_STATE_DISPATCHING);
- r = (*map[key].function)(rl_numeric_arg * rl_arg_sign, key);
+ (*map[key].function)(rl_numeric_arg * rl_arg_sign, key);
RL_UNSETSTATE(RL_STATE_DISPATCHING);
rl_dispatching = 0;
@@ -606,6 +744,10 @@ _rl_dispatch_subseq (key, map, got_subseq)
}
else
{
+#if defined (READLINE_CALLBACKS)
+ RL_UNSETSTATE (RL_STATE_MULTIKEY);
+ _rl_keyseq_chain_dispose ();
+#endif
_rl_abort_internal ();
return -1;
}
@@ -627,44 +769,43 @@ _rl_dispatch_subseq (key, map, got_subseq)
#endif
rl_key_sequence_length++;
+ _rl_dispatching_keymap = FUNCTION_TO_KEYMAP (map, key);
- if (key == ESC)
- RL_SETSTATE(RL_STATE_METANEXT);
- RL_SETSTATE(RL_STATE_MOREINPUT);
- newkey = rl_read_key ();
- RL_UNSETSTATE(RL_STATE_MOREINPUT);
- if (key == ESC)
- RL_UNSETSTATE(RL_STATE_METANEXT);
+ /* Allocate new context here. Use linked contexts (linked through
+ cxt->ocxt) to simulate recursion */
+#if defined (READLINE_CALLBACKS)
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ /* Return 0 only the first time, to indicate success to
+ _rl_callback_read_char. The rest of the time, we're called
+ from _rl_dispatch_callback, so we return 3 to indicate
+ special handling is necessary. */
+ r = RL_ISSTATE (RL_STATE_MULTIKEY) ? -3 : 0;
+ cxt = _rl_keyseq_cxt_alloc ();
+
+ if (got_subseq)
+ cxt->flags |= KSEQ_SUBSEQ;
+ cxt->okey = key;
+ cxt->oldmap = map;
+ cxt->dmap = _rl_dispatching_keymap;
+ cxt->subseq_arg = got_subseq || cxt->dmap[ANYOTHERKEY].function;
+
+ RL_SETSTATE (RL_STATE_MULTIKEY);
+ _rl_kscxt = cxt;
+
+ return r; /* don't indicate immediate success */
+ }
+#endif
+ newkey = _rl_subseq_getchar (key);
if (newkey < 0)
{
_rl_abort_internal ();
return -1;
}
- r = _rl_dispatch_subseq (newkey, FUNCTION_TO_KEYMAP (map, key), got_subseq || map[ANYOTHERKEY].function);
-
- if (r == -2)
- /* We didn't match anything, and the keymap we're indexed into
- shadowed a function previously bound to that prefix. Call
- the function. The recursive call to _rl_dispatch_subseq has
- already taken care of pushing any necessary input back onto
- the input queue with _rl_unget_char. */
- r = _rl_dispatch (ANYOTHERKEY, FUNCTION_TO_KEYMAP (map, key));
- else if (r && map[ANYOTHERKEY].function)
- {
- /* We didn't match (r is probably -1), so return something to
- tell the caller that it should try ANYOTHERKEY for an
- overridden function. */
- _rl_unget_char (key);
- return -2;
- }
- else if (r && got_subseq)
- {
- /* OK, back up the chain. */
- _rl_unget_char (key);
- return -1;
- }
+ r = _rl_dispatch_subseq (newkey, _rl_dispatching_keymap, got_subseq || map[ANYOTHERKEY].function);
+ return _rl_subseq_result (r, map, key, got_subseq);
}
else
{
@@ -688,9 +829,69 @@ _rl_dispatch_subseq (key, map, got_subseq)
_rl_vi_textmod_command (key))
_rl_vi_set_last (key, rl_numeric_arg, rl_arg_sign);
#endif
+
return (r);
}
+static int
+_rl_subseq_result (r, map, key, got_subseq)
+ int r;
+ Keymap map;
+ int key, got_subseq;
+{
+ Keymap m;
+ int type, nt;
+ rl_command_func_t *func, *nf;
+
+ if (r == -2)
+ /* We didn't match anything, and the keymap we're indexed into
+ shadowed a function previously bound to that prefix. Call
+ the function. The recursive call to _rl_dispatch_subseq has
+ already taken care of pushing any necessary input back onto
+ the input queue with _rl_unget_char. */
+ {
+ m = _rl_dispatching_keymap;
+ type = m[ANYOTHERKEY].type;
+ func = m[ANYOTHERKEY].function;
+ if (type == ISFUNC && func == rl_do_lowercase_version)
+ r = _rl_dispatch (_rl_to_lower (key), map);
+ else if (type == ISFUNC && func == rl_insert)
+ {
+ /* If the function that was shadowed was self-insert, we
+ somehow need a keymap with map[key].func == self-insert.
+ Let's use this one. */
+ nt = m[key].type;
+ nf = m[key].function;
+
+ m[key].type = type;
+ m[key].function = func;
+ r = _rl_dispatch (key, m);
+ m[key].type = nt;
+ m[key].function = nf;
+ }
+ else
+ r = _rl_dispatch (ANYOTHERKEY, m);
+ }
+ else if (r && map[ANYOTHERKEY].function)
+ {
+ /* We didn't match (r is probably -1), so return something to
+ tell the caller that it should try ANYOTHERKEY for an
+ overridden function. */
+ _rl_unget_char (key);
+ _rl_dispatching_keymap = map;
+ return -2;
+ }
+ else if (r && got_subseq)
+ {
+ /* OK, back up the chain. */
+ _rl_unget_char (key);
+ _rl_dispatching_keymap = map;
+ return -1;
+ }
+
+ return r;
+}
+
/* **************************************************************** */
/* */
/* Initializations */
@@ -839,7 +1040,7 @@ readline_initialize_everything ()
/* If the completion parser's default word break characters haven't
been set yet, then do so now. */
if (rl_completer_word_break_characters == (char *)NULL)
- rl_completer_word_break_characters = rl_basic_word_break_characters;
+ rl_completer_word_break_characters = (char *)rl_basic_word_break_characters;
}
/* If this system allows us to look at the values of the regular
@@ -848,7 +1049,20 @@ readline_initialize_everything ()
static void
readline_default_bindings ()
{
- rl_tty_set_default_bindings (_rl_keymap);
+ if (_rl_bind_stty_chars)
+ rl_tty_set_default_bindings (_rl_keymap);
+}
+
+/* Reset the default bindings for the terminal special characters we're
+ interested in back to rl_insert and read the new ones. */
+static void
+reset_default_bindings ()
+{
+ if (_rl_bind_stty_chars)
+ {
+ rl_tty_unset_default_bindings (_rl_keymap);
+ rl_tty_set_default_bindings (_rl_keymap);
+ }
}
/* Bind some common arrow key sequences in MAP. */
@@ -862,42 +1076,33 @@ bind_arrow_keys_internal (map)
_rl_keymap = map;
#if defined (__MSDOS__)
- _rl_bind_if_unbound ("\033[0A", rl_get_previous_history);
- _rl_bind_if_unbound ("\033[0B", rl_backward_char);
- _rl_bind_if_unbound ("\033[0C", rl_forward_char);
- _rl_bind_if_unbound ("\033[0D", rl_get_next_history);
+ rl_bind_keyseq_if_unbound ("\033[0A", rl_get_previous_history);
+ rl_bind_keyseq_if_unbound ("\033[0B", rl_backward_char);
+ rl_bind_keyseq_if_unbound ("\033[0C", rl_forward_char);
+ rl_bind_keyseq_if_unbound ("\033[0D", rl_get_next_history);
#endif
-#ifdef __MINGW32__
- /* Under Windows, when an extend key (like an arrow key) is
- pressed, getch() will return 340 (octal) followed by a code for
- the extended key. We use macros to transform those into the
- normal ANSI terminal sequences for these keys. */
-
- /* Up arrow. */
- rl_macro_bind ("\340H", "\033[A", map);
- /* Left arrow. */
- rl_macro_bind ("\340K", "\033[D", map);
- /* Right arrow. */
- rl_macro_bind ("\340M", "\033[C", map);
- /* Down arrow. */
- rl_macro_bind ("\340P", "\033[B", map);
+ rl_bind_keyseq_if_unbound ("\033[A", rl_get_previous_history);
+ rl_bind_keyseq_if_unbound ("\033[B", rl_get_next_history);
+ rl_bind_keyseq_if_unbound ("\033[C", rl_forward_char);
+ rl_bind_keyseq_if_unbound ("\033[D", rl_backward_char);
+ rl_bind_keyseq_if_unbound ("\033[H", rl_beg_of_line);
+ rl_bind_keyseq_if_unbound ("\033[F", rl_end_of_line);
+
+ rl_bind_keyseq_if_unbound ("\033OA", rl_get_previous_history);
+ rl_bind_keyseq_if_unbound ("\033OB", rl_get_next_history);
+ rl_bind_keyseq_if_unbound ("\033OC", rl_forward_char);
+ rl_bind_keyseq_if_unbound ("\033OD", rl_backward_char);
+ rl_bind_keyseq_if_unbound ("\033OH", rl_beg_of_line);
+ rl_bind_keyseq_if_unbound ("\033OF", rl_end_of_line);
+
+#if defined (__MINGW32__)
+ rl_bind_keyseq_if_unbound ("\340H", rl_get_previous_history);
+ rl_bind_keyseq_if_unbound ("\340P", rl_get_next_history);
+ rl_bind_keyseq_if_unbound ("\340M", rl_forward_char);
+ rl_bind_keyseq_if_unbound ("\340K", rl_backward_char);
#endif
- _rl_bind_if_unbound ("\033[A", rl_get_previous_history);
- _rl_bind_if_unbound ("\033[B", rl_get_next_history);
- _rl_bind_if_unbound ("\033[C", rl_forward_char);
- _rl_bind_if_unbound ("\033[D", rl_backward_char);
- _rl_bind_if_unbound ("\033[H", rl_beg_of_line);
- _rl_bind_if_unbound ("\033[F", rl_end_of_line);
-
- _rl_bind_if_unbound ("\033OA", rl_get_previous_history);
- _rl_bind_if_unbound ("\033OB", rl_get_next_history);
- _rl_bind_if_unbound ("\033OC", rl_forward_char);
- _rl_bind_if_unbound ("\033OD", rl_backward_char);
- _rl_bind_if_unbound ("\033OH", rl_beg_of_line);
- _rl_bind_if_unbound ("\033OF", rl_end_of_line);
-
_rl_keymap = xkeymap;
}
@@ -950,9 +1155,7 @@ rl_save_state (sp)
sp->macro = rl_executing_macro;
sp->catchsigs = rl_catch_signals;
-#if defined (SIGWINCH)
sp->catchsigwinch = rl_catch_sigwinch;
-#endif
return (0);
}
@@ -986,9 +1189,7 @@ rl_restore_state (sp)
rl_executing_macro = sp->macro;
rl_catch_signals = sp->catchsigs;
-#if defined (SIGWINCH)
rl_catch_sigwinch = sp->catchsigwinch;
-#endif
return (0);
}
diff --git a/readline/readline.h b/readline/readline.h
index f11b3d0357c..fade6d41d2f 100644
--- a/readline/readline.h
+++ b/readline/readline.h
@@ -1,6 +1,6 @@
/* Readline.h -- the names of functions callable from within readline. */
-/* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -40,9 +40,9 @@ extern "C" {
#endif
/* Hex-encoded Readline version number. */
-#define RL_READLINE_VERSION 0x0403 /* Readline 4.3 */
-#define RL_VERSION_MAJOR 4
-#define RL_VERSION_MINOR 3
+#define RL_READLINE_VERSION 0x0501 /* Readline 5.1 */
+#define RL_VERSION_MAJOR 5
+#define RL_VERSION_MINOR 1
/* Readline data structures. */
@@ -160,6 +160,7 @@ extern int rl_kill_line PARAMS((int, int));
extern int rl_backward_kill_line PARAMS((int, int));
extern int rl_kill_full_line PARAMS((int, int));
extern int rl_unix_word_rubout PARAMS((int, int));
+extern int rl_unix_filename_rubout PARAMS((int, int));
extern int rl_unix_line_discard PARAMS((int, int));
extern int rl_copy_region_to_kill PARAMS((int, int));
extern int rl_kill_region PARAMS((int, int));
@@ -240,6 +241,7 @@ extern int rl_vi_column PARAMS((int, int));
extern int rl_vi_delete_to PARAMS((int, int));
extern int rl_vi_change_to PARAMS((int, int));
extern int rl_vi_yank_to PARAMS((int, int));
+extern int rl_vi_rubout PARAMS((int, int));
extern int rl_vi_delete PARAMS((int, int));
extern int rl_vi_back_to_indent PARAMS((int, int));
extern int rl_vi_first_print PARAMS((int, int));
@@ -258,6 +260,8 @@ extern int rl_vi_check PARAMS((void));
extern int rl_vi_domove PARAMS((int, int *));
extern int rl_vi_bracktype PARAMS((int));
+extern void rl_vi_start_inserting PARAMS((int, int, int));
+
/* VI-mode pseudo-bindable commands, used as utility functions. */
extern int rl_vi_fWord PARAMS((int, int));
extern int rl_vi_bWord PARAMS((int, int));
@@ -290,12 +294,22 @@ extern int rl_bind_key PARAMS((int, rl_command_func_t *));
extern int rl_bind_key_in_map PARAMS((int, rl_command_func_t *, Keymap));
extern int rl_unbind_key PARAMS((int));
extern int rl_unbind_key_in_map PARAMS((int, Keymap));
+extern int rl_bind_key_if_unbound PARAMS((int, rl_command_func_t *));
+extern int rl_bind_key_if_unbound_in_map PARAMS((int, rl_command_func_t *, Keymap));
extern int rl_unbind_function_in_map PARAMS((rl_command_func_t *, Keymap));
extern int rl_unbind_command_in_map PARAMS((const char *, Keymap));
-extern int rl_set_key PARAMS((const char *, rl_command_func_t *, Keymap));
+extern int rl_bind_keyseq PARAMS((const char *, rl_command_func_t *));
+extern int rl_bind_keyseq_in_map PARAMS((const char *, rl_command_func_t *, Keymap));
+extern int rl_bind_keyseq_if_unbound PARAMS((const char *, rl_command_func_t *));
+extern int rl_bind_keyseq_if_unbound_in_map PARAMS((const char *, rl_command_func_t *, Keymap));
extern int rl_generic_bind PARAMS((int, const char *, char *, Keymap));
+
+extern char *rl_variable_value PARAMS((const char *));
extern int rl_variable_bind PARAMS((const char *, const char *));
+/* Backwards compatibility, use rl_bind_keyseq_in_map instead. */
+extern int rl_set_key PARAMS((const char *, rl_command_func_t *, Keymap));
+
/* Backwards compatibility, use rl_generic_bind instead. */
extern int rl_macro_bind PARAMS((const char *, const char *, Keymap));
@@ -358,7 +372,7 @@ extern int rl_clear_message PARAMS((void));
extern int rl_reset_line_state PARAMS((void));
extern int rl_crlf PARAMS((void));
-#if (defined (__STDC__) || defined (__cplusplus)) && defined (USE_VARARGS) && defined (PREFER_STDARG)
+#if defined (USE_VARARGS) && defined (PREFER_STDARG)
extern int rl_message (const char *, ...) __attribute__((__format__ (printf, 1, 2)));
#else
extern int rl_message ();
@@ -384,11 +398,13 @@ extern char *rl_copy_text PARAMS((int, int));
extern void rl_prep_terminal PARAMS((int));
extern void rl_deprep_terminal PARAMS((void));
extern void rl_tty_set_default_bindings PARAMS((Keymap));
+extern void rl_tty_unset_default_bindings PARAMS((Keymap));
extern int rl_reset_terminal PARAMS((const char *));
extern void rl_resize_terminal PARAMS((void));
extern void rl_set_screen_size PARAMS((int, int));
extern void rl_get_screen_size PARAMS((int *, int *));
+extern void rl_reset_screen_size PARAMS((void));
extern char *rl_get_termcap PARAMS((const char *));
@@ -516,6 +532,11 @@ extern const char *rl_terminal_name;
extern FILE *rl_instream;
extern FILE *rl_outstream;
+/* If non-zero, Readline gives values of LINES and COLUMNS from the environment
+ greater precedence than values fetched from the kernel when computing the
+ screen dimensions. */
+extern int rl_prefer_env_winsize;
+
/* If non-zero, then this is the address of a function to call just
before readline_internal () prints the first prompt. */
extern rl_hook_func_t *rl_startup_hook;
@@ -603,7 +624,12 @@ extern const char *rl_basic_word_break_characters;
/* The list of characters that signal a break between words for
rl_complete_internal. The default list is the contents of
rl_basic_word_break_characters. */
-extern const char *rl_completer_word_break_characters;
+extern /*const*/ char *rl_completer_word_break_characters;
+
+/* Hook function to allow an application to set the completion word
+ break characters before readline breaks up the line. Allows
+ position-dependent word break characters. */
+extern rl_cpvfunc_t *rl_completion_word_break_hook;
/* List of characters which can be used to quote a substring of the line.
Completion occurs on the entire substring, and within the substring
@@ -687,6 +713,11 @@ extern int rl_attempted_completion_over;
functions. */
extern int rl_completion_type;
+/* Up to this many items will be displayed in response to a
+ possible-completions call. After that, we ask the user if she
+ is sure she wants to see them all. The default value is 100. */
+extern int rl_completion_query_items;
+
/* Character appended to completed words when at the end of the line. The
default is a space. Nothing is added if this is '\0'. */
extern int rl_completion_append_character;
@@ -695,10 +726,18 @@ extern int rl_completion_append_character;
rl_completion_append_character will not be appended. */
extern int rl_completion_suppress_append;
-/* Up to this many items will be displayed in response to a
- possible-completions call. After that, we ask the user if she
- is sure she wants to see them all. The default value is 100. */
-extern int rl_completion_query_items;
+/* Set to any quote character readline thinks it finds before any application
+ completion function is called. */
+extern int rl_completion_quote_character;
+
+/* Set to a non-zero value if readline found quoting anywhere in the word to
+ be completed; set before any application completion function is called. */
+extern int rl_completion_found_quote;
+
+/* If non-zero, the completion functions don't append any closing quote.
+ This is set to 0 by rl_complete_internal and may be changed by an
+ application-specific completion function. */
+extern int rl_completion_suppress_quote;
/* If non-zero, a slash will be appended to completed filenames that are
symbolic links to directory names, subject to the value of the
@@ -729,28 +768,33 @@ extern int rl_inhibit_completion;
#define MULT_MATCH 2
/* Possible state values for rl_readline_state */
-#define RL_STATE_NONE 0x00000 /* no state; before first call */
-
-#define RL_STATE_INITIALIZING 0x00001 /* initializing */
-#define RL_STATE_INITIALIZED 0x00002 /* initialization done */
-#define RL_STATE_TERMPREPPED 0x00004 /* terminal is prepped */
-#define RL_STATE_READCMD 0x00008 /* reading a command key */
-#define RL_STATE_METANEXT 0x00010 /* reading input after ESC */
-#define RL_STATE_DISPATCHING 0x00020 /* dispatching to a command */
-#define RL_STATE_MOREINPUT 0x00040 /* reading more input in a command function */
-#define RL_STATE_ISEARCH 0x00080 /* doing incremental search */
-#define RL_STATE_NSEARCH 0x00100 /* doing non-inc search */
-#define RL_STATE_SEARCH 0x00200 /* doing a history search */
-#define RL_STATE_NUMERICARG 0x00400 /* reading numeric argument */
-#define RL_STATE_MACROINPUT 0x00800 /* getting input from a macro */
-#define RL_STATE_MACRODEF 0x01000 /* defining keyboard macro */
-#define RL_STATE_OVERWRITE 0x02000 /* overwrite mode */
-#define RL_STATE_COMPLETING 0x04000 /* doing completion */
-#define RL_STATE_SIGHANDLER 0x08000 /* in readline sighandler */
-#define RL_STATE_UNDOING 0x10000 /* doing an undo */
-#define RL_STATE_INPUTPENDING 0x20000 /* rl_execute_next called */
-
-#define RL_STATE_DONE 0x80000 /* done; accepted line */
+#define RL_STATE_NONE 0x000000 /* no state; before first call */
+
+#define RL_STATE_INITIALIZING 0x000001 /* initializing */
+#define RL_STATE_INITIALIZED 0x000002 /* initialization done */
+#define RL_STATE_TERMPREPPED 0x000004 /* terminal is prepped */
+#define RL_STATE_READCMD 0x000008 /* reading a command key */
+#define RL_STATE_METANEXT 0x000010 /* reading input after ESC */
+#define RL_STATE_DISPATCHING 0x000020 /* dispatching to a command */
+#define RL_STATE_MOREINPUT 0x000040 /* reading more input in a command function */
+#define RL_STATE_ISEARCH 0x000080 /* doing incremental search */
+#define RL_STATE_NSEARCH 0x000100 /* doing non-inc search */
+#define RL_STATE_SEARCH 0x000200 /* doing a history search */
+#define RL_STATE_NUMERICARG 0x000400 /* reading numeric argument */
+#define RL_STATE_MACROINPUT 0x000800 /* getting input from a macro */
+#define RL_STATE_MACRODEF 0x001000 /* defining keyboard macro */
+#define RL_STATE_OVERWRITE 0x002000 /* overwrite mode */
+#define RL_STATE_COMPLETING 0x004000 /* doing completion */
+#define RL_STATE_SIGHANDLER 0x008000 /* in readline sighandler */
+#define RL_STATE_UNDOING 0x010000 /* doing an undo */
+#define RL_STATE_INPUTPENDING 0x020000 /* rl_execute_next called */
+#define RL_STATE_TTYCSAVED 0x040000 /* tty special chars saved */
+#define RL_STATE_CALLBACK 0x080000 /* using the callback interface */
+#define RL_STATE_VIMOTION 0x100000 /* reading vi motion arg */
+#define RL_STATE_MULTIKEY 0x200000 /* reading multiple-key command */
+#define RL_STATE_VICMDONCE 0x400000 /* entered vi command mode at least once */
+
+#define RL_STATE_DONE 0x800000 /* done; accepted line */
#define RL_SETSTATE(x) (rl_readline_state |= (x))
#define RL_UNSETSTATE(x) (rl_readline_state &= ~(x))
@@ -785,6 +829,12 @@ struct readline_state {
int catchsigs;
int catchsigwinch;
+ /* search state */
+
+ /* completion state */
+
+ /* options state */
+
/* reserved for future expansion, so the struct size doesn't change */
char reserved[64];
};
diff --git a/readline/rldefs.h b/readline/rldefs.h
index b80db8cffed..0f6c87446dd 100644
--- a/readline/rldefs.h
+++ b/readline/rldefs.h
@@ -2,7 +2,7 @@
for readline. This should be included after any files that define
system-specific constants like _POSIX_VERSION or USG. */
-/* Copyright (C) 1987,1989 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file contains the Readline Library (the Library), a set of
routines for providing Emacs style line input to programs that ask
@@ -32,15 +32,17 @@
#include "rlstdc.h"
-#if defined (__MINGW32__)
-# define NO_TTY_DRIVER
-#elif defined (_POSIX_VERSION) && !defined (TERMIOS_MISSING)
+#if defined (_POSIX_VERSION) && !defined (TERMIOS_MISSING)
# define TERMIOS_TTY_DRIVER
#else
# if defined (HAVE_TERMIO_H)
# define TERMIO_TTY_DRIVER
# else
-# define NEW_TTY_DRIVER
+# if !defined (__MINGW32__)
+# define NEW_TTY_DRIVER
+# else
+# define NO_TTY_DRIVER
+# endif
# endif
#endif
@@ -79,7 +81,7 @@ extern int _rl_stricmp PARAMS((char *, char *));
extern int _rl_strnicmp PARAMS((char *, char *, int));
#endif
-#if defined (HAVE_STRPBRK)
+#if defined (HAVE_STRPBRK) && !defined (HAVE_MULTIBYTE)
# define _rl_strpbrk(a,b) strpbrk((a),(b))
#else
extern char *_rl_strpbrk PARAMS((const char *, const char *));
diff --git a/readline/rlmbutil.h b/readline/rlmbutil.h
index dab954fad90..cf6ef9e4dbe 100644
--- a/readline/rlmbutil.h
+++ b/readline/rlmbutil.h
@@ -45,12 +45,28 @@
#if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H)
# include <wchar.h>
# include <wctype.h>
-# if defined (HAVE_MBSTATE_T) && defined (HAVE_MBSRTOWCS)
+# if defined (HAVE_MBSTATE_T) && defined (HAVE_MBSRTOWCS) && defined (HAVE_MBRTOWC) && defined (HAVE_MBRLEN) && defined (HAVE_WCWIDTH)
/* system is supposed to support XPG5 */
# define HANDLE_MULTIBYTE 1
# endif
#endif
+/* If we don't want multibyte chars even on a system that supports them, let
+ the configuring user turn multibyte support off. */
+#if defined (NO_MULTIBYTE_SUPPORT)
+# undef HANDLE_MULTIBYTE
+#endif
+
+/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */
+#if HANDLE_MULTIBYTE && !defined (HAVE_MBSTATE_T)
+# define wcsrtombs(dest, src, len, ps) (wcsrtombs) (dest, src, len, 0)
+# define mbsrtowcs(dest, src, len, ps) (mbsrtowcs) (dest, src, len, 0)
+# define wcrtomb(s, wc, ps) (wcrtomb) (s, wc, 0)
+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
+# define mbrlen(s, n, ps) (mbrlen) (s, n, 0)
+# define mbstate_t int
+#endif
+
/* Make sure MB_LEN_MAX is at least 16 on systems that claim to be able to
handle multibyte chars (some systems define MB_LEN_MAX as 1) */
#ifdef HANDLE_MULTIBYTE
@@ -91,6 +107,24 @@ extern int _rl_read_mbstring PARAMS((int, char *, int));
extern int _rl_is_mbchar_matched PARAMS((char *, int, int, char *, int));
+extern wchar_t _rl_char_value PARAMS((char *, int));
+extern int _rl_walphabetic PARAMS((wchar_t));
+
+#define _rl_to_wupper(wc) (iswlower (wc) ? towupper (wc) : (wc))
+#define _rl_to_wlower(wc) (iswupper (wc) ? towlower (wc) : (wc))
+
+#define MB_NEXTCHAR(b,s,c,f) \
+ ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) \
+ ? _rl_find_next_mbchar ((b), (s), (c), (f)) \
+ : ((s) + (c)))
+#define MB_PREVCHAR(b,s,f) \
+ ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) \
+ ? _rl_find_prev_mbchar ((b), (s), (f)) \
+ : ((s) - 1))
+
+#define MB_INVALIDCH(x) ((x) == (size_t)-1 || (x) == (size_t)-2)
+#define MB_NULLWCH(x) ((x) == 0)
+
#else /* !HANDLE_MULTIBYTE */
#undef MB_LEN_MAX
@@ -102,6 +136,19 @@ extern int _rl_is_mbchar_matched PARAMS((char *, int, int, char *, int));
#define _rl_find_prev_mbchar(b, i, f) (((i) == 0) ? (i) : ((i) - 1))
#define _rl_find_next_mbchar(b, i1, i2, f) ((i1) + (i2))
+#define _rl_char_value(buf,ind) ((buf)[(ind)])
+
+#define _rl_walphabetic(c) (rl_alphabetic (c))
+
+#define _rl_to_wupper(c) (_rl_to_upper (c))
+#define _rl_to_wlower(c) (_rl_to_lower (c))
+
+#define MB_NEXTCHAR(b,s,c,f) ((s) + (c))
+#define MB_PREVCHAR(b,s,f) ((s) - 1)
+
+#define MB_INVALIDCH(x) (0)
+#define MB_NULLWCH(x) (0)
+
#endif /* !HANDLE_MULTIBYTE */
extern int rl_byte_oriented;
diff --git a/readline/rlprivate.h b/readline/rlprivate.h
index ccb914469e7..1c216ead14f 100644
--- a/readline/rlprivate.h
+++ b/readline/rlprivate.h
@@ -1,7 +1,7 @@
/* rlprivate.h -- functions and variables global to the readline library,
but not intended for use by applications. */
-/* Copyright (C) 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -30,6 +30,95 @@
/*************************************************************************
* *
+ * Global structs undocumented in texinfo manual and not in readline.h *
+ * *
+ *************************************************************************/
+/* search types */
+#define RL_SEARCH_ISEARCH 0x01 /* incremental search */
+#define RL_SEARCH_NSEARCH 0x02 /* non-incremental search */
+#define RL_SEARCH_CSEARCH 0x04 /* intra-line char search */
+
+/* search flags */
+#define SF_REVERSE 0x01
+#define SF_FOUND 0x02
+#define SF_FAILED 0x04
+
+typedef struct __rl_search_context
+{
+ int type;
+ int sflags;
+
+ char *search_string;
+ int search_string_index;
+ int search_string_size;
+
+ char **lines;
+ char *allocated_line;
+ int hlen;
+ int hindex;
+
+ int save_point;
+ int save_mark;
+ int save_line;
+ int last_found_line;
+ char *prev_line_found;
+
+ UNDO_LIST *save_undo_list;
+
+ int history_pos;
+ int direction;
+
+ int lastc;
+#if defined (HANDLE_MULTIBYTE)
+ char mb[MB_LEN_MAX];
+#endif
+
+ char *sline;
+ int sline_len;
+ int sline_index;
+
+ char *search_terminators;
+} _rl_search_cxt;
+
+/* Callback data for reading numeric arguments */
+#define NUM_SAWMINUS 0x01
+#define NUM_SAWDIGITS 0x02
+#define NUM_READONE 0x04
+
+typedef int _rl_arg_cxt;
+
+/* A context for reading key sequences longer than a single character when
+ using the callback interface. */
+#define KSEQ_DISPATCHED 0x01
+#define KSEQ_SUBSEQ 0x02
+#define KSEQ_RECURSIVE 0x04
+
+typedef struct __rl_keyseq_context
+{
+ int flags;
+ int subseq_arg;
+ int subseq_retval; /* XXX */
+ Keymap dmap;
+
+ Keymap oldmap;
+ int okey;
+ struct __rl_keyseq_context *ocxt;
+ int childval;
+} _rl_keyseq_cxt;
+
+ /* fill in more as needed */
+/* `Generic' callback data and functions */
+typedef struct __rl_callback_generic_arg
+{
+ int count;
+ int i1, i2;
+ /* add here as needed */
+} _rl_callback_generic_arg;
+
+typedef int _rl_callback_func_t PARAMS((_rl_callback_generic_arg *));
+
+/*************************************************************************
+ * *
* Global functions undocumented in texinfo manual and not in readline.h *
* *
*************************************************************************/
@@ -54,6 +143,8 @@ extern int readline_echoing_p;
extern int rl_key_sequence_length;
extern int rl_byte_oriented;
+extern _rl_keyseq_cxt *_rl_kscxt;
+
/* display.c */
extern int rl_display_fixed;
@@ -100,10 +191,19 @@ extern void readline_internal_setup PARAMS((void));
extern char *readline_internal_teardown PARAMS((int));
extern int readline_internal_char PARAMS((void));
+extern _rl_keyseq_cxt *_rl_keyseq_cxt_alloc PARAMS((void));
+extern void _rl_keyseq_cxt_dispose PARAMS((_rl_keyseq_cxt *));
+extern void _rl_keyseq_chain_dispose PARAMS((void));
+
+extern int _rl_dispatch_callback PARAMS((_rl_keyseq_cxt *));
+
+/* callback.c */
+extern _rl_callback_generic_arg *_rl_callback_data_alloc PARAMS((int));
+extern void _rl_callback_data_dispose PARAMS((_rl_callback_generic_arg *));
+
#endif /* READLINE_CALLBACKS */
/* bind.c */
-extern void _rl_bind_if_unbound PARAMS((const char *, rl_command_func_t *));
/* complete.c */
extern char _rl_find_completion_word PARAMS((int *, int *));
@@ -131,6 +231,16 @@ extern int _rl_input_available PARAMS((void));
extern int _rl_input_queued PARAMS((int));
extern void _rl_insert_typein PARAMS((int));
extern int _rl_unget_char PARAMS((int));
+extern int _rl_pushed_input_available PARAMS((void));
+
+/* isearch.c */
+extern _rl_search_cxt *_rl_scxt_alloc PARAMS((int, int));
+extern void _rl_scxt_dispose PARAMS((_rl_search_cxt *, int));
+
+extern int _rl_isearch_dispatch PARAMS((_rl_search_cxt *, int));
+extern int _rl_isearch_callback PARAMS((_rl_search_cxt *));
+
+extern int _rl_search_getchar PARAMS((_rl_search_cxt *));
/* macro.c */
extern void _rl_with_macro_input PARAMS((char *));
@@ -141,7 +251,12 @@ extern void _rl_add_macro_char PARAMS((int));
extern void _rl_kill_kbd_macro PARAMS((void));
/* misc.c */
-extern int _rl_init_argument PARAMS((void));
+extern int _rl_arg_overflow PARAMS((void));
+extern void _rl_arg_init PARAMS((void));
+extern int _rl_arg_getchar PARAMS((void));
+extern int _rl_arg_callback PARAMS((_rl_arg_cxt));
+extern void _rl_reset_argument PARAMS((void));
+
extern void _rl_start_using_history PARAMS((void));
extern int _rl_free_saved_history_line PARAMS((void));
extern void _rl_set_insert_mode PARAMS((int, int));
@@ -157,11 +272,15 @@ extern void _rl_init_line_state PARAMS((void));
extern void _rl_set_the_line PARAMS((void));
extern int _rl_dispatch PARAMS((int, Keymap));
extern int _rl_dispatch_subseq PARAMS((int, Keymap, int));
+extern void _rl_internal_char_cleanup PARAMS((void));
/* rltty.c */
extern int _rl_disable_tty_signals PARAMS((void));
extern int _rl_restore_tty_signals PARAMS((void));
+/* search.c */
+extern int _rl_nsearch_callback PARAMS((_rl_search_cxt *));
+
/* terminal.c */
extern void _rl_get_screen_size PARAMS((int, int));
extern int _rl_init_terminal_io PARAMS((const char *));
@@ -217,8 +336,13 @@ extern void _rl_vi_done_inserting PARAMS((void));
extern const char *_rl_possible_control_prefixes[];
extern const char *_rl_possible_meta_prefixes[];
+/* callback.c */
+extern _rl_callback_func_t *_rl_callback_func;
+extern _rl_callback_generic_arg *_rl_callback_data;
+
/* complete.c */
extern int _rl_complete_show_all;
+extern int _rl_complete_show_unmodified;
extern int _rl_complete_mark_directories;
extern int _rl_complete_mark_symlink_dirs;
extern int _rl_print_completions_horizontally;
@@ -230,11 +354,14 @@ extern int _rl_page_completions;
extern int _rl_vis_botlin;
extern int _rl_last_c_pos;
extern int _rl_suppress_redisplay;
+extern int _rl_want_redisplay;
extern char *rl_display_prompt;
/* isearch.c */
extern char *_rl_isearch_terminators;
+extern _rl_search_cxt *_rl_iscxt;
+
/* macro.c */
extern char *_rl_executing_macro;
@@ -242,6 +369,8 @@ extern char *_rl_executing_macro;
extern int _rl_history_preserve_point;
extern int _rl_history_saved_point;
+extern _rl_arg_cxt _rl_argcxt;
+
/* readline.c */
extern int _rl_horizontal_scroll_mode;
extern int _rl_mark_modified_lines;
@@ -249,6 +378,7 @@ extern int _rl_bell_preference;
extern int _rl_meta_flag;
extern int _rl_convert_meta_chars_to_ascii;
extern int _rl_output_meta_chars;
+extern int _rl_bind_stty_chars;
extern char *_rl_comment_begin;
extern unsigned char _rl_parsing_conditionalized_out;
extern Keymap _rl_keymap;
@@ -258,6 +388,9 @@ extern int _rl_last_command_was_kill;
extern int _rl_eof_char;
extern procenv_t readline_top_level;
+/* search.c */
+extern _rl_search_cxt *_rl_nscxt;
+
/* terminal.c */
extern int _rl_enable_keypad;
extern int _rl_enable_meta;
@@ -281,4 +414,7 @@ extern int _rl_term_autowrap;
extern int _rl_doing_an_undo;
extern int _rl_undo_group_level;
+/* vi_mode.c */
+extern int _rl_vi_last_command;
+
#endif /* _RL_PRIVATE_H_ */
diff --git a/readline/rlstdc.h b/readline/rlstdc.h
index d6a22b3742c..847fa9c26f4 100644
--- a/readline/rlstdc.h
+++ b/readline/rlstdc.h
@@ -37,7 +37,7 @@
#endif
#ifndef __attribute__
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
# define __attribute__(x)
# endif
#endif
diff --git a/readline/rltty.c b/readline/rltty.c
index 2ccb9d1a566..9a0326ed209 100644
--- a/readline/rltty.c
+++ b/readline/rltty.c
@@ -1,7 +1,7 @@
/* rltty.c -- functions to prepare and restore the terminal for readline's
use. */
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -188,6 +188,8 @@ static int set_tty_settings PARAMS((int, TIOTYPE *));
static void prepare_terminal_settings PARAMS((int, TIOTYPE, TIOTYPE *));
+static void set_special_char PARAMS((Keymap, TIOTYPE *, int, rl_command_func_t));
+
static void
save_tty_chars (tiop)
TIOTYPE *tiop;
@@ -229,12 +231,11 @@ get_tty_settings (tty, tiop)
int tty;
TIOTYPE *tiop;
{
-#if defined (TIOCGWINSZ)
set_winsize (tty);
-#endif
tiop->flags = tiop->lflag = 0;
+ errno = 0;
if (ioctl (tty, TIOCGETP, &(tiop->sgttyb)) < 0)
return -1;
tiop->flags |= SGTTY_SET;
@@ -404,6 +405,9 @@ static int set_tty_settings PARAMS((int, TIOTYPE *));
static void prepare_terminal_settings PARAMS((int, TIOTYPE, TIOTYPE *));
+static void set_special_char PARAMS((Keymap, TIOTYPE *, int, rl_command_func_t));
+static void _rl_bind_tty_special_chars PARAMS((Keymap, TIOTYPE));
+
#if defined (FLUSHO)
# define OUTPUT_BEING_FLUSHED(tp) (tp->c_lflag & FLUSHO)
#else
@@ -515,10 +519,9 @@ get_tty_settings (tty, tiop)
int tty;
TIOTYPE *tiop;
{
-#if defined (TIOCGWINSZ)
set_winsize (tty);
-#endif
+ errno = 0;
if (_get_tty_settings (tty, tiop) < 0)
return -1;
@@ -632,10 +635,9 @@ prepare_terminal_settings (meta_flag, oldtio, tiop)
#endif /* TERMIOS_TTY_DRIVER && _POSIX_VDISABLE */
}
-#endif /* NEW_TTY_DRIVER */
+#endif /* !NEW_TTY_DRIVER */
-/* Put the terminal in CBREAK mode so that we can detect key
- presses. */
+/* Put the terminal in CBREAK mode so that we can detect key presses. */
#if defined (NO_TTY_DRIVER)
void
rl_prep_terminal (meta_flag)
@@ -650,7 +652,6 @@ rl_deprep_terminal ()
}
#else /* ! NO_TTY_DRIVER */
-/* Put the terminal in CBREAK mode so that we can detect key presses. */
void
rl_prep_terminal (meta_flag)
int meta_flag;
@@ -668,13 +669,43 @@ rl_prep_terminal (meta_flag)
if (get_tty_settings (tty, &tio) < 0)
{
+#if defined (ENOTSUP)
+ /* MacOS X, at least, lies about the value of errno if tcgetattr fails. */
+ if (errno == ENOTTY || errno == ENOTSUP)
+#else
+ if (errno == ENOTTY)
+#endif
+ readline_echoing_p = 1; /* XXX */
release_sigint ();
return;
}
otio = tio;
+ if (_rl_bind_stty_chars)
+ {
+#if defined (VI_MODE)
+ /* If editing in vi mode, make sure we restore the bindings in the
+ insertion keymap no matter what keymap we ended up in. */
+ if (rl_editing_mode == vi_mode)
+ rl_tty_unset_default_bindings (vi_insertion_keymap);
+ else
+#endif
+ rl_tty_unset_default_bindings (_rl_keymap);
+ }
save_tty_chars (&otio);
+ RL_SETSTATE(RL_STATE_TTYCSAVED);
+ if (_rl_bind_stty_chars)
+ {
+#if defined (VI_MODE)
+ /* If editing in vi mode, make sure we set the bindings in the
+ insertion keymap no matter what keymap we ended up in. */
+ if (rl_editing_mode == vi_mode)
+ _rl_bind_tty_special_chars (vi_insertion_keymap, tio);
+ else
+#endif
+ _rl_bind_tty_special_chars (_rl_keymap, tio);
+ }
prepare_terminal_settings (meta_flag, otio, &tio);
@@ -809,71 +840,105 @@ rl_stop_output (count, key)
/* */
/* **************************************************************** */
-/* Set the system's default editing characters to their readline equivalents
- in KMAP. Should be static, now that we have rl_tty_set_default_bindings. */
-void
-rltty_set_default_bindings (kmap)
- Keymap kmap;
-{
#if !defined (NO_TTY_DRIVER)
- TIOTYPE ttybuff;
- int tty = fileno (rl_instream);
+#define SET_SPECIAL(sc, func) set_special_char(kmap, &ttybuff, sc, func)
+#endif
-#if defined (NEW_TTY_DRIVER)
+#if defined (NO_TTY_DRIVER)
-#define SET_SPECIAL(sc, func) \
- do \
- { \
- int ic; \
- ic = sc; \
- if (ic != -1 && kmap[(unsigned char)ic].type == ISFUNC) \
- kmap[(unsigned char)ic].function = func; \
- } \
- while (0)
+#define SET_SPECIAL(sc, func)
+#define RESET_SPECIAL(c)
- if (get_tty_settings (tty, &ttybuff) == 0)
+#elif defined (NEW_TTY_DRIVER)
+static void
+set_special_char (kmap, tiop, sc, func)
+ Keymap kmap;
+ TIOTYPE *tiop;
+ int sc;
+ rl_command_func_t *func;
+{
+ if (sc != -1 && kmap[(unsigned char)sc].type == ISFUNC)
+ kmap[(unsigned char)sc].function = func;
+}
+
+#define RESET_SPECIAL(c) \
+ if (c != -1 && kmap[(unsigned char)c].type == ISFUNC)
+ kmap[(unsigned char)c].function = rl_insert;
+
+static void
+_rl_bind_tty_special_chars (kmap, ttybuff)
+ Keymap kmap;
+ TIOTYPE ttybuff;
+{
+ if (ttybuff.flags & SGTTY_SET)
{
- if (ttybuff.flags & SGTTY_SET)
- {
- SET_SPECIAL (ttybuff.sgttyb.sg_erase, rl_rubout);
- SET_SPECIAL (ttybuff.sgttyb.sg_kill, rl_unix_line_discard);
- }
+ SET_SPECIAL (ttybuff.sgttyb.sg_erase, rl_rubout);
+ SET_SPECIAL (ttybuff.sgttyb.sg_kill, rl_unix_line_discard);
+ }
# if defined (TIOCGLTC)
- if (ttybuff.flags & LTCHARS_SET)
- {
- SET_SPECIAL (ttybuff.ltchars.t_werasc, rl_unix_word_rubout);
- SET_SPECIAL (ttybuff.ltchars.t_lnextc, rl_quoted_insert);
- }
-# endif /* TIOCGLTC */
+ if (ttybuff.flags & LTCHARS_SET)
+ {
+ SET_SPECIAL (ttybuff.ltchars.t_werasc, rl_unix_word_rubout);
+ SET_SPECIAL (ttybuff.ltchars.t_lnextc, rl_quoted_insert);
}
+# endif /* TIOCGLTC */
+}
#else /* !NEW_TTY_DRIVER */
+static void
+set_special_char (kmap, tiop, sc, func)
+ Keymap kmap;
+ TIOTYPE *tiop;
+ int sc;
+ rl_command_func_t *func;
+{
+ unsigned char uc;
-#define SET_SPECIAL(sc, func) \
- do \
- { \
- unsigned char uc; \
- uc = ttybuff.c_cc[sc]; \
- if (uc != (unsigned char)_POSIX_VDISABLE && kmap[uc].type == ISFUNC) \
- kmap[uc].function = func; \
- } \
- while (0)
+ uc = tiop->c_cc[sc];
+ if (uc != (unsigned char)_POSIX_VDISABLE && kmap[uc].type == ISFUNC)
+ kmap[uc].function = func;
+}
- if (get_tty_settings (tty, &ttybuff) == 0)
- {
- SET_SPECIAL (VERASE, rl_rubout);
- SET_SPECIAL (VKILL, rl_unix_line_discard);
+/* used later */
+#define RESET_SPECIAL(uc) \
+ if (uc != (unsigned char)_POSIX_VDISABLE && kmap[uc].type == ISFUNC) \
+ kmap[uc].function = rl_insert;
+
+static void
+_rl_bind_tty_special_chars (kmap, ttybuff)
+ Keymap kmap;
+ TIOTYPE ttybuff;
+{
+ SET_SPECIAL (VERASE, rl_rubout);
+ SET_SPECIAL (VKILL, rl_unix_line_discard);
# if defined (VLNEXT) && defined (TERMIOS_TTY_DRIVER)
- SET_SPECIAL (VLNEXT, rl_quoted_insert);
+ SET_SPECIAL (VLNEXT, rl_quoted_insert);
# endif /* VLNEXT && TERMIOS_TTY_DRIVER */
# if defined (VWERASE) && defined (TERMIOS_TTY_DRIVER)
- SET_SPECIAL (VWERASE, rl_unix_word_rubout);
+ SET_SPECIAL (VWERASE, rl_unix_word_rubout);
# endif /* VWERASE && TERMIOS_TTY_DRIVER */
- }
+}
+
#endif /* !NEW_TTY_DRIVER */
+
+/* Set the system's default editing characters to their readline equivalents
+ in KMAP. Should be static, now that we have rl_tty_set_default_bindings. */
+void
+rltty_set_default_bindings (kmap)
+ Keymap kmap;
+{
+#if !defined (NO_TTY_DRIVER)
+ TIOTYPE ttybuff;
+ int tty;
+ static int called = 0;
+
+ tty = fileno (rl_instream);
+
+ if (get_tty_settings (tty, &ttybuff) == 0)
+ _rl_bind_tty_special_chars (kmap, ttybuff);
#endif
}
@@ -886,6 +951,30 @@ rl_tty_set_default_bindings (kmap)
rltty_set_default_bindings (kmap);
}
+/* Rebind all of the tty special chars that readline worries about back
+ to self-insert. Call this before saving the current terminal special
+ chars with save_tty_chars(). This only works on POSIX termios or termio
+ systems. */
+void
+rl_tty_unset_default_bindings (kmap)
+ Keymap kmap;
+{
+ /* Don't bother before we've saved the tty special chars at least once. */
+ if (RL_ISSTATE(RL_STATE_TTYCSAVED) == 0)
+ return;
+
+ RESET_SPECIAL (_rl_tty_chars.t_erase);
+ RESET_SPECIAL (_rl_tty_chars.t_kill);
+
+# if defined (VLNEXT) && defined (TERMIOS_TTY_DRIVER)
+ RESET_SPECIAL (_rl_tty_chars.t_lnext);
+# endif /* VLNEXT && TERMIOS_TTY_DRIVER */
+
+# if defined (VWERASE) && defined (TERMIOS_TTY_DRIVER)
+ RESET_SPECIAL (_rl_tty_chars.t_werase);
+# endif /* VWERASE && TERMIOS_TTY_DRIVER */
+}
+
#if defined (HANDLE_SIGNALS)
#if defined (NEW_TTY_DRIVER) || defined (NO_TTY_DRIVER)
diff --git a/readline/rltty.h b/readline/rltty.h
index 029a3fbc0e1..142e96b6a64 100644
--- a/readline/rltty.h
+++ b/readline/rltty.h
@@ -61,22 +61,22 @@
#endif /* !NEW_TTY_DRIVER && !_POSIX_VDISABLE */
typedef struct _rl_tty_chars {
- char t_eof;
- char t_eol;
- char t_eol2;
- char t_erase;
- char t_werase;
- char t_kill;
- char t_reprint;
- char t_intr;
- char t_quit;
- char t_susp;
- char t_dsusp;
- char t_start;
- char t_stop;
- char t_lnext;
- char t_flush;
- char t_status;
+ unsigned char t_eof;
+ unsigned char t_eol;
+ unsigned char t_eol2;
+ unsigned char t_erase;
+ unsigned char t_werase;
+ unsigned char t_kill;
+ unsigned char t_reprint;
+ unsigned char t_intr;
+ unsigned char t_quit;
+ unsigned char t_susp;
+ unsigned char t_dsusp;
+ unsigned char t_start;
+ unsigned char t_stop;
+ unsigned char t_lnext;
+ unsigned char t_flush;
+ unsigned char t_status;
} _RL_TTY_CHARS;
#endif /* _RLTTY_H_ */
diff --git a/readline/rltypedefs.h b/readline/rltypedefs.h
index f3280e9fce0..862bdb8e4d9 100644
--- a/readline/rltypedefs.h
+++ b/readline/rltypedefs.h
@@ -1,6 +1,6 @@
/* rltypedefs.h -- Type declarations for readline functions. */
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2004 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -79,6 +79,12 @@ typedef void rl_voidfunc_t PARAMS((void));
typedef void rl_vintfunc_t PARAMS((int));
typedef void rl_vcpfunc_t PARAMS((char *));
typedef void rl_vcppfunc_t PARAMS((char **));
+
+typedef char *rl_cpvfunc_t PARAMS((void));
+typedef char *rl_cpifunc_t PARAMS((int));
+typedef char *rl_cpcpfunc_t PARAMS((char *));
+typedef char *rl_cpcppfunc_t PARAMS((char **));
+
#endif /* _RL_FUNCTION_TYPEDEF */
#ifdef __cplusplus
diff --git a/readline/savestring.c b/readline/savestring.c
index c7ebeb1e552..820428d8881 100644
--- a/readline/savestring.c
+++ b/readline/savestring.c
@@ -1,6 +1,6 @@
/* savestring.c */
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998,2003 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -19,6 +19,7 @@
is generally kept in a file called COPYING or LICENSE. If you do not
have a copy of the license, write to the Free Software Foundation,
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
+#define READLINE_LIBRARY
#include <config.h>
#ifdef HAVE_STRING_H
diff --git a/readline/search.c b/readline/search.c
index 7e0d60b5eb4..8013916c20e 100644
--- a/readline/search.c
+++ b/readline/search.c
@@ -1,6 +1,6 @@
/* search.c - code for non-incremental searching in emacs and vi modes. */
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2005 Free Software Foundation, Inc.
This file is part of the Readline Library (the Library), a set of
routines for providing Emacs style line input to programs that ask
@@ -53,6 +53,8 @@
#endif
#define abs(x) (((x) >= 0) ? (x) : -(x))
+_rl_search_cxt *_rl_nscxt = 0;
+
extern HIST_ENTRY *_rl_saved_line_for_history;
/* Functions imported from the rest of the library. */
@@ -68,13 +70,19 @@ static int rl_history_search_pos;
static char *history_search_string;
static int history_string_size;
+static UNDO_LIST *noninc_saved_undo_list;
static void make_history_line_current PARAMS((HIST_ENTRY *));
static int noninc_search_from_pos PARAMS((char *, int, int));
-static void noninc_dosearch PARAMS((char *, int));
-static void noninc_search PARAMS((int, int));
+static int noninc_dosearch PARAMS((char *, int));
+static int noninc_search PARAMS((int, int));
static int rl_history_search_internal PARAMS((int, int));
static void rl_history_search_reinit PARAMS((void));
+static _rl_search_cxt *_rl_nsearch_init PARAMS((int, int));
+static int _rl_nsearch_cleanup PARAMS((_rl_search_cxt *, int));
+static void _rl_nsearch_abort PARAMS((_rl_search_cxt *));
+static int _rl_nsearch_dispatch PARAMS((_rl_search_cxt *, int));
+
/* Make the data from the history entry ENTRY be the contents of the
current line. This doesn't do anything with rl_point; the caller
must set it. */
@@ -82,8 +90,16 @@ static void
make_history_line_current (entry)
HIST_ENTRY *entry;
{
- rl_replace_line (entry->line, 0);
- rl_undo_list = (UNDO_LIST *)entry->data;
+ _rl_replace_text (entry->line, 0, rl_end);
+ _rl_fix_point (1);
+#if defined (VI_MODE)
+ if (rl_editing_mode == vi_mode)
+ /* POSIX.2 says that the `U' command doesn't affect the copy of any
+ command lines to the edit line. We're going to implement that by
+ making the undo list start after the matching line is copied to the
+ current editing buffer. */
+ rl_free_undo_list ();
+#endif
if (_rl_saved_line_for_history)
_rl_free_history_entry (_rl_saved_line_for_history);
@@ -125,8 +141,8 @@ noninc_search_from_pos (string, pos, dir)
/* Search for a line in the history containing STRING. If DIR is < 0, the
search is backwards through previous entries, else through subsequent
- entries. */
-static void
+ entries. Returns 1 if the search was successful, 0 otherwise. */
+static int
noninc_dosearch (string, dir)
char *string;
int dir;
@@ -137,7 +153,7 @@ noninc_dosearch (string, dir)
if (string == 0 || *string == '\0' || noninc_history_pos < 0)
{
rl_ding ();
- return;
+ return 0;
}
pos = noninc_search_from_pos (string, noninc_history_pos + dir, dir);
@@ -148,7 +164,7 @@ noninc_dosearch (string, dir)
rl_clear_message ();
rl_point = 0;
rl_ding ();
- return;
+ return 0;
}
noninc_history_pos = pos;
@@ -159,7 +175,7 @@ noninc_dosearch (string, dir)
#if defined (VI_MODE)
if (rl_editing_mode != vi_mode)
#endif
- history_set_pos (oldpos);
+ history_set_pos (oldpos);
make_history_line_current (entry);
@@ -167,27 +183,29 @@ noninc_dosearch (string, dir)
rl_mark = rl_end;
rl_clear_message ();
+ return 1;
}
-/* Search non-interactively through the history list. DIR < 0 means to
- search backwards through the history of previous commands; otherwise
- the search is for commands subsequent to the current position in the
- history list. PCHAR is the character to use for prompting when reading
- the search string; if not specified (0), it defaults to `:'. */
-static void
-noninc_search (dir, pchar)
- int dir;
- int pchar;
+static _rl_search_cxt *
+_rl_nsearch_init (dir, pchar)
+ int dir, pchar;
{
- int saved_point, saved_mark, c;
+ _rl_search_cxt *cxt;
char *p;
-#if defined (HANDLE_MULTIBYTE)
- char mb[MB_LEN_MAX];
-#endif
+
+ cxt = _rl_scxt_alloc (RL_SEARCH_NSEARCH, 0);
+ if (dir < 0)
+ cxt->sflags |= SF_REVERSE; /* not strictly needed */
+
+ cxt->direction = dir;
+ cxt->history_pos = cxt->save_line;
rl_maybe_save_line ();
- saved_point = rl_point;
- saved_mark = rl_mark;
+
+ /* Clear the undo list, since reading the search string should create its
+ own undo list, and the whole list will end up being freed when we
+ finish reading the search string. */
+ rl_undo_list = 0;
/* Use the line buffer to read the search string. */
rl_line_buffer[0] = 0;
@@ -197,99 +215,169 @@ noninc_search (dir, pchar)
rl_message (p, 0, 0);
free (p);
-#define SEARCH_RETURN rl_restore_prompt (); RL_UNSETSTATE(RL_STATE_NSEARCH); return
-
RL_SETSTATE(RL_STATE_NSEARCH);
- /* Read the search string. */
- while (1)
+
+ _rl_nscxt = cxt;
+
+ return cxt;
+}
+
+static int
+_rl_nsearch_cleanup (cxt, r)
+ _rl_search_cxt *cxt;
+ int r;
+{
+ _rl_scxt_dispose (cxt, 0);
+ _rl_nscxt = 0;
+
+ RL_UNSETSTATE(RL_STATE_NSEARCH);
+
+ return (r != 1);
+}
+
+static void
+_rl_nsearch_abort (cxt)
+ _rl_search_cxt *cxt;
+{
+ rl_maybe_unsave_line ();
+ rl_clear_message ();
+ rl_point = cxt->save_point;
+ rl_mark = cxt->save_mark;
+ rl_restore_prompt ();
+
+ RL_UNSETSTATE (RL_STATE_NSEARCH);
+}
+
+/* Process just-read character C according to search context CXT. Return -1
+ if the caller should abort the search, 0 if we should break out of the
+ loop, and 1 if we should continue to read characters. */
+static int
+_rl_nsearch_dispatch (cxt, c)
+ _rl_search_cxt *cxt;
+ int c;
+{
+ switch (c)
{
- RL_SETSTATE(RL_STATE_MOREINPUT);
- c = rl_read_key ();
- RL_UNSETSTATE(RL_STATE_MOREINPUT);
+ case CTRL('W'):
+ rl_unix_word_rubout (1, c);
+ break;
-#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- c = _rl_read_mbstring (c, mb, MB_LEN_MAX);
-#endif
+ case CTRL('U'):
+ rl_unix_line_discard (1, c);
+ break;
- if (c == 0)
- break;
+ case RETURN:
+ case NEWLINE:
+ return 0;
- switch (c)
+ case CTRL('H'):
+ case RUBOUT:
+ if (rl_point == 0)
{
- case CTRL('H'):
- case RUBOUT:
- if (rl_point == 0)
- {
- rl_maybe_unsave_line ();
- rl_clear_message ();
- rl_point = saved_point;
- rl_mark = saved_mark;
- SEARCH_RETURN;
- }
- _rl_rubout_char (1, c);
- break;
-
- case CTRL('W'):
- rl_unix_word_rubout (1, c);
- break;
-
- case CTRL('U'):
- rl_unix_line_discard (1, c);
- break;
-
- case RETURN:
- case NEWLINE:
- goto dosearch;
- /* NOTREACHED */
- break;
-
- case CTRL('C'):
- case CTRL('G'):
- rl_maybe_unsave_line ();
- rl_clear_message ();
- rl_point = saved_point;
- rl_mark = saved_mark;
- rl_ding ();
- SEARCH_RETURN;
+ _rl_nsearch_abort (cxt);
+ return -1;
+ }
+ _rl_rubout_char (1, c);
+ break;
+
+ case CTRL('C'):
+ case CTRL('G'):
+ rl_ding ();
+ _rl_nsearch_abort (cxt);
+ return -1;
- default:
+ default:
#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- rl_insert_text (mb);
- else
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ rl_insert_text (cxt->mb);
+ else
#endif
- _rl_insert_char (1, c);
- break;
- }
- (*rl_redisplay_function) ();
+ _rl_insert_char (1, c);
+ break;
}
- dosearch:
- rl_mark = saved_mark;
+ (*rl_redisplay_function) ();
+ return 1;
+}
+
+/* Perform one search according to CXT, using NONINC_SEARCH_STRING. Return
+ -1 if the search should be aborted, any other value means to clean up
+ using _rl_nsearch_cleanup (). Returns 1 if the search was successful,
+ 0 otherwise. */
+static int
+_rl_nsearch_dosearch (cxt)
+ _rl_search_cxt *cxt;
+{
+ rl_mark = cxt->save_mark;
/* If rl_point == 0, we want to re-use the previous search string and
start from the saved history position. If there's no previous search
string, punt. */
if (rl_point == 0)
{
- if (!noninc_search_string)
+ if (noninc_search_string == 0)
{
rl_ding ();
- SEARCH_RETURN;
+ rl_restore_prompt ();
+ RL_UNSETSTATE (RL_STATE_NSEARCH);
+ return -1;
}
}
else
{
/* We want to start the search from the current history position. */
- noninc_history_pos = where_history ();
+ noninc_history_pos = cxt->save_line;
FREE (noninc_search_string);
noninc_search_string = savestring (rl_line_buffer);
+
+ /* If we don't want the subsequent undo list generated by the search
+ matching a history line to include the contents of the search string,
+ we need to clear rl_line_buffer here. For now, we just clear the
+ undo list generated by reading the search string. (If the search
+ fails, the old undo list will be restored by rl_maybe_unsave_line.) */
+ rl_free_undo_list ();
}
rl_restore_prompt ();
- noninc_dosearch (noninc_search_string, dir);
- RL_UNSETSTATE(RL_STATE_NSEARCH);
+ return (noninc_dosearch (noninc_search_string, cxt->direction));
+}
+
+/* Search non-interactively through the history list. DIR < 0 means to
+ search backwards through the history of previous commands; otherwise
+ the search is for commands subsequent to the current position in the
+ history list. PCHAR is the character to use for prompting when reading
+ the search string; if not specified (0), it defaults to `:'. */
+static int
+noninc_search (dir, pchar)
+ int dir;
+ int pchar;
+{
+ _rl_search_cxt *cxt;
+ int c, r;
+
+ cxt = _rl_nsearch_init (dir, pchar);
+
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ return (0);
+
+ /* Read the search string. */
+ r = 0;
+ while (1)
+ {
+ c = _rl_search_getchar (cxt);
+
+ if (c == 0)
+ break;
+
+ r = _rl_nsearch_dispatch (cxt, c);
+ if (r < 0)
+ return 1;
+ else if (r == 0)
+ break;
+ }
+
+ r = _rl_nsearch_dosearch (cxt);
+ return ((r >= 0) ? _rl_nsearch_cleanup (cxt, r) : (r != 1));
}
/* Search forward through the history list for a string. If the vi-mode
@@ -298,8 +386,7 @@ int
rl_noninc_forward_search (count, key)
int count, key;
{
- noninc_search (1, (key == '?') ? '?' : 0);
- return 0;
+ return noninc_search (1, (key == '?') ? '?' : 0);
}
/* Reverse search the history list for a string. If the vi-mode code
@@ -308,8 +395,7 @@ int
rl_noninc_reverse_search (count, key)
int count, key;
{
- noninc_search (-1, (key == '/') ? '/' : 0);
- return 0;
+ return noninc_search (-1, (key == '/') ? '/' : 0);
}
/* Search forward through the history list for the last string searched
@@ -318,13 +404,15 @@ int
rl_noninc_forward_search_again (count, key)
int count, key;
{
+ int r;
+
if (!noninc_search_string)
{
rl_ding ();
return (-1);
}
- noninc_dosearch (noninc_search_string, 1);
- return 0;
+ r = noninc_dosearch (noninc_search_string, 1);
+ return (r != 1);
}
/* Reverse search in the history list for the last string searched
@@ -333,15 +421,34 @@ int
rl_noninc_reverse_search_again (count, key)
int count, key;
{
+ int r;
+
if (!noninc_search_string)
{
rl_ding ();
return (-1);
}
- noninc_dosearch (noninc_search_string, -1);
- return 0;
+ r = noninc_dosearch (noninc_search_string, -1);
+ return (r != 1);
}
+#if defined (READLINE_CALLBACKS)
+int
+_rl_nsearch_callback (cxt)
+ _rl_search_cxt *cxt;
+{
+ int c, r;
+
+ c = _rl_search_getchar (cxt);
+ r = _rl_nsearch_dispatch (cxt, c);
+ if (r != 0)
+ return 1;
+
+ r = _rl_nsearch_dosearch (cxt);
+ return ((r >= 0) ? _rl_nsearch_cleanup (cxt, r) : (r != 1));
+}
+#endif
+
static int
rl_history_search_internal (count, dir)
int count, dir;
diff --git a/readline/shell.c b/readline/shell.c
index 35b1c1d6ea9..346f8113d43 100644
--- a/readline/shell.c
+++ b/readline/shell.c
@@ -27,7 +27,6 @@
#endif
#include <sys/types.h>
-#include <stdio.h>
#if defined (HAVE_UNISTD_H)
# include <unistd.h>
@@ -49,8 +48,10 @@
# include <limits.h>
#endif
+#if defined (HAVE_FCNTL_H)
#include <fcntl.h>
-#ifdef HAVE_PWD_H
+#endif
+#if defined (HAVE_PWD_H)
#include <pwd.h>
#endif
@@ -60,9 +61,9 @@
#include "rlshell.h"
#include "xmalloc.h"
-#if !defined (HAVE_GETPW_DECLS)
+#if defined (HAVE_GETPWUID) && !defined (HAVE_GETPW_DECLS)
extern struct passwd *getpwuid PARAMS((uid_t));
-#endif /* !HAVE_GETPW_DECLS */
+#endif /* HAVE_GETPWUID && !HAVE_GETPW_DECLS */
#ifndef NULL
# define NULL 0
@@ -125,23 +126,27 @@ sh_set_lines_and_columns (lines, cols)
{
char *b;
-#if defined (HAVE_PUTENV)
- b = (char *)xmalloc (INT_STRLEN_BOUND (int) + sizeof ("LINES=") + 1);
- sprintf (b, "LINES=%d", lines);
- putenv (b);
- b = (char *)xmalloc (INT_STRLEN_BOUND (int) + sizeof ("COLUMNS=") + 1);
- sprintf (b, "COLUMNS=%d", cols);
- putenv (b);
-#else /* !HAVE_PUTENV */
-# if defined (HAVE_SETENV)
+#if defined (HAVE_SETENV)
b = (char *)xmalloc (INT_STRLEN_BOUND (int) + 1);
sprintf (b, "%d", lines);
setenv ("LINES", b, 1);
+ free (b);
+
b = (char *)xmalloc (INT_STRLEN_BOUND (int) + 1);
sprintf (b, "%d", cols);
setenv ("COLUMNS", b, 1);
-# endif /* HAVE_SETENV */
-#endif /* !HAVE_PUTENV */
+ free (b);
+#else /* !HAVE_SETENV */
+# if defined (HAVE_PUTENV)
+ b = (char *)xmalloc (INT_STRLEN_BOUND (int) + sizeof ("LINES=") + 1);
+ sprintf (b, "LINES=%d", lines);
+ putenv (b);
+
+ b = (char *)xmalloc (INT_STRLEN_BOUND (int) + sizeof ("COLUMNS=") + 1);
+ sprintf (b, "COLUMNS=%d", cols);
+ putenv (b);
+# endif /* HAVE_PUTENV */
+#endif /* !HAVE_SETENV */
}
char *
@@ -158,7 +163,7 @@ sh_get_home_dir ()
struct passwd *entry;
home_dir = (char *)NULL;
-#ifdef HAVE_GETPWUID
+#if defined (HAVE_GETPWUID)
entry = getpwuid (getuid ());
if (entry)
home_dir = entry->pw_dir;
@@ -176,7 +181,7 @@ int
sh_unset_nodelay_mode (fd)
int fd;
{
-#ifdef HAVE_FNCTL
+#if defined (HAVE_FCNTL)
int flags, bflags;
if ((flags = fcntl (fd, F_GETFL, 0)) < 0)
diff --git a/readline/shlib/Makefile.in b/readline/shlib/Makefile.in
index 22748c47c03..40039c38bcd 100644
--- a/readline/shlib/Makefile.in
+++ b/readline/shlib/Makefile.in
@@ -1,7 +1,7 @@
## -*- text -*- ##
# Makefile for the GNU readline library shared library support.
#
-# Copyright (C) 1998 Free Software Foundation, Inc.
+# Copyright (C) 1998-2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,6 +17,14 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
+PACKAGE = @PACKAGE_NAME@
+VERSION = @PACKAGE_VERSION@
+
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+
RL_LIBRARY_VERSION = @LIBVERSION@
RL_LIBRARY_NAME = readline
@@ -45,7 +53,10 @@ host_os = @host_os@
prefix = @prefix@
exec_prefix = @exec_prefix@
includedir = @includedir@
+bindir = @bindir@
libdir = @libdir@
+datadir = @datadir@
+localedir = $(datadir)/locale
# Support an alternate destination root directory for package building
DESTDIR =
@@ -55,7 +66,7 @@ LOCAL_CFLAGS = @LOCAL_CFLAGS@ -DRL_LIBRARY_VERSION='"$(RL_LIBRARY_VERSION)"'
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@ @LOCAL_LDFLAGS@ @CFLAGS@
-DEFS = @DEFS@
+DEFS = @DEFS@ @CROSS_COMPILE@
LOCAL_DEFS = @LOCAL_DEFS@
#
@@ -72,14 +83,20 @@ SHOBJ_LDFLAGS = @SHOBJ_LDFLAGS@
SHOBJ_XLDFLAGS = @SHOBJ_XLDFLAGS@
SHOBJ_LIBS = @SHOBJ_LIBS@
-SHLIB_XLDFLAGS = @SHLIB_XLDFLAGS@
+SHLIB_XLDFLAGS = @LDFLAGS@ @SHLIB_XLDFLAGS@
SHLIB_LIBS = @SHLIB_LIBS@
+
+SHLIB_DOT = @SHLIB_DOT@
+SHLIB_LIBPREF = @SHLIB_LIBPREF@
SHLIB_LIBSUFF = @SHLIB_LIBSUFF@
SHLIB_LIBVERSION = @SHLIB_LIBVERSION@
+SHLIB_DLLVERSION = @SHLIB_DLLVERSION@
SHLIB_STATUS = @SHLIB_STATUS@
+TERMCAP_LIB = @TERMCAP_LIB@
+
# shared library versioning
SHLIB_MAJOR= @SHLIB_MAJOR@
# shared library systems like SVR4's do not use minor versions
@@ -99,8 +116,8 @@ CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) $(INCLUDES) $(LOCAL_CFLAGS) $(CFLAGS
# The name of the main library target.
-SHARED_READLINE = libreadline.$(SHLIB_LIBVERSION)
-SHARED_HISTORY = libhistory.$(SHLIB_LIBVERSION)
+SHARED_READLINE = $(SHLIB_LIBPREF)readline$(SHLIB_DOT)$(SHLIB_LIBVERSION)
+SHARED_HISTORY = $(SHLIB_LIBPREF)history$(SHLIB_DOT)$(SHLIB_LIBVERSION)
SHARED_LIBS = $(SHARED_READLINE) $(SHARED_HISTORY)
WCWIDTH_OBJ = @WCWIDTH_OBJ@
@@ -117,7 +134,7 @@ CSOURCES = $(topdir)/readline.c $(topdir)/funmap.c $(topdir)/keymaps.c \
$(topdir)/histfile.c $(topdir)/nls.c $(topdir)/search.c \
$(topdir)/shell.c $(topdir)/savestring.c $(topdir)/tilde.c \
$(topdir)/text.c $(topdir)/misc.c $(topdir)/compat.c \
- $(topdir)/mbutil.c $(WCWIDTH_SRC)
+ $(topdir)/mbutil.c $(topdir)/support/wcwidth.c
# The header files for this library.
HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \
@@ -170,13 +187,13 @@ installdirs: $(topdir)/support/mkdirs
-$(SHELL) $(topdir)/support/mkdirs $(DESTDIR)$(libdir)
install: installdirs $(SHLIB_STATUS)
- $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -d $(DESTDIR)$(libdir) -i "$(INSTALL_DATA)" $(SHARED_HISTORY)
- $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -d $(DESTDIR)$(libdir) -i "$(INSTALL_DATA)" $(SHARED_READLINE)
+ $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -i "$(INSTALL_DATA)" $(SHARED_HISTORY)
+ $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -i "$(INSTALL_DATA)" $(SHARED_READLINE)
@echo install: you may need to run ldconfig
uninstall:
- $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -d $(DESTDIR)$(libdir) -U $(SHARED_HISTORY)
- $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -d $(DESTDIR)$(libdir) -U $(SHARED_READLINE)
+ $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -U $(SHARED_HISTORY)
+ $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -U $(SHARED_READLINE)
@echo uninstall: you may need to run ldconfig
clean mostlyclean: force
@@ -396,7 +413,7 @@ search.so: $(topdir)/search.c
shell.so: $(topdir)/shell.c
signals.so: $(topdir)/signals.c
terminal.so: $(topdir)/terminal.c
-text.so: $(topdir)/terminal.c
+text.so: $(topdir)/text.c
tilde.so: $(topdir)/tilde.c
undo.so: $(topdir)/undo.c
util.so: $(topdir)/util.c
@@ -430,7 +447,7 @@ search.so: search.c
signals.so: signals.c
shell.so: shell.c
terminal.so: terminal.c
-text.so: terminal.c
+text.so: text.c
tilde.so: tilde.c
undo.so: undo.c
util.so: util.c
diff --git a/readline/signals.c b/readline/signals.c
index fa3e26af544..f344ed83497 100644
--- a/readline/signals.c
+++ b/readline/signals.c
@@ -1,6 +1,6 @@
/* signals.c -- signal handling support for readline. */
-/* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -73,6 +73,10 @@ typedef struct { SigHandler *sa_handler; int sa_mask, sa_flags; } sighandler_cxt
# define sigemptyset(m)
#endif /* !HAVE_POSIX_SIGNALS */
+#ifndef SA_RESTART
+# define SA_RESTART 0
+#endif
+
static SigHandler *rl_set_sighandler PARAMS((int, SigHandler *, sighandler_cxt *));
static void rl_maybe_set_sighandler PARAMS((int, SigHandler *, sighandler_cxt *));
@@ -85,12 +89,12 @@ int rl_catch_signals = 1;
/* If non-zero, readline will install a signal handler for SIGWINCH. */
#ifdef SIGWINCH
int rl_catch_sigwinch = 1;
+#else
+int rl_catch_sigwinch = 0; /* for the readline state struct in readline.c */
#endif
static int signals_set_flag;
-#ifdef SIGWINCH
static int sigwinch_set_flag;
-#endif
/* **************************************************************** */
/* */
@@ -127,11 +131,11 @@ rl_signal_handler (sig)
#if !defined (HAVE_BSD_SIGNALS) && !defined (HAVE_POSIX_SIGNALS)
/* Since the signal will not be blocked while we are in the signal
handler, ignore it until rl_clear_signals resets the catcher. */
- if (sig == SIGINT
-#ifdef SIGALRM
- || sig == SIGALRM
-#endif
- )
+# if defined (SIGALRM)
+ if (sig == SIGINT || sig == SIGALRM)
+# else
+ if (sig == SIGINT)
+# endif
rl_set_sighandler (sig, SIG_IGN, &dummy_cxt);
#endif /* !HAVE_BSD_SIGNALS && !HAVE_POSIX_SIGNALS */
@@ -141,16 +145,16 @@ rl_signal_handler (sig)
rl_free_line_state ();
/* FALLTHROUGH */
+ case SIGTERM:
#if defined (SIGTSTP)
case SIGTSTP:
case SIGTTOU:
case SIGTTIN:
#endif /* SIGTSTP */
-#ifdef SIGALRM
+#if defined (SIGALRM)
case SIGALRM:
#endif
- case SIGTERM:
-#ifdef SIGQUIT
+#if defined (SIGQUIT)
case SIGQUIT:
#endif
rl_cleanup_after_signal ();
@@ -168,13 +172,10 @@ rl_signal_handler (sig)
signal (sig, SIG_ACK);
#endif
- /* If we have the POSIX kill function, use it; otherwise, fall
- back to the ISO C raise function. (Windows is an example of
- a platform that has raise, but not kill.) */
-#ifdef HAVE_KILL
+#if defined (HAVE_KILL)
kill (getpid (), sig);
#else
- raise (sig);
+ raise (sig); /* assume we have raise */
#endif
/* Let the signal that we just sent through. */
@@ -250,7 +251,7 @@ rl_set_sighandler (sig, handler, ohandler)
struct sigaction act;
act.sa_handler = handler;
- act.sa_flags = 0; /* XXX - should we set SA_RESTART for SIGWINCH? */
+ act.sa_flags = (sig == SIGWINCH) ? SA_RESTART : 0;
sigemptyset (&act.sa_mask);
sigemptyset (&ohandler->sa_mask);
sigaction (sig, &act, &old_handler);
@@ -292,11 +293,11 @@ rl_set_signals ()
{
rl_maybe_set_sighandler (SIGINT, rl_signal_handler, &old_int);
rl_maybe_set_sighandler (SIGTERM, rl_signal_handler, &old_term);
-#ifdef SIGQUIT
+#if defined (SIGQUIT)
rl_maybe_set_sighandler (SIGQUIT, rl_signal_handler, &old_quit);
#endif
-#ifdef SIGALRM
+#if defined (SIGALRM)
oh = rl_set_sighandler (SIGALRM, rl_signal_handler, &old_alrm);
if (oh == (SigHandler *)SIG_IGN)
rl_sigaction (SIGALRM, &old_alrm, &dummy);
@@ -347,10 +348,10 @@ rl_clear_signals ()
rl_sigaction (SIGINT, &old_int, &dummy);
rl_sigaction (SIGTERM, &old_term, &dummy);
-#ifdef SIGQUIT
+#if defined (SIGQUIT)
rl_sigaction (SIGQUIT, &old_quit, &dummy);
#endif
-#ifdef SIGALRM
+#if defined (SIGALRM)
rl_sigaction (SIGALRM, &old_alrm, &dummy);
#endif
@@ -387,7 +388,8 @@ void
rl_cleanup_after_signal ()
{
_rl_clean_up_for_exit ();
- (*rl_deprep_term_function) ();
+ if (rl_deprep_term_function)
+ (*rl_deprep_term_function) ();
rl_clear_signals ();
rl_clear_pending_input ();
}
@@ -396,7 +398,8 @@ rl_cleanup_after_signal ()
void
rl_reset_after_signal ()
{
- (*rl_prep_term_function) (_rl_meta_flag);
+ if (rl_prep_term_function)
+ (*rl_prep_term_function) (_rl_meta_flag);
rl_set_signals ();
}
@@ -417,7 +420,7 @@ rl_free_line_state ()
_rl_kill_kbd_macro ();
rl_clear_message ();
- _rl_init_argument ();
+ _rl_reset_argument ();
}
#endif /* HANDLE_SIGNALS */
diff --git a/readline/support/shlib-install b/readline/support/shlib-install
index 654cfa9dd53..2cd252a3658 100755
--- a/readline/support/shlib-install
+++ b/readline/support/shlib-install
@@ -3,7 +3,7 @@
# shlib-install - install a shared library and do any necessary host-specific
# post-installation configuration (like ldconfig)
#
-# usage: shlib-install [-D] -O host_os -d installation-dir -i install-prog [-U] library
+# usage: shlib-install [-D] -O host_os -d installation-dir [-b bin-dir] -i install-prog [-U] library
#
# Chet Ramey
# chet@po.cwru.edu
@@ -15,7 +15,7 @@ INSTALLDIR=/usr/local/lib
LDCONFIG=ldconfig
PROGNAME=`basename $0`
-USAGE="$PROGNAME [-D] -O host_os -d installation-dir -i install-prog [-U] library"
+USAGE="$PROGNAME [-D] -O host_os -d installation-dir [-b bin-dir] -i install-prog [-U] library"
# process options
@@ -23,6 +23,7 @@ while [ $# -gt 0 ]; do
case "$1" in
-O) shift; host_os="$1"; shift ;;
-d) shift; INSTALLDIR="$1"; shift ;;
+ -b) shift; BINDIR="$1" ; shift ;;
-i) shift; INSTALLPROG="$1" ; shift ;;
-D) echo=echo ; shift ;;
-U) uninstall=true ; shift ;;
@@ -64,11 +65,30 @@ fi
# post-install/uninstall
# HP-UX and Darwin/MacOS X require that a shared library have execute permission
+# Cygwin installs both a dll (which must go in $BINDIR) and an implicit
+# link library (in $libdir)
case "$host_os" in
hpux*|darwin*|macosx*)
if [ -z "$uninstall" ]; then
chmod 555 ${INSTALLDIR}/${LIBNAME}
fi ;;
+cygwin*)
+ IMPLIBNAME=`echo ${LIBNAME} \
+ | sed -e 's,^cyg,lib,' -e 's,[0-9]*.dll$,.dll.a,'`
+ if [ -z "$uninstall" ]; then
+ ${echo} $RM ${BINDIR}/${LIBNAME}.${OLDSUFF}
+ if [ -f "$BINDIR/$LIBNAME" ]; then
+ ${echo} $MV $BINDIR/$LIBNAME $BINDIR/$LIBNAME.$OLDSUFF
+ fi
+ ${echo} $MV ${INSTALLDIR}/${LIBNAME} ${BINDIR}/${LIBNAME}
+ ${echo} chmod a+x ${BINDIR}/${LIBNAME}
+ ${echo} eval ${INSTALLPROG} ${LIBNAME}.a \
+ ${INSTALLDIR}/${IMPLIBNAME}
+ else
+ ${echo} ${RM} ${BINDIR}/${LIBNAME}
+ ${echo} ${RM} ${INSTALLDIR}/${IMPLIBNAME}
+ fi ;;
+
*) ;;
esac
@@ -88,24 +108,38 @@ case "$LIBNAME" in
LINK1=`echo $LIBNAME | sed 's:\(.*\)\.[0-9]\.[0-9]:\1:'` # libname.dylib
esac
-INSTALL_LINK1='cd $INSTALLDIR ; ln -s $LIBNAME $LINK1'
-INSTALL_LINK2='cd $INSTALLDIR ; ln -s $LIBNAME $LINK2'
+INSTALL_LINK1='${echo} cd $INSTALLDIR && ${echo} ${LN} $LIBNAME $LINK1'
+INSTALL_LINK2='${echo} cd $INSTALLDIR && ${echo} ${LN} $LIBNAME $LINK2'
#
# Create symlinks to the installed library. This section is incomplete.
#
case "$host_os" in
-*linux*|bsdi4*|*gnu*|darwin*|macosx*)
+*linux*)
+ # libname.so.M -> libname.so.M.N
+ ${echo} ${RM} ${INSTALLDIR}/$LINK2
+ if [ -z "$uninstall" ]; then
+ eval $INSTALL_LINK2
+ fi
+
+ # libname.so -> libname.so.M
+ ${echo} ${RM} ${INSTALLDIR}/$LINK1
+ if [ -z "$uninstall" ]; then
+ ${echo} cd $INSTALLDIR && ${echo} ${LN} $LINK2 $LINK1
+ fi
+ ;;
+
+bsdi4*|*gnu*|darwin*|macosx*|k*bsd*-gnu)
# libname.so.M -> libname.so.M.N
${echo} ${RM} ${INSTALLDIR}/$LINK2
if [ -z "$uninstall" ]; then
- ${echo} ln -s $LIBNAME ${INSTALLDIR}/$LINK2
+ eval $INSTALL_LINK2
fi
# libname.so -> libname.so.M.N
${echo} ${RM} ${INSTALLDIR}/$LINK1
if [ -z "$uninstall" ]; then
- ${echo} ln -s $LIBNAME ${INSTALLDIR}/$LINK1
+ eval $INSTALL_LINK1
fi
;;
@@ -113,7 +147,7 @@ solaris2*|aix4.[2-9]*|osf*|irix[56]*|sysv[45]*|dgux*)
# libname.so -> libname.so.M
${echo} ${RM} ${INSTALLDIR}/$LINK1
if [ -z "$uninstall" ]; then
- ${echo} ln -s $LIBNAME ${INSTALLDIR}/$LINK1
+ eval $INSTALL_LINK1
fi
;;
@@ -124,19 +158,19 @@ freebsd[3-9]*|freebsdelf[3-9]*|freebsdaout[3-9]*)
# libname.so -> libname.so.M
${echo} ${RM} ${INSTALLDIR}/$LINK1
if [ -z "$uninstall" ]; then
- ${echo} ln -s $LIBNAME ${INSTALLDIR}/$LINK1
+ eval $INSTALL_LINK1
fi
else
# libname.so.M -> libname.so.M.N
${echo} ${RM} ${INSTALLDIR}/$LINK2
if [ -z "$uninstall" ]; then
- ${echo} ln -s $LIBNAME ${INSTALLDIR}/$LINK2
+ eval $INSTALL_LINK2
fi
# libname.so -> libname.so.M.N
${echo} ${RM} ${INSTALLDIR}/$LINK1
if [ -z "$uninstall" ]; then
- ${echo} ln -s $LIBNAME ${INSTALLDIR}/$LINK1
+ eval $INSTALL_LINK1
fi
fi
;;
@@ -145,11 +179,16 @@ hpux1*)
# libname.sl -> libname.M
${echo} ${RM} ${INSTALLDIR}/$LINK1.sl
if [ -z "$uninstall" ]; then
-# ${echo} ln -s $LIBNAME ${INSTALLDIR}/${LINK1}.sl
- ${echo} ln -s $LIBNAME ${INSTALLDIR}/${LINK1}
+ eval $INSTALL_LINK1
fi
;;
+cygwin*)
+ # Links to .dlls don't work. Hence shobj-conf used DLLVERSION.dll
+ # instead of so.SHLIB_MAJOR.SHLIB_MINOR. The postinstall above
+ # took care of everything else.
+ ;;
+
*) ;;
esac
diff --git a/readline/support/shobj-conf b/readline/support/shobj-conf
index 6bd7fb120ca..0e306bc1a72 100755
--- a/readline/support/shobj-conf
+++ b/readline/support/shobj-conf
@@ -41,9 +41,13 @@ SHOBJ_LIBS=
SHLIB_XLDFLAGS=
SHLIB_LIBS=
+
+SHLIB_DOT='.'
+SHLIB_LIBPREF='lib'
SHLIB_LIBSUFF='so'
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF)'
+SHLIB_DLLVERSION='$(SHLIB_MAJOR)'
PROGNAME=`basename $0`
USAGE="$PROGNAME [-C compiler] -c host_cpu -o host_os -v host_vendor"
@@ -78,10 +82,14 @@ sunos4*)
sunos5*-*gcc*|solaris2*-*gcc*)
SHOBJ_CFLAGS=-fpic
SHOBJ_LD='${CC}'
- # This line works for the Solaris linker in /usr/ccs/bin/ld
- SHOBJ_LDFLAGS='-shared -Wl,-i -Wl,-h,$@'
- # This line works for the GNU ld
-# SHOBJ_LDFLAGS='-shared -Wl,-h,$@'
+ ld_used=`gcc -print-prog-name=ld`
+ if ${ld_used} -V 2>&1 | grep GNU >/dev/null 2>&1; then
+ # This line works for the GNU ld
+ SHOBJ_LDFLAGS='-shared -Wl,-h,$@'
+ else
+ # This line works for the Solaris linker in /usr/ccs/bin/ld
+ SHOBJ_LDFLAGS='-shared -Wl,-i -Wl,-h,$@'
+ fi
# SHLIB_XLDFLAGS='-R $(libdir)'
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
@@ -97,7 +105,7 @@ sunos5*|solaris2*)
;;
# All versions of Linux or the semi-mythical GNU Hurd.
-linux*|gnu*)
+linux*-*|gnu*-*|k*bsd*-gnu-*)
SHOBJ_CFLAGS=-fPIC
SHOBJ_LD='${CC}'
SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
@@ -116,7 +124,7 @@ freebsd2* | netbsd*)
;;
# FreeBSD-3.x ELF
-freebsd[3-9]*|freebsdelf[3-9]*|freebsdaout[3-9]*)
+freebsd[3-9]*|freebsdelf[3-9]*|freebsdaout[3-9]*|dragonfly*)
SHOBJ_CFLAGS=-fpic
SHOBJ_LD='${CC}'
@@ -138,17 +146,23 @@ darwin*|macosx*)
SHOBJ_STATUS=unsupported
SHLIB_STATUS=supported
- SHOBJ_CFLAGS='-dynamic -fno-common'
+ SHOBJ_CFLAGS='-fno-common'
- SHOBJ_LD=/usr/bin/libtool
+ SHOBJ_LD='${CC}'
SHLIB_LIBVERSION='$(SHLIB_MAJOR)$(SHLIB_MINOR).$(SHLIB_LIBSUFF)'
SHLIB_LIBSUFF='dylib'
- SHOBJ_LDFLAGS='-dynamic'
- SHLIB_XLDFLAGS='-arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
+ case "${host_os}" in
+ darwin[78]*) SHOBJ_LDFLAGS=''
+ SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
+ ;;
+ *) SHOBJ_LDFLAGS='-dynamic'
+ SHLIB_XLDFLAGS='-arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
+ ;;
+ esac
- SHLIB_LIBS='-lSystem'
+ SHLIB_LIBS='-lncurses' # see if -lcurses works on MacOS X 10.1
;;
openbsd*)
@@ -296,6 +310,8 @@ hpux10*-*gcc*)
# must use gcc; the bundled cc cannot compile PIC code
SHOBJ_CFLAGS='-fpic'
SHOBJ_LD='${CC}'
+ # if you have problems linking here, moving the `-Wl,+h,$@' from
+ # SHLIB_XLDFLAGS to SHOBJ_LDFLAGS has been reported to work
SHOBJ_LDFLAGS='-shared -Wl,-b -Wl,+s'
SHLIB_XLDFLAGS='-Wl,+h,$@ -Wl,+b,$(libdir)'
@@ -400,7 +416,39 @@ sysv5uw7*)
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
;;
-
+
+sysv5UnixWare*-*gcc*)
+ SHOBJ_CFLAGS=-fpic
+ SHOBJ_LD='${CC}'
+ SHOBJ_LDFLAGS='-shared'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+sysv5UnixWare*)
+ SHOBJ_CFLAGS='-K PIC'
+ SHOBJ_LD=ld
+ SHOBJ_LDFLAGS='-G -dy -z text -h $@'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+sysv5OpenUNIX*-*gcc*)
+ SHOBJ_CFLAGS=-fpic
+ SHOBJ_LD='${CC}'
+ SHOBJ_LDFLAGS='-shared'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+sysv5OpenUNIX*)
+ SHOBJ_CFLAGS='-K PIC'
+ SHOBJ_LD=ld
+ SHOBJ_LDFLAGS='-G -dy -z text -h $@'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
dgux*-*gcc*)
SHOBJ_CFLAGS=-fpic
SHOBJ_LD='${CC}'
@@ -422,6 +470,24 @@ msdos*)
SHLIB_STATUS=unsupported
;;
+cygwin*)
+ SHOBJ_LD='$(CC)'
+ SHOBJ_LDFLAGS='-shared -Wl,--enable-auto-import -Wl,--enable-auto-image-base -Wl,--export-all -Wl,--out-implib=$(@).a'
+ SHLIB_LIBPREF='cyg'
+ SHLIB_LIBSUFF='dll'
+ SHLIB_LIBVERSION='$(SHLIB_DLLVERSION).$(SHLIB_LIBSUFF)'
+ SHLIB_LIBS='$(TERMCAP_LIB)'
+
+ SHLIB_DOT=
+ # For official cygwin releases, DLLVERSION will be defined in the
+ # environment of configure, and will be incremented any time the API
+ # changes in a non-backwards compatible manner. Otherwise, it is just
+ # SHLIB_MAJOR.
+ if [ -n "$DLLVERSION" ] ; then
+ SHLIB_DLLVERSION="$DLLVERSION"
+ fi
+ ;;
+
#
# Rely on correct gcc configuration for everything else
#
@@ -449,8 +515,14 @@ echo SHOBJ_LIBS=\'"$SHOBJ_LIBS"\'
echo SHLIB_XLDFLAGS=\'"$SHLIB_XLDFLAGS"\'
echo SHLIB_LIBS=\'"$SHLIB_LIBS"\'
+
+echo SHLIB_DOT=\'"$SHLIB_DOT"\'
+
+echo SHLIB_LIBPREF=\'"$SHLIB_LIBPREF"\'
echo SHLIB_LIBSUFF=\'"$SHLIB_LIBSUFF"\'
+
echo SHLIB_LIBVERSION=\'"$SHLIB_LIBVERSION"\'
+echo SHLIB_DLLVERSION=\'"$SHLIB_DLLVERSION"\'
echo SHOBJ_STATUS=\'"$SHOBJ_STATUS"\'
echo SHLIB_STATUS=\'"$SHLIB_STATUS"\'
diff --git a/readline/terminal.c b/readline/terminal.c
index ce45d28d024..21732a791bb 100644
--- a/readline/terminal.c
+++ b/readline/terminal.c
@@ -1,6 +1,6 @@
/* terminal.c -- controlling the terminal with termcap. */
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -78,6 +78,8 @@
#define CUSTOM_REDISPLAY_FUNC() (rl_redisplay_function != rl_redisplay)
#define CUSTOM_INPUT_FUNC() (rl_getc_function != rl_getc)
+int rl_prefer_env_winsize;
+
/* **************************************************************** */
/* */
/* Terminal and Termcap */
@@ -87,9 +89,6 @@
#ifndef __MSDOS__
static char *term_buffer = (char *)NULL;
static char *term_string_buffer = (char *)NULL;
-
-/* Non-zero means this terminal can't really do anything. */
-static int dumb_term;
#endif /* !__MSDOS__ */
static int tcap_initialized;
@@ -134,7 +133,7 @@ char *_rl_term_up;
static char *_rl_visible_bell;
/* Non-zero means the terminal can auto-wrap lines. */
-int _rl_term_autowrap;
+int _rl_term_autowrap = -1;
/* Non-zero means that this terminal has a meta key. */
static int term_has_meta;
@@ -159,6 +158,9 @@ static char *_rl_term_kh;
static char *_rl_term_kH;
static char *_rl_term_at7; /* @7 */
+/* Delete key */
+static char *_rl_term_kD;
+
/* Insert key */
static char *_rl_term_kI;
@@ -205,12 +207,14 @@ _rl_get_screen_size (tty, ignore_env)
#if defined (TIOCGWINSZ)
struct winsize window_size;
#endif /* TIOCGWINSZ */
+ int wr, wc;
+ wr = wc = -1;
#if defined (TIOCGWINSZ)
if (ioctl (tty, TIOCGWINSZ, &window_size) == 0)
{
- _rl_screenwidth = (int) window_size.ws_col;
- _rl_screenheight = (int) window_size.ws_row;
+ wc = (int) window_size.ws_col;
+ wr = (int) window_size.ws_row;
}
#endif /* TIOCGWINSZ */
@@ -232,13 +236,25 @@ _rl_get_screen_size (tty, ignore_env)
_emx_get_screensize (&_rl_screenwidth, &_rl_screenheight);
#endif
+ if (ignore_env || rl_prefer_env_winsize == 0)
+ {
+ _rl_screenwidth = wc;
+ _rl_screenheight = wr;
+ }
+ else
+ _rl_screenwidth = _rl_screenheight = -1;
+
/* Environment variable COLUMNS overrides setting of "co" if IGNORE_ENV
- is unset. */
+ is unset. If we prefer the environment, check it first before
+ assigning the value returned by the kernel. */
if (_rl_screenwidth <= 0)
{
if (ignore_env == 0 && (ss = sh_get_env_value ("COLUMNS")))
_rl_screenwidth = atoi (ss);
+ if (_rl_screenwidth <= 0)
+ _rl_screenwidth = wc;
+
#if defined (__DJGPP__)
if (_rl_screenwidth <= 0)
_rl_screenwidth = ScreenCols ();
@@ -255,6 +271,9 @@ _rl_get_screen_size (tty, ignore_env)
if (ignore_env == 0 && (ss = sh_get_env_value ("LINES")))
_rl_screenheight = atoi (ss);
+ if (_rl_screenheight <= 0)
+ _rl_screenheight = wr;
+
#if defined (__DJGPP__)
if (_rl_screenheight <= 0)
_rl_screenheight = ScreenRows ();
@@ -286,16 +305,20 @@ void
_rl_set_screen_size (rows, cols)
int rows, cols;
{
- if (rows == 0 || cols == 0)
- return;
+ if (_rl_term_autowrap == -1)
+ _rl_init_terminal_io (rl_terminal_name);
- _rl_screenheight = rows;
- _rl_screenwidth = cols;
-
- if (_rl_term_autowrap == 0)
- _rl_screenwidth--;
+ if (rows > 0)
+ _rl_screenheight = rows;
+ if (cols > 0)
+ {
+ _rl_screenwidth = cols;
+ if (_rl_term_autowrap == 0)
+ _rl_screenwidth--;
+ }
- _rl_screenchars = _rl_screenwidth * _rl_screenheight;
+ if (rows > 0 || cols > 0)
+ _rl_screenchars = _rl_screenwidth * _rl_screenheight;
}
void
@@ -314,6 +337,12 @@ rl_get_screen_size (rows, cols)
if (cols)
*cols = _rl_screenwidth;
}
+
+void
+rl_reset_screen_size ()
+{
+ _rl_get_screen_size (fileno (rl_instream), 0);
+}
void
rl_resize_terminal ()
@@ -347,6 +376,7 @@ static struct _tc_string tc_strings[] =
{ "ei", &_rl_term_ei },
{ "ic", &_rl_term_ic },
{ "im", &_rl_term_im },
+ { "kD", &_rl_term_kD }, /* delete */
{ "kH", &_rl_term_kH }, /* home down ?? */
{ "kI", &_rl_term_kI }, /* insert */
{ "kd", &_rl_term_kd },
@@ -381,11 +411,7 @@ get_term_capabilities (bp)
register int i;
for (i = 0; i < NUM_TC_STRINGS; i++)
-# ifdef __LCC__
*(tc_strings[i].tc_value) = tgetstr ((char *)tc_strings[i].tc_var, bp);
-# else
- *(tc_strings[i].tc_value) = tgetstr (tc_strings[i].tc_var, bp);
-# endif
#endif
tcap_initialized = 1;
}
@@ -401,7 +427,6 @@ _rl_init_terminal_io (terminal_name)
term = terminal_name ? terminal_name : sh_get_env_value ("TERM");
_rl_term_clrpag = _rl_term_cr = _rl_term_clreol = (char *)NULL;
tty = rl_instream ? fileno (rl_instream) : 0;
- _rl_screenwidth = _rl_screenheight = 0;
if (term == 0)
term = "dumb";
@@ -451,12 +476,17 @@ _rl_init_terminal_io (terminal_name)
_rl_term_autowrap = 0; /* used by _rl_get_screen_size */
+ /* Allow calling application to set default height and width, using
+ rl_set_screen_size */
+ if (_rl_screenwidth <= 0 || _rl_screenheight <= 0)
+ {
#if defined (__EMX__)
- _emx_get_screensize (&_rl_screenwidth, &_rl_screenheight);
- _rl_screenwidth--;
+ _emx_get_screensize (&_rl_screenwidth, &_rl_screenheight);
+ _rl_screenwidth--;
#else /* !__EMX__ */
- _rl_get_screen_size (tty, 0);
+ _rl_get_screen_size (tty, 0);
#endif /* !__EMX__ */
+ }
/* Defaults. */
if (_rl_screenwidth <= 0 || _rl_screenheight <= 0)
@@ -471,7 +501,7 @@ _rl_init_terminal_io (terminal_name)
_rl_term_im = _rl_term_ei = _rl_term_ic = _rl_term_IC = (char *)NULL;
_rl_term_up = _rl_term_dc = _rl_term_DC = _rl_visible_bell = (char *)NULL;
_rl_term_ku = _rl_term_kd = _rl_term_kl = _rl_term_kr = (char *)NULL;
- _rl_term_kh = _rl_term_kH = _rl_term_kI = (char *)NULL;
+ _rl_term_kh = _rl_term_kH = _rl_term_kI = _rl_term_kD = (char *)NULL;
_rl_term_ks = _rl_term_ke = _rl_term_at7 = (char *)NULL;
_rl_term_mm = _rl_term_mo = (char *)NULL;
_rl_term_ve = _rl_term_vs = (char *)NULL;
@@ -503,7 +533,10 @@ _rl_init_terminal_io (terminal_name)
_rl_term_autowrap = tgetflag ("am") && tgetflag ("xn");
- _rl_get_screen_size (tty, 0);
+ /* Allow calling application to set default height and width, using
+ rl_set_screen_size */
+ if (_rl_screenwidth <= 0 || _rl_screenheight <= 0)
+ _rl_get_screen_size (tty, 0);
/* "An application program can assume that the terminal can do
character insertion if *any one of* the capabilities `IC',
@@ -542,13 +575,15 @@ bind_termcap_arrow_keys (map)
xkeymap = _rl_keymap;
_rl_keymap = map;
- _rl_bind_if_unbound (_rl_term_ku, rl_get_previous_history);
- _rl_bind_if_unbound (_rl_term_kd, rl_get_next_history);
- _rl_bind_if_unbound (_rl_term_kr, rl_forward);
- _rl_bind_if_unbound (_rl_term_kl, rl_backward);
+ rl_bind_keyseq_if_unbound (_rl_term_ku, rl_get_previous_history);
+ rl_bind_keyseq_if_unbound (_rl_term_kd, rl_get_next_history);
+ rl_bind_keyseq_if_unbound (_rl_term_kr, rl_forward_char);
+ rl_bind_keyseq_if_unbound (_rl_term_kl, rl_backward_char);
+
+ rl_bind_keyseq_if_unbound (_rl_term_kh, rl_beg_of_line); /* Home */
+ rl_bind_keyseq_if_unbound (_rl_term_at7, rl_end_of_line); /* End */
- _rl_bind_if_unbound (_rl_term_kh, rl_beg_of_line); /* Home */
- _rl_bind_if_unbound (_rl_term_at7, rl_end_of_line); /* End */
+ rl_bind_keyseq_if_unbound (_rl_term_kD, rl_delete);
_rl_keymap = xkeymap;
}
@@ -575,6 +610,7 @@ int
rl_reset_terminal (terminal_name)
const char *terminal_name;
{
+ _rl_screenwidth = _rl_screenheight = 0;
_rl_init_terminal_io (terminal_name);
return 0;
}
@@ -656,8 +692,8 @@ rl_ding ()
tputs (_rl_visible_bell, 1, _rl_output_character_function);
break;
}
-#endif
/* FALLTHROUGH */
+#endif
case AUDIBLE_BELL:
fprintf (stderr, "\007");
fflush (stderr);
diff --git a/readline/text.c b/readline/text.c
index 2a7b724f481..bb87604aa6d 100644
--- a/readline/text.c
+++ b/readline/text.c
@@ -1,6 +1,6 @@
/* text.c -- text handling commands for readline. */
-/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -62,6 +62,11 @@
static int rl_change_case PARAMS((int, int));
static int _rl_char_search PARAMS((int, int, int));
+#if defined (READLINE_CALLBACKS)
+static int _rl_insert_next_callback PARAMS((_rl_callback_generic_arg *));
+static int _rl_char_search_callback PARAMS((_rl_callback_generic_arg *));
+#endif
+
/* **************************************************************** */
/* */
/* Insert and Delete */
@@ -170,6 +175,9 @@ _rl_fix_point (fix_mark_too)
}
#undef _RL_FIX_POINT
+/* Replace the contents of the line buffer between START and END with
+ TEXT. The operation is undoable. To replace the entire line in an
+ undoable mode, use _rl_replace_text(text, 0, rl_end); */
int
_rl_replace_text (text, start, end)
const char *text;
@@ -417,8 +425,7 @@ rl_end_of_line (count, key)
return 0;
}
-/* XXX - these might need changes for multibyte characters */
-/* Move forward a word. We do what Emacs does. */
+/* Move forward a word. We do what Emacs does. Handles multibyte chars. */
int
rl_forward_word (count, key)
int count, key;
@@ -435,68 +442,80 @@ rl_forward_word (count, key)
/* If we are not in a word, move forward until we are in one.
Then, move forward until we hit a non-alphabetic character. */
- c = rl_line_buffer[rl_point];
- if (rl_alphabetic (c) == 0)
+ c = _rl_char_value (rl_line_buffer, rl_point);
+
+ if (_rl_walphabetic (c) == 0)
{
- while (++rl_point < rl_end)
+ rl_point = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO);
+ while (rl_point < rl_end)
{
- c = rl_line_buffer[rl_point];
- if (rl_alphabetic (c))
+ c = _rl_char_value (rl_line_buffer, rl_point);
+ if (_rl_walphabetic (c))
break;
+ rl_point = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO);
}
}
if (rl_point == rl_end)
return 0;
- while (++rl_point < rl_end)
+ rl_point = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO);
+ while (rl_point < rl_end)
{
- c = rl_line_buffer[rl_point];
- if (rl_alphabetic (c) == 0)
+ c = _rl_char_value (rl_line_buffer, rl_point);
+ if (_rl_walphabetic (c) == 0)
break;
+ rl_point = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO);
}
+
--count;
}
return 0;
}
-/* Move backward a word. We do what Emacs does. */
+/* Move backward a word. We do what Emacs does. Handles multibyte chars. */
int
rl_backward_word (count, key)
int count, key;
{
- int c;
+ int c, p;
if (count < 0)
return (rl_forward_word (-count, key));
while (count)
{
- if (!rl_point)
+ if (rl_point == 0)
return 0;
/* Like rl_forward_word (), except that we look at the characters
just before point. */
- c = rl_line_buffer[rl_point - 1];
- if (rl_alphabetic (c) == 0)
+ p = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_NONZERO);
+ c = _rl_char_value (rl_line_buffer, p);
+
+ if (_rl_walphabetic (c) == 0)
{
- while (--rl_point)
+ rl_point = p;
+ while (rl_point > 0)
{
- c = rl_line_buffer[rl_point - 1];
- if (rl_alphabetic (c))
+ p = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_NONZERO);
+ c = _rl_char_value (rl_line_buffer, p);
+ if (_rl_walphabetic (c))
break;
+ rl_point = p;
}
}
while (rl_point)
{
- c = rl_line_buffer[rl_point - 1];
- if (rl_alphabetic (c) == 0)
+ p = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_NONZERO);
+ c = _rl_char_value (rl_line_buffer, p);
+ if (_rl_walphabetic (c) == 0)
break;
else
- --rl_point;
+ rl_point = p;
}
--count;
@@ -753,10 +772,8 @@ _rl_insert_char (count, c)
return 0;
}
-#if defined (HANDLE_MULTIBYTE)
if (MB_CUR_MAX == 1 || rl_byte_oriented)
{
-#endif
/* We are inserting a single character.
If there is pending input, then make a string of all of the
pending characters that are bound to rl_insert, and insert
@@ -772,8 +789,8 @@ _rl_insert_char (count, c)
str[0] = c;
rl_insert_text (str);
}
-#if defined (HANDLE_MULTIBYTE)
}
+#if defined (HANDLE_MULTIBYTE)
else
{
rl_insert_text (incoming);
@@ -801,13 +818,10 @@ _rl_overwrite_char (count, c)
k = _rl_read_mbstring (c, mbkey, MB_LEN_MAX);
#endif
+ rl_begin_undo_group ();
+
for (i = 0; i < count; i++)
{
- rl_begin_undo_group ();
-
- if (rl_point < rl_end)
- rl_delete (1, c);
-
#if defined (HANDLE_MULTIBYTE)
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
rl_insert_text (mbkey);
@@ -815,9 +829,12 @@ _rl_overwrite_char (count, c)
#endif
_rl_insert_char (1, c);
- rl_end_undo_group ();
+ if (rl_point < rl_end)
+ rl_delete (1, c);
}
+ rl_end_undo_group ();
+
return 0;
}
@@ -830,27 +847,63 @@ rl_insert (count, c)
}
/* Insert the next typed character verbatim. */
-int
-rl_quoted_insert (count, key)
- int count, key;
+static int
+_rl_insert_next (count)
+ int count;
{
int c;
-#if defined (HANDLE_SIGNALS)
- _rl_disable_tty_signals ();
-#endif
-
RL_SETSTATE(RL_STATE_MOREINPUT);
c = rl_read_key ();
RL_UNSETSTATE(RL_STATE_MOREINPUT);
#if defined (HANDLE_SIGNALS)
- _rl_restore_tty_signals ();
+ if (RL_ISSTATE (RL_STATE_CALLBACK) == 0)
+ _rl_restore_tty_signals ();
#endif
return (_rl_insert_char (count, c));
}
+#if defined (READLINE_CALLBACKS)
+static int
+_rl_insert_next_callback (data)
+ _rl_callback_generic_arg *data;
+{
+ int count;
+
+ count = data->count;
+
+ /* Deregister function, let rl_callback_read_char deallocate data */
+ _rl_callback_func = 0;
+ _rl_want_redisplay = 1;
+
+ return _rl_insert_next (count);
+}
+#endif
+
+int
+rl_quoted_insert (count, key)
+ int count, key;
+{
+ /* Let's see...should the callback interface futz with signal handling? */
+#if defined (HANDLE_SIGNALS)
+ if (RL_ISSTATE (RL_STATE_CALLBACK) == 0)
+ _rl_disable_tty_signals ();
+#endif
+
+#if defined (READLINE_CALLBACKS)
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ _rl_callback_data = _rl_callback_data_alloc (count);
+ _rl_callback_func = _rl_insert_next_callback;
+ return (0);
+ }
+#endif
+
+ return _rl_insert_next (count);
+}
+
/* Insert a tab character. */
int
rl_tab_insert (count, key)
@@ -877,7 +930,8 @@ rl_newline (count, key)
if (rl_editing_mode == vi_mode)
{
_rl_vi_done_inserting ();
- _rl_vi_reset_last ();
+ if (_rl_vi_textmod_command (_rl_vi_last_command) == 0) /* XXX */
+ _rl_vi_reset_last ();
}
#endif /* VI_MODE */
@@ -935,9 +989,12 @@ _rl_overwrite_rubout (count, key)
rl_delete_text (opoint, rl_point);
/* Emacs puts point at the beginning of the sequence of spaces. */
- opoint = rl_point;
- _rl_insert_char (l, ' ');
- rl_point = opoint;
+ if (rl_point < rl_end)
+ {
+ opoint = rl_point;
+ _rl_insert_char (l, ' ');
+ rl_point = opoint;
+ }
rl_end_undo_group ();
@@ -981,43 +1038,17 @@ _rl_rubout_char (count, key)
return -1;
}
+ orig_point = rl_point;
if (count > 1 || rl_explicit_arg)
{
- orig_point = rl_point;
-#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- rl_backward_char (count, key);
- else
-#endif
- rl_backward_byte (count, key);
+ rl_backward_char (count, key);
rl_kill_text (orig_point, rl_point);
}
- else
+ else if (MB_CUR_MAX == 1 || rl_byte_oriented)
{
-#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX == 1 || rl_byte_oriented)
- {
-#endif
- c = rl_line_buffer[--rl_point];
- rl_delete_text (rl_point, rl_point + 1);
-#if defined (HANDLE_MULTIBYTE)
- }
- else
- {
- int orig_point;
-
- orig_point = rl_point;
- rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO);
- c = rl_line_buffer[rl_point];
- rl_delete_text (rl_point, orig_point);
- }
-#endif /* HANDLE_MULTIBYTE */
-
- /* I don't think that the hack for end of line is needed for
- multibyte chars. */
-#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX == 1 || rl_byte_oriented)
-#endif
+ c = rl_line_buffer[--rl_point];
+ rl_delete_text (rl_point, orig_point);
+ /* The erase-at-end-of-line hack is of questionable merit now. */
if (rl_point == rl_end && ISPRINT (c) && _rl_last_c_pos)
{
int l;
@@ -1025,6 +1056,11 @@ _rl_rubout_char (count, key)
_rl_erase_at_end_of_line (l);
}
}
+ else
+ {
+ rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO);
+ rl_delete_text (rl_point, orig_point);
+ }
return 0;
}
@@ -1035,8 +1071,6 @@ int
rl_delete (count, key)
int count, key;
{
- int r;
-
if (count < 0)
return (_rl_rubout_char (-count, key));
@@ -1049,27 +1083,22 @@ rl_delete (count, key)
if (count > 1 || rl_explicit_arg)
{
int orig_point = rl_point;
-#if defined (HANDLE_MULTIBYTE)
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
rl_forward_char (count, key);
else
-#endif
rl_forward_byte (count, key);
- r = rl_kill_text (orig_point, rl_point);
+ rl_kill_text (orig_point, rl_point);
rl_point = orig_point;
- return r;
}
else
{
int new_point;
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- new_point = _rl_find_next_mbchar (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO);
- else
- new_point = rl_point + 1;
-
- return (rl_delete_text (rl_point, new_point));
+
+ new_point = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO);
+ rl_delete_text (rl_point, new_point);
}
+ return 0;
}
/* Delete the character under the cursor, unless the insertion
@@ -1106,6 +1135,10 @@ rl_delete_horizontal_space (count, ignore)
rl_delete_text (start, rl_point);
rl_point = start;
}
+
+ if (rl_point < 0)
+ rl_point = 0;
+
return 0;
}
@@ -1199,42 +1232,80 @@ static int
rl_change_case (count, op)
int count, op;
{
- register int start, end;
- int inword, c;
+ int start, next, end;
+ int inword, c, nc, nop;
+#if defined (HANDLE_MULTIBYTE)
+ wchar_t wc, nwc;
+ char mb[MB_LEN_MAX+1];
+ int mblen, p;
+ mbstate_t ps;
+#endif
start = rl_point;
rl_forward_word (count, 0);
end = rl_point;
+ if (op != UpCase && op != DownCase && op != CapCase)
+ {
+ rl_ding ();
+ return -1;
+ }
+
if (count < 0)
SWAP (start, end);
+#if defined (HANDLE_MULTIBYTE)
+ memset (&ps, 0, sizeof (mbstate_t));
+#endif
+
/* We are going to modify some text, so let's prepare to undo it. */
rl_modifying (start, end);
- for (inword = 0; start < end; start++)
+ inword = 0;
+ while (start < end)
{
- c = rl_line_buffer[start];
- switch (op)
- {
- case UpCase:
- rl_line_buffer[start] = _rl_to_upper (c);
- break;
+ c = _rl_char_value (rl_line_buffer, start);
+ /* This assumes that the upper and lower case versions are the same width. */
+ next = MB_NEXTCHAR (rl_line_buffer, start, 1, MB_FIND_NONZERO);
- case DownCase:
- rl_line_buffer[start] = _rl_to_lower (c);
- break;
-
- case CapCase:
- rl_line_buffer[start] = (inword == 0) ? _rl_to_upper (c) : _rl_to_lower (c);
- inword = rl_alphabetic (rl_line_buffer[start]);
- break;
+ if (_rl_walphabetic (c) == 0)
+ {
+ inword = 0;
+ start = next;
+ continue;
+ }
- default:
- rl_ding ();
- return -1;
+ if (op == CapCase)
+ {
+ nop = inword ? DownCase : UpCase;
+ inword = 1;
}
+ else
+ nop = op;
+ if (MB_CUR_MAX == 1 || rl_byte_oriented || isascii (c))
+ {
+ nc = (nop == UpCase) ? _rl_to_upper (c) : _rl_to_lower (c);
+ rl_line_buffer[start] = nc;
+ }
+#if defined (HANDLE_MULTIBYTE)
+ else
+ {
+ mbrtowc (&wc, rl_line_buffer + start, end - start, &ps);
+ nwc = (nop == UpCase) ? _rl_to_wupper (wc) : _rl_to_wlower (wc);
+ if (nwc != wc) /* just skip unchanged characters */
+ {
+ mblen = wcrtomb (mb, nwc, &ps);
+ if (mblen > 0)
+ mb[mblen] = '\0';
+ /* Assume the same width */
+ strncpy (rl_line_buffer + start, mb, mblen);
+ }
+ }
+#endif
+
+ start = next;
}
+
rl_point = end;
return 0;
}
@@ -1314,11 +1385,11 @@ rl_transpose_chars (count, key)
{
#if defined (HANDLE_MULTIBYTE)
char *dummy;
- int i, prev_point;
+ int i;
#else
char dummy[2];
#endif
- int char_length;
+ int char_length, prev_point;
if (count == 0)
return 0;
@@ -1333,20 +1404,12 @@ rl_transpose_chars (count, key)
if (rl_point == rl_end)
{
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO);
- else
- --rl_point;
+ rl_point = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_NONZERO);
count = 1;
}
-#if defined (HANDLE_MULTIBYTE)
prev_point = rl_point;
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO);
- else
-#endif
- rl_point--;
+ rl_point = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_NONZERO);
#if defined (HANDLE_MULTIBYTE)
char_length = prev_point - rl_point;
@@ -1480,10 +1543,33 @@ _rl_char_search (count, fdir, bdir)
}
#endif /* !HANDLE_MULTIBYTE */
+#if defined (READLINE_CALLBACKS)
+static int
+_rl_char_search_callback (data)
+ _rl_callback_generic_arg *data;
+{
+ _rl_callback_func = 0;
+ _rl_want_redisplay = 1;
+
+ return (_rl_char_search (data->count, data->i1, data->i2));
+}
+#endif
+
int
rl_char_search (count, key)
int count, key;
{
+#if defined (READLINE_CALLBACKS)
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ _rl_callback_data = _rl_callback_data_alloc (count);
+ _rl_callback_data->i1 = FFIND;
+ _rl_callback_data->i2 = BFIND;
+ _rl_callback_func = _rl_char_search_callback;
+ return (0);
+ }
+#endif
+
return (_rl_char_search (count, FFIND, BFIND));
}
@@ -1491,6 +1577,17 @@ int
rl_backward_char_search (count, key)
int count, key;
{
+#if defined (READLINE_CALLBACKS)
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ _rl_callback_data = _rl_callback_data_alloc (count);
+ _rl_callback_data->i1 = BFIND;
+ _rl_callback_data->i2 = FFIND;
+ _rl_callback_func = _rl_char_search_callback;
+ return (0);
+ }
+#endif
+
return (_rl_char_search (count, BFIND, FFIND));
}
diff --git a/readline/tilde.c b/readline/tilde.c
index 60fc7fc6cdd..32f3d3cf380 100644
--- a/readline/tilde.c
+++ b/readline/tilde.c
@@ -43,9 +43,9 @@
#endif /* HAVE_STDLIB_H */
#include <sys/types.h>
-#ifdef HAVE_PWD_H
+#if defined (HAVE_PWD_H)
#include <pwd.h>
-#endif /* HAVE_PWD_H */
+#endif
#include "tilde.h"
@@ -55,10 +55,14 @@ static void *xmalloc (), *xrealloc ();
# include "xmalloc.h"
#endif /* TEST || STATIC_MALLOC */
-#if defined (HAVE_GETPWNAM) && !defined (HAVE_GETPW_DECLS)
+#if !defined (HAVE_GETPW_DECLS)
+# if defined (HAVE_GETPWUID)
extern struct passwd *getpwuid PARAMS((uid_t));
+# endif
+# if defined (HAVE_GETPWNAM)
extern struct passwd *getpwnam PARAMS((const char *));
-#endif /* defined (HAVE_GETPWNAM) && !HAVE_GETPW_DECLS */
+# endif
+#endif /* !HAVE_GETPW_DECLS */
#if !defined (savestring)
#define savestring(x) strcpy ((char *)xmalloc (1 + strlen (x)), (x))
@@ -279,6 +283,39 @@ isolate_tilde_prefix (fname, lenp)
return ret;
}
+#if 0
+/* Public function to scan a string (FNAME) beginning with a tilde and find
+ the portion of the string that should be passed to the tilde expansion
+ function. Right now, it just calls tilde_find_suffix and allocates new
+ memory, but it can be expanded to do different things later. */
+char *
+tilde_find_word (fname, flags, lenp)
+ const char *fname;
+ int flags, *lenp;
+{
+ int x;
+ char *r;
+
+ x = tilde_find_suffix (fname);
+ if (x == 0)
+ {
+ r = savestring (fname);
+ if (lenp)
+ *lenp = 0;
+ }
+ else
+ {
+ r = (char *)xmalloc (1 + x);
+ strncpy (r, fname, x);
+ r[x] = '\0';
+ if (lenp)
+ *lenp = x;
+ }
+
+ return r;
+}
+#endif
+
/* Return a string that is PREFIX concatenated with SUFFIX starting at
SUFFIND. */
static char *
@@ -349,8 +386,11 @@ tilde_expand_word (filename)
/* No preexpansion hook, or the preexpansion hook failed. Look in the
password database. */
dirname = (char *)NULL;
-#ifdef HAVE_GETPWNAM
+#if defined (HAVE_GETPWNAM)
user_entry = getpwnam (username);
+#else
+ user_entry = 0;
+#endif
if (user_entry == 0)
{
/* If the calling program has a special syntax for expanding tildes,
@@ -370,12 +410,12 @@ tilde_expand_word (filename)
if (dirname == 0)
dirname = savestring (filename);
}
+#if defined (HAVE_GETPWENT)
else
{
free (username);
dirname = glue_prefix_and_suffix (user_entry->pw_dir, filename, user_len);
}
-
endpwent ();
#endif
return (dirname);
diff --git a/readline/tilde.h b/readline/tilde.h
index f8182c999d9..c58ce20e7a2 100644
--- a/readline/tilde.h
+++ b/readline/tilde.h
@@ -71,6 +71,9 @@ extern char *tilde_expand PARAMS((const char *));
tilde. If there is no expansion, call tilde_expansion_failure_hook. */
extern char *tilde_expand_word PARAMS((const char *));
+/* Find the portion of the string beginning with ~ that should be expanded. */
+extern char *tilde_find_word PARAMS((const char *, int, int *));
+
#ifdef __cplusplus
}
#endif
diff --git a/readline/undo.c b/readline/undo.c
index 25c287b5a2d..fedfa121fc0 100644
--- a/readline/undo.c
+++ b/readline/undo.c
@@ -237,7 +237,12 @@ rl_revert_line (count, key)
{
while (rl_undo_list)
rl_do_undo ();
+#if defined (VI_MODE)
+ if (rl_editing_mode == vi_mode)
+ rl_point = rl_mark = 0; /* rl_end should be set correctly */
+#endif
}
+
return 0;
}
diff --git a/readline/util.c b/readline/util.c
index c7bd360e43c..e44ef64349d 100644
--- a/readline/util.c
+++ b/readline/util.c
@@ -1,6 +1,6 @@
/* util.c -- readline utility functions */
-/* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -44,6 +44,7 @@
/* System-specific feature definitions and include files. */
#include "rldefs.h"
+#include "rlmbutil.h"
#if defined (TIOCSTAT_IN_SYS_IOCTL)
# include <sys/ioctl.h>
@@ -78,13 +79,29 @@ rl_alphabetic (c)
strchr (pathname_alphabetic_chars, c) != NULL);
}
+#if defined (HANDLE_MULTIBYTE)
+int
+_rl_walphabetic (wc)
+ wchar_t wc;
+{
+ int c;
+
+ if (iswalnum (wc))
+ return (1);
+
+ c = wc & 0177;
+ return (_rl_allow_pathname_alphabetic_chars &&
+ strchr (pathname_alphabetic_chars, c) != NULL);
+}
+#endif
+
/* How to abort things. */
int
_rl_abort_internal ()
{
rl_ding ();
rl_clear_message ();
- _rl_init_argument ();
+ _rl_reset_argument ();
rl_clear_pending_input ();
RL_UNSETSTATE (RL_STATE_MACRODEF);
@@ -250,7 +267,7 @@ _rl_strpbrk (string1, string2)
{
v = _rl_get_char_len (string1, &ps);
if (v > 1)
- string += v - 1; /* -1 to account for auto-increment in loop */
+ string1 += v - 1; /* -1 to account for auto-increment in loop */
}
#endif
}
diff --git a/readline/vi_keymap.c b/readline/vi_keymap.c
index 53a67c674ce..4b48c75cc5d 100644
--- a/readline/vi_keymap.c
+++ b/readline/vi_keymap.c
@@ -130,7 +130,7 @@ KEYMAP_ENTRY_ARRAY vi_movement_keymap = {
{ ISFUNC, rl_revert_line }, /* U */
{ ISFUNC, (rl_command_func_t *)0x0 }, /* V */
{ ISFUNC, rl_vi_next_word }, /* W */
- { ISFUNC, rl_rubout }, /* X */
+ { ISFUNC, rl_vi_rubout }, /* X */
{ ISFUNC, rl_vi_yank_to }, /* Y */
{ ISFUNC, (rl_command_func_t *)0x0 }, /* Z */
diff --git a/readline/vi_mode.c b/readline/vi_mode.c
index 89303644c59..ac5fd7446dc 100644
--- a/readline/vi_mode.c
+++ b/readline/vi_mode.c
@@ -1,7 +1,7 @@
/* vi_mode.c -- A vi emulation mode for Bash.
Derived from code written by Jeff Sparkes (jsparkes@bnr.ca). */
-/* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -63,6 +63,8 @@
#define member(c, s) ((c) ? (char *)strchr ((s), (c)) != (char *)NULL : 0)
#endif
+int _rl_vi_last_command = 'i'; /* default `.' puts you in insert mode */
+
/* Non-zero means enter insertion mode. */
static int _rl_vi_doing_insert;
@@ -83,12 +85,12 @@ static int vi_continued_command;
static char *vi_insert_buffer;
static int vi_insert_buffer_size;
-static int _rl_vi_last_command = 'i'; /* default `.' puts you in insert mode */
static int _rl_vi_last_repeat = 1;
static int _rl_vi_last_arg_sign = 1;
static int _rl_vi_last_motion;
#if defined (HANDLE_MULTIBYTE)
static char _rl_vi_last_search_mbchar[MB_LEN_MAX];
+static int _rl_vi_last_search_mblen;
#else
static int _rl_vi_last_search_char;
#endif
@@ -106,8 +108,22 @@ static int vi_mark_chars['z' - 'a' + 1];
static void _rl_vi_stuff_insert PARAMS((int));
static void _rl_vi_save_insert PARAMS((UNDO_LIST *));
+
+static int _rl_vi_arg_dispatch PARAMS((int));
static int rl_digit_loop1 PARAMS((void));
+static int _rl_vi_set_mark PARAMS((void));
+static int _rl_vi_goto_mark PARAMS((void));
+
+static int _rl_vi_callback_getchar PARAMS((char *, int));
+
+#if defined (READLINE_CALLBACKS)
+static int _rl_vi_callback_set_mark PARAMS((_rl_callback_generic_arg *));
+static int _rl_vi_callback_goto_mark PARAMS((_rl_callback_generic_arg *));
+static int _rl_vi_callback_change_char PARAMS((_rl_callback_generic_arg *));
+static int _rl_vi_callback_char_search PARAMS((_rl_callback_generic_arg *));
+#endif
+
void
_rl_vi_initialize_line ()
{
@@ -115,6 +131,8 @@ _rl_vi_initialize_line ()
for (i = 0; i < sizeof (vi_mark_chars) / sizeof (int); i++)
vi_mark_chars[i] = -1;
+
+ RL_UNSETSTATE(RL_STATE_VICMDONCE);
}
void
@@ -135,6 +153,16 @@ _rl_vi_set_last (key, repeat, sign)
_rl_vi_last_arg_sign = sign;
}
+/* A convenience function that calls _rl_vi_set_last to save the last command
+ information and enters insertion mode. */
+void
+rl_vi_start_inserting (key, repeat, sign)
+ int key, repeat, sign;
+{
+ _rl_vi_set_last (key, repeat, sign);
+ rl_vi_insertion_mode (1, key);
+}
+
/* Is the command C a VI mode text modification command? */
int
_rl_vi_textmod_command (c)
@@ -261,10 +289,12 @@ rl_vi_search (count, key)
switch (key)
{
case '?':
+ _rl_free_saved_history_line ();
rl_noninc_forward_search (count, key);
break;
case '/':
+ _rl_free_saved_history_line ();
rl_noninc_reverse_search (count, key);
break;
@@ -297,10 +327,8 @@ rl_vi_complete (ignore, key)
rl_complete (0, key);
if (key == '*' || key == '\\')
- {
- _rl_vi_set_last (key, 1, rl_arg_sign);
- rl_vi_insertion_mode (1, key);
- }
+ rl_vi_start_inserting (key, 1, rl_arg_sign);
+
return (0);
}
@@ -310,8 +338,7 @@ rl_vi_tilde_expand (ignore, key)
int ignore, key;
{
rl_tilde_expand (0, key);
- _rl_vi_set_last (key, 1, rl_arg_sign); /* XXX */
- rl_vi_insertion_mode (1, key);
+ rl_vi_start_inserting (key, 1, rl_arg_sign);
return (0);
}
@@ -429,7 +456,8 @@ rl_vi_eWord (count, ignore)
/* Move to the next non-whitespace character (to the start of the
next word). */
- while (++rl_point < rl_end && whitespace (rl_line_buffer[rl_point]));
+ while (rl_point < rl_end && whitespace (rl_line_buffer[rl_point]))
+ rl_point++;
if (rl_point && rl_point < rl_end)
{
@@ -640,7 +668,7 @@ _rl_vi_done_inserting ()
}
else
{
- if (_rl_vi_last_key_before_insert == 'i' && rl_undo_list)
+ if ((_rl_vi_last_key_before_insert == 'i' || _rl_vi_last_key_before_insert == 'a') && rl_undo_list)
_rl_vi_save_insert (rl_undo_list);
/* XXX - Other keys probably need to be checked. */
else if (_rl_vi_last_key_before_insert == 'C')
@@ -660,6 +688,13 @@ rl_vi_movement_mode (count, key)
_rl_keymap = vi_movement_keymap;
_rl_vi_done_inserting ();
+
+ /* This is how POSIX.2 says `U' should behave -- everything up until the
+ first time you go into command mode should not be undone. */
+ if (RL_ISSTATE (RL_STATE_VICMDONCE) == 0)
+ rl_free_undo_list ();
+
+ RL_SETSTATE (RL_STATE_VICMDONCE);
return (0);
}
@@ -681,7 +716,7 @@ _rl_vi_change_mbchar_case (count)
{
wchar_t wc;
char mb[MB_LEN_MAX+1];
- int mblen;
+ int mblen, p;
mbstate_t ps;
memset (&ps, 0, sizeof (mbstate_t));
@@ -704,11 +739,14 @@ _rl_vi_change_mbchar_case (count)
/* Vi is kind of strange here. */
if (wc)
{
- mblen = wctomb (mb, wc);
+ p = rl_point;
+ mblen = wcrtomb (mb, wc, &ps);
if (mblen >= 0)
mb[mblen] = '\0';
rl_begin_undo_group ();
- rl_delete (1, 0);
+ rl_vi_delete (1, 0);
+ if (rl_point < p) /* Did we retreat at EOL? */
+ rl_point++; /* XXX - should we advance more than 1 for mbchar? */
rl_insert_text (mb);
rl_end_undo_group ();
rl_vi_check ();
@@ -725,12 +763,13 @@ int
rl_vi_change_case (count, ignore)
int count, ignore;
{
- char c = 0;
+ int c, p;
/* Don't try this on an empty line. */
if (rl_point >= rl_end)
return (0);
+ c = 0;
#if defined (HANDLE_MULTIBYTE)
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
return (_rl_vi_change_mbchar_case (count));
@@ -752,8 +791,11 @@ rl_vi_change_case (count, ignore)
/* Vi is kind of strange here. */
if (c)
{
+ p = rl_point;
rl_begin_undo_group ();
- rl_delete (1, c);
+ rl_vi_delete (1, c);
+ if (rl_point < p) /* Did we retreat at EOL? */
+ rl_point++;
_rl_insert_char (1, c);
rl_end_undo_group ();
rl_vi_check ();
@@ -771,7 +813,9 @@ rl_vi_put (count, key)
if (!_rl_uppercase_p (key) && (rl_point + 1 <= rl_end))
rl_point = _rl_find_next_mbchar (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO);
- rl_yank (1, key);
+ while (count--)
+ rl_yank (1, key);
+
rl_backward_char (1, key);
return (0);
}
@@ -819,7 +863,10 @@ rl_vi_domove (key, nextkey)
{
save = rl_numeric_arg;
rl_numeric_arg = _rl_digit_value (c);
+ rl_explicit_arg = 1;
+ RL_SETSTATE (RL_STATE_NUMERICARG|RL_STATE_VIMOTION);
rl_digit_loop1 ();
+ RL_UNSETSTATE (RL_STATE_VIMOTION);
rl_numeric_arg *= save;
RL_SETSTATE(RL_STATE_MOREINPUT);
c = rl_read_key (); /* real command */
@@ -892,52 +939,59 @@ rl_vi_domove (key, nextkey)
return (0);
}
+/* Process C as part of the current numeric argument. Return -1 if the
+ argument should be aborted, 0 if we should not read any more chars, and
+ 1 if we should continue to read chars. */
+static int
+_rl_vi_arg_dispatch (c)
+ int c;
+{
+ int key;
+
+ key = c;
+ if (c >= 0 && _rl_keymap[c].type == ISFUNC && _rl_keymap[c].function == rl_universal_argument)
+ {
+ rl_numeric_arg *= 4;
+ return 1;
+ }
+
+ c = UNMETA (c);
+
+ if (_rl_digit_p (c))
+ {
+ if (rl_explicit_arg)
+ rl_numeric_arg = (rl_numeric_arg * 10) + _rl_digit_value (c);
+ else
+ rl_numeric_arg = _rl_digit_value (c);
+ rl_explicit_arg = 1;
+ return 1;
+ }
+ else
+ {
+ rl_clear_message ();
+ rl_stuff_char (key);
+ return 0;
+ }
+}
+
/* A simplified loop for vi. Don't dispatch key at end.
Don't recognize minus sign?
Should this do rl_save_prompt/rl_restore_prompt? */
static int
rl_digit_loop1 ()
{
- int key, c;
+ int c, r;
- RL_SETSTATE(RL_STATE_NUMERICARG);
while (1)
{
- if (rl_numeric_arg > 1000000)
- {
- rl_explicit_arg = rl_numeric_arg = 0;
- rl_ding ();
- rl_clear_message ();
- RL_UNSETSTATE(RL_STATE_NUMERICARG);
- return 1;
- }
- rl_message ("(arg: %d) ", rl_arg_sign * rl_numeric_arg);
- RL_SETSTATE(RL_STATE_MOREINPUT);
- key = c = rl_read_key ();
- RL_UNSETSTATE(RL_STATE_MOREINPUT);
+ if (_rl_arg_overflow ())
+ return 1;
- if (c >= 0 && _rl_keymap[c].type == ISFUNC &&
- _rl_keymap[c].function == rl_universal_argument)
- {
- rl_numeric_arg *= 4;
- continue;
- }
+ c = _rl_arg_getchar ();
- c = UNMETA (c);
- if (_rl_digit_p (c))
- {
- if (rl_explicit_arg)
- rl_numeric_arg = (rl_numeric_arg * 10) + _rl_digit_value (c);
- else
- rl_numeric_arg = _rl_digit_value (c);
- rl_explicit_arg = 1;
- }
- else
- {
- rl_clear_message ();
- rl_stuff_char (key);
- break;
- }
+ r = _rl_vi_arg_dispatch (c);
+ if (r <= 0)
+ break;
}
RL_UNSETSTATE(RL_STATE_NUMERICARG);
@@ -1017,8 +1071,7 @@ rl_vi_change_to (count, key)
/* `C' does not save the text inserted for undoing or redoing. */
if (_rl_uppercase_p (key) == 0)
_rl_vi_doing_insert = 1;
- _rl_vi_set_last (key, count, rl_arg_sign);
- rl_vi_insertion_mode (1, key);
+ rl_vi_start_inserting (key, rl_numeric_arg, rl_arg_sign);
}
return (0);
@@ -1028,8 +1081,9 @@ int
rl_vi_yank_to (count, key)
int count, key;
{
- int c, save = rl_point;
+ int c, save;
+ save = rl_point;
if (_rl_uppercase_p (key))
rl_stuff_char ('$');
@@ -1054,11 +1108,45 @@ rl_vi_yank_to (count, key)
}
int
+rl_vi_rubout (count, key)
+ int count, key;
+{
+ int p, opoint;
+
+ if (count < 0)
+ return (rl_vi_delete (-count, key));
+
+ if (rl_point == 0)
+ {
+ rl_ding ();
+ return -1;
+ }
+
+ opoint = rl_point;
+ if (count > 1 && MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ rl_backward_char (count, key);
+ else if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO);
+ else
+ rl_point -= count;
+
+ if (rl_point < 0)
+ rl_point = 0;
+
+ rl_kill_text (rl_point, opoint);
+
+ return (0);
+}
+
+int
rl_vi_delete (count, key)
int count, key;
{
int end;
+ if (count < 0)
+ return (rl_vi_rubout (-count, key));
+
if (rl_end == 0)
{
rl_ding ();
@@ -1077,6 +1165,7 @@ rl_vi_delete (count, key)
if (rl_point > 0 && rl_point == rl_end)
rl_backward_char (1, key);
+
return (0);
}
@@ -1097,64 +1186,102 @@ rl_vi_first_print (count, key)
return (rl_vi_back_to_indent (1, key));
}
+static int _rl_cs_dir, _rl_cs_orig_dir;
+
+#if defined (READLINE_CALLBACKS)
+static int
+_rl_vi_callback_char_search (data)
+ _rl_callback_generic_arg *data;
+{
+#if defined (HANDLE_MULTIBYTE)
+ _rl_vi_last_search_mblen = _rl_read_mbchar (_rl_vi_last_search_mbchar, MB_LEN_MAX);
+#else
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ _rl_vi_last_search_char = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+#endif
+
+ _rl_callback_func = 0;
+ _rl_want_redisplay = 1;
+
+#if defined (HANDLE_MULTIBYTE)
+ return (_rl_char_search_internal (data->count, _rl_cs_dir, _rl_vi_last_search_mbchar, _rl_vi_last_search_mblen));
+#else
+ return (_rl_char_search_internal (data->count, _rl_cs_dir, _rl_vi_last_search_char));
+#endif
+}
+#endif
+
int
rl_vi_char_search (count, key)
int count, key;
{
#if defined (HANDLE_MULTIBYTE)
static char *target;
- static int mb_len;
+ static int tlen;
#else
static char target;
#endif
- static int orig_dir, dir;
if (key == ';' || key == ',')
- dir = key == ';' ? orig_dir : -orig_dir;
+ _rl_cs_dir = (key == ';') ? _rl_cs_orig_dir : -_rl_cs_orig_dir;
else
{
- if (vi_redoing)
-#if defined (HANDLE_MULTIBYTE)
- target = _rl_vi_last_search_mbchar;
-#else
- target = _rl_vi_last_search_char;
-#endif
- else
- {
-#if defined (HANDLE_MULTIBYTE)
- mb_len = _rl_read_mbchar (_rl_vi_last_search_mbchar, MB_LEN_MAX);
- target = _rl_vi_last_search_mbchar;
-#else
- RL_SETSTATE(RL_STATE_MOREINPUT);
- _rl_vi_last_search_char = target = rl_read_key ();
- RL_UNSETSTATE(RL_STATE_MOREINPUT);
-#endif
- }
-
switch (key)
{
case 't':
- orig_dir = dir = FTO;
+ _rl_cs_orig_dir = _rl_cs_dir = FTO;
break;
case 'T':
- orig_dir = dir = BTO;
+ _rl_cs_orig_dir = _rl_cs_dir = BTO;
break;
case 'f':
- orig_dir = dir = FFIND;
+ _rl_cs_orig_dir = _rl_cs_dir = FFIND;
break;
case 'F':
- orig_dir = dir = BFIND;
+ _rl_cs_orig_dir = _rl_cs_dir = BFIND;
break;
}
+
+ if (vi_redoing)
+ {
+ /* set target and tlen below */
+ }
+#if defined (READLINE_CALLBACKS)
+ else if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ _rl_callback_data = _rl_callback_data_alloc (count);
+ _rl_callback_data->i1 = _rl_cs_dir;
+ _rl_callback_func = _rl_vi_callback_char_search;
+ return (0);
+ }
+#endif
+ else
+ {
+#if defined (HANDLE_MULTIBYTE)
+ _rl_vi_last_search_mblen = _rl_read_mbchar (_rl_vi_last_search_mbchar, MB_LEN_MAX);
+#else
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ _rl_vi_last_search_char = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+#endif
+ }
}
#if defined (HANDLE_MULTIBYTE)
- return (_rl_char_search_internal (count, dir, target, mb_len));
+ target = _rl_vi_last_search_mbchar;
+ tlen = _rl_vi_last_search_mblen;
+#else
+ target = _rl_vi_last_search_char;
+#endif
+
+#if defined (HANDLE_MULTIBYTE)
+ return (_rl_char_search_internal (count, _rl_cs_dir, target, tlen));
#else
- return (_rl_char_search_internal (count, dir, target));
+ return (_rl_char_search_internal (count, _rl_cs_dir, target));
#endif
}
@@ -1265,60 +1392,109 @@ rl_vi_bracktype (c)
}
}
-/* XXX - think about reading an entire mbchar with _rl_read_mbchar and
- inserting it in one bunch instead of the loop below (like in
- rl_vi_char_search or _rl_vi_change_mbchar_case. Set c to mbchar[0]
- for test against 033 or ^C. Make sure that _rl_read_mbchar does
- this right. */
-int
-rl_vi_change_char (count, key)
- int count, key;
+static int
+_rl_vi_change_char (count, c, mb)
+ int count, c;
+ char *mb;
{
- int c;
-
- if (vi_redoing)
- c = _rl_vi_last_replacement;
- else
- {
- RL_SETSTATE(RL_STATE_MOREINPUT);
- _rl_vi_last_replacement = c = rl_read_key ();
- RL_UNSETSTATE(RL_STATE_MOREINPUT);
- }
+ int p;
if (c == '\033' || c == CTRL ('C'))
return -1;
+ rl_begin_undo_group ();
while (count-- && rl_point < rl_end)
{
- rl_begin_undo_group ();
-
- rl_delete (1, c);
+ p = rl_point;
+ rl_vi_delete (1, c);
+ if (rl_point < p) /* Did we retreat at EOL? */
+ rl_point++;
#if defined (HANDLE_MULTIBYTE)
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- while (_rl_insert_char (1, c))
- {
- RL_SETSTATE (RL_STATE_MOREINPUT);
- c = rl_read_key ();
- RL_UNSETSTATE (RL_STATE_MOREINPUT);
- }
+ rl_insert_text (mb);
else
#endif
_rl_insert_char (1, c);
- if (count == 0)
- rl_backward_char (1, c);
-
- rl_end_undo_group ();
}
+
+ /* The cursor shall be left on the last character changed. */
+ rl_backward_char (1, c);
+
+ rl_end_undo_group ();
+
return (0);
}
+static int
+_rl_vi_callback_getchar (mb, mblen)
+ char *mb;
+ int mblen;
+{
+ int c;
+
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ c = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ c = _rl_read_mbstring (c, mb, mblen);
+#endif
+
+ return c;
+}
+
+#if defined (READLINE_CALLBACKS)
+static int
+_rl_vi_callback_change_char (data)
+ _rl_callback_generic_arg *data;
+{
+ int c;
+ char mb[MB_LEN_MAX];
+
+ _rl_vi_last_replacement = c = _rl_vi_callback_getchar (mb, MB_LEN_MAX);
+
+ _rl_callback_func = 0;
+ _rl_want_redisplay = 1;
+
+ return (_rl_vi_change_char (data->count, c, mb));
+}
+#endif
+
+int
+rl_vi_change_char (count, key)
+ int count, key;
+{
+ int c;
+ char mb[MB_LEN_MAX];
+
+ if (vi_redoing)
+ {
+ c = _rl_vi_last_replacement;
+ mb[0] = c;
+ mb[1] = '\0';
+ }
+#if defined (READLINE_CALLBACKS)
+ else if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ _rl_callback_data = _rl_callback_data_alloc (count);
+ _rl_callback_func = _rl_vi_callback_change_char;
+ return (0);
+ }
+#endif
+ else
+ _rl_vi_last_replacement = c = _rl_vi_callback_getchar (mb, MB_LEN_MAX);
+
+ return (_rl_vi_change_char (count, c, mb));
+}
+
int
rl_vi_subst (count, key)
int count, key;
{
/* If we are redoing, rl_vi_change_to will stuff the last motion char */
if (vi_redoing == 0)
- rl_stuff_char ((key == 'S') ? 'c' : ' '); /* `S' == `cc', `s' == `c ' */
+ rl_stuff_char ((key == 'S') ? 'c' : 'l'); /* `S' == `cc', `s' == `cl' */
return (rl_vi_change_to (count, 'c'));
}
@@ -1434,9 +1610,8 @@ rl_vi_possible_completions()
#endif
/* Functions to save and restore marks. */
-int
-rl_vi_set_mark (count, key)
- int count, key;
+static int
+_rl_vi_set_mark ()
{
int ch;
@@ -1454,10 +1629,37 @@ rl_vi_set_mark (count, key)
return 0;
}
+#if defined (READLINE_CALLBACKS)
+static int
+_rl_vi_callback_set_mark (data)
+ _rl_callback_generic_arg *data;
+{
+ _rl_callback_func = 0;
+ _rl_want_redisplay = 1;
+
+ return (_rl_vi_set_mark ());
+}
+#endif
+
int
-rl_vi_goto_mark (count, key)
+rl_vi_set_mark (count, key)
int count, key;
{
+#if defined (READLINE_CALLBACKS)
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ _rl_callback_data = 0;
+ _rl_callback_func = _rl_vi_callback_set_mark;
+ return (0);
+ }
+#endif
+
+ return (_rl_vi_set_mark ());
+}
+
+static int
+_rl_vi_goto_mark ()
+{
int ch;
RL_SETSTATE(RL_STATE_MOREINPUT);
@@ -1485,4 +1687,31 @@ rl_vi_goto_mark (count, key)
return 0;
}
+#if defined (READLINE_CALLBACKS)
+static int
+_rl_vi_callback_goto_mark (data)
+ _rl_callback_generic_arg *data;
+{
+ _rl_callback_func = 0;
+ _rl_want_redisplay = 1;
+
+ return (_rl_vi_goto_mark ());
+}
+#endif
+
+int
+rl_vi_goto_mark (count, key)
+ int count, key;
+{
+#if defined (READLINE_CALLBACKS)
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ _rl_callback_data = 0;
+ _rl_callback_func = _rl_vi_callback_goto_mark;
+ return (0);
+ }
+#endif
+
+ return (_rl_vi_goto_mark ());
+}
#endif /* VI_MODE */
diff --git a/sim/sh64/ChangeLog b/sim/sh64/ChangeLog
deleted file mode 100644
index 1f705ca9e70..00000000000
--- a/sim/sh64/ChangeLog
+++ /dev/null
@@ -1,392 +0,0 @@
-2005-05-02 Corinna Vinschen <vinschen@redhat.com>
-
- * sh-desc.h: Move extern declaration of sh_cgen_ifld_table after
- inclusion of cgen.h.
-
-2005-04-15 Corinna Vinschen <vinschen@redhat.com>
-
- * configure.ac: New file.
- * configure.in: Remove.
- * configure: Regenerate.
- * defs-media.h (sem_fields): Add missing sfmt_ldhil member.
- * sim-if.c (sim_open): Use struct bfd instead of struct _bfd.
- (sim_create_inferior): Ditto.
-
-2004-12-08 Hans-Peter Nilsson <hp@axis.com>
-
- * configure: Regenerate for ../common/aclocal.m4 update.
-
-Fri Feb 21 19:49:45 2003 J"orn Rennecke <joern.rennecke@superh.com>
-
- * sem-media-switch.c, sem-media.c: Regenerate.
-
-2002-06-24 Richard Sandiford <rsandifo@redhat.com>
-
- * sh64.c: Update path of "callback.h".
-
-2002-06-20 Elena Zannoni <ezannoni@redhat.com>
-
- * sh64.c: Include correct file for register numbers.
-
-Fri May 17 14:27:41 2002 J"orn Rennecke <joern.rennecke@superh.com>
-
- * sim-if.c (sh64_disassemble_insn): Use print_insn_sh instead of
- print_insn_shl.
-
-2001-07-05 Ben Elliston <bje@redhat.com>
-
- * Makefile.in (stamp-arch): Use $(CGEN_CPU_DIR).
- (stamp-desc): Likewise.
- (stamp-cpu): Likewise.
- (stamp-defs-compact): Likewise.
- (stamp-defs-media): Likewise.
- (stamp-decode-compact): Likewise.
- (stamp-decode-media): Likewise.
-
-2001-03-30 Ben Elliston <bje@redhat.com>
-
- * sim-if.c (sim_open): Set sh64_idesc_{media,compact} to NULL.
- * sh64-sim.h (sh64_idesc_{compact,media}): Declare extern.
- * sh64.c (sh64_idesc_{compact,media}): Make non-static.
-
-2001-01-30 Ben Elliston <bje@redhat.com>
-
- * sh64.c (SYS_argc, SYS_argn, SYS_argnlen): Define.
- (trap_handler): Implement these syscalls.
- (count_argc): New function.
-
-2001-01-24 Alexandre Oliva <aoliva@redhat.com>
-
- * sh64.c (trap_handler): Implement time.
-
- * sh64.c (fetch_str): New function.
- (trap_handler): Re-implement write, and implement lseek, read,
- open and close.
-
-2001-01-18 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * sh64.c (sh64_fetch_register): When fetching the PC, return the
- PC value and set the LSB according to the current ISA.
-
-2001-01-18 Ben Elliston <bje@redhat.com>
-
- * sh64.c (trap_handler): Use sim_engine_halt to indicate a program
- has terminated, not exit!
-
-2001-01-12 Ben Elliston <bje@redhat.com>
-
- * sh64.c (sh64_fcnvds): Re-implement.
-
- * sh64.c: Include "bfd.h".
- (trap_handler): New function. Consolidate function bodies of
- sh64_trapa and sh64_compact_trapa.
- (sh64_trapa): Use it.
- (sh64_compact_trapa): Likewise.
-
-2001-01-11 Ben Elliston <bje@redhat.com>
-
- * sem-media.c, sem-media-switch.c: Regenerate.
- * sem-compact.c, sem-compact-switch.c: Likewise.
-
- * sh64.c (sh64_trapa): Adhere to SH64 sys call conventions.
-
- * cpu.h, sh-desc.c, sh-desc.h, sh-opc.h: Regenerate.
- * decode-media.c, decode-media.h, defs-media.h: Likewise.
- * sem-compact.c, sem-compact-switch.c: Likewise.
- * sem-media.c, sem-media-switch.c: Likewise.
-
-2001-01-10 Ben Elliston <bje@redhat.com>
-
- * sim-main.h (CIA_SET): Encode the current instruction set mode
- when setting the cia.
-
-2001-01-08 Ben Elliston <bje@redhat.com>
-
- * sh64.c (sh64_store_register): Do not set insn set mode--allow
- sh64_h_pc_set() to do it.
- (shmedia_init_cpu): Do not initialise the insn set mode--let the
- loader set it based on bit 0 of the executable's starting address.
- (shcompact_init_cpu): Likewise.
- * mloop-compact.c (sh64_compact_pbb_begin): Emit a warning message
- about malformed programs which have illegal insns in delay slots.
- (sh64_compact_pbb_cti_chain): Examine the least significant bit of
- the new pc, not the current instruction set mode to determine if
- the next pbb in the chain will consist of SHmedia instructions.
- * mloop-media.c (sh64_media_pbb_cti_chain): Likewise for SHcompact
- switches. Set bit 0 when setting the pc for the next SHmedia pbb.
-
- * cpu.c, cpu.h: Regenerate.
- * sem-compact.c, sem-compact-switch.c: Likewise.
- * sem-media.c, sem-media-switch.c: Likewise.
-
- * sh64.c (sh64_compact_trapa): Use sim_io_write_{stdout,error}(),
- not stdio functions to emit output when executing write traps.
-
-2001-01-07 Alexandre Oliva <aoliva@redhat.com>
-
- * sh64.c (sh64_compact_trapa): Support writing to stderr. Flush
- output stream after each (compound) write.
-
-2001-01-06 Ben Elliston <bje@redhat.com>
-
- * sem-media.c, sem-media-switch.c: Regenerate.
-
-2001-01-04 Ben Elliston <bje@redhat.com>
-
- * sem-compact.c, sem-compact-switch.c: Regenerate.
- * cpu.h: Regenerate.
-
-2001-01-03 Ben Elliston <bje@redhat.com>
-
- * cpu.c, cpu.h: Regenerate.
- * sem-media.c, sem-media-switch.c: Likewise.
-
-2001-01-02 Ben Elliston <bje@redhat.com>
-
- * sim-if.c (sh64_disassemble_insn): Set arch and mach fields using
- BFD primitives.
-
- * sem-compact.c, sem-compact-switch.c: Regenerate.
-
-2000-12-30 Alexandre Oliva <aoliva@redhat.com>
-
- * sh64.c (sh64_nsb): Re-implement correctly.
-
-2000-12-26 Alexandre Oliva <aoliva@redhat.com>
-
- * sh64.c (sh64_nsb): Re-implement.
-
-2000-12-27 Ben Elliston <bje@redhat.com>
-
- * cpu.c, cpu.h: Regenerate.
- * sem-compact.c, sem-compact-switch.c: Likewise.
- * sem-media.c, sem-media-switch.c: Likewise.
- * sh-desc.c: Likewise.
-
-2000-12-26 Ben Elliston <bje@redhat.com>
-
- * mloop-compact.in, mloop-media.in: Remove.
- * mloop-compact.c, mloop-media.c: New files.
- * eng-compact.c, eng-media.c: Likewise.
- * Makefile.in (mloop-compact.c): Remove target.
- (stamp-mloop-compact): Likewise.
- (mloop-media.c): Likewise.
- (stamp-mloop-media): Likewise.
- (sh64-clean): Update.
- (stamp-mloop): Remove.
-
-2000-12-23 Ben Elliston <bje@redhat.com>
-
- * sh64.c (sh64_prepare_run): Rename from shmedia_prepare_run.
- (shcompact_prepare_run): Remove.
- (sh2_mach, sh3_mach, sh3e_mach, sh4_mach, sh5_mach): Update.
-
-2000-12-22 Ben Elliston <bje@redhat.com>
-
- * sh64.c (sh64_idesc_media, sh64_idesc_compact): New variables.
- (sh64_dump): Remove.
- (sh64_engine_run_full): Only compute idesc tables once.
- (sh64_engine_run_fast): Likewise.
- (shmedia_prepare_run): Do nothing.
- (shcompact_prepare_run): Likewise.
-
- * sem-compact.c, sem-compact-switch.c: Regenerate.
- * sem-media.c, sem-media-switch.c: Likewise.
-
-2000-12-19 Ben Elliston <bje@redhat.com>
-
- * sem-media.c, sem-media-switch.c: Regenerate.
-
-2000-12-15 Ben Elliston <bje@redhat.com>
-
- * sh64.c (sh64_store_register): When storing a new PC, set ISA
- mode based on the value of bit 0.
-
- * sh64.c: Include "sim-sh64.h" for GDB interfacing.
- (sh64_fetch_register): Implement.
- (sh64_store_register): Likewise.
-
- * sh64-sim.h (sh64_fmacs): Declare.
- (sh64_ftrcdl, sh64_ftrcdq, sh64_ftrcsl): Likewise.
-
- * sem-media.c, sem-media-switch.c: Regenerate.
-
-2000-12-13 Ben Elliston <bje@redhat.com>
-
- * sh64-sim.h (sh64_compact_trapa): Renamed from sh64_trapa.
- (sh64_trapa): Renamed from sh64_trap.
- * sh64.c (sh64_trapa): Call sh64_compact_trapa for handling.
- Apply renaming described above.
-
- * decode-media.c, decode-media.h, defs-media.h: Regenerate.
- * sem-media.c sem-media-switch.c: Likewise.
- * sh-desc.c, sh-desc.h, sh-opc.h: Likewise.
-
-2000-12-12 Ben Elliston <bje@redhat.com>
-
- * cpu.c, cpu.h, sh-desc.c: Regenerate.
- * sem-media.c, sem-media-switch.c: Likewise.
- * sem-compact.c, sem-compact-switch.c: Likewise.
- * sh64-sim.h (sh64_ftrvs): Declare.
- * sh64.c (sh64_ftrvs): Bug fixes.
-
- * sh64.c (sh64_fcmpgtd): Fix order of arguments to sim_fpu_is_gt.
- (sh64_fcmpgts): Likewise.
-
-2000-12-11 Ben Elliston <bje@redhat.com>
-
- * decode-media.c, decode-media.h: Regenerate.
- * defs-media.h: Likewise.
- * sem-media.c, sem-media-switch.c: Likewise.
- * sh-desc.c: Likewise.
-
-2000-12-08 Ben Elliston <bje@redhat.com>
-
- * decode-media.c, decode-media.h: Regenerate.
- * defs-media.h: Likewise.
- * sem-media.c, sem-media-switch.c: Likewise.
-
-2000-12-07 Ben Elliston <bje@redhat.com>
-
- * decode-media.c, decode-media.h: Regenerate.
- * sem-media.c, sem-media-switch.c: Likewise.
-
- * defs-media.h: Regenete.
- * decode-compact.c, decode-media.c: Likewise.
-
-2000-12-06 Ben Elliston <bje@redhat.com>
-
- * sh64.c (sh64_fcmpund): Return a BI.
- (sh64_fcmpuns): Likewise.
- (sh64_nsb): Treat source value as unsigned.
- (sh64_compact_model_insn_before): New function.
- (sh64_media_model_insn_before): Likewise.
- (sh64_compact_model_insn_after): Likewise.
- (sh64_media_model_insn_after): Likewise.
- (sh_models): Use sh5_mach for "sh5".
- * sh64-sim.h: Add missing function prototypes.
-
- * cpu.c, cpu.h, defs-media.h, sh-desc.c: Regenerate.
- * decode-media.c, decode-media.h: Likewise.
- * sem-media.c, sem-media-switch.c: Likewise.
-
-2000-12-05 Ben Elliston <bje@redhat.com>
-
- * mloop-compact.in, mloop-media.in: Use @prefix@.
- * Makefile.in (stamp-mloop-compact): Pass -outfile-suffix option
- to make generated files safe in the presence of parallel makes.
- (stamp-mloop-media): Likewise.
-
- * decode-media.c, defs-media.h: Regenerate.
-
-2000-12-04 Ben Elliston <bje@redhat.com>
-
- * sh64-sim.h: Add function prototypes from sh64.c.
-
- * Makefile.in (SH64_OBJS): Add ISA variant objects.
- (SIM_EXTRA_DEPS): Do not depend on opcodes headers.
- (SH64_INCLUDE_DEPS): Update for ISA variants.
- (stamp-mloop-compact, stamp-mloop-media): New targets.
- (decode-compact.o, sem-compact.o): New rules.
- (decode-media.o, sem-media.o): Likewise.
- (sh64-clean): Update.
- (stamp-all, stamp-mloop, stamp-decode, stamp-defs): New targets.
- (stamp-desc, stamp-cpu): Likewise.
- (stamp-defs-compact, stamp-defs-media): Likewise.
- (stamp-decode-compact, stamp-decode-media): Likewise.
-
- * defs-compact.h, defs-media.h: Regenerate.
-
-2000-12-03 Ben Elliston <bje@redhat.com>
-
- * sh64-sim.h (sh64_fcmpeqd, sh64_fcmpeqs): Declare.
- (sh64_fcmpged, sh64_fcmpges): Likewise.
- (sh64_fcmpgtd, sh64_fcmpgts): Likewise.
-
- * sh64.c (sh64_endian): New function.
- (sh64_fcmpeqd, sh64_fcmpeqs): Return a BI.
- (sh64_fcmpged, sh64_fcmpges): Likewise.
- (sh64_fcmpgtd, sh64_fcmpgts): Likewise.
- (sh64_trap): Implement a basic syscall facility.
- (sh64_trapa): Exit with return code in R5, not 0.
- (sh64_model_sh5_u_exec): Remove.
- (sh64_engine_run_full): New function.
- (sh64_engine_run_fast): Likewise.
- (shmedia_prepare_run): Likewise.
- (shcompact_prepare_run): Likewise.
- (sh64_get_idata): Likewise.
- (sh64_init_cpu): Likewise.
- (shmedia_init_cpu): Likewise.
- (shcompact_init_cpu): Likewise.
- (sh64_model_init): Likewise.
- (sh_models): Define.
- (sh5_imp_properties): Likewise.
- (sh2_mach, sh3_mach, sh4_mach, sh5_mach): Define.
-
- * sem-compact.c, sem-compact-switch.c: Regenerate.
-
-2000-12-01 Ben Elliston <bje@redhat.com>
-
- * sh64-sim.h (sh64_endian): Declare.
- * sim-main.h (sim_cia): Use UDI, not USI.
- (WITH_PROFILE_MODEL_P): Remove.
- * sim-if.c (sim_sh64_disassemble_insn): Remove.
- (sh64_disassemble_insn): New function.
- (sim_open): Use as this CPU's disassembler.
- * eng.h: New file.
- * decode.h (WITH_PROFILE_MODEL_P): Undefine.
-
- * decode-compact.c, decode-media.c: Regenerate.
- * defs-compact.h, defs-media.h: Likewise.
- * sem-compact.c, sem-compact-switch.c: Likewise.
- * sh-desc.c, sh-desc.h: Likewise.
- * cpu.c, cpu.h, cpuall.h: Likewise.
-
-2000-11-30 Ben Elliston <bje@redhat.com>
-
- * arch.c, sh-desc.c, sh-desc.h: Regenerate.
-
- * tconfig.in (SIM_HAVE_BIENDIAN): Define.
- * configure.in (SIM_AC_OPTION_BIGENDIAN): Do not hard-wire a
- target byte order, but default to big endian.
- * configure: Regenerate.
-
-2000-11-27 Ben Elliston <bje@redhat.com>
-
- * sim-main.h (WITH_PROFILE_MODEL_P): Define.
- * sh64-sim.h (ISM_COMPACT, ISM_MEDIA): New enums.
-
- * sh-desc.c, sh-desc.h: Regenerate.
- * arch.c, cpu.h, cpuall.h: Regenerate.
- * decode.h (WITH_PROFILE_MODEL_P): Remove.
-
- * mloop-compact.in, mloop-media.in: New files.
- * decode.h: Likewise.
-
-2000-11-26 Ben Elliston <bje@redhat.com>
-
- * sem-compact.c, sem-compact-switch.c: Generate.
- * sem-media.c, sem-media-switch.c: Likewise.
-
-2000-11-25 Ben Elliston <bje@redhat.com>
-
- * sh-desc.c, sh-desc.h, sh-opc.h: Generate.
-
- * arch.c, arch.h, cpuall.h, cpu.c, cpu.h: Generate.
- * decode-compact.c, decode-compact.h: Likewise.
- * decode-media.c, decode-media.h: Likewise.
- * sh64-sim.h: New file.
- * sim-main.h: Likewise.
-
-2000-11-22 Ben Elliston <bje@redhat.com>
-
- * sim-if.c: New file.
- * sh64.c: Likewise.
-
-2000-11-16 Ben Elliston <bje@redhat.com>
-
- * config.in: New file.
- * tconfig.in: Likewise.
- * configure.in: Likewise.
- * configure: Generate.
- * Makefile.in: New file.
diff --git a/sim/sh64/Makefile.in b/sim/sh64/Makefile.in
deleted file mode 100644
index b8cfb82c585..00000000000
--- a/sim/sh64/Makefile.in
+++ /dev/null
@@ -1,153 +0,0 @@
-# Makefile template for Configure for the SH64 simulator
-# Copyright (C) 2000 Free Software Foundation, Inc.
-# Contributed by Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-## COMMON_PRE_CONFIG_FRAG
-
-SH64_OBJS = sh64.o cpu.o sh-desc.o \
- decode-compact.o sem-compact.o mloop-compact.o \
- decode-media.o sem-media.o mloop-media.o
-
-CONFIG_DEVICES = dv-sockser.o
-CONFIG_DEVICES =
-
-SIM_OBJS = \
- $(SIM_NEW_COMMON_OBJS) \
- sim-cpu.o \
- sim-hload.o \
- sim-hrw.o \
- sim-model.o \
- sim-reg.o \
- cgen-utils.o cgen-trace.o cgen-scache.o \
- cgen-run.o sim-reason.o sim-engine.o sim-stop.o \
- sim-if.o arch.o \
- $(SH64_OBJS) \
- $(CONFIG_DEVICES)
-
-# Extra headers included by sim-main.h.
-SIM_EXTRA_DEPS = \
- $(CGEN_INCLUDE_DEPS) \
- arch.h cpuall.h sh64-sim.h
-
-SIM_EXTRA_CFLAGS =
-
-SIM_RUN_OBJS = nrun.o
-SIM_EXTRA_CLEAN = sh64-clean
-
-## COMMON_POST_CONFIG_FRAG
-
-arch = sh
-
-sim-if.o: sim-if.c $(SIM_MAIN_DEPS) $(srcdir)/../common/sim-core.h
-
-arch.o: arch.c $(SIM_MAIN_DEPS)
-
-devices.o: devices.c $(SIM_MAIN_DEPS)
-
-# SH64 objs
-
-SH64_INCLUDE_DEPS = \
- $(CGEN_MAIN_CPU_DEPS) \
- cpu.h decode.h \
- decode-compact.h eng-compact.h defs-compact.h \
- decode-media.h eng-media.h defs-media.h
-
-sh64.o: sh64.c $(SH64_INCLUDE_DEPS)
-
-mloop-compact.o: mloop-compact.c sem-compact-switch.c $(SH64_INCLUDE_DEPS)
- $(CC) -c $(srcdir)/mloop-compact.c $(ALL_CFLAGS) -DWANT_ISA_COMPACT
-
-mloop-media.o: mloop-media.c sem-media-switch.c $(SH64_INCLUDE_DEPS)
- $(CC) -c $(srcdir)/mloop-media.c $(ALL_CFLAGS) -DWANT_ISA_MEDIA
-
-cpu.o: cpu.c $(SH64_INCLUDE_DEPS)
-
-decode-compact.o: decode-compact.c $(SH64_INCLUDE_DEPS)
- $(CC) -c $(srcdir)/decode-compact.c $(ALL_CFLAGS) -DWANT_ISA_COMPACT
-
-sem-compact.o: sem-compact.c $(SH64_INCLUDE_DEPS)
- $(CC) -c $(srcdir)/sem-compact.c $(ALL_CFLAGS) -DWANT_ISA_COMPACT
-
-decode-media.o: decode-media.c $(SH64_INCLUDE_DEPS)
- $(CC) -c $(srcdir)/decode-media.c $(ALL_CFLAGS) -DWANT_ISA_MEDIA
-
-sem-media.o: sem-media.c $(SH64_INCLUDE_DEPS)
- $(CC) -c $(srcdir)/sem-media.c $(ALL_CFLAGS) -DWANT_ISA_MEDIA
-
-sh64-clean:
- rm -f tmp-*
- rm -f stamp-defs-{compact,media}
- rm -f stamp-arch stamp-desc stamp-cpu stamp-decode-{compact,media}
-
-# cgen support, enable with --enable-cgen-maint
-CGEN_MAINT = ; @true
-# The following line is commented in or out depending upon --enable-cgen-maint.
-@CGEN_MAINT@CGEN_MAINT =
-
-.PHONY: stamp-all stamp-decode stamp-defs
-
-stamp-all: stamp-arch stamp-desc stamp-cpu stamp-decode stamp-defs
-stamp-decode: stamp-decode-compact stamp-decode-media
-stamp-defs: stamp-defs-compact stamp-defs-media
-
-stamp-arch: $(CGEN_READ_SCM) $(CGEN_ARCH_SCM) $(CGEN_CPU_DIR)/sh.cpu $(CGEN_CPU_DIR)/sh.opc $(CGEN_CPU_DIR)/sh64-media.cpu $(CGEN_CPU_DIR)/sh64-compact.cpu Makefile
- $(MAKE) cgen-arch $(CGEN_FLAGS_TO_PASS) mach=all isa=compact,media \
- FLAGS="with-scache"
- touch $@
-arch.h arch.c cpuall.h: $(CGEN_MAINT) stamp-arch
- @true
-
-stamp-desc: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_CPU_DIR)/sh.cpu $(CGEN_CPU_DIR)/sh.opc $(CGEN_CPU_DIR)/sh64-compact.cpu $(CGEN_CPU_DIR)/sh64-media.cpu Makefile
- $(MAKE) cgen-desc $(CGEN_FLAGS_TO_PASS) cpu=sh64 mach=all isa=compact,media
- touch $@
-desc.h: $(CGEN_MAINT) stamp-desc
- @true
-
-stamp-cpu: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_CPU_DIR)/sh.cpu $(CGEN_CPU_DIR)/sh.opc $(CGEN_CPU_DIR)/sh64-compact.cpu $(CGEN_CPU_DIR)/sh64-media.cpu Makefile
- $(MAKE) cgen-cpu $(CGEN_FLAGS_TO_PASS) \
- cpu=sh64 mach=sh4,sh5 isa=compact,media FLAGS="with-multiple-isa with-scache"
- rm -f $(srcdir)/model.c
- touch $@
-cpu.h: $(CGEN_MAINT) stamp-cpu
- @true
-
-stamp-defs-compact: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_CPU_DIR)/sh.cpu $(CGEN_CPU_DIR)/sh.opc $(CGEN_CPU_DIR)/sh64-compact.cpu Makefile
- $(MAKE) cgen-defs $(CGEN_FLAGS_TO_PASS) \
- cpu=sh64 mach=sh5 isa=compact FLAGS="with-scache" SUFFIX="-compact"
- touch $@
-defs-compact.h: $(CGEN_MAINT) stamp-defs-compact
- @true
-
-stamp-defs-media: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_CPU_DIR)/sh.cpu $(CGEN_CPU_DIR)/sh.opc $(CGEN_CPU_DIR)/sh64-media.cpu Makefile
- $(MAKE) cgen-defs $(CGEN_FLAGS_TO_PASS) \
- cpu=sh64 mach=sh5 isa=media FLAGS="with-scache" SUFFIX="-media"
- touch $@
-defs-media.h: $(CGEN_MAINT) stamp-defs-media
-
-stamp-decode-compact: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_DECODE_SCM) $(CGEN_CPU_DIR)/sh.cpu $(CGEN_CPU_DIR)/sh.opc $(CGEN_CPU_DIR)/sh64-compact.cpu Makefile
- $(MAKE) cgen-decode $(CGEN_FLAGS_TO_PASS) \
- cpu=sh64 mach=sh5 isa=compact FLAGS="with-scache" SUFFIX="-compact" EXTRAFILES="$(CGEN_CPU_SEM) $(CGEN_CPU_SEMSW)"
- touch $@
-sem-compact.c sem-compact-switch.c decode-compact.c decode-compact.h: $(CGEN_MAINT) stamp-compact
- @true
-
-stamp-decode-media: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_DECODE_SCM) $(CGEN_CPU_DIR)/sh.cpu $(CGEN_CPU_DIR)/sh.opc $(CGEN_CPU_DIR)/sh64-media.cpu Makefile
- $(MAKE) cgen-decode $(CGEN_FLAGS_TO_PASS) \
- cpu=sh64 mach=sh5 isa=media FLAGS="with-scache" SUFFIX="-media" EXTRAFILES="$(CGEN_CPU_SEM) $(CGEN_CPU_SEMSW)"
- touch $@
-sem-media.c sem-media-switch.c decode-media.c decode-media.h: $(CGEN_MAINT) stamp-media
- @true
diff --git a/sim/sh64/arch.c b/sim/sh64/arch.c
deleted file mode 100644
index c1e8c772583..00000000000
--- a/sim/sh64/arch.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Simulator support for sh.
-
-THIS FILE IS MACHINE GENERATED WITH CGEN.
-
-Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
-
-This file is part of the GNU Simulators.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-
-#include "sim-main.h"
-#include "bfd.h"
-
-const MACH *sim_machs[] =
-{
-#ifdef HAVE_CPU_SH64
- & sh2_mach,
-#endif
-#ifdef HAVE_CPU_SH64
- & sh3_mach,
-#endif
-#ifdef HAVE_CPU_SH64
- & sh3e_mach,
-#endif
-#ifdef HAVE_CPU_SH64
- & sh4_mach,
-#endif
-#ifdef HAVE_CPU_SH64
- & sh5_mach,
-#endif
- 0
-};
-
diff --git a/sim/sh64/arch.h b/sim/sh64/arch.h
deleted file mode 100644
index 30820a061a9..00000000000
--- a/sim/sh64/arch.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Simulator header for sh.
-
-THIS FILE IS MACHINE GENERATED WITH CGEN.
-
-Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
-
-This file is part of the GNU Simulators.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-
-#ifndef SH_ARCH_H
-#define SH_ARCH_H
-
-#define TARGET_BIG_ENDIAN 1
-
-/* Enum declaration for model types. */
-typedef enum model_type {
- MODEL_SH5, MODEL_MAX
-} MODEL_TYPE;
-
-#define MAX_MODELS ((int) MODEL_MAX)
-
-/* Enum declaration for unit types. */
-typedef enum unit_type {
- UNIT_NONE, UNIT_SH5_U_EXEC, UNIT_MAX
-} UNIT_TYPE;
-
-#define MAX_UNITS (1)
-
-#endif /* SH_ARCH_H */
diff --git a/sim/sh64/config.in b/sim/sh64/config.in
deleted file mode 100644
index 6ce594d7c90..00000000000
--- a/sim/sh64/config.in
+++ /dev/null
@@ -1,177 +0,0 @@
-/* config.in. Generated automatically from configure.in by autoheader. */
-
-/* Define if using alloca.c. */
-#undef C_ALLOCA
-
-/* Define to empty if the keyword does not work. */
-#undef const
-
-/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
- This function is required for alloca.c support on those systems. */
-#undef CRAY_STACKSEG_END
-
-/* Define if you have alloca, as a function or macro. */
-#undef HAVE_ALLOCA
-
-/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
-#undef HAVE_ALLOCA_H
-
-/* Define if you have a working `mmap' system call. */
-#undef HAVE_MMAP
-
-/* Define as __inline if that's what the C compiler calls it. */
-#undef inline
-
-/* Define to `long' if <sys/types.h> doesn't define. */
-#undef off_t
-
-/* Define if you need to in order for stat and other things to work. */
-#undef _POSIX_SOURCE
-
-/* Define as the return type of signal handlers (int or void). */
-#undef RETSIGTYPE
-
-/* Define to `unsigned' if <sys/types.h> doesn't define. */
-#undef size_t
-
-/* If using the C implementation of alloca, define if you know the
- direction of stack growth for your system; otherwise it will be
- automatically deduced at run-time.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown
- */
-#undef STACK_DIRECTION
-
-/* Define if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Define if your processor stores words with the most significant
- byte first (like Motorola and SPARC, unlike Intel and VAX). */
-#undef WORDS_BIGENDIAN
-
-/* Define to 1 if NLS is requested. */
-#undef ENABLE_NLS
-
-/* Define as 1 if you have gettext and don't want to use GNU gettext. */
-#undef HAVE_GETTEXT
-
-/* Define as 1 if you have the stpcpy function. */
-#undef HAVE_STPCPY
-
-/* Define if your locale.h file contains LC_MESSAGES. */
-#undef HAVE_LC_MESSAGES
-
-/* Define if you have the __argz_count function. */
-#undef HAVE___ARGZ_COUNT
-
-/* Define if you have the __argz_next function. */
-#undef HAVE___ARGZ_NEXT
-
-/* Define if you have the __argz_stringify function. */
-#undef HAVE___ARGZ_STRINGIFY
-
-/* Define if you have the __setfpucw function. */
-#undef HAVE___SETFPUCW
-
-/* Define if you have the dcgettext function. */
-#undef HAVE_DCGETTEXT
-
-/* Define if you have the getcwd function. */
-#undef HAVE_GETCWD
-
-/* Define if you have the getpagesize function. */
-#undef HAVE_GETPAGESIZE
-
-/* Define if you have the getrusage function. */
-#undef HAVE_GETRUSAGE
-
-/* Define if you have the munmap function. */
-#undef HAVE_MUNMAP
-
-/* Define if you have the putenv function. */
-#undef HAVE_PUTENV
-
-/* Define if you have the setenv function. */
-#undef HAVE_SETENV
-
-/* Define if you have the setlocale function. */
-#undef HAVE_SETLOCALE
-
-/* Define if you have the sigaction function. */
-#undef HAVE_SIGACTION
-
-/* Define if you have the stpcpy function. */
-#undef HAVE_STPCPY
-
-/* Define if you have the strcasecmp function. */
-#undef HAVE_STRCASECMP
-
-/* Define if you have the strchr function. */
-#undef HAVE_STRCHR
-
-/* Define if you have the time function. */
-#undef HAVE_TIME
-
-/* Define if you have the <argz.h> header file. */
-#undef HAVE_ARGZ_H
-
-/* Define if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
-
-/* Define if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
-/* Define if you have the <fcntl.h> header file. */
-#undef HAVE_FCNTL_H
-
-/* Define if you have the <fpu_control.h> header file. */
-#undef HAVE_FPU_CONTROL_H
-
-/* Define if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
-
-/* Define if you have the <locale.h> header file. */
-#undef HAVE_LOCALE_H
-
-/* Define if you have the <malloc.h> header file. */
-#undef HAVE_MALLOC_H
-
-/* Define if you have the <nl_types.h> header file. */
-#undef HAVE_NL_TYPES_H
-
-/* Define if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define if you have the <sys/param.h> header file. */
-#undef HAVE_SYS_PARAM_H
-
-/* Define if you have the <sys/resource.h> header file. */
-#undef HAVE_SYS_RESOURCE_H
-
-/* Define if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define if you have the <sys/time.h> header file. */
-#undef HAVE_SYS_TIME_H
-
-/* Define if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
-/* Define if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define if you have the <values.h> header file. */
-#undef HAVE_VALUES_H
-
-/* Define if you have the nsl library (-lnsl). */
-#undef HAVE_LIBNSL
-
-/* Define if you have the socket library (-lsocket). */
-#undef HAVE_LIBSOCKET
diff --git a/sim/sh64/configure b/sim/sh64/configure
deleted file mode 100755
index 2a6ab864694..00000000000
--- a/sim/sh64/configure
+++ /dev/null
@@ -1,9007 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59.
-#
-# Copyright (C) 2003 Free Software Foundation, Inc.
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-exec 6>&1
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_config_libobj_dir=.
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Maximum number of lines to put in a shell here document.
-# This variable seems obsolete. It should probably be removed, and
-# only ac_max_sed_lines should be used.
-: ${ac_max_here_lines=38}
-
-# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-
-ac_unique_file="Makefile.in"
-# Factoring default headers for most tests.
-ac_includes_default="\
-#include <stdio.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#if STDC_HEADERS
-# include <stdlib.h>
-# include <stddef.h>
-#else
-# if HAVE_STDLIB_H
-# include <stdlib.h>
-# endif
-#endif
-#if HAVE_STRING_H
-# if !STDC_HEADERS && HAVE_MEMORY_H
-# include <memory.h>
-# endif
-# include <string.h>
-#endif
-#if HAVE_STRINGS_H
-# include <strings.h>
-#endif
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-# include <stdint.h>
-# endif
-#endif
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif"
-
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS sim_environment sim_alignment sim_assert sim_bitsize sim_endian sim_hostendian sim_float sim_scache sim_default_model sim_hw_cflags sim_hw_objs sim_hw sim_inline sim_packages sim_regparm sim_reserved_bits sim_smp sim_stdcall sim_xor_endian WARN_CFLAGS WERROR_CFLAGS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CC_FOR_BUILD HDEFINES AR RANLIB ac_ct_RANLIB SET_MAKE CPP EGREP ALLOCA USE_NLS MSGFMT GMSGFMT XGETTEXT USE_INCLUDED_LIBINTL CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLDEPS INTLLIBS INTLOBJS POFILES POSUB INCLUDE_LOCALE_H GT_NO GT_YES MKINSTALLDIRS l MAINT sim_bswap sim_cflags sim_debug sim_stdio sim_trace sim_profile CGEN_MAINT cgendir cgen cgen_breaks LIBOBJS LTLIBOBJS'
-ac_subst_files=''
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-ac_prev=
-for ac_option
-do
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case $ac_option in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir=$ac_optarg ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build_alias ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build_alias=$ac_optarg ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file=$ac_optarg ;;
-
- --config-cache | -C)
- cache_file=config.cache ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir=$ac_optarg ;;
-
- -disable-* | --disable-*)
- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- eval "enable_$ac_feature=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_$ac_feature='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix=$ac_optarg ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he | -h)
- ac_init_help=long ;;
- -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
- ac_init_help=recursive ;;
- -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
- ac_init_help=short ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host_alias ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host_alias=$ac_optarg ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir=$ac_optarg ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir=$ac_optarg ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir=$ac_optarg ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir=$ac_optarg ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir=$ac_optarg ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir=$ac_optarg ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c | -n)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir=$ac_optarg ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix=$ac_optarg ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix=$ac_optarg ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix=$ac_optarg ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name=$ac_optarg ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir=$ac_optarg ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir=$ac_optarg ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site=$ac_optarg ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir=$ac_optarg ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir=$ac_optarg ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target_alias ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target_alias=$ac_optarg ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers | -V)
- ac_init_version=: ;;
-
- -with-* | --with-*)
- ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "with_$ac_package='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/-/_/g'`
- eval "with_$ac_package=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes=$ac_optarg ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries=$ac_optarg ;;
-
- -*) { echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; }
- ;;
-
- *=*)
- ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
- # Reject names that are not valid shell variable names.
- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
- { (exit 1); exit 1; }; }
- ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
- eval "$ac_envvar='$ac_optarg'"
- export $ac_envvar ;;
-
- *)
- # FIXME: should be removed in autoconf 3.0.
- echo "$as_me: WARNING: you should use --build, --host, --target" >&2
- expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- { echo "$as_me: error: missing argument to $ac_option" >&2
- { (exit 1); exit 1; }; }
-fi
-
-# Be sure to have absolute paths.
-for ac_var in exec_prefix prefix
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
- localstatedir libdir includedir oldincludedir infodir mandir
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
- if test "x$build_alias" = x; then
- cross_compiling=maybe
- echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
- elif test "x$build_alias" != "x$host_alias"; then
- cross_compiling=yes
- fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_confdir=`(dirname "$0") 2>/dev/null ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$0" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
- { (exit 1); exit 1; }; }
- else
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
- { (exit 1); exit 1; }; }
- fi
-fi
-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
- { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
- { (exit 1); exit 1; }; }
-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
-ac_env_build_alias_set=${build_alias+set}
-ac_env_build_alias_value=$build_alias
-ac_cv_env_build_alias_set=${build_alias+set}
-ac_cv_env_build_alias_value=$build_alias
-ac_env_host_alias_set=${host_alias+set}
-ac_env_host_alias_value=$host_alias
-ac_cv_env_host_alias_set=${host_alias+set}
-ac_cv_env_host_alias_value=$host_alias
-ac_env_target_alias_set=${target_alias+set}
-ac_env_target_alias_value=$target_alias
-ac_cv_env_target_alias_set=${target_alias+set}
-ac_cv_env_target_alias_value=$target_alias
-ac_env_CC_set=${CC+set}
-ac_env_CC_value=$CC
-ac_cv_env_CC_set=${CC+set}
-ac_cv_env_CC_value=$CC
-ac_env_CFLAGS_set=${CFLAGS+set}
-ac_env_CFLAGS_value=$CFLAGS
-ac_cv_env_CFLAGS_set=${CFLAGS+set}
-ac_cv_env_CFLAGS_value=$CFLAGS
-ac_env_LDFLAGS_set=${LDFLAGS+set}
-ac_env_LDFLAGS_value=$LDFLAGS
-ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
-ac_cv_env_LDFLAGS_value=$LDFLAGS
-ac_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_env_CPPFLAGS_value=$CPPFLAGS
-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_cv_env_CPPFLAGS_value=$CPPFLAGS
-ac_env_CPP_set=${CPP+set}
-ac_env_CPP_value=$CPP
-ac_cv_env_CPP_set=${CPP+set}
-ac_cv_env_CPP_value=$CPP
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE. See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
- -h, --help display this help and exit
- --help=short display options specific to this package
- --help=recursive display the short help of all the included packages
- -V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
- --cache-file=FILE cache test results in FILE [disabled]
- -C, --config-cache alias for \`--cache-file=config.cache'
- -n, --no-create do not create output files
- --srcdir=DIR find the sources in DIR [configure dir or \`..']
-
-_ACEOF
-
- cat <<_ACEOF
-Installation directories:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --infodir=DIR info documentation [PREFIX/info]
- --mandir=DIR man documentation [PREFIX/man]
-_ACEOF
-
- cat <<\_ACEOF
-
-Program names:
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM run sed PROGRAM on installed program names
-
-System types:
- --build=BUILD configure for building on BUILD [guessed]
- --host=HOST cross-compile to build programs to run on HOST [BUILD]
- --target=TARGET configure for building compilers for TARGET [HOST]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
-
- cat <<\_ACEOF
-
-Optional Features:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --disable-nls do not use Native Language Support
- --enable-maintainer-mode Enable developer functionality.
- --enable-sim-bswap Use Host specific BSWAP instruction.
- --enable-sim-cflags=opts Extra CFLAGS for use in building simulator
- --enable-sim-debug=opts Enable debugging flags
- --enable-sim-stdio Specify whether to use stdio for console input/output.
- --enable-sim-trace=opts Enable tracing flags
- --enable-sim-profile=opts Enable profiling flags
- --enable-sim-endian=endian Specify target byte endian orientation.
- --enable-sim-alignment=align Specify strict, nonstrict or forced alignment of memory accesses.
- --enable-sim-hostendian=end Specify host byte endian orientation.
- --enable-sim-scache=size Specify simulator execution cache size.
- --enable-sim-default-model=model Specify default model to simulate.
- --enable-sim-environment=environment Specify mixed, user, virtual or operating environment.
- --enable-sim-inline=inlines Specify which functions should be inlined.
- --enable-cgen-maint=DIR build cgen generated files
-
-Optional Packages:
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --with-included-gettext use the GNU gettext library included here
-
-Some influential environment variables:
- CC C compiler command
- CFLAGS C compiler flags
- LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
- nonstandard directory <lib dir>
- CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
- headers in a nonstandard directory <include dir>
- CPP C preprocessor
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-_ACEOF
-fi
-
-if test "$ac_init_help" = "recursive"; then
- # If there are subdirs, report their specific --help.
- ac_popdir=`pwd`
- for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d $ac_dir || continue
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
- cd $ac_dir
- # Check for guested configure; otherwise get Cygnus style configure.
- if test -f $ac_srcdir/configure.gnu; then
- echo
- $SHELL $ac_srcdir/configure.gnu --help=recursive
- elif test -f $ac_srcdir/configure; then
- echo
- $SHELL $ac_srcdir/configure --help=recursive
- elif test -f $ac_srcdir/configure.ac ||
- test -f $ac_srcdir/configure.in; then
- echo
- $ac_configure --help
- else
- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi
- cd $ac_popdir
- done
-fi
-
-test -n "$ac_init_help" && exit 0
-if $ac_init_version; then
- cat <<\_ACEOF
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
- exit 0
-fi
-exec 5>config.log
-cat >&5 <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by $as_me, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- $ $0 $@
-
-_ACEOF
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
-
-/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
-/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
-/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- echo "PATH: $as_dir"
-done
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_sep=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
- for ac_arg
- do
- case $ac_arg in
- -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- continue ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- case $ac_pass in
- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
- 2)
- ac_configure_args1="$ac_configure_args1 '$ac_arg'"
- if test $ac_must_keep_next = true; then
- ac_must_keep_next=false # Got value, back to normal.
- else
- case $ac_arg in
- *=* | --config-cache | -C | -disable-* | --disable-* \
- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
- | -with-* | --with-* | -without-* | --without-* | --x)
- case "$ac_configure_args0 " in
- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
- esac
- ;;
- -* ) ac_must_keep_next=true ;;
- esac
- fi
- ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
- # Get rid of the leading space.
- ac_sep=" "
- ;;
- esac
- done
-done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log. We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Be sure not to use single quotes in there, as some shells,
-# such as our DU 5.0 friend, will then `close' the trap.
-trap 'exit_status=$?
- # Save into config.log some information that might help in debugging.
- {
- echo
-
- cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
- echo
- # The following way of writing the cache mishandles newlines in values,
-{
- (set) 2>&1 |
- case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- sed -n \
- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
- ;;
- *)
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-}
- echo
-
- cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_vars
- do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
-
- if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------- ##
-## Output files. ##
-## ------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_files
- do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
- fi
-
- if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
- echo
- sed "/^$/d" confdefs.h | sort
- echo
- fi
- test "$ac_signal" != 0 &&
- echo "$as_me: caught signal $ac_signal"
- echo "$as_me: exit $exit_status"
- } >&5
- rm -f core *.core &&
- rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
- exit $exit_status
- ' 0
-for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo >confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
- sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
- { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . $cache_file;;
- *) . ./$cache_file;;
- esac
- fi
-else
- { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
- >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in `(set) 2>&1 |
- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
- eval ac_old_set=\$ac_cv_env_${ac_var}_set
- eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val="\$ac_cv_env_${ac_var}_value"
- eval ac_new_val="\$ac_env_${ac_var}_value"
- case $ac_old_set,$ac_new_set in
- set,)
- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,set)
- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,);;
- *)
- if test "x$ac_old_val" != "x$ac_new_val"; then
- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
-echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
-echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
- fi;;
- esac
- # Pass precious variables to config.status.
- if test "$ac_new_set" = set; then
- case $ac_new_val in
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
- *) ac_arg=$ac_var=$ac_new_val ;;
- esac
- case " $ac_configure_args " in
- *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- esac
- fi
-done
-if $ac_cache_corrupted; then
- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ac_config_headers="$ac_config_headers config.h:config.in"
-
-
-# This file contains common code used by all simulators.
-#
-# SIM_AC_COMMON invokes AC macros used by all simulators and by the common
-# directory. It is intended to be invoked before any target specific stuff.
-# SIM_AC_OUTPUT is a cover function to AC_OUTPUT to generate the Makefile.
-# It is intended to be invoked last.
-#
-# The simulator's configure.in should look like:
-#
-# dnl Process this file with autoconf to produce a configure script.
-# sinclude(../common/aclocal.m4)
-# AC_PREREQ(2.5)dnl
-# AC_INIT(Makefile.in)
-#
-# SIM_AC_COMMON
-#
-# ... target specific stuff ...
-#
-# SIM_AC_OUTPUT
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-sim_inline="-DDEFAULT_INLINE=0"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# This file is derived from `gettext.m4'. The difference is that the
-# included macros assume Cygnus-style source and build trees.
-
-# Macro to add for using GNU gettext.
-# Ulrich Drepper <drepper@cygnus.com>, 1995.
-#
-# This file file be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 3
-
-
-
-
-
-# Search path for a program which passes the given test.
-# Ulrich Drepper <drepper@cygnus.com>, 1996.
-#
-# This file file be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 1
-
-
-
-# Check whether LC_MESSAGES is available in <locale.h>.
-# Ulrich Drepper <drepper@cygnus.com>, 1995.
-#
-# This file file be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 1
-
-
-
-
-
-
-
-# This file contains common code used by all simulators.
-#
-# common.m4 invokes AC macros used by all simulators and by the common
-# directory. It is intended to be included before any target specific
-# stuff. SIM_AC_OUTPUT is a cover function to AC_OUTPUT to generate
-# the Makefile. It is intended to be invoked last.
-#
-# The simulator's configure.in should look like:
-#
-# dnl Process this file with autoconf to produce a configure script.
-# AC_PREREQ(2.5)dnl
-# AC_INIT(Makefile.in)
-# AC_CONFIG_HEADER(config.h:config.in)
-#
-# sinclude(../common/aclocal.m4)
-# sinclude(../common/common.m4)
-#
-# ... target specific stuff ...
-
-ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- elif test -f $ac_dir/shtool; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/shtool install -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
-echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
- { (exit 1); exit 1; }; }
-fi
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"
-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
-
-# Make sure we can run config.sub.
-$ac_config_sub sun4 >/dev/null 2>&1 ||
- { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
-echo "$as_me: error: cannot run $ac_config_sub" >&2;}
- { (exit 1); exit 1; }; }
-
-echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6
-if test "${ac_cv_build+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_build_alias=$build_alias
-test -z "$ac_cv_build_alias" &&
- ac_cv_build_alias=`$ac_config_guess`
-test -z "$ac_cv_build_alias" &&
- { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
- { (exit 1); exit 1; }; }
-ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6
-build=$ac_cv_build
-build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6
-if test "${ac_cv_host+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_host_alias=$host_alias
-test -z "$ac_cv_host_alias" &&
- ac_cv_host_alias=$ac_cv_build_alias
-ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6
-host=$ac_cv_host
-host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-echo "$as_me:$LINENO: checking target system type" >&5
-echo $ECHO_N "checking target system type... $ECHO_C" >&6
-if test "${ac_cv_target+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_target_alias=$target_alias
-test "x$ac_cv_target_alias" = "x" &&
- ac_cv_target_alias=$ac_cv_host_alias
-ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_target" >&5
-echo "${ECHO_T}$ac_cv_target" >&6
-target=$ac_cv_target
-target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-test -n "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,$program_prefix,;$program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$,$program_suffix,;$program_transform_name"
-# Double any \ or $. echo might interpret backslashes.
-# By default was `s,x,x', remove it if useless.
-cat <<\_ACEOF >conftest.sed
-s/[\\$]/&&/g;s/;s,x,x,$//
-_ACEOF
-program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
-rm conftest.sed
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-fi
-
-fi
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# != 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
- fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- for ac_prog in cl
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$CC" && break
- done
-fi
-if test -z "$CC"; then
- ac_ct_CC=$CC
- for ac_prog in cl
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$ac_ct_CC" && break
-done
-
- CC=$ac_ct_CC
-fi
-
-fi
-
-
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-
-# Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
- "checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
- (eval $ac_compiler --version </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
- (eval $ac_compiler -v </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
- (eval $ac_compiler -V </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
- (eval $ac_link_default) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # Find the output, starting from the most likely. This scheme is
-# not robust to junk in `.', hence go to wildcards (a.*) only as a last
-# resort.
-
-# Be careful to initialize this variable, since it used to be cached.
-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
-ac_cv_exeext=
-# b.out is created by i960 compilers.
-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
-do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
- ;;
- conftest.$ac_ext )
- # This is the source file.
- ;;
- [ab].out )
- # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
- *.* )
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- # FIXME: I believe we export ac_cv_exeext for Libtool,
- # but it would be cool to find out if it's true. Does anybody
- # maintain Libtool? --akim.
- export ac_cv_exeext
- break;;
- * )
- break;;
- esac
-done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }
-fi
-
-ac_exeext=$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6
-
-# Check the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
- if { ac_try='./$ac_file'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
- fi
- fi
-fi
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-# Check the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6
-
-echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
- *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- export ac_cv_exeext
- break;;
- * ) break;;
- esac
-done
-else
- { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
-if test "${ac_cv_objext+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
- *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
- break;;
- esac
-done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_compiler_gnu=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_compiler_gnu=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
-GCC=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-CFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_g=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_prog_cc_g=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_prog_cc_stdc=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std1 is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std1. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
-_ACEOF
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX -qlanglvl=ansi
-# Ultrix and OSF/1 -std1
-# HP-UX 10.20 and later -Ae
-# HP-UX older versions -Aa -D_HPUX_SOURCE
-# SVR4 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_stdc=$ac_arg
-break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext
-done
-rm -f conftest.$ac_ext conftest.$ac_objext
-CC=$ac_save_CC
-
-fi
-
-case "x$ac_cv_prog_cc_stdc" in
- x|xno)
- echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
- *)
- echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
- CC="$CC $ac_cv_prog_cc_stdc" ;;
-esac
-
-# Some people use a C++ compiler to compile C. Since we use `exit',
-# in C++ we need to declare it. In case someone uses the same compiler
-# for both compiling C and C++ we need to have the C++ compiler decide
-# the declaration of exit, since it's the most demanding environment.
-cat >conftest.$ac_ext <<_ACEOF
-#ifndef __cplusplus
- choke me
-#endif
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- for ac_declaration in \
- '' \
- 'extern "C" void std::exit (int) throw (); using std::exit;' \
- 'extern "C" void std::exit (int); using std::exit;' \
- 'extern "C" void exit (int) throw ();' \
- 'extern "C" void exit (int);' \
- 'void exit (int);'
-do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-#include <stdlib.h>
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-continue
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
- echo '#ifdef __cplusplus' >>confdefs.h
- echo $ac_declaration >>confdefs.h
- echo '#endif' >>confdefs.h
-fi
-
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
- ./ | .// | /cC/* | \
- /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
- ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
- /usr/ucb/* ) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # program-specific install script used by HP pwplus--don't use.
- :
- else
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
- done
- done
- ;;
-esac
-done
-
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL=$ac_cv_path_install
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL=$ac_install_sh
- fi
-fi
-echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-# Put a plausible default for CC_FOR_BUILD in Makefile.
-if test "x$cross_compiling" = "xno"; then
- CC_FOR_BUILD='$(CC)'
-else
- CC_FOR_BUILD=gcc
-fi
-
-
-
-
-AR=${AR-ar}
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
- echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
- ac_ct_RANLIB=$RANLIB
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_RANLIB"; then
- ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_RANLIB="ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
- echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- RANLIB=$ac_ct_RANLIB
-else
- RANLIB="$ac_cv_prog_RANLIB"
-fi
-
-
-ALL_LINGUAS=
-echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.make <<\_ACEOF
-all:
- @echo 'ac_maketemp="$(MAKE)"'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftest.make
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- SET_MAKE=
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-echo "$as_me:$LINENO: checking for library containing strerror" >&5
-echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
-if test "${ac_cv_search_strerror+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_func_search_save_LIBS=$LIBS
-ac_cv_search_strerror=no
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char strerror ();
-int
-main ()
-{
-strerror ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_search_strerror="none required"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-if test "$ac_cv_search_strerror" = no; then
- for ac_lib in cposix; do
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char strerror ();
-int
-main ()
-{
-strerror ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_search_strerror="-l$ac_lib"
-break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- done
-fi
-LIBS=$ac_func_search_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
-echo "${ECHO_T}$ac_cv_search_strerror" >&6
-if test "$ac_cv_search_strerror" != no; then
- test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
-
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
- if test "${ac_cv_prog_CPP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Double quotes because CPP needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
- do
- ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether non-existent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- # Broken: success on invalid input.
-continue
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
- break
-fi
-
- done
- ac_cv_prog_CPP=$CPP
-
-fi
- CPP=$ac_cv_prog_CPP
-else
- ac_cv_prog_CPP=$CPP
-fi
-echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether non-existent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- # Broken: success on invalid input.
-continue
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
- :
-else
- { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6
-if test "${ac_cv_prog_egrep+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if echo a | (grep -E '(a|b)') >/dev/null 2>&1
- then ac_cv_prog_egrep='grep -E'
- else ac_cv_prog_egrep='egrep'
- fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
- EGREP=$ac_cv_prog_egrep
-
-
-echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
-if test "${ac_cv_header_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_header_stdc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_header_stdc=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then
- :
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then
- :
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then
- :
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ctype.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- exit(2);
- exit (0);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
-echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
-if test "${ac_cv_c_const+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-/* FIXME: Include the comments suggested by Paul. */
-#ifndef __cplusplus
- /* Ultrix mips cc rejects this. */
- typedef int charset[2];
- const charset x;
- /* SunOS 4.1.1 cc rejects this. */
- char const *const *ccp;
- char **p;
- /* NEC SVR4.0.2 mips cc rejects this. */
- struct point {int x, y;};
- static struct point const zero = {0,0};
- /* AIX XL C 1.02.0.0 rejects this.
- It does not let you subtract one const X* pointer from another in
- an arm of an if-expression whose if-part is not a constant
- expression */
- const char *g = "string";
- ccp = &g + (g ? g-g : 0);
- /* HPUX 7.0 cc rejects these. */
- ++ccp;
- p = (char**) ccp;
- ccp = (char const *const *) p;
- { /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
-
- *t++ = 0;
- }
- { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
- int x[] = {25, 17};
- const int *foo = &x[0];
- ++foo;
- }
- { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
- typedef const int *iptr;
- iptr p = 0;
- ++p;
- }
- { /* AIX XL C 1.02.0.0 rejects this saying
- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
- }
- { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
- const int foo = 10;
- }
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_const=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_c_const=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
-echo "${ECHO_T}$ac_cv_c_const" >&6
-if test $ac_cv_c_const = no; then
-
-cat >>confdefs.h <<\_ACEOF
-#define const
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for inline" >&5
-echo $ECHO_N "checking for inline... $ECHO_C" >&6
-if test "${ac_cv_c_inline+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_c_inline=no
-for ac_kw in inline __inline__ __inline; do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifndef __cplusplus
-typedef int foo_t;
-static $ac_kw foo_t static_foo () {return 0; }
-$ac_kw foo_t foo () {return 0; }
-#endif
-
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_inline=$ac_kw; break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
-echo "${ECHO_T}$ac_cv_c_inline" >&6
-
-
-case $ac_cv_c_inline in
- inline | yes) ;;
- *)
- case $ac_cv_c_inline in
- no) ac_val=;;
- *) ac_val=$ac_cv_c_inline;;
- esac
- cat >>confdefs.h <<_ACEOF
-#ifndef __cplusplus
-#define inline $ac_val
-#endif
-_ACEOF
- ;;
-esac
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-
-
-
-
-
-
-
-
-
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_Header=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_Header=no"
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-echo "$as_me:$LINENO: checking for off_t" >&5
-echo $ECHO_N "checking for off_t... $ECHO_C" >&6
-if test "${ac_cv_type_off_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if ((off_t *) 0)
- return 0;
-if (sizeof (off_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_off_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_off_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
-echo "${ECHO_T}$ac_cv_type_off_t" >&6
-if test $ac_cv_type_off_t = yes; then
- :
-else
-
-cat >>confdefs.h <<_ACEOF
-#define off_t long
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for size_t" >&5
-echo $ECHO_N "checking for size_t... $ECHO_C" >&6
-if test "${ac_cv_type_size_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if ((size_t *) 0)
- return 0;
-if (sizeof (size_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_size_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_size_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
-echo "${ECHO_T}$ac_cv_type_size_t" >&6
-if test $ac_cv_type_size_t = yes; then
- :
-else
-
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned
-_ACEOF
-
-fi
-
-# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
-# for constant arguments. Useless!
-echo "$as_me:$LINENO: checking for working alloca.h" >&5
-echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
-if test "${ac_cv_working_alloca_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <alloca.h>
-int
-main ()
-{
-char *p = (char *) alloca (2 * sizeof (int));
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_working_alloca_h=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_working_alloca_h=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
-echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
-if test $ac_cv_working_alloca_h = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ALLOCA_H 1
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for alloca" >&5
-echo $ECHO_N "checking for alloca... $ECHO_C" >&6
-if test "${ac_cv_func_alloca_works+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __GNUC__
-# define alloca __builtin_alloca
-#else
-# ifdef _MSC_VER
-# include <malloc.h>
-# define alloca _alloca
-# else
-# if HAVE_ALLOCA_H
-# include <alloca.h>
-# else
-# ifdef _AIX
- #pragma alloca
-# else
-# ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
-# endif
-# endif
-# endif
-# endif
-#endif
-
-int
-main ()
-{
-char *p = (char *) alloca (1);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_alloca_works=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_alloca_works=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
-echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
-
-if test $ac_cv_func_alloca_works = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ALLOCA 1
-_ACEOF
-
-else
- # The SVR3 libPW and SVR4 libucb both contain incompatible functions
-# that cause trouble. Some versions do not even contain alloca or
-# contain a buggy version. If you still want to use their alloca,
-# use ar to extract alloca.o from them instead of compiling alloca.c.
-
-ALLOCA=alloca.$ac_objext
-
-cat >>confdefs.h <<\_ACEOF
-#define C_ALLOCA 1
-_ACEOF
-
-
-echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
-echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
-if test "${ac_cv_os_cray+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if defined(CRAY) && ! defined(CRAY2)
-webecray
-#else
-wenotbecray
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "webecray" >/dev/null 2>&1; then
- ac_cv_os_cray=yes
-else
- ac_cv_os_cray=no
-fi
-rm -f conftest*
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
-echo "${ECHO_T}$ac_cv_os_cray" >&6
-if test $ac_cv_os_cray = yes; then
- for ac_func in _getb67 GETB67 getb67; do
- as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define CRAY_STACKSEG_END $ac_func
-_ACEOF
-
- break
-fi
-
- done
-fi
-
-echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
-echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
-if test "${ac_cv_c_stack_direction+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "$cross_compiling" = yes; then
- ac_cv_c_stack_direction=0
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-int
-find_stack_direction ()
-{
- static char *addr = 0;
- auto char dummy;
- if (addr == 0)
- {
- addr = &dummy;
- return find_stack_direction ();
- }
- else
- return (&dummy > addr) ? 1 : -1;
-}
-
-int
-main ()
-{
- exit (find_stack_direction () < 0);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_stack_direction=1
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_c_stack_direction=-1
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
-echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
-
-cat >>confdefs.h <<_ACEOF
-#define STACK_DIRECTION $ac_cv_c_stack_direction
-_ACEOF
-
-
-fi
-
-
-
-for ac_header in stdlib.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists. ##
-## ------------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-for ac_func in getpagesize
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-echo "$as_me:$LINENO: checking for working mmap" >&5
-echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
-if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "$cross_compiling" = yes; then
- ac_cv_func_mmap_fixed_mapped=no
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-/* malloc might have been renamed as rpl_malloc. */
-#undef malloc
-
-/* Thanks to Mike Haertel and Jim Avera for this test.
- Here is a matrix of mmap possibilities:
- mmap private not fixed
- mmap private fixed at somewhere currently unmapped
- mmap private fixed at somewhere already mapped
- mmap shared not fixed
- mmap shared fixed at somewhere currently unmapped
- mmap shared fixed at somewhere already mapped
- For private mappings, we should verify that changes cannot be read()
- back from the file, nor mmap's back from the file at a different
- address. (There have been systems where private was not correctly
- implemented like the infamous i386 svr4.0, and systems where the
- VM page cache was not coherent with the file system buffer cache
- like early versions of FreeBSD and possibly contemporary NetBSD.)
- For shared mappings, we should conversely verify that changes get
- propagated back to all the places they're supposed to be.
-
- Grep wants private fixed already mapped.
- The main things grep needs to know about mmap are:
- * does it exist and is it safe to write into the mmap'd area
- * how to use it (BSD variants) */
-
-#include <fcntl.h>
-#include <sys/mman.h>
-
-#if !STDC_HEADERS && !HAVE_STDLIB_H
-char *malloc ();
-#endif
-
-/* This mess was copied from the GNU getpagesize.h. */
-#if !HAVE_GETPAGESIZE
-/* Assume that all systems that can run configure have sys/param.h. */
-# if !HAVE_SYS_PARAM_H
-# define HAVE_SYS_PARAM_H 1
-# endif
-
-# ifdef _SC_PAGESIZE
-# define getpagesize() sysconf(_SC_PAGESIZE)
-# else /* no _SC_PAGESIZE */
-# if HAVE_SYS_PARAM_H
-# include <sys/param.h>
-# ifdef EXEC_PAGESIZE
-# define getpagesize() EXEC_PAGESIZE
-# else /* no EXEC_PAGESIZE */
-# ifdef NBPG
-# define getpagesize() NBPG * CLSIZE
-# ifndef CLSIZE
-# define CLSIZE 1
-# endif /* no CLSIZE */
-# else /* no NBPG */
-# ifdef NBPC
-# define getpagesize() NBPC
-# else /* no NBPC */
-# ifdef PAGESIZE
-# define getpagesize() PAGESIZE
-# endif /* PAGESIZE */
-# endif /* no NBPC */
-# endif /* no NBPG */
-# endif /* no EXEC_PAGESIZE */
-# else /* no HAVE_SYS_PARAM_H */
-# define getpagesize() 8192 /* punt totally */
-# endif /* no HAVE_SYS_PARAM_H */
-# endif /* no _SC_PAGESIZE */
-
-#endif /* no HAVE_GETPAGESIZE */
-
-int
-main ()
-{
- char *data, *data2, *data3;
- int i, pagesize;
- int fd;
-
- pagesize = getpagesize ();
-
- /* First, make a file with some known garbage in it. */
- data = (char *) malloc (pagesize);
- if (!data)
- exit (1);
- for (i = 0; i < pagesize; ++i)
- *(data + i) = rand ();
- umask (0);
- fd = creat ("conftest.mmap", 0600);
- if (fd < 0)
- exit (1);
- if (write (fd, data, pagesize) != pagesize)
- exit (1);
- close (fd);
-
- /* Next, try to mmap the file at a fixed address which already has
- something else allocated at it. If we can, also make sure that
- we see the same garbage. */
- fd = open ("conftest.mmap", O_RDWR);
- if (fd < 0)
- exit (1);
- data2 = (char *) malloc (2 * pagesize);
- if (!data2)
- exit (1);
- data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
- if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_FIXED, fd, 0L))
- exit (1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data2 + i))
- exit (1);
-
- /* Finally, make sure that changes to the mapped area do not
- percolate back to the file as seen by read(). (This is a bug on
- some variants of i386 svr4.0.) */
- for (i = 0; i < pagesize; ++i)
- *(data2 + i) = *(data2 + i) + 1;
- data3 = (char *) malloc (pagesize);
- if (!data3)
- exit (1);
- if (read (fd, data3, pagesize) != pagesize)
- exit (1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data3 + i))
- exit (1);
- close (fd);
- exit (0);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_mmap_fixed_mapped=yes
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_func_mmap_fixed_mapped=no
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
-echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
-if test $ac_cv_func_mmap_fixed_mapped = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MMAP 1
-_ACEOF
-
-fi
-rm -f conftest.mmap
-
-
-
-
-
-
-
-
-
-
-
-for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
-unistd.h values.h sys/param.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists. ##
-## ------------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-
-
-
-
-
-
-
-
-for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
-__argz_count __argz_stringify __argz_next
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
- if test "${ac_cv_func_stpcpy+set}" != "set"; then
-
-for ac_func in stpcpy
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
- fi
- if test "${ac_cv_func_stpcpy}" = "yes"; then
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_STPCPY 1
-_ACEOF
-
- fi
-
- if test $ac_cv_header_locale_h = yes; then
- echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
-echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
-if test "${am_cv_val_LC_MESSAGES+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <locale.h>
-int
-main ()
-{
-return LC_MESSAGES
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- am_cv_val_LC_MESSAGES=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-am_cv_val_LC_MESSAGES=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
-echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
- if test $am_cv_val_LC_MESSAGES = yes; then
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_LC_MESSAGES 1
-_ACEOF
-
- fi
- fi
- echo "$as_me:$LINENO: checking whether NLS is requested" >&5
-echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
- # Check whether --enable-nls or --disable-nls was given.
-if test "${enable_nls+set}" = set; then
- enableval="$enable_nls"
- USE_NLS=$enableval
-else
- USE_NLS=yes
-fi;
- echo "$as_me:$LINENO: result: $USE_NLS" >&5
-echo "${ECHO_T}$USE_NLS" >&6
-
-
- USE_INCLUDED_LIBINTL=no
-
- if test "$USE_NLS" = "yes"; then
- cat >>confdefs.h <<\_ACEOF
-#define ENABLE_NLS 1
-_ACEOF
-
- echo "$as_me:$LINENO: checking whether included gettext is requested" >&5
-echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
-
-# Check whether --with-included-gettext or --without-included-gettext was given.
-if test "${with_included_gettext+set}" = set; then
- withval="$with_included_gettext"
- nls_cv_force_use_gnu_gettext=$withval
-else
- nls_cv_force_use_gnu_gettext=no
-fi;
- echo "$as_me:$LINENO: result: $nls_cv_force_use_gnu_gettext" >&5
-echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
-
- nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
- if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
- nls_cv_header_intl=
- nls_cv_header_libgt=
- CATOBJEXT=NONE
-
- if test "${ac_cv_header_libintl_h+set}" = set; then
- echo "$as_me:$LINENO: checking for libintl.h" >&5
-echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
-if test "${ac_cv_header_libintl_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
-echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking libintl.h usability" >&5
-echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <libintl.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking libintl.h presence" >&5
-echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <libintl.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists. ##
-## ------------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for libintl.h" >&5
-echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
-if test "${ac_cv_header_libintl_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_header_libintl_h=$ac_header_preproc
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
-echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
-
-fi
-if test $ac_cv_header_libintl_h = yes; then
- echo "$as_me:$LINENO: checking for gettext in libc" >&5
-echo $ECHO_N "checking for gettext in libc... $ECHO_C" >&6
-if test "${gt_cv_func_gettext_libc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <libintl.h>
-int
-main ()
-{
-return (int) gettext ("")
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- gt_cv_func_gettext_libc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-gt_cv_func_gettext_libc=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $gt_cv_func_gettext_libc" >&5
-echo "${ECHO_T}$gt_cv_func_gettext_libc" >&6
-
- if test "$gt_cv_func_gettext_libc" != "yes"; then
- echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
-echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6
-if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char bindtextdomain ();
-int
-main ()
-{
-bindtextdomain ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_intl_bindtextdomain=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_intl_bindtextdomain=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
-echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6
-if test $ac_cv_lib_intl_bindtextdomain = yes; then
- echo "$as_me:$LINENO: checking for gettext in libintl" >&5
-echo $ECHO_N "checking for gettext in libintl... $ECHO_C" >&6
-if test "${gt_cv_func_gettext_libintl+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-return (int) gettext ("")
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- gt_cv_func_gettext_libintl=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-gt_cv_func_gettext_libintl=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $gt_cv_func_gettext_libintl" >&5
-echo "${ECHO_T}$gt_cv_func_gettext_libintl" >&6
-fi
-
- fi
-
- if test "$gt_cv_func_gettext_libc" = "yes" \
- || test "$gt_cv_func_gettext_libintl" = "yes"; then
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETTEXT 1
-_ACEOF
-
- # Extract the first word of "msgfmt", so it can be a program name with args.
-set dummy msgfmt; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_MSGFMT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case "$MSGFMT" in
- /*)
- ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
- ac_cv_path_MSGFMT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
- ;;
-esac
-fi
-MSGFMT="$ac_cv_path_MSGFMT"
-if test -n "$MSGFMT"; then
- echo "$as_me:$LINENO: result: $MSGFMT" >&5
-echo "${ECHO_T}$MSGFMT" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
- if test "$MSGFMT" != "no"; then
-
-for ac_func in dcgettext
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
- # Extract the first word of "gmsgfmt", so it can be a program name with args.
-set dummy gmsgfmt; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_GMSGFMT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $GMSGFMT in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
- ;;
-esac
-fi
-GMSGFMT=$ac_cv_path_GMSGFMT
-
-if test -n "$GMSGFMT"; then
- echo "$as_me:$LINENO: result: $GMSGFMT" >&5
-echo "${ECHO_T}$GMSGFMT" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- # Extract the first word of "xgettext", so it can be a program name with args.
-set dummy xgettext; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_XGETTEXT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case "$XGETTEXT" in
- /*)
- ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
- ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
- ;;
-esac
-fi
-XGETTEXT="$ac_cv_path_XGETTEXT"
-if test -n "$XGETTEXT"; then
- echo "$as_me:$LINENO: result: $XGETTEXT" >&5
-echo "${ECHO_T}$XGETTEXT" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-extern int _nl_msg_cat_cntr;
- return _nl_msg_cat_cntr
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- CATOBJEXT=.gmo
- DATADIRNAME=share
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-CATOBJEXT=.mo
- DATADIRNAME=lib
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- INSTOBJEXT=.mo
- fi
- fi
-
-fi
-
-
-
-
- if test "$CATOBJEXT" = "NONE"; then
- nls_cv_use_gnu_gettext=yes
- fi
- fi
-
- if test "$nls_cv_use_gnu_gettext" = "yes"; then
- INTLOBJS="\$(GETTOBJS)"
- # Extract the first word of "msgfmt", so it can be a program name with args.
-set dummy msgfmt; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_MSGFMT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case "$MSGFMT" in
- /*)
- ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
- ac_cv_path_MSGFMT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
- ;;
-esac
-fi
-MSGFMT="$ac_cv_path_MSGFMT"
-if test -n "$MSGFMT"; then
- echo "$as_me:$LINENO: result: $MSGFMT" >&5
-echo "${ECHO_T}$MSGFMT" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- # Extract the first word of "gmsgfmt", so it can be a program name with args.
-set dummy gmsgfmt; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_GMSGFMT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $GMSGFMT in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
- ;;
-esac
-fi
-GMSGFMT=$ac_cv_path_GMSGFMT
-
-if test -n "$GMSGFMT"; then
- echo "$as_me:$LINENO: result: $GMSGFMT" >&5
-echo "${ECHO_T}$GMSGFMT" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- # Extract the first word of "xgettext", so it can be a program name with args.
-set dummy xgettext; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_XGETTEXT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case "$XGETTEXT" in
- /*)
- ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
- ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
- ;;
-esac
-fi
-XGETTEXT="$ac_cv_path_XGETTEXT"
-if test -n "$XGETTEXT"; then
- echo "$as_me:$LINENO: result: $XGETTEXT" >&5
-echo "${ECHO_T}$XGETTEXT" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-
- USE_INCLUDED_LIBINTL=yes
- CATOBJEXT=.gmo
- INSTOBJEXT=.mo
- DATADIRNAME=share
- INTLDEPS='$(top_builddir)/../intl/libintl.a'
- INTLLIBS=$INTLDEPS
- LIBS=`echo $LIBS | sed -e 's/-lintl//'`
- nls_cv_header_intl=libintl.h
- nls_cv_header_libgt=libgettext.h
- fi
-
- if test "$XGETTEXT" != ":"; then
- if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
- : ;
- else
- echo "$as_me:$LINENO: result: found xgettext programs is not GNU xgettext; ignore it" >&5
-echo "${ECHO_T}found xgettext programs is not GNU xgettext; ignore it" >&6
- XGETTEXT=":"
- fi
- fi
-
- # We need to process the po/ directory.
- POSUB=po
- else
- DATADIRNAME=share
- nls_cv_header_intl=libintl.h
- nls_cv_header_libgt=libgettext.h
- fi
-
- # If this is used in GNU gettext we have to set USE_NLS to `yes'
- # because some of the sources are only built for this goal.
- if test "$PACKAGE" = gettext; then
- USE_NLS=yes
- USE_INCLUDED_LIBINTL=yes
- fi
-
- for lang in $ALL_LINGUAS; do
- GMOFILES="$GMOFILES $lang.gmo"
- POFILES="$POFILES $lang.po"
- done
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if test "x$CATOBJEXT" != "x"; then
- if test "x$ALL_LINGUAS" = "x"; then
- LINGUAS=
- else
- echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
-echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
- NEW_LINGUAS=
- for lang in ${LINGUAS=$ALL_LINGUAS}; do
- case "$ALL_LINGUAS" in
- *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
- esac
- done
- LINGUAS=$NEW_LINGUAS
- echo "$as_me:$LINENO: result: $LINGUAS" >&5
-echo "${ECHO_T}$LINGUAS" >&6
- fi
-
- if test -n "$LINGUAS"; then
- for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
- fi
- fi
-
- if test $ac_cv_header_locale_h = yes; then
- INCLUDE_LOCALE_H="#include <locale.h>"
- else
- INCLUDE_LOCALE_H="\
-/* The system does not provide the header <locale.h>. Take care yourself. */"
- fi
-
-
- if test -f $srcdir/po2tbl.sed.in; then
- if test "$CATOBJEXT" = ".cat"; then
- if test "${ac_cv_header_linux_version_h+set}" = set; then
- echo "$as_me:$LINENO: checking for linux/version.h" >&5
-echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
-if test "${ac_cv_header_linux_version_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
-echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking linux/version.h usability" >&5
-echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <linux/version.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking linux/version.h presence" >&5
-echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <linux/version.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: linux/version.h: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: linux/version.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists. ##
-## ------------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for linux/version.h" >&5
-echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
-if test "${ac_cv_header_linux_version_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_header_linux_version_h=$ac_header_preproc
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
-echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
-
-fi
-if test $ac_cv_header_linux_version_h = yes; then
- msgformat=linux
-else
- msgformat=xopen
-fi
-
-
-
- sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
- fi
- sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
- $srcdir/po2tbl.sed.in > po2tbl.sed
- fi
-
- if test "$PACKAGE" = "gettext"; then
- GT_NO="#NO#"
- GT_YES=
- else
- GT_NO=
- GT_YES="#YES#"
- fi
-
-
-
- MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
-
-
- l=
-
-
- if test -d $srcdir/po; then
- test -d po || mkdir po
- if test "x$srcdir" != "x."; then
- if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
- posrcprefix="$srcdir/"
- else
- posrcprefix="../$srcdir/"
- fi
- else
- posrcprefix="../"
- fi
- rm -f po/POTFILES
- sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
- < $srcdir/po/POTFILES.in > po/POTFILES
- fi
-
-
-# Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-
-
-
-
-
-for ac_header in stdlib.h string.h strings.h unistd.h time.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists. ##
-## ------------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-for ac_header in sys/time.h sys/resource.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists. ##
-## ------------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-for ac_header in fcntl.h fpu_control.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists. ##
-## ------------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-
-for ac_header in dlfcn.h errno.h sys/stat.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists. ##
-## ------------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-
-
-for ac_func in getrusage time sigaction __setfpucw
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-# Check for socket libraries
-
-echo "$as_me:$LINENO: checking for bind in -lsocket" >&5
-echo $ECHO_N "checking for bind in -lsocket... $ECHO_C" >&6
-if test "${ac_cv_lib_socket_bind+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsocket $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char bind ();
-int
-main ()
-{
-bind ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_socket_bind=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_socket_bind=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_socket_bind" >&5
-echo "${ECHO_T}$ac_cv_lib_socket_bind" >&6
-if test $ac_cv_lib_socket_bind = yes; then
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBSOCKET 1
-_ACEOF
-
- LIBS="-lsocket $LIBS"
-
-fi
-
-
-echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
-echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
-if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnsl $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char gethostbyname ();
-int
-main ()
-{
-gethostbyname ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_nsl_gethostbyname=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_nsl_gethostbyname=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
-echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
-if test $ac_cv_lib_nsl_gethostbyname = yes; then
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBNSL 1
-_ACEOF
-
- LIBS="-lnsl $LIBS"
-
-fi
-
-
-. ${srcdir}/../../bfd/configure.host
-
-
-
-USE_MAINTAINER_MODE=no
-# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- case "${enableval}" in
- yes) MAINT="" USE_MAINTAINER_MODE=yes ;;
- no) MAINT="#" ;;
- *) { { echo "$as_me:$LINENO: error: \"--enable-maintainer-mode does not take a value\"" >&5
-echo "$as_me: error: \"--enable-maintainer-mode does not take a value\"" >&2;}
- { (exit 1); exit 1; }; }; MAINT="#" ;;
-esac
-if test x"$silent" != x"yes" && test x"$MAINT" = x""; then
- echo "Setting maintainer mode" 6>&1
-fi
-else
- MAINT="#"
-fi;
-
-
-# Check whether --enable-sim-bswap or --disable-sim-bswap was given.
-if test "${enable_sim_bswap+set}" = set; then
- enableval="$enable_sim_bswap"
- case "${enableval}" in
- yes) sim_bswap="-DWITH_BSWAP=1 -DUSE_BSWAP=1";;
- no) sim_bswap="-DWITH_BSWAP=0";;
- *) { { echo "$as_me:$LINENO: error: \"--enable-sim-bswap does not take a value\"" >&5
-echo "$as_me: error: \"--enable-sim-bswap does not take a value\"" >&2;}
- { (exit 1); exit 1; }; }; sim_bswap="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then
- echo "Setting bswap flags = $sim_bswap" 6>&1
-fi
-else
- sim_bswap=""
-fi;
-
-
-# Check whether --enable-sim-cflags or --disable-sim-cflags was given.
-if test "${enable_sim_cflags+set}" = set; then
- enableval="$enable_sim_cflags"
- case "${enableval}" in
- yes) sim_cflags="-O2 -fomit-frame-pointer";;
- trace) { { echo "$as_me:$LINENO: error: \"Please use --enable-sim-debug instead.\"" >&5
-echo "$as_me: error: \"Please use --enable-sim-debug instead.\"" >&2;}
- { (exit 1); exit 1; }; }; sim_cflags="";;
- no) sim_cflags="";;
- *) sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then
- echo "Setting sim cflags = $sim_cflags" 6>&1
-fi
-else
- sim_cflags=""
-fi;
-
-
-# Check whether --enable-sim-debug or --disable-sim-debug was given.
-if test "${enable_sim_debug+set}" = set; then
- enableval="$enable_sim_debug"
- case "${enableval}" in
- yes) sim_debug="-DDEBUG=7 -DWITH_DEBUG=7";;
- no) sim_debug="-DDEBUG=0 -DWITH_DEBUG=0";;
- *) sim_debug="-DDEBUG='(${enableval})' -DWITH_DEBUG='(${enableval})'";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_debug" != x""; then
- echo "Setting sim debug = $sim_debug" 6>&1
-fi
-else
- sim_debug=""
-fi;
-
-
-# Check whether --enable-sim-stdio or --disable-sim-stdio was given.
-if test "${enable_sim_stdio+set}" = set; then
- enableval="$enable_sim_stdio"
- case "${enableval}" in
- yes) sim_stdio="-DWITH_STDIO=DO_USE_STDIO";;
- no) sim_stdio="-DWITH_STDIO=DONT_USE_STDIO";;
- *) { { echo "$as_me:$LINENO: error: \"Unknown value $enableval passed to --enable-sim-stdio\"" >&5
-echo "$as_me: error: \"Unknown value $enableval passed to --enable-sim-stdio\"" >&2;}
- { (exit 1); exit 1; }; }; sim_stdio="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_stdio" != x""; then
- echo "Setting stdio flags = $sim_stdio" 6>&1
-fi
-else
- sim_stdio=""
-fi;
-
-
-# Check whether --enable-sim-trace or --disable-sim-trace was given.
-if test "${enable_sim_trace+set}" = set; then
- enableval="$enable_sim_trace"
- case "${enableval}" in
- yes) sim_trace="-DTRACE=1 -DWITH_TRACE=-1";;
- no) sim_trace="-DTRACE=0 -DWITH_TRACE=0";;
- [-0-9]*)
- sim_trace="-DTRACE='(${enableval})' -DWITH_TRACE='(${enableval})'";;
- [a-z]*)
- sim_trace=""
- for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
- if test x"$sim_trace" = x; then
- sim_trace="-DWITH_TRACE='(TRACE_$x"
- else
- sim_trace="${sim_trace}|TRACE_$x"
- fi
- done
- sim_trace="$sim_trace)'" ;;
-esac
-if test x"$silent" != x"yes" && test x"$sim_trace" != x""; then
- echo "Setting sim trace = $sim_trace" 6>&1
-fi
-else
- sim_trace=""
-fi;
-
-
-# Check whether --enable-sim-profile or --disable-sim-profile was given.
-if test "${enable_sim_profile+set}" = set; then
- enableval="$enable_sim_profile"
- case "${enableval}" in
- yes) sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1";;
- no) sim_profile="-DPROFILE=0 -DWITH_PROFILE=0";;
- [-0-9]*)
- sim_profile="-DPROFILE='(${enableval})' -DWITH_PROFILE='(${enableval})'";;
- [a-z]*)
- sim_profile=""
- for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
- if test x"$sim_profile" = x; then
- sim_profile="-DWITH_PROFILE='(PROFILE_$x"
- else
- sim_profile="${sim_profile}|PROFILE_$x"
- fi
- done
- sim_profile="$sim_profile)'" ;;
-esac
-if test x"$silent" != x"yes" && test x"$sim_profile" != x""; then
- echo "Setting sim profile = $sim_profile" 6>&1
-fi
-else
- sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1"
-fi;
-
-
-echo "$as_me:$LINENO: checking return type of signal handlers" >&5
-echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
-if test "${ac_cv_type_signal+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <sys/types.h>
-#include <signal.h>
-#ifdef signal
-# undef signal
-#endif
-#ifdef __cplusplus
-extern "C" void (*signal (int, void (*)(int)))(int);
-#else
-void (*signal ()) ();
-#endif
-
-int
-main ()
-{
-int i;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_signal=void
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_signal=int
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
-echo "${ECHO_T}$ac_cv_type_signal" >&6
-
-cat >>confdefs.h <<_ACEOF
-#define RETSIGTYPE $ac_cv_type_signal
-_ACEOF
-
-
-
-
-
-sim_link_files=
-sim_link_links=
-
-sim_link_links=tconfig.h
-if test -f ${srcdir}/tconfig.in
-then
- sim_link_files=tconfig.in
-else
- sim_link_files=../common/tconfig.in
-fi
-
-# targ-vals.def points to the libc macro description file.
-case "${target}" in
-*-*-*) TARG_VALS_DEF=../common/nltvals.def ;;
-esac
-sim_link_files="${sim_link_files} ${TARG_VALS_DEF}"
-sim_link_links="${sim_link_links} targ-vals.def"
-
-
-
-wire_endian=""
-default_endian="BIG_ENDIAN"
-# Check whether --enable-sim-endian or --disable-sim-endian was given.
-if test "${enable_sim_endian+set}" = set; then
- enableval="$enable_sim_endian"
- case "${enableval}" in
- b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";;
- l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";;
- yes) if test x"$wire_endian" != x; then
- sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}"
- else
- if test x"$default_endian" != x; then
- sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}"
- else
- echo "No hard-wired endian for target $target" 1>&6
- sim_endian="-DWITH_TARGET_BYTE_ORDER=0"
- fi
- fi;;
- no) if test x"$default_endian" != x; then
- sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}"
- else
- if test x"$wire_endian" != x; then
- sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}"
- else
- echo "No default endian for target $target" 1>&6
- sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0"
- fi
- fi;;
- *) { { echo "$as_me:$LINENO: error: \"Unknown value $enableval for --enable-sim-endian\"" >&5
-echo "$as_me: error: \"Unknown value $enableval for --enable-sim-endian\"" >&2;}
- { (exit 1); exit 1; }; }; sim_endian="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then
- echo "Setting endian flags = $sim_endian" 6>&1
-fi
-else
- if test x"$default_endian" != x; then
- sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}"
-else
- if test x"$wire_endian" != x; then
- sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}"
- else
- sim_endian=
- fi
-fi
-fi;
-wire_alignment="STRICT_ALIGNMENT"
-default_alignment=""
-
-# Check whether --enable-sim-alignment or --disable-sim-alignment was given.
-if test "${enable_sim_alignment+set}" = set; then
- enableval="$enable_sim_alignment"
- case "${enableval}" in
- strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";;
- nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";;
- forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";;
- yes) if test x"$wire_alignment" != x; then
- sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}"
- else
- if test x"$default_alignment" != x; then
- sim_alignment="-DWITH_ALIGNMENT=${default_alignment}"
- else
- echo "No hard-wired alignment for target $target" 1>&6
- sim_alignment="-DWITH_ALIGNMENT=0"
- fi
- fi;;
- no) if test x"$default_alignment" != x; then
- sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}"
- else
- if test x"$wire_alignment" != x; then
- sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}"
- else
- echo "No default alignment for target $target" 1>&6
- sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0"
- fi
- fi;;
- *) { { echo "$as_me:$LINENO: error: \"Unknown value $enableval passed to --enable-sim-alignment\"" >&5
-echo "$as_me: error: \"Unknown value $enableval passed to --enable-sim-alignment\"" >&2;}
- { (exit 1); exit 1; }; }; sim_alignment="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then
- echo "Setting alignment flags = $sim_alignment" 6>&1
-fi
-else
- if test x"$default_alignment" != x; then
- sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}"
-else
- if test x"$wire_alignment" != x; then
- sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}"
- else
- sim_alignment=
- fi
-fi
-fi;
-
-# Check whether --enable-sim-hostendian or --disable-sim-hostendian was given.
-if test "${enable_sim_hostendian+set}" = set; then
- enableval="$enable_sim_hostendian"
- case "${enableval}" in
- no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";;
- b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";;
- l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";;
- *) { { echo "$as_me:$LINENO: error: \"Unknown value $enableval for --enable-sim-hostendian\"" >&5
-echo "$as_me: error: \"Unknown value $enableval for --enable-sim-hostendian\"" >&2;}
- { (exit 1); exit 1; }; }; sim_hostendian="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then
- echo "Setting hostendian flags = $sim_hostendian" 6>&1
-fi
-else
-
-if test "x$cross_compiling" = "xno"; then
- echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
-echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
-if test "${ac_cv_c_bigendian+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # See if sys/param.h defines the BYTE_ORDER macro.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <sys/types.h>
-#include <sys/param.h>
-
-int
-main ()
-{
-#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
- bogus endian macros
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- # It does; now see whether it defined to BIG_ENDIAN or not.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <sys/types.h>
-#include <sys/param.h>
-
-int
-main ()
-{
-#if BYTE_ORDER != BIG_ENDIAN
- not big endian
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_bigendian=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_c_bigendian=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-# It does not; compile a test program.
-if test "$cross_compiling" = yes; then
- # try to guess the endianness by grepping values into an object file
- ac_cv_c_bigendian=unknown
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
-short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
-void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
-short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
-short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
-void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
-int
-main ()
-{
- _ascii (); _ebcdic ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
- ac_cv_c_bigendian=yes
-fi
-if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
- if test "$ac_cv_c_bigendian" = unknown; then
- ac_cv_c_bigendian=no
- else
- # finding both strings is unlikely to happen, but who knows?
- ac_cv_c_bigendian=unknown
- fi
-fi
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-int
-main ()
-{
- /* Are we little or big endian? From Harbison&Steele. */
- union
- {
- long l;
- char c[sizeof (long)];
- } u;
- u.l = 1;
- exit (u.c[sizeof (long) - 1] == 1);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_bigendian=no
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_c_bigendian=yes
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
-echo "${ECHO_T}$ac_cv_c_bigendian" >&6
-case $ac_cv_c_bigendian in
- yes)
-
-cat >>confdefs.h <<\_ACEOF
-#define WORDS_BIGENDIAN 1
-_ACEOF
- ;;
- no)
- ;;
- *)
- { { echo "$as_me:$LINENO: error: unknown endianness
-presetting ac_cv_c_bigendian=no (or yes) will help" >&5
-echo "$as_me: error: unknown endianness
-presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
- { (exit 1); exit 1; }; } ;;
-esac
-
- if test $ac_cv_c_bigendian = yes; then
- sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN"
- else
- sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN"
- fi
-else
- sim_hostendian="-DWITH_HOST_BYTE_ORDER=0"
-fi
-fi;
-
-default_sim_scache="16384"
-# Check whether --enable-sim-scache or --disable-sim-scache was given.
-if test "${enable_sim_scache+set}" = set; then
- enableval="$enable_sim_scache"
- case "${enableval}" in
- yes) sim_scache="-DWITH_SCACHE=${default_sim_scache}";;
- no) sim_scache="-DWITH_SCACHE=0" ;;
- [0-9]*) sim_scache="-DWITH_SCACHE=${enableval}";;
- *) { { echo "$as_me:$LINENO: error: \"Bad value $enableval passed to --enable-sim-scache\"" >&5
-echo "$as_me: error: \"Bad value $enableval passed to --enable-sim-scache\"" >&2;}
- { (exit 1); exit 1; }; };
- sim_scache="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_scache" != x""; then
- echo "Setting scache size = $sim_scache" 6>&1
-fi
-else
- sim_scache="-DWITH_SCACHE=${default_sim_scache}"
-fi;
-
-
-default_sim_default_model="sh5"
-# Check whether --enable-sim-default-model or --disable-sim-default-model was given.
-if test "${enable_sim_default_model+set}" = set; then
- enableval="$enable_sim_default_model"
- case "${enableval}" in
- yes|no) { { echo "$as_me:$LINENO: error: \"Missing argument to --enable-sim-default-model\"" >&5
-echo "$as_me: error: \"Missing argument to --enable-sim-default-model\"" >&2;}
- { (exit 1); exit 1; }; };;
- *) sim_default_model="-DWITH_DEFAULT_MODEL='\"${enableval}\"'";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_default_model" != x""; then
- echo "Setting default model = $sim_default_model" 6>&1
-fi
-else
- sim_default_model="-DWITH_DEFAULT_MODEL='\"${default_sim_default_model}\"'"
-fi;
-
-
-# Check whether --enable-sim-environment or --disable-sim-environment was given.
-if test "${enable_sim_environment+set}" = set; then
- enableval="$enable_sim_environment"
- case "${enableval}" in
- all | ALL) sim_environment="-DWITH_ENVIRONMENT=ALL_ENVIRONMENT";;
- user | USER) sim_environment="-DWITH_ENVIRONMENT=USER_ENVIRONMENT";;
- virtual | VIRTUAL) sim_environment="-DWITH_ENVIRONMENT=VIRTUAL_ENVIRONMENT";;
- operating | OPERATING) sim_environment="-DWITH_ENVIRONMENT=OPERATING_ENVIRONMENT";;
- *) { { echo "$as_me:$LINENO: error: \"Unknown value $enableval passed to --enable-sim-environment\"" >&5
-echo "$as_me: error: \"Unknown value $enableval passed to --enable-sim-environment\"" >&2;}
- { (exit 1); exit 1; }; };
- sim_environment="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_environment" != x""; then
- echo "Setting sim environment = $sim_environment" 6>&1
-fi
-else
- sim_environment="-DWITH_ENVIRONMENT=ALL_ENVIRONMENT"
-fi;
-
-default_sim_inline=""
-# Check whether --enable-sim-inline or --disable-sim-inline was given.
-if test "${enable_sim_inline+set}" = set; then
- enableval="$enable_sim_inline"
- sim_inline=""
-case "$enableval" in
- no) sim_inline="-DDEFAULT_INLINE=0";;
- 0) sim_inline="-DDEFAULT_INLINE=0";;
- yes | 2) sim_inline="-DDEFAULT_INLINE=ALL_C_INLINE";;
- 1) sim_inline="-DDEFAULT_INLINE=INLINE_LOCALS";;
- *) for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
- new_flag=""
- case "$x" in
- *_INLINE=*) new_flag="-D$x";;
- *=*) new_flag=`echo "$x" | sed -e "s/=/_INLINE=/" -e "s/^/-D/"`;;
- *_INLINE) new_flag="-D$x=ALL_C_INLINE";;
- *) new_flag="-D$x""_INLINE=ALL_C_INLINE";;
- esac
- if test x"$sim_inline" = x""; then
- sim_inline="$new_flag"
- else
- sim_inline="$sim_inline $new_flag"
- fi
- done;;
-esac
-if test x"$silent" != x"yes" && test x"$sim_inline" != x""; then
- echo "Setting inline flags = $sim_inline" 6>&1
-fi
-else
-
-if test "x$cross_compiling" = "xno"; then
- if test x"$GCC" != "x" -a x"${default_sim_inline}" != "x" ; then
- sim_inline="${default_sim_inline}"
- if test x"$silent" != x"yes"; then
- echo "Setting inline flags = $sim_inline" 6>&1
- fi
- else
- sim_inline=""
- fi
-else
- sim_inline="-DDEFAULT_INLINE=0"
-fi
-fi;
-
-cgen_maint=no
-cgen=guile
-cgendir='$(srcdir)/../../cgen'
-# Check whether --enable-cgen-maint or --disable-cgen-maint was given.
-if test "${enable_cgen_maint+set}" = set; then
- enableval="$enable_cgen_maint"
- case "${enableval}" in
- yes) cgen_maint=yes ;;
- no) cgen_maint=no ;;
- *)
- # argument is cgen install directory (not implemented yet).
- # Having a `share' directory might be more appropriate for the .scm,
- # .cpu, etc. files.
- cgendir=${cgen_maint}/lib/cgen
- cgen=guile
- ;;
-esac
-fi; if test x${cgen_maint} != xno ; then
- CGEN_MAINT=''
-else
- CGEN_MAINT='#'
-fi
-
-
-
-
-
-
-ac_sources="$sim_link_files"
-ac_dests="$sim_link_links"
-while test -n "$ac_sources"; do
- set $ac_dests; ac_dest=$1; shift; ac_dests=$*
- set $ac_sources; ac_source=$1; shift; ac_sources=$*
- ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
-done
- ac_config_links="$ac_config_links $ac_config_links_1"
-
-cgen_breaks=""
-if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
-cgen_breaks="break cgen_rtx_error";
-fi
-
- ac_config_files="$ac_config_files Makefile.sim:Makefile.in"
-
- ac_config_files="$ac_config_files Make-common.sim:../common/Make-common.in"
-
- ac_config_files="$ac_config_files .gdbinit:../common/gdbinit.in"
-
- ac_config_commands="$ac_config_commands Makefile"
-
- ac_config_commands="$ac_config_commands stamp-h"
-
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems. If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-{
- (set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- "s/'/'\\\\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-} |
- sed '
- t clear
- : clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- : end' >>confcache
-if diff $cache_file confcache >/dev/null 2>&1; then :; else
- if test -w $cache_file; then
- test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
- cat confcache >$cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/;
-s/:*\${srcdir}:*/:/;
-s/:*@srcdir@:*/:/;
-s/^\([^=]*=[ ]*\):*/\1/;
-s/:*$//;
-s/^[^=]*=[ ]*$//;
-}'
-fi
-
-DEFS=-DHAVE_CONFIG_H
-
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
- # 1. Remove the extension, and $U if already installed.
- ac_i=`echo "$ac_i" |
- sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
- # 2. Add them.
- ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-
-: ${CONFIG_STATUS=./config.status}
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-exec 6>&1
-
-# Open the log real soon, to keep \$[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling. Logging --version etc. is OK.
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-} >&5
-cat >&5 <<_CSEOF
-
-This file was extended by $as_me, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-_CSEOF
-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
-echo >&5
-_ACEOF
-
-# Files that config.status was made for.
-if test -n "$ac_config_files"; then
- echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_headers"; then
- echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_links"; then
- echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_commands"; then
- echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTIONS] [FILE]...
-
- -h, --help print this help, then exit
- -V, --version print version number, then exit
- -q, --quiet do not print progress messages
- -d, --debug don't remove temporary files
- --recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
- --header=FILE[:TEMPLATE]
- instantiate the configuration header FILE
-
-Configuration files:
-$config_files
-
-Configuration headers:
-$config_headers
-
-Configuration links:
-$config_links
-
-Configuration commands:
-$config_commands
-
-Report bugs to <bug-autoconf@gnu.org>."
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-ac_cs_version="\\
-config.status
-configured by $0, generated by GNU Autoconf 2.59,
- with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-srcdir=$srcdir
-INSTALL="$INSTALL"
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value. By we need to know if files were specified by the user.
-ac_need_defaults=:
-while test $# != 0
-do
- case $1 in
- --*=*)
- ac_option=`expr "x$1" : 'x\([^=]*\)='`
- ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
- ac_shift=:
- ;;
- -*)
- ac_option=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
- *) # This is not an option, so the user has probably given explicit
- # arguments.
- ac_option=$1
- ac_need_defaults=false;;
- esac
-
- case $ac_option in
- # Handling of the options.
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --vers* | -V )
- echo "$ac_cs_version"; exit 0 ;;
- --he | --h)
- # Conflict between --help and --header
- { { echo "$as_me:$LINENO: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; };;
- --help | --hel | -h )
- echo "$ac_cs_usage"; exit 0 ;;
- --debug | --d* | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- CONFIG_FILES="$CONFIG_FILES $ac_optarg"
- ac_need_defaults=false;;
- --header | --heade | --head | --hea )
- $ac_shift
- CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
- ac_need_defaults=false;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; } ;;
-
- *) ac_config_targets="$ac_config_targets $1" ;;
-
- esac
- shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
- exec 6>/dev/null
- ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-if \$ac_cs_recheck; then
- echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
- exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-fi
-
-_ACEOF
-
-
-
-
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_config_target in $ac_config_targets
-do
- case "$ac_config_target" in
- # Handling of arguments.
- "Makefile.sim" ) CONFIG_FILES="$CONFIG_FILES Makefile.sim:Makefile.in" ;;
- "Make-common.sim" ) CONFIG_FILES="$CONFIG_FILES Make-common.sim:../common/Make-common.in" ;;
- ".gdbinit" ) CONFIG_FILES="$CONFIG_FILES .gdbinit:../common/gdbinit.in" ;;
- "$ac_config_links_1" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
- "Makefile" ) CONFIG_COMMANDS="$CONFIG_COMMANDS Makefile" ;;
- "stamp-h" ) CONFIG_COMMANDS="$CONFIG_COMMANDS stamp-h" ;;
- "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used. Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
- test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
- test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
- test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason to put it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=./confstat$$-$RANDOM
- (umask 077 && mkdir $tmp)
-} ||
-{
- echo "$me: cannot create a temporary directory in ." >&2
- { (exit 1); exit 1; }
-}
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-
-#
-# CONFIG_FILES section.
-#
-
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "\$CONFIG_FILES"; then
- # Protect against being on the right side of a sed subst in config.status.
- sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
- s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
-s,@SHELL@,$SHELL,;t t
-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
-s,@exec_prefix@,$exec_prefix,;t t
-s,@prefix@,$prefix,;t t
-s,@program_transform_name@,$program_transform_name,;t t
-s,@bindir@,$bindir,;t t
-s,@sbindir@,$sbindir,;t t
-s,@libexecdir@,$libexecdir,;t t
-s,@datadir@,$datadir,;t t
-s,@sysconfdir@,$sysconfdir,;t t
-s,@sharedstatedir@,$sharedstatedir,;t t
-s,@localstatedir@,$localstatedir,;t t
-s,@libdir@,$libdir,;t t
-s,@includedir@,$includedir,;t t
-s,@oldincludedir@,$oldincludedir,;t t
-s,@infodir@,$infodir,;t t
-s,@mandir@,$mandir,;t t
-s,@build_alias@,$build_alias,;t t
-s,@host_alias@,$host_alias,;t t
-s,@target_alias@,$target_alias,;t t
-s,@DEFS@,$DEFS,;t t
-s,@ECHO_C@,$ECHO_C,;t t
-s,@ECHO_N@,$ECHO_N,;t t
-s,@ECHO_T@,$ECHO_T,;t t
-s,@LIBS@,$LIBS,;t t
-s,@sim_environment@,$sim_environment,;t t
-s,@sim_alignment@,$sim_alignment,;t t
-s,@sim_assert@,$sim_assert,;t t
-s,@sim_bitsize@,$sim_bitsize,;t t
-s,@sim_endian@,$sim_endian,;t t
-s,@sim_hostendian@,$sim_hostendian,;t t
-s,@sim_float@,$sim_float,;t t
-s,@sim_scache@,$sim_scache,;t t
-s,@sim_default_model@,$sim_default_model,;t t
-s,@sim_hw_cflags@,$sim_hw_cflags,;t t
-s,@sim_hw_objs@,$sim_hw_objs,;t t
-s,@sim_hw@,$sim_hw,;t t
-s,@sim_inline@,$sim_inline,;t t
-s,@sim_packages@,$sim_packages,;t t
-s,@sim_regparm@,$sim_regparm,;t t
-s,@sim_reserved_bits@,$sim_reserved_bits,;t t
-s,@sim_smp@,$sim_smp,;t t
-s,@sim_stdcall@,$sim_stdcall,;t t
-s,@sim_xor_endian@,$sim_xor_endian,;t t
-s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t
-s,@WERROR_CFLAGS@,$WERROR_CFLAGS,;t t
-s,@build@,$build,;t t
-s,@build_cpu@,$build_cpu,;t t
-s,@build_vendor@,$build_vendor,;t t
-s,@build_os@,$build_os,;t t
-s,@host@,$host,;t t
-s,@host_cpu@,$host_cpu,;t t
-s,@host_vendor@,$host_vendor,;t t
-s,@host_os@,$host_os,;t t
-s,@target@,$target,;t t
-s,@target_cpu@,$target_cpu,;t t
-s,@target_vendor@,$target_vendor,;t t
-s,@target_os@,$target_os,;t t
-s,@CC@,$CC,;t t
-s,@CFLAGS@,$CFLAGS,;t t
-s,@LDFLAGS@,$LDFLAGS,;t t
-s,@CPPFLAGS@,$CPPFLAGS,;t t
-s,@ac_ct_CC@,$ac_ct_CC,;t t
-s,@EXEEXT@,$EXEEXT,;t t
-s,@OBJEXT@,$OBJEXT,;t t
-s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
-s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
-s,@INSTALL_DATA@,$INSTALL_DATA,;t t
-s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
-s,@HDEFINES@,$HDEFINES,;t t
-s,@AR@,$AR,;t t
-s,@RANLIB@,$RANLIB,;t t
-s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
-s,@SET_MAKE@,$SET_MAKE,;t t
-s,@CPP@,$CPP,;t t
-s,@EGREP@,$EGREP,;t t
-s,@ALLOCA@,$ALLOCA,;t t
-s,@USE_NLS@,$USE_NLS,;t t
-s,@MSGFMT@,$MSGFMT,;t t
-s,@GMSGFMT@,$GMSGFMT,;t t
-s,@XGETTEXT@,$XGETTEXT,;t t
-s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t
-s,@CATALOGS@,$CATALOGS,;t t
-s,@CATOBJEXT@,$CATOBJEXT,;t t
-s,@DATADIRNAME@,$DATADIRNAME,;t t
-s,@GMOFILES@,$GMOFILES,;t t
-s,@INSTOBJEXT@,$INSTOBJEXT,;t t
-s,@INTLDEPS@,$INTLDEPS,;t t
-s,@INTLLIBS@,$INTLLIBS,;t t
-s,@INTLOBJS@,$INTLOBJS,;t t
-s,@POFILES@,$POFILES,;t t
-s,@POSUB@,$POSUB,;t t
-s,@INCLUDE_LOCALE_H@,$INCLUDE_LOCALE_H,;t t
-s,@GT_NO@,$GT_NO,;t t
-s,@GT_YES@,$GT_YES,;t t
-s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
-s,@l@,$l,;t t
-s,@MAINT@,$MAINT,;t t
-s,@sim_bswap@,$sim_bswap,;t t
-s,@sim_cflags@,$sim_cflags,;t t
-s,@sim_debug@,$sim_debug,;t t
-s,@sim_stdio@,$sim_stdio,;t t
-s,@sim_trace@,$sim_trace,;t t
-s,@sim_profile@,$sim_profile,;t t
-s,@CGEN_MAINT@,$CGEN_MAINT,;t t
-s,@cgendir@,$cgendir,;t t
-s,@cgen@,$cgen,;t t
-s,@cgen_breaks@,$cgen_breaks,;t t
-s,@LIBOBJS@,$LIBOBJS,;t t
-s,@LTLIBOBJS@,$LTLIBOBJS,;t t
-CEOF
-
-_ACEOF
-
- cat >>$CONFIG_STATUS <<\_ACEOF
- # Split the substitutions into bite-sized pieces for seds with
- # small command number limits, like on Digital OSF/1 and HP-UX.
- ac_max_sed_lines=48
- ac_sed_frag=1 # Number of current file.
- ac_beg=1 # First line for current file.
- ac_end=$ac_max_sed_lines # Line after last line for current file.
- ac_more_lines=:
- ac_sed_cmds=
- while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- else
- sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- fi
- if test ! -s $tmp/subs.frag; then
- ac_more_lines=false
- else
- # The purpose of the label and of the branching condition is to
- # speed up the sed processing (if there are no `@' at all, there
- # is no need to browse any of the substitutions).
- # These are the two extra sed commands mentioned above.
- (echo ':t
- /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
- fi
- ac_sed_frag=`expr $ac_sed_frag + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_lines`
- fi
- done
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
- fi
-fi # test -n "$CONFIG_FILES"
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
- esac
-
- # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
-
- case $INSTALL in
- [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
- esac
-
- if test x"$ac_file" != x-; then
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
- rm -f "$ac_file"
- fi
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- if test x"$ac_file" = x-; then
- configure_input=
- else
- configure_input="$ac_file. "
- fi
- configure_input=$configure_input"Generated from `echo $ac_file_in |
- sed 's,.*/,,'` by configure."
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
- sed "$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s,@configure_input@,$configure_input,;t t
-s,@srcdir@,$ac_srcdir,;t t
-s,@abs_srcdir@,$ac_abs_srcdir,;t t
-s,@top_srcdir@,$ac_top_srcdir,;t t
-s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
-s,@builddir@,$ac_builddir,;t t
-s,@abs_builddir@,$ac_abs_builddir,;t t
-s,@top_builddir@,$ac_top_builddir,;t t
-s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
-s,@INSTALL@,$ac_INSTALL,;t t
-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
- rm -f $tmp/stdin
- if test x"$ac_file" != x-; then
- mv $tmp/out $ac_file
- else
- cat $tmp/out
- rm -f $tmp/out
- fi
-
-done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-#
-# CONFIG_HEADER section.
-#
-
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='[ ].*$,\1#\2'
-ac_dC=' '
-ac_dD=',;t'
-# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_uB='$,\1#\2define\3'
-ac_uC=' '
-ac_uD=',;t'
-
-for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
- esac
-
- test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- # Do quote $f, to prevent DOS paths from being IFS'd.
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
- # Remove the trailing spaces.
- sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
-
-_ACEOF
-
-# Transform confdefs.h into two sed scripts, `conftest.defines' and
-# `conftest.undefs', that substitutes the proper values into
-# config.h.in to produce config.h. The first handles `#define'
-# templates, and the second `#undef' templates.
-# And first: Protect against being on the right side of a sed subst in
-# config.status. Protect against being in an unquoted here document
-# in config.status.
-rm -f conftest.defines conftest.undefs
-# Using a here document instead of a string reduces the quoting nightmare.
-# Putting comments in sed scripts is not portable.
-#
-# `end' is used to avoid that the second main sed command (meant for
-# 0-ary CPP macros) applies to n-ary macro definitions.
-# See the Autoconf documentation for `clear'.
-cat >confdef2sed.sed <<\_ACEOF
-s/[\\&,]/\\&/g
-s,[\\$`],\\&,g
-t clear
-: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
-t end
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
-: end
-_ACEOF
-# If some macros were called several times there might be several times
-# the same #defines, which is useless. Nevertheless, we may not want to
-# sort them, since we want the *last* AC-DEFINE to be honored.
-uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
-sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
-rm -f confdef2sed.sed
-
-# This sed command replaces #undef with comments. This is necessary, for
-# example, in the case of _POSIX_SOURCE, which is predefined and required
-# on some systems where configure will not decide to define it.
-cat >>conftest.undefs <<\_ACEOF
-s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
-_ACEOF
-
-# Break up conftest.defines because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
-echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
-echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
-echo ' :' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.defines >/dev/null
-do
- # Write a limited-size here document to $tmp/defines.sed.
- echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
- # Speed up: don't consider the non `#define' lines.
- echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
- # Work around the forget-to-reset-the-flag bug.
- echo 't clr' >>$CONFIG_STATUS
- echo ': clr' >>$CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
- echo 'CEOF
- sed -f $tmp/defines.sed $tmp/in >$tmp/out
- rm -f $tmp/in
- mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
- rm -f conftest.defines
- mv conftest.tail conftest.defines
-done
-rm -f conftest.defines
-echo ' fi # grep' >>$CONFIG_STATUS
-echo >>$CONFIG_STATUS
-
-# Break up conftest.undefs because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.undefs >/dev/null
-do
- # Write a limited-size here document to $tmp/undefs.sed.
- echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
- # Speed up: don't consider the non `#undef'
- echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
- # Work around the forget-to-reset-the-flag bug.
- echo 't clr' >>$CONFIG_STATUS
- echo ': clr' >>$CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
- echo 'CEOF
- sed -f $tmp/undefs.sed $tmp/in >$tmp/out
- rm -f $tmp/in
- mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
- rm -f conftest.undefs
- mv conftest.tail conftest.undefs
-done
-rm -f conftest.undefs
-
-cat >>$CONFIG_STATUS <<\_ACEOF
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- if test x"$ac_file" = x-; then
- echo "/* Generated by configure. */" >$tmp/config.h
- else
- echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
- fi
- cat $tmp/in >>$tmp/config.h
- rm -f $tmp/in
- if test x"$ac_file" != x-; then
- if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
- { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
-echo "$as_me: $ac_file is unchanged" >&6;}
- else
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- rm -f $ac_file
- mv $tmp/config.h $ac_file
- fi
- else
- cat $tmp/config.h
- rm -f $tmp/config.h
- fi
-done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-#
-# CONFIG_LINKS section.
-#
-
-for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
- ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
- ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
-
- { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
-echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
-
- if test ! -r $srcdir/$ac_source; then
- { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
-echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
- { (exit 1); exit 1; }; }
- fi
- rm -f $ac_dest
-
- # Make relative symlinks.
- ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
-$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_dest" : 'X\(//\)[^/]' \| \
- X"$ac_dest" : 'X\(//\)$' \| \
- X"$ac_dest" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_dest" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dest_dir"
- else
- as_dir="$ac_dest_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- ac_builddir=.
-
-if test "$ac_dest_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dest_dir";;
-*)
- case "$ac_dest_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dest_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
-
- case $srcdir in
- [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
- *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
- esac
-
- # Try a symlink, then a hard link, then a copy.
- ln -s $ac_rel_source $ac_dest 2>/dev/null ||
- ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
- cp -p $srcdir/$ac_source $ac_dest ||
- { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5
-echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;}
- { (exit 1); exit 1; }; }
-done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-#
-# CONFIG_COMMANDS section.
-#
-for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
- ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
- ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
-$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_dest" : 'X\(//\)[^/]' \| \
- X"$ac_dest" : 'X\(//\)$' \| \
- X"$ac_dest" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_dest" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
-
- { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
-echo "$as_me: executing $ac_dest commands" >&6;}
- case $ac_dest in
- Makefile ) echo "Merging Makefile.sim+Make-common.sim into Makefile ..."
- rm -f Makesim1.tmp Makesim2.tmp Makefile
- sed -n -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ p' <Make-common.sim >Makesim1.tmp
- sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >Makesim2.tmp
- sed -e '/^## COMMON_PRE_/ r Makesim1.tmp' \
- -e '/^## COMMON_POST_/ r Makesim2.tmp' \
- <Makefile.sim >Makefile
- rm -f Makefile.sim Make-common.sim Makesim1.tmp Makesim2.tmp
- ;;
- stamp-h ) echo > stamp-h ;;
- esac
-done
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded. So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status. When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
- ac_cs_success=:
- ac_config_status_args=
- test "$silent" = yes &&
- ac_config_status_args="$ac_config_status_args --quiet"
- exec 5>/dev/null
- $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
- exec 5>>config.log
- # Use ||, not &&, to avoid exiting from the if with $? = 1, which
- # would make configure fail if this is the last instruction.
- $ac_cs_success || { (exit 1); exit 1; }
-fi
-
-
diff --git a/sim/sh64/configure.ac b/sim/sh64/configure.ac
deleted file mode 100644
index 91102086eaf..00000000000
--- a/sim/sh64/configure.ac
+++ /dev/null
@@ -1,19 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-AC_PREREQ(2.59)dnl
-AC_INIT(Makefile.in)
-AC_CONFIG_HEADER(config.h:config.in)
-
-sinclude(../common/aclocal.m4)
-
-sinclude(../common/common.m4)
-
-SIM_AC_OPTION_ENDIAN([], BIG_ENDIAN)
-SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT)
-SIM_AC_OPTION_HOSTENDIAN
-SIM_AC_OPTION_SCACHE(16384)
-SIM_AC_OPTION_DEFAULT_MODEL(sh5)
-SIM_AC_OPTION_ENVIRONMENT
-SIM_AC_OPTION_INLINE()
-SIM_AC_OPTION_CGEN_MAINT
-
-SIM_AC_OUTPUT
diff --git a/sim/sh64/cpu.c b/sim/sh64/cpu.c
deleted file mode 100644
index bf3e2b2f7c3..00000000000
--- a/sim/sh64/cpu.c
+++ /dev/null
@@ -1,533 +0,0 @@
-/* Misc. support for CPU family sh64.
-
-THIS FILE IS MACHINE GENERATED WITH CGEN.
-
-Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
-
-This file is part of the GNU Simulators.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-
-#define WANT_CPU sh64
-#define WANT_CPU_SH64
-
-#include "sim-main.h"
-#include "cgen-ops.h"
-
-/* Get the value of h-pc. */
-
-UDI
-sh64_h_pc_get (SIM_CPU *current_cpu)
-{
- return GET_H_PC ();
-}
-
-/* Set a value for h-pc. */
-
-void
-sh64_h_pc_set (SIM_CPU *current_cpu, UDI newval)
-{
- SET_H_PC (newval);
-}
-
-/* Get the value of h-gr. */
-
-DI
-sh64_h_gr_get (SIM_CPU *current_cpu, UINT regno)
-{
- return GET_H_GR (regno);
-}
-
-/* Set a value for h-gr. */
-
-void
-sh64_h_gr_set (SIM_CPU *current_cpu, UINT regno, DI newval)
-{
- SET_H_GR (regno, newval);
-}
-
-/* Get the value of h-grc. */
-
-SI
-sh64_h_grc_get (SIM_CPU *current_cpu, UINT regno)
-{
- return GET_H_GRC (regno);
-}
-
-/* Set a value for h-grc. */
-
-void
-sh64_h_grc_set (SIM_CPU *current_cpu, UINT regno, SI newval)
-{
- SET_H_GRC (regno, newval);
-}
-
-/* Get the value of h-cr. */
-
-DI
-sh64_h_cr_get (SIM_CPU *current_cpu, UINT regno)
-{
- return GET_H_CR (regno);
-}
-
-/* Set a value for h-cr. */
-
-void
-sh64_h_cr_set (SIM_CPU *current_cpu, UINT regno, DI newval)
-{
- SET_H_CR (regno, newval);
-}
-
-/* Get the value of h-sr. */
-
-SI
-sh64_h_sr_get (SIM_CPU *current_cpu)
-{
- return CPU (h_sr);
-}
-
-/* Set a value for h-sr. */
-
-void
-sh64_h_sr_set (SIM_CPU *current_cpu, SI newval)
-{
- CPU (h_sr) = newval;
-}
-
-/* Get the value of h-fpscr. */
-
-SI
-sh64_h_fpscr_get (SIM_CPU *current_cpu)
-{
- return CPU (h_fpscr);
-}
-
-/* Set a value for h-fpscr. */
-
-void
-sh64_h_fpscr_set (SIM_CPU *current_cpu, SI newval)
-{
- CPU (h_fpscr) = newval;
-}
-
-/* Get the value of h-frbit. */
-
-BI
-sh64_h_frbit_get (SIM_CPU *current_cpu)
-{
- return GET_H_FRBIT ();
-}
-
-/* Set a value for h-frbit. */
-
-void
-sh64_h_frbit_set (SIM_CPU *current_cpu, BI newval)
-{
- SET_H_FRBIT (newval);
-}
-
-/* Get the value of h-szbit. */
-
-BI
-sh64_h_szbit_get (SIM_CPU *current_cpu)
-{
- return GET_H_SZBIT ();
-}
-
-/* Set a value for h-szbit. */
-
-void
-sh64_h_szbit_set (SIM_CPU *current_cpu, BI newval)
-{
- SET_H_SZBIT (newval);
-}
-
-/* Get the value of h-prbit. */
-
-BI
-sh64_h_prbit_get (SIM_CPU *current_cpu)
-{
- return GET_H_PRBIT ();
-}
-
-/* Set a value for h-prbit. */
-
-void
-sh64_h_prbit_set (SIM_CPU *current_cpu, BI newval)
-{
- SET_H_PRBIT (newval);
-}
-
-/* Get the value of h-sbit. */
-
-BI
-sh64_h_sbit_get (SIM_CPU *current_cpu)
-{
- return GET_H_SBIT ();
-}
-
-/* Set a value for h-sbit. */
-
-void
-sh64_h_sbit_set (SIM_CPU *current_cpu, BI newval)
-{
- SET_H_SBIT (newval);
-}
-
-/* Get the value of h-mbit. */
-
-BI
-sh64_h_mbit_get (SIM_CPU *current_cpu)
-{
- return GET_H_MBIT ();
-}
-
-/* Set a value for h-mbit. */
-
-void
-sh64_h_mbit_set (SIM_CPU *current_cpu, BI newval)
-{
- SET_H_MBIT (newval);
-}
-
-/* Get the value of h-qbit. */
-
-BI
-sh64_h_qbit_get (SIM_CPU *current_cpu)
-{
- return GET_H_QBIT ();
-}
-
-/* Set a value for h-qbit. */
-
-void
-sh64_h_qbit_set (SIM_CPU *current_cpu, BI newval)
-{
- SET_H_QBIT (newval);
-}
-
-/* Get the value of h-fr. */
-
-SF
-sh64_h_fr_get (SIM_CPU *current_cpu, UINT regno)
-{
- return CPU (h_fr[regno]);
-}
-
-/* Set a value for h-fr. */
-
-void
-sh64_h_fr_set (SIM_CPU *current_cpu, UINT regno, SF newval)
-{
- CPU (h_fr[regno]) = newval;
-}
-
-/* Get the value of h-fp. */
-
-DF
-sh64_h_fp_get (SIM_CPU *current_cpu, UINT regno)
-{
- return CPU (h_fp[regno]);
-}
-
-/* Set a value for h-fp. */
-
-void
-sh64_h_fp_set (SIM_CPU *current_cpu, UINT regno, DF newval)
-{
- CPU (h_fp[regno]) = newval;
-}
-
-/* Get the value of h-fv. */
-
-SF
-sh64_h_fv_get (SIM_CPU *current_cpu, UINT regno)
-{
- return GET_H_FV (regno);
-}
-
-/* Set a value for h-fv. */
-
-void
-sh64_h_fv_set (SIM_CPU *current_cpu, UINT regno, SF newval)
-{
- SET_H_FV (regno, newval);
-}
-
-/* Get the value of h-fmtx. */
-
-SF
-sh64_h_fmtx_get (SIM_CPU *current_cpu, UINT regno)
-{
- return GET_H_FMTX (regno);
-}
-
-/* Set a value for h-fmtx. */
-
-void
-sh64_h_fmtx_set (SIM_CPU *current_cpu, UINT regno, SF newval)
-{
- SET_H_FMTX (regno, newval);
-}
-
-/* Get the value of h-dr. */
-
-DF
-sh64_h_dr_get (SIM_CPU *current_cpu, UINT regno)
-{
- return GET_H_DR (regno);
-}
-
-/* Set a value for h-dr. */
-
-void
-sh64_h_dr_set (SIM_CPU *current_cpu, UINT regno, DF newval)
-{
- SET_H_DR (regno, newval);
-}
-
-/* Get the value of h-tr. */
-
-DI
-sh64_h_tr_get (SIM_CPU *current_cpu, UINT regno)
-{
- return CPU (h_tr[regno]);
-}
-
-/* Set a value for h-tr. */
-
-void
-sh64_h_tr_set (SIM_CPU *current_cpu, UINT regno, DI newval)
-{
- CPU (h_tr[regno]) = newval;
-}
-
-/* Get the value of h-endian. */
-
-BI
-sh64_h_endian_get (SIM_CPU *current_cpu)
-{
- return GET_H_ENDIAN ();
-}
-
-/* Set a value for h-endian. */
-
-void
-sh64_h_endian_set (SIM_CPU *current_cpu, BI newval)
-{
- SET_H_ENDIAN (newval);
-}
-
-/* Get the value of h-ism. */
-
-BI
-sh64_h_ism_get (SIM_CPU *current_cpu)
-{
- return GET_H_ISM ();
-}
-
-/* Set a value for h-ism. */
-
-void
-sh64_h_ism_set (SIM_CPU *current_cpu, BI newval)
-{
- SET_H_ISM (newval);
-}
-
-/* Get the value of h-frc. */
-
-SF
-sh64_h_frc_get (SIM_CPU *current_cpu, UINT regno)
-{
- return GET_H_FRC (regno);
-}
-
-/* Set a value for h-frc. */
-
-void
-sh64_h_frc_set (SIM_CPU *current_cpu, UINT regno, SF newval)
-{
- SET_H_FRC (regno, newval);
-}
-
-/* Get the value of h-drc. */
-
-DF
-sh64_h_drc_get (SIM_CPU *current_cpu, UINT regno)
-{
- return GET_H_DRC (regno);
-}
-
-/* Set a value for h-drc. */
-
-void
-sh64_h_drc_set (SIM_CPU *current_cpu, UINT regno, DF newval)
-{
- SET_H_DRC (regno, newval);
-}
-
-/* Get the value of h-xf. */
-
-SF
-sh64_h_xf_get (SIM_CPU *current_cpu, UINT regno)
-{
- return GET_H_XF (regno);
-}
-
-/* Set a value for h-xf. */
-
-void
-sh64_h_xf_set (SIM_CPU *current_cpu, UINT regno, SF newval)
-{
- SET_H_XF (regno, newval);
-}
-
-/* Get the value of h-xd. */
-
-DF
-sh64_h_xd_get (SIM_CPU *current_cpu, UINT regno)
-{
- return GET_H_XD (regno);
-}
-
-/* Set a value for h-xd. */
-
-void
-sh64_h_xd_set (SIM_CPU *current_cpu, UINT regno, DF newval)
-{
- SET_H_XD (regno, newval);
-}
-
-/* Get the value of h-fvc. */
-
-SF
-sh64_h_fvc_get (SIM_CPU *current_cpu, UINT regno)
-{
- return GET_H_FVC (regno);
-}
-
-/* Set a value for h-fvc. */
-
-void
-sh64_h_fvc_set (SIM_CPU *current_cpu, UINT regno, SF newval)
-{
- SET_H_FVC (regno, newval);
-}
-
-/* Get the value of h-fpccr. */
-
-SI
-sh64_h_fpccr_get (SIM_CPU *current_cpu)
-{
- return GET_H_FPCCR ();
-}
-
-/* Set a value for h-fpccr. */
-
-void
-sh64_h_fpccr_set (SIM_CPU *current_cpu, SI newval)
-{
- SET_H_FPCCR (newval);
-}
-
-/* Get the value of h-gbr. */
-
-SI
-sh64_h_gbr_get (SIM_CPU *current_cpu)
-{
- return GET_H_GBR ();
-}
-
-/* Set a value for h-gbr. */
-
-void
-sh64_h_gbr_set (SIM_CPU *current_cpu, SI newval)
-{
- SET_H_GBR (newval);
-}
-
-/* Get the value of h-pr. */
-
-SI
-sh64_h_pr_get (SIM_CPU *current_cpu)
-{
- return GET_H_PR ();
-}
-
-/* Set a value for h-pr. */
-
-void
-sh64_h_pr_set (SIM_CPU *current_cpu, SI newval)
-{
- SET_H_PR (newval);
-}
-
-/* Get the value of h-macl. */
-
-SI
-sh64_h_macl_get (SIM_CPU *current_cpu)
-{
- return GET_H_MACL ();
-}
-
-/* Set a value for h-macl. */
-
-void
-sh64_h_macl_set (SIM_CPU *current_cpu, SI newval)
-{
- SET_H_MACL (newval);
-}
-
-/* Get the value of h-mach. */
-
-SI
-sh64_h_mach_get (SIM_CPU *current_cpu)
-{
- return GET_H_MACH ();
-}
-
-/* Set a value for h-mach. */
-
-void
-sh64_h_mach_set (SIM_CPU *current_cpu, SI newval)
-{
- SET_H_MACH (newval);
-}
-
-/* Get the value of h-tbit. */
-
-BI
-sh64_h_tbit_get (SIM_CPU *current_cpu)
-{
- return GET_H_TBIT ();
-}
-
-/* Set a value for h-tbit. */
-
-void
-sh64_h_tbit_set (SIM_CPU *current_cpu, BI newval)
-{
- SET_H_TBIT (newval);
-}
-
-/* Record trace results for INSN. */
-
-void
-sh64_record_trace_results (SIM_CPU *current_cpu, CGEN_INSN *insn,
- int *indices, TRACE_RECORD *tr)
-{
-}
diff --git a/sim/sh64/cpu.h b/sim/sh64/cpu.h
deleted file mode 100644
index 6e0d35880f9..00000000000
--- a/sim/sh64/cpu.h
+++ /dev/null
@@ -1,302 +0,0 @@
-/* CPU family header for sh64.
-
-THIS FILE IS MACHINE GENERATED WITH CGEN.
-
-Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
-
-This file is part of the GNU Simulators.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-
-#ifndef CPU_SH64_H
-#define CPU_SH64_H
-
-/* Maximum number of instructions that are fetched at a time.
- This is for LIW type instructions sets (e.g. m32r). */
-#define MAX_LIW_INSNS 1
-
-/* Maximum number of instructions that can be executed in parallel. */
-#define MAX_PARALLEL_INSNS 1
-
-/* CPU state information. */
-typedef struct {
- /* Hardware elements. */
- struct {
- /* Program counter */
- UDI h_pc;
-#define GET_H_PC() CPU (h_pc)
-#define SET_H_PC(x) \
-do { \
-{\
-CPU (h_ism) = ANDDI ((x), 1);\
-CPU (h_pc) = ANDDI ((x), INVDI (1));\
-}\
-;} while (0)
- /* General purpose integer registers */
- DI h_gr[64];
-#define GET_H_GR(index) ((((index) == (63))) ? (0) : (CPU (h_gr[index])))
-#define SET_H_GR(index, x) \
-do { \
-if ((((index)) != (63))) {\
-CPU (h_gr[(index)]) = (x);\
-} else {\
-((void) 0); /*nop*/\
-}\
-;} while (0)
- /* Control registers */
- DI h_cr[64];
-#define GET_H_CR(index) ((((index) == (0))) ? (ZEXTSIDI (CPU (h_sr))) : (CPU (h_cr[index])))
-#define SET_H_CR(index, x) \
-do { \
-if ((((index)) == (0))) {\
-CPU (h_sr) = (x);\
-} else {\
-CPU (h_cr[(index)]) = (x);\
-}\
-;} while (0)
- /* Status register */
- SI h_sr;
-#define GET_H_SR() CPU (h_sr)
-#define SET_H_SR(x) (CPU (h_sr) = (x))
- /* Floating point status and control register */
- SI h_fpscr;
-#define GET_H_FPSCR() CPU (h_fpscr)
-#define SET_H_FPSCR(x) (CPU (h_fpscr) = (x))
- /* Single precision floating point registers */
- SF h_fr[64];
-#define GET_H_FR(a1) CPU (h_fr)[a1]
-#define SET_H_FR(a1, x) (CPU (h_fr)[a1] = (x))
- /* Single precision floating point register pairs */
- DF h_fp[32];
-#define GET_H_FP(a1) CPU (h_fp)[a1]
-#define SET_H_FP(a1, x) (CPU (h_fp)[a1] = (x))
- /* Branch target registers */
- DI h_tr[8];
-#define GET_H_TR(a1) CPU (h_tr)[a1]
-#define SET_H_TR(a1, x) (CPU (h_tr)[a1] = (x))
- /* Current instruction set mode */
- BI h_ism;
-#define GET_H_ISM() CPU (h_ism)
-#define SET_H_ISM(x) \
-do { \
-cgen_rtx_error (current_cpu, "cannot set ism directly");\
-;} while (0)
- } hardware;
-#define CPU_CGEN_HW(cpu) (& (cpu)->cpu_data.hardware)
-} SH64_CPU_DATA;
-
-/* Virtual regs. */
-
-#define GET_H_GRC(index) ANDDI (CPU (h_gr[index]), ZEXTSIDI (0xffffffff))
-#define SET_H_GRC(index, x) \
-do { \
-CPU (h_gr[(index)]) = EXTSIDI ((x));\
-;} while (0)
-#define GET_H_FRBIT() ANDSI (SRLSI (CPU (h_sr), 14), 1)
-#define SET_H_FRBIT(x) \
-do { \
-CPU (h_sr) = ORSI (ANDSI (CPU (h_sr), (~ (((1) << (14))))), SLLSI ((x), 14));\
-;} while (0)
-#define GET_H_SZBIT() ANDSI (SRLSI (CPU (h_sr), 13), 1)
-#define SET_H_SZBIT(x) \
-do { \
-CPU (h_sr) = ORSI (ANDSI (CPU (h_sr), (~ (((1) << (13))))), SLLSI ((x), 13));\
-;} while (0)
-#define GET_H_PRBIT() ANDSI (SRLSI (CPU (h_sr), 12), 1)
-#define SET_H_PRBIT(x) \
-do { \
-CPU (h_sr) = ORSI (ANDSI (CPU (h_sr), (~ (((1) << (12))))), SLLSI ((x), 12));\
-;} while (0)
-#define GET_H_SBIT() ANDSI (SRLSI (CPU (h_sr), 1), 1)
-#define SET_H_SBIT(x) \
-do { \
-CPU (h_sr) = ORSI (ANDSI (CPU (h_sr), (~ (2))), SLLSI ((x), 1));\
-;} while (0)
-#define GET_H_MBIT() ANDSI (SRLSI (CPU (h_sr), 9), 1)
-#define SET_H_MBIT(x) \
-do { \
-CPU (h_sr) = ORSI (ANDSI (CPU (h_sr), (~ (((1) << (9))))), SLLSI ((x), 9));\
-;} while (0)
-#define GET_H_QBIT() ANDSI (SRLSI (CPU (h_sr), 8), 1)
-#define SET_H_QBIT(x) \
-do { \
-CPU (h_sr) = ORSI (ANDSI (CPU (h_sr), (~ (((1) << (8))))), SLLSI ((x), 8));\
-;} while (0)
-#define GET_H_FV(index) CPU (h_fr[MULQI (ANDQI (index, 15), 4)])
-#define SET_H_FV(index, x) \
-do { \
-CPU (h_fr[MULQI (ANDQI ((index), 15), 4)]) = (x);\
-;} while (0)
-#define GET_H_FMTX(index) CPU (h_fr[MULQI (ANDQI (index, 3), 16)])
-#define SET_H_FMTX(index, x) \
-do { \
-CPU (h_fr[MULQI (ANDQI ((index), 3), 16)]) = (x);\
-;} while (0)
-#define GET_H_DR(index) SUBWORDDIDF (ORDI (SLLDI (ZEXTSIDI (SUBWORDSFSI (CPU (h_fr[index]))), 32), ZEXTSIDI (SUBWORDSFSI (CPU (h_fr[((index) + (1))])))))
-#define SET_H_DR(index, x) \
-do { \
-{\
-CPU (h_fr[(index)]) = SUBWORDSISF (SUBWORDDFSI ((x), 0));\
-CPU (h_fr[(((index)) + (1))]) = SUBWORDSISF (SUBWORDDFSI ((x), 1));\
-}\
-;} while (0)
-#define GET_H_ENDIAN() sh64_endian (current_cpu)
-#define SET_H_ENDIAN(x) \
-do { \
-cgen_rtx_error (current_cpu, "cannot alter target byte order mid-program");\
-;} while (0)
-#define GET_H_FRC(index) CPU (h_fr[((((16) * (GET_H_FRBIT ()))) + (index))])
-#define SET_H_FRC(index, x) \
-do { \
-CPU (h_fr[((((16) * (GET_H_FRBIT ()))) + ((index)))]) = (x);\
-;} while (0)
-#define GET_H_DRC(index) GET_H_DR (((((16) * (GET_H_FRBIT ()))) + (index)))
-#define SET_H_DRC(index, x) \
-do { \
-SET_H_DR (((((16) * (GET_H_FRBIT ()))) + ((index))), (x));\
-;} while (0)
-#define GET_H_XF(index) CPU (h_fr[((((16) * (NOTBI (GET_H_FRBIT ())))) + (index))])
-#define SET_H_XF(index, x) \
-do { \
-CPU (h_fr[((((16) * (NOTBI (GET_H_FRBIT ())))) + ((index)))]) = (x);\
-;} while (0)
-#define GET_H_XD(index) GET_H_DR (((((16) * (NOTBI (GET_H_FRBIT ())))) + (index)))
-#define SET_H_XD(index, x) \
-do { \
-SET_H_DR (((((16) * (NOTBI (GET_H_FRBIT ())))) + ((index))), (x));\
-;} while (0)
-#define GET_H_FVC(index) CPU (h_fr[((((16) * (GET_H_FRBIT ()))) + (index))])
-#define SET_H_FVC(index, x) \
-do { \
-CPU (h_fr[((((16) * (GET_H_FRBIT ()))) + ((index)))]) = (x);\
-;} while (0)
-#define GET_H_FPCCR() ORSI (ORSI (ORSI (CPU (h_fpscr), SLLSI (GET_H_PRBIT (), 19)), SLLSI (GET_H_SZBIT (), 20)), SLLSI (GET_H_FRBIT (), 21))
-#define SET_H_FPCCR(x) \
-do { \
-{\
-CPU (h_fpscr) = (x);\
-SET_H_PRBIT (ANDSI (SRLSI ((x), 19), 1));\
-SET_H_SZBIT (ANDSI (SRLSI ((x), 20), 1));\
-SET_H_FRBIT (ANDSI (SRLSI ((x), 21), 1));\
-}\
-;} while (0)
-#define GET_H_GBR() SUBWORDDISI (CPU (h_gr[((UINT) 16)]), 1)
-#define SET_H_GBR(x) \
-do { \
-CPU (h_gr[((UINT) 16)]) = EXTSIDI ((x));\
-;} while (0)
-#define GET_H_PR() SUBWORDDISI (CPU (h_gr[((UINT) 18)]), 1)
-#define SET_H_PR(x) \
-do { \
-CPU (h_gr[((UINT) 18)]) = EXTSIDI ((x));\
-;} while (0)
-#define GET_H_MACL() SUBWORDDISI (CPU (h_gr[((UINT) 17)]), 1)
-#define SET_H_MACL(x) \
-do { \
-CPU (h_gr[((UINT) 17)]) = ORDI (SLLDI (ZEXTSIDI (SUBWORDDISI (CPU (h_gr[((UINT) 17)]), 0)), 32), ZEXTSIDI ((x)));\
-;} while (0)
-#define GET_H_MACH() SUBWORDDISI (CPU (h_gr[((UINT) 17)]), 0)
-#define SET_H_MACH(x) \
-do { \
-CPU (h_gr[((UINT) 17)]) = ORDI (SLLDI (ZEXTSIDI ((x)), 32), ZEXTSIDI (SUBWORDDISI (CPU (h_gr[((UINT) 17)]), 1)));\
-;} while (0)
-#define GET_H_TBIT() ANDBI (CPU (h_gr[((UINT) 19)]), 1)
-#define SET_H_TBIT(x) \
-do { \
-CPU (h_gr[((UINT) 19)]) = ORDI (ANDDI (CPU (h_gr[((UINT) 19)]), INVDI (1)), ZEXTBIDI ((x)));\
-;} while (0)
-
-/* Cover fns for register access. */
-UDI sh64_h_pc_get (SIM_CPU *);
-void sh64_h_pc_set (SIM_CPU *, UDI);
-DI sh64_h_gr_get (SIM_CPU *, UINT);
-void sh64_h_gr_set (SIM_CPU *, UINT, DI);
-SI sh64_h_grc_get (SIM_CPU *, UINT);
-void sh64_h_grc_set (SIM_CPU *, UINT, SI);
-DI sh64_h_cr_get (SIM_CPU *, UINT);
-void sh64_h_cr_set (SIM_CPU *, UINT, DI);
-SI sh64_h_sr_get (SIM_CPU *);
-void sh64_h_sr_set (SIM_CPU *, SI);
-SI sh64_h_fpscr_get (SIM_CPU *);
-void sh64_h_fpscr_set (SIM_CPU *, SI);
-BI sh64_h_frbit_get (SIM_CPU *);
-void sh64_h_frbit_set (SIM_CPU *, BI);
-BI sh64_h_szbit_get (SIM_CPU *);
-void sh64_h_szbit_set (SIM_CPU *, BI);
-BI sh64_h_prbit_get (SIM_CPU *);
-void sh64_h_prbit_set (SIM_CPU *, BI);
-BI sh64_h_sbit_get (SIM_CPU *);
-void sh64_h_sbit_set (SIM_CPU *, BI);
-BI sh64_h_mbit_get (SIM_CPU *);
-void sh64_h_mbit_set (SIM_CPU *, BI);
-BI sh64_h_qbit_get (SIM_CPU *);
-void sh64_h_qbit_set (SIM_CPU *, BI);
-SF sh64_h_fr_get (SIM_CPU *, UINT);
-void sh64_h_fr_set (SIM_CPU *, UINT, SF);
-DF sh64_h_fp_get (SIM_CPU *, UINT);
-void sh64_h_fp_set (SIM_CPU *, UINT, DF);
-SF sh64_h_fv_get (SIM_CPU *, UINT);
-void sh64_h_fv_set (SIM_CPU *, UINT, SF);
-SF sh64_h_fmtx_get (SIM_CPU *, UINT);
-void sh64_h_fmtx_set (SIM_CPU *, UINT, SF);
-DF sh64_h_dr_get (SIM_CPU *, UINT);
-void sh64_h_dr_set (SIM_CPU *, UINT, DF);
-DI sh64_h_tr_get (SIM_CPU *, UINT);
-void sh64_h_tr_set (SIM_CPU *, UINT, DI);
-BI sh64_h_endian_get (SIM_CPU *);
-void sh64_h_endian_set (SIM_CPU *, BI);
-BI sh64_h_ism_get (SIM_CPU *);
-void sh64_h_ism_set (SIM_CPU *, BI);
-SF sh64_h_frc_get (SIM_CPU *, UINT);
-void sh64_h_frc_set (SIM_CPU *, UINT, SF);
-DF sh64_h_drc_get (SIM_CPU *, UINT);
-void sh64_h_drc_set (SIM_CPU *, UINT, DF);
-SF sh64_h_xf_get (SIM_CPU *, UINT);
-void sh64_h_xf_set (SIM_CPU *, UINT, SF);
-DF sh64_h_xd_get (SIM_CPU *, UINT);
-void sh64_h_xd_set (SIM_CPU *, UINT, DF);
-SF sh64_h_fvc_get (SIM_CPU *, UINT);
-void sh64_h_fvc_set (SIM_CPU *, UINT, SF);
-SI sh64_h_fpccr_get (SIM_CPU *);
-void sh64_h_fpccr_set (SIM_CPU *, SI);
-SI sh64_h_gbr_get (SIM_CPU *);
-void sh64_h_gbr_set (SIM_CPU *, SI);
-SI sh64_h_pr_get (SIM_CPU *);
-void sh64_h_pr_set (SIM_CPU *, SI);
-SI sh64_h_macl_get (SIM_CPU *);
-void sh64_h_macl_set (SIM_CPU *, SI);
-SI sh64_h_mach_get (SIM_CPU *);
-void sh64_h_mach_set (SIM_CPU *, SI);
-BI sh64_h_tbit_get (SIM_CPU *);
-void sh64_h_tbit_set (SIM_CPU *, BI);
-
-/* These must be hand-written. */
-extern CPUREG_FETCH_FN sh64_fetch_register;
-extern CPUREG_STORE_FN sh64_store_register;
-
-typedef struct {
- int empty;
-} MODEL_SH5_DATA;
-
-/* Collection of various things for the trace handler to use. */
-
-typedef struct trace_record {
- IADDR pc;
- /* FIXME:wip */
-} TRACE_RECORD;
-
-#endif /* CPU_SH64_H */
diff --git a/sim/sh64/cpuall.h b/sim/sh64/cpuall.h
deleted file mode 100644
index ba6a1e5d714..00000000000
--- a/sim/sh64/cpuall.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Simulator CPU header for sh.
-
-THIS FILE IS MACHINE GENERATED WITH CGEN.
-
-Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
-
-This file is part of the GNU Simulators.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-
-#ifndef SH_CPUALL_H
-#define SH_CPUALL_H
-
-/* Include files for each cpu family. */
-
-#ifdef WANT_CPU_SH64
-#include "eng.h"
-#include "cgen-engine.h"
-#include "cpu.h"
-#include "decode.h"
-#endif
-
-extern const MACH sh2_mach;
-extern const MACH sh3_mach;
-extern const MACH sh3e_mach;
-extern const MACH sh4_mach;
-extern const MACH sh5_mach;
-
-#ifndef WANT_CPU
-/* The ARGBUF struct. */
-struct argbuf {
- /* These are the baseclass definitions. */
- IADDR addr;
- const IDESC *idesc;
- char trace_p;
- char profile_p;
- /* ??? Temporary hack for skip insns. */
- char skip_count;
- char unused;
- /* cpu specific data follows */
-};
-#endif
-
-#ifndef WANT_CPU
-/* A cached insn.
-
- ??? SCACHE used to contain more than just argbuf. We could delete the
- type entirely and always just use ARGBUF, but for future concerns and as
- a level of abstraction it is left in. */
-
-struct scache {
- struct argbuf argbuf;
-};
-#endif
-
-#endif /* SH_CPUALL_H */
diff --git a/sim/sh64/decode-compact.c b/sim/sh64/decode-compact.c
deleted file mode 100644
index ce85438323c..00000000000
--- a/sim/sh64/decode-compact.c
+++ /dev/null
@@ -1,2640 +0,0 @@
-/* Simulator instruction decoder for sh64_compact.
-
-THIS FILE IS MACHINE GENERATED WITH CGEN.
-
-Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
-
-This file is part of the GNU Simulators.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-
-#define WANT_CPU sh64
-#define WANT_CPU_SH64
-
-#include "sim-main.h"
-#include "sim-assert.h"
-
-/* The instruction descriptor array.
- This is computed at runtime. Space for it is not malloc'd to save a
- teensy bit of cpu in the decoder. Moving it to malloc space is trivial
- but won't be done until necessary (we don't currently support the runtime
- addition of instructions nor an SMP machine with different cpus). */
-static IDESC sh64_compact_insn_data[SH64_COMPACT_INSN_MAX];
-
-/* Commas between elements are contained in the macros.
- Some of these are conditionally compiled out. */
-
-static const struct insn_sem sh64_compact_insn_sem[] =
-{
- { VIRTUAL_INSN_X_INVALID, SH64_COMPACT_INSN_X_INVALID, SH64_COMPACT_SFMT_EMPTY },
- { VIRTUAL_INSN_X_AFTER, SH64_COMPACT_INSN_X_AFTER, SH64_COMPACT_SFMT_EMPTY },
- { VIRTUAL_INSN_X_BEFORE, SH64_COMPACT_INSN_X_BEFORE, SH64_COMPACT_SFMT_EMPTY },
- { VIRTUAL_INSN_X_CTI_CHAIN, SH64_COMPACT_INSN_X_CTI_CHAIN, SH64_COMPACT_SFMT_EMPTY },
- { VIRTUAL_INSN_X_CHAIN, SH64_COMPACT_INSN_X_CHAIN, SH64_COMPACT_SFMT_EMPTY },
- { VIRTUAL_INSN_X_BEGIN, SH64_COMPACT_INSN_X_BEGIN, SH64_COMPACT_SFMT_EMPTY },
- { SH_INSN_ADD_COMPACT, SH64_COMPACT_INSN_ADD_COMPACT, SH64_COMPACT_SFMT_ADD_COMPACT },
- { SH_INSN_ADDI_COMPACT, SH64_COMPACT_INSN_ADDI_COMPACT, SH64_COMPACT_SFMT_ADDI_COMPACT },
- { SH_INSN_ADDC_COMPACT, SH64_COMPACT_INSN_ADDC_COMPACT, SH64_COMPACT_SFMT_ADDC_COMPACT },
- { SH_INSN_ADDV_COMPACT, SH64_COMPACT_INSN_ADDV_COMPACT, SH64_COMPACT_SFMT_ADDV_COMPACT },
- { SH_INSN_AND_COMPACT, SH64_COMPACT_INSN_AND_COMPACT, SH64_COMPACT_SFMT_AND_COMPACT },
- { SH_INSN_ANDI_COMPACT, SH64_COMPACT_INSN_ANDI_COMPACT, SH64_COMPACT_SFMT_ANDI_COMPACT },
- { SH_INSN_ANDB_COMPACT, SH64_COMPACT_INSN_ANDB_COMPACT, SH64_COMPACT_SFMT_ANDB_COMPACT },
- { SH_INSN_BF_COMPACT, SH64_COMPACT_INSN_BF_COMPACT, SH64_COMPACT_SFMT_BF_COMPACT },
- { SH_INSN_BFS_COMPACT, SH64_COMPACT_INSN_BFS_COMPACT, SH64_COMPACT_SFMT_BF_COMPACT },
- { SH_INSN_BRA_COMPACT, SH64_COMPACT_INSN_BRA_COMPACT, SH64_COMPACT_SFMT_BRA_COMPACT },
- { SH_INSN_BRAF_COMPACT, SH64_COMPACT_INSN_BRAF_COMPACT, SH64_COMPACT_SFMT_BRAF_COMPACT },
- { SH_INSN_BRK_COMPACT, SH64_COMPACT_INSN_BRK_COMPACT, SH64_COMPACT_SFMT_BRK_COMPACT },
- { SH_INSN_BSR_COMPACT, SH64_COMPACT_INSN_BSR_COMPACT, SH64_COMPACT_SFMT_BSR_COMPACT },
- { SH_INSN_BSRF_COMPACT, SH64_COMPACT_INSN_BSRF_COMPACT, SH64_COMPACT_SFMT_BSRF_COMPACT },
- { SH_INSN_BT_COMPACT, SH64_COMPACT_INSN_BT_COMPACT, SH64_COMPACT_SFMT_BF_COMPACT },
- { SH_INSN_BTS_COMPACT, SH64_COMPACT_INSN_BTS_COMPACT, SH64_COMPACT_SFMT_BF_COMPACT },
- { SH_INSN_CLRMAC_COMPACT, SH64_COMPACT_INSN_CLRMAC_COMPACT, SH64_COMPACT_SFMT_CLRMAC_COMPACT },
- { SH_INSN_CLRS_COMPACT, SH64_COMPACT_INSN_CLRS_COMPACT, SH64_COMPACT_SFMT_CLRS_COMPACT },
- { SH_INSN_CLRT_COMPACT, SH64_COMPACT_INSN_CLRT_COMPACT, SH64_COMPACT_SFMT_CLRT_COMPACT },
- { SH_INSN_CMPEQ_COMPACT, SH64_COMPACT_INSN_CMPEQ_COMPACT, SH64_COMPACT_SFMT_CMPEQ_COMPACT },
- { SH_INSN_CMPEQI_COMPACT, SH64_COMPACT_INSN_CMPEQI_COMPACT, SH64_COMPACT_SFMT_CMPEQI_COMPACT },
- { SH_INSN_CMPGE_COMPACT, SH64_COMPACT_INSN_CMPGE_COMPACT, SH64_COMPACT_SFMT_CMPEQ_COMPACT },
- { SH_INSN_CMPGT_COMPACT, SH64_COMPACT_INSN_CMPGT_COMPACT, SH64_COMPACT_SFMT_CMPEQ_COMPACT },
- { SH_INSN_CMPHI_COMPACT, SH64_COMPACT_INSN_CMPHI_COMPACT, SH64_COMPACT_SFMT_CMPEQ_COMPACT },
- { SH_INSN_CMPHS_COMPACT, SH64_COMPACT_INSN_CMPHS_COMPACT, SH64_COMPACT_SFMT_CMPEQ_COMPACT },
- { SH_INSN_CMPPL_COMPACT, SH64_COMPACT_INSN_CMPPL_COMPACT, SH64_COMPACT_SFMT_CMPPL_COMPACT },
- { SH_INSN_CMPPZ_COMPACT, SH64_COMPACT_INSN_CMPPZ_COMPACT, SH64_COMPACT_SFMT_CMPPL_COMPACT },
- { SH_INSN_CMPSTR_COMPACT, SH64_COMPACT_INSN_CMPSTR_COMPACT, SH64_COMPACT_SFMT_CMPEQ_COMPACT },
- { SH_INSN_DIV0S_COMPACT, SH64_COMPACT_INSN_DIV0S_COMPACT, SH64_COMPACT_SFMT_DIV0S_COMPACT },
- { SH_INSN_DIV0U_COMPACT, SH64_COMPACT_INSN_DIV0U_COMPACT, SH64_COMPACT_SFMT_DIV0U_COMPACT },
- { SH_INSN_DIV1_COMPACT, SH64_COMPACT_INSN_DIV1_COMPACT, SH64_COMPACT_SFMT_DIV1_COMPACT },
- { SH_INSN_DMULSL_COMPACT, SH64_COMPACT_INSN_DMULSL_COMPACT, SH64_COMPACT_SFMT_DMULSL_COMPACT },
- { SH_INSN_DMULUL_COMPACT, SH64_COMPACT_INSN_DMULUL_COMPACT, SH64_COMPACT_SFMT_DMULSL_COMPACT },
- { SH_INSN_DT_COMPACT, SH64_COMPACT_INSN_DT_COMPACT, SH64_COMPACT_SFMT_DT_COMPACT },
- { SH_INSN_EXTSB_COMPACT, SH64_COMPACT_INSN_EXTSB_COMPACT, SH64_COMPACT_SFMT_EXTSB_COMPACT },
- { SH_INSN_EXTSW_COMPACT, SH64_COMPACT_INSN_EXTSW_COMPACT, SH64_COMPACT_SFMT_EXTSB_COMPACT },
- { SH_INSN_EXTUB_COMPACT, SH64_COMPACT_INSN_EXTUB_COMPACT, SH64_COMPACT_SFMT_EXTSB_COMPACT },
- { SH_INSN_EXTUW_COMPACT, SH64_COMPACT_INSN_EXTUW_COMPACT, SH64_COMPACT_SFMT_EXTSB_COMPACT },
- { SH_INSN_FABS_COMPACT, SH64_COMPACT_INSN_FABS_COMPACT, SH64_COMPACT_SFMT_FABS_COMPACT },
- { SH_INSN_FADD_COMPACT, SH64_COMPACT_INSN_FADD_COMPACT, SH64_COMPACT_SFMT_FADD_COMPACT },
- { SH_INSN_FCMPEQ_COMPACT, SH64_COMPACT_INSN_FCMPEQ_COMPACT, SH64_COMPACT_SFMT_FCMPEQ_COMPACT },
- { SH_INSN_FCMPGT_COMPACT, SH64_COMPACT_INSN_FCMPGT_COMPACT, SH64_COMPACT_SFMT_FCMPEQ_COMPACT },
- { SH_INSN_FCNVDS_COMPACT, SH64_COMPACT_INSN_FCNVDS_COMPACT, SH64_COMPACT_SFMT_FCNVDS_COMPACT },
- { SH_INSN_FCNVSD_COMPACT, SH64_COMPACT_INSN_FCNVSD_COMPACT, SH64_COMPACT_SFMT_FCNVSD_COMPACT },
- { SH_INSN_FDIV_COMPACT, SH64_COMPACT_INSN_FDIV_COMPACT, SH64_COMPACT_SFMT_FADD_COMPACT },
- { SH_INSN_FIPR_COMPACT, SH64_COMPACT_INSN_FIPR_COMPACT, SH64_COMPACT_SFMT_FIPR_COMPACT },
- { SH_INSN_FLDS_COMPACT, SH64_COMPACT_INSN_FLDS_COMPACT, SH64_COMPACT_SFMT_FLDS_COMPACT },
- { SH_INSN_FLDI0_COMPACT, SH64_COMPACT_INSN_FLDI0_COMPACT, SH64_COMPACT_SFMT_FLDI0_COMPACT },
- { SH_INSN_FLDI1_COMPACT, SH64_COMPACT_INSN_FLDI1_COMPACT, SH64_COMPACT_SFMT_FLDI0_COMPACT },
- { SH_INSN_FLOAT_COMPACT, SH64_COMPACT_INSN_FLOAT_COMPACT, SH64_COMPACT_SFMT_FLOAT_COMPACT },
- { SH_INSN_FMAC_COMPACT, SH64_COMPACT_INSN_FMAC_COMPACT, SH64_COMPACT_SFMT_FMAC_COMPACT },
- { SH_INSN_FMOV1_COMPACT, SH64_COMPACT_INSN_FMOV1_COMPACT, SH64_COMPACT_SFMT_FMOV1_COMPACT },
- { SH_INSN_FMOV2_COMPACT, SH64_COMPACT_INSN_FMOV2_COMPACT, SH64_COMPACT_SFMT_FMOV2_COMPACT },
- { SH_INSN_FMOV3_COMPACT, SH64_COMPACT_INSN_FMOV3_COMPACT, SH64_COMPACT_SFMT_FMOV3_COMPACT },
- { SH_INSN_FMOV4_COMPACT, SH64_COMPACT_INSN_FMOV4_COMPACT, SH64_COMPACT_SFMT_FMOV4_COMPACT },
- { SH_INSN_FMOV5_COMPACT, SH64_COMPACT_INSN_FMOV5_COMPACT, SH64_COMPACT_SFMT_FMOV5_COMPACT },
- { SH_INSN_FMOV6_COMPACT, SH64_COMPACT_INSN_FMOV6_COMPACT, SH64_COMPACT_SFMT_FMOV6_COMPACT },
- { SH_INSN_FMOV7_COMPACT, SH64_COMPACT_INSN_FMOV7_COMPACT, SH64_COMPACT_SFMT_FMOV7_COMPACT },
- { SH_INSN_FMUL_COMPACT, SH64_COMPACT_INSN_FMUL_COMPACT, SH64_COMPACT_SFMT_FADD_COMPACT },
- { SH_INSN_FNEG_COMPACT, SH64_COMPACT_INSN_FNEG_COMPACT, SH64_COMPACT_SFMT_FABS_COMPACT },
- { SH_INSN_FRCHG_COMPACT, SH64_COMPACT_INSN_FRCHG_COMPACT, SH64_COMPACT_SFMT_FRCHG_COMPACT },
- { SH_INSN_FSCHG_COMPACT, SH64_COMPACT_INSN_FSCHG_COMPACT, SH64_COMPACT_SFMT_FSCHG_COMPACT },
- { SH_INSN_FSQRT_COMPACT, SH64_COMPACT_INSN_FSQRT_COMPACT, SH64_COMPACT_SFMT_FABS_COMPACT },
- { SH_INSN_FSTS_COMPACT, SH64_COMPACT_INSN_FSTS_COMPACT, SH64_COMPACT_SFMT_FSTS_COMPACT },
- { SH_INSN_FSUB_COMPACT, SH64_COMPACT_INSN_FSUB_COMPACT, SH64_COMPACT_SFMT_FADD_COMPACT },
- { SH_INSN_FTRC_COMPACT, SH64_COMPACT_INSN_FTRC_COMPACT, SH64_COMPACT_SFMT_FTRC_COMPACT },
- { SH_INSN_FTRV_COMPACT, SH64_COMPACT_INSN_FTRV_COMPACT, SH64_COMPACT_SFMT_FTRV_COMPACT },
- { SH_INSN_JMP_COMPACT, SH64_COMPACT_INSN_JMP_COMPACT, SH64_COMPACT_SFMT_JMP_COMPACT },
- { SH_INSN_JSR_COMPACT, SH64_COMPACT_INSN_JSR_COMPACT, SH64_COMPACT_SFMT_BSRF_COMPACT },
- { SH_INSN_LDC_COMPACT, SH64_COMPACT_INSN_LDC_COMPACT, SH64_COMPACT_SFMT_LDC_COMPACT },
- { SH_INSN_LDCL_COMPACT, SH64_COMPACT_INSN_LDCL_COMPACT, SH64_COMPACT_SFMT_LDCL_COMPACT },
- { SH_INSN_LDS_FPSCR_COMPACT, SH64_COMPACT_INSN_LDS_FPSCR_COMPACT, SH64_COMPACT_SFMT_LDS_FPSCR_COMPACT },
- { SH_INSN_LDSL_FPSCR_COMPACT, SH64_COMPACT_INSN_LDSL_FPSCR_COMPACT, SH64_COMPACT_SFMT_LDSL_FPSCR_COMPACT },
- { SH_INSN_LDS_FPUL_COMPACT, SH64_COMPACT_INSN_LDS_FPUL_COMPACT, SH64_COMPACT_SFMT_LDS_FPUL_COMPACT },
- { SH_INSN_LDSL_FPUL_COMPACT, SH64_COMPACT_INSN_LDSL_FPUL_COMPACT, SH64_COMPACT_SFMT_LDSL_FPUL_COMPACT },
- { SH_INSN_LDS_MACH_COMPACT, SH64_COMPACT_INSN_LDS_MACH_COMPACT, SH64_COMPACT_SFMT_LDS_MACH_COMPACT },
- { SH_INSN_LDSL_MACH_COMPACT, SH64_COMPACT_INSN_LDSL_MACH_COMPACT, SH64_COMPACT_SFMT_LDSL_MACH_COMPACT },
- { SH_INSN_LDS_MACL_COMPACT, SH64_COMPACT_INSN_LDS_MACL_COMPACT, SH64_COMPACT_SFMT_LDS_MACL_COMPACT },
- { SH_INSN_LDSL_MACL_COMPACT, SH64_COMPACT_INSN_LDSL_MACL_COMPACT, SH64_COMPACT_SFMT_LDSL_MACL_COMPACT },
- { SH_INSN_LDS_PR_COMPACT, SH64_COMPACT_INSN_LDS_PR_COMPACT, SH64_COMPACT_SFMT_LDS_PR_COMPACT },
- { SH_INSN_LDSL_PR_COMPACT, SH64_COMPACT_INSN_LDSL_PR_COMPACT, SH64_COMPACT_SFMT_LDSL_PR_COMPACT },
- { SH_INSN_MACL_COMPACT, SH64_COMPACT_INSN_MACL_COMPACT, SH64_COMPACT_SFMT_MACL_COMPACT },
- { SH_INSN_MACW_COMPACT, SH64_COMPACT_INSN_MACW_COMPACT, SH64_COMPACT_SFMT_MACW_COMPACT },
- { SH_INSN_MOV_COMPACT, SH64_COMPACT_INSN_MOV_COMPACT, SH64_COMPACT_SFMT_MOV_COMPACT },
- { SH_INSN_MOVI_COMPACT, SH64_COMPACT_INSN_MOVI_COMPACT, SH64_COMPACT_SFMT_MOVI_COMPACT },
- { SH_INSN_MOVB1_COMPACT, SH64_COMPACT_INSN_MOVB1_COMPACT, SH64_COMPACT_SFMT_MOVB1_COMPACT },
- { SH_INSN_MOVB2_COMPACT, SH64_COMPACT_INSN_MOVB2_COMPACT, SH64_COMPACT_SFMT_MOVB2_COMPACT },
- { SH_INSN_MOVB3_COMPACT, SH64_COMPACT_INSN_MOVB3_COMPACT, SH64_COMPACT_SFMT_MOVB3_COMPACT },
- { SH_INSN_MOVB4_COMPACT, SH64_COMPACT_INSN_MOVB4_COMPACT, SH64_COMPACT_SFMT_MOVB4_COMPACT },
- { SH_INSN_MOVB5_COMPACT, SH64_COMPACT_INSN_MOVB5_COMPACT, SH64_COMPACT_SFMT_MOVB5_COMPACT },
- { SH_INSN_MOVB6_COMPACT, SH64_COMPACT_INSN_MOVB6_COMPACT, SH64_COMPACT_SFMT_MOVB6_COMPACT },
- { SH_INSN_MOVB7_COMPACT, SH64_COMPACT_INSN_MOVB7_COMPACT, SH64_COMPACT_SFMT_MOVB7_COMPACT },
- { SH_INSN_MOVB8_COMPACT, SH64_COMPACT_INSN_MOVB8_COMPACT, SH64_COMPACT_SFMT_MOVB8_COMPACT },
- { SH_INSN_MOVB9_COMPACT, SH64_COMPACT_INSN_MOVB9_COMPACT, SH64_COMPACT_SFMT_MOVB9_COMPACT },
- { SH_INSN_MOVB10_COMPACT, SH64_COMPACT_INSN_MOVB10_COMPACT, SH64_COMPACT_SFMT_MOVB10_COMPACT },
- { SH_INSN_MOVL1_COMPACT, SH64_COMPACT_INSN_MOVL1_COMPACT, SH64_COMPACT_SFMT_MOVB1_COMPACT },
- { SH_INSN_MOVL2_COMPACT, SH64_COMPACT_INSN_MOVL2_COMPACT, SH64_COMPACT_SFMT_MOVB2_COMPACT },
- { SH_INSN_MOVL3_COMPACT, SH64_COMPACT_INSN_MOVL3_COMPACT, SH64_COMPACT_SFMT_MOVB3_COMPACT },
- { SH_INSN_MOVL4_COMPACT, SH64_COMPACT_INSN_MOVL4_COMPACT, SH64_COMPACT_SFMT_MOVL4_COMPACT },
- { SH_INSN_MOVL5_COMPACT, SH64_COMPACT_INSN_MOVL5_COMPACT, SH64_COMPACT_SFMT_MOVL5_COMPACT },
- { SH_INSN_MOVL6_COMPACT, SH64_COMPACT_INSN_MOVL6_COMPACT, SH64_COMPACT_SFMT_MOVB6_COMPACT },
- { SH_INSN_MOVL7_COMPACT, SH64_COMPACT_INSN_MOVL7_COMPACT, SH64_COMPACT_SFMT_MOVL7_COMPACT },
- { SH_INSN_MOVL8_COMPACT, SH64_COMPACT_INSN_MOVL8_COMPACT, SH64_COMPACT_SFMT_MOVB8_COMPACT },
- { SH_INSN_MOVL9_COMPACT, SH64_COMPACT_INSN_MOVL9_COMPACT, SH64_COMPACT_SFMT_MOVL9_COMPACT },
- { SH_INSN_MOVL10_COMPACT, SH64_COMPACT_INSN_MOVL10_COMPACT, SH64_COMPACT_SFMT_MOVL10_COMPACT },
- { SH_INSN_MOVL11_COMPACT, SH64_COMPACT_INSN_MOVL11_COMPACT, SH64_COMPACT_SFMT_MOVL11_COMPACT },
- { SH_INSN_MOVW1_COMPACT, SH64_COMPACT_INSN_MOVW1_COMPACT, SH64_COMPACT_SFMT_MOVB1_COMPACT },
- { SH_INSN_MOVW2_COMPACT, SH64_COMPACT_INSN_MOVW2_COMPACT, SH64_COMPACT_SFMT_MOVB2_COMPACT },
- { SH_INSN_MOVW3_COMPACT, SH64_COMPACT_INSN_MOVW3_COMPACT, SH64_COMPACT_SFMT_MOVB3_COMPACT },
- { SH_INSN_MOVW4_COMPACT, SH64_COMPACT_INSN_MOVW4_COMPACT, SH64_COMPACT_SFMT_MOVW4_COMPACT },
- { SH_INSN_MOVW5_COMPACT, SH64_COMPACT_INSN_MOVW5_COMPACT, SH64_COMPACT_SFMT_MOVW5_COMPACT },
- { SH_INSN_MOVW6_COMPACT, SH64_COMPACT_INSN_MOVW6_COMPACT, SH64_COMPACT_SFMT_MOVB6_COMPACT },
- { SH_INSN_MOVW7_COMPACT, SH64_COMPACT_INSN_MOVW7_COMPACT, SH64_COMPACT_SFMT_MOVB7_COMPACT },
- { SH_INSN_MOVW8_COMPACT, SH64_COMPACT_INSN_MOVW8_COMPACT, SH64_COMPACT_SFMT_MOVB8_COMPACT },
- { SH_INSN_MOVW9_COMPACT, SH64_COMPACT_INSN_MOVW9_COMPACT, SH64_COMPACT_SFMT_MOVW9_COMPACT },
- { SH_INSN_MOVW10_COMPACT, SH64_COMPACT_INSN_MOVW10_COMPACT, SH64_COMPACT_SFMT_MOVW10_COMPACT },
- { SH_INSN_MOVW11_COMPACT, SH64_COMPACT_INSN_MOVW11_COMPACT, SH64_COMPACT_SFMT_MOVW11_COMPACT },
- { SH_INSN_MOVA_COMPACT, SH64_COMPACT_INSN_MOVA_COMPACT, SH64_COMPACT_SFMT_MOVA_COMPACT },
- { SH_INSN_MOVCAL_COMPACT, SH64_COMPACT_INSN_MOVCAL_COMPACT, SH64_COMPACT_SFMT_MOVCAL_COMPACT },
- { SH_INSN_MOVT_COMPACT, SH64_COMPACT_INSN_MOVT_COMPACT, SH64_COMPACT_SFMT_MOVT_COMPACT },
- { SH_INSN_MULL_COMPACT, SH64_COMPACT_INSN_MULL_COMPACT, SH64_COMPACT_SFMT_MULL_COMPACT },
- { SH_INSN_MULSW_COMPACT, SH64_COMPACT_INSN_MULSW_COMPACT, SH64_COMPACT_SFMT_MULL_COMPACT },
- { SH_INSN_MULUW_COMPACT, SH64_COMPACT_INSN_MULUW_COMPACT, SH64_COMPACT_SFMT_MULL_COMPACT },
- { SH_INSN_NEG_COMPACT, SH64_COMPACT_INSN_NEG_COMPACT, SH64_COMPACT_SFMT_EXTSB_COMPACT },
- { SH_INSN_NEGC_COMPACT, SH64_COMPACT_INSN_NEGC_COMPACT, SH64_COMPACT_SFMT_NEGC_COMPACT },
- { SH_INSN_NOP_COMPACT, SH64_COMPACT_INSN_NOP_COMPACT, SH64_COMPACT_SFMT_NOP_COMPACT },
- { SH_INSN_NOT_COMPACT, SH64_COMPACT_INSN_NOT_COMPACT, SH64_COMPACT_SFMT_MOV_COMPACT },
- { SH_INSN_OCBI_COMPACT, SH64_COMPACT_INSN_OCBI_COMPACT, SH64_COMPACT_SFMT_NOP_COMPACT },
- { SH_INSN_OCBP_COMPACT, SH64_COMPACT_INSN_OCBP_COMPACT, SH64_COMPACT_SFMT_NOP_COMPACT },
- { SH_INSN_OCBWB_COMPACT, SH64_COMPACT_INSN_OCBWB_COMPACT, SH64_COMPACT_SFMT_NOP_COMPACT },
- { SH_INSN_OR_COMPACT, SH64_COMPACT_INSN_OR_COMPACT, SH64_COMPACT_SFMT_AND_COMPACT },
- { SH_INSN_ORI_COMPACT, SH64_COMPACT_INSN_ORI_COMPACT, SH64_COMPACT_SFMT_ANDI_COMPACT },
- { SH_INSN_ORB_COMPACT, SH64_COMPACT_INSN_ORB_COMPACT, SH64_COMPACT_SFMT_ANDB_COMPACT },
- { SH_INSN_PREF_COMPACT, SH64_COMPACT_INSN_PREF_COMPACT, SH64_COMPACT_SFMT_NOP_COMPACT },
- { SH_INSN_ROTCL_COMPACT, SH64_COMPACT_INSN_ROTCL_COMPACT, SH64_COMPACT_SFMT_ROTCL_COMPACT },
- { SH_INSN_ROTCR_COMPACT, SH64_COMPACT_INSN_ROTCR_COMPACT, SH64_COMPACT_SFMT_ROTCL_COMPACT },
- { SH_INSN_ROTL_COMPACT, SH64_COMPACT_INSN_ROTL_COMPACT, SH64_COMPACT_SFMT_DT_COMPACT },
- { SH_INSN_ROTR_COMPACT, SH64_COMPACT_INSN_ROTR_COMPACT, SH64_COMPACT_SFMT_DT_COMPACT },
- { SH_INSN_RTS_COMPACT, SH64_COMPACT_INSN_RTS_COMPACT, SH64_COMPACT_SFMT_RTS_COMPACT },
- { SH_INSN_SETS_COMPACT, SH64_COMPACT_INSN_SETS_COMPACT, SH64_COMPACT_SFMT_CLRS_COMPACT },
- { SH_INSN_SETT_COMPACT, SH64_COMPACT_INSN_SETT_COMPACT, SH64_COMPACT_SFMT_CLRT_COMPACT },
- { SH_INSN_SHAD_COMPACT, SH64_COMPACT_INSN_SHAD_COMPACT, SH64_COMPACT_SFMT_SHAD_COMPACT },
- { SH_INSN_SHAL_COMPACT, SH64_COMPACT_INSN_SHAL_COMPACT, SH64_COMPACT_SFMT_DT_COMPACT },
- { SH_INSN_SHAR_COMPACT, SH64_COMPACT_INSN_SHAR_COMPACT, SH64_COMPACT_SFMT_DT_COMPACT },
- { SH_INSN_SHLD_COMPACT, SH64_COMPACT_INSN_SHLD_COMPACT, SH64_COMPACT_SFMT_SHAD_COMPACT },
- { SH_INSN_SHLL_COMPACT, SH64_COMPACT_INSN_SHLL_COMPACT, SH64_COMPACT_SFMT_DT_COMPACT },
- { SH_INSN_SHLL2_COMPACT, SH64_COMPACT_INSN_SHLL2_COMPACT, SH64_COMPACT_SFMT_SHLL2_COMPACT },
- { SH_INSN_SHLL8_COMPACT, SH64_COMPACT_INSN_SHLL8_COMPACT, SH64_COMPACT_SFMT_SHLL2_COMPACT },
- { SH_INSN_SHLL16_COMPACT, SH64_COMPACT_INSN_SHLL16_COMPACT, SH64_COMPACT_SFMT_SHLL2_COMPACT },
- { SH_INSN_SHLR_COMPACT, SH64_COMPACT_INSN_SHLR_COMPACT, SH64_COMPACT_SFMT_DT_COMPACT },
- { SH_INSN_SHLR2_COMPACT, SH64_COMPACT_INSN_SHLR2_COMPACT, SH64_COMPACT_SFMT_SHLL2_COMPACT },
- { SH_INSN_SHLR8_COMPACT, SH64_COMPACT_INSN_SHLR8_COMPACT, SH64_COMPACT_SFMT_SHLL2_COMPACT },
- { SH_INSN_SHLR16_COMPACT, SH64_COMPACT_INSN_SHLR16_COMPACT, SH64_COMPACT_SFMT_SHLL2_COMPACT },
- { SH_INSN_STC_GBR_COMPACT, SH64_COMPACT_INSN_STC_GBR_COMPACT, SH64_COMPACT_SFMT_STC_GBR_COMPACT },
- { SH_INSN_STCL_GBR_COMPACT, SH64_COMPACT_INSN_STCL_GBR_COMPACT, SH64_COMPACT_SFMT_STCL_GBR_COMPACT },
- { SH_INSN_STS_FPSCR_COMPACT, SH64_COMPACT_INSN_STS_FPSCR_COMPACT, SH64_COMPACT_SFMT_STS_FPSCR_COMPACT },
- { SH_INSN_STSL_FPSCR_COMPACT, SH64_COMPACT_INSN_STSL_FPSCR_COMPACT, SH64_COMPACT_SFMT_STSL_FPSCR_COMPACT },
- { SH_INSN_STS_FPUL_COMPACT, SH64_COMPACT_INSN_STS_FPUL_COMPACT, SH64_COMPACT_SFMT_STS_FPUL_COMPACT },
- { SH_INSN_STSL_FPUL_COMPACT, SH64_COMPACT_INSN_STSL_FPUL_COMPACT, SH64_COMPACT_SFMT_STSL_FPUL_COMPACT },
- { SH_INSN_STS_MACH_COMPACT, SH64_COMPACT_INSN_STS_MACH_COMPACT, SH64_COMPACT_SFMT_STS_MACH_COMPACT },
- { SH_INSN_STSL_MACH_COMPACT, SH64_COMPACT_INSN_STSL_MACH_COMPACT, SH64_COMPACT_SFMT_STSL_MACH_COMPACT },
- { SH_INSN_STS_MACL_COMPACT, SH64_COMPACT_INSN_STS_MACL_COMPACT, SH64_COMPACT_SFMT_STS_MACL_COMPACT },
- { SH_INSN_STSL_MACL_COMPACT, SH64_COMPACT_INSN_STSL_MACL_COMPACT, SH64_COMPACT_SFMT_STSL_MACL_COMPACT },
- { SH_INSN_STS_PR_COMPACT, SH64_COMPACT_INSN_STS_PR_COMPACT, SH64_COMPACT_SFMT_STS_PR_COMPACT },
- { SH_INSN_STSL_PR_COMPACT, SH64_COMPACT_INSN_STSL_PR_COMPACT, SH64_COMPACT_SFMT_STSL_PR_COMPACT },
- { SH_INSN_SUB_COMPACT, SH64_COMPACT_INSN_SUB_COMPACT, SH64_COMPACT_SFMT_ADD_COMPACT },
- { SH_INSN_SUBC_COMPACT, SH64_COMPACT_INSN_SUBC_COMPACT, SH64_COMPACT_SFMT_ADDC_COMPACT },
- { SH_INSN_SUBV_COMPACT, SH64_COMPACT_INSN_SUBV_COMPACT, SH64_COMPACT_SFMT_ADDV_COMPACT },
- { SH_INSN_SWAPB_COMPACT, SH64_COMPACT_INSN_SWAPB_COMPACT, SH64_COMPACT_SFMT_EXTSB_COMPACT },
- { SH_INSN_SWAPW_COMPACT, SH64_COMPACT_INSN_SWAPW_COMPACT, SH64_COMPACT_SFMT_EXTSB_COMPACT },
- { SH_INSN_TASB_COMPACT, SH64_COMPACT_INSN_TASB_COMPACT, SH64_COMPACT_SFMT_TASB_COMPACT },
- { SH_INSN_TRAPA_COMPACT, SH64_COMPACT_INSN_TRAPA_COMPACT, SH64_COMPACT_SFMT_TRAPA_COMPACT },
- { SH_INSN_TST_COMPACT, SH64_COMPACT_INSN_TST_COMPACT, SH64_COMPACT_SFMT_CMPEQ_COMPACT },
- { SH_INSN_TSTI_COMPACT, SH64_COMPACT_INSN_TSTI_COMPACT, SH64_COMPACT_SFMT_TSTI_COMPACT },
- { SH_INSN_TSTB_COMPACT, SH64_COMPACT_INSN_TSTB_COMPACT, SH64_COMPACT_SFMT_TSTB_COMPACT },
- { SH_INSN_XOR_COMPACT, SH64_COMPACT_INSN_XOR_COMPACT, SH64_COMPACT_SFMT_AND_COMPACT },
- { SH_INSN_XORI_COMPACT, SH64_COMPACT_INSN_XORI_COMPACT, SH64_COMPACT_SFMT_XORI_COMPACT },
- { SH_INSN_XORB_COMPACT, SH64_COMPACT_INSN_XORB_COMPACT, SH64_COMPACT_SFMT_ANDB_COMPACT },
- { SH_INSN_XTRCT_COMPACT, SH64_COMPACT_INSN_XTRCT_COMPACT, SH64_COMPACT_SFMT_ADD_COMPACT },
-};
-
-static const struct insn_sem sh64_compact_insn_sem_invalid = {
- VIRTUAL_INSN_X_INVALID, SH64_COMPACT_INSN_X_INVALID, SH64_COMPACT_SFMT_EMPTY
-};
-
-/* Initialize an IDESC from the compile-time computable parts. */
-
-static INLINE void
-init_idesc (SIM_CPU *cpu, IDESC *id, const struct insn_sem *t)
-{
- const CGEN_INSN *insn_table = CGEN_CPU_INSN_TABLE (CPU_CPU_DESC (cpu))->init_entries;
-
- id->num = t->index;
- id->sfmt = t->sfmt;
- if ((int) t->type <= 0)
- id->idata = & cgen_virtual_insn_table[- (int) t->type];
- else
- id->idata = & insn_table[t->type];
- id->attrs = CGEN_INSN_ATTRS (id->idata);
- /* Oh my god, a magic number. */
- id->length = CGEN_INSN_BITSIZE (id->idata) / 8;
-
-#if WITH_PROFILE_MODEL_P
- id->timing = & MODEL_TIMING (CPU_MODEL (cpu)) [t->index];
- {
- SIM_DESC sd = CPU_STATE (cpu);
- SIM_ASSERT (t->index == id->timing->num);
- }
-#endif
-
- /* Semantic pointers are initialized elsewhere. */
-}
-
-/* Initialize the instruction descriptor table. */
-
-void
-sh64_compact_init_idesc_table (SIM_CPU *cpu)
-{
- IDESC *id,*tabend;
- const struct insn_sem *t,*tend;
- int tabsize = SH64_COMPACT_INSN_MAX;
- IDESC *table = sh64_compact_insn_data;
-
- memset (table, 0, tabsize * sizeof (IDESC));
-
- /* First set all entries to the `invalid insn'. */
- t = & sh64_compact_insn_sem_invalid;
- for (id = table, tabend = table + tabsize; id < tabend; ++id)
- init_idesc (cpu, id, t);
-
- /* Now fill in the values for the chosen cpu. */
- for (t = sh64_compact_insn_sem, tend = t + sizeof (sh64_compact_insn_sem) / sizeof (*t);
- t != tend; ++t)
- {
- init_idesc (cpu, & table[t->index], t);
- }
-
- /* Link the IDESC table into the cpu. */
- CPU_IDESC (cpu) = table;
-}
-
-/* Given an instruction, return a pointer to its IDESC entry. */
-
-const IDESC *
-sh64_compact_decode (SIM_CPU *current_cpu, IADDR pc,
- CGEN_INSN_INT base_insn, CGEN_INSN_INT entire_insn,
- ARGBUF *abuf)
-{
- /* Result of decoder. */
- SH64_COMPACT_INSN_TYPE itype;
-
- {
- CGEN_INSN_INT insn = base_insn;
-
- {
- unsigned int val = (((insn >> 8) & (15 << 4)) | ((insn >> 0) & (15 << 0)));
- switch (val)
- {
- case 2 : itype = SH64_COMPACT_INSN_STC_GBR_COMPACT; goto extract_sfmt_stc_gbr_compact; case 3 :
- {
- unsigned int val = (((insn >> 4) & (15 << 0)));
- switch (val)
- {
- case 0 : itype = SH64_COMPACT_INSN_BSRF_COMPACT; goto extract_sfmt_bsrf_compact; case 2 : itype = SH64_COMPACT_INSN_BRAF_COMPACT; goto extract_sfmt_braf_compact; case 8 : itype = SH64_COMPACT_INSN_PREF_COMPACT; goto extract_sfmt_nop_compact; case 9 : itype = SH64_COMPACT_INSN_OCBI_COMPACT; goto extract_sfmt_nop_compact; case 10 : itype = SH64_COMPACT_INSN_OCBP_COMPACT; goto extract_sfmt_nop_compact; case 11 : itype = SH64_COMPACT_INSN_OCBWB_COMPACT; goto extract_sfmt_nop_compact; case 12 : itype = SH64_COMPACT_INSN_MOVCAL_COMPACT; goto extract_sfmt_movcal_compact; default : itype = SH64_COMPACT_INSN_X_INVALID; goto extract_sfmt_empty;
- }
- }
- case 4 : itype = SH64_COMPACT_INSN_MOVB3_COMPACT; goto extract_sfmt_movb3_compact; case 5 : itype = SH64_COMPACT_INSN_MOVW3_COMPACT; goto extract_sfmt_movb3_compact; case 6 : itype = SH64_COMPACT_INSN_MOVL3_COMPACT; goto extract_sfmt_movb3_compact; case 7 : itype = SH64_COMPACT_INSN_MULL_COMPACT; goto extract_sfmt_mull_compact; case 8 :
- {
- unsigned int val = (((insn >> 4) & (7 << 0)));
- switch (val)
- {
- case 0 : itype = SH64_COMPACT_INSN_CLRT_COMPACT; goto extract_sfmt_clrt_compact; case 1 : itype = SH64_COMPACT_INSN_SETT_COMPACT; goto extract_sfmt_clrt_compact; case 2 : itype = SH64_COMPACT_INSN_CLRMAC_COMPACT; goto extract_sfmt_clrmac_compact; case 4 : itype = SH64_COMPACT_INSN_CLRS_COMPACT; goto extract_sfmt_clrs_compact; case 5 : itype = SH64_COMPACT_INSN_SETS_COMPACT; goto extract_sfmt_clrs_compact; default : itype = SH64_COMPACT_INSN_X_INVALID; goto extract_sfmt_empty;
- }
- }
- case 9 :
- {
- unsigned int val = (((insn >> 4) & (3 << 0)));
- switch (val)
- {
- case 0 : itype = SH64_COMPACT_INSN_NOP_COMPACT; goto extract_sfmt_nop_compact; case 1 : itype = SH64_COMPACT_INSN_DIV0U_COMPACT; goto extract_sfmt_div0u_compact; case 2 : itype = SH64_COMPACT_INSN_MOVT_COMPACT; goto extract_sfmt_movt_compact; default : itype = SH64_COMPACT_INSN_X_INVALID; goto extract_sfmt_empty;
- }
- }
- case 10 :
- {
- unsigned int val = (((insn >> 4) & (7 << 0)));
- switch (val)
- {
- case 0 : itype = SH64_COMPACT_INSN_STS_MACH_COMPACT; goto extract_sfmt_sts_mach_compact; case 1 : itype = SH64_COMPACT_INSN_STS_MACL_COMPACT; goto extract_sfmt_sts_macl_compact; case 2 : itype = SH64_COMPACT_INSN_STS_PR_COMPACT; goto extract_sfmt_sts_pr_compact; case 5 : itype = SH64_COMPACT_INSN_STS_FPUL_COMPACT; goto extract_sfmt_sts_fpul_compact; case 6 : itype = SH64_COMPACT_INSN_STS_FPSCR_COMPACT; goto extract_sfmt_sts_fpscr_compact; default : itype = SH64_COMPACT_INSN_X_INVALID; goto extract_sfmt_empty;
- }
- }
- case 11 :
- {
- unsigned int val = (((insn >> 4) & (3 << 0)));
- switch (val)
- {
- case 0 : itype = SH64_COMPACT_INSN_RTS_COMPACT; goto extract_sfmt_rts_compact; case 3 : itype = SH64_COMPACT_INSN_BRK_COMPACT; goto extract_sfmt_brk_compact; default : itype = SH64_COMPACT_INSN_X_INVALID; goto extract_sfmt_empty;
- }
- }
- case 12 : itype = SH64_COMPACT_INSN_MOVB8_COMPACT; goto extract_sfmt_movb8_compact; case 13 : itype = SH64_COMPACT_INSN_MOVW8_COMPACT; goto extract_sfmt_movb8_compact; case 14 : itype = SH64_COMPACT_INSN_MOVL8_COMPACT; goto extract_sfmt_movb8_compact; case 15 : itype = SH64_COMPACT_INSN_MACL_COMPACT; goto extract_sfmt_macl_compact; case 16 : /* fall through */
- case 17 : /* fall through */
- case 18 : /* fall through */
- case 19 : /* fall through */
- case 20 : /* fall through */
- case 21 : /* fall through */
- case 22 : /* fall through */
- case 23 : /* fall through */
- case 24 : /* fall through */
- case 25 : /* fall through */
- case 26 : /* fall through */
- case 27 : /* fall through */
- case 28 : /* fall through */
- case 29 : /* fall through */
- case 30 : /* fall through */
- case 31 : itype = SH64_COMPACT_INSN_MOVL5_COMPACT; goto extract_sfmt_movl5_compact; case 32 : itype = SH64_COMPACT_INSN_MOVB1_COMPACT; goto extract_sfmt_movb1_compact; case 33 : itype = SH64_COMPACT_INSN_MOVW1_COMPACT; goto extract_sfmt_movb1_compact; case 34 : itype = SH64_COMPACT_INSN_MOVL1_COMPACT; goto extract_sfmt_movb1_compact; case 36 : itype = SH64_COMPACT_INSN_MOVB2_COMPACT; goto extract_sfmt_movb2_compact; case 37 : itype = SH64_COMPACT_INSN_MOVW2_COMPACT; goto extract_sfmt_movb2_compact; case 38 : itype = SH64_COMPACT_INSN_MOVL2_COMPACT; goto extract_sfmt_movb2_compact; case 39 : itype = SH64_COMPACT_INSN_DIV0S_COMPACT; goto extract_sfmt_div0s_compact; case 40 : itype = SH64_COMPACT_INSN_TST_COMPACT; goto extract_sfmt_cmpeq_compact; case 41 : itype = SH64_COMPACT_INSN_AND_COMPACT; goto extract_sfmt_and_compact; case 42 : itype = SH64_COMPACT_INSN_XOR_COMPACT; goto extract_sfmt_and_compact; case 43 : itype = SH64_COMPACT_INSN_OR_COMPACT; goto extract_sfmt_and_compact; case 44 : itype = SH64_COMPACT_INSN_CMPSTR_COMPACT; goto extract_sfmt_cmpeq_compact; case 45 : itype = SH64_COMPACT_INSN_XTRCT_COMPACT; goto extract_sfmt_add_compact; case 46 : itype = SH64_COMPACT_INSN_MULUW_COMPACT; goto extract_sfmt_mull_compact; case 47 : itype = SH64_COMPACT_INSN_MULSW_COMPACT; goto extract_sfmt_mull_compact; case 48 : itype = SH64_COMPACT_INSN_CMPEQ_COMPACT; goto extract_sfmt_cmpeq_compact; case 50 : itype = SH64_COMPACT_INSN_CMPHS_COMPACT; goto extract_sfmt_cmpeq_compact; case 51 : itype = SH64_COMPACT_INSN_CMPGE_COMPACT; goto extract_sfmt_cmpeq_compact; case 52 : itype = SH64_COMPACT_INSN_DIV1_COMPACT; goto extract_sfmt_div1_compact; case 53 : itype = SH64_COMPACT_INSN_DMULUL_COMPACT; goto extract_sfmt_dmulsl_compact; case 54 : itype = SH64_COMPACT_INSN_CMPHI_COMPACT; goto extract_sfmt_cmpeq_compact; case 55 : itype = SH64_COMPACT_INSN_CMPGT_COMPACT; goto extract_sfmt_cmpeq_compact; case 56 : itype = SH64_COMPACT_INSN_SUB_COMPACT; goto extract_sfmt_add_compact; case 58 : itype = SH64_COMPACT_INSN_SUBC_COMPACT; goto extract_sfmt_addc_compact; case 59 : itype = SH64_COMPACT_INSN_SUBV_COMPACT; goto extract_sfmt_addv_compact; case 60 : itype = SH64_COMPACT_INSN_ADD_COMPACT; goto extract_sfmt_add_compact; case 61 : itype = SH64_COMPACT_INSN_DMULSL_COMPACT; goto extract_sfmt_dmulsl_compact; case 62 : itype = SH64_COMPACT_INSN_ADDC_COMPACT; goto extract_sfmt_addc_compact; case 63 : itype = SH64_COMPACT_INSN_ADDV_COMPACT; goto extract_sfmt_addv_compact; case 64 :
- {
- unsigned int val = (((insn >> 4) & (3 << 0)));
- switch (val)
- {
- case 0 : itype = SH64_COMPACT_INSN_SHLL_COMPACT; goto extract_sfmt_dt_compact; case 1 : itype = SH64_COMPACT_INSN_DT_COMPACT; goto extract_sfmt_dt_compact; case 2 : itype = SH64_COMPACT_INSN_SHAL_COMPACT; goto extract_sfmt_dt_compact; default : itype = SH64_COMPACT_INSN_X_INVALID; goto extract_sfmt_empty;
- }
- }
- case 65 :
- {
- unsigned int val = (((insn >> 4) & (3 << 0)));
- switch (val)
- {
- case 0 : itype = SH64_COMPACT_INSN_SHLR_COMPACT; goto extract_sfmt_dt_compact; case 1 : itype = SH64_COMPACT_INSN_CMPPZ_COMPACT; goto extract_sfmt_cmppl_compact; case 2 : itype = SH64_COMPACT_INSN_SHAR_COMPACT; goto extract_sfmt_dt_compact; default : itype = SH64_COMPACT_INSN_X_INVALID; goto extract_sfmt_empty;
- }
- }
- case 66 :
- {
- unsigned int val = (((insn >> 4) & (7 << 0)));
- switch (val)
- {
- case 0 : itype = SH64_COMPACT_INSN_STSL_MACH_COMPACT; goto extract_sfmt_stsl_mach_compact; case 1 : itype = SH64_COMPACT_INSN_STSL_MACL_COMPACT; goto extract_sfmt_stsl_macl_compact; case 2 : itype = SH64_COMPACT_INSN_STSL_PR_COMPACT; goto extract_sfmt_stsl_pr_compact; case 5 : itype = SH64_COMPACT_INSN_STSL_FPUL_COMPACT; goto extract_sfmt_stsl_fpul_compact; case 6 : itype = SH64_COMPACT_INSN_STSL_FPSCR_COMPACT; goto extract_sfmt_stsl_fpscr_compact; default : itype = SH64_COMPACT_INSN_X_INVALID; goto extract_sfmt_empty;
- }
- }
- case 67 : itype = SH64_COMPACT_INSN_STCL_GBR_COMPACT; goto extract_sfmt_stcl_gbr_compact; case 68 :
- {
- unsigned int val = (((insn >> 5) & (1 << 0)));
- switch (val)
- {
- case 0 : itype = SH64_COMPACT_INSN_ROTL_COMPACT; goto extract_sfmt_dt_compact; case 1 : itype = SH64_COMPACT_INSN_ROTCL_COMPACT; goto extract_sfmt_rotcl_compact; default : itype = SH64_COMPACT_INSN_X_INVALID; goto extract_sfmt_empty;
- }
- }
- case 69 :
- {
- unsigned int val = (((insn >> 4) & (3 << 0)));
- switch (val)
- {
- case 0 : itype = SH64_COMPACT_INSN_ROTR_COMPACT; goto extract_sfmt_dt_compact; case 1 : itype = SH64_COMPACT_INSN_CMPPL_COMPACT; goto extract_sfmt_cmppl_compact; case 2 : itype = SH64_COMPACT_INSN_ROTCR_COMPACT; goto extract_sfmt_rotcl_compact; default : itype = SH64_COMPACT_INSN_X_INVALID; goto extract_sfmt_empty;
- }
- }
- case 70 :
- {
- unsigned int val = (((insn >> 4) & (7 << 0)));
- switch (val)
- {
- case 0 : itype = SH64_COMPACT_INSN_LDSL_MACH_COMPACT; goto extract_sfmt_ldsl_mach_compact; case 1 : itype = SH64_COMPACT_INSN_LDSL_MACL_COMPACT; goto extract_sfmt_ldsl_macl_compact; case 2 : itype = SH64_COMPACT_INSN_LDSL_PR_COMPACT; goto extract_sfmt_ldsl_pr_compact; case 5 : itype = SH64_COMPACT_INSN_LDSL_FPUL_COMPACT; goto extract_sfmt_ldsl_fpul_compact; case 6 : itype = SH64_COMPACT_INSN_LDSL_FPSCR_COMPACT; goto extract_sfmt_ldsl_fpscr_compact; default : itype = SH64_COMPACT_INSN_X_INVALID; goto extract_sfmt_empty;
- }
- }
- case 71 : itype = SH64_COMPACT_INSN_LDCL_COMPACT; goto extract_sfmt_ldcl_compact; case 72 :
- {
- unsigned int val = (((insn >> 4) & (3 << 0)));
- switch (val)
- {
- case 0 : itype = SH64_COMPACT_INSN_SHLL2_COMPACT; goto extract_sfmt_shll2_compact; case 1 : itype = SH64_COMPACT_INSN_SHLL8_COMPACT; goto extract_sfmt_shll2_compact; case 2 : itype = SH64_COMPACT_INSN_SHLL16_COMPACT; goto extract_sfmt_shll2_compact; default : itype = SH64_COMPACT_INSN_X_INVALID; goto extract_sfmt_empty;
- }
- }
- case 73 :
- {
- unsigned int val = (((insn >> 4) & (3 << 0)));
- switch (val)
- {
- case 0 : itype = SH64_COMPACT_INSN_SHLR2_COMPACT; goto extract_sfmt_shll2_compact; case 1 : itype = SH64_COMPACT_INSN_SHLR8_COMPACT; goto extract_sfmt_shll2_compact; case 2 : itype = SH64_COMPACT_INSN_SHLR16_COMPACT; goto extract_sfmt_shll2_compact; default : itype = SH64_COMPACT_INSN_X_INVALID; goto extract_sfmt_empty;
- }
- }
- case 74 :
- {
- unsigned int val = (((insn >> 4) & (7 << 0)));
- switch (val)
- {
- case 0 : itype = SH64_COMPACT_INSN_LDS_MACH_COMPACT; goto extract_sfmt_lds_mach_compact; case 1 : itype = SH64_COMPACT_INSN_LDS_MACL_COMPACT; goto extract_sfmt_lds_macl_compact; case 2 : itype = SH64_COMPACT_INSN_LDS_PR_COMPACT; goto extract_sfmt_lds_pr_compact; case 5 : itype = SH64_COMPACT_INSN_LDS_FPUL_COMPACT; goto extract_sfmt_lds_fpul_compact; case 6 : itype = SH64_COMPACT_INSN_LDS_FPSCR_COMPACT; goto extract_sfmt_lds_fpscr_compact; default : itype = SH64_COMPACT_INSN_X_INVALID; goto extract_sfmt_empty;
- }
- }
- case 75 :
- {
- unsigned int val = (((insn >> 4) & (3 << 0)));
- switch (val)
- {
- case 0 : itype = SH64_COMPACT_INSN_JSR_COMPACT; goto extract_sfmt_bsrf_compact; case 1 : itype = SH64_COMPACT_INSN_TASB_COMPACT; goto extract_sfmt_tasb_compact; case 2 : itype = SH64_COMPACT_INSN_JMP_COMPACT; goto extract_sfmt_jmp_compact; default : itype = SH64_COMPACT_INSN_X_INVALID; goto extract_sfmt_empty;
- }
- }
- case 76 : itype = SH64_COMPACT_INSN_SHAD_COMPACT; goto extract_sfmt_shad_compact; case 77 : itype = SH64_COMPACT_INSN_SHLD_COMPACT; goto extract_sfmt_shad_compact; case 78 : itype = SH64_COMPACT_INSN_LDC_COMPACT; goto extract_sfmt_ldc_compact; case 79 : itype = SH64_COMPACT_INSN_MACW_COMPACT; goto extract_sfmt_macw_compact; case 80 : /* fall through */
- case 81 : /* fall through */
- case 82 : /* fall through */
- case 83 : /* fall through */
- case 84 : /* fall through */
- case 85 : /* fall through */
- case 86 : /* fall through */
- case 87 : /* fall through */
- case 88 : /* fall through */
- case 89 : /* fall through */
- case 90 : /* fall through */
- case 91 : /* fall through */
- case 92 : /* fall through */
- case 93 : /* fall through */
- case 94 : /* fall through */
- case 95 : itype = SH64_COMPACT_INSN_MOVL11_COMPACT; goto extract_sfmt_movl11_compact; case 96 : itype = SH64_COMPACT_INSN_MOVB6_COMPACT; goto extract_sfmt_movb6_compact; case 97 : itype = SH64_COMPACT_INSN_MOVW6_COMPACT; goto extract_sfmt_movb6_compact; case 98 : itype = SH64_COMPACT_INSN_MOVL6_COMPACT; goto extract_sfmt_movb6_compact; case 99 : itype = SH64_COMPACT_INSN_MOV_COMPACT; goto extract_sfmt_mov_compact; case 100 : itype = SH64_COMPACT_INSN_MOVB7_COMPACT; goto extract_sfmt_movb7_compact; case 101 : itype = SH64_COMPACT_INSN_MOVW7_COMPACT; goto extract_sfmt_movb7_compact; case 102 : itype = SH64_COMPACT_INSN_MOVL7_COMPACT; goto extract_sfmt_movl7_compact; case 103 : itype = SH64_COMPACT_INSN_NOT_COMPACT; goto extract_sfmt_mov_compact; case 104 : itype = SH64_COMPACT_INSN_SWAPB_COMPACT; goto extract_sfmt_extsb_compact; case 105 : itype = SH64_COMPACT_INSN_SWAPW_COMPACT; goto extract_sfmt_extsb_compact; case 106 : itype = SH64_COMPACT_INSN_NEGC_COMPACT; goto extract_sfmt_negc_compact; case 107 : itype = SH64_COMPACT_INSN_NEG_COMPACT; goto extract_sfmt_extsb_compact; case 108 : itype = SH64_COMPACT_INSN_EXTUB_COMPACT; goto extract_sfmt_extsb_compact; case 109 : itype = SH64_COMPACT_INSN_EXTUW_COMPACT; goto extract_sfmt_extsb_compact; case 110 : itype = SH64_COMPACT_INSN_EXTSB_COMPACT; goto extract_sfmt_extsb_compact; case 111 : itype = SH64_COMPACT_INSN_EXTSW_COMPACT; goto extract_sfmt_extsb_compact; case 112 : /* fall through */
- case 113 : /* fall through */
- case 114 : /* fall through */
- case 115 : /* fall through */
- case 116 : /* fall through */
- case 117 : /* fall through */
- case 118 : /* fall through */
- case 119 : /* fall through */
- case 120 : /* fall through */
- case 121 : /* fall through */
- case 122 : /* fall through */
- case 123 : /* fall through */
- case 124 : /* fall through */
- case 125 : /* fall through */
- case 126 : /* fall through */
- case 127 : itype = SH64_COMPACT_INSN_ADDI_COMPACT; goto extract_sfmt_addi_compact; case 128 : /* fall through */
- case 129 : /* fall through */
- case 130 : /* fall through */
- case 131 : /* fall through */
- case 132 : /* fall through */
- case 133 : /* fall through */
- case 134 : /* fall through */
- case 135 : /* fall through */
- case 136 : /* fall through */
- case 137 : /* fall through */
- case 138 : /* fall through */
- case 139 : /* fall through */
- case 140 : /* fall through */
- case 141 : /* fall through */
- case 142 : /* fall through */
- case 143 :
- {
- unsigned int val = (((insn >> 8) & (15 << 0)));
- switch (val)
- {
- case 0 : itype = SH64_COMPACT_INSN_MOVB5_COMPACT; goto extract_sfmt_movb5_compact; case 1 : itype = SH64_COMPACT_INSN_MOVW5_COMPACT; goto extract_sfmt_movw5_compact; case 4 : itype = SH64_COMPACT_INSN_MOVB10_COMPACT; goto extract_sfmt_movb10_compact; case 5 : itype = SH64_COMPACT_INSN_MOVW11_COMPACT; goto extract_sfmt_movw11_compact; case 8 : itype = SH64_COMPACT_INSN_CMPEQI_COMPACT; goto extract_sfmt_cmpeqi_compact; case 9 : itype = SH64_COMPACT_INSN_BT_COMPACT; goto extract_sfmt_bf_compact; case 11 : itype = SH64_COMPACT_INSN_BF_COMPACT; goto extract_sfmt_bf_compact; case 13 : itype = SH64_COMPACT_INSN_BTS_COMPACT; goto extract_sfmt_bf_compact; case 15 : itype = SH64_COMPACT_INSN_BFS_COMPACT; goto extract_sfmt_bf_compact; default : itype = SH64_COMPACT_INSN_X_INVALID; goto extract_sfmt_empty;
- }
- }
- case 144 : /* fall through */
- case 145 : /* fall through */
- case 146 : /* fall through */
- case 147 : /* fall through */
- case 148 : /* fall through */
- case 149 : /* fall through */
- case 150 : /* fall through */
- case 151 : /* fall through */
- case 152 : /* fall through */
- case 153 : /* fall through */
- case 154 : /* fall through */
- case 155 : /* fall through */
- case 156 : /* fall through */
- case 157 : /* fall through */
- case 158 : /* fall through */
- case 159 : itype = SH64_COMPACT_INSN_MOVW10_COMPACT; goto extract_sfmt_movw10_compact; case 160 : /* fall through */
- case 161 : /* fall through */
- case 162 : /* fall through */
- case 163 : /* fall through */
- case 164 : /* fall through */
- case 165 : /* fall through */
- case 166 : /* fall through */
- case 167 : /* fall through */
- case 168 : /* fall through */
- case 169 : /* fall through */
- case 170 : /* fall through */
- case 171 : /* fall through */
- case 172 : /* fall through */
- case 173 : /* fall through */
- case 174 : /* fall through */
- case 175 : itype = SH64_COMPACT_INSN_BRA_COMPACT; goto extract_sfmt_bra_compact; case 176 : /* fall through */
- case 177 : /* fall through */
- case 178 : /* fall through */
- case 179 : /* fall through */
- case 180 : /* fall through */
- case 181 : /* fall through */
- case 182 : /* fall through */
- case 183 : /* fall through */
- case 184 : /* fall through */
- case 185 : /* fall through */
- case 186 : /* fall through */
- case 187 : /* fall through */
- case 188 : /* fall through */
- case 189 : /* fall through */
- case 190 : /* fall through */
- case 191 : itype = SH64_COMPACT_INSN_BSR_COMPACT; goto extract_sfmt_bsr_compact; case 192 : /* fall through */
- case 193 : /* fall through */
- case 194 : /* fall through */
- case 195 : /* fall through */
- case 196 : /* fall through */
- case 197 : /* fall through */
- case 198 : /* fall through */
- case 199 : /* fall through */
- case 200 : /* fall through */
- case 201 : /* fall through */
- case 202 : /* fall through */
- case 203 : /* fall through */
- case 204 : /* fall through */
- case 205 : /* fall through */
- case 206 : /* fall through */
- case 207 :
- {
- unsigned int val = (((insn >> 8) & (15 << 0)));
- switch (val)
- {
- case 0 : itype = SH64_COMPACT_INSN_MOVB4_COMPACT; goto extract_sfmt_movb4_compact; case 1 : itype = SH64_COMPACT_INSN_MOVW4_COMPACT; goto extract_sfmt_movw4_compact; case 2 : itype = SH64_COMPACT_INSN_MOVL4_COMPACT; goto extract_sfmt_movl4_compact; case 3 : itype = SH64_COMPACT_INSN_TRAPA_COMPACT; goto extract_sfmt_trapa_compact; case 4 : itype = SH64_COMPACT_INSN_MOVB9_COMPACT; goto extract_sfmt_movb9_compact; case 5 : itype = SH64_COMPACT_INSN_MOVW9_COMPACT; goto extract_sfmt_movw9_compact; case 6 : itype = SH64_COMPACT_INSN_MOVL9_COMPACT; goto extract_sfmt_movl9_compact; case 7 : itype = SH64_COMPACT_INSN_MOVA_COMPACT; goto extract_sfmt_mova_compact; case 8 : itype = SH64_COMPACT_INSN_TSTI_COMPACT; goto extract_sfmt_tsti_compact; case 9 : itype = SH64_COMPACT_INSN_ANDI_COMPACT; goto extract_sfmt_andi_compact; case 10 : itype = SH64_COMPACT_INSN_XORI_COMPACT; goto extract_sfmt_xori_compact; case 11 : itype = SH64_COMPACT_INSN_ORI_COMPACT; goto extract_sfmt_andi_compact; case 12 : itype = SH64_COMPACT_INSN_TSTB_COMPACT; goto extract_sfmt_tstb_compact; case 13 : itype = SH64_COMPACT_INSN_ANDB_COMPACT; goto extract_sfmt_andb_compact; case 14 : itype = SH64_COMPACT_INSN_XORB_COMPACT; goto extract_sfmt_andb_compact; case 15 : itype = SH64_COMPACT_INSN_ORB_COMPACT; goto extract_sfmt_andb_compact; default : itype = SH64_COMPACT_INSN_X_INVALID; goto extract_sfmt_empty;
- }
- }
- case 208 : /* fall through */
- case 209 : /* fall through */
- case 210 : /* fall through */
- case 211 : /* fall through */
- case 212 : /* fall through */
- case 213 : /* fall through */
- case 214 : /* fall through */
- case 215 : /* fall through */
- case 216 : /* fall through */
- case 217 : /* fall through */
- case 218 : /* fall through */
- case 219 : /* fall through */
- case 220 : /* fall through */
- case 221 : /* fall through */
- case 222 : /* fall through */
- case 223 : itype = SH64_COMPACT_INSN_MOVL10_COMPACT; goto extract_sfmt_movl10_compact; case 224 : /* fall through */
- case 225 : /* fall through */
- case 226 : /* fall through */
- case 227 : /* fall through */
- case 228 : /* fall through */
- case 229 : /* fall through */
- case 230 : /* fall through */
- case 231 : /* fall through */
- case 232 : /* fall through */
- case 233 : /* fall through */
- case 234 : /* fall through */
- case 235 : /* fall through */
- case 236 : /* fall through */
- case 237 : /* fall through */
- case 238 : /* fall through */
- case 239 : itype = SH64_COMPACT_INSN_MOVI_COMPACT; goto extract_sfmt_movi_compact; case 240 : itype = SH64_COMPACT_INSN_FADD_COMPACT; goto extract_sfmt_fadd_compact; case 241 : itype = SH64_COMPACT_INSN_FSUB_COMPACT; goto extract_sfmt_fadd_compact; case 242 : itype = SH64_COMPACT_INSN_FMUL_COMPACT; goto extract_sfmt_fadd_compact; case 243 : itype = SH64_COMPACT_INSN_FDIV_COMPACT; goto extract_sfmt_fadd_compact; case 244 : itype = SH64_COMPACT_INSN_FCMPEQ_COMPACT; goto extract_sfmt_fcmpeq_compact; case 245 : itype = SH64_COMPACT_INSN_FCMPGT_COMPACT; goto extract_sfmt_fcmpeq_compact; case 246 : itype = SH64_COMPACT_INSN_FMOV4_COMPACT; goto extract_sfmt_fmov4_compact; case 247 : itype = SH64_COMPACT_INSN_FMOV7_COMPACT; goto extract_sfmt_fmov7_compact; case 248 : itype = SH64_COMPACT_INSN_FMOV2_COMPACT; goto extract_sfmt_fmov2_compact; case 249 : itype = SH64_COMPACT_INSN_FMOV3_COMPACT; goto extract_sfmt_fmov3_compact; case 250 : itype = SH64_COMPACT_INSN_FMOV5_COMPACT; goto extract_sfmt_fmov5_compact; case 251 : itype = SH64_COMPACT_INSN_FMOV6_COMPACT; goto extract_sfmt_fmov6_compact; case 252 : itype = SH64_COMPACT_INSN_FMOV1_COMPACT; goto extract_sfmt_fmov1_compact; case 253 :
- {
- unsigned int val = (((insn >> 4) & (15 << 0)));
- switch (val)
- {
- case 0 : itype = SH64_COMPACT_INSN_FSTS_COMPACT; goto extract_sfmt_fsts_compact; case 1 : itype = SH64_COMPACT_INSN_FLDS_COMPACT; goto extract_sfmt_flds_compact; case 2 : itype = SH64_COMPACT_INSN_FLOAT_COMPACT; goto extract_sfmt_float_compact; case 3 : itype = SH64_COMPACT_INSN_FTRC_COMPACT; goto extract_sfmt_ftrc_compact; case 4 : itype = SH64_COMPACT_INSN_FNEG_COMPACT; goto extract_sfmt_fabs_compact; case 5 : itype = SH64_COMPACT_INSN_FABS_COMPACT; goto extract_sfmt_fabs_compact; case 6 : itype = SH64_COMPACT_INSN_FSQRT_COMPACT; goto extract_sfmt_fabs_compact; case 8 : itype = SH64_COMPACT_INSN_FLDI0_COMPACT; goto extract_sfmt_fldi0_compact; case 9 : itype = SH64_COMPACT_INSN_FLDI1_COMPACT; goto extract_sfmt_fldi0_compact; case 10 : itype = SH64_COMPACT_INSN_FCNVSD_COMPACT; goto extract_sfmt_fcnvsd_compact; case 11 : itype = SH64_COMPACT_INSN_FCNVDS_COMPACT; goto extract_sfmt_fcnvds_compact; case 14 : itype = SH64_COMPACT_INSN_FIPR_COMPACT; goto extract_sfmt_fipr_compact; case 15 :
- {
- unsigned int val = (((insn >> 9) & (1 << 0)));
- switch (val)
- {
- case 0 : itype = SH64_COMPACT_INSN_FTRV_COMPACT; goto extract_sfmt_ftrv_compact; case 1 :
- {
- unsigned int val = (((insn >> 11) & (1 << 0)));
- switch (val)
- {
- case 0 : itype = SH64_COMPACT_INSN_FSCHG_COMPACT; goto extract_sfmt_fschg_compact; case 1 : itype = SH64_COMPACT_INSN_FRCHG_COMPACT; goto extract_sfmt_frchg_compact; default : itype = SH64_COMPACT_INSN_X_INVALID; goto extract_sfmt_empty;
- }
- }
- default : itype = SH64_COMPACT_INSN_X_INVALID; goto extract_sfmt_empty;
- }
- }
- default : itype = SH64_COMPACT_INSN_X_INVALID; goto extract_sfmt_empty;
- }
- }
- case 254 : itype = SH64_COMPACT_INSN_FMAC_COMPACT; goto extract_sfmt_fmac_compact; default : itype = SH64_COMPACT_INSN_X_INVALID; goto extract_sfmt_empty;
- }
- }
- }
-
- /* The instruction has been decoded, now extract the fields. */
-
- extract_sfmt_empty:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
-#define FLD(f) abuf->fields.fmt_empty.f
-
-
- /* Record the fields for the semantic handler. */
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_empty", (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_add_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- UINT f_rn;
- UINT f_rm;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rm) = f_rm;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_add_compact", "f_rm 0x%x", 'x', f_rm, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_addi_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- UINT f_rn;
- UINT f_imm8;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_imm8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8);
-
- /* Record the fields for the semantic handler. */
- FLD (f_imm8) = f_imm8;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addi_compact", "f_imm8 0x%x", 'x', f_imm8, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_addc_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- UINT f_rn;
- UINT f_rm;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rm) = f_rm;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addc_compact", "f_rm 0x%x", 'x', f_rm, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_addv_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- UINT f_rn;
- UINT f_rm;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rm) = f_rm;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addv_compact", "f_rm 0x%x", 'x', f_rm, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_and_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- UINT f_rn;
- UINT f_rm;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rm) = f_rm;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_and_compact", "f_rm 0x%x", 'x', f_rm, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_andi_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- UINT f_imm8;
-
- f_imm8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8);
-
- /* Record the fields for the semantic handler. */
- FLD (f_imm8) = f_imm8;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_andi_compact", "f_imm8 0x%x", 'x', f_imm8, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_andb_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- UINT f_imm8;
-
- f_imm8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8);
-
- /* Record the fields for the semantic handler. */
- FLD (f_imm8) = f_imm8;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_andb_compact", "f_imm8 0x%x", 'x', f_imm8, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_bf_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_bf_compact.f
- SI f_disp8;
-
- f_disp8 = ((((EXTRACT_LSB0_INT (insn, 16, 7, 8)) << (1))) + (((pc) + (4))));
-
- /* Record the fields for the semantic handler. */
- FLD (i_disp8) = f_disp8;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bf_compact", "disp8 0x%x", 'x', f_disp8, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_bra_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_bra_compact.f
- SI f_disp12;
-
- f_disp12 = ((((EXTRACT_LSB0_INT (insn, 16, 11, 12)) << (1))) + (((pc) + (4))));
-
- /* Record the fields for the semantic handler. */
- FLD (i_disp12) = f_disp12;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bra_compact", "disp12 0x%x", 'x', f_disp12, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_braf_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_braf_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_brk_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
-#define FLD(f) abuf->fields.fmt_empty.f
-
-
- /* Record the fields for the semantic handler. */
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_brk_compact", (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_bsr_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_bra_compact.f
- SI f_disp12;
-
- f_disp12 = ((((EXTRACT_LSB0_INT (insn, 16, 11, 12)) << (1))) + (((pc) + (4))));
-
- /* Record the fields for the semantic handler. */
- FLD (i_disp12) = f_disp12;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bsr_compact", "disp12 0x%x", 'x', f_disp12, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_bsrf_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bsrf_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_clrmac_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
-#define FLD(f) abuf->fields.fmt_empty.f
-
-
- /* Record the fields for the semantic handler. */
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_clrmac_compact", (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_clrs_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
-#define FLD(f) abuf->fields.fmt_empty.f
-
-
- /* Record the fields for the semantic handler. */
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_clrs_compact", (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_clrt_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
-#define FLD(f) abuf->fields.fmt_empty.f
-
-
- /* Record the fields for the semantic handler. */
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_clrt_compact", (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_cmpeq_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- UINT f_rn;
- UINT f_rm;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rm) = f_rm;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmpeq_compact", "f_rm 0x%x", 'x', f_rm, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_cmpeqi_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- UINT f_imm8;
-
- f_imm8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8);
-
- /* Record the fields for the semantic handler. */
- FLD (f_imm8) = f_imm8;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmpeqi_compact", "f_imm8 0x%x", 'x', f_imm8, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_cmppl_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmppl_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_div0s_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- UINT f_rn;
- UINT f_rm;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rm) = f_rm;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_div0s_compact", "f_rm 0x%x", 'x', f_rm, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_div0u_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
-#define FLD(f) abuf->fields.fmt_empty.f
-
-
- /* Record the fields for the semantic handler. */
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_div0u_compact", (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_div1_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- UINT f_rn;
- UINT f_rm;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rm) = f_rm;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_div1_compact", "f_rm 0x%x", 'x', f_rm, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_dmulsl_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- UINT f_rn;
- UINT f_rm;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rm) = f_rm;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmulsl_compact", "f_rm 0x%x", 'x', f_rm, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_dt_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dt_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_extsb_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- UINT f_rn;
- UINT f_rm;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rm) = f_rm;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_extsb_compact", "f_rm 0x%x", 'x', f_rm, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fabs_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fabs_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fadd_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- UINT f_rn;
- UINT f_rm;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rm) = f_rm;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fadd_compact", "f_rm 0x%x", 'x', f_rm, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fcmpeq_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- UINT f_rn;
- UINT f_rm;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rm) = f_rm;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fcmpeq_compact", "f_rm 0x%x", 'x', f_rm, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fcnvds_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_fcnvds_compact.f
- SI f_dn;
-
- f_dn = ((EXTRACT_LSB0_UINT (insn, 16, 11, 3)) << (1));
-
- /* Record the fields for the semantic handler. */
- FLD (f_dn) = f_dn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fcnvds_compact", "f_dn 0x%x", 'x', f_dn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fcnvsd_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_fcnvds_compact.f
- SI f_dn;
-
- f_dn = ((EXTRACT_LSB0_UINT (insn, 16, 11, 3)) << (1));
-
- /* Record the fields for the semantic handler. */
- FLD (f_dn) = f_dn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fcnvsd_compact", "f_dn 0x%x", 'x', f_dn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fipr_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_fipr_compact.f
- SI f_vn;
- SI f_vm;
-
- f_vn = ((EXTRACT_LSB0_UINT (insn, 16, 11, 2)) << (2));
- f_vm = ((EXTRACT_LSB0_UINT (insn, 16, 9, 2)) << (2));
-
- /* Record the fields for the semantic handler. */
- FLD (f_vm) = f_vm;
- FLD (f_vn) = f_vn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fipr_compact", "f_vm 0x%x", 'x', f_vm, "f_vn 0x%x", 'x', f_vn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_flds_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_flds_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fldi0_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fldi0_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_float_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_float_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fmac_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- UINT f_rn;
- UINT f_rm;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rm) = f_rm;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fmac_compact", "f_rm 0x%x", 'x', f_rm, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fmov1_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- UINT f_rn;
- UINT f_rm;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rm) = f_rm;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fmov1_compact", "f_rm 0x%x", 'x', f_rm, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fmov2_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- UINT f_rn;
- UINT f_rm;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- FLD (f_rm) = f_rm;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fmov2_compact", "f_rn 0x%x", 'x', f_rn, "f_rm 0x%x", 'x', f_rm, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fmov3_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- UINT f_rn;
- UINT f_rm;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- FLD (f_rm) = f_rm;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fmov3_compact", "f_rn 0x%x", 'x', f_rn, "f_rm 0x%x", 'x', f_rm, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fmov4_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- UINT f_rn;
- UINT f_rm;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- FLD (f_rm) = f_rm;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fmov4_compact", "f_rn 0x%x", 'x', f_rn, "f_rm 0x%x", 'x', f_rm, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fmov5_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- UINT f_rn;
- UINT f_rm;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rm) = f_rm;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fmov5_compact", "f_rm 0x%x", 'x', f_rm, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fmov6_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- UINT f_rn;
- UINT f_rm;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rm) = f_rm;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fmov6_compact", "f_rm 0x%x", 'x', f_rm, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fmov7_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- UINT f_rn;
- UINT f_rm;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rm) = f_rm;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fmov7_compact", "f_rm 0x%x", 'x', f_rm, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_frchg_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
-#define FLD(f) abuf->fields.fmt_empty.f
-
-
- /* Record the fields for the semantic handler. */
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_frchg_compact", (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fschg_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
-#define FLD(f) abuf->fields.fmt_empty.f
-
-
- /* Record the fields for the semantic handler. */
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fschg_compact", (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fsts_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fsts_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_ftrc_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ftrc_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_ftrv_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_fipr_compact.f
- SI f_vn;
-
- f_vn = ((EXTRACT_LSB0_UINT (insn, 16, 11, 2)) << (2));
-
- /* Record the fields for the semantic handler. */
- FLD (f_vn) = f_vn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ftrv_compact", "f_vn 0x%x", 'x', f_vn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_jmp_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_jmp_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_ldc_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldc_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_ldcl_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldcl_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_lds_fpscr_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lds_fpscr_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_ldsl_fpscr_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldsl_fpscr_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_lds_fpul_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lds_fpul_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_ldsl_fpul_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldsl_fpul_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_lds_mach_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lds_mach_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_ldsl_mach_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldsl_mach_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_lds_macl_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lds_macl_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_ldsl_macl_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldsl_macl_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_lds_pr_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lds_pr_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_ldsl_pr_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldsl_pr_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_macl_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- UINT f_rn;
- UINT f_rm;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rm) = f_rm;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_macl_compact", "f_rm 0x%x", 'x', f_rm, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_macw_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- UINT f_rn;
- UINT f_rm;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rm) = f_rm;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_macw_compact", "f_rm 0x%x", 'x', f_rm, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_mov_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- UINT f_rn;
- UINT f_rm;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rm) = f_rm;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mov_compact", "f_rm 0x%x", 'x', f_rm, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_movi_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- UINT f_rn;
- UINT f_imm8;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_imm8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8);
-
- /* Record the fields for the semantic handler. */
- FLD (f_imm8) = f_imm8;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movi_compact", "f_imm8 0x%x", 'x', f_imm8, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_movb1_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- UINT f_rn;
- UINT f_rm;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rm) = f_rm;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movb1_compact", "f_rm 0x%x", 'x', f_rm, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_movb2_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- UINT f_rn;
- UINT f_rm;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rm) = f_rm;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movb2_compact", "f_rm 0x%x", 'x', f_rm, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_movb3_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- UINT f_rn;
- UINT f_rm;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rm) = f_rm;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movb3_compact", "f_rm 0x%x", 'x', f_rm, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_movb4_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- UINT f_imm8;
-
- f_imm8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8);
-
- /* Record the fields for the semantic handler. */
- FLD (f_imm8) = f_imm8;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movb4_compact", "f_imm8 0x%x", 'x', f_imm8, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_movb5_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movb5_compact.f
- UINT f_rm;
- UINT f_imm4;
-
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
- f_imm4 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_imm4) = f_imm4;
- FLD (f_rm) = f_rm;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movb5_compact", "f_imm4 0x%x", 'x', f_imm4, "f_rm 0x%x", 'x', f_rm, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_movb6_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- UINT f_rn;
- UINT f_rm;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rm) = f_rm;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movb6_compact", "f_rm 0x%x", 'x', f_rm, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_movb7_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- UINT f_rn;
- UINT f_rm;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rm) = f_rm;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movb7_compact", "f_rm 0x%x", 'x', f_rm, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_movb8_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- UINT f_rn;
- UINT f_rm;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rm) = f_rm;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movb8_compact", "f_rm 0x%x", 'x', f_rm, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_movb9_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- UINT f_imm8;
-
- f_imm8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8);
-
- /* Record the fields for the semantic handler. */
- FLD (f_imm8) = f_imm8;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movb9_compact", "f_imm8 0x%x", 'x', f_imm8, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_movb10_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movb5_compact.f
- UINT f_rm;
- UINT f_imm4;
-
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
- f_imm4 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_imm4) = f_imm4;
- FLD (f_rm) = f_rm;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movb10_compact", "f_imm4 0x%x", 'x', f_imm4, "f_rm 0x%x", 'x', f_rm, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_movl4_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl10_compact.f
- SI f_imm8x4;
-
- f_imm8x4 = ((EXTRACT_LSB0_UINT (insn, 16, 7, 8)) << (2));
-
- /* Record the fields for the semantic handler. */
- FLD (f_imm8x4) = f_imm8x4;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movl4_compact", "f_imm8x4 0x%x", 'x', f_imm8x4, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_movl5_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- UINT f_rn;
- UINT f_rm;
- SI f_imm4x4;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
- f_imm4x4 = ((EXTRACT_LSB0_UINT (insn, 16, 3, 4)) << (2));
-
- /* Record the fields for the semantic handler. */
- FLD (f_imm4x4) = f_imm4x4;
- FLD (f_rm) = f_rm;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movl5_compact", "f_imm4x4 0x%x", 'x', f_imm4x4, "f_rm 0x%x", 'x', f_rm, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_movl7_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- UINT f_rn;
- UINT f_rm;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rm) = f_rm;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movl7_compact", "f_rm 0x%x", 'x', f_rm, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_movl9_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl10_compact.f
- SI f_imm8x4;
-
- f_imm8x4 = ((EXTRACT_LSB0_UINT (insn, 16, 7, 8)) << (2));
-
- /* Record the fields for the semantic handler. */
- FLD (f_imm8x4) = f_imm8x4;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movl9_compact", "f_imm8x4 0x%x", 'x', f_imm8x4, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_movl10_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl10_compact.f
- UINT f_rn;
- SI f_imm8x4;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_imm8x4 = ((EXTRACT_LSB0_UINT (insn, 16, 7, 8)) << (2));
-
- /* Record the fields for the semantic handler. */
- FLD (f_imm8x4) = f_imm8x4;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movl10_compact", "f_imm8x4 0x%x", 'x', f_imm8x4, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_movl11_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- UINT f_rn;
- UINT f_rm;
- SI f_imm4x4;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
- f_imm4x4 = ((EXTRACT_LSB0_UINT (insn, 16, 3, 4)) << (2));
-
- /* Record the fields for the semantic handler. */
- FLD (f_imm4x4) = f_imm4x4;
- FLD (f_rm) = f_rm;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movl11_compact", "f_imm4x4 0x%x", 'x', f_imm4x4, "f_rm 0x%x", 'x', f_rm, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_movw4_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- SI f_imm8x2;
-
- f_imm8x2 = ((EXTRACT_LSB0_UINT (insn, 16, 7, 8)) << (1));
-
- /* Record the fields for the semantic handler. */
- FLD (f_imm8x2) = f_imm8x2;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movw4_compact", "f_imm8x2 0x%x", 'x', f_imm8x2, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_movw5_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw5_compact.f
- UINT f_rn;
- SI f_imm4x2;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_imm4x2 = ((EXTRACT_LSB0_UINT (insn, 16, 3, 4)) << (1));
-
- /* Record the fields for the semantic handler. */
- FLD (f_imm4x2) = f_imm4x2;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movw5_compact", "f_imm4x2 0x%x", 'x', f_imm4x2, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_movw9_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- SI f_imm8x2;
-
- f_imm8x2 = ((EXTRACT_LSB0_UINT (insn, 16, 7, 8)) << (1));
-
- /* Record the fields for the semantic handler. */
- FLD (f_imm8x2) = f_imm8x2;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movw9_compact", "f_imm8x2 0x%x", 'x', f_imm8x2, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_movw10_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
- SI f_imm8x2;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_imm8x2 = ((EXTRACT_LSB0_UINT (insn, 16, 7, 8)) << (1));
-
- /* Record the fields for the semantic handler. */
- FLD (f_imm8x2) = f_imm8x2;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movw10_compact", "f_imm8x2 0x%x", 'x', f_imm8x2, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_movw11_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw11_compact.f
- UINT f_rm;
- SI f_imm4x2;
-
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
- f_imm4x2 = ((EXTRACT_LSB0_UINT (insn, 16, 3, 4)) << (1));
-
- /* Record the fields for the semantic handler. */
- FLD (f_imm4x2) = f_imm4x2;
- FLD (f_rm) = f_rm;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movw11_compact", "f_imm4x2 0x%x", 'x', f_imm4x2, "f_rm 0x%x", 'x', f_rm, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_mova_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl10_compact.f
- SI f_imm8x4;
-
- f_imm8x4 = ((EXTRACT_LSB0_UINT (insn, 16, 7, 8)) << (2));
-
- /* Record the fields for the semantic handler. */
- FLD (f_imm8x4) = f_imm8x4;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mova_compact", "f_imm8x4 0x%x", 'x', f_imm8x4, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_movcal_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movcal_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_movt_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movt_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_mull_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- UINT f_rn;
- UINT f_rm;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rm) = f_rm;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mull_compact", "f_rm 0x%x", 'x', f_rm, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_negc_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- UINT f_rn;
- UINT f_rm;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rm) = f_rm;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_negc_compact", "f_rm 0x%x", 'x', f_rm, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_nop_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
-#define FLD(f) abuf->fields.fmt_empty.f
-
-
- /* Record the fields for the semantic handler. */
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_nop_compact", (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_rotcl_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_rotcl_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_rts_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
-#define FLD(f) abuf->fields.fmt_empty.f
-
-
- /* Record the fields for the semantic handler. */
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_rts_compact", (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_shad_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- UINT f_rn;
- UINT f_rm;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rm) = f_rm;
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_shad_compact", "f_rm 0x%x", 'x', f_rm, "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_shll2_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_shll2_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_stc_gbr_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stc_gbr_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_stcl_gbr_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stcl_gbr_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_sts_fpscr_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sts_fpscr_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_stsl_fpscr_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stsl_fpscr_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_sts_fpul_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sts_fpul_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_stsl_fpul_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stsl_fpul_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_sts_mach_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sts_mach_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_stsl_mach_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stsl_mach_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_sts_macl_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sts_macl_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_stsl_macl_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stsl_macl_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_sts_pr_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sts_pr_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_stsl_pr_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stsl_pr_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_tasb_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- UINT f_rn;
-
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4);
-
- /* Record the fields for the semantic handler. */
- FLD (f_rn) = f_rn;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_tasb_compact", "f_rn 0x%x", 'x', f_rn, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_trapa_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- UINT f_imm8;
-
- f_imm8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8);
-
- /* Record the fields for the semantic handler. */
- FLD (f_imm8) = f_imm8;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_trapa_compact", "f_imm8 0x%x", 'x', f_imm8, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_tsti_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- UINT f_imm8;
-
- f_imm8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8);
-
- /* Record the fields for the semantic handler. */
- FLD (f_imm8) = f_imm8;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_tsti_compact", "f_imm8 0x%x", 'x', f_imm8, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_tstb_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- UINT f_imm8;
-
- f_imm8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8);
-
- /* Record the fields for the semantic handler. */
- FLD (f_imm8) = f_imm8;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_tstb_compact", "f_imm8 0x%x", 'x', f_imm8, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_xori_compact:
- {
- const IDESC *idesc = &sh64_compact_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- UINT f_imm8;
-
- f_imm8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8);
-
- /* Record the fields for the semantic handler. */
- FLD (f_imm8) = f_imm8;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_xori_compact", "f_imm8 0x%x", 'x', f_imm8, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
-}
diff --git a/sim/sh64/decode-compact.h b/sim/sh64/decode-compact.h
deleted file mode 100644
index 8ca92a9d05d..00000000000
--- a/sim/sh64/decode-compact.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/* Decode header for sh64_compact.
-
-THIS FILE IS MACHINE GENERATED WITH CGEN.
-
-Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
-
-This file is part of the GNU Simulators.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-
-#ifndef SH64_COMPACT_DECODE_H
-#define SH64_COMPACT_DECODE_H
-
-extern const IDESC *sh64_compact_decode (SIM_CPU *, IADDR,
- CGEN_INSN_INT, CGEN_INSN_INT,
- ARGBUF *);
-extern void sh64_compact_init_idesc_table (SIM_CPU *);
-extern void sh64_compact_sem_init_idesc_table (SIM_CPU *);
-extern void sh64_compact_semf_init_idesc_table (SIM_CPU *);
-
-/* Enum declaration for instructions in cpu family sh64. */
-typedef enum sh64_compact_insn_type {
- SH64_COMPACT_INSN_X_INVALID, SH64_COMPACT_INSN_X_AFTER, SH64_COMPACT_INSN_X_BEFORE, SH64_COMPACT_INSN_X_CTI_CHAIN
- , SH64_COMPACT_INSN_X_CHAIN, SH64_COMPACT_INSN_X_BEGIN, SH64_COMPACT_INSN_ADD_COMPACT, SH64_COMPACT_INSN_ADDI_COMPACT
- , SH64_COMPACT_INSN_ADDC_COMPACT, SH64_COMPACT_INSN_ADDV_COMPACT, SH64_COMPACT_INSN_AND_COMPACT, SH64_COMPACT_INSN_ANDI_COMPACT
- , SH64_COMPACT_INSN_ANDB_COMPACT, SH64_COMPACT_INSN_BF_COMPACT, SH64_COMPACT_INSN_BFS_COMPACT, SH64_COMPACT_INSN_BRA_COMPACT
- , SH64_COMPACT_INSN_BRAF_COMPACT, SH64_COMPACT_INSN_BRK_COMPACT, SH64_COMPACT_INSN_BSR_COMPACT, SH64_COMPACT_INSN_BSRF_COMPACT
- , SH64_COMPACT_INSN_BT_COMPACT, SH64_COMPACT_INSN_BTS_COMPACT, SH64_COMPACT_INSN_CLRMAC_COMPACT, SH64_COMPACT_INSN_CLRS_COMPACT
- , SH64_COMPACT_INSN_CLRT_COMPACT, SH64_COMPACT_INSN_CMPEQ_COMPACT, SH64_COMPACT_INSN_CMPEQI_COMPACT, SH64_COMPACT_INSN_CMPGE_COMPACT
- , SH64_COMPACT_INSN_CMPGT_COMPACT, SH64_COMPACT_INSN_CMPHI_COMPACT, SH64_COMPACT_INSN_CMPHS_COMPACT, SH64_COMPACT_INSN_CMPPL_COMPACT
- , SH64_COMPACT_INSN_CMPPZ_COMPACT, SH64_COMPACT_INSN_CMPSTR_COMPACT, SH64_COMPACT_INSN_DIV0S_COMPACT, SH64_COMPACT_INSN_DIV0U_COMPACT
- , SH64_COMPACT_INSN_DIV1_COMPACT, SH64_COMPACT_INSN_DMULSL_COMPACT, SH64_COMPACT_INSN_DMULUL_COMPACT, SH64_COMPACT_INSN_DT_COMPACT
- , SH64_COMPACT_INSN_EXTSB_COMPACT, SH64_COMPACT_INSN_EXTSW_COMPACT, SH64_COMPACT_INSN_EXTUB_COMPACT, SH64_COMPACT_INSN_EXTUW_COMPACT
- , SH64_COMPACT_INSN_FABS_COMPACT, SH64_COMPACT_INSN_FADD_COMPACT, SH64_COMPACT_INSN_FCMPEQ_COMPACT, SH64_COMPACT_INSN_FCMPGT_COMPACT
- , SH64_COMPACT_INSN_FCNVDS_COMPACT, SH64_COMPACT_INSN_FCNVSD_COMPACT, SH64_COMPACT_INSN_FDIV_COMPACT, SH64_COMPACT_INSN_FIPR_COMPACT
- , SH64_COMPACT_INSN_FLDS_COMPACT, SH64_COMPACT_INSN_FLDI0_COMPACT, SH64_COMPACT_INSN_FLDI1_COMPACT, SH64_COMPACT_INSN_FLOAT_COMPACT
- , SH64_COMPACT_INSN_FMAC_COMPACT, SH64_COMPACT_INSN_FMOV1_COMPACT, SH64_COMPACT_INSN_FMOV2_COMPACT, SH64_COMPACT_INSN_FMOV3_COMPACT
- , SH64_COMPACT_INSN_FMOV4_COMPACT, SH64_COMPACT_INSN_FMOV5_COMPACT, SH64_COMPACT_INSN_FMOV6_COMPACT, SH64_COMPACT_INSN_FMOV7_COMPACT
- , SH64_COMPACT_INSN_FMUL_COMPACT, SH64_COMPACT_INSN_FNEG_COMPACT, SH64_COMPACT_INSN_FRCHG_COMPACT, SH64_COMPACT_INSN_FSCHG_COMPACT
- , SH64_COMPACT_INSN_FSQRT_COMPACT, SH64_COMPACT_INSN_FSTS_COMPACT, SH64_COMPACT_INSN_FSUB_COMPACT, SH64_COMPACT_INSN_FTRC_COMPACT
- , SH64_COMPACT_INSN_FTRV_COMPACT, SH64_COMPACT_INSN_JMP_COMPACT, SH64_COMPACT_INSN_JSR_COMPACT, SH64_COMPACT_INSN_LDC_COMPACT
- , SH64_COMPACT_INSN_LDCL_COMPACT, SH64_COMPACT_INSN_LDS_FPSCR_COMPACT, SH64_COMPACT_INSN_LDSL_FPSCR_COMPACT, SH64_COMPACT_INSN_LDS_FPUL_COMPACT
- , SH64_COMPACT_INSN_LDSL_FPUL_COMPACT, SH64_COMPACT_INSN_LDS_MACH_COMPACT, SH64_COMPACT_INSN_LDSL_MACH_COMPACT, SH64_COMPACT_INSN_LDS_MACL_COMPACT
- , SH64_COMPACT_INSN_LDSL_MACL_COMPACT, SH64_COMPACT_INSN_LDS_PR_COMPACT, SH64_COMPACT_INSN_LDSL_PR_COMPACT, SH64_COMPACT_INSN_MACL_COMPACT
- , SH64_COMPACT_INSN_MACW_COMPACT, SH64_COMPACT_INSN_MOV_COMPACT, SH64_COMPACT_INSN_MOVI_COMPACT, SH64_COMPACT_INSN_MOVB1_COMPACT
- , SH64_COMPACT_INSN_MOVB2_COMPACT, SH64_COMPACT_INSN_MOVB3_COMPACT, SH64_COMPACT_INSN_MOVB4_COMPACT, SH64_COMPACT_INSN_MOVB5_COMPACT
- , SH64_COMPACT_INSN_MOVB6_COMPACT, SH64_COMPACT_INSN_MOVB7_COMPACT, SH64_COMPACT_INSN_MOVB8_COMPACT, SH64_COMPACT_INSN_MOVB9_COMPACT
- , SH64_COMPACT_INSN_MOVB10_COMPACT, SH64_COMPACT_INSN_MOVL1_COMPACT, SH64_COMPACT_INSN_MOVL2_COMPACT, SH64_COMPACT_INSN_MOVL3_COMPACT
- , SH64_COMPACT_INSN_MOVL4_COMPACT, SH64_COMPACT_INSN_MOVL5_COMPACT, SH64_COMPACT_INSN_MOVL6_COMPACT, SH64_COMPACT_INSN_MOVL7_COMPACT
- , SH64_COMPACT_INSN_MOVL8_COMPACT, SH64_COMPACT_INSN_MOVL9_COMPACT, SH64_COMPACT_INSN_MOVL10_COMPACT, SH64_COMPACT_INSN_MOVL11_COMPACT
- , SH64_COMPACT_INSN_MOVW1_COMPACT, SH64_COMPACT_INSN_MOVW2_COMPACT, SH64_COMPACT_INSN_MOVW3_COMPACT, SH64_COMPACT_INSN_MOVW4_COMPACT
- , SH64_COMPACT_INSN_MOVW5_COMPACT, SH64_COMPACT_INSN_MOVW6_COMPACT, SH64_COMPACT_INSN_MOVW7_COMPACT, SH64_COMPACT_INSN_MOVW8_COMPACT
- , SH64_COMPACT_INSN_MOVW9_COMPACT, SH64_COMPACT_INSN_MOVW10_COMPACT, SH64_COMPACT_INSN_MOVW11_COMPACT, SH64_COMPACT_INSN_MOVA_COMPACT
- , SH64_COMPACT_INSN_MOVCAL_COMPACT, SH64_COMPACT_INSN_MOVT_COMPACT, SH64_COMPACT_INSN_MULL_COMPACT, SH64_COMPACT_INSN_MULSW_COMPACT
- , SH64_COMPACT_INSN_MULUW_COMPACT, SH64_COMPACT_INSN_NEG_COMPACT, SH64_COMPACT_INSN_NEGC_COMPACT, SH64_COMPACT_INSN_NOP_COMPACT
- , SH64_COMPACT_INSN_NOT_COMPACT, SH64_COMPACT_INSN_OCBI_COMPACT, SH64_COMPACT_INSN_OCBP_COMPACT, SH64_COMPACT_INSN_OCBWB_COMPACT
- , SH64_COMPACT_INSN_OR_COMPACT, SH64_COMPACT_INSN_ORI_COMPACT, SH64_COMPACT_INSN_ORB_COMPACT, SH64_COMPACT_INSN_PREF_COMPACT
- , SH64_COMPACT_INSN_ROTCL_COMPACT, SH64_COMPACT_INSN_ROTCR_COMPACT, SH64_COMPACT_INSN_ROTL_COMPACT, SH64_COMPACT_INSN_ROTR_COMPACT
- , SH64_COMPACT_INSN_RTS_COMPACT, SH64_COMPACT_INSN_SETS_COMPACT, SH64_COMPACT_INSN_SETT_COMPACT, SH64_COMPACT_INSN_SHAD_COMPACT
- , SH64_COMPACT_INSN_SHAL_COMPACT, SH64_COMPACT_INSN_SHAR_COMPACT, SH64_COMPACT_INSN_SHLD_COMPACT, SH64_COMPACT_INSN_SHLL_COMPACT
- , SH64_COMPACT_INSN_SHLL2_COMPACT, SH64_COMPACT_INSN_SHLL8_COMPACT, SH64_COMPACT_INSN_SHLL16_COMPACT, SH64_COMPACT_INSN_SHLR_COMPACT
- , SH64_COMPACT_INSN_SHLR2_COMPACT, SH64_COMPACT_INSN_SHLR8_COMPACT, SH64_COMPACT_INSN_SHLR16_COMPACT, SH64_COMPACT_INSN_STC_GBR_COMPACT
- , SH64_COMPACT_INSN_STCL_GBR_COMPACT, SH64_COMPACT_INSN_STS_FPSCR_COMPACT, SH64_COMPACT_INSN_STSL_FPSCR_COMPACT, SH64_COMPACT_INSN_STS_FPUL_COMPACT
- , SH64_COMPACT_INSN_STSL_FPUL_COMPACT, SH64_COMPACT_INSN_STS_MACH_COMPACT, SH64_COMPACT_INSN_STSL_MACH_COMPACT, SH64_COMPACT_INSN_STS_MACL_COMPACT
- , SH64_COMPACT_INSN_STSL_MACL_COMPACT, SH64_COMPACT_INSN_STS_PR_COMPACT, SH64_COMPACT_INSN_STSL_PR_COMPACT, SH64_COMPACT_INSN_SUB_COMPACT
- , SH64_COMPACT_INSN_SUBC_COMPACT, SH64_COMPACT_INSN_SUBV_COMPACT, SH64_COMPACT_INSN_SWAPB_COMPACT, SH64_COMPACT_INSN_SWAPW_COMPACT
- , SH64_COMPACT_INSN_TASB_COMPACT, SH64_COMPACT_INSN_TRAPA_COMPACT, SH64_COMPACT_INSN_TST_COMPACT, SH64_COMPACT_INSN_TSTI_COMPACT
- , SH64_COMPACT_INSN_TSTB_COMPACT, SH64_COMPACT_INSN_XOR_COMPACT, SH64_COMPACT_INSN_XORI_COMPACT, SH64_COMPACT_INSN_XORB_COMPACT
- , SH64_COMPACT_INSN_XTRCT_COMPACT, SH64_COMPACT_INSN_MAX
-} SH64_COMPACT_INSN_TYPE;
-
-/* Enum declaration for semantic formats in cpu family sh64. */
-typedef enum sh64_compact_sfmt_type {
- SH64_COMPACT_SFMT_EMPTY, SH64_COMPACT_SFMT_ADD_COMPACT, SH64_COMPACT_SFMT_ADDI_COMPACT, SH64_COMPACT_SFMT_ADDC_COMPACT
- , SH64_COMPACT_SFMT_ADDV_COMPACT, SH64_COMPACT_SFMT_AND_COMPACT, SH64_COMPACT_SFMT_ANDI_COMPACT, SH64_COMPACT_SFMT_ANDB_COMPACT
- , SH64_COMPACT_SFMT_BF_COMPACT, SH64_COMPACT_SFMT_BRA_COMPACT, SH64_COMPACT_SFMT_BRAF_COMPACT, SH64_COMPACT_SFMT_BRK_COMPACT
- , SH64_COMPACT_SFMT_BSR_COMPACT, SH64_COMPACT_SFMT_BSRF_COMPACT, SH64_COMPACT_SFMT_CLRMAC_COMPACT, SH64_COMPACT_SFMT_CLRS_COMPACT
- , SH64_COMPACT_SFMT_CLRT_COMPACT, SH64_COMPACT_SFMT_CMPEQ_COMPACT, SH64_COMPACT_SFMT_CMPEQI_COMPACT, SH64_COMPACT_SFMT_CMPPL_COMPACT
- , SH64_COMPACT_SFMT_DIV0S_COMPACT, SH64_COMPACT_SFMT_DIV0U_COMPACT, SH64_COMPACT_SFMT_DIV1_COMPACT, SH64_COMPACT_SFMT_DMULSL_COMPACT
- , SH64_COMPACT_SFMT_DT_COMPACT, SH64_COMPACT_SFMT_EXTSB_COMPACT, SH64_COMPACT_SFMT_FABS_COMPACT, SH64_COMPACT_SFMT_FADD_COMPACT
- , SH64_COMPACT_SFMT_FCMPEQ_COMPACT, SH64_COMPACT_SFMT_FCNVDS_COMPACT, SH64_COMPACT_SFMT_FCNVSD_COMPACT, SH64_COMPACT_SFMT_FIPR_COMPACT
- , SH64_COMPACT_SFMT_FLDS_COMPACT, SH64_COMPACT_SFMT_FLDI0_COMPACT, SH64_COMPACT_SFMT_FLOAT_COMPACT, SH64_COMPACT_SFMT_FMAC_COMPACT
- , SH64_COMPACT_SFMT_FMOV1_COMPACT, SH64_COMPACT_SFMT_FMOV2_COMPACT, SH64_COMPACT_SFMT_FMOV3_COMPACT, SH64_COMPACT_SFMT_FMOV4_COMPACT
- , SH64_COMPACT_SFMT_FMOV5_COMPACT, SH64_COMPACT_SFMT_FMOV6_COMPACT, SH64_COMPACT_SFMT_FMOV7_COMPACT, SH64_COMPACT_SFMT_FRCHG_COMPACT
- , SH64_COMPACT_SFMT_FSCHG_COMPACT, SH64_COMPACT_SFMT_FSTS_COMPACT, SH64_COMPACT_SFMT_FTRC_COMPACT, SH64_COMPACT_SFMT_FTRV_COMPACT
- , SH64_COMPACT_SFMT_JMP_COMPACT, SH64_COMPACT_SFMT_LDC_COMPACT, SH64_COMPACT_SFMT_LDCL_COMPACT, SH64_COMPACT_SFMT_LDS_FPSCR_COMPACT
- , SH64_COMPACT_SFMT_LDSL_FPSCR_COMPACT, SH64_COMPACT_SFMT_LDS_FPUL_COMPACT, SH64_COMPACT_SFMT_LDSL_FPUL_COMPACT, SH64_COMPACT_SFMT_LDS_MACH_COMPACT
- , SH64_COMPACT_SFMT_LDSL_MACH_COMPACT, SH64_COMPACT_SFMT_LDS_MACL_COMPACT, SH64_COMPACT_SFMT_LDSL_MACL_COMPACT, SH64_COMPACT_SFMT_LDS_PR_COMPACT
- , SH64_COMPACT_SFMT_LDSL_PR_COMPACT, SH64_COMPACT_SFMT_MACL_COMPACT, SH64_COMPACT_SFMT_MACW_COMPACT, SH64_COMPACT_SFMT_MOV_COMPACT
- , SH64_COMPACT_SFMT_MOVI_COMPACT, SH64_COMPACT_SFMT_MOVB1_COMPACT, SH64_COMPACT_SFMT_MOVB2_COMPACT, SH64_COMPACT_SFMT_MOVB3_COMPACT
- , SH64_COMPACT_SFMT_MOVB4_COMPACT, SH64_COMPACT_SFMT_MOVB5_COMPACT, SH64_COMPACT_SFMT_MOVB6_COMPACT, SH64_COMPACT_SFMT_MOVB7_COMPACT
- , SH64_COMPACT_SFMT_MOVB8_COMPACT, SH64_COMPACT_SFMT_MOVB9_COMPACT, SH64_COMPACT_SFMT_MOVB10_COMPACT, SH64_COMPACT_SFMT_MOVL4_COMPACT
- , SH64_COMPACT_SFMT_MOVL5_COMPACT, SH64_COMPACT_SFMT_MOVL7_COMPACT, SH64_COMPACT_SFMT_MOVL9_COMPACT, SH64_COMPACT_SFMT_MOVL10_COMPACT
- , SH64_COMPACT_SFMT_MOVL11_COMPACT, SH64_COMPACT_SFMT_MOVW4_COMPACT, SH64_COMPACT_SFMT_MOVW5_COMPACT, SH64_COMPACT_SFMT_MOVW9_COMPACT
- , SH64_COMPACT_SFMT_MOVW10_COMPACT, SH64_COMPACT_SFMT_MOVW11_COMPACT, SH64_COMPACT_SFMT_MOVA_COMPACT, SH64_COMPACT_SFMT_MOVCAL_COMPACT
- , SH64_COMPACT_SFMT_MOVT_COMPACT, SH64_COMPACT_SFMT_MULL_COMPACT, SH64_COMPACT_SFMT_NEGC_COMPACT, SH64_COMPACT_SFMT_NOP_COMPACT
- , SH64_COMPACT_SFMT_ROTCL_COMPACT, SH64_COMPACT_SFMT_RTS_COMPACT, SH64_COMPACT_SFMT_SHAD_COMPACT, SH64_COMPACT_SFMT_SHLL2_COMPACT
- , SH64_COMPACT_SFMT_STC_GBR_COMPACT, SH64_COMPACT_SFMT_STCL_GBR_COMPACT, SH64_COMPACT_SFMT_STS_FPSCR_COMPACT, SH64_COMPACT_SFMT_STSL_FPSCR_COMPACT
- , SH64_COMPACT_SFMT_STS_FPUL_COMPACT, SH64_COMPACT_SFMT_STSL_FPUL_COMPACT, SH64_COMPACT_SFMT_STS_MACH_COMPACT, SH64_COMPACT_SFMT_STSL_MACH_COMPACT
- , SH64_COMPACT_SFMT_STS_MACL_COMPACT, SH64_COMPACT_SFMT_STSL_MACL_COMPACT, SH64_COMPACT_SFMT_STS_PR_COMPACT, SH64_COMPACT_SFMT_STSL_PR_COMPACT
- , SH64_COMPACT_SFMT_TASB_COMPACT, SH64_COMPACT_SFMT_TRAPA_COMPACT, SH64_COMPACT_SFMT_TSTI_COMPACT, SH64_COMPACT_SFMT_TSTB_COMPACT
- , SH64_COMPACT_SFMT_XORI_COMPACT
-} SH64_COMPACT_SFMT_TYPE;
-
-/* Function unit handlers (user written). */
-
-extern int sh64_model_sh5_u_exec (SIM_CPU *, const IDESC *, int /*unit_num*/, int /*referenced*/);
-
-/* Profiling before/after handlers (user written) */
-
-extern void sh64_model_insn_before (SIM_CPU *, int /*first_p*/);
-extern void sh64_model_insn_after (SIM_CPU *, int /*last_p*/, int /*cycles*/);
-
-#endif /* SH64_COMPACT_DECODE_H */
diff --git a/sim/sh64/decode-media.c b/sim/sh64/decode-media.c
deleted file mode 100644
index f1471f332bb..00000000000
--- a/sim/sh64/decode-media.c
+++ /dev/null
@@ -1,2109 +0,0 @@
-/* Simulator instruction decoder for sh64_media.
-
-THIS FILE IS MACHINE GENERATED WITH CGEN.
-
-Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
-
-This file is part of the GNU Simulators.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-
-#define WANT_CPU sh64
-#define WANT_CPU_SH64
-
-#include "sim-main.h"
-#include "sim-assert.h"
-
-/* The instruction descriptor array.
- This is computed at runtime. Space for it is not malloc'd to save a
- teensy bit of cpu in the decoder. Moving it to malloc space is trivial
- but won't be done until necessary (we don't currently support the runtime
- addition of instructions nor an SMP machine with different cpus). */
-static IDESC sh64_media_insn_data[SH64_MEDIA_INSN_MAX];
-
-/* Commas between elements are contained in the macros.
- Some of these are conditionally compiled out. */
-
-static const struct insn_sem sh64_media_insn_sem[] =
-{
- { VIRTUAL_INSN_X_INVALID, SH64_MEDIA_INSN_X_INVALID, SH64_MEDIA_SFMT_EMPTY },
- { VIRTUAL_INSN_X_AFTER, SH64_MEDIA_INSN_X_AFTER, SH64_MEDIA_SFMT_EMPTY },
- { VIRTUAL_INSN_X_BEFORE, SH64_MEDIA_INSN_X_BEFORE, SH64_MEDIA_SFMT_EMPTY },
- { VIRTUAL_INSN_X_CTI_CHAIN, SH64_MEDIA_INSN_X_CTI_CHAIN, SH64_MEDIA_SFMT_EMPTY },
- { VIRTUAL_INSN_X_CHAIN, SH64_MEDIA_INSN_X_CHAIN, SH64_MEDIA_SFMT_EMPTY },
- { VIRTUAL_INSN_X_BEGIN, SH64_MEDIA_INSN_X_BEGIN, SH64_MEDIA_SFMT_EMPTY },
- { SH_INSN_ADD, SH64_MEDIA_INSN_ADD, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_ADDL, SH64_MEDIA_INSN_ADDL, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_ADDI, SH64_MEDIA_INSN_ADDI, SH64_MEDIA_SFMT_ADDI },
- { SH_INSN_ADDIL, SH64_MEDIA_INSN_ADDIL, SH64_MEDIA_SFMT_ADDI },
- { SH_INSN_ADDZL, SH64_MEDIA_INSN_ADDZL, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_ALLOCO, SH64_MEDIA_INSN_ALLOCO, SH64_MEDIA_SFMT_ALLOCO },
- { SH_INSN_AND, SH64_MEDIA_INSN_AND, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_ANDC, SH64_MEDIA_INSN_ANDC, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_ANDI, SH64_MEDIA_INSN_ANDI, SH64_MEDIA_SFMT_ADDI },
- { SH_INSN_BEQ, SH64_MEDIA_INSN_BEQ, SH64_MEDIA_SFMT_BEQ },
- { SH_INSN_BEQI, SH64_MEDIA_INSN_BEQI, SH64_MEDIA_SFMT_BEQI },
- { SH_INSN_BGE, SH64_MEDIA_INSN_BGE, SH64_MEDIA_SFMT_BEQ },
- { SH_INSN_BGEU, SH64_MEDIA_INSN_BGEU, SH64_MEDIA_SFMT_BEQ },
- { SH_INSN_BGT, SH64_MEDIA_INSN_BGT, SH64_MEDIA_SFMT_BEQ },
- { SH_INSN_BGTU, SH64_MEDIA_INSN_BGTU, SH64_MEDIA_SFMT_BEQ },
- { SH_INSN_BLINK, SH64_MEDIA_INSN_BLINK, SH64_MEDIA_SFMT_BLINK },
- { SH_INSN_BNE, SH64_MEDIA_INSN_BNE, SH64_MEDIA_SFMT_BEQ },
- { SH_INSN_BNEI, SH64_MEDIA_INSN_BNEI, SH64_MEDIA_SFMT_BEQI },
- { SH_INSN_BRK, SH64_MEDIA_INSN_BRK, SH64_MEDIA_SFMT_BRK },
- { SH_INSN_BYTEREV, SH64_MEDIA_INSN_BYTEREV, SH64_MEDIA_SFMT_BYTEREV },
- { SH_INSN_CMPEQ, SH64_MEDIA_INSN_CMPEQ, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_CMPGT, SH64_MEDIA_INSN_CMPGT, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_CMPGTU, SH64_MEDIA_INSN_CMPGTU, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_CMVEQ, SH64_MEDIA_INSN_CMVEQ, SH64_MEDIA_SFMT_CMVEQ },
- { SH_INSN_CMVNE, SH64_MEDIA_INSN_CMVNE, SH64_MEDIA_SFMT_CMVEQ },
- { SH_INSN_FABSD, SH64_MEDIA_INSN_FABSD, SH64_MEDIA_SFMT_FABSD },
- { SH_INSN_FABSS, SH64_MEDIA_INSN_FABSS, SH64_MEDIA_SFMT_FABSS },
- { SH_INSN_FADDD, SH64_MEDIA_INSN_FADDD, SH64_MEDIA_SFMT_FADDD },
- { SH_INSN_FADDS, SH64_MEDIA_INSN_FADDS, SH64_MEDIA_SFMT_FADDS },
- { SH_INSN_FCMPEQD, SH64_MEDIA_INSN_FCMPEQD, SH64_MEDIA_SFMT_FCMPEQD },
- { SH_INSN_FCMPEQS, SH64_MEDIA_INSN_FCMPEQS, SH64_MEDIA_SFMT_FCMPEQS },
- { SH_INSN_FCMPGED, SH64_MEDIA_INSN_FCMPGED, SH64_MEDIA_SFMT_FCMPEQD },
- { SH_INSN_FCMPGES, SH64_MEDIA_INSN_FCMPGES, SH64_MEDIA_SFMT_FCMPEQS },
- { SH_INSN_FCMPGTD, SH64_MEDIA_INSN_FCMPGTD, SH64_MEDIA_SFMT_FCMPEQD },
- { SH_INSN_FCMPGTS, SH64_MEDIA_INSN_FCMPGTS, SH64_MEDIA_SFMT_FCMPEQS },
- { SH_INSN_FCMPUND, SH64_MEDIA_INSN_FCMPUND, SH64_MEDIA_SFMT_FCMPEQD },
- { SH_INSN_FCMPUNS, SH64_MEDIA_INSN_FCMPUNS, SH64_MEDIA_SFMT_FCMPEQS },
- { SH_INSN_FCNVDS, SH64_MEDIA_INSN_FCNVDS, SH64_MEDIA_SFMT_FCNVDS },
- { SH_INSN_FCNVSD, SH64_MEDIA_INSN_FCNVSD, SH64_MEDIA_SFMT_FCNVSD },
- { SH_INSN_FDIVD, SH64_MEDIA_INSN_FDIVD, SH64_MEDIA_SFMT_FADDD },
- { SH_INSN_FDIVS, SH64_MEDIA_INSN_FDIVS, SH64_MEDIA_SFMT_FADDS },
- { SH_INSN_FGETSCR, SH64_MEDIA_INSN_FGETSCR, SH64_MEDIA_SFMT_ALLOCO },
- { SH_INSN_FIPRS, SH64_MEDIA_INSN_FIPRS, SH64_MEDIA_SFMT_FIPRS },
- { SH_INSN_FLDD, SH64_MEDIA_INSN_FLDD, SH64_MEDIA_SFMT_FLDD },
- { SH_INSN_FLDP, SH64_MEDIA_INSN_FLDP, SH64_MEDIA_SFMT_FLDP },
- { SH_INSN_FLDS, SH64_MEDIA_INSN_FLDS, SH64_MEDIA_SFMT_FLDS },
- { SH_INSN_FLDXD, SH64_MEDIA_INSN_FLDXD, SH64_MEDIA_SFMT_FLDXD },
- { SH_INSN_FLDXP, SH64_MEDIA_INSN_FLDXP, SH64_MEDIA_SFMT_FLDXP },
- { SH_INSN_FLDXS, SH64_MEDIA_INSN_FLDXS, SH64_MEDIA_SFMT_FLDXS },
- { SH_INSN_FLOATLD, SH64_MEDIA_INSN_FLOATLD, SH64_MEDIA_SFMT_FCNVSD },
- { SH_INSN_FLOATLS, SH64_MEDIA_INSN_FLOATLS, SH64_MEDIA_SFMT_FABSS },
- { SH_INSN_FLOATQD, SH64_MEDIA_INSN_FLOATQD, SH64_MEDIA_SFMT_FABSD },
- { SH_INSN_FLOATQS, SH64_MEDIA_INSN_FLOATQS, SH64_MEDIA_SFMT_FCNVDS },
- { SH_INSN_FMACS, SH64_MEDIA_INSN_FMACS, SH64_MEDIA_SFMT_FMACS },
- { SH_INSN_FMOVD, SH64_MEDIA_INSN_FMOVD, SH64_MEDIA_SFMT_FABSD },
- { SH_INSN_FMOVDQ, SH64_MEDIA_INSN_FMOVDQ, SH64_MEDIA_SFMT_FMOVDQ },
- { SH_INSN_FMOVLS, SH64_MEDIA_INSN_FMOVLS, SH64_MEDIA_SFMT_FMOVLS },
- { SH_INSN_FMOVQD, SH64_MEDIA_INSN_FMOVQD, SH64_MEDIA_SFMT_FMOVQD },
- { SH_INSN_FMOVS, SH64_MEDIA_INSN_FMOVS, SH64_MEDIA_SFMT_FABSS },
- { SH_INSN_FMOVSL, SH64_MEDIA_INSN_FMOVSL, SH64_MEDIA_SFMT_FMOVSL },
- { SH_INSN_FMULD, SH64_MEDIA_INSN_FMULD, SH64_MEDIA_SFMT_FADDD },
- { SH_INSN_FMULS, SH64_MEDIA_INSN_FMULS, SH64_MEDIA_SFMT_FADDS },
- { SH_INSN_FNEGD, SH64_MEDIA_INSN_FNEGD, SH64_MEDIA_SFMT_FABSD },
- { SH_INSN_FNEGS, SH64_MEDIA_INSN_FNEGS, SH64_MEDIA_SFMT_FABSS },
- { SH_INSN_FPUTSCR, SH64_MEDIA_INSN_FPUTSCR, SH64_MEDIA_SFMT_ALLOCO },
- { SH_INSN_FSQRTD, SH64_MEDIA_INSN_FSQRTD, SH64_MEDIA_SFMT_FABSD },
- { SH_INSN_FSQRTS, SH64_MEDIA_INSN_FSQRTS, SH64_MEDIA_SFMT_FABSS },
- { SH_INSN_FSTD, SH64_MEDIA_INSN_FSTD, SH64_MEDIA_SFMT_FSTD },
- { SH_INSN_FSTP, SH64_MEDIA_INSN_FSTP, SH64_MEDIA_SFMT_FSTP },
- { SH_INSN_FSTS, SH64_MEDIA_INSN_FSTS, SH64_MEDIA_SFMT_FSTS },
- { SH_INSN_FSTXD, SH64_MEDIA_INSN_FSTXD, SH64_MEDIA_SFMT_FSTXD },
- { SH_INSN_FSTXP, SH64_MEDIA_INSN_FSTXP, SH64_MEDIA_SFMT_FSTXP },
- { SH_INSN_FSTXS, SH64_MEDIA_INSN_FSTXS, SH64_MEDIA_SFMT_FSTXS },
- { SH_INSN_FSUBD, SH64_MEDIA_INSN_FSUBD, SH64_MEDIA_SFMT_FADDD },
- { SH_INSN_FSUBS, SH64_MEDIA_INSN_FSUBS, SH64_MEDIA_SFMT_FADDS },
- { SH_INSN_FTRCDL, SH64_MEDIA_INSN_FTRCDL, SH64_MEDIA_SFMT_FCNVDS },
- { SH_INSN_FTRCSL, SH64_MEDIA_INSN_FTRCSL, SH64_MEDIA_SFMT_FABSS },
- { SH_INSN_FTRCDQ, SH64_MEDIA_INSN_FTRCDQ, SH64_MEDIA_SFMT_FABSD },
- { SH_INSN_FTRCSQ, SH64_MEDIA_INSN_FTRCSQ, SH64_MEDIA_SFMT_FCNVSD },
- { SH_INSN_FTRVS, SH64_MEDIA_INSN_FTRVS, SH64_MEDIA_SFMT_FTRVS },
- { SH_INSN_GETCFG, SH64_MEDIA_INSN_GETCFG, SH64_MEDIA_SFMT_ALLOCO },
- { SH_INSN_GETCON, SH64_MEDIA_INSN_GETCON, SH64_MEDIA_SFMT_GETCON },
- { SH_INSN_GETTR, SH64_MEDIA_INSN_GETTR, SH64_MEDIA_SFMT_GETTR },
- { SH_INSN_ICBI, SH64_MEDIA_INSN_ICBI, SH64_MEDIA_SFMT_ALLOCO },
- { SH_INSN_LDB, SH64_MEDIA_INSN_LDB, SH64_MEDIA_SFMT_LDB },
- { SH_INSN_LDL, SH64_MEDIA_INSN_LDL, SH64_MEDIA_SFMT_LDL },
- { SH_INSN_LDQ, SH64_MEDIA_INSN_LDQ, SH64_MEDIA_SFMT_LDQ },
- { SH_INSN_LDUB, SH64_MEDIA_INSN_LDUB, SH64_MEDIA_SFMT_LDB },
- { SH_INSN_LDUW, SH64_MEDIA_INSN_LDUW, SH64_MEDIA_SFMT_LDUW },
- { SH_INSN_LDW, SH64_MEDIA_INSN_LDW, SH64_MEDIA_SFMT_LDUW },
- { SH_INSN_LDHIL, SH64_MEDIA_INSN_LDHIL, SH64_MEDIA_SFMT_ALLOCO },
- { SH_INSN_LDHIQ, SH64_MEDIA_INSN_LDHIQ, SH64_MEDIA_SFMT_ALLOCO },
- { SH_INSN_LDLOL, SH64_MEDIA_INSN_LDLOL, SH64_MEDIA_SFMT_ALLOCO },
- { SH_INSN_LDLOQ, SH64_MEDIA_INSN_LDLOQ, SH64_MEDIA_SFMT_ALLOCO },
- { SH_INSN_LDXB, SH64_MEDIA_INSN_LDXB, SH64_MEDIA_SFMT_LDXB },
- { SH_INSN_LDXL, SH64_MEDIA_INSN_LDXL, SH64_MEDIA_SFMT_LDXB },
- { SH_INSN_LDXQ, SH64_MEDIA_INSN_LDXQ, SH64_MEDIA_SFMT_LDXB },
- { SH_INSN_LDXUB, SH64_MEDIA_INSN_LDXUB, SH64_MEDIA_SFMT_LDXB },
- { SH_INSN_LDXUW, SH64_MEDIA_INSN_LDXUW, SH64_MEDIA_SFMT_LDXB },
- { SH_INSN_LDXW, SH64_MEDIA_INSN_LDXW, SH64_MEDIA_SFMT_LDXB },
- { SH_INSN_MABSL, SH64_MEDIA_INSN_MABSL, SH64_MEDIA_SFMT_BYTEREV },
- { SH_INSN_MABSW, SH64_MEDIA_INSN_MABSW, SH64_MEDIA_SFMT_BYTEREV },
- { SH_INSN_MADDL, SH64_MEDIA_INSN_MADDL, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MADDW, SH64_MEDIA_INSN_MADDW, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MADDSL, SH64_MEDIA_INSN_MADDSL, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MADDSUB, SH64_MEDIA_INSN_MADDSUB, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MADDSW, SH64_MEDIA_INSN_MADDSW, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MCMPEQB, SH64_MEDIA_INSN_MCMPEQB, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MCMPEQL, SH64_MEDIA_INSN_MCMPEQL, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MCMPEQW, SH64_MEDIA_INSN_MCMPEQW, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MCMPGTL, SH64_MEDIA_INSN_MCMPGTL, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MCMPGTUB, SH64_MEDIA_INSN_MCMPGTUB, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MCMPGTW, SH64_MEDIA_INSN_MCMPGTW, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MCMV, SH64_MEDIA_INSN_MCMV, SH64_MEDIA_SFMT_MCMV },
- { SH_INSN_MCNVSLW, SH64_MEDIA_INSN_MCNVSLW, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MCNVSWB, SH64_MEDIA_INSN_MCNVSWB, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MCNVSWUB, SH64_MEDIA_INSN_MCNVSWUB, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MEXTR1, SH64_MEDIA_INSN_MEXTR1, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MEXTR2, SH64_MEDIA_INSN_MEXTR2, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MEXTR3, SH64_MEDIA_INSN_MEXTR3, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MEXTR4, SH64_MEDIA_INSN_MEXTR4, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MEXTR5, SH64_MEDIA_INSN_MEXTR5, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MEXTR6, SH64_MEDIA_INSN_MEXTR6, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MEXTR7, SH64_MEDIA_INSN_MEXTR7, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MMACFXWL, SH64_MEDIA_INSN_MMACFXWL, SH64_MEDIA_SFMT_MCMV },
- { SH_INSN_MMACNFX_WL, SH64_MEDIA_INSN_MMACNFX_WL, SH64_MEDIA_SFMT_MCMV },
- { SH_INSN_MMULL, SH64_MEDIA_INSN_MMULL, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MMULW, SH64_MEDIA_INSN_MMULW, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MMULFXL, SH64_MEDIA_INSN_MMULFXL, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MMULFXW, SH64_MEDIA_INSN_MMULFXW, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MMULFXRPW, SH64_MEDIA_INSN_MMULFXRPW, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MMULHIWL, SH64_MEDIA_INSN_MMULHIWL, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MMULLOWL, SH64_MEDIA_INSN_MMULLOWL, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MMULSUMWQ, SH64_MEDIA_INSN_MMULSUMWQ, SH64_MEDIA_SFMT_MCMV },
- { SH_INSN_MOVI, SH64_MEDIA_INSN_MOVI, SH64_MEDIA_SFMT_MOVI },
- { SH_INSN_MPERMW, SH64_MEDIA_INSN_MPERMW, SH64_MEDIA_SFMT_MPERMW },
- { SH_INSN_MSADUBQ, SH64_MEDIA_INSN_MSADUBQ, SH64_MEDIA_SFMT_MCMV },
- { SH_INSN_MSHALDSL, SH64_MEDIA_INSN_MSHALDSL, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MSHALDSW, SH64_MEDIA_INSN_MSHALDSW, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MSHARDL, SH64_MEDIA_INSN_MSHARDL, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MSHARDW, SH64_MEDIA_INSN_MSHARDW, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MSHARDSQ, SH64_MEDIA_INSN_MSHARDSQ, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MSHFHIB, SH64_MEDIA_INSN_MSHFHIB, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MSHFHIL, SH64_MEDIA_INSN_MSHFHIL, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MSHFHIW, SH64_MEDIA_INSN_MSHFHIW, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MSHFLOB, SH64_MEDIA_INSN_MSHFLOB, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MSHFLOL, SH64_MEDIA_INSN_MSHFLOL, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MSHFLOW, SH64_MEDIA_INSN_MSHFLOW, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MSHLLDL, SH64_MEDIA_INSN_MSHLLDL, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MSHLLDW, SH64_MEDIA_INSN_MSHLLDW, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MSHLRDL, SH64_MEDIA_INSN_MSHLRDL, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MSHLRDW, SH64_MEDIA_INSN_MSHLRDW, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MSUBL, SH64_MEDIA_INSN_MSUBL, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MSUBW, SH64_MEDIA_INSN_MSUBW, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MSUBSL, SH64_MEDIA_INSN_MSUBSL, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MSUBSUB, SH64_MEDIA_INSN_MSUBSUB, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MSUBSW, SH64_MEDIA_INSN_MSUBSW, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MULSL, SH64_MEDIA_INSN_MULSL, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_MULUL, SH64_MEDIA_INSN_MULUL, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_NOP, SH64_MEDIA_INSN_NOP, SH64_MEDIA_SFMT_ALLOCO },
- { SH_INSN_NSB, SH64_MEDIA_INSN_NSB, SH64_MEDIA_SFMT_BYTEREV },
- { SH_INSN_OCBI, SH64_MEDIA_INSN_OCBI, SH64_MEDIA_SFMT_ALLOCO },
- { SH_INSN_OCBP, SH64_MEDIA_INSN_OCBP, SH64_MEDIA_SFMT_ALLOCO },
- { SH_INSN_OCBWB, SH64_MEDIA_INSN_OCBWB, SH64_MEDIA_SFMT_ALLOCO },
- { SH_INSN_OR, SH64_MEDIA_INSN_OR, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_ORI, SH64_MEDIA_INSN_ORI, SH64_MEDIA_SFMT_ORI },
- { SH_INSN_PREFI, SH64_MEDIA_INSN_PREFI, SH64_MEDIA_SFMT_ALLOCO },
- { SH_INSN_PTA, SH64_MEDIA_INSN_PTA, SH64_MEDIA_SFMT_PTA },
- { SH_INSN_PTABS, SH64_MEDIA_INSN_PTABS, SH64_MEDIA_SFMT_PTABS },
- { SH_INSN_PTB, SH64_MEDIA_INSN_PTB, SH64_MEDIA_SFMT_PTA },
- { SH_INSN_PTREL, SH64_MEDIA_INSN_PTREL, SH64_MEDIA_SFMT_PTREL },
- { SH_INSN_PUTCFG, SH64_MEDIA_INSN_PUTCFG, SH64_MEDIA_SFMT_ALLOCO },
- { SH_INSN_PUTCON, SH64_MEDIA_INSN_PUTCON, SH64_MEDIA_SFMT_PUTCON },
- { SH_INSN_RTE, SH64_MEDIA_INSN_RTE, SH64_MEDIA_SFMT_ALLOCO },
- { SH_INSN_SHARD, SH64_MEDIA_INSN_SHARD, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_SHARDL, SH64_MEDIA_INSN_SHARDL, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_SHARI, SH64_MEDIA_INSN_SHARI, SH64_MEDIA_SFMT_SHARI },
- { SH_INSN_SHARIL, SH64_MEDIA_INSN_SHARIL, SH64_MEDIA_SFMT_SHARIL },
- { SH_INSN_SHLLD, SH64_MEDIA_INSN_SHLLD, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_SHLLDL, SH64_MEDIA_INSN_SHLLDL, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_SHLLI, SH64_MEDIA_INSN_SHLLI, SH64_MEDIA_SFMT_SHARI },
- { SH_INSN_SHLLIL, SH64_MEDIA_INSN_SHLLIL, SH64_MEDIA_SFMT_SHARIL },
- { SH_INSN_SHLRD, SH64_MEDIA_INSN_SHLRD, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_SHLRDL, SH64_MEDIA_INSN_SHLRDL, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_SHLRI, SH64_MEDIA_INSN_SHLRI, SH64_MEDIA_SFMT_SHARI },
- { SH_INSN_SHLRIL, SH64_MEDIA_INSN_SHLRIL, SH64_MEDIA_SFMT_SHARIL },
- { SH_INSN_SHORI, SH64_MEDIA_INSN_SHORI, SH64_MEDIA_SFMT_SHORI },
- { SH_INSN_SLEEP, SH64_MEDIA_INSN_SLEEP, SH64_MEDIA_SFMT_ALLOCO },
- { SH_INSN_STB, SH64_MEDIA_INSN_STB, SH64_MEDIA_SFMT_STB },
- { SH_INSN_STL, SH64_MEDIA_INSN_STL, SH64_MEDIA_SFMT_STL },
- { SH_INSN_STQ, SH64_MEDIA_INSN_STQ, SH64_MEDIA_SFMT_STQ },
- { SH_INSN_STW, SH64_MEDIA_INSN_STW, SH64_MEDIA_SFMT_STW },
- { SH_INSN_STHIL, SH64_MEDIA_INSN_STHIL, SH64_MEDIA_SFMT_STHIL },
- { SH_INSN_STHIQ, SH64_MEDIA_INSN_STHIQ, SH64_MEDIA_SFMT_STHIL },
- { SH_INSN_STLOL, SH64_MEDIA_INSN_STLOL, SH64_MEDIA_SFMT_ALLOCO },
- { SH_INSN_STLOQ, SH64_MEDIA_INSN_STLOQ, SH64_MEDIA_SFMT_ALLOCO },
- { SH_INSN_STXB, SH64_MEDIA_INSN_STXB, SH64_MEDIA_SFMT_STXB },
- { SH_INSN_STXL, SH64_MEDIA_INSN_STXL, SH64_MEDIA_SFMT_STXB },
- { SH_INSN_STXQ, SH64_MEDIA_INSN_STXQ, SH64_MEDIA_SFMT_STXB },
- { SH_INSN_STXW, SH64_MEDIA_INSN_STXW, SH64_MEDIA_SFMT_STXB },
- { SH_INSN_SUB, SH64_MEDIA_INSN_SUB, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_SUBL, SH64_MEDIA_INSN_SUBL, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_SWAPQ, SH64_MEDIA_INSN_SWAPQ, SH64_MEDIA_SFMT_SWAPQ },
- { SH_INSN_SYNCI, SH64_MEDIA_INSN_SYNCI, SH64_MEDIA_SFMT_ALLOCO },
- { SH_INSN_SYNCO, SH64_MEDIA_INSN_SYNCO, SH64_MEDIA_SFMT_ALLOCO },
- { SH_INSN_TRAPA, SH64_MEDIA_INSN_TRAPA, SH64_MEDIA_SFMT_TRAPA },
- { SH_INSN_XOR, SH64_MEDIA_INSN_XOR, SH64_MEDIA_SFMT_ADD },
- { SH_INSN_XORI, SH64_MEDIA_INSN_XORI, SH64_MEDIA_SFMT_XORI },
-};
-
-static const struct insn_sem sh64_media_insn_sem_invalid = {
- VIRTUAL_INSN_X_INVALID, SH64_MEDIA_INSN_X_INVALID, SH64_MEDIA_SFMT_EMPTY
-};
-
-/* Initialize an IDESC from the compile-time computable parts. */
-
-static INLINE void
-init_idesc (SIM_CPU *cpu, IDESC *id, const struct insn_sem *t)
-{
- const CGEN_INSN *insn_table = CGEN_CPU_INSN_TABLE (CPU_CPU_DESC (cpu))->init_entries;
-
- id->num = t->index;
- id->sfmt = t->sfmt;
- if ((int) t->type <= 0)
- id->idata = & cgen_virtual_insn_table[- (int) t->type];
- else
- id->idata = & insn_table[t->type];
- id->attrs = CGEN_INSN_ATTRS (id->idata);
- /* Oh my god, a magic number. */
- id->length = CGEN_INSN_BITSIZE (id->idata) / 8;
-
-#if WITH_PROFILE_MODEL_P
- id->timing = & MODEL_TIMING (CPU_MODEL (cpu)) [t->index];
- {
- SIM_DESC sd = CPU_STATE (cpu);
- SIM_ASSERT (t->index == id->timing->num);
- }
-#endif
-
- /* Semantic pointers are initialized elsewhere. */
-}
-
-/* Initialize the instruction descriptor table. */
-
-void
-sh64_media_init_idesc_table (SIM_CPU *cpu)
-{
- IDESC *id,*tabend;
- const struct insn_sem *t,*tend;
- int tabsize = SH64_MEDIA_INSN_MAX;
- IDESC *table = sh64_media_insn_data;
-
- memset (table, 0, tabsize * sizeof (IDESC));
-
- /* First set all entries to the `invalid insn'. */
- t = & sh64_media_insn_sem_invalid;
- for (id = table, tabend = table + tabsize; id < tabend; ++id)
- init_idesc (cpu, id, t);
-
- /* Now fill in the values for the chosen cpu. */
- for (t = sh64_media_insn_sem, tend = t + sizeof (sh64_media_insn_sem) / sizeof (*t);
- t != tend; ++t)
- {
- init_idesc (cpu, & table[t->index], t);
- }
-
- /* Link the IDESC table into the cpu. */
- CPU_IDESC (cpu) = table;
-}
-
-/* Given an instruction, return a pointer to its IDESC entry. */
-
-const IDESC *
-sh64_media_decode (SIM_CPU *current_cpu, IADDR pc,
- CGEN_INSN_INT base_insn, CGEN_INSN_INT entire_insn,
- ARGBUF *abuf)
-{
- /* Result of decoder. */
- SH64_MEDIA_INSN_TYPE itype;
-
- {
- CGEN_INSN_INT insn = base_insn;
-
- {
- unsigned int val = (((insn >> 22) & (63 << 4)) | ((insn >> 16) & (15 << 0)));
- switch (val)
- {
- case 1 : itype = SH64_MEDIA_INSN_CMPEQ; goto extract_sfmt_add; case 3 : itype = SH64_MEDIA_INSN_CMPGT; goto extract_sfmt_add; case 7 : itype = SH64_MEDIA_INSN_CMPGTU; goto extract_sfmt_add; case 8 : itype = SH64_MEDIA_INSN_ADDL; goto extract_sfmt_add; case 9 : itype = SH64_MEDIA_INSN_ADD; goto extract_sfmt_add; case 10 : itype = SH64_MEDIA_INSN_SUBL; goto extract_sfmt_add; case 11 : itype = SH64_MEDIA_INSN_SUB; goto extract_sfmt_add; case 12 : itype = SH64_MEDIA_INSN_ADDZL; goto extract_sfmt_add; case 13 : itype = SH64_MEDIA_INSN_NSB; goto extract_sfmt_byterev; case 14 : itype = SH64_MEDIA_INSN_MULUL; goto extract_sfmt_add; case 15 : itype = SH64_MEDIA_INSN_BYTEREV; goto extract_sfmt_byterev; case 16 : itype = SH64_MEDIA_INSN_SHLLDL; goto extract_sfmt_add; case 17 : itype = SH64_MEDIA_INSN_SHLLD; goto extract_sfmt_add; case 18 : itype = SH64_MEDIA_INSN_SHLRDL; goto extract_sfmt_add; case 19 : itype = SH64_MEDIA_INSN_SHLRD; goto extract_sfmt_add; case 22 : itype = SH64_MEDIA_INSN_SHARDL; goto extract_sfmt_add; case 23 : itype = SH64_MEDIA_INSN_SHARD; goto extract_sfmt_add; case 25 : itype = SH64_MEDIA_INSN_OR; goto extract_sfmt_add; case 27 : itype = SH64_MEDIA_INSN_AND; goto extract_sfmt_add; case 29 : itype = SH64_MEDIA_INSN_XOR; goto extract_sfmt_add; case 30 : itype = SH64_MEDIA_INSN_MULSL; goto extract_sfmt_add; case 31 : itype = SH64_MEDIA_INSN_ANDC; goto extract_sfmt_add; case 33 : itype = SH64_MEDIA_INSN_MADDW; goto extract_sfmt_add; case 34 : itype = SH64_MEDIA_INSN_MADDL; goto extract_sfmt_add; case 36 : itype = SH64_MEDIA_INSN_MADDSUB; goto extract_sfmt_add; case 37 : itype = SH64_MEDIA_INSN_MADDSW; goto extract_sfmt_add; case 38 : itype = SH64_MEDIA_INSN_MADDSL; goto extract_sfmt_add; case 41 : itype = SH64_MEDIA_INSN_MSUBW; goto extract_sfmt_add; case 42 : itype = SH64_MEDIA_INSN_MSUBL; goto extract_sfmt_add; case 44 : itype = SH64_MEDIA_INSN_MSUBSUB; goto extract_sfmt_add; case 45 : itype = SH64_MEDIA_INSN_MSUBSW; goto extract_sfmt_add; case 46 : itype = SH64_MEDIA_INSN_MSUBSL; goto extract_sfmt_add; case 49 : itype = SH64_MEDIA_INSN_MSHLLDW; goto extract_sfmt_add; case 50 : itype = SH64_MEDIA_INSN_MSHLLDL; goto extract_sfmt_add; case 53 : itype = SH64_MEDIA_INSN_MSHALDSW; goto extract_sfmt_add; case 54 : itype = SH64_MEDIA_INSN_MSHALDSL; goto extract_sfmt_add; case 57 : itype = SH64_MEDIA_INSN_MSHARDW; goto extract_sfmt_add; case 58 : itype = SH64_MEDIA_INSN_MSHARDL; goto extract_sfmt_add; case 59 : itype = SH64_MEDIA_INSN_MSHARDSQ; goto extract_sfmt_add; case 61 : itype = SH64_MEDIA_INSN_MSHLRDW; goto extract_sfmt_add; case 62 : itype = SH64_MEDIA_INSN_MSHLRDL; goto extract_sfmt_add; case 86 : itype = SH64_MEDIA_INSN_FIPRS; goto extract_sfmt_fiprs; case 94 : itype = SH64_MEDIA_INSN_FTRVS; goto extract_sfmt_ftrvs; case 96 : itype = SH64_MEDIA_INSN_FABSS; goto extract_sfmt_fabss; case 97 : itype = SH64_MEDIA_INSN_FABSD; goto extract_sfmt_fabsd; case 98 : itype = SH64_MEDIA_INSN_FNEGS; goto extract_sfmt_fabss; case 99 : itype = SH64_MEDIA_INSN_FNEGD; goto extract_sfmt_fabsd; case 112 : itype = SH64_MEDIA_INSN_FMOVLS; goto extract_sfmt_fmovls; case 113 : itype = SH64_MEDIA_INSN_FMOVQD; goto extract_sfmt_fmovqd; case 114 : itype = SH64_MEDIA_INSN_FGETSCR; goto extract_sfmt_alloco; case 120 : itype = SH64_MEDIA_INSN_FLDXS; goto extract_sfmt_fldxs; case 121 : itype = SH64_MEDIA_INSN_FLDXD; goto extract_sfmt_fldxd; case 125 : itype = SH64_MEDIA_INSN_FLDXP; goto extract_sfmt_fldxp; case 129 : itype = SH64_MEDIA_INSN_CMVEQ; goto extract_sfmt_cmveq; case 131 : itype = SH64_MEDIA_INSN_SWAPQ; goto extract_sfmt_swapq; case 133 : itype = SH64_MEDIA_INSN_CMVNE; goto extract_sfmt_cmveq; case 159 : itype = SH64_MEDIA_INSN_GETCON; goto extract_sfmt_getcon; case 160 : itype = SH64_MEDIA_INSN_MCMPEQB; goto extract_sfmt_add; case 161 : itype = SH64_MEDIA_INSN_MCMPEQW; goto extract_sfmt_add; case 162 : itype = SH64_MEDIA_INSN_MCMPEQL; goto extract_sfmt_add; case 164 : itype = SH64_MEDIA_INSN_MCMPGTUB; goto extract_sfmt_add; case 165 : itype = SH64_MEDIA_INSN_MCMPGTW; goto extract_sfmt_add; case 166 : itype = SH64_MEDIA_INSN_MCMPGTL; goto extract_sfmt_add; case 167 : itype = SH64_MEDIA_INSN_MEXTR1; goto extract_sfmt_add; case 169 : itype = SH64_MEDIA_INSN_MABSW; goto extract_sfmt_byterev; case 170 : itype = SH64_MEDIA_INSN_MABSL; goto extract_sfmt_byterev; case 171 : itype = SH64_MEDIA_INSN_MEXTR2; goto extract_sfmt_add; case 173 : itype = SH64_MEDIA_INSN_MPERMW; goto extract_sfmt_mpermw; case 175 : itype = SH64_MEDIA_INSN_MEXTR3; goto extract_sfmt_add; case 176 : itype = SH64_MEDIA_INSN_MSHFLOB; goto extract_sfmt_add; case 177 : itype = SH64_MEDIA_INSN_MSHFLOW; goto extract_sfmt_add; case 178 : itype = SH64_MEDIA_INSN_MSHFLOL; goto extract_sfmt_add; case 179 : itype = SH64_MEDIA_INSN_MEXTR4; goto extract_sfmt_add; case 180 : itype = SH64_MEDIA_INSN_MSHFHIB; goto extract_sfmt_add; case 181 : itype = SH64_MEDIA_INSN_MSHFHIW; goto extract_sfmt_add; case 182 : itype = SH64_MEDIA_INSN_MSHFHIL; goto extract_sfmt_add; case 183 : itype = SH64_MEDIA_INSN_MEXTR5; goto extract_sfmt_add; case 187 : itype = SH64_MEDIA_INSN_MEXTR6; goto extract_sfmt_add; case 191 : itype = SH64_MEDIA_INSN_MEXTR7; goto extract_sfmt_add; case 192 : itype = SH64_MEDIA_INSN_FMOVSL; goto extract_sfmt_fmovsl; case 193 : itype = SH64_MEDIA_INSN_FMOVDQ; goto extract_sfmt_fmovdq; case 194 : itype = SH64_MEDIA_INSN_FPUTSCR; goto extract_sfmt_alloco; case 200 : itype = SH64_MEDIA_INSN_FCMPEQS; goto extract_sfmt_fcmpeqs; case 201 : itype = SH64_MEDIA_INSN_FCMPEQD; goto extract_sfmt_fcmpeqd; case 202 : itype = SH64_MEDIA_INSN_FCMPUNS; goto extract_sfmt_fcmpeqs; case 203 : itype = SH64_MEDIA_INSN_FCMPUND; goto extract_sfmt_fcmpeqd; case 204 : itype = SH64_MEDIA_INSN_FCMPGTS; goto extract_sfmt_fcmpeqs; case 205 : itype = SH64_MEDIA_INSN_FCMPGTD; goto extract_sfmt_fcmpeqd; case 206 : itype = SH64_MEDIA_INSN_FCMPGES; goto extract_sfmt_fcmpeqs; case 207 : itype = SH64_MEDIA_INSN_FCMPGED; goto extract_sfmt_fcmpeqd; case 208 : itype = SH64_MEDIA_INSN_FADDS; goto extract_sfmt_fadds; case 209 : itype = SH64_MEDIA_INSN_FADDD; goto extract_sfmt_faddd; case 210 : itype = SH64_MEDIA_INSN_FSUBS; goto extract_sfmt_fadds; case 211 : itype = SH64_MEDIA_INSN_FSUBD; goto extract_sfmt_faddd; case 212 : itype = SH64_MEDIA_INSN_FDIVS; goto extract_sfmt_fadds; case 213 : itype = SH64_MEDIA_INSN_FDIVD; goto extract_sfmt_faddd; case 214 : itype = SH64_MEDIA_INSN_FMULS; goto extract_sfmt_fadds; case 215 : itype = SH64_MEDIA_INSN_FMULD; goto extract_sfmt_faddd; case 222 : itype = SH64_MEDIA_INSN_FMACS; goto extract_sfmt_fmacs; case 224 : itype = SH64_MEDIA_INSN_FMOVS; goto extract_sfmt_fabss; case 225 : itype = SH64_MEDIA_INSN_FMOVD; goto extract_sfmt_fabsd; case 228 : itype = SH64_MEDIA_INSN_FSQRTS; goto extract_sfmt_fabss; case 229 : itype = SH64_MEDIA_INSN_FSQRTD; goto extract_sfmt_fabsd; case 230 : itype = SH64_MEDIA_INSN_FCNVSD; goto extract_sfmt_fcnvsd; case 231 : itype = SH64_MEDIA_INSN_FCNVDS; goto extract_sfmt_fcnvds; case 232 : itype = SH64_MEDIA_INSN_FTRCSL; goto extract_sfmt_fabss; case 233 : itype = SH64_MEDIA_INSN_FTRCDQ; goto extract_sfmt_fabsd; case 234 : itype = SH64_MEDIA_INSN_FTRCSQ; goto extract_sfmt_fcnvsd; case 235 : itype = SH64_MEDIA_INSN_FTRCDL; goto extract_sfmt_fcnvds; case 236 : itype = SH64_MEDIA_INSN_FLOATLS; goto extract_sfmt_fabss; case 237 : itype = SH64_MEDIA_INSN_FLOATQD; goto extract_sfmt_fabsd; case 238 : itype = SH64_MEDIA_INSN_FLOATLD; goto extract_sfmt_fcnvsd; case 239 : itype = SH64_MEDIA_INSN_FLOATQS; goto extract_sfmt_fcnvds; case 248 : itype = SH64_MEDIA_INSN_FSTXS; goto extract_sfmt_fstxs; case 249 : itype = SH64_MEDIA_INSN_FSTXD; goto extract_sfmt_fstxd; case 253 : itype = SH64_MEDIA_INSN_FSTXP; goto extract_sfmt_fstxp; case 256 : itype = SH64_MEDIA_INSN_LDXB; goto extract_sfmt_ldxb; case 257 : itype = SH64_MEDIA_INSN_LDXW; goto extract_sfmt_ldxb; case 258 : itype = SH64_MEDIA_INSN_LDXL; goto extract_sfmt_ldxb; case 259 : itype = SH64_MEDIA_INSN_LDXQ; goto extract_sfmt_ldxb; case 260 : itype = SH64_MEDIA_INSN_LDXUB; goto extract_sfmt_ldxb; case 261 : itype = SH64_MEDIA_INSN_LDXUW; goto extract_sfmt_ldxb; case 273 : itype = SH64_MEDIA_INSN_BLINK; goto extract_sfmt_blink; case 277 : itype = SH64_MEDIA_INSN_GETTR; goto extract_sfmt_gettr; case 288 : itype = SH64_MEDIA_INSN_MSADUBQ; goto extract_sfmt_mcmv; case 289 : itype = SH64_MEDIA_INSN_MMACFXWL; goto extract_sfmt_mcmv; case 291 : itype = SH64_MEDIA_INSN_MCMV; goto extract_sfmt_mcmv; case 293 : itype = SH64_MEDIA_INSN_MMACNFX_WL; goto extract_sfmt_mcmv; case 297 : itype = SH64_MEDIA_INSN_MMULSUMWQ; goto extract_sfmt_mcmv; case 305 : itype = SH64_MEDIA_INSN_MMULW; goto extract_sfmt_add; case 306 : itype = SH64_MEDIA_INSN_MMULL; goto extract_sfmt_add; case 309 : itype = SH64_MEDIA_INSN_MMULFXW; goto extract_sfmt_add; case 310 : itype = SH64_MEDIA_INSN_MMULFXL; goto extract_sfmt_add; case 312 : itype = SH64_MEDIA_INSN_MCNVSWB; goto extract_sfmt_add; case 313 : itype = SH64_MEDIA_INSN_MMULFXRPW; goto extract_sfmt_add; case 314 : itype = SH64_MEDIA_INSN_MMULLOWL; goto extract_sfmt_add; case 316 : itype = SH64_MEDIA_INSN_MCNVSWUB; goto extract_sfmt_add; case 317 : itype = SH64_MEDIA_INSN_MCNVSLW; goto extract_sfmt_add; case 318 : itype = SH64_MEDIA_INSN_MMULHIWL; goto extract_sfmt_add; case 384 : itype = SH64_MEDIA_INSN_STXB; goto extract_sfmt_stxb; case 385 : itype = SH64_MEDIA_INSN_STXW; goto extract_sfmt_stxb; case 386 : itype = SH64_MEDIA_INSN_STXL; goto extract_sfmt_stxb; case 387 : itype = SH64_MEDIA_INSN_STXQ; goto extract_sfmt_stxb; case 401 : itype = SH64_MEDIA_INSN_BEQ; goto extract_sfmt_beq; case 403 : itype = SH64_MEDIA_INSN_BGE; goto extract_sfmt_beq; case 405 : itype = SH64_MEDIA_INSN_BNE; goto extract_sfmt_beq; case 407 : itype = SH64_MEDIA_INSN_BGT; goto extract_sfmt_beq; case 411 : itype = SH64_MEDIA_INSN_BGEU; goto extract_sfmt_beq; case 415 : itype = SH64_MEDIA_INSN_BGTU; goto extract_sfmt_beq; case 417 : itype = SH64_MEDIA_INSN_PTABS; goto extract_sfmt_ptabs; case 421 : itype = SH64_MEDIA_INSN_PTREL; goto extract_sfmt_ptrel; case 432 : itype = SH64_MEDIA_INSN_NOP; goto extract_sfmt_alloco; case 433 : itype = SH64_MEDIA_INSN_TRAPA; goto extract_sfmt_trapa; case 434 : itype = SH64_MEDIA_INSN_SYNCI; goto extract_sfmt_alloco; case 435 : itype = SH64_MEDIA_INSN_RTE; goto extract_sfmt_alloco; case 437 : itype = SH64_MEDIA_INSN_BRK; goto extract_sfmt_brk; case 438 : itype = SH64_MEDIA_INSN_SYNCO; goto extract_sfmt_alloco; case 439 : itype = SH64_MEDIA_INSN_SLEEP; goto extract_sfmt_alloco; case 447 : itype = SH64_MEDIA_INSN_PUTCON; goto extract_sfmt_putcon; case 512 : /* fall through */
- case 513 : /* fall through */
- case 514 : /* fall through */
- case 515 : /* fall through */
- case 516 : /* fall through */
- case 517 : /* fall through */
- case 518 : /* fall through */
- case 519 : /* fall through */
- case 520 : /* fall through */
- case 521 : /* fall through */
- case 522 : /* fall through */
- case 523 : /* fall through */
- case 524 : /* fall through */
- case 525 : /* fall through */
- case 526 : /* fall through */
- case 527 : itype = SH64_MEDIA_INSN_LDB; goto extract_sfmt_ldb; case 528 : /* fall through */
- case 529 : /* fall through */
- case 530 : /* fall through */
- case 531 : /* fall through */
- case 532 : /* fall through */
- case 533 : /* fall through */
- case 534 : /* fall through */
- case 535 : /* fall through */
- case 536 : /* fall through */
- case 537 : /* fall through */
- case 538 : /* fall through */
- case 539 : /* fall through */
- case 540 : /* fall through */
- case 541 : /* fall through */
- case 542 : /* fall through */
- case 543 : itype = SH64_MEDIA_INSN_LDW; goto extract_sfmt_lduw; case 544 : /* fall through */
- case 545 : /* fall through */
- case 546 : /* fall through */
- case 547 : /* fall through */
- case 548 : /* fall through */
- case 549 : /* fall through */
- case 550 : /* fall through */
- case 551 : /* fall through */
- case 552 : /* fall through */
- case 553 : /* fall through */
- case 554 : /* fall through */
- case 555 : /* fall through */
- case 556 : /* fall through */
- case 557 : /* fall through */
- case 558 : /* fall through */
- case 559 : itype = SH64_MEDIA_INSN_LDL; goto extract_sfmt_ldl; case 560 : /* fall through */
- case 561 : /* fall through */
- case 562 : /* fall through */
- case 563 : /* fall through */
- case 564 : /* fall through */
- case 565 : /* fall through */
- case 566 : /* fall through */
- case 567 : /* fall through */
- case 568 : /* fall through */
- case 569 : /* fall through */
- case 570 : /* fall through */
- case 571 : /* fall through */
- case 572 : /* fall through */
- case 573 : /* fall through */
- case 574 : /* fall through */
- case 575 : itype = SH64_MEDIA_INSN_LDQ; goto extract_sfmt_ldq; case 576 : /* fall through */
- case 577 : /* fall through */
- case 578 : /* fall through */
- case 579 : /* fall through */
- case 580 : /* fall through */
- case 581 : /* fall through */
- case 582 : /* fall through */
- case 583 : /* fall through */
- case 584 : /* fall through */
- case 585 : /* fall through */
- case 586 : /* fall through */
- case 587 : /* fall through */
- case 588 : /* fall through */
- case 589 : /* fall through */
- case 590 : /* fall through */
- case 591 : itype = SH64_MEDIA_INSN_LDUB; goto extract_sfmt_ldb; case 592 : /* fall through */
- case 593 : /* fall through */
- case 594 : /* fall through */
- case 595 : /* fall through */
- case 596 : /* fall through */
- case 597 : /* fall through */
- case 598 : /* fall through */
- case 599 : /* fall through */
- case 600 : /* fall through */
- case 601 : /* fall through */
- case 602 : /* fall through */
- case 603 : /* fall through */
- case 604 : /* fall through */
- case 605 : /* fall through */
- case 606 : /* fall through */
- case 607 : itype = SH64_MEDIA_INSN_FLDS; goto extract_sfmt_flds; case 608 : /* fall through */
- case 609 : /* fall through */
- case 610 : /* fall through */
- case 611 : /* fall through */
- case 612 : /* fall through */
- case 613 : /* fall through */
- case 614 : /* fall through */
- case 615 : /* fall through */
- case 616 : /* fall through */
- case 617 : /* fall through */
- case 618 : /* fall through */
- case 619 : /* fall through */
- case 620 : /* fall through */
- case 621 : /* fall through */
- case 622 : /* fall through */
- case 623 : itype = SH64_MEDIA_INSN_FLDP; goto extract_sfmt_fldp; case 624 : /* fall through */
- case 625 : /* fall through */
- case 626 : /* fall through */
- case 627 : /* fall through */
- case 628 : /* fall through */
- case 629 : /* fall through */
- case 630 : /* fall through */
- case 631 : /* fall through */
- case 632 : /* fall through */
- case 633 : /* fall through */
- case 634 : /* fall through */
- case 635 : /* fall through */
- case 636 : /* fall through */
- case 637 : /* fall through */
- case 638 : /* fall through */
- case 639 : itype = SH64_MEDIA_INSN_FLDD; goto extract_sfmt_fldd; case 640 : /* fall through */
- case 641 : /* fall through */
- case 642 : /* fall through */
- case 643 : /* fall through */
- case 644 : /* fall through */
- case 645 : /* fall through */
- case 646 : /* fall through */
- case 647 : /* fall through */
- case 648 : /* fall through */
- case 649 : /* fall through */
- case 650 : /* fall through */
- case 651 : /* fall through */
- case 652 : /* fall through */
- case 653 : /* fall through */
- case 654 : /* fall through */
- case 655 : itype = SH64_MEDIA_INSN_STB; goto extract_sfmt_stb; case 656 : /* fall through */
- case 657 : /* fall through */
- case 658 : /* fall through */
- case 659 : /* fall through */
- case 660 : /* fall through */
- case 661 : /* fall through */
- case 662 : /* fall through */
- case 663 : /* fall through */
- case 664 : /* fall through */
- case 665 : /* fall through */
- case 666 : /* fall through */
- case 667 : /* fall through */
- case 668 : /* fall through */
- case 669 : /* fall through */
- case 670 : /* fall through */
- case 671 : itype = SH64_MEDIA_INSN_STW; goto extract_sfmt_stw; case 672 : /* fall through */
- case 673 : /* fall through */
- case 674 : /* fall through */
- case 675 : /* fall through */
- case 676 : /* fall through */
- case 677 : /* fall through */
- case 678 : /* fall through */
- case 679 : /* fall through */
- case 680 : /* fall through */
- case 681 : /* fall through */
- case 682 : /* fall through */
- case 683 : /* fall through */
- case 684 : /* fall through */
- case 685 : /* fall through */
- case 686 : /* fall through */
- case 687 : itype = SH64_MEDIA_INSN_STL; goto extract_sfmt_stl; case 688 : /* fall through */
- case 689 : /* fall through */
- case 690 : /* fall through */
- case 691 : /* fall through */
- case 692 : /* fall through */
- case 693 : /* fall through */
- case 694 : /* fall through */
- case 695 : /* fall through */
- case 696 : /* fall through */
- case 697 : /* fall through */
- case 698 : /* fall through */
- case 699 : /* fall through */
- case 700 : /* fall through */
- case 701 : /* fall through */
- case 702 : /* fall through */
- case 703 : itype = SH64_MEDIA_INSN_STQ; goto extract_sfmt_stq; case 704 : /* fall through */
- case 705 : /* fall through */
- case 706 : /* fall through */
- case 707 : /* fall through */
- case 708 : /* fall through */
- case 709 : /* fall through */
- case 710 : /* fall through */
- case 711 : /* fall through */
- case 712 : /* fall through */
- case 713 : /* fall through */
- case 714 : /* fall through */
- case 715 : /* fall through */
- case 716 : /* fall through */
- case 717 : /* fall through */
- case 718 : /* fall through */
- case 719 : itype = SH64_MEDIA_INSN_LDUW; goto extract_sfmt_lduw; case 720 : /* fall through */
- case 721 : /* fall through */
- case 722 : /* fall through */
- case 723 : /* fall through */
- case 724 : /* fall through */
- case 725 : /* fall through */
- case 726 : /* fall through */
- case 727 : /* fall through */
- case 728 : /* fall through */
- case 729 : /* fall through */
- case 730 : /* fall through */
- case 731 : /* fall through */
- case 732 : /* fall through */
- case 733 : /* fall through */
- case 734 : /* fall through */
- case 735 : itype = SH64_MEDIA_INSN_FSTS; goto extract_sfmt_fsts; case 736 : /* fall through */
- case 737 : /* fall through */
- case 738 : /* fall through */
- case 739 : /* fall through */
- case 740 : /* fall through */
- case 741 : /* fall through */
- case 742 : /* fall through */
- case 743 : /* fall through */
- case 744 : /* fall through */
- case 745 : /* fall through */
- case 746 : /* fall through */
- case 747 : /* fall through */
- case 748 : /* fall through */
- case 749 : /* fall through */
- case 750 : /* fall through */
- case 751 : itype = SH64_MEDIA_INSN_FSTP; goto extract_sfmt_fstp; case 752 : /* fall through */
- case 753 : /* fall through */
- case 754 : /* fall through */
- case 755 : /* fall through */
- case 756 : /* fall through */
- case 757 : /* fall through */
- case 758 : /* fall through */
- case 759 : /* fall through */
- case 760 : /* fall through */
- case 761 : /* fall through */
- case 762 : /* fall through */
- case 763 : /* fall through */
- case 764 : /* fall through */
- case 765 : /* fall through */
- case 766 : /* fall through */
- case 767 : itype = SH64_MEDIA_INSN_FSTD; goto extract_sfmt_fstd; case 770 : itype = SH64_MEDIA_INSN_LDLOL; goto extract_sfmt_alloco; case 771 : itype = SH64_MEDIA_INSN_LDLOQ; goto extract_sfmt_alloco; case 774 : itype = SH64_MEDIA_INSN_LDHIL; goto extract_sfmt_alloco; case 775 : itype = SH64_MEDIA_INSN_LDHIQ; goto extract_sfmt_alloco; case 783 : itype = SH64_MEDIA_INSN_GETCFG; goto extract_sfmt_alloco; case 784 : itype = SH64_MEDIA_INSN_SHLLIL; goto extract_sfmt_sharil; case 785 : itype = SH64_MEDIA_INSN_SHLLI; goto extract_sfmt_shari; case 786 : itype = SH64_MEDIA_INSN_SHLRIL; goto extract_sfmt_sharil; case 787 : itype = SH64_MEDIA_INSN_SHLRI; goto extract_sfmt_shari; case 790 : itype = SH64_MEDIA_INSN_SHARIL; goto extract_sfmt_sharil; case 791 : itype = SH64_MEDIA_INSN_SHARI; goto extract_sfmt_shari; case 797 : itype = SH64_MEDIA_INSN_XORI; goto extract_sfmt_xori; case 800 : /* fall through */
- case 801 : /* fall through */
- case 802 : /* fall through */
- case 803 : /* fall through */
- case 804 : /* fall through */
- case 805 : /* fall through */
- case 806 : /* fall through */
- case 807 : /* fall through */
- case 808 : /* fall through */
- case 809 : /* fall through */
- case 810 : /* fall through */
- case 811 : /* fall through */
- case 812 : /* fall through */
- case 813 : /* fall through */
- case 814 : /* fall through */
- case 815 : itype = SH64_MEDIA_INSN_SHORI; goto extract_sfmt_shori; case 816 : /* fall through */
- case 817 : /* fall through */
- case 818 : /* fall through */
- case 819 : /* fall through */
- case 820 : /* fall through */
- case 821 : /* fall through */
- case 822 : /* fall through */
- case 823 : /* fall through */
- case 824 : /* fall through */
- case 825 : /* fall through */
- case 826 : /* fall through */
- case 827 : /* fall through */
- case 828 : /* fall through */
- case 829 : /* fall through */
- case 830 : /* fall through */
- case 831 : itype = SH64_MEDIA_INSN_MOVI; goto extract_sfmt_movi; case 832 : /* fall through */
- case 833 : /* fall through */
- case 834 : /* fall through */
- case 835 : /* fall through */
- case 836 : /* fall through */
- case 837 : /* fall through */
- case 838 : /* fall through */
- case 839 : /* fall through */
- case 840 : /* fall through */
- case 841 : /* fall through */
- case 842 : /* fall through */
- case 843 : /* fall through */
- case 844 : /* fall through */
- case 845 : /* fall through */
- case 846 : /* fall through */
- case 847 : itype = SH64_MEDIA_INSN_ADDI; goto extract_sfmt_addi; case 848 : /* fall through */
- case 849 : /* fall through */
- case 850 : /* fall through */
- case 851 : /* fall through */
- case 852 : /* fall through */
- case 853 : /* fall through */
- case 854 : /* fall through */
- case 855 : /* fall through */
- case 856 : /* fall through */
- case 857 : /* fall through */
- case 858 : /* fall through */
- case 859 : /* fall through */
- case 860 : /* fall through */
- case 861 : /* fall through */
- case 862 : /* fall through */
- case 863 : itype = SH64_MEDIA_INSN_ADDIL; goto extract_sfmt_addi; case 864 : /* fall through */
- case 865 : /* fall through */
- case 866 : /* fall through */
- case 867 : /* fall through */
- case 868 : /* fall through */
- case 869 : /* fall through */
- case 870 : /* fall through */
- case 871 : /* fall through */
- case 872 : /* fall through */
- case 873 : /* fall through */
- case 874 : /* fall through */
- case 875 : /* fall through */
- case 876 : /* fall through */
- case 877 : /* fall through */
- case 878 : /* fall through */
- case 879 : itype = SH64_MEDIA_INSN_ANDI; goto extract_sfmt_addi; case 880 : /* fall through */
- case 881 : /* fall through */
- case 882 : /* fall through */
- case 883 : /* fall through */
- case 884 : /* fall through */
- case 885 : /* fall through */
- case 886 : /* fall through */
- case 887 : /* fall through */
- case 888 : /* fall through */
- case 889 : /* fall through */
- case 890 : /* fall through */
- case 891 : /* fall through */
- case 892 : /* fall through */
- case 893 : /* fall through */
- case 894 : /* fall through */
- case 895 : itype = SH64_MEDIA_INSN_ORI; goto extract_sfmt_ori; case 897 : itype = SH64_MEDIA_INSN_PREFI; goto extract_sfmt_alloco; case 898 : itype = SH64_MEDIA_INSN_STLOL; goto extract_sfmt_alloco; case 899 : itype = SH64_MEDIA_INSN_STLOQ; goto extract_sfmt_alloco; case 900 : itype = SH64_MEDIA_INSN_ALLOCO; goto extract_sfmt_alloco; case 901 : itype = SH64_MEDIA_INSN_ICBI; goto extract_sfmt_alloco; case 902 : itype = SH64_MEDIA_INSN_STHIL; goto extract_sfmt_sthil; case 903 : itype = SH64_MEDIA_INSN_STHIQ; goto extract_sfmt_sthil; case 904 : itype = SH64_MEDIA_INSN_OCBP; goto extract_sfmt_alloco; case 905 : itype = SH64_MEDIA_INSN_OCBI; goto extract_sfmt_alloco; case 908 : itype = SH64_MEDIA_INSN_OCBWB; goto extract_sfmt_alloco; case 911 : itype = SH64_MEDIA_INSN_PUTCFG; goto extract_sfmt_alloco; case 913 : itype = SH64_MEDIA_INSN_BEQI; goto extract_sfmt_beqi; case 917 : itype = SH64_MEDIA_INSN_BNEI; goto extract_sfmt_beqi; case 928 : /* fall through */
- case 929 : /* fall through */
- case 930 : /* fall through */
- case 931 : /* fall through */
- case 932 : /* fall through */
- case 933 : /* fall through */
- case 934 : /* fall through */
- case 935 : /* fall through */
- case 936 : /* fall through */
- case 937 : /* fall through */
- case 938 : /* fall through */
- case 939 : /* fall through */
- case 940 : /* fall through */
- case 941 : /* fall through */
- case 942 : /* fall through */
- case 943 : itype = SH64_MEDIA_INSN_PTA; goto extract_sfmt_pta; case 944 : /* fall through */
- case 945 : /* fall through */
- case 946 : /* fall through */
- case 947 : /* fall through */
- case 948 : /* fall through */
- case 949 : /* fall through */
- case 950 : /* fall through */
- case 951 : /* fall through */
- case 952 : /* fall through */
- case 953 : /* fall through */
- case 954 : /* fall through */
- case 955 : /* fall through */
- case 956 : /* fall through */
- case 957 : /* fall through */
- case 958 : /* fall through */
- case 959 : itype = SH64_MEDIA_INSN_PTB; goto extract_sfmt_pta; default : itype = SH64_MEDIA_INSN_X_INVALID; goto extract_sfmt_empty;
- }
- }
- }
-
- /* The instruction has been decoded, now extract the fields. */
-
- extract_sfmt_empty:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
-#define FLD(f) abuf->fields.fmt_empty.f
-
-
- /* Record the fields for the semantic handler. */
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_empty", (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_add:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_add.f
- UINT f_left;
- UINT f_right;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_left) = f_left;
- FLD (f_right) = f_right;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_add", "f_left 0x%x", 'x', f_left, "f_right 0x%x", 'x', f_right, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_addi:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_addi.f
- UINT f_left;
- INT f_disp10;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_disp10 = EXTRACT_LSB0_INT (insn, 32, 19, 10);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_disp10) = f_disp10;
- FLD (f_left) = f_left;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addi", "f_disp10 0x%x", 'x', f_disp10, "f_left 0x%x", 'x', f_left, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_alloco:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
-#define FLD(f) abuf->fields.fmt_empty.f
-
-
- /* Record the fields for the semantic handler. */
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_alloco", (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_beq:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_beq.f
- UINT f_left;
- UINT f_right;
- UINT f_tra;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6);
- f_tra = EXTRACT_LSB0_UINT (insn, 32, 6, 3);
-
- /* Record the fields for the semantic handler. */
- FLD (f_left) = f_left;
- FLD (f_right) = f_right;
- FLD (f_tra) = f_tra;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_beq", "f_left 0x%x", 'x', f_left, "f_right 0x%x", 'x', f_right, "f_tra 0x%x", 'x', f_tra, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_beqi:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_beqi.f
- UINT f_left;
- INT f_imm6;
- UINT f_tra;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_imm6 = EXTRACT_LSB0_INT (insn, 32, 15, 6);
- f_tra = EXTRACT_LSB0_UINT (insn, 32, 6, 3);
-
- /* Record the fields for the semantic handler. */
- FLD (f_imm6) = f_imm6;
- FLD (f_left) = f_left;
- FLD (f_tra) = f_tra;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_beqi", "f_imm6 0x%x", 'x', f_imm6, "f_left 0x%x", 'x', f_left, "f_tra 0x%x", 'x', f_tra, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_blink:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_blink.f
- UINT f_trb;
- UINT f_dest;
-
- f_trb = EXTRACT_LSB0_UINT (insn, 32, 22, 3);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_trb) = f_trb;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_blink", "f_trb 0x%x", 'x', f_trb, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_brk:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
-#define FLD(f) abuf->fields.fmt_empty.f
-
-
- /* Record the fields for the semantic handler. */
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_brk", (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_byterev:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_xori.f
- UINT f_left;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_left) = f_left;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_byterev", "f_left 0x%x", 'x', f_left, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_cmveq:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_add.f
- UINT f_left;
- UINT f_right;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_left) = f_left;
- FLD (f_right) = f_right;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmveq", "f_left 0x%x", 'x', f_left, "f_right 0x%x", 'x', f_right, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fabsd:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- UINT f_left;
- UINT f_right;
- UINT f_dest;
- UINT f_left_right;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
- f_left_right = f_left;
-
- /* Record the fields for the semantic handler. */
- FLD (f_left_right) = f_left_right;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fabsd", "f_left_right 0x%x", 'x', f_left_right, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fabss:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- UINT f_left;
- UINT f_right;
- UINT f_dest;
- UINT f_left_right;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
- f_left_right = f_left;
-
- /* Record the fields for the semantic handler. */
- FLD (f_left_right) = f_left_right;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fabss", "f_left_right 0x%x", 'x', f_left_right, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_faddd:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_add.f
- UINT f_left;
- UINT f_right;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_left) = f_left;
- FLD (f_right) = f_right;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_faddd", "f_left 0x%x", 'x', f_left, "f_right 0x%x", 'x', f_right, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fadds:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_add.f
- UINT f_left;
- UINT f_right;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_left) = f_left;
- FLD (f_right) = f_right;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fadds", "f_left 0x%x", 'x', f_left, "f_right 0x%x", 'x', f_right, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fcmpeqd:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_add.f
- UINT f_left;
- UINT f_right;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_left) = f_left;
- FLD (f_right) = f_right;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fcmpeqd", "f_left 0x%x", 'x', f_left, "f_right 0x%x", 'x', f_right, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fcmpeqs:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_add.f
- UINT f_left;
- UINT f_right;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_left) = f_left;
- FLD (f_right) = f_right;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fcmpeqs", "f_left 0x%x", 'x', f_left, "f_right 0x%x", 'x', f_right, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fcnvds:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- UINT f_left;
- UINT f_right;
- UINT f_dest;
- UINT f_left_right;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
- f_left_right = f_left;
-
- /* Record the fields for the semantic handler. */
- FLD (f_left_right) = f_left_right;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fcnvds", "f_left_right 0x%x", 'x', f_left_right, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fcnvsd:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- UINT f_left;
- UINT f_right;
- UINT f_dest;
- UINT f_left_right;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
- f_left_right = f_left;
-
- /* Record the fields for the semantic handler. */
- FLD (f_left_right) = f_left_right;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fcnvsd", "f_left_right 0x%x", 'x', f_left_right, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fiprs:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_add.f
- UINT f_left;
- UINT f_right;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_left) = f_left;
- FLD (f_right) = f_right;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fiprs", "f_left 0x%x", 'x', f_left, "f_right 0x%x", 'x', f_right, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fldd:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_fldd.f
- UINT f_left;
- SI f_disp10x8;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_disp10x8 = ((EXTRACT_LSB0_INT (insn, 32, 19, 10)) << (3));
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_disp10x8) = f_disp10x8;
- FLD (f_left) = f_left;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fldd", "f_disp10x8 0x%x", 'x', f_disp10x8, "f_left 0x%x", 'x', f_left, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fldp:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_fldd.f
- UINT f_left;
- SI f_disp10x8;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_disp10x8 = ((EXTRACT_LSB0_INT (insn, 32, 19, 10)) << (3));
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_disp10x8) = f_disp10x8;
- FLD (f_dest) = f_dest;
- FLD (f_left) = f_left;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fldp", "f_disp10x8 0x%x", 'x', f_disp10x8, "f_dest 0x%x", 'x', f_dest, "f_left 0x%x", 'x', f_left, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_flds:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_flds.f
- UINT f_left;
- SI f_disp10x4;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_disp10x4 = ((EXTRACT_LSB0_INT (insn, 32, 19, 10)) << (2));
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_disp10x4) = f_disp10x4;
- FLD (f_left) = f_left;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_flds", "f_disp10x4 0x%x", 'x', f_disp10x4, "f_left 0x%x", 'x', f_left, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fldxd:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_add.f
- UINT f_left;
- UINT f_right;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_left) = f_left;
- FLD (f_right) = f_right;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fldxd", "f_left 0x%x", 'x', f_left, "f_right 0x%x", 'x', f_right, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fldxp:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_add.f
- UINT f_left;
- UINT f_right;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_dest) = f_dest;
- FLD (f_left) = f_left;
- FLD (f_right) = f_right;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fldxp", "f_dest 0x%x", 'x', f_dest, "f_left 0x%x", 'x', f_left, "f_right 0x%x", 'x', f_right, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fldxs:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_add.f
- UINT f_left;
- UINT f_right;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_left) = f_left;
- FLD (f_right) = f_right;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fldxs", "f_left 0x%x", 'x', f_left, "f_right 0x%x", 'x', f_right, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fmacs:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_add.f
- UINT f_left;
- UINT f_right;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_dest) = f_dest;
- FLD (f_left) = f_left;
- FLD (f_right) = f_right;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fmacs", "f_dest 0x%x", 'x', f_dest, "f_left 0x%x", 'x', f_left, "f_right 0x%x", 'x', f_right, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fmovdq:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- UINT f_left;
- UINT f_right;
- UINT f_dest;
- UINT f_left_right;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
- f_left_right = f_left;
-
- /* Record the fields for the semantic handler. */
- FLD (f_left_right) = f_left_right;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fmovdq", "f_left_right 0x%x", 'x', f_left_right, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fmovls:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_xori.f
- UINT f_left;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_left) = f_left;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fmovls", "f_left 0x%x", 'x', f_left, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fmovqd:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_xori.f
- UINT f_left;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_left) = f_left;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fmovqd", "f_left 0x%x", 'x', f_left, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fmovsl:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- UINT f_left;
- UINT f_right;
- UINT f_dest;
- UINT f_left_right;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
- f_left_right = f_left;
-
- /* Record the fields for the semantic handler. */
- FLD (f_left_right) = f_left_right;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fmovsl", "f_left_right 0x%x", 'x', f_left_right, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fstd:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_fldd.f
- UINT f_left;
- SI f_disp10x8;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_disp10x8 = ((EXTRACT_LSB0_INT (insn, 32, 19, 10)) << (3));
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_disp10x8) = f_disp10x8;
- FLD (f_dest) = f_dest;
- FLD (f_left) = f_left;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fstd", "f_disp10x8 0x%x", 'x', f_disp10x8, "f_dest 0x%x", 'x', f_dest, "f_left 0x%x", 'x', f_left, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fstp:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_fldd.f
- UINT f_left;
- SI f_disp10x8;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_disp10x8 = ((EXTRACT_LSB0_INT (insn, 32, 19, 10)) << (3));
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_disp10x8) = f_disp10x8;
- FLD (f_dest) = f_dest;
- FLD (f_left) = f_left;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fstp", "f_disp10x8 0x%x", 'x', f_disp10x8, "f_dest 0x%x", 'x', f_dest, "f_left 0x%x", 'x', f_left, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fsts:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_flds.f
- UINT f_left;
- SI f_disp10x4;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_disp10x4 = ((EXTRACT_LSB0_INT (insn, 32, 19, 10)) << (2));
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_disp10x4) = f_disp10x4;
- FLD (f_dest) = f_dest;
- FLD (f_left) = f_left;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fsts", "f_disp10x4 0x%x", 'x', f_disp10x4, "f_dest 0x%x", 'x', f_dest, "f_left 0x%x", 'x', f_left, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fstxd:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_add.f
- UINT f_left;
- UINT f_right;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_dest) = f_dest;
- FLD (f_left) = f_left;
- FLD (f_right) = f_right;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fstxd", "f_dest 0x%x", 'x', f_dest, "f_left 0x%x", 'x', f_left, "f_right 0x%x", 'x', f_right, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fstxp:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_add.f
- UINT f_left;
- UINT f_right;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_dest) = f_dest;
- FLD (f_left) = f_left;
- FLD (f_right) = f_right;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fstxp", "f_dest 0x%x", 'x', f_dest, "f_left 0x%x", 'x', f_left, "f_right 0x%x", 'x', f_right, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_fstxs:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_add.f
- UINT f_left;
- UINT f_right;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_dest) = f_dest;
- FLD (f_left) = f_left;
- FLD (f_right) = f_right;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fstxs", "f_dest 0x%x", 'x', f_dest, "f_left 0x%x", 'x', f_left, "f_right 0x%x", 'x', f_right, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_ftrvs:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_add.f
- UINT f_left;
- UINT f_right;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_dest) = f_dest;
- FLD (f_left) = f_left;
- FLD (f_right) = f_right;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ftrvs", "f_dest 0x%x", 'x', f_dest, "f_left 0x%x", 'x', f_left, "f_right 0x%x", 'x', f_right, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_getcon:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_xori.f
- UINT f_left;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_left) = f_left;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_getcon", "f_left 0x%x", 'x', f_left, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_gettr:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_blink.f
- UINT f_trb;
- UINT f_dest;
-
- f_trb = EXTRACT_LSB0_UINT (insn, 32, 22, 3);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_trb) = f_trb;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_gettr", "f_trb 0x%x", 'x', f_trb, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_ldb:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_addi.f
- UINT f_left;
- INT f_disp10;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_disp10 = EXTRACT_LSB0_INT (insn, 32, 19, 10);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_disp10) = f_disp10;
- FLD (f_left) = f_left;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldb", "f_disp10 0x%x", 'x', f_disp10, "f_left 0x%x", 'x', f_left, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_ldl:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_flds.f
- UINT f_left;
- SI f_disp10x4;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_disp10x4 = ((EXTRACT_LSB0_INT (insn, 32, 19, 10)) << (2));
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_disp10x4) = f_disp10x4;
- FLD (f_left) = f_left;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldl", "f_disp10x4 0x%x", 'x', f_disp10x4, "f_left 0x%x", 'x', f_left, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_ldq:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_fldd.f
- UINT f_left;
- SI f_disp10x8;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_disp10x8 = ((EXTRACT_LSB0_INT (insn, 32, 19, 10)) << (3));
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_disp10x8) = f_disp10x8;
- FLD (f_left) = f_left;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldq", "f_disp10x8 0x%x", 'x', f_disp10x8, "f_left 0x%x", 'x', f_left, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_lduw:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_lduw.f
- UINT f_left;
- SI f_disp10x2;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_disp10x2 = ((EXTRACT_LSB0_INT (insn, 32, 19, 10)) << (1));
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_disp10x2) = f_disp10x2;
- FLD (f_left) = f_left;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lduw", "f_disp10x2 0x%x", 'x', f_disp10x2, "f_left 0x%x", 'x', f_left, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_ldxb:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_add.f
- UINT f_left;
- UINT f_right;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_left) = f_left;
- FLD (f_right) = f_right;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldxb", "f_left 0x%x", 'x', f_left, "f_right 0x%x", 'x', f_right, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_mcmv:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_add.f
- UINT f_left;
- UINT f_right;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_dest) = f_dest;
- FLD (f_left) = f_left;
- FLD (f_right) = f_right;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mcmv", "f_dest 0x%x", 'x', f_dest, "f_left 0x%x", 'x', f_left, "f_right 0x%x", 'x', f_right, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_movi:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_movi.f
- INT f_imm16;
- UINT f_dest;
-
- f_imm16 = EXTRACT_LSB0_INT (insn, 32, 25, 16);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_imm16) = f_imm16;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movi", "f_imm16 0x%x", 'x', f_imm16, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_mpermw:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_add.f
- UINT f_left;
- UINT f_right;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_left) = f_left;
- FLD (f_right) = f_right;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mpermw", "f_left 0x%x", 'x', f_left, "f_right 0x%x", 'x', f_right, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_ori:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_ori.f
- UINT f_left;
- INT f_imm10;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_imm10 = EXTRACT_LSB0_INT (insn, 32, 19, 10);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_imm10) = f_imm10;
- FLD (f_left) = f_left;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ori", "f_imm10 0x%x", 'x', f_imm10, "f_left 0x%x", 'x', f_left, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_pta:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_pta.f
- DI f_disp16;
- UINT f_tra;
-
- f_disp16 = ((((EXTRACT_LSB0_INT (insn, 32, 25, 16)) << (2))) + (pc));
- f_tra = EXTRACT_LSB0_UINT (insn, 32, 6, 3);
-
- /* Record the fields for the semantic handler. */
- FLD (f_disp16) = f_disp16;
- FLD (f_tra) = f_tra;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_pta", "f_disp16 0x%x", 'x', f_disp16, "f_tra 0x%x", 'x', f_tra, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_ptabs:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_beq.f
- UINT f_right;
- UINT f_tra;
-
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6);
- f_tra = EXTRACT_LSB0_UINT (insn, 32, 6, 3);
-
- /* Record the fields for the semantic handler. */
- FLD (f_right) = f_right;
- FLD (f_tra) = f_tra;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ptabs", "f_right 0x%x", 'x', f_right, "f_tra 0x%x", 'x', f_tra, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_ptrel:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_beq.f
- UINT f_right;
- UINT f_tra;
-
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6);
- f_tra = EXTRACT_LSB0_UINT (insn, 32, 6, 3);
-
- /* Record the fields for the semantic handler. */
- FLD (f_right) = f_right;
- FLD (f_tra) = f_tra;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ptrel", "f_right 0x%x", 'x', f_right, "f_tra 0x%x", 'x', f_tra, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_putcon:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_xori.f
- UINT f_left;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_left) = f_left;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_putcon", "f_left 0x%x", 'x', f_left, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_shari:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_shari.f
- UINT f_left;
- UINT f_uimm6;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_uimm6 = EXTRACT_LSB0_UINT (insn, 32, 15, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_left) = f_left;
- FLD (f_uimm6) = f_uimm6;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_shari", "f_left 0x%x", 'x', f_left, "f_uimm6 0x%x", 'x', f_uimm6, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_sharil:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_shari.f
- UINT f_left;
- UINT f_uimm6;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_uimm6 = EXTRACT_LSB0_UINT (insn, 32, 15, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_left) = f_left;
- FLD (f_uimm6) = f_uimm6;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sharil", "f_left 0x%x", 'x', f_left, "f_uimm6 0x%x", 'x', f_uimm6, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_shori:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_shori.f
- UINT f_uimm16;
- UINT f_dest;
-
- f_uimm16 = EXTRACT_LSB0_UINT (insn, 32, 25, 16);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_dest) = f_dest;
- FLD (f_uimm16) = f_uimm16;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_shori", "f_dest 0x%x", 'x', f_dest, "f_uimm16 0x%x", 'x', f_uimm16, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_stb:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_addi.f
- UINT f_left;
- INT f_disp10;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_disp10 = EXTRACT_LSB0_INT (insn, 32, 19, 10);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_disp10) = f_disp10;
- FLD (f_dest) = f_dest;
- FLD (f_left) = f_left;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stb", "f_disp10 0x%x", 'x', f_disp10, "f_dest 0x%x", 'x', f_dest, "f_left 0x%x", 'x', f_left, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_stl:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_flds.f
- UINT f_left;
- SI f_disp10x4;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_disp10x4 = ((EXTRACT_LSB0_INT (insn, 32, 19, 10)) << (2));
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_disp10x4) = f_disp10x4;
- FLD (f_dest) = f_dest;
- FLD (f_left) = f_left;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stl", "f_disp10x4 0x%x", 'x', f_disp10x4, "f_dest 0x%x", 'x', f_dest, "f_left 0x%x", 'x', f_left, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_stq:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_fldd.f
- UINT f_left;
- SI f_disp10x8;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_disp10x8 = ((EXTRACT_LSB0_INT (insn, 32, 19, 10)) << (3));
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_disp10x8) = f_disp10x8;
- FLD (f_dest) = f_dest;
- FLD (f_left) = f_left;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stq", "f_disp10x8 0x%x", 'x', f_disp10x8, "f_dest 0x%x", 'x', f_dest, "f_left 0x%x", 'x', f_left, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_stw:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_lduw.f
- UINT f_left;
- SI f_disp10x2;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_disp10x2 = ((EXTRACT_LSB0_INT (insn, 32, 19, 10)) << (1));
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_disp10x2) = f_disp10x2;
- FLD (f_dest) = f_dest;
- FLD (f_left) = f_left;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stw", "f_disp10x2 0x%x", 'x', f_disp10x2, "f_dest 0x%x", 'x', f_dest, "f_left 0x%x", 'x', f_left, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_sthil:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_sthil.f
- UINT f_left;
- INT f_disp6;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_disp6 = EXTRACT_LSB0_INT (insn, 32, 15, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_disp6) = f_disp6;
- FLD (f_dest) = f_dest;
- FLD (f_left) = f_left;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sthil", "f_disp6 0x%x", 'x', f_disp6, "f_dest 0x%x", 'x', f_dest, "f_left 0x%x", 'x', f_left, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_stxb:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_add.f
- UINT f_left;
- UINT f_right;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_dest) = f_dest;
- FLD (f_left) = f_left;
- FLD (f_right) = f_right;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stxb", "f_dest 0x%x", 'x', f_dest, "f_left 0x%x", 'x', f_left, "f_right 0x%x", 'x', f_right, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_swapq:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_add.f
- UINT f_left;
- UINT f_right;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_dest) = f_dest;
- FLD (f_left) = f_left;
- FLD (f_right) = f_right;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_swapq", "f_dest 0x%x", 'x', f_dest, "f_left 0x%x", 'x', f_left, "f_right 0x%x", 'x', f_right, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_trapa:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_xori.f
- UINT f_left;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_left) = f_left;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_trapa", "f_left 0x%x", 'x', f_left, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_sfmt_xori:
- {
- const IDESC *idesc = &sh64_media_insn_data[itype];
- CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_xori.f
- UINT f_left;
- INT f_imm6;
- UINT f_dest;
-
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6);
- f_imm6 = EXTRACT_LSB0_INT (insn, 32, 15, 6);
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6);
-
- /* Record the fields for the semantic handler. */
- FLD (f_imm6) = f_imm6;
- FLD (f_left) = f_left;
- FLD (f_dest) = f_dest;
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_xori", "f_imm6 0x%x", 'x', f_imm6, "f_left 0x%x", 'x', f_left, "f_dest 0x%x", 'x', f_dest, (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
-}
diff --git a/sim/sh64/decode-media.h b/sim/sh64/decode-media.h
deleted file mode 100644
index 8a84d4e6fe1..00000000000
--- a/sim/sh64/decode-media.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/* Decode header for sh64_media.
-
-THIS FILE IS MACHINE GENERATED WITH CGEN.
-
-Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
-
-This file is part of the GNU Simulators.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-
-#ifndef SH64_MEDIA_DECODE_H
-#define SH64_MEDIA_DECODE_H
-
-extern const IDESC *sh64_media_decode (SIM_CPU *, IADDR,
- CGEN_INSN_INT, CGEN_INSN_INT,
- ARGBUF *);
-extern void sh64_media_init_idesc_table (SIM_CPU *);
-extern void sh64_media_sem_init_idesc_table (SIM_CPU *);
-extern void sh64_media_semf_init_idesc_table (SIM_CPU *);
-
-/* Enum declaration for instructions in cpu family sh64. */
-typedef enum sh64_media_insn_type {
- SH64_MEDIA_INSN_X_INVALID, SH64_MEDIA_INSN_X_AFTER, SH64_MEDIA_INSN_X_BEFORE, SH64_MEDIA_INSN_X_CTI_CHAIN
- , SH64_MEDIA_INSN_X_CHAIN, SH64_MEDIA_INSN_X_BEGIN, SH64_MEDIA_INSN_ADD, SH64_MEDIA_INSN_ADDL
- , SH64_MEDIA_INSN_ADDI, SH64_MEDIA_INSN_ADDIL, SH64_MEDIA_INSN_ADDZL, SH64_MEDIA_INSN_ALLOCO
- , SH64_MEDIA_INSN_AND, SH64_MEDIA_INSN_ANDC, SH64_MEDIA_INSN_ANDI, SH64_MEDIA_INSN_BEQ
- , SH64_MEDIA_INSN_BEQI, SH64_MEDIA_INSN_BGE, SH64_MEDIA_INSN_BGEU, SH64_MEDIA_INSN_BGT
- , SH64_MEDIA_INSN_BGTU, SH64_MEDIA_INSN_BLINK, SH64_MEDIA_INSN_BNE, SH64_MEDIA_INSN_BNEI
- , SH64_MEDIA_INSN_BRK, SH64_MEDIA_INSN_BYTEREV, SH64_MEDIA_INSN_CMPEQ, SH64_MEDIA_INSN_CMPGT
- , SH64_MEDIA_INSN_CMPGTU, SH64_MEDIA_INSN_CMVEQ, SH64_MEDIA_INSN_CMVNE, SH64_MEDIA_INSN_FABSD
- , SH64_MEDIA_INSN_FABSS, SH64_MEDIA_INSN_FADDD, SH64_MEDIA_INSN_FADDS, SH64_MEDIA_INSN_FCMPEQD
- , SH64_MEDIA_INSN_FCMPEQS, SH64_MEDIA_INSN_FCMPGED, SH64_MEDIA_INSN_FCMPGES, SH64_MEDIA_INSN_FCMPGTD
- , SH64_MEDIA_INSN_FCMPGTS, SH64_MEDIA_INSN_FCMPUND, SH64_MEDIA_INSN_FCMPUNS, SH64_MEDIA_INSN_FCNVDS
- , SH64_MEDIA_INSN_FCNVSD, SH64_MEDIA_INSN_FDIVD, SH64_MEDIA_INSN_FDIVS, SH64_MEDIA_INSN_FGETSCR
- , SH64_MEDIA_INSN_FIPRS, SH64_MEDIA_INSN_FLDD, SH64_MEDIA_INSN_FLDP, SH64_MEDIA_INSN_FLDS
- , SH64_MEDIA_INSN_FLDXD, SH64_MEDIA_INSN_FLDXP, SH64_MEDIA_INSN_FLDXS, SH64_MEDIA_INSN_FLOATLD
- , SH64_MEDIA_INSN_FLOATLS, SH64_MEDIA_INSN_FLOATQD, SH64_MEDIA_INSN_FLOATQS, SH64_MEDIA_INSN_FMACS
- , SH64_MEDIA_INSN_FMOVD, SH64_MEDIA_INSN_FMOVDQ, SH64_MEDIA_INSN_FMOVLS, SH64_MEDIA_INSN_FMOVQD
- , SH64_MEDIA_INSN_FMOVS, SH64_MEDIA_INSN_FMOVSL, SH64_MEDIA_INSN_FMULD, SH64_MEDIA_INSN_FMULS
- , SH64_MEDIA_INSN_FNEGD, SH64_MEDIA_INSN_FNEGS, SH64_MEDIA_INSN_FPUTSCR, SH64_MEDIA_INSN_FSQRTD
- , SH64_MEDIA_INSN_FSQRTS, SH64_MEDIA_INSN_FSTD, SH64_MEDIA_INSN_FSTP, SH64_MEDIA_INSN_FSTS
- , SH64_MEDIA_INSN_FSTXD, SH64_MEDIA_INSN_FSTXP, SH64_MEDIA_INSN_FSTXS, SH64_MEDIA_INSN_FSUBD
- , SH64_MEDIA_INSN_FSUBS, SH64_MEDIA_INSN_FTRCDL, SH64_MEDIA_INSN_FTRCSL, SH64_MEDIA_INSN_FTRCDQ
- , SH64_MEDIA_INSN_FTRCSQ, SH64_MEDIA_INSN_FTRVS, SH64_MEDIA_INSN_GETCFG, SH64_MEDIA_INSN_GETCON
- , SH64_MEDIA_INSN_GETTR, SH64_MEDIA_INSN_ICBI, SH64_MEDIA_INSN_LDB, SH64_MEDIA_INSN_LDL
- , SH64_MEDIA_INSN_LDQ, SH64_MEDIA_INSN_LDUB, SH64_MEDIA_INSN_LDUW, SH64_MEDIA_INSN_LDW
- , SH64_MEDIA_INSN_LDHIL, SH64_MEDIA_INSN_LDHIQ, SH64_MEDIA_INSN_LDLOL, SH64_MEDIA_INSN_LDLOQ
- , SH64_MEDIA_INSN_LDXB, SH64_MEDIA_INSN_LDXL, SH64_MEDIA_INSN_LDXQ, SH64_MEDIA_INSN_LDXUB
- , SH64_MEDIA_INSN_LDXUW, SH64_MEDIA_INSN_LDXW, SH64_MEDIA_INSN_MABSL, SH64_MEDIA_INSN_MABSW
- , SH64_MEDIA_INSN_MADDL, SH64_MEDIA_INSN_MADDW, SH64_MEDIA_INSN_MADDSL, SH64_MEDIA_INSN_MADDSUB
- , SH64_MEDIA_INSN_MADDSW, SH64_MEDIA_INSN_MCMPEQB, SH64_MEDIA_INSN_MCMPEQL, SH64_MEDIA_INSN_MCMPEQW
- , SH64_MEDIA_INSN_MCMPGTL, SH64_MEDIA_INSN_MCMPGTUB, SH64_MEDIA_INSN_MCMPGTW, SH64_MEDIA_INSN_MCMV
- , SH64_MEDIA_INSN_MCNVSLW, SH64_MEDIA_INSN_MCNVSWB, SH64_MEDIA_INSN_MCNVSWUB, SH64_MEDIA_INSN_MEXTR1
- , SH64_MEDIA_INSN_MEXTR2, SH64_MEDIA_INSN_MEXTR3, SH64_MEDIA_INSN_MEXTR4, SH64_MEDIA_INSN_MEXTR5
- , SH64_MEDIA_INSN_MEXTR6, SH64_MEDIA_INSN_MEXTR7, SH64_MEDIA_INSN_MMACFXWL, SH64_MEDIA_INSN_MMACNFX_WL
- , SH64_MEDIA_INSN_MMULL, SH64_MEDIA_INSN_MMULW, SH64_MEDIA_INSN_MMULFXL, SH64_MEDIA_INSN_MMULFXW
- , SH64_MEDIA_INSN_MMULFXRPW, SH64_MEDIA_INSN_MMULHIWL, SH64_MEDIA_INSN_MMULLOWL, SH64_MEDIA_INSN_MMULSUMWQ
- , SH64_MEDIA_INSN_MOVI, SH64_MEDIA_INSN_MPERMW, SH64_MEDIA_INSN_MSADUBQ, SH64_MEDIA_INSN_MSHALDSL
- , SH64_MEDIA_INSN_MSHALDSW, SH64_MEDIA_INSN_MSHARDL, SH64_MEDIA_INSN_MSHARDW, SH64_MEDIA_INSN_MSHARDSQ
- , SH64_MEDIA_INSN_MSHFHIB, SH64_MEDIA_INSN_MSHFHIL, SH64_MEDIA_INSN_MSHFHIW, SH64_MEDIA_INSN_MSHFLOB
- , SH64_MEDIA_INSN_MSHFLOL, SH64_MEDIA_INSN_MSHFLOW, SH64_MEDIA_INSN_MSHLLDL, SH64_MEDIA_INSN_MSHLLDW
- , SH64_MEDIA_INSN_MSHLRDL, SH64_MEDIA_INSN_MSHLRDW, SH64_MEDIA_INSN_MSUBL, SH64_MEDIA_INSN_MSUBW
- , SH64_MEDIA_INSN_MSUBSL, SH64_MEDIA_INSN_MSUBSUB, SH64_MEDIA_INSN_MSUBSW, SH64_MEDIA_INSN_MULSL
- , SH64_MEDIA_INSN_MULUL, SH64_MEDIA_INSN_NOP, SH64_MEDIA_INSN_NSB, SH64_MEDIA_INSN_OCBI
- , SH64_MEDIA_INSN_OCBP, SH64_MEDIA_INSN_OCBWB, SH64_MEDIA_INSN_OR, SH64_MEDIA_INSN_ORI
- , SH64_MEDIA_INSN_PREFI, SH64_MEDIA_INSN_PTA, SH64_MEDIA_INSN_PTABS, SH64_MEDIA_INSN_PTB
- , SH64_MEDIA_INSN_PTREL, SH64_MEDIA_INSN_PUTCFG, SH64_MEDIA_INSN_PUTCON, SH64_MEDIA_INSN_RTE
- , SH64_MEDIA_INSN_SHARD, SH64_MEDIA_INSN_SHARDL, SH64_MEDIA_INSN_SHARI, SH64_MEDIA_INSN_SHARIL
- , SH64_MEDIA_INSN_SHLLD, SH64_MEDIA_INSN_SHLLDL, SH64_MEDIA_INSN_SHLLI, SH64_MEDIA_INSN_SHLLIL
- , SH64_MEDIA_INSN_SHLRD, SH64_MEDIA_INSN_SHLRDL, SH64_MEDIA_INSN_SHLRI, SH64_MEDIA_INSN_SHLRIL
- , SH64_MEDIA_INSN_SHORI, SH64_MEDIA_INSN_SLEEP, SH64_MEDIA_INSN_STB, SH64_MEDIA_INSN_STL
- , SH64_MEDIA_INSN_STQ, SH64_MEDIA_INSN_STW, SH64_MEDIA_INSN_STHIL, SH64_MEDIA_INSN_STHIQ
- , SH64_MEDIA_INSN_STLOL, SH64_MEDIA_INSN_STLOQ, SH64_MEDIA_INSN_STXB, SH64_MEDIA_INSN_STXL
- , SH64_MEDIA_INSN_STXQ, SH64_MEDIA_INSN_STXW, SH64_MEDIA_INSN_SUB, SH64_MEDIA_INSN_SUBL
- , SH64_MEDIA_INSN_SWAPQ, SH64_MEDIA_INSN_SYNCI, SH64_MEDIA_INSN_SYNCO, SH64_MEDIA_INSN_TRAPA
- , SH64_MEDIA_INSN_XOR, SH64_MEDIA_INSN_XORI, SH64_MEDIA_INSN_MAX
-} SH64_MEDIA_INSN_TYPE;
-
-/* Enum declaration for semantic formats in cpu family sh64. */
-typedef enum sh64_media_sfmt_type {
- SH64_MEDIA_SFMT_EMPTY, SH64_MEDIA_SFMT_ADD, SH64_MEDIA_SFMT_ADDI, SH64_MEDIA_SFMT_ALLOCO
- , SH64_MEDIA_SFMT_BEQ, SH64_MEDIA_SFMT_BEQI, SH64_MEDIA_SFMT_BLINK, SH64_MEDIA_SFMT_BRK
- , SH64_MEDIA_SFMT_BYTEREV, SH64_MEDIA_SFMT_CMVEQ, SH64_MEDIA_SFMT_FABSD, SH64_MEDIA_SFMT_FABSS
- , SH64_MEDIA_SFMT_FADDD, SH64_MEDIA_SFMT_FADDS, SH64_MEDIA_SFMT_FCMPEQD, SH64_MEDIA_SFMT_FCMPEQS
- , SH64_MEDIA_SFMT_FCNVDS, SH64_MEDIA_SFMT_FCNVSD, SH64_MEDIA_SFMT_FIPRS, SH64_MEDIA_SFMT_FLDD
- , SH64_MEDIA_SFMT_FLDP, SH64_MEDIA_SFMT_FLDS, SH64_MEDIA_SFMT_FLDXD, SH64_MEDIA_SFMT_FLDXP
- , SH64_MEDIA_SFMT_FLDXS, SH64_MEDIA_SFMT_FMACS, SH64_MEDIA_SFMT_FMOVDQ, SH64_MEDIA_SFMT_FMOVLS
- , SH64_MEDIA_SFMT_FMOVQD, SH64_MEDIA_SFMT_FMOVSL, SH64_MEDIA_SFMT_FSTD, SH64_MEDIA_SFMT_FSTP
- , SH64_MEDIA_SFMT_FSTS, SH64_MEDIA_SFMT_FSTXD, SH64_MEDIA_SFMT_FSTXP, SH64_MEDIA_SFMT_FSTXS
- , SH64_MEDIA_SFMT_FTRVS, SH64_MEDIA_SFMT_GETCON, SH64_MEDIA_SFMT_GETTR, SH64_MEDIA_SFMT_LDB
- , SH64_MEDIA_SFMT_LDL, SH64_MEDIA_SFMT_LDQ, SH64_MEDIA_SFMT_LDUW, SH64_MEDIA_SFMT_LDXB
- , SH64_MEDIA_SFMT_MCMV, SH64_MEDIA_SFMT_MOVI, SH64_MEDIA_SFMT_MPERMW, SH64_MEDIA_SFMT_ORI
- , SH64_MEDIA_SFMT_PTA, SH64_MEDIA_SFMT_PTABS, SH64_MEDIA_SFMT_PTREL, SH64_MEDIA_SFMT_PUTCON
- , SH64_MEDIA_SFMT_SHARI, SH64_MEDIA_SFMT_SHARIL, SH64_MEDIA_SFMT_SHORI, SH64_MEDIA_SFMT_STB
- , SH64_MEDIA_SFMT_STL, SH64_MEDIA_SFMT_STQ, SH64_MEDIA_SFMT_STW, SH64_MEDIA_SFMT_STHIL
- , SH64_MEDIA_SFMT_STXB, SH64_MEDIA_SFMT_SWAPQ, SH64_MEDIA_SFMT_TRAPA, SH64_MEDIA_SFMT_XORI
-} SH64_MEDIA_SFMT_TYPE;
-
-/* Function unit handlers (user written). */
-
-extern int sh64_model_sh5_u_exec (SIM_CPU *, const IDESC *, int /*unit_num*/, int /*referenced*/);
-
-/* Profiling before/after handlers (user written) */
-
-extern void sh64_model_insn_before (SIM_CPU *, int /*first_p*/);
-extern void sh64_model_insn_after (SIM_CPU *, int /*last_p*/, int /*cycles*/);
-
-#endif /* SH64_MEDIA_DECODE_H */
diff --git a/sim/sh64/decode.h b/sim/sh64/decode.h
deleted file mode 100644
index 2582807d8d1..00000000000
--- a/sim/sh64/decode.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef DECODE_H
-#define DECODE_H
-
-#undef WITH_PROFILE_MODEL_P
-
-#ifdef WANT_ISA_COMPACT
-#include "decode-compact.h"
-#include "defs-compact.h"
-#endif /* WANT_ISA_COMPACT */
-
-#ifdef WANT_ISA_MEDIA
-#include "decode-media.h"
-#include "defs-media.h"
-#endif /* WANT_ISA_MEDIA */
-
-#endif /* DECODE_H */
diff --git a/sim/sh64/defs-compact.h b/sim/sh64/defs-compact.h
deleted file mode 100644
index fb0b7e41640..00000000000
--- a/sim/sh64/defs-compact.h
+++ /dev/null
@@ -1,424 +0,0 @@
-/* ISA definitions header for compact.
-
-THIS FILE IS MACHINE GENERATED WITH CGEN.
-
-Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
-
-This file is part of the GNU Simulators.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-
-#ifndef DEFS_SH64_COMPACT_H
-#define DEFS_SH64_COMPACT_H
-
-/* Instruction argument buffer. */
-
-union sem_fields {
- struct { /* no operands */
- int empty;
- } fmt_empty;
- struct { /* */
- SI f_dn;
- } sfmt_fcnvds_compact;
- struct { /* */
- IADDR i_disp12;
- } sfmt_bra_compact;
- struct { /* */
- IADDR i_disp8;
- } sfmt_bf_compact;
- struct { /* */
- SI f_imm4x2;
- UINT f_rm;
- } sfmt_movw11_compact;
- struct { /* */
- SI f_imm8x2;
- UINT f_rn;
- } sfmt_movw10_compact;
- struct { /* */
- SI f_imm4x2;
- UINT f_rn;
- } sfmt_movw5_compact;
- struct { /* */
- SI f_imm8x4;
- UINT f_rn;
- } sfmt_movl10_compact;
- struct { /* */
- UINT f_imm4;
- UINT f_rm;
- } sfmt_movb5_compact;
- struct { /* */
- SI f_vm;
- SI f_vn;
- } sfmt_fipr_compact;
- struct { /* */
- UINT f_imm8;
- UINT f_rn;
- } sfmt_addi_compact;
- struct { /* */
- SI f_imm4x4;
- UINT f_rm;
- UINT f_rn;
- } sfmt_movl5_compact;
-#if WITH_SCACHE_PBB
- /* Writeback handler. */
- struct {
- /* Pointer to argbuf entry for insn whose results need writing back. */
- const struct argbuf *abuf;
- } write;
- /* x-before handler */
- struct {
- /*const SCACHE *insns[MAX_PARALLEL_INSNS];*/
- int first_p;
- } before;
- /* x-after handler */
- struct {
- int empty;
- } after;
- /* This entry is used to terminate each pbb. */
- struct {
- /* Number of insns in pbb. */
- int insn_count;
- /* Next pbb to execute. */
- SCACHE *next;
- SCACHE *branch_target;
- } chain;
-#endif
-};
-
-/* The ARGBUF struct. */
-struct argbuf {
- /* These are the baseclass definitions. */
- IADDR addr;
- const IDESC *idesc;
- char trace_p;
- char profile_p;
- /* ??? Temporary hack for skip insns. */
- char skip_count;
- char unused;
- /* cpu specific data follows */
- union sem semantic;
- int written;
- union sem_fields fields;
-};
-
-/* A cached insn.
-
- ??? SCACHE used to contain more than just argbuf. We could delete the
- type entirely and always just use ARGBUF, but for future concerns and as
- a level of abstraction it is left in. */
-
-struct scache {
- struct argbuf argbuf;
-};
-
-/* Macros to simplify extraction, reading and semantic code.
- These define and assign the local vars that contain the insn's fields. */
-
-#define EXTRACT_IFMT_EMPTY_VARS \
- unsigned int length;
-#define EXTRACT_IFMT_EMPTY_CODE \
- length = 0; \
-
-#define EXTRACT_IFMT_ADD_COMPACT_VARS \
- UINT f_op4; \
- UINT f_rn; \
- UINT f_rm; \
- UINT f_sub4; \
- unsigned int length;
-#define EXTRACT_IFMT_ADD_COMPACT_CODE \
- length = 2; \
- f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4); \
- f_sub4 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); \
-
-#define EXTRACT_IFMT_ADDI_COMPACT_VARS \
- UINT f_op4; \
- UINT f_rn; \
- UINT f_imm8; \
- unsigned int length;
-#define EXTRACT_IFMT_ADDI_COMPACT_CODE \
- length = 2; \
- f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
- f_imm8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8); \
-
-#define EXTRACT_IFMT_AND_COMPACT_VARS \
- UINT f_op4; \
- UINT f_rn; \
- UINT f_rm; \
- UINT f_sub4; \
- unsigned int length;
-#define EXTRACT_IFMT_AND_COMPACT_CODE \
- length = 2; \
- f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4); \
- f_sub4 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); \
-
-#define EXTRACT_IFMT_ANDI_COMPACT_VARS \
- UINT f_op8; \
- UINT f_imm8; \
- unsigned int length;
-#define EXTRACT_IFMT_ANDI_COMPACT_CODE \
- length = 2; \
- f_op8 = EXTRACT_LSB0_UINT (insn, 16, 15, 8); \
- f_imm8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8); \
-
-#define EXTRACT_IFMT_ANDB_COMPACT_VARS \
- UINT f_op8; \
- UINT f_imm8; \
- unsigned int length;
-#define EXTRACT_IFMT_ANDB_COMPACT_CODE \
- length = 2; \
- f_op8 = EXTRACT_LSB0_UINT (insn, 16, 15, 8); \
- f_imm8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8); \
-
-#define EXTRACT_IFMT_BF_COMPACT_VARS \
- UINT f_op8; \
- SI f_disp8; \
- unsigned int length;
-#define EXTRACT_IFMT_BF_COMPACT_CODE \
- length = 2; \
- f_op8 = EXTRACT_LSB0_UINT (insn, 16, 15, 8); \
- f_disp8 = ((((EXTRACT_LSB0_INT (insn, 16, 7, 8)) << (1))) + (((pc) + (4)))); \
-
-#define EXTRACT_IFMT_BRA_COMPACT_VARS \
- UINT f_op4; \
- SI f_disp12; \
- unsigned int length;
-#define EXTRACT_IFMT_BRA_COMPACT_CODE \
- length = 2; \
- f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
- f_disp12 = ((((EXTRACT_LSB0_INT (insn, 16, 11, 12)) << (1))) + (((pc) + (4)))); \
-
-#define EXTRACT_IFMT_BRAF_COMPACT_VARS \
- UINT f_op4; \
- UINT f_rn; \
- UINT f_sub8; \
- unsigned int length;
-#define EXTRACT_IFMT_BRAF_COMPACT_CODE \
- length = 2; \
- f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
- f_sub8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8); \
-
-#define EXTRACT_IFMT_BRK_COMPACT_VARS \
- UINT f_op16; \
- unsigned int length;
-#define EXTRACT_IFMT_BRK_COMPACT_CODE \
- length = 2; \
- f_op16 = EXTRACT_LSB0_UINT (insn, 16, 15, 16); \
-
-#define EXTRACT_IFMT_FABS_COMPACT_VARS \
- UINT f_op4; \
- UINT f_rn; \
- UINT f_sub8; \
- unsigned int length;
-#define EXTRACT_IFMT_FABS_COMPACT_CODE \
- length = 2; \
- f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
- f_sub8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8); \
-
-#define EXTRACT_IFMT_FADD_COMPACT_VARS \
- UINT f_op4; \
- UINT f_rn; \
- UINT f_rm; \
- UINT f_sub4; \
- unsigned int length;
-#define EXTRACT_IFMT_FADD_COMPACT_CODE \
- length = 2; \
- f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4); \
- f_sub4 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); \
-
-#define EXTRACT_IFMT_FCNVDS_COMPACT_VARS \
- UINT f_op4; \
- SI f_dn; \
- UINT f_8_1; \
- UINT f_sub8; \
- unsigned int length;
-#define EXTRACT_IFMT_FCNVDS_COMPACT_CODE \
- length = 2; \
- f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
- f_dn = ((EXTRACT_LSB0_UINT (insn, 16, 11, 3)) << (1)); \
- f_8_1 = EXTRACT_LSB0_UINT (insn, 16, 8, 1); \
- f_sub8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8); \
-
-#define EXTRACT_IFMT_FIPR_COMPACT_VARS \
- UINT f_op4; \
- SI f_vn; \
- SI f_vm; \
- UINT f_sub8; \
- unsigned int length;
-#define EXTRACT_IFMT_FIPR_COMPACT_CODE \
- length = 2; \
- f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
- f_vn = ((EXTRACT_LSB0_UINT (insn, 16, 11, 2)) << (2)); \
- f_vm = ((EXTRACT_LSB0_UINT (insn, 16, 9, 2)) << (2)); \
- f_sub8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8); \
-
-#define EXTRACT_IFMT_FLDS_COMPACT_VARS \
- UINT f_op4; \
- UINT f_rn; \
- UINT f_sub8; \
- unsigned int length;
-#define EXTRACT_IFMT_FLDS_COMPACT_CODE \
- length = 2; \
- f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
- f_sub8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8); \
-
-#define EXTRACT_IFMT_FMAC_COMPACT_VARS \
- UINT f_op4; \
- UINT f_rn; \
- UINT f_rm; \
- UINT f_sub4; \
- unsigned int length;
-#define EXTRACT_IFMT_FMAC_COMPACT_CODE \
- length = 2; \
- f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4); \
- f_sub4 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); \
-
-#define EXTRACT_IFMT_FMOV2_COMPACT_VARS \
- UINT f_op4; \
- UINT f_rn; \
- UINT f_rm; \
- UINT f_sub4; \
- unsigned int length;
-#define EXTRACT_IFMT_FMOV2_COMPACT_CODE \
- length = 2; \
- f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4); \
- f_sub4 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); \
-
-#define EXTRACT_IFMT_FMOV5_COMPACT_VARS \
- UINT f_op4; \
- UINT f_rn; \
- UINT f_rm; \
- UINT f_sub4; \
- unsigned int length;
-#define EXTRACT_IFMT_FMOV5_COMPACT_CODE \
- length = 2; \
- f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4); \
- f_sub4 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); \
-
-#define EXTRACT_IFMT_FTRV_COMPACT_VARS \
- UINT f_op4; \
- SI f_vn; \
- UINT f_sub10; \
- unsigned int length;
-#define EXTRACT_IFMT_FTRV_COMPACT_CODE \
- length = 2; \
- f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
- f_vn = ((EXTRACT_LSB0_UINT (insn, 16, 11, 2)) << (2)); \
- f_sub10 = EXTRACT_LSB0_UINT (insn, 16, 9, 10); \
-
-#define EXTRACT_IFMT_MOVB5_COMPACT_VARS \
- UINT f_op8; \
- UINT f_rm; \
- UINT f_imm4; \
- unsigned int length;
-#define EXTRACT_IFMT_MOVB5_COMPACT_CODE \
- length = 2; \
- f_op8 = EXTRACT_LSB0_UINT (insn, 16, 15, 8); \
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4); \
- f_imm4 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); \
-
-#define EXTRACT_IFMT_MOVL4_COMPACT_VARS \
- UINT f_op8; \
- SI f_imm8x4; \
- unsigned int length;
-#define EXTRACT_IFMT_MOVL4_COMPACT_CODE \
- length = 2; \
- f_op8 = EXTRACT_LSB0_UINT (insn, 16, 15, 8); \
- f_imm8x4 = ((EXTRACT_LSB0_UINT (insn, 16, 7, 8)) << (2)); \
-
-#define EXTRACT_IFMT_MOVL5_COMPACT_VARS \
- UINT f_op4; \
- UINT f_rn; \
- UINT f_rm; \
- SI f_imm4x4; \
- unsigned int length;
-#define EXTRACT_IFMT_MOVL5_COMPACT_CODE \
- length = 2; \
- f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4); \
- f_imm4x4 = ((EXTRACT_LSB0_UINT (insn, 16, 3, 4)) << (2)); \
-
-#define EXTRACT_IFMT_MOVL10_COMPACT_VARS \
- UINT f_op4; \
- UINT f_rn; \
- SI f_imm8x4; \
- unsigned int length;
-#define EXTRACT_IFMT_MOVL10_COMPACT_CODE \
- length = 2; \
- f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
- f_imm8x4 = ((EXTRACT_LSB0_UINT (insn, 16, 7, 8)) << (2)); \
-
-#define EXTRACT_IFMT_MOVW4_COMPACT_VARS \
- UINT f_op8; \
- SI f_imm8x2; \
- unsigned int length;
-#define EXTRACT_IFMT_MOVW4_COMPACT_CODE \
- length = 2; \
- f_op8 = EXTRACT_LSB0_UINT (insn, 16, 15, 8); \
- f_imm8x2 = ((EXTRACT_LSB0_UINT (insn, 16, 7, 8)) << (1)); \
-
-#define EXTRACT_IFMT_MOVW5_COMPACT_VARS \
- UINT f_op8; \
- UINT f_rn; \
- SI f_imm4x2; \
- unsigned int length;
-#define EXTRACT_IFMT_MOVW5_COMPACT_CODE \
- length = 2; \
- f_op8 = EXTRACT_LSB0_UINT (insn, 16, 15, 8); \
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
- f_imm4x2 = ((EXTRACT_LSB0_UINT (insn, 16, 3, 4)) << (1)); \
-
-#define EXTRACT_IFMT_MOVW10_COMPACT_VARS \
- UINT f_op4; \
- UINT f_rn; \
- SI f_imm8x2; \
- unsigned int length;
-#define EXTRACT_IFMT_MOVW10_COMPACT_CODE \
- length = 2; \
- f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
- f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
- f_imm8x2 = ((EXTRACT_LSB0_UINT (insn, 16, 7, 8)) << (1)); \
-
-#define EXTRACT_IFMT_MOVW11_COMPACT_VARS \
- UINT f_op8; \
- UINT f_rm; \
- SI f_imm4x2; \
- unsigned int length;
-#define EXTRACT_IFMT_MOVW11_COMPACT_CODE \
- length = 2; \
- f_op8 = EXTRACT_LSB0_UINT (insn, 16, 15, 8); \
- f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4); \
- f_imm4x2 = ((EXTRACT_LSB0_UINT (insn, 16, 3, 4)) << (1)); \
-
-#endif /* DEFS_SH64_COMPACT_H */
diff --git a/sim/sh64/defs-media.h b/sim/sh64/defs-media.h
deleted file mode 100644
index 7e749f9d5b5..00000000000
--- a/sim/sh64/defs-media.h
+++ /dev/null
@@ -1,926 +0,0 @@
-/* ISA definitions header for media.
-
-THIS FILE IS MACHINE GENERATED WITH CGEN.
-
-Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
-
-This file is part of the GNU Simulators.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-
-#ifndef DEFS_SH64_MEDIA_H
-#define DEFS_SH64_MEDIA_H
-
-/* Instruction argument buffer. */
-
-union sem_fields {
- struct { /* no operands */
- int empty;
- } fmt_empty;
- struct { /* */
- UINT f_dest;
- UINT f_uimm16;
- } sfmt_shori;
- struct { /* */
- DI f_disp16;
- UINT f_tra;
- } sfmt_pta;
- struct { /* */
- INT f_imm16;
- UINT f_dest;
- } sfmt_movi;
- struct { /* */
- UINT f_dest;
- UINT f_left_right;
- } sfmt_fabsd;
- struct { /* */
- UINT f_dest;
- UINT f_trb;
- } sfmt_blink;
- struct { /* */
- INT f_imm6;
- UINT f_dest;
- UINT f_left;
- } sfmt_xori;
- struct { /* */
- INT f_disp6;
- UINT f_dest;
- UINT f_left;
- } sfmt_sthil;
- struct { /* */
- UINT f_dest;
- UINT f_left;
- UINT f_uimm6;
- } sfmt_shari;
- struct { /* */
- INT f_imm10;
- UINT f_dest;
- UINT f_left;
- } sfmt_ori;
- struct { /* */
- SI f_disp10x2;
- UINT f_dest;
- UINT f_left;
- } sfmt_lduw;
- struct { /* */
- SI f_disp10x4;
- UINT f_dest;
- UINT f_left;
- } sfmt_flds;
- struct { /* */
- SI f_disp10x8;
- UINT f_dest;
- UINT f_left;
- } sfmt_fldd;
- struct { /* */
- INT f_imm6;
- UINT f_left;
- UINT f_tra;
- } sfmt_beqi;
- struct { /* */
- UINT f_left;
- UINT f_right;
- UINT f_tra;
- } sfmt_beq;
- struct { /* */
- INT f_disp10;
- UINT f_dest;
- UINT f_left;
- } sfmt_addi;
- struct { /* */
- UINT f_dest;
- UINT f_left;
- UINT f_right;
- } sfmt_add;
- struct {
- INT f_disp6;
- UINT f_dest;
- UINT f_left;
- } sfmt_ldhil;
-#if WITH_SCACHE_PBB
- /* Writeback handler. */
- struct {
- /* Pointer to argbuf entry for insn whose results need writing back. */
- const struct argbuf *abuf;
- } write;
- /* x-before handler */
- struct {
- /*const SCACHE *insns[MAX_PARALLEL_INSNS];*/
- int first_p;
- } before;
- /* x-after handler */
- struct {
- int empty;
- } after;
- /* This entry is used to terminate each pbb. */
- struct {
- /* Number of insns in pbb. */
- int insn_count;
- /* Next pbb to execute. */
- SCACHE *next;
- SCACHE *branch_target;
- } chain;
-#endif
-};
-
-/* The ARGBUF struct. */
-struct argbuf {
- /* These are the baseclass definitions. */
- IADDR addr;
- const IDESC *idesc;
- char trace_p;
- char profile_p;
- /* ??? Temporary hack for skip insns. */
- char skip_count;
- char unused;
- /* cpu specific data follows */
- union sem semantic;
- int written;
- union sem_fields fields;
-};
-
-/* A cached insn.
-
- ??? SCACHE used to contain more than just argbuf. We could delete the
- type entirely and always just use ARGBUF, but for future concerns and as
- a level of abstraction it is left in. */
-
-struct scache {
- struct argbuf argbuf;
-};
-
-/* Macros to simplify extraction, reading and semantic code.
- These define and assign the local vars that contain the insn's fields. */
-
-#define EXTRACT_IFMT_EMPTY_VARS \
- unsigned int length;
-#define EXTRACT_IFMT_EMPTY_CODE \
- length = 0; \
-
-#define EXTRACT_IFMT_ADD_VARS \
- UINT f_op; \
- UINT f_left; \
- UINT f_ext; \
- UINT f_right; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_ADD_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_ADDI_VARS \
- UINT f_op; \
- UINT f_left; \
- INT f_disp10; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_ADDI_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_disp10 = EXTRACT_LSB0_INT (insn, 32, 19, 10); \
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_ALLOCO_VARS \
- UINT f_op; \
- UINT f_left; \
- UINT f_ext; \
- SI f_disp6x32; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_ALLOCO_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
- f_disp6x32 = ((EXTRACT_LSB0_INT (insn, 32, 15, 6)) << (5)); \
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_BEQ_VARS \
- UINT f_op; \
- UINT f_left; \
- UINT f_ext; \
- UINT f_right; \
- UINT f_likely; \
- UINT f_8_2; \
- UINT f_tra; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_BEQ_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
- f_likely = EXTRACT_LSB0_UINT (insn, 32, 9, 1); \
- f_8_2 = EXTRACT_LSB0_UINT (insn, 32, 8, 2); \
- f_tra = EXTRACT_LSB0_UINT (insn, 32, 6, 3); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_BEQI_VARS \
- UINT f_op; \
- UINT f_left; \
- UINT f_ext; \
- INT f_imm6; \
- UINT f_likely; \
- UINT f_8_2; \
- UINT f_tra; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_BEQI_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
- f_imm6 = EXTRACT_LSB0_INT (insn, 32, 15, 6); \
- f_likely = EXTRACT_LSB0_UINT (insn, 32, 9, 1); \
- f_8_2 = EXTRACT_LSB0_UINT (insn, 32, 8, 2); \
- f_tra = EXTRACT_LSB0_UINT (insn, 32, 6, 3); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_BLINK_VARS \
- UINT f_op; \
- UINT f_25; \
- UINT f_trb; \
- UINT f_ext; \
- UINT f_right; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_BLINK_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_25 = EXTRACT_LSB0_UINT (insn, 32, 25, 3); \
- f_trb = EXTRACT_LSB0_UINT (insn, 32, 22, 3); \
- f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_BRK_VARS \
- UINT f_op; \
- UINT f_left; \
- UINT f_ext; \
- UINT f_right; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_BRK_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_BYTEREV_VARS \
- UINT f_op; \
- UINT f_left; \
- UINT f_ext; \
- UINT f_right; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_BYTEREV_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_FABSD_VARS \
- UINT f_op; \
- UINT f_ext; \
- UINT f_left; \
- UINT f_right; \
- UINT f_left_right; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_FABSD_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
- f_left_right = f_left;\
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_FABSS_VARS \
- UINT f_op; \
- UINT f_ext; \
- UINT f_left; \
- UINT f_right; \
- UINT f_left_right; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_FABSS_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
- f_left_right = f_left;\
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_FADDD_VARS \
- UINT f_op; \
- UINT f_left; \
- UINT f_ext; \
- UINT f_right; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_FADDD_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_FADDS_VARS \
- UINT f_op; \
- UINT f_left; \
- UINT f_ext; \
- UINT f_right; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_FADDS_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_FCMPEQD_VARS \
- UINT f_op; \
- UINT f_left; \
- UINT f_ext; \
- UINT f_right; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_FCMPEQD_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_FCMPEQS_VARS \
- UINT f_op; \
- UINT f_left; \
- UINT f_ext; \
- UINT f_right; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_FCMPEQS_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_FCNVDS_VARS \
- UINT f_op; \
- UINT f_ext; \
- UINT f_left; \
- UINT f_right; \
- UINT f_left_right; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_FCNVDS_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
- f_left_right = f_left;\
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_FCNVSD_VARS \
- UINT f_op; \
- UINT f_ext; \
- UINT f_left; \
- UINT f_right; \
- UINT f_left_right; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_FCNVSD_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
- f_left_right = f_left;\
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_FGETSCR_VARS \
- UINT f_op; \
- UINT f_left; \
- UINT f_ext; \
- UINT f_right; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_FGETSCR_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_FIPRS_VARS \
- UINT f_op; \
- UINT f_left; \
- UINT f_ext; \
- UINT f_right; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_FIPRS_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_FLDD_VARS \
- UINT f_op; \
- UINT f_left; \
- SI f_disp10x8; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_FLDD_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_disp10x8 = ((EXTRACT_LSB0_INT (insn, 32, 19, 10)) << (3)); \
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_FLDP_VARS \
- UINT f_op; \
- UINT f_left; \
- SI f_disp10x8; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_FLDP_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_disp10x8 = ((EXTRACT_LSB0_INT (insn, 32, 19, 10)) << (3)); \
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_FLDS_VARS \
- UINT f_op; \
- UINT f_left; \
- SI f_disp10x4; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_FLDS_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_disp10x4 = ((EXTRACT_LSB0_INT (insn, 32, 19, 10)) << (2)); \
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_FLDXD_VARS \
- UINT f_op; \
- UINT f_left; \
- UINT f_ext; \
- UINT f_right; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_FLDXD_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_FLDXP_VARS \
- UINT f_op; \
- UINT f_left; \
- UINT f_ext; \
- UINT f_right; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_FLDXP_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_FMOVDQ_VARS \
- UINT f_op; \
- UINT f_ext; \
- UINT f_left; \
- UINT f_right; \
- UINT f_left_right; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_FMOVDQ_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
- f_left_right = f_left;\
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_FMOVLS_VARS \
- UINT f_op; \
- UINT f_left; \
- UINT f_ext; \
- UINT f_right; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_FMOVLS_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_FMOVSL_VARS \
- UINT f_op; \
- UINT f_ext; \
- UINT f_left; \
- UINT f_right; \
- UINT f_left_right; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_FMOVSL_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
- f_left_right = f_left;\
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_FPUTSCR_VARS \
- UINT f_op; \
- UINT f_ext; \
- UINT f_left; \
- UINT f_right; \
- UINT f_left_right; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_FPUTSCR_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
- f_left_right = f_left;\
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_FSTXD_VARS \
- UINT f_op; \
- UINT f_left; \
- UINT f_ext; \
- UINT f_right; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_FSTXD_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_FTRVS_VARS \
- UINT f_op; \
- UINT f_left; \
- UINT f_ext; \
- UINT f_right; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_FTRVS_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_GETCFG_VARS \
- UINT f_op; \
- UINT f_left; \
- UINT f_ext; \
- INT f_disp6; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_GETCFG_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
- f_disp6 = EXTRACT_LSB0_INT (insn, 32, 15, 6); \
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_GETCON_VARS \
- UINT f_op; \
- UINT f_left; \
- UINT f_ext; \
- UINT f_right; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_GETCON_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_LDL_VARS \
- UINT f_op; \
- UINT f_left; \
- SI f_disp10x4; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_LDL_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_disp10x4 = ((EXTRACT_LSB0_INT (insn, 32, 19, 10)) << (2)); \
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_LDQ_VARS \
- UINT f_op; \
- UINT f_left; \
- SI f_disp10x8; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_LDQ_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_disp10x8 = ((EXTRACT_LSB0_INT (insn, 32, 19, 10)) << (3)); \
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_MMACNFX_WL_VARS \
- UINT f_op; \
- UINT f_ext; \
- UINT f_right; \
- UINT f_right; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_MMACNFX_WL_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_MOVI_VARS \
- UINT f_op; \
- INT f_imm16; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_MOVI_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_imm16 = EXTRACT_LSB0_INT (insn, 32, 25, 16); \
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_ORI_VARS \
- UINT f_op; \
- UINT f_left; \
- INT f_imm10; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_ORI_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_imm10 = EXTRACT_LSB0_INT (insn, 32, 19, 10); \
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_PREFI_VARS \
- UINT f_op; \
- UINT f_left; \
- UINT f_ext; \
- SI f_disp6x32; \
- UINT f_right; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_PREFI_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
- f_disp6x32 = ((EXTRACT_LSB0_INT (insn, 32, 15, 6)) << (5)); \
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_PTA_VARS \
- UINT f_op; \
- DI f_disp16; \
- UINT f_likely; \
- UINT f_8_2; \
- UINT f_tra; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_PTA_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_disp16 = ((((EXTRACT_LSB0_INT (insn, 32, 25, 16)) << (2))) + (pc)); \
- f_likely = EXTRACT_LSB0_UINT (insn, 32, 9, 1); \
- f_8_2 = EXTRACT_LSB0_UINT (insn, 32, 8, 2); \
- f_tra = EXTRACT_LSB0_UINT (insn, 32, 6, 3); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_PTABS_VARS \
- UINT f_op; \
- UINT f_left; \
- UINT f_ext; \
- UINT f_right; \
- UINT f_likely; \
- UINT f_8_2; \
- UINT f_tra; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_PTABS_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
- f_likely = EXTRACT_LSB0_UINT (insn, 32, 9, 1); \
- f_8_2 = EXTRACT_LSB0_UINT (insn, 32, 8, 2); \
- f_tra = EXTRACT_LSB0_UINT (insn, 32, 6, 3); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_PUTCON_VARS \
- UINT f_op; \
- UINT f_left; \
- UINT f_ext; \
- UINT f_right; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_PUTCON_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_SHARI_VARS \
- UINT f_op; \
- UINT f_left; \
- UINT f_ext; \
- UINT f_uimm6; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_SHARI_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
- f_uimm6 = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_SHORI_VARS \
- UINT f_op; \
- UINT f_uimm16; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_SHORI_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_uimm16 = EXTRACT_LSB0_UINT (insn, 32, 25, 16); \
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_STW_VARS \
- UINT f_op; \
- UINT f_left; \
- SI f_disp10x2; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_STW_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_disp10x2 = ((EXTRACT_LSB0_INT (insn, 32, 19, 10)) << (1)); \
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#define EXTRACT_IFMT_TRAPA_VARS \
- UINT f_op; \
- UINT f_left; \
- UINT f_ext; \
- UINT f_right; \
- UINT f_dest; \
- UINT f_rsvd; \
- unsigned int length;
-#define EXTRACT_IFMT_TRAPA_CODE \
- length = 4; \
- f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
- f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
- f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
- f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
- f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
- f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
-
-#endif /* DEFS_SH64_MEDIA_H */
diff --git a/sim/sh64/eng-compact.h b/sim/sh64/eng-compact.h
deleted file mode 100644
index 521b2f8a977..00000000000
--- a/sim/sh64/eng-compact.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* engine configuration for sh64 */
-
-/* WITH_FAST: non-zero if a fast version of the engine is available
- in addition to the full-featured version. */
-#define WITH_FAST 1
-
-/* WITH_SCACHE_PBB_SH64_COMPACT: non-zero if the pbb engine was selected. */
-#define WITH_SCACHE_PBB_SH64_COMPACT 1
-
-/* HAVE_PARALLEL_INSNS: non-zero if cpu can parallelly execute > 1 insn. */
-#define HAVE_PARALLEL_INSNS 0
-#define WITH_PARALLEL_READ 0
-#define WITH_PARALLEL_WRITE 0
-#define WITH_PARALLEL_GENWRITE 0
-
-/* WITH_SEM_SWITCH_FULL: non-zero if full-featured engine is
- implemented as a switch(). */
-#define WITH_SEM_SWITCH_FULL 0
-
-/* WITH_SEM_SWITCH_FAST: non-zero if fast engine is
- implemented as a switch(). */
-#define WITH_SEM_SWITCH_FAST 1
-
-/* Functions defined in the generated mainloop.c file
- (which doesn't necessarily have that file name). */
-
-extern ENGINE_FN sh64_compact_engine_run_full;
-extern ENGINE_FN sh64_compact_engine_run_fast;
-
-extern SEM_PC sh64_compact_pbb_begin (SIM_CPU *, int);
-extern SEM_PC sh64_compact_pbb_chain (SIM_CPU *, SEM_ARG);
-extern SEM_PC sh64_compact_pbb_cti_chain (SIM_CPU *, SEM_ARG, SEM_BRANCH_TYPE, PCADDR);
-extern void sh64_compact_pbb_before (SIM_CPU *, SCACHE *);
-extern void sh64_compact_pbb_after (SIM_CPU *, SCACHE *);
diff --git a/sim/sh64/eng-media.h b/sim/sh64/eng-media.h
deleted file mode 100644
index db1c21da640..00000000000
--- a/sim/sh64/eng-media.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* engine configuration for sh64 */
-
-/* WITH_FAST: non-zero if a fast version of the engine is available
- in addition to the full-featured version. */
-#define WITH_FAST 1
-
-/* WITH_SCACHE_PBB_SH64_MEDIA: non-zero if the pbb engine was selected. */
-#define WITH_SCACHE_PBB_SH64_MEDIA 1
-
-/* HAVE_PARALLEL_INSNS: non-zero if cpu can parallelly execute > 1 insn. */
-#define HAVE_PARALLEL_INSNS 0
-#define WITH_PARALLEL_READ 0
-#define WITH_PARALLEL_WRITE 0
-#define WITH_PARALLEL_GENWRITE 0
-
-/* WITH_SEM_SWITCH_FULL: non-zero if full-featured engine is
- implemented as a switch(). */
-#define WITH_SEM_SWITCH_FULL 0
-
-/* WITH_SEM_SWITCH_FAST: non-zero if fast engine is
- implemented as a switch(). */
-#define WITH_SEM_SWITCH_FAST 1
-
-/* Functions defined in the generated mainloop.c file
- (which doesn't necessarily have that file name). */
-
-extern ENGINE_FN sh64_media_engine_run_full;
-extern ENGINE_FN sh64_media_engine_run_fast;
-
-extern SEM_PC sh64_media_pbb_begin (SIM_CPU *, int);
-extern SEM_PC sh64_media_pbb_chain (SIM_CPU *, SEM_ARG);
-extern SEM_PC sh64_media_pbb_cti_chain (SIM_CPU *, SEM_ARG, SEM_BRANCH_TYPE, PCADDR);
-extern void sh64_media_pbb_before (SIM_CPU *, SCACHE *);
-extern void sh64_media_pbb_after (SIM_CPU *, SCACHE *);
diff --git a/sim/sh64/eng.h b/sim/sh64/eng.h
deleted file mode 100644
index fb9d8c566b1..00000000000
--- a/sim/sh64/eng.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Engine declarations.
- Copyright (C) 2000 Free Software Foundation, Inc.
- Contributed by Red Hat, Inc.
-
-This file is part of the GNU simulators.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* Include declarations for SHmedia and SHcompact ISAs. */
-
-#include "eng-compact.h"
-#include "eng-media.h"
diff --git a/sim/sh64/mloop-compact.c b/sim/sh64/mloop-compact.c
deleted file mode 100644
index fb6b55202cf..00000000000
--- a/sim/sh64/mloop-compact.c
+++ /dev/null
@@ -1,635 +0,0 @@
-/* This file is generated by the genmloop script. DO NOT EDIT! */
-
-/* Enable switch() support in cgen headers. */
-#define SEM_IN_SWITCH
-
-#define WANT_CPU sh64
-#define WANT_CPU_SH64
-
-#include "sim-main.h"
-#include "bfd.h"
-#include "cgen-mem.h"
-#include "cgen-ops.h"
-#include "sim-assert.h"
-
-/* Fill in the administrative ARGBUF fields required by all insns,
- virtual and real. */
-
-static INLINE void
-sh64_compact_fill_argbuf (const SIM_CPU *cpu, ARGBUF *abuf, const IDESC *idesc,
- PCADDR pc, int fast_p)
-{
-#if WITH_SCACHE
- SEM_SET_CODE (abuf, idesc, fast_p);
- ARGBUF_ADDR (abuf) = pc;
-#endif
- ARGBUF_IDESC (abuf) = idesc;
-}
-
-/* Fill in tracing/profiling fields of an ARGBUF. */
-
-static INLINE void
-sh64_compact_fill_argbuf_tp (const SIM_CPU *cpu, ARGBUF *abuf,
- int trace_p, int profile_p)
-{
- ARGBUF_TRACE_P (abuf) = trace_p;
- ARGBUF_PROFILE_P (abuf) = profile_p;
-}
-
-#if WITH_SCACHE_PBB
-
-/* Emit the "x-before" handler.
- x-before is emitted before each insn (serial or parallel).
- This is as opposed to x-after which is only emitted at the end of a group
- of parallel insns. */
-
-static INLINE void
-sh64_compact_emit_before (SIM_CPU *current_cpu, SCACHE *sc, PCADDR pc, int first_p)
-{
- ARGBUF *abuf = &sc[0].argbuf;
- const IDESC *id = & CPU_IDESC (current_cpu) [SH64_COMPACT_INSN_X_BEFORE];
-
- abuf->fields.before.first_p = first_p;
- sh64_compact_fill_argbuf (current_cpu, abuf, id, pc, 0);
- /* no need to set trace_p,profile_p */
-}
-
-/* Emit the "x-after" handler.
- x-after is emitted after a serial insn or at the end of a group of
- parallel insns. */
-
-static INLINE void
-sh64_compact_emit_after (SIM_CPU *current_cpu, SCACHE *sc, PCADDR pc)
-{
- ARGBUF *abuf = &sc[0].argbuf;
- const IDESC *id = & CPU_IDESC (current_cpu) [SH64_COMPACT_INSN_X_AFTER];
-
- sh64_compact_fill_argbuf (current_cpu, abuf, id, pc, 0);
- /* no need to set trace_p,profile_p */
-}
-
-#endif /* WITH_SCACHE_PBB */
-
-
-static INLINE const IDESC *
-extract (SIM_CPU *current_cpu, PCADDR pc, CGEN_INSN_INT insn, ARGBUF *abuf,
- int fast_p)
-{
- const IDESC *id = sh64_compact_decode (current_cpu, pc, insn, insn, abuf);
-
- sh64_compact_fill_argbuf (current_cpu, abuf, id, pc, fast_p);
- if (! fast_p)
- {
- int trace_p = PC_IN_TRACE_RANGE_P (current_cpu, pc);
- int profile_p = PC_IN_PROFILE_RANGE_P (current_cpu, pc);
- sh64_compact_fill_argbuf_tp (current_cpu, abuf, trace_p, profile_p);
- }
- return id;
-}
-
-static INLINE SEM_PC
-execute (SIM_CPU *current_cpu, SCACHE *sc, int fast_p)
-{
- SEM_PC vpc;
-
- if (fast_p)
- {
-#if ! WITH_SEM_SWITCH_FAST
-#if WITH_SCACHE
- vpc = (*sc->argbuf.semantic.sem_fast) (current_cpu, sc);
-#else
- vpc = (*sc->argbuf.semantic.sem_fast) (current_cpu, &sc->argbuf);
-#endif
-#else
- abort ();
-#endif /* WITH_SEM_SWITCH_FAST */
- }
- else
- {
-#if ! WITH_SEM_SWITCH_FULL
- ARGBUF *abuf = &sc->argbuf;
- const IDESC *idesc = abuf->idesc;
-#if WITH_SCACHE_PBB
- int virtual_p = CGEN_ATTR_VALUE (NULL, idesc->attrs, CGEN_INSN_VIRTUAL);
-#else
- int virtual_p = 0;
-#endif
-
- if (! virtual_p)
- {
- /* FIXME: call x-before */
- if (ARGBUF_PROFILE_P (abuf))
- PROFILE_COUNT_INSN (current_cpu, abuf->addr, idesc->num);
- /* FIXME: Later make cover macros: PROFILE_INSN_{INIT,FINI}. */
- if (PROFILE_MODEL_P (current_cpu)
- && ARGBUF_PROFILE_P (abuf))
- sh64_compact_model_insn_before (current_cpu, 1 /*first_p*/);
- TRACE_INSN_INIT (current_cpu, abuf, 1);
- TRACE_INSN (current_cpu, idesc->idata,
- (const struct argbuf *) abuf, abuf->addr);
- }
-#if WITH_SCACHE
- vpc = (*sc->argbuf.semantic.sem_full) (current_cpu, sc);
-#else
- vpc = (*sc->argbuf.semantic.sem_full) (current_cpu, abuf);
-#endif
- if (! virtual_p)
- {
- /* FIXME: call x-after */
- if (PROFILE_MODEL_P (current_cpu)
- && ARGBUF_PROFILE_P (abuf))
- {
- int cycles;
-
- cycles = (*idesc->timing->model_fn) (current_cpu, sc);
- sh64_compact_model_insn_after (current_cpu, 1 /*last_p*/, cycles);
- }
- TRACE_INSN_FINI (current_cpu, abuf, 1);
- }
-#else
- abort ();
-#endif /* WITH_SEM_SWITCH_FULL */
- }
-
- return vpc;
-}
-
-
-/* Record address of cti terminating a pbb. */
-#define SET_CTI_VPC(sc) do { _cti_sc = (sc); } while (0)
-/* Record number of [real] insns in pbb. */
-#define SET_INSN_COUNT(n) do { _insn_count = (n); } while (0)
-
-/* Fetch and extract a pseudo-basic-block.
- FAST_P is non-zero if no tracing/profiling/etc. is wanted. */
-
-INLINE SEM_PC
-sh64_compact_pbb_begin (SIM_CPU *current_cpu, int FAST_P)
-{
- SEM_PC new_vpc;
- PCADDR pc;
- SCACHE *sc;
- int max_insns = CPU_SCACHE_MAX_CHAIN_LENGTH (current_cpu);
-
- pc = GET_H_PC ();
-
- new_vpc = scache_lookup_or_alloc (current_cpu, pc, max_insns, &sc);
- if (! new_vpc)
- {
- /* Leading '_' to avoid collision with mainloop.in. */
- int _insn_count = 0;
- SCACHE *orig_sc = sc;
- SCACHE *_cti_sc = NULL;
- int slice_insns = CPU_MAX_SLICE_INSNS (current_cpu);
-
- /* First figure out how many instructions to compile.
- MAX_INSNS is the size of the allocated buffer, which includes space
- for before/after handlers if they're being used.
- SLICE_INSNS is the maxinum number of real insns that can be
- executed. Zero means "as many as we want". */
- /* ??? max_insns is serving two incompatible roles.
- 1) Number of slots available in scache buffer.
- 2) Number of real insns to execute.
- They're incompatible because there are virtual insns emitted too
- (chain,cti-chain,before,after handlers). */
-
- if (slice_insns == 1)
- {
- /* No need to worry about extra slots required for virtual insns
- and parallel exec support because MAX_CHAIN_LENGTH is
- guaranteed to be big enough to execute at least 1 insn! */
- max_insns = 1;
- }
- else
- {
- /* Allow enough slop so that while compiling insns, if max_insns > 0
- then there's guaranteed to be enough space to emit one real insn.
- MAX_CHAIN_LENGTH is typically much longer than
- the normal number of insns between cti's anyway. */
- max_insns -= (1 /* one for the trailing chain insn */
- + (FAST_P
- ? 0
- : (1 + MAX_PARALLEL_INSNS) /* before+after */)
- + (MAX_PARALLEL_INSNS > 1
- ? (MAX_PARALLEL_INSNS * 2)
- : 0));
-
- /* Account for before/after handlers. */
- if (! FAST_P)
- slice_insns *= 3;
-
- if (slice_insns > 0
- && slice_insns < max_insns)
- max_insns = slice_insns;
- }
-
- new_vpc = sc;
-
- /* SC,PC must be updated to point passed the last entry used.
- SET_CTI_VPC must be called if pbb is terminated by a cti.
- SET_INSN_COUNT must be called to record number of real insns in
- pbb [could be computed by us of course, extra cpu but perhaps
- negligible enough]. */
-
-/* begin extract-pbb */
-{
- const IDESC *idesc;
- int icount = 0;
-
- while (max_insns > 0)
- {
- UHI insn = GETIMEMUHI (current_cpu, pc);
-
- idesc = extract (current_cpu, pc, insn, &sc->argbuf, FAST_P);
- SEM_SKIP_COMPILE (current_cpu, sc, 1);
- ++sc;
- --max_insns;
- ++icount;
- pc += idesc->length;
-
- if (IDESC_CTI_P (idesc))
- {
- SET_CTI_VPC (sc - 1);
-
- if (CGEN_ATTR_VALUE (NULL, idesc->attrs, CGEN_INSN_DELAY_SLOT))
- {
- USI insn = GETIMEMUHI (current_cpu, pc);
- idesc = extract (current_cpu, pc, insn, &sc->argbuf, FAST_P);
-
- if (IDESC_CTI_P (idesc) ||
- CGEN_ATTR_VALUE (NULL, idesc->attrs, CGEN_INSN_ILLSLOT))
- {
- SIM_DESC sd = CPU_STATE (current_cpu);
- sim_io_eprintf (CPU_STATE (current_cpu),
- "malformed program, `%s' insn in delay slot\n",
- CGEN_INSN_NAME (idesc->idata));
- sim_engine_halt (sd, current_cpu, NULL, pc,
- sim_stopped, SIM_SIGILL);
- }
- else
- {
- ++sc;
- --max_insns;
- ++icount;
- pc += idesc->length;
- }
- }
- break;
- }
- }
-
- Finish:
- SET_INSN_COUNT (icount);
-}
-/* end extract-pbb */
-
- /* The last one is a pseudo-insn to link to the next chain.
- It is also used to record the insn count for this chain. */
- {
- const IDESC *id;
-
- /* Was pbb terminated by a cti? */
- if (_cti_sc)
- {
- id = & CPU_IDESC (current_cpu) [SH64_COMPACT_INSN_X_CTI_CHAIN];
- }
- else
- {
- id = & CPU_IDESC (current_cpu) [SH64_COMPACT_INSN_X_CHAIN];
- }
- SEM_SET_CODE (&sc->argbuf, id, FAST_P);
- sc->argbuf.idesc = id;
- sc->argbuf.addr = pc;
- sc->argbuf.fields.chain.insn_count = _insn_count;
- sc->argbuf.fields.chain.next = 0;
- sc->argbuf.fields.chain.branch_target = 0;
- ++sc;
- }
-
- /* Update the pointer to the next free entry, may not have used as
- many entries as was asked for. */
- CPU_SCACHE_NEXT_FREE (current_cpu) = sc;
- /* Record length of chain if profiling.
- This includes virtual insns since they count against
- max_insns too. */
- if (! FAST_P)
- PROFILE_COUNT_SCACHE_CHAIN_LENGTH (current_cpu, sc - orig_sc);
- }
-
- return new_vpc;
-}
-
-/* Chain to the next block from a non-cti terminated previous block. */
-
-INLINE SEM_PC
-sh64_compact_pbb_chain (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-
- PBB_UPDATE_INSN_COUNT (current_cpu, sem_arg);
-
- SET_H_PC (abuf->addr);
-
-
- /* If not running forever, exit back to main loop. */
- if (CPU_MAX_SLICE_INSNS (current_cpu) != 0
- /* Also exit back to main loop if there's an event.
- Note that if CPU_MAX_SLICE_INSNS != 1, events won't get processed
- at the "right" time, but then that was what was asked for.
- There is no silver bullet for simulator engines.
- ??? Clearly this needs a cleaner interface.
- At present it's just so Ctrl-C works. */
- || STATE_EVENTS (CPU_STATE (current_cpu))->work_pending)
- CPU_RUNNING_P (current_cpu) = 0;
-
- /* If chained to next block, go straight to it. */
- if (abuf->fields.chain.next)
- return abuf->fields.chain.next;
- /* See if next block has already been compiled. */
- abuf->fields.chain.next = scache_lookup (current_cpu, abuf->addr);
- if (abuf->fields.chain.next)
- return abuf->fields.chain.next;
- /* Nope, so next insn is a virtual insn to invoke the compiler
- (begin a pbb). */
- return CPU_SCACHE_PBB_BEGIN (current_cpu);
-}
-
-/* Chain to the next block from a cti terminated previous block.
- BR_TYPE indicates whether the branch was taken and whether we can cache
- the vpc of the branch target.
- NEW_PC is the target's branch address, and is only valid if
- BR_TYPE != SEM_BRANCH_UNTAKEN. */
-
-INLINE SEM_PC
-sh64_compact_pbb_cti_chain (SIM_CPU *current_cpu, SEM_ARG sem_arg,
- SEM_BRANCH_TYPE br_type, PCADDR new_pc)
-{
- SEM_PC *new_vpc_ptr;
-
- PBB_UPDATE_INSN_COUNT (current_cpu, sem_arg);
-
- /* If we have switched ISAs, exit back to main loop.
- Set idesc to 0 to cause the engine to point to the right insn table. */
- if (new_pc & 1)
- {
- /* Switch to SHmedia. */
- CPU_IDESC_SEM_INIT_P (current_cpu) = 0;
- CPU_RUNNING_P (current_cpu) = 0;
- }
-
- /* If not running forever, exit back to main loop. */
- if (CPU_MAX_SLICE_INSNS (current_cpu) != 0
- /* Also exit back to main loop if there's an event.
- Note that if CPU_MAX_SLICE_INSNS != 1, events won't get processed
- at the "right" time, but then that was what was asked for.
- There is no silver bullet for simulator engines.
- ??? Clearly this needs a cleaner interface.
- At present it's just so Ctrl-C works. */
- || STATE_EVENTS (CPU_STATE (current_cpu))->work_pending)
- CPU_RUNNING_P (current_cpu) = 0;
-
- /* Restart compiler if we branched to an uncacheable address
- (e.g. "j reg"). */
- if (br_type == SEM_BRANCH_UNCACHEABLE)
- {
- SET_H_PC (new_pc);
- return CPU_SCACHE_PBB_BEGIN (current_cpu);
- }
-
- /* If branch wasn't taken, update the pc and set BR_ADDR_PTR to our
- next chain ptr. */
- if (br_type == SEM_BRANCH_UNTAKEN)
- {
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- new_pc = abuf->addr;
- SET_H_PC (new_pc);
- new_vpc_ptr = &abuf->fields.chain.next;
- }
- else
- {
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- SET_H_PC (new_pc);
- new_vpc_ptr = &abuf->fields.chain.branch_target;
- }
-
- /* If chained to next block, go straight to it. */
- if (*new_vpc_ptr)
- return *new_vpc_ptr;
- /* See if next block has already been compiled. */
- *new_vpc_ptr = scache_lookup (current_cpu, new_pc);
- if (*new_vpc_ptr)
- return *new_vpc_ptr;
- /* Nope, so next insn is a virtual insn to invoke the compiler
- (begin a pbb). */
- return CPU_SCACHE_PBB_BEGIN (current_cpu);
-}
-
-/* x-before handler.
- This is called before each insn. */
-
-void
-sh64_compact_pbb_before (SIM_CPU *current_cpu, SCACHE *sc)
-{
- SEM_ARG sem_arg = sc;
- const ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int first_p = abuf->fields.before.first_p;
- const ARGBUF *cur_abuf = SEM_ARGBUF (sc + 1);
- const IDESC *cur_idesc = cur_abuf->idesc;
- PCADDR pc = cur_abuf->addr;
-
- if (ARGBUF_PROFILE_P (cur_abuf))
- PROFILE_COUNT_INSN (current_cpu, pc, cur_idesc->num);
-
- /* If this isn't the first insn, finish up the previous one. */
-
- if (! first_p)
- {
- if (PROFILE_MODEL_P (current_cpu))
- {
- const SEM_ARG prev_sem_arg = sc - 1;
- const ARGBUF *prev_abuf = SEM_ARGBUF (prev_sem_arg);
- const IDESC *prev_idesc = prev_abuf->idesc;
- int cycles;
-
- /* ??? May want to measure all insns if doing insn tracing. */
- if (ARGBUF_PROFILE_P (prev_abuf))
- {
- cycles = (*prev_idesc->timing->model_fn) (current_cpu, prev_sem_arg);
- sh64_compact_model_insn_after (current_cpu, 0 /*last_p*/, cycles);
- }
- }
-
- TRACE_INSN_FINI (current_cpu, cur_abuf, 0 /*last_p*/);
- }
-
- /* FIXME: Later make cover macros: PROFILE_INSN_{INIT,FINI}. */
- if (PROFILE_MODEL_P (current_cpu)
- && ARGBUF_PROFILE_P (cur_abuf))
- sh64_compact_model_insn_before (current_cpu, first_p);
-
- TRACE_INSN_INIT (current_cpu, cur_abuf, first_p);
- TRACE_INSN (current_cpu, cur_idesc->idata, cur_abuf, pc);
-}
-
-/* x-after handler.
- This is called after a serial insn or at the end of a group of parallel
- insns. */
-
-void
-sh64_compact_pbb_after (SIM_CPU *current_cpu, SCACHE *sc)
-{
- SEM_ARG sem_arg = sc;
- const ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- const SEM_ARG prev_sem_arg = sc - 1;
- const ARGBUF *prev_abuf = SEM_ARGBUF (prev_sem_arg);
-
- /* ??? May want to measure all insns if doing insn tracing. */
- if (PROFILE_MODEL_P (current_cpu)
- && ARGBUF_PROFILE_P (prev_abuf))
- {
- const IDESC *prev_idesc = prev_abuf->idesc;
- int cycles;
-
- cycles = (*prev_idesc->timing->model_fn) (current_cpu, prev_sem_arg);
- sh64_compact_model_insn_after (current_cpu, 1 /*last_p*/, cycles);
- }
- TRACE_INSN_FINI (current_cpu, prev_abuf, 1 /*last_p*/);
-}
-
-#define FAST_P 0
-
-void
-sh64_compact_engine_run_full (SIM_CPU *current_cpu)
-{
- SIM_DESC current_state = CPU_STATE (current_cpu);
- SCACHE *scache = CPU_SCACHE_CACHE (current_cpu);
- /* virtual program counter */
- SEM_PC vpc;
-#if WITH_SEM_SWITCH_FULL
- /* For communication between cti's and cti-chain. */
- SEM_BRANCH_TYPE pbb_br_type;
- PCADDR pbb_br_npc;
-#endif
-
-
- if (! CPU_IDESC_SEM_INIT_P (current_cpu))
- {
- /* ??? 'twould be nice to move this up a level and only call it once.
- On the other hand, in the "let's go fast" case the test is only done
- once per pbb (since we only return to the main loop at the end of
- a pbb). And in the "let's run until we're done" case we don't return
- until the program exits. */
-
-#if WITH_SEM_SWITCH_FULL
-#if defined (__GNUC__)
-/* ??? Later maybe paste sem-switch.c in when building mainloop.c. */
-#define DEFINE_LABELS
-#include "sem-compact-switch.c"
-#endif
-#else
- sh64_compact_sem_init_idesc_table (current_cpu);
-#endif
-
- /* Initialize the "begin (compile) a pbb" virtual insn. */
- vpc = CPU_SCACHE_PBB_BEGIN (current_cpu);
- SEM_SET_FULL_CODE (SEM_ARGBUF (vpc),
- & CPU_IDESC (current_cpu) [SH64_COMPACT_INSN_X_BEGIN]);
- vpc->argbuf.idesc = & CPU_IDESC (current_cpu) [SH64_COMPACT_INSN_X_BEGIN];
-
- CPU_IDESC_SEM_INIT_P (current_cpu) = 1;
- }
-
- CPU_RUNNING_P (current_cpu) = 1;
- /* ??? In the case where we're returning to the main loop after every
- pbb we don't want to call pbb_begin each time (which hashes on the pc
- and does a table lookup). A way to speed this up is to save vpc
- between calls. */
- vpc = sh64_compact_pbb_begin (current_cpu, FAST_P);
-
- do
- {
-/* begin full-exec-pbb */
-{
-#if (! FAST_P && WITH_SEM_SWITCH_FULL) || (FAST_P && WITH_SEM_SWITCH_FAST)
-#define DEFINE_SWITCH
-#include "sem-compact-switch.c"
-#else
- vpc = execute (current_cpu, vpc, FAST_P);
-#endif
-}
-/* end full-exec-pbb */
- }
- while (CPU_RUNNING_P (current_cpu));
-}
-
-#undef FAST_P
-
-
-#define FAST_P 1
-
-void
-sh64_compact_engine_run_fast (SIM_CPU *current_cpu)
-{
- SIM_DESC current_state = CPU_STATE (current_cpu);
- SCACHE *scache = CPU_SCACHE_CACHE (current_cpu);
- /* virtual program counter */
- SEM_PC vpc;
-#if WITH_SEM_SWITCH_FAST
- /* For communication between cti's and cti-chain. */
- SEM_BRANCH_TYPE pbb_br_type;
- PCADDR pbb_br_npc;
-#endif
-
-
- if (! CPU_IDESC_SEM_INIT_P (current_cpu))
- {
- /* ??? 'twould be nice to move this up a level and only call it once.
- On the other hand, in the "let's go fast" case the test is only done
- once per pbb (since we only return to the main loop at the end of
- a pbb). And in the "let's run until we're done" case we don't return
- until the program exits. */
-
-#if WITH_SEM_SWITCH_FAST
-#if defined (__GNUC__)
-/* ??? Later maybe paste sem-switch.c in when building mainloop.c. */
-#define DEFINE_LABELS
-#include "sem-compact-switch.c"
-#endif
-#else
- sh64_compact_semf_init_idesc_table (current_cpu);
-#endif
-
- /* Initialize the "begin (compile) a pbb" virtual insn. */
- vpc = CPU_SCACHE_PBB_BEGIN (current_cpu);
- SEM_SET_FAST_CODE (SEM_ARGBUF (vpc),
- & CPU_IDESC (current_cpu) [SH64_COMPACT_INSN_X_BEGIN]);
- vpc->argbuf.idesc = & CPU_IDESC (current_cpu) [SH64_COMPACT_INSN_X_BEGIN];
-
- CPU_IDESC_SEM_INIT_P (current_cpu) = 1;
- }
-
- CPU_RUNNING_P (current_cpu) = 1;
- /* ??? In the case where we're returning to the main loop after every
- pbb we don't want to call pbb_begin each time (which hashes on the pc
- and does a table lookup). A way to speed this up is to save vpc
- between calls. */
- vpc = sh64_compact_pbb_begin (current_cpu, FAST_P);
-
- do
- {
-/* begin fast-exec-pbb */
-{
-#if (! FAST_P && WITH_SEM_SWITCH_FULL) || (FAST_P && WITH_SEM_SWITCH_FAST)
-#define DEFINE_SWITCH
-#include "sem-compact-switch.c"
-#else
- vpc = execute (current_cpu, vpc, FAST_P);
-#endif
-}
-/* end fast-exec-pbb */
- }
- while (CPU_RUNNING_P (current_cpu));
-}
-
-#undef FAST_P
-
diff --git a/sim/sh64/mloop-media.c b/sim/sh64/mloop-media.c
deleted file mode 100644
index 03c5df534c5..00000000000
--- a/sim/sh64/mloop-media.c
+++ /dev/null
@@ -1,624 +0,0 @@
-/* This file is generated by the genmloop script. DO NOT EDIT! */
-
-/* Enable switch() support in cgen headers. */
-#define SEM_IN_SWITCH
-
-#define WANT_CPU sh64
-#define WANT_CPU_SH64
-
-#include "sim-main.h"
-#include "bfd.h"
-#include "cgen-mem.h"
-#include "cgen-ops.h"
-#include "sim-assert.h"
-
-/* Fill in the administrative ARGBUF fields required by all insns,
- virtual and real. */
-
-static INLINE void
-sh64_media_fill_argbuf (const SIM_CPU *cpu, ARGBUF *abuf, const IDESC *idesc,
- PCADDR pc, int fast_p)
-{
-#if WITH_SCACHE
- SEM_SET_CODE (abuf, idesc, fast_p);
- ARGBUF_ADDR (abuf) = pc;
-#endif
- ARGBUF_IDESC (abuf) = idesc;
-}
-
-/* Fill in tracing/profiling fields of an ARGBUF. */
-
-static INLINE void
-sh64_media_fill_argbuf_tp (const SIM_CPU *cpu, ARGBUF *abuf,
- int trace_p, int profile_p)
-{
- ARGBUF_TRACE_P (abuf) = trace_p;
- ARGBUF_PROFILE_P (abuf) = profile_p;
-}
-
-#if WITH_SCACHE_PBB
-
-/* Emit the "x-before" handler.
- x-before is emitted before each insn (serial or parallel).
- This is as opposed to x-after which is only emitted at the end of a group
- of parallel insns. */
-
-static INLINE void
-sh64_media_emit_before (SIM_CPU *current_cpu, SCACHE *sc, PCADDR pc, int first_p)
-{
- ARGBUF *abuf = &sc[0].argbuf;
- const IDESC *id = & CPU_IDESC (current_cpu) [SH64_MEDIA_INSN_X_BEFORE];
-
- abuf->fields.before.first_p = first_p;
- sh64_media_fill_argbuf (current_cpu, abuf, id, pc, 0);
- /* no need to set trace_p,profile_p */
-}
-
-/* Emit the "x-after" handler.
- x-after is emitted after a serial insn or at the end of a group of
- parallel insns. */
-
-static INLINE void
-sh64_media_emit_after (SIM_CPU *current_cpu, SCACHE *sc, PCADDR pc)
-{
- ARGBUF *abuf = &sc[0].argbuf;
- const IDESC *id = & CPU_IDESC (current_cpu) [SH64_MEDIA_INSN_X_AFTER];
-
- sh64_media_fill_argbuf (current_cpu, abuf, id, pc, 0);
- /* no need to set trace_p,profile_p */
-}
-
-#endif /* WITH_SCACHE_PBB */
-
-
-static INLINE const IDESC *
-extract (SIM_CPU *current_cpu, PCADDR pc, CGEN_INSN_INT insn, ARGBUF *abuf,
- int fast_p)
-{
- const IDESC *id = sh64_media_decode (current_cpu, pc, insn, insn, abuf);
-
- sh64_media_fill_argbuf (current_cpu, abuf, id, pc, fast_p);
- if (! fast_p)
- {
- int trace_p = PC_IN_TRACE_RANGE_P (current_cpu, pc);
- int profile_p = PC_IN_PROFILE_RANGE_P (current_cpu, pc);
- sh64_media_fill_argbuf_tp (current_cpu, abuf, trace_p, profile_p);
- }
- return id;
-}
-
-static INLINE SEM_PC
-execute (SIM_CPU *current_cpu, SCACHE *sc, int fast_p)
-{
- SEM_PC vpc;
-
- if (fast_p)
- {
-#if ! WITH_SEM_SWITCH_FAST
-#if WITH_SCACHE
- vpc = (*sc->argbuf.semantic.sem_fast) (current_cpu, sc);
-#else
- vpc = (*sc->argbuf.semantic.sem_fast) (current_cpu, &sc->argbuf);
-#endif
-#else
- abort ();
-#endif /* WITH_SEM_SWITCH_FAST */
- }
- else
- {
-#if ! WITH_SEM_SWITCH_FULL
- ARGBUF *abuf = &sc->argbuf;
- const IDESC *idesc = abuf->idesc;
-#if WITH_SCACHE_PBB
- int virtual_p = CGEN_ATTR_VALUE (NULL, idesc->attrs, CGEN_INSN_VIRTUAL);
-#else
- int virtual_p = 0;
-#endif
-
- if (! virtual_p)
- {
- /* FIXME: call x-before */
- if (ARGBUF_PROFILE_P (abuf))
- PROFILE_COUNT_INSN (current_cpu, abuf->addr, idesc->num);
- /* FIXME: Later make cover macros: PROFILE_INSN_{INIT,FINI}. */
- if (PROFILE_MODEL_P (current_cpu)
- && ARGBUF_PROFILE_P (abuf))
- sh64_media_model_insn_before (current_cpu, 1 /*first_p*/);
- TRACE_INSN_INIT (current_cpu, abuf, 1);
- TRACE_INSN (current_cpu, idesc->idata,
- (const struct argbuf *) abuf, abuf->addr);
- }
-#if WITH_SCACHE
- vpc = (*sc->argbuf.semantic.sem_full) (current_cpu, sc);
-#else
- vpc = (*sc->argbuf.semantic.sem_full) (current_cpu, abuf);
-#endif
- if (! virtual_p)
- {
- /* FIXME: call x-after */
- if (PROFILE_MODEL_P (current_cpu)
- && ARGBUF_PROFILE_P (abuf))
- {
- int cycles;
-
- cycles = (*idesc->timing->model_fn) (current_cpu, sc);
- sh64_media_model_insn_after (current_cpu, 1 /*last_p*/, cycles);
- }
- TRACE_INSN_FINI (current_cpu, abuf, 1);
- }
-#else
- abort ();
-#endif /* WITH_SEM_SWITCH_FULL */
- }
-
- return vpc;
-}
-
-
-/* Record address of cti terminating a pbb. */
-#define SET_CTI_VPC(sc) do { _cti_sc = (sc); } while (0)
-/* Record number of [real] insns in pbb. */
-#define SET_INSN_COUNT(n) do { _insn_count = (n); } while (0)
-
-/* Fetch and extract a pseudo-basic-block.
- FAST_P is non-zero if no tracing/profiling/etc. is wanted. */
-
-INLINE SEM_PC
-sh64_media_pbb_begin (SIM_CPU *current_cpu, int FAST_P)
-{
- SEM_PC new_vpc;
- PCADDR pc;
- SCACHE *sc;
- int max_insns = CPU_SCACHE_MAX_CHAIN_LENGTH (current_cpu);
-
- pc = GET_H_PC ();
-
- new_vpc = scache_lookup_or_alloc (current_cpu, pc, max_insns, &sc);
- if (! new_vpc)
- {
- /* Leading '_' to avoid collision with mainloop.in. */
- int _insn_count = 0;
- SCACHE *orig_sc = sc;
- SCACHE *_cti_sc = NULL;
- int slice_insns = CPU_MAX_SLICE_INSNS (current_cpu);
-
- /* First figure out how many instructions to compile.
- MAX_INSNS is the size of the allocated buffer, which includes space
- for before/after handlers if they're being used.
- SLICE_INSNS is the maxinum number of real insns that can be
- executed. Zero means "as many as we want". */
- /* ??? max_insns is serving two incompatible roles.
- 1) Number of slots available in scache buffer.
- 2) Number of real insns to execute.
- They're incompatible because there are virtual insns emitted too
- (chain,cti-chain,before,after handlers). */
-
- if (slice_insns == 1)
- {
- /* No need to worry about extra slots required for virtual insns
- and parallel exec support because MAX_CHAIN_LENGTH is
- guaranteed to be big enough to execute at least 1 insn! */
- max_insns = 1;
- }
- else
- {
- /* Allow enough slop so that while compiling insns, if max_insns > 0
- then there's guaranteed to be enough space to emit one real insn.
- MAX_CHAIN_LENGTH is typically much longer than
- the normal number of insns between cti's anyway. */
- max_insns -= (1 /* one for the trailing chain insn */
- + (FAST_P
- ? 0
- : (1 + MAX_PARALLEL_INSNS) /* before+after */)
- + (MAX_PARALLEL_INSNS > 1
- ? (MAX_PARALLEL_INSNS * 2)
- : 0));
-
- /* Account for before/after handlers. */
- if (! FAST_P)
- slice_insns *= 3;
-
- if (slice_insns > 0
- && slice_insns < max_insns)
- max_insns = slice_insns;
- }
-
- new_vpc = sc;
-
- /* SC,PC must be updated to point passed the last entry used.
- SET_CTI_VPC must be called if pbb is terminated by a cti.
- SET_INSN_COUNT must be called to record number of real insns in
- pbb [could be computed by us of course, extra cpu but perhaps
- negligible enough]. */
-
-/* begin extract-pbb */
-{
- const IDESC *idesc;
- int icount = 0;
-
- while (max_insns > 0)
- {
- USI insn = GETIMEMUSI (current_cpu, pc);
-
- idesc = extract (current_cpu, pc, insn, &sc->argbuf, FAST_P);
- SEM_SKIP_COMPILE (current_cpu, sc, 1);
- ++sc;
- --max_insns;
- ++icount;
- pc += idesc->length;
-
- if (IDESC_CTI_P (idesc))
- {
- SET_CTI_VPC (sc - 1);
-
- if (CGEN_ATTR_VALUE (NULL, idesc->attrs, CGEN_INSN_DELAY_SLOT))
- {
- USI insn = GETIMEMUSI (current_cpu, pc);
- idesc = extract (current_cpu, pc, insn, &sc->argbuf, FAST_P);
-
- ++sc;
- --max_insns;
- ++icount;
- pc += idesc->length;
- }
- break;
- }
- }
-
- Finish:
- SET_INSN_COUNT (icount);
-}
-/* end extract-pbb */
-
- /* The last one is a pseudo-insn to link to the next chain.
- It is also used to record the insn count for this chain. */
- {
- const IDESC *id;
-
- /* Was pbb terminated by a cti? */
- if (_cti_sc)
- {
- id = & CPU_IDESC (current_cpu) [SH64_MEDIA_INSN_X_CTI_CHAIN];
- }
- else
- {
- id = & CPU_IDESC (current_cpu) [SH64_MEDIA_INSN_X_CHAIN];
- }
- SEM_SET_CODE (&sc->argbuf, id, FAST_P);
- sc->argbuf.idesc = id;
- sc->argbuf.addr = pc;
- sc->argbuf.fields.chain.insn_count = _insn_count;
- sc->argbuf.fields.chain.next = 0;
- sc->argbuf.fields.chain.branch_target = 0;
- ++sc;
- }
-
- /* Update the pointer to the next free entry, may not have used as
- many entries as was asked for. */
- CPU_SCACHE_NEXT_FREE (current_cpu) = sc;
- /* Record length of chain if profiling.
- This includes virtual insns since they count against
- max_insns too. */
- if (! FAST_P)
- PROFILE_COUNT_SCACHE_CHAIN_LENGTH (current_cpu, sc - orig_sc);
- }
-
- return new_vpc;
-}
-
-/* Chain to the next block from a non-cti terminated previous block. */
-
-INLINE SEM_PC
-sh64_media_pbb_chain (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-
- PBB_UPDATE_INSN_COUNT (current_cpu, sem_arg);
-
- SET_H_PC (abuf->addr | 1);
-
- /* If not running forever, exit back to main loop. */
- if (CPU_MAX_SLICE_INSNS (current_cpu) != 0
- /* Also exit back to main loop if there's an event.
- Note that if CPU_MAX_SLICE_INSNS != 1, events won't get processed
- at the "right" time, but then that was what was asked for.
- There is no silver bullet for simulator engines.
- ??? Clearly this needs a cleaner interface.
- At present it's just so Ctrl-C works. */
- || STATE_EVENTS (CPU_STATE (current_cpu))->work_pending)
- CPU_RUNNING_P (current_cpu) = 0;
-
- /* If chained to next block, go straight to it. */
- if (abuf->fields.chain.next)
- return abuf->fields.chain.next;
- /* See if next block has already been compiled. */
- abuf->fields.chain.next = scache_lookup (current_cpu, abuf->addr);
- if (abuf->fields.chain.next)
- return abuf->fields.chain.next;
- /* Nope, so next insn is a virtual insn to invoke the compiler
- (begin a pbb). */
- return CPU_SCACHE_PBB_BEGIN (current_cpu);
-}
-
-/* Chain to the next block from a cti terminated previous block.
- BR_TYPE indicates whether the branch was taken and whether we can cache
- the vpc of the branch target.
- NEW_PC is the target's branch address, and is only valid if
- BR_TYPE != SEM_BRANCH_UNTAKEN. */
-
-INLINE SEM_PC
-sh64_media_pbb_cti_chain (SIM_CPU *current_cpu, SEM_ARG sem_arg,
- SEM_BRANCH_TYPE br_type, PCADDR new_pc)
-{
- SEM_PC *new_vpc_ptr;
-
- PBB_UPDATE_INSN_COUNT (current_cpu, sem_arg);
-
- /* If we have switched ISAs, exit back to main loop.
- Set idesc to 0 to cause the engine to point to the right insn table. */
- if ((new_pc & 1) == 0)
- {
- /* Switch to SHcompact. */
- CPU_IDESC_SEM_INIT_P (current_cpu) = 0;
- CPU_RUNNING_P (current_cpu) = 0;
- }
-
- /* If not running forever, exit back to main loop. */
- if (CPU_MAX_SLICE_INSNS (current_cpu) != 0
- /* Also exit back to main loop if there's an event.
- Note that if CPU_MAX_SLICE_INSNS != 1, events won't get processed
- at the "right" time, but then that was what was asked for.
- There is no silver bullet for simulator engines.
- ??? Clearly this needs a cleaner interface.
- At present it's just so Ctrl-C works. */
- || STATE_EVENTS (CPU_STATE (current_cpu))->work_pending)
- CPU_RUNNING_P (current_cpu) = 0;
-
- /* Restart compiler if we branched to an uncacheable address
- (e.g. "j reg"). */
- if (br_type == SEM_BRANCH_UNCACHEABLE)
- {
- SET_H_PC (new_pc);
- return CPU_SCACHE_PBB_BEGIN (current_cpu);
- }
-
- /* If branch wasn't taken, update the pc and set BR_ADDR_PTR to our
- next chain ptr. */
- if (br_type == SEM_BRANCH_UNTAKEN)
- {
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- new_pc = abuf->addr;
- /* Set bit 0 to stay in SHmedia mode. */
- SET_H_PC (new_pc | 1);
- new_vpc_ptr = &abuf->fields.chain.next;
- }
- else
- {
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- SET_H_PC (new_pc);
- new_vpc_ptr = &abuf->fields.chain.branch_target;
- }
-
- /* If chained to next block, go straight to it. */
- if (*new_vpc_ptr)
- return *new_vpc_ptr;
- /* See if next block has already been compiled. */
- *new_vpc_ptr = scache_lookup (current_cpu, new_pc);
- if (*new_vpc_ptr)
- return *new_vpc_ptr;
- /* Nope, so next insn is a virtual insn to invoke the compiler
- (begin a pbb). */
- return CPU_SCACHE_PBB_BEGIN (current_cpu);
-}
-
-/* x-before handler.
- This is called before each insn. */
-
-void
-sh64_media_pbb_before (SIM_CPU *current_cpu, SCACHE *sc)
-{
- SEM_ARG sem_arg = sc;
- const ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int first_p = abuf->fields.before.first_p;
- const ARGBUF *cur_abuf = SEM_ARGBUF (sc + 1);
- const IDESC *cur_idesc = cur_abuf->idesc;
- PCADDR pc = cur_abuf->addr;
-
- if (ARGBUF_PROFILE_P (cur_abuf))
- PROFILE_COUNT_INSN (current_cpu, pc, cur_idesc->num);
-
- /* If this isn't the first insn, finish up the previous one. */
-
- if (! first_p)
- {
- if (PROFILE_MODEL_P (current_cpu))
- {
- const SEM_ARG prev_sem_arg = sc - 1;
- const ARGBUF *prev_abuf = SEM_ARGBUF (prev_sem_arg);
- const IDESC *prev_idesc = prev_abuf->idesc;
- int cycles;
-
- /* ??? May want to measure all insns if doing insn tracing. */
- if (ARGBUF_PROFILE_P (prev_abuf))
- {
- cycles = (*prev_idesc->timing->model_fn) (current_cpu, prev_sem_arg);
- sh64_media_model_insn_after (current_cpu, 0 /*last_p*/, cycles);
- }
- }
-
- TRACE_INSN_FINI (current_cpu, cur_abuf, 0 /*last_p*/);
- }
-
- /* FIXME: Later make cover macros: PROFILE_INSN_{INIT,FINI}. */
- if (PROFILE_MODEL_P (current_cpu)
- && ARGBUF_PROFILE_P (cur_abuf))
- sh64_media_model_insn_before (current_cpu, first_p);
-
- TRACE_INSN_INIT (current_cpu, cur_abuf, first_p);
- TRACE_INSN (current_cpu, cur_idesc->idata, cur_abuf, pc);
-}
-
-/* x-after handler.
- This is called after a serial insn or at the end of a group of parallel
- insns. */
-
-void
-sh64_media_pbb_after (SIM_CPU *current_cpu, SCACHE *sc)
-{
- SEM_ARG sem_arg = sc;
- const ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- const SEM_ARG prev_sem_arg = sc - 1;
- const ARGBUF *prev_abuf = SEM_ARGBUF (prev_sem_arg);
-
- /* ??? May want to measure all insns if doing insn tracing. */
- if (PROFILE_MODEL_P (current_cpu)
- && ARGBUF_PROFILE_P (prev_abuf))
- {
- const IDESC *prev_idesc = prev_abuf->idesc;
- int cycles;
-
- cycles = (*prev_idesc->timing->model_fn) (current_cpu, prev_sem_arg);
- sh64_media_model_insn_after (current_cpu, 1 /*last_p*/, cycles);
- }
- TRACE_INSN_FINI (current_cpu, prev_abuf, 1 /*last_p*/);
-}
-
-#define FAST_P 0
-
-void
-sh64_media_engine_run_full (SIM_CPU *current_cpu)
-{
- SIM_DESC current_state = CPU_STATE (current_cpu);
- SCACHE *scache = CPU_SCACHE_CACHE (current_cpu);
- /* virtual program counter */
- SEM_PC vpc;
-#if WITH_SEM_SWITCH_FULL
- /* For communication between cti's and cti-chain. */
- SEM_BRANCH_TYPE pbb_br_type;
- PCADDR pbb_br_npc;
-#endif
-
-
- if (! CPU_IDESC_SEM_INIT_P (current_cpu))
- {
- /* ??? 'twould be nice to move this up a level and only call it once.
- On the other hand, in the "let's go fast" case the test is only done
- once per pbb (since we only return to the main loop at the end of
- a pbb). And in the "let's run until we're done" case we don't return
- until the program exits. */
-
-#if WITH_SEM_SWITCH_FULL
-#if defined (__GNUC__)
-/* ??? Later maybe paste sem-switch.c in when building mainloop.c. */
-#define DEFINE_LABELS
-#include "sem-media-switch.c"
-#endif
-#else
- sh64_media_sem_init_idesc_table (current_cpu);
-#endif
-
- /* Initialize the "begin (compile) a pbb" virtual insn. */
- vpc = CPU_SCACHE_PBB_BEGIN (current_cpu);
- SEM_SET_FULL_CODE (SEM_ARGBUF (vpc),
- & CPU_IDESC (current_cpu) [SH64_MEDIA_INSN_X_BEGIN]);
- vpc->argbuf.idesc = & CPU_IDESC (current_cpu) [SH64_MEDIA_INSN_X_BEGIN];
-
- CPU_IDESC_SEM_INIT_P (current_cpu) = 1;
- }
-
- CPU_RUNNING_P (current_cpu) = 1;
- /* ??? In the case where we're returning to the main loop after every
- pbb we don't want to call pbb_begin each time (which hashes on the pc
- and does a table lookup). A way to speed this up is to save vpc
- between calls. */
- vpc = sh64_media_pbb_begin (current_cpu, FAST_P);
-
- do
- {
-/* begin full-exec-pbb */
-{
-#if (! FAST_P && WITH_SEM_SWITCH_FULL) || (FAST_P && WITH_SEM_SWITCH_FAST)
-#define DEFINE_SWITCH
-#define WITH_ISA_COMPACT
-#include "sem-media-switch.c"
-#else
- vpc = execute (current_cpu, vpc, FAST_P);
-#endif
-}
-/* end full-exec-pbb */
- }
- while (CPU_RUNNING_P (current_cpu));
-}
-
-#undef FAST_P
-
-
-#define FAST_P 1
-
-void
-sh64_media_engine_run_fast (SIM_CPU *current_cpu)
-{
- SIM_DESC current_state = CPU_STATE (current_cpu);
- SCACHE *scache = CPU_SCACHE_CACHE (current_cpu);
- /* virtual program counter */
- SEM_PC vpc;
-#if WITH_SEM_SWITCH_FAST
- /* For communication between cti's and cti-chain. */
- SEM_BRANCH_TYPE pbb_br_type;
- PCADDR pbb_br_npc;
-#endif
-
-
- if (! CPU_IDESC_SEM_INIT_P (current_cpu))
- {
- /* ??? 'twould be nice to move this up a level and only call it once.
- On the other hand, in the "let's go fast" case the test is only done
- once per pbb (since we only return to the main loop at the end of
- a pbb). And in the "let's run until we're done" case we don't return
- until the program exits. */
-
-#if WITH_SEM_SWITCH_FAST
-#if defined (__GNUC__)
-/* ??? Later maybe paste sem-switch.c in when building mainloop.c. */
-#define DEFINE_LABELS
-#include "sem-media-switch.c"
-#endif
-#else
- sh64_media_semf_init_idesc_table (current_cpu);
-#endif
-
- /* Initialize the "begin (compile) a pbb" virtual insn. */
- vpc = CPU_SCACHE_PBB_BEGIN (current_cpu);
- SEM_SET_FAST_CODE (SEM_ARGBUF (vpc),
- & CPU_IDESC (current_cpu) [SH64_MEDIA_INSN_X_BEGIN]);
- vpc->argbuf.idesc = & CPU_IDESC (current_cpu) [SH64_MEDIA_INSN_X_BEGIN];
-
- CPU_IDESC_SEM_INIT_P (current_cpu) = 1;
- }
-
- CPU_RUNNING_P (current_cpu) = 1;
- /* ??? In the case where we're returning to the main loop after every
- pbb we don't want to call pbb_begin each time (which hashes on the pc
- and does a table lookup). A way to speed this up is to save vpc
- between calls. */
- vpc = sh64_media_pbb_begin (current_cpu, FAST_P);
-
- do
- {
-/* begin fast-exec-pbb */
-{
-#if (! FAST_P && WITH_SEM_SWITCH_FULL) || (FAST_P && WITH_SEM_SWITCH_FAST)
-#define DEFINE_SWITCH
-#define WITH_ISA_COMPACT
-#include "sem-media-switch.c"
-#else
- vpc = execute (current_cpu, vpc, FAST_P);
-#endif
-}
-/* end fast-exec-pbb */
- }
- while (CPU_RUNNING_P (current_cpu));
-}
-
-#undef FAST_P
-
diff --git a/sim/sh64/sem-compact-switch.c b/sim/sh64/sem-compact-switch.c
deleted file mode 100644
index 59270e83905..00000000000
--- a/sim/sh64/sem-compact-switch.c
+++ /dev/null
@@ -1,4941 +0,0 @@
-/* Simulator instruction semantics for sh64.
-
-THIS FILE IS MACHINE GENERATED WITH CGEN.
-
-Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
-
-This file is part of the GNU Simulators.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-
-#ifdef DEFINE_LABELS
-
- /* The labels have the case they have because the enum of insn types
- is all uppercase and in the non-stdc case the insn symbol is built
- into the enum name. */
-
- static struct {
- int index;
- void *label;
- } labels[] = {
- { SH64_COMPACT_INSN_X_INVALID, && case_sem_INSN_X_INVALID },
- { SH64_COMPACT_INSN_X_AFTER, && case_sem_INSN_X_AFTER },
- { SH64_COMPACT_INSN_X_BEFORE, && case_sem_INSN_X_BEFORE },
- { SH64_COMPACT_INSN_X_CTI_CHAIN, && case_sem_INSN_X_CTI_CHAIN },
- { SH64_COMPACT_INSN_X_CHAIN, && case_sem_INSN_X_CHAIN },
- { SH64_COMPACT_INSN_X_BEGIN, && case_sem_INSN_X_BEGIN },
- { SH64_COMPACT_INSN_ADD_COMPACT, && case_sem_INSN_ADD_COMPACT },
- { SH64_COMPACT_INSN_ADDI_COMPACT, && case_sem_INSN_ADDI_COMPACT },
- { SH64_COMPACT_INSN_ADDC_COMPACT, && case_sem_INSN_ADDC_COMPACT },
- { SH64_COMPACT_INSN_ADDV_COMPACT, && case_sem_INSN_ADDV_COMPACT },
- { SH64_COMPACT_INSN_AND_COMPACT, && case_sem_INSN_AND_COMPACT },
- { SH64_COMPACT_INSN_ANDI_COMPACT, && case_sem_INSN_ANDI_COMPACT },
- { SH64_COMPACT_INSN_ANDB_COMPACT, && case_sem_INSN_ANDB_COMPACT },
- { SH64_COMPACT_INSN_BF_COMPACT, && case_sem_INSN_BF_COMPACT },
- { SH64_COMPACT_INSN_BFS_COMPACT, && case_sem_INSN_BFS_COMPACT },
- { SH64_COMPACT_INSN_BRA_COMPACT, && case_sem_INSN_BRA_COMPACT },
- { SH64_COMPACT_INSN_BRAF_COMPACT, && case_sem_INSN_BRAF_COMPACT },
- { SH64_COMPACT_INSN_BRK_COMPACT, && case_sem_INSN_BRK_COMPACT },
- { SH64_COMPACT_INSN_BSR_COMPACT, && case_sem_INSN_BSR_COMPACT },
- { SH64_COMPACT_INSN_BSRF_COMPACT, && case_sem_INSN_BSRF_COMPACT },
- { SH64_COMPACT_INSN_BT_COMPACT, && case_sem_INSN_BT_COMPACT },
- { SH64_COMPACT_INSN_BTS_COMPACT, && case_sem_INSN_BTS_COMPACT },
- { SH64_COMPACT_INSN_CLRMAC_COMPACT, && case_sem_INSN_CLRMAC_COMPACT },
- { SH64_COMPACT_INSN_CLRS_COMPACT, && case_sem_INSN_CLRS_COMPACT },
- { SH64_COMPACT_INSN_CLRT_COMPACT, && case_sem_INSN_CLRT_COMPACT },
- { SH64_COMPACT_INSN_CMPEQ_COMPACT, && case_sem_INSN_CMPEQ_COMPACT },
- { SH64_COMPACT_INSN_CMPEQI_COMPACT, && case_sem_INSN_CMPEQI_COMPACT },
- { SH64_COMPACT_INSN_CMPGE_COMPACT, && case_sem_INSN_CMPGE_COMPACT },
- { SH64_COMPACT_INSN_CMPGT_COMPACT, && case_sem_INSN_CMPGT_COMPACT },
- { SH64_COMPACT_INSN_CMPHI_COMPACT, && case_sem_INSN_CMPHI_COMPACT },
- { SH64_COMPACT_INSN_CMPHS_COMPACT, && case_sem_INSN_CMPHS_COMPACT },
- { SH64_COMPACT_INSN_CMPPL_COMPACT, && case_sem_INSN_CMPPL_COMPACT },
- { SH64_COMPACT_INSN_CMPPZ_COMPACT, && case_sem_INSN_CMPPZ_COMPACT },
- { SH64_COMPACT_INSN_CMPSTR_COMPACT, && case_sem_INSN_CMPSTR_COMPACT },
- { SH64_COMPACT_INSN_DIV0S_COMPACT, && case_sem_INSN_DIV0S_COMPACT },
- { SH64_COMPACT_INSN_DIV0U_COMPACT, && case_sem_INSN_DIV0U_COMPACT },
- { SH64_COMPACT_INSN_DIV1_COMPACT, && case_sem_INSN_DIV1_COMPACT },
- { SH64_COMPACT_INSN_DMULSL_COMPACT, && case_sem_INSN_DMULSL_COMPACT },
- { SH64_COMPACT_INSN_DMULUL_COMPACT, && case_sem_INSN_DMULUL_COMPACT },
- { SH64_COMPACT_INSN_DT_COMPACT, && case_sem_INSN_DT_COMPACT },
- { SH64_COMPACT_INSN_EXTSB_COMPACT, && case_sem_INSN_EXTSB_COMPACT },
- { SH64_COMPACT_INSN_EXTSW_COMPACT, && case_sem_INSN_EXTSW_COMPACT },
- { SH64_COMPACT_INSN_EXTUB_COMPACT, && case_sem_INSN_EXTUB_COMPACT },
- { SH64_COMPACT_INSN_EXTUW_COMPACT, && case_sem_INSN_EXTUW_COMPACT },
- { SH64_COMPACT_INSN_FABS_COMPACT, && case_sem_INSN_FABS_COMPACT },
- { SH64_COMPACT_INSN_FADD_COMPACT, && case_sem_INSN_FADD_COMPACT },
- { SH64_COMPACT_INSN_FCMPEQ_COMPACT, && case_sem_INSN_FCMPEQ_COMPACT },
- { SH64_COMPACT_INSN_FCMPGT_COMPACT, && case_sem_INSN_FCMPGT_COMPACT },
- { SH64_COMPACT_INSN_FCNVDS_COMPACT, && case_sem_INSN_FCNVDS_COMPACT },
- { SH64_COMPACT_INSN_FCNVSD_COMPACT, && case_sem_INSN_FCNVSD_COMPACT },
- { SH64_COMPACT_INSN_FDIV_COMPACT, && case_sem_INSN_FDIV_COMPACT },
- { SH64_COMPACT_INSN_FIPR_COMPACT, && case_sem_INSN_FIPR_COMPACT },
- { SH64_COMPACT_INSN_FLDS_COMPACT, && case_sem_INSN_FLDS_COMPACT },
- { SH64_COMPACT_INSN_FLDI0_COMPACT, && case_sem_INSN_FLDI0_COMPACT },
- { SH64_COMPACT_INSN_FLDI1_COMPACT, && case_sem_INSN_FLDI1_COMPACT },
- { SH64_COMPACT_INSN_FLOAT_COMPACT, && case_sem_INSN_FLOAT_COMPACT },
- { SH64_COMPACT_INSN_FMAC_COMPACT, && case_sem_INSN_FMAC_COMPACT },
- { SH64_COMPACT_INSN_FMOV1_COMPACT, && case_sem_INSN_FMOV1_COMPACT },
- { SH64_COMPACT_INSN_FMOV2_COMPACT, && case_sem_INSN_FMOV2_COMPACT },
- { SH64_COMPACT_INSN_FMOV3_COMPACT, && case_sem_INSN_FMOV3_COMPACT },
- { SH64_COMPACT_INSN_FMOV4_COMPACT, && case_sem_INSN_FMOV4_COMPACT },
- { SH64_COMPACT_INSN_FMOV5_COMPACT, && case_sem_INSN_FMOV5_COMPACT },
- { SH64_COMPACT_INSN_FMOV6_COMPACT, && case_sem_INSN_FMOV6_COMPACT },
- { SH64_COMPACT_INSN_FMOV7_COMPACT, && case_sem_INSN_FMOV7_COMPACT },
- { SH64_COMPACT_INSN_FMUL_COMPACT, && case_sem_INSN_FMUL_COMPACT },
- { SH64_COMPACT_INSN_FNEG_COMPACT, && case_sem_INSN_FNEG_COMPACT },
- { SH64_COMPACT_INSN_FRCHG_COMPACT, && case_sem_INSN_FRCHG_COMPACT },
- { SH64_COMPACT_INSN_FSCHG_COMPACT, && case_sem_INSN_FSCHG_COMPACT },
- { SH64_COMPACT_INSN_FSQRT_COMPACT, && case_sem_INSN_FSQRT_COMPACT },
- { SH64_COMPACT_INSN_FSTS_COMPACT, && case_sem_INSN_FSTS_COMPACT },
- { SH64_COMPACT_INSN_FSUB_COMPACT, && case_sem_INSN_FSUB_COMPACT },
- { SH64_COMPACT_INSN_FTRC_COMPACT, && case_sem_INSN_FTRC_COMPACT },
- { SH64_COMPACT_INSN_FTRV_COMPACT, && case_sem_INSN_FTRV_COMPACT },
- { SH64_COMPACT_INSN_JMP_COMPACT, && case_sem_INSN_JMP_COMPACT },
- { SH64_COMPACT_INSN_JSR_COMPACT, && case_sem_INSN_JSR_COMPACT },
- { SH64_COMPACT_INSN_LDC_COMPACT, && case_sem_INSN_LDC_COMPACT },
- { SH64_COMPACT_INSN_LDCL_COMPACT, && case_sem_INSN_LDCL_COMPACT },
- { SH64_COMPACT_INSN_LDS_FPSCR_COMPACT, && case_sem_INSN_LDS_FPSCR_COMPACT },
- { SH64_COMPACT_INSN_LDSL_FPSCR_COMPACT, && case_sem_INSN_LDSL_FPSCR_COMPACT },
- { SH64_COMPACT_INSN_LDS_FPUL_COMPACT, && case_sem_INSN_LDS_FPUL_COMPACT },
- { SH64_COMPACT_INSN_LDSL_FPUL_COMPACT, && case_sem_INSN_LDSL_FPUL_COMPACT },
- { SH64_COMPACT_INSN_LDS_MACH_COMPACT, && case_sem_INSN_LDS_MACH_COMPACT },
- { SH64_COMPACT_INSN_LDSL_MACH_COMPACT, && case_sem_INSN_LDSL_MACH_COMPACT },
- { SH64_COMPACT_INSN_LDS_MACL_COMPACT, && case_sem_INSN_LDS_MACL_COMPACT },
- { SH64_COMPACT_INSN_LDSL_MACL_COMPACT, && case_sem_INSN_LDSL_MACL_COMPACT },
- { SH64_COMPACT_INSN_LDS_PR_COMPACT, && case_sem_INSN_LDS_PR_COMPACT },
- { SH64_COMPACT_INSN_LDSL_PR_COMPACT, && case_sem_INSN_LDSL_PR_COMPACT },
- { SH64_COMPACT_INSN_MACL_COMPACT, && case_sem_INSN_MACL_COMPACT },
- { SH64_COMPACT_INSN_MACW_COMPACT, && case_sem_INSN_MACW_COMPACT },
- { SH64_COMPACT_INSN_MOV_COMPACT, && case_sem_INSN_MOV_COMPACT },
- { SH64_COMPACT_INSN_MOVI_COMPACT, && case_sem_INSN_MOVI_COMPACT },
- { SH64_COMPACT_INSN_MOVB1_COMPACT, && case_sem_INSN_MOVB1_COMPACT },
- { SH64_COMPACT_INSN_MOVB2_COMPACT, && case_sem_INSN_MOVB2_COMPACT },
- { SH64_COMPACT_INSN_MOVB3_COMPACT, && case_sem_INSN_MOVB3_COMPACT },
- { SH64_COMPACT_INSN_MOVB4_COMPACT, && case_sem_INSN_MOVB4_COMPACT },
- { SH64_COMPACT_INSN_MOVB5_COMPACT, && case_sem_INSN_MOVB5_COMPACT },
- { SH64_COMPACT_INSN_MOVB6_COMPACT, && case_sem_INSN_MOVB6_COMPACT },
- { SH64_COMPACT_INSN_MOVB7_COMPACT, && case_sem_INSN_MOVB7_COMPACT },
- { SH64_COMPACT_INSN_MOVB8_COMPACT, && case_sem_INSN_MOVB8_COMPACT },
- { SH64_COMPACT_INSN_MOVB9_COMPACT, && case_sem_INSN_MOVB9_COMPACT },
- { SH64_COMPACT_INSN_MOVB10_COMPACT, && case_sem_INSN_MOVB10_COMPACT },
- { SH64_COMPACT_INSN_MOVL1_COMPACT, && case_sem_INSN_MOVL1_COMPACT },
- { SH64_COMPACT_INSN_MOVL2_COMPACT, && case_sem_INSN_MOVL2_COMPACT },
- { SH64_COMPACT_INSN_MOVL3_COMPACT, && case_sem_INSN_MOVL3_COMPACT },
- { SH64_COMPACT_INSN_MOVL4_COMPACT, && case_sem_INSN_MOVL4_COMPACT },
- { SH64_COMPACT_INSN_MOVL5_COMPACT, && case_sem_INSN_MOVL5_COMPACT },
- { SH64_COMPACT_INSN_MOVL6_COMPACT, && case_sem_INSN_MOVL6_COMPACT },
- { SH64_COMPACT_INSN_MOVL7_COMPACT, && case_sem_INSN_MOVL7_COMPACT },
- { SH64_COMPACT_INSN_MOVL8_COMPACT, && case_sem_INSN_MOVL8_COMPACT },
- { SH64_COMPACT_INSN_MOVL9_COMPACT, && case_sem_INSN_MOVL9_COMPACT },
- { SH64_COMPACT_INSN_MOVL10_COMPACT, && case_sem_INSN_MOVL10_COMPACT },
- { SH64_COMPACT_INSN_MOVL11_COMPACT, && case_sem_INSN_MOVL11_COMPACT },
- { SH64_COMPACT_INSN_MOVW1_COMPACT, && case_sem_INSN_MOVW1_COMPACT },
- { SH64_COMPACT_INSN_MOVW2_COMPACT, && case_sem_INSN_MOVW2_COMPACT },
- { SH64_COMPACT_INSN_MOVW3_COMPACT, && case_sem_INSN_MOVW3_COMPACT },
- { SH64_COMPACT_INSN_MOVW4_COMPACT, && case_sem_INSN_MOVW4_COMPACT },
- { SH64_COMPACT_INSN_MOVW5_COMPACT, && case_sem_INSN_MOVW5_COMPACT },
- { SH64_COMPACT_INSN_MOVW6_COMPACT, && case_sem_INSN_MOVW6_COMPACT },
- { SH64_COMPACT_INSN_MOVW7_COMPACT, && case_sem_INSN_MOVW7_COMPACT },
- { SH64_COMPACT_INSN_MOVW8_COMPACT, && case_sem_INSN_MOVW8_COMPACT },
- { SH64_COMPACT_INSN_MOVW9_COMPACT, && case_sem_INSN_MOVW9_COMPACT },
- { SH64_COMPACT_INSN_MOVW10_COMPACT, && case_sem_INSN_MOVW10_COMPACT },
- { SH64_COMPACT_INSN_MOVW11_COMPACT, && case_sem_INSN_MOVW11_COMPACT },
- { SH64_COMPACT_INSN_MOVA_COMPACT, && case_sem_INSN_MOVA_COMPACT },
- { SH64_COMPACT_INSN_MOVCAL_COMPACT, && case_sem_INSN_MOVCAL_COMPACT },
- { SH64_COMPACT_INSN_MOVT_COMPACT, && case_sem_INSN_MOVT_COMPACT },
- { SH64_COMPACT_INSN_MULL_COMPACT, && case_sem_INSN_MULL_COMPACT },
- { SH64_COMPACT_INSN_MULSW_COMPACT, && case_sem_INSN_MULSW_COMPACT },
- { SH64_COMPACT_INSN_MULUW_COMPACT, && case_sem_INSN_MULUW_COMPACT },
- { SH64_COMPACT_INSN_NEG_COMPACT, && case_sem_INSN_NEG_COMPACT },
- { SH64_COMPACT_INSN_NEGC_COMPACT, && case_sem_INSN_NEGC_COMPACT },
- { SH64_COMPACT_INSN_NOP_COMPACT, && case_sem_INSN_NOP_COMPACT },
- { SH64_COMPACT_INSN_NOT_COMPACT, && case_sem_INSN_NOT_COMPACT },
- { SH64_COMPACT_INSN_OCBI_COMPACT, && case_sem_INSN_OCBI_COMPACT },
- { SH64_COMPACT_INSN_OCBP_COMPACT, && case_sem_INSN_OCBP_COMPACT },
- { SH64_COMPACT_INSN_OCBWB_COMPACT, && case_sem_INSN_OCBWB_COMPACT },
- { SH64_COMPACT_INSN_OR_COMPACT, && case_sem_INSN_OR_COMPACT },
- { SH64_COMPACT_INSN_ORI_COMPACT, && case_sem_INSN_ORI_COMPACT },
- { SH64_COMPACT_INSN_ORB_COMPACT, && case_sem_INSN_ORB_COMPACT },
- { SH64_COMPACT_INSN_PREF_COMPACT, && case_sem_INSN_PREF_COMPACT },
- { SH64_COMPACT_INSN_ROTCL_COMPACT, && case_sem_INSN_ROTCL_COMPACT },
- { SH64_COMPACT_INSN_ROTCR_COMPACT, && case_sem_INSN_ROTCR_COMPACT },
- { SH64_COMPACT_INSN_ROTL_COMPACT, && case_sem_INSN_ROTL_COMPACT },
- { SH64_COMPACT_INSN_ROTR_COMPACT, && case_sem_INSN_ROTR_COMPACT },
- { SH64_COMPACT_INSN_RTS_COMPACT, && case_sem_INSN_RTS_COMPACT },
- { SH64_COMPACT_INSN_SETS_COMPACT, && case_sem_INSN_SETS_COMPACT },
- { SH64_COMPACT_INSN_SETT_COMPACT, && case_sem_INSN_SETT_COMPACT },
- { SH64_COMPACT_INSN_SHAD_COMPACT, && case_sem_INSN_SHAD_COMPACT },
- { SH64_COMPACT_INSN_SHAL_COMPACT, && case_sem_INSN_SHAL_COMPACT },
- { SH64_COMPACT_INSN_SHAR_COMPACT, && case_sem_INSN_SHAR_COMPACT },
- { SH64_COMPACT_INSN_SHLD_COMPACT, && case_sem_INSN_SHLD_COMPACT },
- { SH64_COMPACT_INSN_SHLL_COMPACT, && case_sem_INSN_SHLL_COMPACT },
- { SH64_COMPACT_INSN_SHLL2_COMPACT, && case_sem_INSN_SHLL2_COMPACT },
- { SH64_COMPACT_INSN_SHLL8_COMPACT, && case_sem_INSN_SHLL8_COMPACT },
- { SH64_COMPACT_INSN_SHLL16_COMPACT, && case_sem_INSN_SHLL16_COMPACT },
- { SH64_COMPACT_INSN_SHLR_COMPACT, && case_sem_INSN_SHLR_COMPACT },
- { SH64_COMPACT_INSN_SHLR2_COMPACT, && case_sem_INSN_SHLR2_COMPACT },
- { SH64_COMPACT_INSN_SHLR8_COMPACT, && case_sem_INSN_SHLR8_COMPACT },
- { SH64_COMPACT_INSN_SHLR16_COMPACT, && case_sem_INSN_SHLR16_COMPACT },
- { SH64_COMPACT_INSN_STC_GBR_COMPACT, && case_sem_INSN_STC_GBR_COMPACT },
- { SH64_COMPACT_INSN_STCL_GBR_COMPACT, && case_sem_INSN_STCL_GBR_COMPACT },
- { SH64_COMPACT_INSN_STS_FPSCR_COMPACT, && case_sem_INSN_STS_FPSCR_COMPACT },
- { SH64_COMPACT_INSN_STSL_FPSCR_COMPACT, && case_sem_INSN_STSL_FPSCR_COMPACT },
- { SH64_COMPACT_INSN_STS_FPUL_COMPACT, && case_sem_INSN_STS_FPUL_COMPACT },
- { SH64_COMPACT_INSN_STSL_FPUL_COMPACT, && case_sem_INSN_STSL_FPUL_COMPACT },
- { SH64_COMPACT_INSN_STS_MACH_COMPACT, && case_sem_INSN_STS_MACH_COMPACT },
- { SH64_COMPACT_INSN_STSL_MACH_COMPACT, && case_sem_INSN_STSL_MACH_COMPACT },
- { SH64_COMPACT_INSN_STS_MACL_COMPACT, && case_sem_INSN_STS_MACL_COMPACT },
- { SH64_COMPACT_INSN_STSL_MACL_COMPACT, && case_sem_INSN_STSL_MACL_COMPACT },
- { SH64_COMPACT_INSN_STS_PR_COMPACT, && case_sem_INSN_STS_PR_COMPACT },
- { SH64_COMPACT_INSN_STSL_PR_COMPACT, && case_sem_INSN_STSL_PR_COMPACT },
- { SH64_COMPACT_INSN_SUB_COMPACT, && case_sem_INSN_SUB_COMPACT },
- { SH64_COMPACT_INSN_SUBC_COMPACT, && case_sem_INSN_SUBC_COMPACT },
- { SH64_COMPACT_INSN_SUBV_COMPACT, && case_sem_INSN_SUBV_COMPACT },
- { SH64_COMPACT_INSN_SWAPB_COMPACT, && case_sem_INSN_SWAPB_COMPACT },
- { SH64_COMPACT_INSN_SWAPW_COMPACT, && case_sem_INSN_SWAPW_COMPACT },
- { SH64_COMPACT_INSN_TASB_COMPACT, && case_sem_INSN_TASB_COMPACT },
- { SH64_COMPACT_INSN_TRAPA_COMPACT, && case_sem_INSN_TRAPA_COMPACT },
- { SH64_COMPACT_INSN_TST_COMPACT, && case_sem_INSN_TST_COMPACT },
- { SH64_COMPACT_INSN_TSTI_COMPACT, && case_sem_INSN_TSTI_COMPACT },
- { SH64_COMPACT_INSN_TSTB_COMPACT, && case_sem_INSN_TSTB_COMPACT },
- { SH64_COMPACT_INSN_XOR_COMPACT, && case_sem_INSN_XOR_COMPACT },
- { SH64_COMPACT_INSN_XORI_COMPACT, && case_sem_INSN_XORI_COMPACT },
- { SH64_COMPACT_INSN_XORB_COMPACT, && case_sem_INSN_XORB_COMPACT },
- { SH64_COMPACT_INSN_XTRCT_COMPACT, && case_sem_INSN_XTRCT_COMPACT },
- { 0, 0 }
- };
- int i;
-
- for (i = 0; labels[i].label != 0; ++i)
- {
-#if FAST_P
- CPU_IDESC (current_cpu) [labels[i].index].sem_fast_lab = labels[i].label;
-#else
- CPU_IDESC (current_cpu) [labels[i].index].sem_full_lab = labels[i].label;
-#endif
- }
-
-#undef DEFINE_LABELS
-#endif /* DEFINE_LABELS */
-
-#ifdef DEFINE_SWITCH
-
-/* If hyper-fast [well not unnecessarily slow] execution is selected, turn
- off frills like tracing and profiling. */
-/* FIXME: A better way would be to have TRACE_RESULT check for something
- that can cause it to be optimized out. Another way would be to emit
- special handlers into the instruction "stream". */
-
-#if FAST_P
-#undef TRACE_RESULT
-#define TRACE_RESULT(cpu, abuf, name, type, val)
-#endif
-
-#undef GET_ATTR
-#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-#define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_##attr)
-#else
-#define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_/**/attr)
-#endif
-
-{
-
-#if WITH_SCACHE_PBB
-
-/* Branch to next handler without going around main loop. */
-#define NEXT(vpc) goto * SEM_ARGBUF (vpc) -> semantic.sem_case
-SWITCH (sem, SEM_ARGBUF (vpc) -> semantic.sem_case)
-
-#else /* ! WITH_SCACHE_PBB */
-
-#define NEXT(vpc) BREAK (sem)
-#ifdef __GNUC__
-#if FAST_P
- SWITCH (sem, SEM_ARGBUF (sc) -> idesc->sem_fast_lab)
-#else
- SWITCH (sem, SEM_ARGBUF (sc) -> idesc->sem_full_lab)
-#endif
-#else
- SWITCH (sem, SEM_ARGBUF (sc) -> idesc->num)
-#endif
-
-#endif /* ! WITH_SCACHE_PBB */
-
- {
-
- CASE (sem, INSN_X_INVALID) : /* --invalid-- */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
- {
- /* Update the recorded pc in the cpu state struct.
- Only necessary for WITH_SCACHE case, but to avoid the
- conditional compilation .... */
- SET_H_PC (pc);
- /* Virtual insns have zero size. Overwrite vpc with address of next insn
- using the default-insn-bitsize spec. When executing insns in parallel
- we may want to queue the fault and continue execution. */
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
- vpc = sim_engine_invalid_insn (current_cpu, pc, vpc);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_X_AFTER) : /* --after-- */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
- {
-#if WITH_SCACHE_PBB_SH64_COMPACT
- sh64_compact_pbb_after (current_cpu, sem_arg);
-#endif
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_X_BEFORE) : /* --before-- */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
- {
-#if WITH_SCACHE_PBB_SH64_COMPACT
- sh64_compact_pbb_before (current_cpu, sem_arg);
-#endif
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_X_CTI_CHAIN) : /* --cti-chain-- */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
- {
-#if WITH_SCACHE_PBB_SH64_COMPACT
-#ifdef DEFINE_SWITCH
- vpc = sh64_compact_pbb_cti_chain (current_cpu, sem_arg,
- pbb_br_type, pbb_br_npc);
- BREAK (sem);
-#else
- /* FIXME: Allow provision of explicit ifmt spec in insn spec. */
- vpc = sh64_compact_pbb_cti_chain (current_cpu, sem_arg,
- CPU_PBB_BR_TYPE (current_cpu),
- CPU_PBB_BR_NPC (current_cpu));
-#endif
-#endif
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_X_CHAIN) : /* --chain-- */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
- {
-#if WITH_SCACHE_PBB_SH64_COMPACT
- vpc = sh64_compact_pbb_chain (current_cpu, sem_arg);
-#ifdef DEFINE_SWITCH
- BREAK (sem);
-#endif
-#endif
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_X_BEGIN) : /* --begin-- */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
- {
-#if WITH_SCACHE_PBB_SH64_COMPACT
-#if defined DEFINE_SWITCH || defined FAST_P
- /* In the switch case FAST_P is a constant, allowing several optimizations
- in any called inline functions. */
- vpc = sh64_compact_pbb_begin (current_cpu, FAST_P);
-#else
-#if 0 /* cgen engine can't handle dynamic fast/full switching yet. */
- vpc = sh64_compact_pbb_begin (current_cpu, STATE_RUN_FAST_P (CPU_STATE (current_cpu)));
-#else
- vpc = sh64_compact_pbb_begin (current_cpu, 0);
-#endif
-#endif
-#endif
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_ADD_COMPACT) : /* add $rm, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_ADDI_COMPACT) : /* add #$imm8, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), EXTQISI (ANDQI (FLD (f_imm8), 255)));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_ADDC_COMPACT) : /* addc $rm, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- BI tmp_flag;
- tmp_flag = ADDCFSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)), GET_H_TBIT ());
- {
- SI opval = ADDCSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)), GET_H_TBIT ());
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- {
- BI opval = tmp_flag;
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_ADDV_COMPACT) : /* addv $rm, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- BI tmp_t;
- tmp_t = ADDOFSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)), 0);
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- {
- BI opval = tmp_t;
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_AND_COMPACT) : /* and $rm64, $rn64 */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- DI opval = ANDDI (GET_H_GR (FLD (f_rm)), GET_H_GR (FLD (f_rn)));
- SET_H_GR (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn64", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_ANDI_COMPACT) : /* and #$uimm8, r0 */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = ANDSI (GET_H_GRC (((UINT) 0)), ZEXTSIDI (FLD (f_imm8)));
- SET_H_GRC (((UINT) 0), opval);
- TRACE_RESULT (current_cpu, abuf, "r0", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_ANDB_COMPACT) : /* and.b #$imm8, @(r0, gbr) */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- DI tmp_addr;
- UQI tmp_data;
- tmp_addr = ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GBR ());
- tmp_data = ANDQI (GETMEMUQI (current_cpu, pc, tmp_addr), FLD (f_imm8));
- {
- UQI opval = tmp_data;
- SETMEMUQI (current_cpu, pc, tmp_addr, opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_BF_COMPACT) : /* bf $disp8 */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_bf_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (NOTBI (GET_H_TBIT ())) {
- {
- UDI opval = FLD (i_disp8);
- SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
- written |= (1 << 2);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-
- abuf->written = written;
- SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_BFS_COMPACT) : /* bf/s $disp8 */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_bf_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (NOTBI (GET_H_TBIT ())) {
-{
- {
- UDI opval = FLD (i_disp8);
- SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
- written |= (1 << 2);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-}
-
- abuf->written = written;
- SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_BRA_COMPACT) : /* bra $disp12 */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_bra_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- {
- UDI opval = FLD (i_disp12);
- SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-
- SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_BRAF_COMPACT) : /* braf $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- {
- UDI opval = ADDDI (EXTSIDI (GET_H_GRC (FLD (f_rn))), ADDDI (pc, 4));
- SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-
- SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_BRK_COMPACT) : /* brk */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-sh64_break (current_cpu, pc);
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_BSR_COMPACT) : /* bsr $disp12 */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_bra_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-{
- {
- SI opval = ADDDI (pc, 4);
- SET_H_PR (opval);
- TRACE_RESULT (current_cpu, abuf, "pr", 'x', opval);
- }
- {
- UDI opval = FLD (i_disp12);
- SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-}
-
- SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_BSRF_COMPACT) : /* bsrf $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-{
- {
- SI opval = ADDDI (pc, 4);
- SET_H_PR (opval);
- TRACE_RESULT (current_cpu, abuf, "pr", 'x', opval);
- }
- {
- UDI opval = ADDDI (EXTSIDI (GET_H_GRC (FLD (f_rn))), ADDDI (pc, 4));
- SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-}
-
- SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_BT_COMPACT) : /* bt $disp8 */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_bf_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (GET_H_TBIT ()) {
- {
- UDI opval = FLD (i_disp8);
- SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
- written |= (1 << 2);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-
- abuf->written = written;
- SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_BTS_COMPACT) : /* bt/s $disp8 */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_bf_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (GET_H_TBIT ()) {
-{
- {
- UDI opval = FLD (i_disp8);
- SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
- written |= (1 << 2);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-}
-
- abuf->written = written;
- SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_CLRMAC_COMPACT) : /* clrmac */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- {
- SI opval = 0;
- SET_H_MACL (opval);
- TRACE_RESULT (current_cpu, abuf, "macl", 'x', opval);
- }
- {
- SI opval = 0;
- SET_H_MACH (opval);
- TRACE_RESULT (current_cpu, abuf, "mach", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_CLRS_COMPACT) : /* clrs */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- BI opval = 0;
- SET_H_SBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "sbit", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_CLRT_COMPACT) : /* clrt */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- BI opval = 0;
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_CMPEQ_COMPACT) : /* cmp/eq $rm, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- BI opval = EQSI (GET_H_GRC (FLD (f_rm)), GET_H_GRC (FLD (f_rn)));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_CMPEQI_COMPACT) : /* cmp/eq #$imm8, r0 */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- BI opval = EQSI (GET_H_GRC (((UINT) 0)), EXTQISI (ANDQI (FLD (f_imm8), 255)));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_CMPGE_COMPACT) : /* cmp/ge $rm, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- BI opval = GESI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_CMPGT_COMPACT) : /* cmp/gt $rm, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- BI opval = GTSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_CMPHI_COMPACT) : /* cmp/hi $rm, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- BI opval = GTUSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_CMPHS_COMPACT) : /* cmp/hs $rm, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- BI opval = GEUSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_CMPPL_COMPACT) : /* cmp/pl $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- BI opval = GTSI (GET_H_GRC (FLD (f_rn)), 0);
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_CMPPZ_COMPACT) : /* cmp/pz $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- BI opval = GESI (GET_H_GRC (FLD (f_rn)), 0);
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_CMPSTR_COMPACT) : /* cmp/str $rm, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- BI tmp_t;
- SI tmp_temp;
- tmp_temp = XORSI (GET_H_GRC (FLD (f_rm)), GET_H_GRC (FLD (f_rn)));
- tmp_t = EQSI (ANDSI (tmp_temp, 0xff000000), 0);
- tmp_t = ORBI (EQSI (ANDSI (tmp_temp, 16711680), 0), tmp_t);
- tmp_t = ORBI (EQSI (ANDSI (tmp_temp, 65280), 0), tmp_t);
- tmp_t = ORBI (EQSI (ANDSI (tmp_temp, 255), 0), tmp_t);
- {
- BI opval = ((GTUBI (tmp_t, 0)) ? (1) : (0));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_DIV0S_COMPACT) : /* div0s $rm, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- {
- BI opval = SRLSI (GET_H_GRC (FLD (f_rn)), 31);
- SET_H_QBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "qbit", 'x', opval);
- }
- {
- BI opval = SRLSI (GET_H_GRC (FLD (f_rm)), 31);
- SET_H_MBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "mbit", 'x', opval);
- }
- {
- BI opval = ((EQSI (SRLSI (GET_H_GRC (FLD (f_rm)), 31), SRLSI (GET_H_GRC (FLD (f_rn)), 31))) ? (0) : (1));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_DIV0U_COMPACT) : /* div0u */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- {
- BI opval = 0;
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
- {
- BI opval = 0;
- SET_H_QBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "qbit", 'x', opval);
- }
- {
- BI opval = 0;
- SET_H_MBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "mbit", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_DIV1_COMPACT) : /* div1 $rm, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- BI tmp_oldq;
- SI tmp_tmp0;
- UQI tmp_tmp1;
- tmp_oldq = GET_H_QBIT ();
- {
- BI opval = SRLSI (GET_H_GRC (FLD (f_rn)), 31);
- SET_H_QBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "qbit", 'x', opval);
- }
- {
- SI opval = ORSI (SLLSI (GET_H_GRC (FLD (f_rn)), 1), ZEXTBISI (GET_H_TBIT ()));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-if (NOTBI (tmp_oldq)) {
-if (NOTBI (GET_H_MBIT ())) {
-{
- tmp_tmp0 = GET_H_GRC (FLD (f_rn));
- {
- SI opval = SUBSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- tmp_tmp1 = GTUSI (GET_H_GRC (FLD (f_rn)), tmp_tmp0);
-if (NOTBI (GET_H_QBIT ())) {
- {
- BI opval = ((tmp_tmp1) ? (1) : (0));
- SET_H_QBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "qbit", 'x', opval);
- }
-} else {
- {
- BI opval = ((EQQI (tmp_tmp1, 0)) ? (1) : (0));
- SET_H_QBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "qbit", 'x', opval);
- }
-}
-}
-} else {
-{
- tmp_tmp0 = GET_H_GRC (FLD (f_rn));
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- tmp_tmp1 = LTUSI (GET_H_GRC (FLD (f_rn)), tmp_tmp0);
-if (NOTBI (GET_H_QBIT ())) {
- {
- BI opval = ((EQQI (tmp_tmp1, 0)) ? (1) : (0));
- SET_H_QBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "qbit", 'x', opval);
- }
-} else {
- {
- BI opval = ((tmp_tmp1) ? (1) : (0));
- SET_H_QBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "qbit", 'x', opval);
- }
-}
-}
-}
-} else {
-if (NOTBI (GET_H_MBIT ())) {
-{
- tmp_tmp0 = GET_H_GRC (FLD (f_rn));
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rm)), GET_H_GRC (FLD (f_rn)));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- tmp_tmp1 = LTUSI (GET_H_GRC (FLD (f_rn)), tmp_tmp0);
-if (NOTBI (GET_H_QBIT ())) {
- {
- BI opval = ((tmp_tmp1) ? (1) : (0));
- SET_H_QBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "qbit", 'x', opval);
- }
-} else {
- {
- BI opval = ((EQQI (tmp_tmp1, 0)) ? (1) : (0));
- SET_H_QBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "qbit", 'x', opval);
- }
-}
-}
-} else {
-{
- tmp_tmp0 = GET_H_GRC (FLD (f_rn));
- {
- SI opval = SUBSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- tmp_tmp1 = GTUSI (GET_H_GRC (FLD (f_rn)), tmp_tmp0);
-if (NOTBI (GET_H_QBIT ())) {
- {
- BI opval = ((EQQI (tmp_tmp1, 0)) ? (1) : (0));
- SET_H_QBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "qbit", 'x', opval);
- }
-} else {
- {
- BI opval = ((tmp_tmp1) ? (1) : (0));
- SET_H_QBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "qbit", 'x', opval);
- }
-}
-}
-}
-}
- {
- BI opval = ((EQBI (GET_H_QBIT (), GET_H_MBIT ())) ? (1) : (0));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_DMULSL_COMPACT) : /* dmuls.l $rm, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- DI tmp_result;
- tmp_result = MULDI (EXTSIDI (GET_H_GRC (FLD (f_rm))), EXTSIDI (GET_H_GRC (FLD (f_rn))));
- {
- SI opval = SUBWORDDISI (tmp_result, 0);
- SET_H_MACH (opval);
- TRACE_RESULT (current_cpu, abuf, "mach", 'x', opval);
- }
- {
- SI opval = SUBWORDDISI (tmp_result, 1);
- SET_H_MACL (opval);
- TRACE_RESULT (current_cpu, abuf, "macl", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_DMULUL_COMPACT) : /* dmulu.l $rm, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- DI tmp_result;
- tmp_result = MULDI (ZEXTSIDI (GET_H_GRC (FLD (f_rm))), ZEXTSIDI (GET_H_GRC (FLD (f_rn))));
- {
- SI opval = SUBWORDDISI (tmp_result, 0);
- SET_H_MACH (opval);
- TRACE_RESULT (current_cpu, abuf, "mach", 'x', opval);
- }
- {
- SI opval = SUBWORDDISI (tmp_result, 1);
- SET_H_MACL (opval);
- TRACE_RESULT (current_cpu, abuf, "macl", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_DT_COMPACT) : /* dt $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- {
- SI opval = SUBSI (GET_H_GRC (FLD (f_rn)), 1);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- {
- BI opval = EQSI (GET_H_GRC (FLD (f_rn)), 0);
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_EXTSB_COMPACT) : /* exts.b $rm, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = EXTQISI (SUBWORDSIQI (GET_H_GRC (FLD (f_rm)), 3));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_EXTSW_COMPACT) : /* exts.w $rm, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = EXTHISI (SUBWORDSIHI (GET_H_GRC (FLD (f_rm)), 1));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_EXTUB_COMPACT) : /* extu.b $rm, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = ZEXTQISI (SUBWORDSIQI (GET_H_GRC (FLD (f_rm)), 3));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_EXTUW_COMPACT) : /* extu.w $rm, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = ZEXTHISI (SUBWORDSIHI (GET_H_GRC (FLD (f_rm)), 1));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FABS_COMPACT) : /* fabs $fsdn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (GET_H_PRBIT ()) {
- {
- DF opval = sh64_fabsd (current_cpu, GET_H_DR (FLD (f_rn)));
- SET_H_DR (FLD (f_rn), opval);
- written |= (1 << 5);
- TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-fsdn", 'f', opval);
- }
-} else {
- {
- SF opval = sh64_fabss (current_cpu, GET_H_FRC (FLD (f_rn)));
- SET_H_FRC (FLD (f_rn), opval);
- written |= (1 << 4);
- TRACE_RESULT (current_cpu, abuf, "fsdn", 'f', opval);
- }
-}
-
- abuf->written = written;
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FADD_COMPACT) : /* fadd $fsdm, $fsdn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (GET_H_PRBIT ()) {
- {
- DF opval = sh64_faddd (current_cpu, GET_H_DR (FLD (f_rm)), GET_H_DR (FLD (f_rn)));
- SET_H_DR (FLD (f_rn), opval);
- written |= (1 << 8);
- TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-fsdn", 'f', opval);
- }
-} else {
- {
- SF opval = sh64_fadds (current_cpu, GET_H_FRC (FLD (f_rm)), GET_H_FRC (FLD (f_rn)));
- SET_H_FRC (FLD (f_rn), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "fsdn", 'f', opval);
- }
-}
-
- abuf->written = written;
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FCMPEQ_COMPACT) : /* fcmp/eq $fsdm, $fsdn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (GET_H_PRBIT ()) {
- {
- BI opval = sh64_fcmpeqd (current_cpu, GET_H_DR (FLD (f_rm)), GET_H_DR (FLD (f_rn)));
- SET_H_TBIT (opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-} else {
- {
- BI opval = sh64_fcmpeqs (current_cpu, GET_H_FRC (FLD (f_rm)), GET_H_FRC (FLD (f_rn)));
- SET_H_TBIT (opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
- abuf->written = written;
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FCMPGT_COMPACT) : /* fcmp/gt $fsdm, $fsdn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (GET_H_PRBIT ()) {
- {
- BI opval = sh64_fcmpgtd (current_cpu, GET_H_DR (FLD (f_rn)), GET_H_DR (FLD (f_rm)));
- SET_H_TBIT (opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-} else {
- {
- BI opval = sh64_fcmpgts (current_cpu, GET_H_FRC (FLD (f_rn)), GET_H_FRC (FLD (f_rm)));
- SET_H_TBIT (opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
- abuf->written = written;
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FCNVDS_COMPACT) : /* fcnvds $drn, fpul */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_fcnvds_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SF opval = sh64_fcnvds (current_cpu, GET_H_DRC (FLD (f_dn)));
- CPU (h_fr[((UINT) 32)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fpul", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FCNVSD_COMPACT) : /* fcnvsd fpul, $drn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_fcnvds_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- DF opval = sh64_fcnvsd (current_cpu, CPU (h_fr[((UINT) 32)]));
- SET_H_DRC (FLD (f_dn), opval);
- TRACE_RESULT (current_cpu, abuf, "drn", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FDIV_COMPACT) : /* fdiv $fsdm, $fsdn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (GET_H_PRBIT ()) {
- {
- DF opval = sh64_fdivd (current_cpu, GET_H_DR (FLD (f_rn)), GET_H_DR (FLD (f_rm)));
- SET_H_DR (FLD (f_rn), opval);
- written |= (1 << 8);
- TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-fsdn", 'f', opval);
- }
-} else {
- {
- SF opval = sh64_fdivs (current_cpu, GET_H_FRC (FLD (f_rn)), GET_H_FRC (FLD (f_rm)));
- SET_H_FRC (FLD (f_rn), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "fsdn", 'f', opval);
- }
-}
-
- abuf->written = written;
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FIPR_COMPACT) : /* fipr $fvm, $fvn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_fipr_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- QI tmp_m;
- QI tmp_n;
- SF tmp_res;
- tmp_m = FLD (f_vm);
- tmp_n = FLD (f_vn);
- tmp_res = sh64_fmuls (current_cpu, GET_H_FVC (FLD (f_vm)), GET_H_FVC (FLD (f_vn)));
- tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_FRC (ADDQI (tmp_m, 1)), GET_H_FRC (ADDQI (tmp_n, 1))));
- tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_FRC (ADDQI (tmp_m, 2)), GET_H_FRC (ADDQI (tmp_n, 2))));
- tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_FRC (ADDQI (tmp_m, 3)), GET_H_FRC (ADDQI (tmp_n, 3))));
- {
- SF opval = tmp_res;
- SET_H_FRC (ADDQI (tmp_n, 3), opval);
- TRACE_RESULT (current_cpu, abuf, "frc-add--DFLT-n-3", 'f', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FLDS_COMPACT) : /* flds $frn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SF opval = GET_H_FRC (FLD (f_rn));
- CPU (h_fr[((UINT) 32)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fpul", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FLDI0_COMPACT) : /* fldi0 $frn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SF opval = sh64_fldi0 (current_cpu);
- SET_H_FRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "frn", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FLDI1_COMPACT) : /* fldi1 $frn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SF opval = sh64_fldi1 (current_cpu);
- SET_H_FRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "frn", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FLOAT_COMPACT) : /* float fpul, $fsdn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (GET_H_PRBIT ()) {
- {
- DF opval = sh64_floatld (current_cpu, CPU (h_fr[((UINT) 32)]));
- SET_H_DR (FLD (f_rn), opval);
- written |= (1 << 4);
- TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-fsdn", 'f', opval);
- }
-} else {
- {
- SF opval = sh64_floatls (current_cpu, CPU (h_fr[((UINT) 32)]));
- SET_H_FRC (FLD (f_rn), opval);
- written |= (1 << 3);
- TRACE_RESULT (current_cpu, abuf, "fsdn", 'f', opval);
- }
-}
-
- abuf->written = written;
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FMAC_COMPACT) : /* fmac fr0, $frm, $frn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SF opval = sh64_fmacs (current_cpu, GET_H_FRC (((UINT) 0)), GET_H_FRC (FLD (f_rm)), GET_H_FRC (FLD (f_rn)));
- SET_H_FRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "frn", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FMOV1_COMPACT) : /* fmov $frm, $frn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (NOTBI (GET_H_SZBIT ())) {
- {
- SF opval = GET_H_FRC (FLD (f_rm));
- SET_H_FRC (FLD (f_rn), opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "frn", 'f', opval);
- }
-} else {
-if (EQSI (ANDSI (FLD (f_rm), 1), 1)) {
-if (EQSI (ANDSI (FLD (f_rn), 1), 1)) {
- {
- DF opval = GET_H_XD (((FLD (f_rm)) & (INVQI (1))));
- SET_H_XD (((FLD (f_rn)) & (INVQI (1))), opval);
- written |= (1 << 8);
- TRACE_RESULT (current_cpu, abuf, "xd-and--DFLT-index-of--DFLT-frn-inv--QI-1", 'f', opval);
- }
-} else {
- {
- DF opval = GET_H_XD (((FLD (f_rm)) & (INVQI (1))));
- SET_H_DR (FLD (f_rn), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-frn", 'f', opval);
- }
-}
-} else {
-if (EQSI (ANDSI (FLD (f_rn), 1), 1)) {
- {
- DF opval = GET_H_DR (FLD (f_rm));
- SET_H_XD (((FLD (f_rn)) & (INVQI (1))), opval);
- written |= (1 << 8);
- TRACE_RESULT (current_cpu, abuf, "xd-and--DFLT-index-of--DFLT-frn-inv--QI-1", 'f', opval);
- }
-} else {
- {
- DF opval = GET_H_DR (FLD (f_rm));
- SET_H_DR (FLD (f_rn), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-frn", 'f', opval);
- }
-}
-}
-}
-
- abuf->written = written;
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FMOV2_COMPACT) : /* fmov @$rm, $frn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (NOTBI (GET_H_SZBIT ())) {
- {
- SF opval = GETMEMSF (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
- SET_H_FRC (FLD (f_rn), opval);
- written |= (1 << 5);
- TRACE_RESULT (current_cpu, abuf, "frn", 'f', opval);
- }
-} else {
-if (EQSI (ANDSI (FLD (f_rn), 1), 1)) {
- {
- DF opval = GETMEMDF (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
- SET_H_XD (((FLD (f_rn)) & (INVQI (1))), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "xd-and--DFLT-index-of--DFLT-frn-inv--QI-1", 'f', opval);
- }
-} else {
- {
- DF opval = GETMEMDF (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
- SET_H_DR (FLD (f_rn), opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-frn", 'f', opval);
- }
-}
-}
-
- abuf->written = written;
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FMOV3_COMPACT) : /* fmov @${rm}+, frn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (NOTBI (GET_H_SZBIT ())) {
-{
- {
- SF opval = GETMEMSF (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
- SET_H_FRC (FLD (f_rn), opval);
- written |= (1 << 5);
- TRACE_RESULT (current_cpu, abuf, "frn", 'f', opval);
- }
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rm)), 4);
- SET_H_GRC (FLD (f_rm), opval);
- written |= (1 << 8);
- TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
- }
-}
-} else {
-{
-if (EQSI (ANDSI (FLD (f_rn), 1), 1)) {
- {
- DF opval = GETMEMDF (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
- SET_H_XD (((FLD (f_rn)) & (INVQI (1))), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "xd-and--DFLT-index-of--DFLT-frn-inv--QI-1", 'f', opval);
- }
-} else {
- {
- DF opval = GETMEMDF (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
- SET_H_DR (FLD (f_rn), opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-frn", 'f', opval);
- }
-}
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rm)), 8);
- SET_H_GRC (FLD (f_rm), opval);
- written |= (1 << 8);
- TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
- }
-}
-}
-
- abuf->written = written;
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FMOV4_COMPACT) : /* fmov @(r0, $rm), $frn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (NOTBI (GET_H_SZBIT ())) {
- {
- SF opval = GETMEMSF (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rm))));
- SET_H_FRC (FLD (f_rn), opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "frn", 'f', opval);
- }
-} else {
-if (EQSI (ANDSI (FLD (f_rn), 1), 1)) {
- {
- DF opval = GETMEMDF (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rm))));
- SET_H_XD (((FLD (f_rn)) & (INVQI (1))), opval);
- written |= (1 << 8);
- TRACE_RESULT (current_cpu, abuf, "xd-and--DFLT-index-of--DFLT-frn-inv--QI-1", 'f', opval);
- }
-} else {
- {
- DF opval = GETMEMDF (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rm))));
- SET_H_DR (FLD (f_rn), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-frn", 'f', opval);
- }
-}
-}
-
- abuf->written = written;
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FMOV5_COMPACT) : /* fmov $frm, @$rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (NOTBI (GET_H_SZBIT ())) {
- {
- SF opval = GET_H_FRC (FLD (f_rm));
- SETMEMSF (current_cpu, pc, GET_H_GRC (FLD (f_rn)), opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
-} else {
-if (EQSI (ANDSI (FLD (f_rm), 1), 1)) {
- {
- DF opval = GET_H_XD (((FLD (f_rm)) & (INVQI (1))));
- SETMEMDF (current_cpu, pc, GET_H_GRC (FLD (f_rn)), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
-} else {
- {
- DF opval = GET_H_DR (FLD (f_rm));
- SETMEMDF (current_cpu, pc, GET_H_GRC (FLD (f_rn)), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
-}
-}
-
- abuf->written = written;
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FMOV6_COMPACT) : /* fmov $frm, @-$rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (NOTBI (GET_H_SZBIT ())) {
-{
- {
- SI opval = SUBSI (GET_H_GRC (FLD (f_rn)), 4);
- SET_H_GRC (FLD (f_rn), opval);
- written |= (1 << 8);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- {
- SF opval = GET_H_FRC (FLD (f_rm));
- SETMEMSF (current_cpu, pc, GET_H_GRC (FLD (f_rn)), opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
-}
-} else {
-{
- {
- SI opval = SUBSI (GET_H_GRC (FLD (f_rn)), 8);
- SET_H_GRC (FLD (f_rn), opval);
- written |= (1 << 8);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-if (EQSI (ANDSI (FLD (f_rm), 1), 1)) {
- {
- DF opval = GET_H_XD (((FLD (f_rm)) & (INVQI (1))));
- SETMEMDF (current_cpu, pc, GET_H_GRC (FLD (f_rn)), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
-} else {
- {
- DF opval = GET_H_DR (FLD (f_rm));
- SETMEMDF (current_cpu, pc, GET_H_GRC (FLD (f_rn)), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
-}
-}
-}
-
- abuf->written = written;
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FMOV7_COMPACT) : /* fmov $frm, @(r0, $rn) */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (NOTBI (GET_H_SZBIT ())) {
- {
- SF opval = GET_H_FRC (FLD (f_rm));
- SETMEMSF (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rn))), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
-} else {
-if (EQSI (ANDSI (FLD (f_rm), 1), 1)) {
- {
- DF opval = GET_H_XD (((FLD (f_rm)) & (INVQI (1))));
- SETMEMDF (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rn))), opval);
- written |= (1 << 8);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
-} else {
- {
- DF opval = GET_H_DR (FLD (f_rm));
- SETMEMDF (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rn))), opval);
- written |= (1 << 8);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
-}
-}
-
- abuf->written = written;
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FMUL_COMPACT) : /* fmul $fsdm, $fsdn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (GET_H_PRBIT ()) {
- {
- DF opval = sh64_fmuld (current_cpu, GET_H_DR (FLD (f_rm)), GET_H_DR (FLD (f_rn)));
- SET_H_DR (FLD (f_rn), opval);
- written |= (1 << 8);
- TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-fsdn", 'f', opval);
- }
-} else {
- {
- SF opval = sh64_fmuls (current_cpu, GET_H_FRC (FLD (f_rm)), GET_H_FRC (FLD (f_rn)));
- SET_H_FRC (FLD (f_rn), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "fsdn", 'f', opval);
- }
-}
-
- abuf->written = written;
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FNEG_COMPACT) : /* fneg $fsdn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (GET_H_PRBIT ()) {
- {
- DF opval = sh64_fnegd (current_cpu, GET_H_DR (FLD (f_rn)));
- SET_H_DR (FLD (f_rn), opval);
- written |= (1 << 5);
- TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-fsdn", 'f', opval);
- }
-} else {
- {
- SF opval = sh64_fnegs (current_cpu, GET_H_FRC (FLD (f_rn)));
- SET_H_FRC (FLD (f_rn), opval);
- written |= (1 << 4);
- TRACE_RESULT (current_cpu, abuf, "fsdn", 'f', opval);
- }
-}
-
- abuf->written = written;
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FRCHG_COMPACT) : /* frchg */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- BI opval = NOTBI (GET_H_FRBIT ());
- SET_H_FRBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "frbit", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FSCHG_COMPACT) : /* fschg */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- BI opval = NOTBI (GET_H_SZBIT ());
- SET_H_SZBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "szbit", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FSQRT_COMPACT) : /* fsqrt $fsdn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (GET_H_PRBIT ()) {
- {
- DF opval = sh64_fsqrtd (current_cpu, GET_H_DR (FLD (f_rn)));
- SET_H_DR (FLD (f_rn), opval);
- written |= (1 << 5);
- TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-fsdn", 'f', opval);
- }
-} else {
- {
- SF opval = sh64_fsqrts (current_cpu, GET_H_FRC (FLD (f_rn)));
- SET_H_FRC (FLD (f_rn), opval);
- written |= (1 << 4);
- TRACE_RESULT (current_cpu, abuf, "fsdn", 'f', opval);
- }
-}
-
- abuf->written = written;
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FSTS_COMPACT) : /* fsts fpul, $frn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SF opval = CPU (h_fr[((UINT) 32)]);
- SET_H_FRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "frn", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FSUB_COMPACT) : /* fsub $fsdm, $fsdn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (GET_H_PRBIT ()) {
- {
- DF opval = sh64_fsubd (current_cpu, GET_H_DR (FLD (f_rn)), GET_H_DR (FLD (f_rm)));
- SET_H_DR (FLD (f_rn), opval);
- written |= (1 << 8);
- TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-fsdn", 'f', opval);
- }
-} else {
- {
- SF opval = sh64_fsubs (current_cpu, GET_H_FRC (FLD (f_rn)), GET_H_FRC (FLD (f_rm)));
- SET_H_FRC (FLD (f_rn), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "fsdn", 'f', opval);
- }
-}
-
- abuf->written = written;
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FTRC_COMPACT) : /* ftrc $fsdn, fpul */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SF opval = ((GET_H_PRBIT ()) ? (sh64_ftrcdl (current_cpu, GET_H_DR (FLD (f_rn)))) : (sh64_ftrcsl (current_cpu, GET_H_FRC (FLD (f_rn)))));
- CPU (h_fr[((UINT) 32)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fpul", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FTRV_COMPACT) : /* ftrv xmtrx, $fvn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_fipr_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- QI tmp_n;
- SF tmp_res;
- tmp_n = FLD (f_vn);
- tmp_res = sh64_fmuls (current_cpu, GET_H_XF (((UINT) 0)), GET_H_FRC (tmp_n));
- tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 4)), GET_H_FRC (ADDQI (tmp_n, 1))));
- tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 8)), GET_H_FRC (ADDQI (tmp_n, 2))));
- tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 12)), GET_H_FRC (ADDQI (tmp_n, 3))));
- {
- SF opval = tmp_res;
- SET_H_FRC (tmp_n, opval);
- TRACE_RESULT (current_cpu, abuf, "frc-n", 'f', opval);
- }
- tmp_res = sh64_fmuls (current_cpu, GET_H_XF (((UINT) 1)), GET_H_FRC (tmp_n));
- tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 5)), GET_H_FRC (ADDQI (tmp_n, 1))));
- tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 9)), GET_H_FRC (ADDQI (tmp_n, 2))));
- tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 13)), GET_H_FRC (ADDQI (tmp_n, 3))));
- {
- SF opval = tmp_res;
- SET_H_FRC (ADDQI (tmp_n, 1), opval);
- TRACE_RESULT (current_cpu, abuf, "frc-add--DFLT-n-1", 'f', opval);
- }
- tmp_res = sh64_fmuls (current_cpu, GET_H_XF (((UINT) 2)), GET_H_FRC (tmp_n));
- tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 6)), GET_H_FRC (ADDQI (tmp_n, 1))));
- tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 10)), GET_H_FRC (ADDQI (tmp_n, 2))));
- tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 14)), GET_H_FRC (ADDQI (tmp_n, 3))));
- {
- SF opval = tmp_res;
- SET_H_FRC (ADDQI (tmp_n, 2), opval);
- TRACE_RESULT (current_cpu, abuf, "frc-add--DFLT-n-2", 'f', opval);
- }
- tmp_res = sh64_fmuls (current_cpu, GET_H_XF (((UINT) 3)), GET_H_FRC (tmp_n));
- tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 7)), GET_H_FRC (ADDQI (tmp_n, 1))));
- tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 11)), GET_H_FRC (ADDQI (tmp_n, 2))));
- tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 15)), GET_H_FRC (ADDQI (tmp_n, 3))));
- {
- SF opval = tmp_res;
- SET_H_FRC (ADDQI (tmp_n, 3), opval);
- TRACE_RESULT (current_cpu, abuf, "frc-add--DFLT-n-3", 'f', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_JMP_COMPACT) : /* jmp @$rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- {
- UDI opval = GET_H_GRC (FLD (f_rn));
- SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-
- SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_JSR_COMPACT) : /* jsr @$rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-{
- {
- SI opval = ADDDI (pc, 4);
- SET_H_PR (opval);
- TRACE_RESULT (current_cpu, abuf, "pr", 'x', opval);
- }
- {
- UDI opval = GET_H_GRC (FLD (f_rn));
- SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-}
-
- SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_LDC_COMPACT) : /* ldc $rn, gbr */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GET_H_GRC (FLD (f_rn));
- SET_H_GBR (opval);
- TRACE_RESULT (current_cpu, abuf, "gbr", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_LDCL_COMPACT) : /* ldc.l @${rn}+, gbr */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- {
- SI opval = GETMEMSI (current_cpu, pc, GET_H_GRC (FLD (f_rn)));
- SET_H_GBR (opval);
- TRACE_RESULT (current_cpu, abuf, "gbr", 'x', opval);
- }
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), 4);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_LDS_FPSCR_COMPACT) : /* lds $rn, fpscr */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GET_H_GRC (FLD (f_rn));
- SET_H_FPCCR (opval);
- TRACE_RESULT (current_cpu, abuf, "fpscr", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_LDSL_FPSCR_COMPACT) : /* lds.l @${rn}+, fpscr */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- {
- SI opval = GETMEMSI (current_cpu, pc, GET_H_GRC (FLD (f_rn)));
- SET_H_FPCCR (opval);
- TRACE_RESULT (current_cpu, abuf, "fpscr", 'x', opval);
- }
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), 4);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_LDS_FPUL_COMPACT) : /* lds $rn, fpul */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SF opval = SUBWORDSISF (GET_H_GRC (FLD (f_rn)));
- CPU (h_fr[((UINT) 32)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fpul", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_LDSL_FPUL_COMPACT) : /* lds.l @${rn}+, fpul */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- {
- SF opval = GETMEMSF (current_cpu, pc, GET_H_GRC (FLD (f_rn)));
- CPU (h_fr[((UINT) 32)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fpul", 'f', opval);
- }
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), 4);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_LDS_MACH_COMPACT) : /* lds $rn, mach */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GET_H_GRC (FLD (f_rn));
- SET_H_MACH (opval);
- TRACE_RESULT (current_cpu, abuf, "mach", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_LDSL_MACH_COMPACT) : /* lds.l @${rn}+, mach */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- {
- SI opval = GETMEMSI (current_cpu, pc, GET_H_GRC (FLD (f_rn)));
- SET_H_MACH (opval);
- TRACE_RESULT (current_cpu, abuf, "mach", 'x', opval);
- }
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), 4);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_LDS_MACL_COMPACT) : /* lds $rn, macl */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GET_H_GRC (FLD (f_rn));
- SET_H_MACL (opval);
- TRACE_RESULT (current_cpu, abuf, "macl", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_LDSL_MACL_COMPACT) : /* lds.l @${rn}+, macl */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- {
- SI opval = GETMEMSI (current_cpu, pc, GET_H_GRC (FLD (f_rn)));
- SET_H_MACL (opval);
- TRACE_RESULT (current_cpu, abuf, "macl", 'x', opval);
- }
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), 4);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_LDS_PR_COMPACT) : /* lds $rn, pr */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GET_H_GRC (FLD (f_rn));
- SET_H_PR (opval);
- TRACE_RESULT (current_cpu, abuf, "pr", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_LDSL_PR_COMPACT) : /* lds.l @${rn}+, pr */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- {
- SI opval = GETMEMSI (current_cpu, pc, GET_H_GRC (FLD (f_rn)));
- SET_H_PR (opval);
- TRACE_RESULT (current_cpu, abuf, "pr", 'x', opval);
- }
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), 4);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MACL_COMPACT) : /* mac.l @${rm}+, @${rn}+ */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- DI tmp_tmpry;
- DI tmp_mac;
- DI tmp_result;
- SI tmp_x;
- SI tmp_y;
- tmp_x = GETMEMSI (current_cpu, pc, GET_H_GRC (FLD (f_rn)));
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), 4);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-if (EQSI (FLD (f_rn), FLD (f_rm))) {
-{
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), 4);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rm)), 4);
- SET_H_GRC (FLD (f_rm), opval);
- written |= (1 << 11);
- TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
- }
-}
-}
- tmp_y = GETMEMSI (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rm)), 4);
- SET_H_GRC (FLD (f_rm), opval);
- written |= (1 << 11);
- TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
- }
- tmp_tmpry = MULDI (ZEXTSIDI (tmp_x), ZEXTSIDI (tmp_y));
- tmp_mac = ORDI (SLLDI (ZEXTSIDI (GET_H_MACH ()), 32), ZEXTSIDI (GET_H_MACL ()));
- tmp_result = ADDDI (tmp_mac, tmp_tmpry);
-{
-if (GET_H_SBIT ()) {
-{
- SI tmp_min;
- SI tmp_max;
- tmp_max = SRLDI (INVDI (0), 16);
- tmp_min = SRLDI (INVDI (0), 15);
-if (GTDI (tmp_result, tmp_max)) {
- tmp_result = tmp_max;
-} else {
-if (LTDI (tmp_result, tmp_min)) {
- tmp_result = tmp_min;
-}
-}
-}
-}
- {
- SI opval = SUBWORDDISI (tmp_result, 0);
- SET_H_MACH (opval);
- TRACE_RESULT (current_cpu, abuf, "mach", 'x', opval);
- }
- {
- SI opval = SUBWORDDISI (tmp_result, 1);
- SET_H_MACL (opval);
- TRACE_RESULT (current_cpu, abuf, "macl", 'x', opval);
- }
-}
-}
-
- abuf->written = written;
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MACW_COMPACT) : /* mac.w @${rm}+, @${rn}+ */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- SI tmp_tmpry;
- DI tmp_mac;
- DI tmp_result;
- HI tmp_x;
- HI tmp_y;
- tmp_x = GETMEMHI (current_cpu, pc, GET_H_GRC (FLD (f_rn)));
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), 2);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-if (EQSI (FLD (f_rn), FLD (f_rm))) {
-{
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), 2);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rm)), 2);
- SET_H_GRC (FLD (f_rm), opval);
- written |= (1 << 11);
- TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
- }
-}
-}
- tmp_y = GETMEMHI (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rm)), 2);
- SET_H_GRC (FLD (f_rm), opval);
- written |= (1 << 11);
- TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
- }
- tmp_tmpry = MULSI (ZEXTHISI (tmp_x), ZEXTHISI (tmp_y));
-if (GET_H_SBIT ()) {
-{
-if (ADDOFSI (tmp_tmpry, GET_H_MACL (), 0)) {
- {
- SI opval = 1;
- SET_H_MACH (opval);
- written |= (1 << 9);
- TRACE_RESULT (current_cpu, abuf, "mach", 'x', opval);
- }
-}
- {
- SI opval = ADDSI (tmp_tmpry, GET_H_MACL ());
- SET_H_MACL (opval);
- written |= (1 << 10);
- TRACE_RESULT (current_cpu, abuf, "macl", 'x', opval);
- }
-}
-} else {
-{
- tmp_mac = ORDI (SLLDI (ZEXTSIDI (GET_H_MACH ()), 32), ZEXTSIDI (GET_H_MACL ()));
- tmp_result = ADDDI (tmp_mac, EXTSIDI (tmp_tmpry));
- {
- SI opval = SUBWORDDISI (tmp_result, 0);
- SET_H_MACH (opval);
- written |= (1 << 9);
- TRACE_RESULT (current_cpu, abuf, "mach", 'x', opval);
- }
- {
- SI opval = SUBWORDDISI (tmp_result, 1);
- SET_H_MACL (opval);
- written |= (1 << 10);
- TRACE_RESULT (current_cpu, abuf, "macl", 'x', opval);
- }
-}
-}
-}
-
- abuf->written = written;
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOV_COMPACT) : /* mov $rm64, $rn64 */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- DI opval = GET_H_GR (FLD (f_rm));
- SET_H_GR (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn64", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVI_COMPACT) : /* mov #$imm8, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = EXTQIDI (ANDQI (FLD (f_imm8), 255));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVB1_COMPACT) : /* mov.b $rm, @$rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- UQI opval = SUBWORDSIUQI (GET_H_GRC (FLD (f_rm)), 3);
- SETMEMUQI (current_cpu, pc, GET_H_GRC (FLD (f_rn)), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVB2_COMPACT) : /* mov.b $rm, @-$rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- DI tmp_addr;
- tmp_addr = SUBSI (GET_H_GRC (FLD (f_rn)), 1);
- {
- UQI opval = SUBWORDSIUQI (GET_H_GRC (FLD (f_rm)), 3);
- SETMEMUQI (current_cpu, pc, tmp_addr, opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- {
- SI opval = tmp_addr;
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVB3_COMPACT) : /* mov.b $rm, @(r0,$rn) */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- UQI opval = SUBWORDSIUQI (GET_H_GRC (FLD (f_rm)), 3);
- SETMEMUQI (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rn))), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVB4_COMPACT) : /* mov.b r0, @($imm8, gbr) */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- DI tmp_addr;
- tmp_addr = ADDSI (GET_H_GBR (), FLD (f_imm8));
- {
- UQI opval = SUBWORDSIUQI (GET_H_GRC (((UINT) 0)), 3);
- SETMEMUQI (current_cpu, pc, tmp_addr, opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVB5_COMPACT) : /* mov.b r0, @($imm4, $rm) */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movb5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- DI tmp_addr;
- tmp_addr = ADDSI (GET_H_GRC (FLD (f_rm)), FLD (f_imm4));
- {
- UQI opval = SUBWORDSIUQI (GET_H_GRC (((UINT) 0)), 3);
- SETMEMUQI (current_cpu, pc, tmp_addr, opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVB6_COMPACT) : /* mov.b @$rm, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = EXTQISI (GETMEMQI (current_cpu, pc, GET_H_GRC (FLD (f_rm))));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVB7_COMPACT) : /* mov.b @${rm}+, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- QI tmp_data;
- tmp_data = GETMEMQI (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
-if (EQSI (FLD (f_rm), FLD (f_rn))) {
- {
- SI opval = EXTQISI (tmp_data);
- SET_H_GRC (FLD (f_rm), opval);
- written |= (1 << 4);
- TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
- }
-} else {
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rm)), 1);
- SET_H_GRC (FLD (f_rm), opval);
- written |= (1 << 4);
- TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
- }
-}
- {
- SI opval = EXTQISI (tmp_data);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
- abuf->written = written;
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVB8_COMPACT) : /* mov.b @(r0, $rm), $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = EXTQISI (GETMEMQI (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rm)))));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVB9_COMPACT) : /* mov.b @($imm8, gbr), r0 */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = EXTQISI (GETMEMQI (current_cpu, pc, ADDSI (GET_H_GBR (), FLD (f_imm8))));
- SET_H_GRC (((UINT) 0), opval);
- TRACE_RESULT (current_cpu, abuf, "r0", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVB10_COMPACT) : /* mov.b @($imm4, $rm), r0 */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movb5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = EXTQISI (GETMEMQI (current_cpu, pc, ADDSI (GET_H_GRC (FLD (f_rm)), FLD (f_imm4))));
- SET_H_GRC (((UINT) 0), opval);
- TRACE_RESULT (current_cpu, abuf, "r0", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVL1_COMPACT) : /* mov.l $rm, @$rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GET_H_GRC (FLD (f_rm));
- SETMEMSI (current_cpu, pc, GET_H_GRC (FLD (f_rn)), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVL2_COMPACT) : /* mov.l $rm, @-$rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- SI tmp_addr;
- tmp_addr = SUBSI (GET_H_GRC (FLD (f_rn)), 4);
- {
- SI opval = GET_H_GRC (FLD (f_rm));
- SETMEMSI (current_cpu, pc, tmp_addr, opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- {
- SI opval = tmp_addr;
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVL3_COMPACT) : /* mov.l $rm, @(r0, $rn) */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GET_H_GRC (FLD (f_rm));
- SETMEMSI (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rn))), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVL4_COMPACT) : /* mov.l r0, @($imm8x4, gbr) */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GET_H_GRC (((UINT) 0));
- SETMEMSI (current_cpu, pc, ADDSI (GET_H_GBR (), FLD (f_imm8x4)), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVL5_COMPACT) : /* mov.l $rm, @($imm4x4, $rn) */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GET_H_GRC (FLD (f_rm));
- SETMEMSI (current_cpu, pc, ADDSI (GET_H_GRC (FLD (f_rn)), FLD (f_imm4x4)), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVL6_COMPACT) : /* mov.l @$rm, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GETMEMSI (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVL7_COMPACT) : /* mov.l @${rm}+, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- {
- SI opval = GETMEMSI (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-if (EQSI (FLD (f_rm), FLD (f_rn))) {
- {
- SI opval = GET_H_GRC (FLD (f_rn));
- SET_H_GRC (FLD (f_rm), opval);
- written |= (1 << 5);
- TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
- }
-} else {
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rm)), 4);
- SET_H_GRC (FLD (f_rm), opval);
- written |= (1 << 5);
- TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
- }
-}
-}
-
- abuf->written = written;
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVL8_COMPACT) : /* mov.l @(r0, $rm), $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GETMEMSI (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rm))));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVL9_COMPACT) : /* mov.l @($imm8x4, gbr), r0 */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GETMEMSI (current_cpu, pc, ADDSI (GET_H_GBR (), FLD (f_imm8x4)));
- SET_H_GRC (((UINT) 0), opval);
- TRACE_RESULT (current_cpu, abuf, "r0", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVL10_COMPACT) : /* mov.l @($imm8x4, pc), $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GETMEMSI (current_cpu, pc, ADDSI (FLD (f_imm8x4), ANDDI (ADDDI (pc, 4), INVSI (3))));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVL11_COMPACT) : /* mov.l @($imm4x4, $rm), $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GETMEMSI (current_cpu, pc, ADDSI (GET_H_GRC (FLD (f_rm)), FLD (f_imm4x4)));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVW1_COMPACT) : /* mov.w $rm, @$rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- HI opval = SUBWORDSIHI (GET_H_GRC (FLD (f_rm)), 1);
- SETMEMHI (current_cpu, pc, GET_H_GRC (FLD (f_rn)), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVW2_COMPACT) : /* mov.w $rm, @-$rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- DI tmp_addr;
- tmp_addr = SUBSI (GET_H_GRC (FLD (f_rn)), 2);
- {
- HI opval = SUBWORDSIHI (GET_H_GRC (FLD (f_rm)), 1);
- SETMEMHI (current_cpu, pc, tmp_addr, opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- {
- SI opval = tmp_addr;
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVW3_COMPACT) : /* mov.w $rm, @(r0, $rn) */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- HI opval = SUBWORDSIHI (GET_H_GRC (FLD (f_rm)), 1);
- SETMEMHI (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rn))), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVW4_COMPACT) : /* mov.w r0, @($imm8x2, gbr) */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- HI opval = SUBWORDSIHI (GET_H_GRC (((UINT) 0)), 1);
- SETMEMHI (current_cpu, pc, ADDSI (GET_H_GBR (), FLD (f_imm8x2)), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVW5_COMPACT) : /* mov.w r0, @($imm4x2, $rn) */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- HI opval = SUBWORDSIHI (GET_H_GRC (((UINT) 0)), 1);
- SETMEMHI (current_cpu, pc, ADDSI (GET_H_GRC (FLD (f_rn)), FLD (f_imm4x2)), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVW6_COMPACT) : /* mov.w @$rm, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = EXTHISI (GETMEMHI (current_cpu, pc, GET_H_GRC (FLD (f_rm))));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVW7_COMPACT) : /* mov.w @${rm}+, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- HI tmp_data;
- tmp_data = GETMEMHI (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
-if (EQSI (FLD (f_rm), FLD (f_rn))) {
- {
- SI opval = EXTHISI (tmp_data);
- SET_H_GRC (FLD (f_rm), opval);
- written |= (1 << 4);
- TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
- }
-} else {
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rm)), 2);
- SET_H_GRC (FLD (f_rm), opval);
- written |= (1 << 4);
- TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
- }
-}
- {
- SI opval = EXTHISI (tmp_data);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
- abuf->written = written;
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVW8_COMPACT) : /* mov.w @(r0, $rm), $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = EXTHISI (GETMEMHI (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rm)))));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVW9_COMPACT) : /* mov.w @($imm8x2, gbr), r0 */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = EXTHISI (GETMEMHI (current_cpu, pc, ADDSI (GET_H_GBR (), FLD (f_imm8x2))));
- SET_H_GRC (((UINT) 0), opval);
- TRACE_RESULT (current_cpu, abuf, "r0", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVW10_COMPACT) : /* mov.w @($imm8x2, pc), $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = EXTHISI (GETMEMHI (current_cpu, pc, ADDDI (ADDDI (pc, 4), FLD (f_imm8x2))));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVW11_COMPACT) : /* mov.w @($imm4x2, $rm), r0 */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw11_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = EXTHISI (GETMEMHI (current_cpu, pc, ADDSI (GET_H_GRC (FLD (f_rm)), FLD (f_imm4x2))));
- SET_H_GRC (((UINT) 0), opval);
- TRACE_RESULT (current_cpu, abuf, "r0", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVA_COMPACT) : /* mova @($imm8x4, pc), r0 */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = ADDDI (ANDDI (ADDDI (pc, 4), INVSI (3)), FLD (f_imm8x4));
- SET_H_GRC (((UINT) 0), opval);
- TRACE_RESULT (current_cpu, abuf, "r0", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVCAL_COMPACT) : /* movca.l r0, @$rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GET_H_GRC (((UINT) 0));
- SETMEMSI (current_cpu, pc, GET_H_GRC (FLD (f_rn)), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVT_COMPACT) : /* movt $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = ZEXTBISI (GET_H_TBIT ());
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MULL_COMPACT) : /* mul.l $rm, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = MULSI (GET_H_GRC (FLD (f_rm)), GET_H_GRC (FLD (f_rn)));
- SET_H_MACL (opval);
- TRACE_RESULT (current_cpu, abuf, "macl", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MULSW_COMPACT) : /* muls.w $rm, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = MULSI (EXTHISI (SUBWORDSIHI (GET_H_GRC (FLD (f_rm)), 1)), EXTHISI (SUBWORDSIHI (GET_H_GRC (FLD (f_rn)), 1)));
- SET_H_MACL (opval);
- TRACE_RESULT (current_cpu, abuf, "macl", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MULUW_COMPACT) : /* mulu.w $rm, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = MULSI (ZEXTHISI (SUBWORDSIHI (GET_H_GRC (FLD (f_rm)), 1)), ZEXTHISI (SUBWORDSIHI (GET_H_GRC (FLD (f_rn)), 1)));
- SET_H_MACL (opval);
- TRACE_RESULT (current_cpu, abuf, "macl", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_NEG_COMPACT) : /* neg $rm, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = NEGSI (GET_H_GRC (FLD (f_rm)));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_NEGC_COMPACT) : /* negc $rm, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- BI tmp_flag;
- tmp_flag = SUBCFSI (0, GET_H_GRC (FLD (f_rm)), GET_H_TBIT ());
- {
- SI opval = SUBCSI (0, GET_H_GRC (FLD (f_rm)), GET_H_TBIT ());
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- {
- BI opval = tmp_flag;
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_NOP_COMPACT) : /* nop */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-((void) 0); /*nop*/
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_NOT_COMPACT) : /* not $rm64, $rn64 */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- DI opval = INVDI (GET_H_GR (FLD (f_rm)));
- SET_H_GR (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn64", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_OCBI_COMPACT) : /* ocbi @$rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-((void) 0); /*nop*/
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_OCBP_COMPACT) : /* ocbp @$rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-((void) 0); /*nop*/
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_OCBWB_COMPACT) : /* ocbwb @$rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-((void) 0); /*nop*/
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_OR_COMPACT) : /* or $rm64, $rn64 */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- DI opval = ORDI (GET_H_GR (FLD (f_rm)), GET_H_GR (FLD (f_rn)));
- SET_H_GR (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn64", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_ORI_COMPACT) : /* or #$uimm8, r0 */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = ORSI (GET_H_GRC (((UINT) 0)), ZEXTSIDI (FLD (f_imm8)));
- SET_H_GRC (((UINT) 0), opval);
- TRACE_RESULT (current_cpu, abuf, "r0", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_ORB_COMPACT) : /* or.b #$imm8, @(r0, gbr) */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- DI tmp_addr;
- UQI tmp_data;
- tmp_addr = ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GBR ());
- tmp_data = ORQI (GETMEMUQI (current_cpu, pc, tmp_addr), FLD (f_imm8));
- {
- UQI opval = tmp_data;
- SETMEMUQI (current_cpu, pc, tmp_addr, opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_PREF_COMPACT) : /* pref @$rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-((void) 0); /*nop*/
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_ROTCL_COMPACT) : /* rotcl $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- BI tmp_temp;
- tmp_temp = SRLSI (GET_H_GRC (FLD (f_rn)), 31);
- {
- SI opval = ORSI (SLLSI (GET_H_GRC (FLD (f_rn)), 1), GET_H_TBIT ());
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- {
- BI opval = ((tmp_temp) ? (1) : (0));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_ROTCR_COMPACT) : /* rotcr $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- BI tmp_lsbit;
- SI tmp_temp;
- tmp_lsbit = ((EQSI (ANDSI (GET_H_GRC (FLD (f_rn)), 1), 0)) ? (0) : (1));
- tmp_temp = GET_H_TBIT ();
- {
- SI opval = ORSI (SRLSI (GET_H_GRC (FLD (f_rn)), 1), SLLSI (tmp_temp, 31));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- {
- BI opval = ((tmp_lsbit) ? (1) : (0));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_ROTL_COMPACT) : /* rotl $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- BI tmp_temp;
- tmp_temp = SRLSI (GET_H_GRC (FLD (f_rn)), 31);
- {
- SI opval = ORSI (SLLSI (GET_H_GRC (FLD (f_rn)), 1), tmp_temp);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- {
- BI opval = ((tmp_temp) ? (1) : (0));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_ROTR_COMPACT) : /* rotr $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- BI tmp_lsbit;
- SI tmp_temp;
- tmp_lsbit = ((EQSI (ANDSI (GET_H_GRC (FLD (f_rn)), 1), 0)) ? (0) : (1));
- tmp_temp = tmp_lsbit;
- {
- SI opval = ORSI (SRLSI (GET_H_GRC (FLD (f_rn)), 1), SLLSI (tmp_temp, 31));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- {
- BI opval = ((tmp_lsbit) ? (1) : (0));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_RTS_COMPACT) : /* rts */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- {
- UDI opval = GET_H_PR ();
- SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-
- SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SETS_COMPACT) : /* sets */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- BI opval = 1;
- SET_H_SBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "sbit", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SETT_COMPACT) : /* sett */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- BI opval = 1;
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SHAD_COMPACT) : /* shad $rm, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- QI tmp_shamt;
- tmp_shamt = ANDQI (GET_H_GRC (FLD (f_rm)), 31);
-if (GESI (GET_H_GRC (FLD (f_rm)), 0)) {
- {
- SI opval = SLLSI (GET_H_GRC (FLD (f_rn)), tmp_shamt);
- SET_H_GRC (FLD (f_rn), opval);
- written |= (1 << 3);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-} else {
-if (NEQI (tmp_shamt, 0)) {
- {
- SI opval = SRASI (GET_H_GRC (FLD (f_rn)), SUBSI (32, tmp_shamt));
- SET_H_GRC (FLD (f_rn), opval);
- written |= (1 << 3);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-} else {
-if (LTSI (GET_H_GRC (FLD (f_rn)), 0)) {
- {
- SI opval = NEGSI (1);
- SET_H_GRC (FLD (f_rn), opval);
- written |= (1 << 3);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-} else {
- {
- SI opval = 0;
- SET_H_GRC (FLD (f_rn), opval);
- written |= (1 << 3);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-}
-}
-}
-
- abuf->written = written;
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SHAL_COMPACT) : /* shal $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- BI tmp_t;
- tmp_t = SRLSI (GET_H_GRC (FLD (f_rn)), 31);
- {
- SI opval = SLLSI (GET_H_GRC (FLD (f_rn)), 1);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- {
- BI opval = ((tmp_t) ? (1) : (0));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SHAR_COMPACT) : /* shar $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- BI tmp_t;
- tmp_t = ANDSI (GET_H_GRC (FLD (f_rn)), 1);
- {
- SI opval = SRASI (GET_H_GRC (FLD (f_rn)), 1);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- {
- BI opval = ((tmp_t) ? (1) : (0));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SHLD_COMPACT) : /* shld $rm, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- QI tmp_shamt;
- tmp_shamt = ANDQI (GET_H_GRC (FLD (f_rm)), 31);
-if (GESI (GET_H_GRC (FLD (f_rm)), 0)) {
- {
- SI opval = SLLSI (GET_H_GRC (FLD (f_rn)), tmp_shamt);
- SET_H_GRC (FLD (f_rn), opval);
- written |= (1 << 3);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-} else {
-if (NEQI (tmp_shamt, 0)) {
- {
- SI opval = SRLSI (GET_H_GRC (FLD (f_rn)), SUBSI (32, tmp_shamt));
- SET_H_GRC (FLD (f_rn), opval);
- written |= (1 << 3);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-} else {
- {
- SI opval = 0;
- SET_H_GRC (FLD (f_rn), opval);
- written |= (1 << 3);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-}
-}
-
- abuf->written = written;
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SHLL_COMPACT) : /* shll $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- BI tmp_t;
- tmp_t = SRLSI (GET_H_GRC (FLD (f_rn)), 31);
- {
- SI opval = SLLSI (GET_H_GRC (FLD (f_rn)), 1);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- {
- BI opval = ((tmp_t) ? (1) : (0));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SHLL2_COMPACT) : /* shll2 $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = SLLSI (GET_H_GRC (FLD (f_rn)), 2);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SHLL8_COMPACT) : /* shll8 $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = SLLSI (GET_H_GRC (FLD (f_rn)), 8);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SHLL16_COMPACT) : /* shll16 $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = SLLSI (GET_H_GRC (FLD (f_rn)), 16);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SHLR_COMPACT) : /* shlr $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- BI tmp_t;
- tmp_t = ANDSI (GET_H_GRC (FLD (f_rn)), 1);
- {
- SI opval = SRLSI (GET_H_GRC (FLD (f_rn)), 1);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- {
- BI opval = ((tmp_t) ? (1) : (0));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SHLR2_COMPACT) : /* shlr2 $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = SRLSI (GET_H_GRC (FLD (f_rn)), 2);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SHLR8_COMPACT) : /* shlr8 $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = SRLSI (GET_H_GRC (FLD (f_rn)), 8);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SHLR16_COMPACT) : /* shlr16 $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = SRLSI (GET_H_GRC (FLD (f_rn)), 16);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_STC_GBR_COMPACT) : /* stc gbr, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GET_H_GBR ();
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_STCL_GBR_COMPACT) : /* stc.l gbr, @-$rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- DI tmp_addr;
- tmp_addr = SUBSI (GET_H_GRC (FLD (f_rn)), 4);
- {
- SI opval = GET_H_GBR ();
- SETMEMSI (current_cpu, pc, tmp_addr, opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- {
- SI opval = tmp_addr;
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_STS_FPSCR_COMPACT) : /* sts fpscr, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GET_H_FPCCR ();
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_STSL_FPSCR_COMPACT) : /* sts.l fpscr, @-$rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- DI tmp_addr;
- tmp_addr = SUBSI (GET_H_GRC (FLD (f_rn)), 4);
- {
- SI opval = GET_H_FPCCR ();
- SETMEMSI (current_cpu, pc, tmp_addr, opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- {
- SI opval = tmp_addr;
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_STS_FPUL_COMPACT) : /* sts fpul, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = SUBWORDSFSI (CPU (h_fr[((UINT) 32)]));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_STSL_FPUL_COMPACT) : /* sts.l fpul, @-$rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- DI tmp_addr;
- tmp_addr = SUBSI (GET_H_GRC (FLD (f_rn)), 4);
- {
- SF opval = CPU (h_fr[((UINT) 32)]);
- SETMEMSF (current_cpu, pc, tmp_addr, opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
- {
- SI opval = tmp_addr;
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_STS_MACH_COMPACT) : /* sts mach, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GET_H_MACH ();
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_STSL_MACH_COMPACT) : /* sts.l mach, @-$rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- DI tmp_addr;
- tmp_addr = SUBSI (GET_H_GRC (FLD (f_rn)), 4);
- {
- SI opval = GET_H_MACH ();
- SETMEMSI (current_cpu, pc, tmp_addr, opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- {
- SI opval = tmp_addr;
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_STS_MACL_COMPACT) : /* sts macl, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GET_H_MACL ();
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_STSL_MACL_COMPACT) : /* sts.l macl, @-$rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- DI tmp_addr;
- tmp_addr = SUBSI (GET_H_GRC (FLD (f_rn)), 4);
- {
- SI opval = GET_H_MACL ();
- SETMEMSI (current_cpu, pc, tmp_addr, opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- {
- SI opval = tmp_addr;
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_STS_PR_COMPACT) : /* sts pr, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GET_H_PR ();
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_STSL_PR_COMPACT) : /* sts.l pr, @-$rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- DI tmp_addr;
- tmp_addr = SUBSI (GET_H_GRC (FLD (f_rn)), 4);
- {
- SI opval = GET_H_PR ();
- SETMEMSI (current_cpu, pc, tmp_addr, opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- {
- SI opval = tmp_addr;
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SUB_COMPACT) : /* sub $rm, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = SUBSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SUBC_COMPACT) : /* subc $rm, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- BI tmp_flag;
- tmp_flag = SUBCFSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)), GET_H_TBIT ());
- {
- SI opval = SUBCSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)), GET_H_TBIT ());
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- {
- BI opval = tmp_flag;
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SUBV_COMPACT) : /* subv $rm, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- BI tmp_t;
- tmp_t = SUBOFSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)), 0);
- {
- SI opval = SUBSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- {
- BI opval = ((tmp_t) ? (1) : (0));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SWAPB_COMPACT) : /* swap.b $rm, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- UHI tmp_top_half;
- UQI tmp_byte1;
- UQI tmp_byte0;
- tmp_top_half = SUBWORDSIHI (GET_H_GRC (FLD (f_rm)), 0);
- tmp_byte1 = SUBWORDSIQI (GET_H_GRC (FLD (f_rm)), 2);
- tmp_byte0 = SUBWORDSIQI (GET_H_GRC (FLD (f_rm)), 3);
- {
- SI opval = ORSI (SLLSI (tmp_top_half, 16), ORSI (SLLSI (tmp_byte0, 8), tmp_byte1));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SWAPW_COMPACT) : /* swap.w $rm, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = ORSI (SRLSI (GET_H_GRC (FLD (f_rm)), 16), SLLSI (GET_H_GRC (FLD (f_rm)), 16));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_TASB_COMPACT) : /* tas.b @$rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- UQI tmp_byte;
- tmp_byte = GETMEMUQI (current_cpu, pc, GET_H_GRC (FLD (f_rn)));
- {
- BI opval = ((EQQI (tmp_byte, 0)) ? (1) : (0));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
- tmp_byte = ORQI (tmp_byte, 128);
- {
- UQI opval = tmp_byte;
- SETMEMUQI (current_cpu, pc, GET_H_GRC (FLD (f_rn)), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_TRAPA_COMPACT) : /* trapa #$uimm8 */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-sh64_compact_trapa (current_cpu, FLD (f_imm8), pc);
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_TST_COMPACT) : /* tst $rm, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- BI opval = ((EQSI (ANDSI (GET_H_GRC (FLD (f_rm)), GET_H_GRC (FLD (f_rn))), 0)) ? (1) : (0));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_TSTI_COMPACT) : /* tst #$uimm8, r0 */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- BI opval = ((EQSI (ANDSI (GET_H_GRC (((UINT) 0)), ZEXTSISI (FLD (f_imm8))), 0)) ? (1) : (0));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_TSTB_COMPACT) : /* tst.b #$imm8, @(r0, gbr) */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- DI tmp_addr;
- tmp_addr = ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GBR ());
- {
- BI opval = ((EQQI (ANDQI (GETMEMUQI (current_cpu, pc, tmp_addr), FLD (f_imm8)), 0)) ? (1) : (0));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_XOR_COMPACT) : /* xor $rm64, $rn64 */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- DI opval = XORDI (GET_H_GR (FLD (f_rn)), GET_H_GR (FLD (f_rm)));
- SET_H_GR (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn64", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_XORI_COMPACT) : /* xor #$uimm8, r0 */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- DI opval = XORDI (GET_H_GR (((UINT) 0)), ZEXTSIDI (FLD (f_imm8)));
- SET_H_GR (((UINT) 0), opval);
- TRACE_RESULT (current_cpu, abuf, "gr-0", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_XORB_COMPACT) : /* xor.b #$imm8, @(r0, gbr) */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- DI tmp_addr;
- UQI tmp_data;
- tmp_addr = ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GBR ());
- tmp_data = XORQI (GETMEMUQI (current_cpu, pc, tmp_addr), FLD (f_imm8));
- {
- UQI opval = tmp_data;
- SETMEMUQI (current_cpu, pc, tmp_addr, opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_XTRCT_COMPACT) : /* xtrct $rm, $rn */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = ORSI (SLLSI (GET_H_GRC (FLD (f_rm)), 16), SRLSI (GET_H_GRC (FLD (f_rn)), 16));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
-
- }
- ENDSWITCH (sem) /* End of semantic switch. */
-
- /* At this point `vpc' contains the next insn to execute. */
-}
-
-#undef DEFINE_SWITCH
-#endif /* DEFINE_SWITCH */
diff --git a/sim/sh64/sem-compact.c b/sim/sh64/sem-compact.c
deleted file mode 100644
index fae6877772a..00000000000
--- a/sim/sh64/sem-compact.c
+++ /dev/null
@@ -1,5290 +0,0 @@
-/* Simulator instruction semantics for sh64.
-
-THIS FILE IS MACHINE GENERATED WITH CGEN.
-
-Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
-
-This file is part of the GNU Simulators.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-
-#define WANT_CPU sh64
-#define WANT_CPU_SH64
-
-#include "sim-main.h"
-#include "cgen-mem.h"
-#include "cgen-ops.h"
-
-#undef GET_ATTR
-#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-#define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_##attr)
-#else
-#define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_/**/attr)
-#endif
-
-/* This is used so that we can compile two copies of the semantic code,
- one with full feature support and one without that runs fast(er).
- FAST_P, when desired, is defined on the command line, -DFAST_P=1. */
-#if FAST_P
-#define SEM_FN_NAME(cpu,fn) XCONCAT3 (cpu,_semf_,fn)
-#undef TRACE_RESULT
-#define TRACE_RESULT(cpu, abuf, name, type, val)
-#else
-#define SEM_FN_NAME(cpu,fn) XCONCAT3 (cpu,_sem_,fn)
-#endif
-
-/* x-invalid: --invalid-- */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,x_invalid) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
- {
- /* Update the recorded pc in the cpu state struct.
- Only necessary for WITH_SCACHE case, but to avoid the
- conditional compilation .... */
- SET_H_PC (pc);
- /* Virtual insns have zero size. Overwrite vpc with address of next insn
- using the default-insn-bitsize spec. When executing insns in parallel
- we may want to queue the fault and continue execution. */
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
- vpc = sim_engine_invalid_insn (current_cpu, pc, vpc);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* x-after: --after-- */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,x_after) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
- {
-#if WITH_SCACHE_PBB_SH64_COMPACT
- sh64_compact_pbb_after (current_cpu, sem_arg);
-#endif
- }
-
- return vpc;
-#undef FLD
-}
-
-/* x-before: --before-- */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,x_before) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
- {
-#if WITH_SCACHE_PBB_SH64_COMPACT
- sh64_compact_pbb_before (current_cpu, sem_arg);
-#endif
- }
-
- return vpc;
-#undef FLD
-}
-
-/* x-cti-chain: --cti-chain-- */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,x_cti_chain) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
- {
-#if WITH_SCACHE_PBB_SH64_COMPACT
-#ifdef DEFINE_SWITCH
- vpc = sh64_compact_pbb_cti_chain (current_cpu, sem_arg,
- pbb_br_type, pbb_br_npc);
- BREAK (sem);
-#else
- /* FIXME: Allow provision of explicit ifmt spec in insn spec. */
- vpc = sh64_compact_pbb_cti_chain (current_cpu, sem_arg,
- CPU_PBB_BR_TYPE (current_cpu),
- CPU_PBB_BR_NPC (current_cpu));
-#endif
-#endif
- }
-
- return vpc;
-#undef FLD
-}
-
-/* x-chain: --chain-- */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,x_chain) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
- {
-#if WITH_SCACHE_PBB_SH64_COMPACT
- vpc = sh64_compact_pbb_chain (current_cpu, sem_arg);
-#ifdef DEFINE_SWITCH
- BREAK (sem);
-#endif
-#endif
- }
-
- return vpc;
-#undef FLD
-}
-
-/* x-begin: --begin-- */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,x_begin) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
- {
-#if WITH_SCACHE_PBB_SH64_COMPACT
-#if defined DEFINE_SWITCH || defined FAST_P
- /* In the switch case FAST_P is a constant, allowing several optimizations
- in any called inline functions. */
- vpc = sh64_compact_pbb_begin (current_cpu, FAST_P);
-#else
-#if 0 /* cgen engine can't handle dynamic fast/full switching yet. */
- vpc = sh64_compact_pbb_begin (current_cpu, STATE_RUN_FAST_P (CPU_STATE (current_cpu)));
-#else
- vpc = sh64_compact_pbb_begin (current_cpu, 0);
-#endif
-#endif
-#endif
- }
-
- return vpc;
-#undef FLD
-}
-
-/* add-compact: add $rm, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,add_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* addi-compact: add #$imm8, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,addi_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), EXTQISI (ANDQI (FLD (f_imm8), 255)));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* addc-compact: addc $rm, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,addc_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- BI tmp_flag;
- tmp_flag = ADDCFSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)), GET_H_TBIT ());
- {
- SI opval = ADDCSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)), GET_H_TBIT ());
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- {
- BI opval = tmp_flag;
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* addv-compact: addv $rm, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,addv_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- BI tmp_t;
- tmp_t = ADDOFSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)), 0);
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- {
- BI opval = tmp_t;
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* and-compact: and $rm64, $rn64 */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,and_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- DI opval = ANDDI (GET_H_GR (FLD (f_rm)), GET_H_GR (FLD (f_rn)));
- SET_H_GR (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn64", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* andi-compact: and #$uimm8, r0 */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,andi_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = ANDSI (GET_H_GRC (((UINT) 0)), ZEXTSIDI (FLD (f_imm8)));
- SET_H_GRC (((UINT) 0), opval);
- TRACE_RESULT (current_cpu, abuf, "r0", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* andb-compact: and.b #$imm8, @(r0, gbr) */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,andb_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- DI tmp_addr;
- UQI tmp_data;
- tmp_addr = ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GBR ());
- tmp_data = ANDQI (GETMEMUQI (current_cpu, pc, tmp_addr), FLD (f_imm8));
- {
- UQI opval = tmp_data;
- SETMEMUQI (current_cpu, pc, tmp_addr, opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* bf-compact: bf $disp8 */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,bf_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_bf_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (NOTBI (GET_H_TBIT ())) {
- {
- UDI opval = FLD (i_disp8);
- SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
- written |= (1 << 2);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-
- abuf->written = written;
- SEM_BRANCH_FINI (vpc);
- return vpc;
-#undef FLD
-}
-
-/* bfs-compact: bf/s $disp8 */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,bfs_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_bf_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (NOTBI (GET_H_TBIT ())) {
-{
- {
- UDI opval = FLD (i_disp8);
- SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
- written |= (1 << 2);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-}
-
- abuf->written = written;
- SEM_BRANCH_FINI (vpc);
- return vpc;
-#undef FLD
-}
-
-/* bra-compact: bra $disp12 */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,bra_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_bra_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- {
- UDI opval = FLD (i_disp12);
- SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-
- SEM_BRANCH_FINI (vpc);
- return vpc;
-#undef FLD
-}
-
-/* braf-compact: braf $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,braf_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- {
- UDI opval = ADDDI (EXTSIDI (GET_H_GRC (FLD (f_rn))), ADDDI (pc, 4));
- SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-
- SEM_BRANCH_FINI (vpc);
- return vpc;
-#undef FLD
-}
-
-/* brk-compact: brk */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,brk_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-sh64_break (current_cpu, pc);
-
- return vpc;
-#undef FLD
-}
-
-/* bsr-compact: bsr $disp12 */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,bsr_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_bra_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-{
- {
- SI opval = ADDDI (pc, 4);
- SET_H_PR (opval);
- TRACE_RESULT (current_cpu, abuf, "pr", 'x', opval);
- }
- {
- UDI opval = FLD (i_disp12);
- SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-}
-
- SEM_BRANCH_FINI (vpc);
- return vpc;
-#undef FLD
-}
-
-/* bsrf-compact: bsrf $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,bsrf_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-{
- {
- SI opval = ADDDI (pc, 4);
- SET_H_PR (opval);
- TRACE_RESULT (current_cpu, abuf, "pr", 'x', opval);
- }
- {
- UDI opval = ADDDI (EXTSIDI (GET_H_GRC (FLD (f_rn))), ADDDI (pc, 4));
- SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-}
-
- SEM_BRANCH_FINI (vpc);
- return vpc;
-#undef FLD
-}
-
-/* bt-compact: bt $disp8 */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,bt_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_bf_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (GET_H_TBIT ()) {
- {
- UDI opval = FLD (i_disp8);
- SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
- written |= (1 << 2);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-
- abuf->written = written;
- SEM_BRANCH_FINI (vpc);
- return vpc;
-#undef FLD
-}
-
-/* bts-compact: bt/s $disp8 */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,bts_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_bf_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (GET_H_TBIT ()) {
-{
- {
- UDI opval = FLD (i_disp8);
- SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
- written |= (1 << 2);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-}
-
- abuf->written = written;
- SEM_BRANCH_FINI (vpc);
- return vpc;
-#undef FLD
-}
-
-/* clrmac-compact: clrmac */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,clrmac_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- {
- SI opval = 0;
- SET_H_MACL (opval);
- TRACE_RESULT (current_cpu, abuf, "macl", 'x', opval);
- }
- {
- SI opval = 0;
- SET_H_MACH (opval);
- TRACE_RESULT (current_cpu, abuf, "mach", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* clrs-compact: clrs */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,clrs_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- BI opval = 0;
- SET_H_SBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "sbit", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* clrt-compact: clrt */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,clrt_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- BI opval = 0;
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* cmpeq-compact: cmp/eq $rm, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,cmpeq_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- BI opval = EQSI (GET_H_GRC (FLD (f_rm)), GET_H_GRC (FLD (f_rn)));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* cmpeqi-compact: cmp/eq #$imm8, r0 */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,cmpeqi_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- BI opval = EQSI (GET_H_GRC (((UINT) 0)), EXTQISI (ANDQI (FLD (f_imm8), 255)));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* cmpge-compact: cmp/ge $rm, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,cmpge_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- BI opval = GESI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* cmpgt-compact: cmp/gt $rm, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,cmpgt_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- BI opval = GTSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* cmphi-compact: cmp/hi $rm, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,cmphi_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- BI opval = GTUSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* cmphs-compact: cmp/hs $rm, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,cmphs_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- BI opval = GEUSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* cmppl-compact: cmp/pl $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,cmppl_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- BI opval = GTSI (GET_H_GRC (FLD (f_rn)), 0);
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* cmppz-compact: cmp/pz $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,cmppz_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- BI opval = GESI (GET_H_GRC (FLD (f_rn)), 0);
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* cmpstr-compact: cmp/str $rm, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,cmpstr_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- BI tmp_t;
- SI tmp_temp;
- tmp_temp = XORSI (GET_H_GRC (FLD (f_rm)), GET_H_GRC (FLD (f_rn)));
- tmp_t = EQSI (ANDSI (tmp_temp, 0xff000000), 0);
- tmp_t = ORBI (EQSI (ANDSI (tmp_temp, 16711680), 0), tmp_t);
- tmp_t = ORBI (EQSI (ANDSI (tmp_temp, 65280), 0), tmp_t);
- tmp_t = ORBI (EQSI (ANDSI (tmp_temp, 255), 0), tmp_t);
- {
- BI opval = ((GTUBI (tmp_t, 0)) ? (1) : (0));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* div0s-compact: div0s $rm, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,div0s_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- {
- BI opval = SRLSI (GET_H_GRC (FLD (f_rn)), 31);
- SET_H_QBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "qbit", 'x', opval);
- }
- {
- BI opval = SRLSI (GET_H_GRC (FLD (f_rm)), 31);
- SET_H_MBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "mbit", 'x', opval);
- }
- {
- BI opval = ((EQSI (SRLSI (GET_H_GRC (FLD (f_rm)), 31), SRLSI (GET_H_GRC (FLD (f_rn)), 31))) ? (0) : (1));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* div0u-compact: div0u */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,div0u_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- {
- BI opval = 0;
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
- {
- BI opval = 0;
- SET_H_QBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "qbit", 'x', opval);
- }
- {
- BI opval = 0;
- SET_H_MBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "mbit", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* div1-compact: div1 $rm, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,div1_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- BI tmp_oldq;
- SI tmp_tmp0;
- UQI tmp_tmp1;
- tmp_oldq = GET_H_QBIT ();
- {
- BI opval = SRLSI (GET_H_GRC (FLD (f_rn)), 31);
- SET_H_QBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "qbit", 'x', opval);
- }
- {
- SI opval = ORSI (SLLSI (GET_H_GRC (FLD (f_rn)), 1), ZEXTBISI (GET_H_TBIT ()));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-if (NOTBI (tmp_oldq)) {
-if (NOTBI (GET_H_MBIT ())) {
-{
- tmp_tmp0 = GET_H_GRC (FLD (f_rn));
- {
- SI opval = SUBSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- tmp_tmp1 = GTUSI (GET_H_GRC (FLD (f_rn)), tmp_tmp0);
-if (NOTBI (GET_H_QBIT ())) {
- {
- BI opval = ((tmp_tmp1) ? (1) : (0));
- SET_H_QBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "qbit", 'x', opval);
- }
-} else {
- {
- BI opval = ((EQQI (tmp_tmp1, 0)) ? (1) : (0));
- SET_H_QBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "qbit", 'x', opval);
- }
-}
-}
-} else {
-{
- tmp_tmp0 = GET_H_GRC (FLD (f_rn));
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- tmp_tmp1 = LTUSI (GET_H_GRC (FLD (f_rn)), tmp_tmp0);
-if (NOTBI (GET_H_QBIT ())) {
- {
- BI opval = ((EQQI (tmp_tmp1, 0)) ? (1) : (0));
- SET_H_QBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "qbit", 'x', opval);
- }
-} else {
- {
- BI opval = ((tmp_tmp1) ? (1) : (0));
- SET_H_QBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "qbit", 'x', opval);
- }
-}
-}
-}
-} else {
-if (NOTBI (GET_H_MBIT ())) {
-{
- tmp_tmp0 = GET_H_GRC (FLD (f_rn));
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rm)), GET_H_GRC (FLD (f_rn)));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- tmp_tmp1 = LTUSI (GET_H_GRC (FLD (f_rn)), tmp_tmp0);
-if (NOTBI (GET_H_QBIT ())) {
- {
- BI opval = ((tmp_tmp1) ? (1) : (0));
- SET_H_QBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "qbit", 'x', opval);
- }
-} else {
- {
- BI opval = ((EQQI (tmp_tmp1, 0)) ? (1) : (0));
- SET_H_QBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "qbit", 'x', opval);
- }
-}
-}
-} else {
-{
- tmp_tmp0 = GET_H_GRC (FLD (f_rn));
- {
- SI opval = SUBSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- tmp_tmp1 = GTUSI (GET_H_GRC (FLD (f_rn)), tmp_tmp0);
-if (NOTBI (GET_H_QBIT ())) {
- {
- BI opval = ((EQQI (tmp_tmp1, 0)) ? (1) : (0));
- SET_H_QBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "qbit", 'x', opval);
- }
-} else {
- {
- BI opval = ((tmp_tmp1) ? (1) : (0));
- SET_H_QBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "qbit", 'x', opval);
- }
-}
-}
-}
-}
- {
- BI opval = ((EQBI (GET_H_QBIT (), GET_H_MBIT ())) ? (1) : (0));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* dmulsl-compact: dmuls.l $rm, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,dmulsl_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- DI tmp_result;
- tmp_result = MULDI (EXTSIDI (GET_H_GRC (FLD (f_rm))), EXTSIDI (GET_H_GRC (FLD (f_rn))));
- {
- SI opval = SUBWORDDISI (tmp_result, 0);
- SET_H_MACH (opval);
- TRACE_RESULT (current_cpu, abuf, "mach", 'x', opval);
- }
- {
- SI opval = SUBWORDDISI (tmp_result, 1);
- SET_H_MACL (opval);
- TRACE_RESULT (current_cpu, abuf, "macl", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* dmulul-compact: dmulu.l $rm, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,dmulul_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- DI tmp_result;
- tmp_result = MULDI (ZEXTSIDI (GET_H_GRC (FLD (f_rm))), ZEXTSIDI (GET_H_GRC (FLD (f_rn))));
- {
- SI opval = SUBWORDDISI (tmp_result, 0);
- SET_H_MACH (opval);
- TRACE_RESULT (current_cpu, abuf, "mach", 'x', opval);
- }
- {
- SI opval = SUBWORDDISI (tmp_result, 1);
- SET_H_MACL (opval);
- TRACE_RESULT (current_cpu, abuf, "macl", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* dt-compact: dt $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,dt_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- {
- SI opval = SUBSI (GET_H_GRC (FLD (f_rn)), 1);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- {
- BI opval = EQSI (GET_H_GRC (FLD (f_rn)), 0);
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* extsb-compact: exts.b $rm, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,extsb_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = EXTQISI (SUBWORDSIQI (GET_H_GRC (FLD (f_rm)), 3));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* extsw-compact: exts.w $rm, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,extsw_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = EXTHISI (SUBWORDSIHI (GET_H_GRC (FLD (f_rm)), 1));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* extub-compact: extu.b $rm, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,extub_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = ZEXTQISI (SUBWORDSIQI (GET_H_GRC (FLD (f_rm)), 3));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* extuw-compact: extu.w $rm, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,extuw_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = ZEXTHISI (SUBWORDSIHI (GET_H_GRC (FLD (f_rm)), 1));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fabs-compact: fabs $fsdn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,fabs_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (GET_H_PRBIT ()) {
- {
- DF opval = sh64_fabsd (current_cpu, GET_H_DR (FLD (f_rn)));
- SET_H_DR (FLD (f_rn), opval);
- written |= (1 << 5);
- TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-fsdn", 'f', opval);
- }
-} else {
- {
- SF opval = sh64_fabss (current_cpu, GET_H_FRC (FLD (f_rn)));
- SET_H_FRC (FLD (f_rn), opval);
- written |= (1 << 4);
- TRACE_RESULT (current_cpu, abuf, "fsdn", 'f', opval);
- }
-}
-
- abuf->written = written;
- return vpc;
-#undef FLD
-}
-
-/* fadd-compact: fadd $fsdm, $fsdn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,fadd_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (GET_H_PRBIT ()) {
- {
- DF opval = sh64_faddd (current_cpu, GET_H_DR (FLD (f_rm)), GET_H_DR (FLD (f_rn)));
- SET_H_DR (FLD (f_rn), opval);
- written |= (1 << 8);
- TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-fsdn", 'f', opval);
- }
-} else {
- {
- SF opval = sh64_fadds (current_cpu, GET_H_FRC (FLD (f_rm)), GET_H_FRC (FLD (f_rn)));
- SET_H_FRC (FLD (f_rn), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "fsdn", 'f', opval);
- }
-}
-
- abuf->written = written;
- return vpc;
-#undef FLD
-}
-
-/* fcmpeq-compact: fcmp/eq $fsdm, $fsdn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,fcmpeq_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (GET_H_PRBIT ()) {
- {
- BI opval = sh64_fcmpeqd (current_cpu, GET_H_DR (FLD (f_rm)), GET_H_DR (FLD (f_rn)));
- SET_H_TBIT (opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-} else {
- {
- BI opval = sh64_fcmpeqs (current_cpu, GET_H_FRC (FLD (f_rm)), GET_H_FRC (FLD (f_rn)));
- SET_H_TBIT (opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
- abuf->written = written;
- return vpc;
-#undef FLD
-}
-
-/* fcmpgt-compact: fcmp/gt $fsdm, $fsdn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,fcmpgt_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (GET_H_PRBIT ()) {
- {
- BI opval = sh64_fcmpgtd (current_cpu, GET_H_DR (FLD (f_rn)), GET_H_DR (FLD (f_rm)));
- SET_H_TBIT (opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-} else {
- {
- BI opval = sh64_fcmpgts (current_cpu, GET_H_FRC (FLD (f_rn)), GET_H_FRC (FLD (f_rm)));
- SET_H_TBIT (opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
- abuf->written = written;
- return vpc;
-#undef FLD
-}
-
-/* fcnvds-compact: fcnvds $drn, fpul */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,fcnvds_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_fcnvds_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SF opval = sh64_fcnvds (current_cpu, GET_H_DRC (FLD (f_dn)));
- CPU (h_fr[((UINT) 32)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fpul", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fcnvsd-compact: fcnvsd fpul, $drn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,fcnvsd_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_fcnvds_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- DF opval = sh64_fcnvsd (current_cpu, CPU (h_fr[((UINT) 32)]));
- SET_H_DRC (FLD (f_dn), opval);
- TRACE_RESULT (current_cpu, abuf, "drn", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fdiv-compact: fdiv $fsdm, $fsdn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,fdiv_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (GET_H_PRBIT ()) {
- {
- DF opval = sh64_fdivd (current_cpu, GET_H_DR (FLD (f_rn)), GET_H_DR (FLD (f_rm)));
- SET_H_DR (FLD (f_rn), opval);
- written |= (1 << 8);
- TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-fsdn", 'f', opval);
- }
-} else {
- {
- SF opval = sh64_fdivs (current_cpu, GET_H_FRC (FLD (f_rn)), GET_H_FRC (FLD (f_rm)));
- SET_H_FRC (FLD (f_rn), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "fsdn", 'f', opval);
- }
-}
-
- abuf->written = written;
- return vpc;
-#undef FLD
-}
-
-/* fipr-compact: fipr $fvm, $fvn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,fipr_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_fipr_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- QI tmp_m;
- QI tmp_n;
- SF tmp_res;
- tmp_m = FLD (f_vm);
- tmp_n = FLD (f_vn);
- tmp_res = sh64_fmuls (current_cpu, GET_H_FVC (FLD (f_vm)), GET_H_FVC (FLD (f_vn)));
- tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_FRC (ADDQI (tmp_m, 1)), GET_H_FRC (ADDQI (tmp_n, 1))));
- tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_FRC (ADDQI (tmp_m, 2)), GET_H_FRC (ADDQI (tmp_n, 2))));
- tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_FRC (ADDQI (tmp_m, 3)), GET_H_FRC (ADDQI (tmp_n, 3))));
- {
- SF opval = tmp_res;
- SET_H_FRC (ADDQI (tmp_n, 3), opval);
- TRACE_RESULT (current_cpu, abuf, "frc-add--DFLT-n-3", 'f', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* flds-compact: flds $frn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,flds_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SF opval = GET_H_FRC (FLD (f_rn));
- CPU (h_fr[((UINT) 32)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fpul", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fldi0-compact: fldi0 $frn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,fldi0_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SF opval = sh64_fldi0 (current_cpu);
- SET_H_FRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "frn", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fldi1-compact: fldi1 $frn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,fldi1_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SF opval = sh64_fldi1 (current_cpu);
- SET_H_FRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "frn", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* float-compact: float fpul, $fsdn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,float_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (GET_H_PRBIT ()) {
- {
- DF opval = sh64_floatld (current_cpu, CPU (h_fr[((UINT) 32)]));
- SET_H_DR (FLD (f_rn), opval);
- written |= (1 << 4);
- TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-fsdn", 'f', opval);
- }
-} else {
- {
- SF opval = sh64_floatls (current_cpu, CPU (h_fr[((UINT) 32)]));
- SET_H_FRC (FLD (f_rn), opval);
- written |= (1 << 3);
- TRACE_RESULT (current_cpu, abuf, "fsdn", 'f', opval);
- }
-}
-
- abuf->written = written;
- return vpc;
-#undef FLD
-}
-
-/* fmac-compact: fmac fr0, $frm, $frn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,fmac_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SF opval = sh64_fmacs (current_cpu, GET_H_FRC (((UINT) 0)), GET_H_FRC (FLD (f_rm)), GET_H_FRC (FLD (f_rn)));
- SET_H_FRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "frn", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fmov1-compact: fmov $frm, $frn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,fmov1_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (NOTBI (GET_H_SZBIT ())) {
- {
- SF opval = GET_H_FRC (FLD (f_rm));
- SET_H_FRC (FLD (f_rn), opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "frn", 'f', opval);
- }
-} else {
-if (EQSI (ANDSI (FLD (f_rm), 1), 1)) {
-if (EQSI (ANDSI (FLD (f_rn), 1), 1)) {
- {
- DF opval = GET_H_XD (((FLD (f_rm)) & (INVQI (1))));
- SET_H_XD (((FLD (f_rn)) & (INVQI (1))), opval);
- written |= (1 << 8);
- TRACE_RESULT (current_cpu, abuf, "xd-and--DFLT-index-of--DFLT-frn-inv--QI-1", 'f', opval);
- }
-} else {
- {
- DF opval = GET_H_XD (((FLD (f_rm)) & (INVQI (1))));
- SET_H_DR (FLD (f_rn), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-frn", 'f', opval);
- }
-}
-} else {
-if (EQSI (ANDSI (FLD (f_rn), 1), 1)) {
- {
- DF opval = GET_H_DR (FLD (f_rm));
- SET_H_XD (((FLD (f_rn)) & (INVQI (1))), opval);
- written |= (1 << 8);
- TRACE_RESULT (current_cpu, abuf, "xd-and--DFLT-index-of--DFLT-frn-inv--QI-1", 'f', opval);
- }
-} else {
- {
- DF opval = GET_H_DR (FLD (f_rm));
- SET_H_DR (FLD (f_rn), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-frn", 'f', opval);
- }
-}
-}
-}
-
- abuf->written = written;
- return vpc;
-#undef FLD
-}
-
-/* fmov2-compact: fmov @$rm, $frn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,fmov2_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (NOTBI (GET_H_SZBIT ())) {
- {
- SF opval = GETMEMSF (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
- SET_H_FRC (FLD (f_rn), opval);
- written |= (1 << 5);
- TRACE_RESULT (current_cpu, abuf, "frn", 'f', opval);
- }
-} else {
-if (EQSI (ANDSI (FLD (f_rn), 1), 1)) {
- {
- DF opval = GETMEMDF (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
- SET_H_XD (((FLD (f_rn)) & (INVQI (1))), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "xd-and--DFLT-index-of--DFLT-frn-inv--QI-1", 'f', opval);
- }
-} else {
- {
- DF opval = GETMEMDF (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
- SET_H_DR (FLD (f_rn), opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-frn", 'f', opval);
- }
-}
-}
-
- abuf->written = written;
- return vpc;
-#undef FLD
-}
-
-/* fmov3-compact: fmov @${rm}+, frn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,fmov3_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (NOTBI (GET_H_SZBIT ())) {
-{
- {
- SF opval = GETMEMSF (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
- SET_H_FRC (FLD (f_rn), opval);
- written |= (1 << 5);
- TRACE_RESULT (current_cpu, abuf, "frn", 'f', opval);
- }
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rm)), 4);
- SET_H_GRC (FLD (f_rm), opval);
- written |= (1 << 8);
- TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
- }
-}
-} else {
-{
-if (EQSI (ANDSI (FLD (f_rn), 1), 1)) {
- {
- DF opval = GETMEMDF (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
- SET_H_XD (((FLD (f_rn)) & (INVQI (1))), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "xd-and--DFLT-index-of--DFLT-frn-inv--QI-1", 'f', opval);
- }
-} else {
- {
- DF opval = GETMEMDF (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
- SET_H_DR (FLD (f_rn), opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-frn", 'f', opval);
- }
-}
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rm)), 8);
- SET_H_GRC (FLD (f_rm), opval);
- written |= (1 << 8);
- TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
- }
-}
-}
-
- abuf->written = written;
- return vpc;
-#undef FLD
-}
-
-/* fmov4-compact: fmov @(r0, $rm), $frn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,fmov4_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (NOTBI (GET_H_SZBIT ())) {
- {
- SF opval = GETMEMSF (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rm))));
- SET_H_FRC (FLD (f_rn), opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "frn", 'f', opval);
- }
-} else {
-if (EQSI (ANDSI (FLD (f_rn), 1), 1)) {
- {
- DF opval = GETMEMDF (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rm))));
- SET_H_XD (((FLD (f_rn)) & (INVQI (1))), opval);
- written |= (1 << 8);
- TRACE_RESULT (current_cpu, abuf, "xd-and--DFLT-index-of--DFLT-frn-inv--QI-1", 'f', opval);
- }
-} else {
- {
- DF opval = GETMEMDF (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rm))));
- SET_H_DR (FLD (f_rn), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-frn", 'f', opval);
- }
-}
-}
-
- abuf->written = written;
- return vpc;
-#undef FLD
-}
-
-/* fmov5-compact: fmov $frm, @$rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,fmov5_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (NOTBI (GET_H_SZBIT ())) {
- {
- SF opval = GET_H_FRC (FLD (f_rm));
- SETMEMSF (current_cpu, pc, GET_H_GRC (FLD (f_rn)), opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
-} else {
-if (EQSI (ANDSI (FLD (f_rm), 1), 1)) {
- {
- DF opval = GET_H_XD (((FLD (f_rm)) & (INVQI (1))));
- SETMEMDF (current_cpu, pc, GET_H_GRC (FLD (f_rn)), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
-} else {
- {
- DF opval = GET_H_DR (FLD (f_rm));
- SETMEMDF (current_cpu, pc, GET_H_GRC (FLD (f_rn)), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
-}
-}
-
- abuf->written = written;
- return vpc;
-#undef FLD
-}
-
-/* fmov6-compact: fmov $frm, @-$rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,fmov6_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (NOTBI (GET_H_SZBIT ())) {
-{
- {
- SI opval = SUBSI (GET_H_GRC (FLD (f_rn)), 4);
- SET_H_GRC (FLD (f_rn), opval);
- written |= (1 << 8);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- {
- SF opval = GET_H_FRC (FLD (f_rm));
- SETMEMSF (current_cpu, pc, GET_H_GRC (FLD (f_rn)), opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
-}
-} else {
-{
- {
- SI opval = SUBSI (GET_H_GRC (FLD (f_rn)), 8);
- SET_H_GRC (FLD (f_rn), opval);
- written |= (1 << 8);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-if (EQSI (ANDSI (FLD (f_rm), 1), 1)) {
- {
- DF opval = GET_H_XD (((FLD (f_rm)) & (INVQI (1))));
- SETMEMDF (current_cpu, pc, GET_H_GRC (FLD (f_rn)), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
-} else {
- {
- DF opval = GET_H_DR (FLD (f_rm));
- SETMEMDF (current_cpu, pc, GET_H_GRC (FLD (f_rn)), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
-}
-}
-}
-
- abuf->written = written;
- return vpc;
-#undef FLD
-}
-
-/* fmov7-compact: fmov $frm, @(r0, $rn) */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,fmov7_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (NOTBI (GET_H_SZBIT ())) {
- {
- SF opval = GET_H_FRC (FLD (f_rm));
- SETMEMSF (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rn))), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
-} else {
-if (EQSI (ANDSI (FLD (f_rm), 1), 1)) {
- {
- DF opval = GET_H_XD (((FLD (f_rm)) & (INVQI (1))));
- SETMEMDF (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rn))), opval);
- written |= (1 << 8);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
-} else {
- {
- DF opval = GET_H_DR (FLD (f_rm));
- SETMEMDF (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rn))), opval);
- written |= (1 << 8);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
-}
-}
-
- abuf->written = written;
- return vpc;
-#undef FLD
-}
-
-/* fmul-compact: fmul $fsdm, $fsdn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,fmul_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (GET_H_PRBIT ()) {
- {
- DF opval = sh64_fmuld (current_cpu, GET_H_DR (FLD (f_rm)), GET_H_DR (FLD (f_rn)));
- SET_H_DR (FLD (f_rn), opval);
- written |= (1 << 8);
- TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-fsdn", 'f', opval);
- }
-} else {
- {
- SF opval = sh64_fmuls (current_cpu, GET_H_FRC (FLD (f_rm)), GET_H_FRC (FLD (f_rn)));
- SET_H_FRC (FLD (f_rn), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "fsdn", 'f', opval);
- }
-}
-
- abuf->written = written;
- return vpc;
-#undef FLD
-}
-
-/* fneg-compact: fneg $fsdn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,fneg_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (GET_H_PRBIT ()) {
- {
- DF opval = sh64_fnegd (current_cpu, GET_H_DR (FLD (f_rn)));
- SET_H_DR (FLD (f_rn), opval);
- written |= (1 << 5);
- TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-fsdn", 'f', opval);
- }
-} else {
- {
- SF opval = sh64_fnegs (current_cpu, GET_H_FRC (FLD (f_rn)));
- SET_H_FRC (FLD (f_rn), opval);
- written |= (1 << 4);
- TRACE_RESULT (current_cpu, abuf, "fsdn", 'f', opval);
- }
-}
-
- abuf->written = written;
- return vpc;
-#undef FLD
-}
-
-/* frchg-compact: frchg */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,frchg_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- BI opval = NOTBI (GET_H_FRBIT ());
- SET_H_FRBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "frbit", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fschg-compact: fschg */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,fschg_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- BI opval = NOTBI (GET_H_SZBIT ());
- SET_H_SZBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "szbit", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fsqrt-compact: fsqrt $fsdn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,fsqrt_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (GET_H_PRBIT ()) {
- {
- DF opval = sh64_fsqrtd (current_cpu, GET_H_DR (FLD (f_rn)));
- SET_H_DR (FLD (f_rn), opval);
- written |= (1 << 5);
- TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-fsdn", 'f', opval);
- }
-} else {
- {
- SF opval = sh64_fsqrts (current_cpu, GET_H_FRC (FLD (f_rn)));
- SET_H_FRC (FLD (f_rn), opval);
- written |= (1 << 4);
- TRACE_RESULT (current_cpu, abuf, "fsdn", 'f', opval);
- }
-}
-
- abuf->written = written;
- return vpc;
-#undef FLD
-}
-
-/* fsts-compact: fsts fpul, $frn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,fsts_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SF opval = CPU (h_fr[((UINT) 32)]);
- SET_H_FRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "frn", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fsub-compact: fsub $fsdm, $fsdn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,fsub_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (GET_H_PRBIT ()) {
- {
- DF opval = sh64_fsubd (current_cpu, GET_H_DR (FLD (f_rn)), GET_H_DR (FLD (f_rm)));
- SET_H_DR (FLD (f_rn), opval);
- written |= (1 << 8);
- TRACE_RESULT (current_cpu, abuf, "dr-index-of--DFLT-fsdn", 'f', opval);
- }
-} else {
- {
- SF opval = sh64_fsubs (current_cpu, GET_H_FRC (FLD (f_rn)), GET_H_FRC (FLD (f_rm)));
- SET_H_FRC (FLD (f_rn), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "fsdn", 'f', opval);
- }
-}
-
- abuf->written = written;
- return vpc;
-#undef FLD
-}
-
-/* ftrc-compact: ftrc $fsdn, fpul */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,ftrc_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SF opval = ((GET_H_PRBIT ()) ? (sh64_ftrcdl (current_cpu, GET_H_DR (FLD (f_rn)))) : (sh64_ftrcsl (current_cpu, GET_H_FRC (FLD (f_rn)))));
- CPU (h_fr[((UINT) 32)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fpul", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* ftrv-compact: ftrv xmtrx, $fvn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,ftrv_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_fipr_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- QI tmp_n;
- SF tmp_res;
- tmp_n = FLD (f_vn);
- tmp_res = sh64_fmuls (current_cpu, GET_H_XF (((UINT) 0)), GET_H_FRC (tmp_n));
- tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 4)), GET_H_FRC (ADDQI (tmp_n, 1))));
- tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 8)), GET_H_FRC (ADDQI (tmp_n, 2))));
- tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 12)), GET_H_FRC (ADDQI (tmp_n, 3))));
- {
- SF opval = tmp_res;
- SET_H_FRC (tmp_n, opval);
- TRACE_RESULT (current_cpu, abuf, "frc-n", 'f', opval);
- }
- tmp_res = sh64_fmuls (current_cpu, GET_H_XF (((UINT) 1)), GET_H_FRC (tmp_n));
- tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 5)), GET_H_FRC (ADDQI (tmp_n, 1))));
- tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 9)), GET_H_FRC (ADDQI (tmp_n, 2))));
- tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 13)), GET_H_FRC (ADDQI (tmp_n, 3))));
- {
- SF opval = tmp_res;
- SET_H_FRC (ADDQI (tmp_n, 1), opval);
- TRACE_RESULT (current_cpu, abuf, "frc-add--DFLT-n-1", 'f', opval);
- }
- tmp_res = sh64_fmuls (current_cpu, GET_H_XF (((UINT) 2)), GET_H_FRC (tmp_n));
- tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 6)), GET_H_FRC (ADDQI (tmp_n, 1))));
- tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 10)), GET_H_FRC (ADDQI (tmp_n, 2))));
- tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 14)), GET_H_FRC (ADDQI (tmp_n, 3))));
- {
- SF opval = tmp_res;
- SET_H_FRC (ADDQI (tmp_n, 2), opval);
- TRACE_RESULT (current_cpu, abuf, "frc-add--DFLT-n-2", 'f', opval);
- }
- tmp_res = sh64_fmuls (current_cpu, GET_H_XF (((UINT) 3)), GET_H_FRC (tmp_n));
- tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 7)), GET_H_FRC (ADDQI (tmp_n, 1))));
- tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 11)), GET_H_FRC (ADDQI (tmp_n, 2))));
- tmp_res = sh64_fadds (current_cpu, tmp_res, sh64_fmuls (current_cpu, GET_H_XF (((UINT) 15)), GET_H_FRC (ADDQI (tmp_n, 3))));
- {
- SF opval = tmp_res;
- SET_H_FRC (ADDQI (tmp_n, 3), opval);
- TRACE_RESULT (current_cpu, abuf, "frc-add--DFLT-n-3", 'f', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* jmp-compact: jmp @$rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,jmp_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- {
- UDI opval = GET_H_GRC (FLD (f_rn));
- SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-
- SEM_BRANCH_FINI (vpc);
- return vpc;
-#undef FLD
-}
-
-/* jsr-compact: jsr @$rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,jsr_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-{
- {
- SI opval = ADDDI (pc, 4);
- SET_H_PR (opval);
- TRACE_RESULT (current_cpu, abuf, "pr", 'x', opval);
- }
- {
- UDI opval = GET_H_GRC (FLD (f_rn));
- SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-}
-
- SEM_BRANCH_FINI (vpc);
- return vpc;
-#undef FLD
-}
-
-/* ldc-compact: ldc $rn, gbr */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,ldc_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GET_H_GRC (FLD (f_rn));
- SET_H_GBR (opval);
- TRACE_RESULT (current_cpu, abuf, "gbr", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* ldcl-compact: ldc.l @${rn}+, gbr */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,ldcl_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- {
- SI opval = GETMEMSI (current_cpu, pc, GET_H_GRC (FLD (f_rn)));
- SET_H_GBR (opval);
- TRACE_RESULT (current_cpu, abuf, "gbr", 'x', opval);
- }
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), 4);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* lds-fpscr-compact: lds $rn, fpscr */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,lds_fpscr_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GET_H_GRC (FLD (f_rn));
- SET_H_FPCCR (opval);
- TRACE_RESULT (current_cpu, abuf, "fpscr", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* ldsl-fpscr-compact: lds.l @${rn}+, fpscr */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,ldsl_fpscr_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- {
- SI opval = GETMEMSI (current_cpu, pc, GET_H_GRC (FLD (f_rn)));
- SET_H_FPCCR (opval);
- TRACE_RESULT (current_cpu, abuf, "fpscr", 'x', opval);
- }
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), 4);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* lds-fpul-compact: lds $rn, fpul */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,lds_fpul_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SF opval = SUBWORDSISF (GET_H_GRC (FLD (f_rn)));
- CPU (h_fr[((UINT) 32)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fpul", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* ldsl-fpul-compact: lds.l @${rn}+, fpul */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,ldsl_fpul_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- {
- SF opval = GETMEMSF (current_cpu, pc, GET_H_GRC (FLD (f_rn)));
- CPU (h_fr[((UINT) 32)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fpul", 'f', opval);
- }
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), 4);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* lds-mach-compact: lds $rn, mach */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,lds_mach_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GET_H_GRC (FLD (f_rn));
- SET_H_MACH (opval);
- TRACE_RESULT (current_cpu, abuf, "mach", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* ldsl-mach-compact: lds.l @${rn}+, mach */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,ldsl_mach_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- {
- SI opval = GETMEMSI (current_cpu, pc, GET_H_GRC (FLD (f_rn)));
- SET_H_MACH (opval);
- TRACE_RESULT (current_cpu, abuf, "mach", 'x', opval);
- }
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), 4);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* lds-macl-compact: lds $rn, macl */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,lds_macl_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GET_H_GRC (FLD (f_rn));
- SET_H_MACL (opval);
- TRACE_RESULT (current_cpu, abuf, "macl", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* ldsl-macl-compact: lds.l @${rn}+, macl */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,ldsl_macl_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- {
- SI opval = GETMEMSI (current_cpu, pc, GET_H_GRC (FLD (f_rn)));
- SET_H_MACL (opval);
- TRACE_RESULT (current_cpu, abuf, "macl", 'x', opval);
- }
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), 4);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* lds-pr-compact: lds $rn, pr */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,lds_pr_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GET_H_GRC (FLD (f_rn));
- SET_H_PR (opval);
- TRACE_RESULT (current_cpu, abuf, "pr", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* ldsl-pr-compact: lds.l @${rn}+, pr */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,ldsl_pr_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- {
- SI opval = GETMEMSI (current_cpu, pc, GET_H_GRC (FLD (f_rn)));
- SET_H_PR (opval);
- TRACE_RESULT (current_cpu, abuf, "pr", 'x', opval);
- }
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), 4);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* macl-compact: mac.l @${rm}+, @${rn}+ */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,macl_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- DI tmp_tmpry;
- DI tmp_mac;
- DI tmp_result;
- SI tmp_x;
- SI tmp_y;
- tmp_x = GETMEMSI (current_cpu, pc, GET_H_GRC (FLD (f_rn)));
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), 4);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-if (EQSI (FLD (f_rn), FLD (f_rm))) {
-{
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), 4);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rm)), 4);
- SET_H_GRC (FLD (f_rm), opval);
- written |= (1 << 11);
- TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
- }
-}
-}
- tmp_y = GETMEMSI (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rm)), 4);
- SET_H_GRC (FLD (f_rm), opval);
- written |= (1 << 11);
- TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
- }
- tmp_tmpry = MULDI (ZEXTSIDI (tmp_x), ZEXTSIDI (tmp_y));
- tmp_mac = ORDI (SLLDI (ZEXTSIDI (GET_H_MACH ()), 32), ZEXTSIDI (GET_H_MACL ()));
- tmp_result = ADDDI (tmp_mac, tmp_tmpry);
-{
-if (GET_H_SBIT ()) {
-{
- SI tmp_min;
- SI tmp_max;
- tmp_max = SRLDI (INVDI (0), 16);
- tmp_min = SRLDI (INVDI (0), 15);
-if (GTDI (tmp_result, tmp_max)) {
- tmp_result = tmp_max;
-} else {
-if (LTDI (tmp_result, tmp_min)) {
- tmp_result = tmp_min;
-}
-}
-}
-}
- {
- SI opval = SUBWORDDISI (tmp_result, 0);
- SET_H_MACH (opval);
- TRACE_RESULT (current_cpu, abuf, "mach", 'x', opval);
- }
- {
- SI opval = SUBWORDDISI (tmp_result, 1);
- SET_H_MACL (opval);
- TRACE_RESULT (current_cpu, abuf, "macl", 'x', opval);
- }
-}
-}
-
- abuf->written = written;
- return vpc;
-#undef FLD
-}
-
-/* macw-compact: mac.w @${rm}+, @${rn}+ */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,macw_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- SI tmp_tmpry;
- DI tmp_mac;
- DI tmp_result;
- HI tmp_x;
- HI tmp_y;
- tmp_x = GETMEMHI (current_cpu, pc, GET_H_GRC (FLD (f_rn)));
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), 2);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-if (EQSI (FLD (f_rn), FLD (f_rm))) {
-{
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rn)), 2);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rm)), 2);
- SET_H_GRC (FLD (f_rm), opval);
- written |= (1 << 11);
- TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
- }
-}
-}
- tmp_y = GETMEMHI (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rm)), 2);
- SET_H_GRC (FLD (f_rm), opval);
- written |= (1 << 11);
- TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
- }
- tmp_tmpry = MULSI (ZEXTHISI (tmp_x), ZEXTHISI (tmp_y));
-if (GET_H_SBIT ()) {
-{
-if (ADDOFSI (tmp_tmpry, GET_H_MACL (), 0)) {
- {
- SI opval = 1;
- SET_H_MACH (opval);
- written |= (1 << 9);
- TRACE_RESULT (current_cpu, abuf, "mach", 'x', opval);
- }
-}
- {
- SI opval = ADDSI (tmp_tmpry, GET_H_MACL ());
- SET_H_MACL (opval);
- written |= (1 << 10);
- TRACE_RESULT (current_cpu, abuf, "macl", 'x', opval);
- }
-}
-} else {
-{
- tmp_mac = ORDI (SLLDI (ZEXTSIDI (GET_H_MACH ()), 32), ZEXTSIDI (GET_H_MACL ()));
- tmp_result = ADDDI (tmp_mac, EXTSIDI (tmp_tmpry));
- {
- SI opval = SUBWORDDISI (tmp_result, 0);
- SET_H_MACH (opval);
- written |= (1 << 9);
- TRACE_RESULT (current_cpu, abuf, "mach", 'x', opval);
- }
- {
- SI opval = SUBWORDDISI (tmp_result, 1);
- SET_H_MACL (opval);
- written |= (1 << 10);
- TRACE_RESULT (current_cpu, abuf, "macl", 'x', opval);
- }
-}
-}
-}
-
- abuf->written = written;
- return vpc;
-#undef FLD
-}
-
-/* mov-compact: mov $rm64, $rn64 */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,mov_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- DI opval = GET_H_GR (FLD (f_rm));
- SET_H_GR (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn64", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* movi-compact: mov #$imm8, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movi_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = EXTQIDI (ANDQI (FLD (f_imm8), 255));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* movb1-compact: mov.b $rm, @$rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movb1_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- UQI opval = SUBWORDSIUQI (GET_H_GRC (FLD (f_rm)), 3);
- SETMEMUQI (current_cpu, pc, GET_H_GRC (FLD (f_rn)), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* movb2-compact: mov.b $rm, @-$rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movb2_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- DI tmp_addr;
- tmp_addr = SUBSI (GET_H_GRC (FLD (f_rn)), 1);
- {
- UQI opval = SUBWORDSIUQI (GET_H_GRC (FLD (f_rm)), 3);
- SETMEMUQI (current_cpu, pc, tmp_addr, opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- {
- SI opval = tmp_addr;
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* movb3-compact: mov.b $rm, @(r0,$rn) */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movb3_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- UQI opval = SUBWORDSIUQI (GET_H_GRC (FLD (f_rm)), 3);
- SETMEMUQI (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rn))), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* movb4-compact: mov.b r0, @($imm8, gbr) */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movb4_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- DI tmp_addr;
- tmp_addr = ADDSI (GET_H_GBR (), FLD (f_imm8));
- {
- UQI opval = SUBWORDSIUQI (GET_H_GRC (((UINT) 0)), 3);
- SETMEMUQI (current_cpu, pc, tmp_addr, opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* movb5-compact: mov.b r0, @($imm4, $rm) */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movb5_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movb5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- DI tmp_addr;
- tmp_addr = ADDSI (GET_H_GRC (FLD (f_rm)), FLD (f_imm4));
- {
- UQI opval = SUBWORDSIUQI (GET_H_GRC (((UINT) 0)), 3);
- SETMEMUQI (current_cpu, pc, tmp_addr, opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* movb6-compact: mov.b @$rm, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movb6_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = EXTQISI (GETMEMQI (current_cpu, pc, GET_H_GRC (FLD (f_rm))));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* movb7-compact: mov.b @${rm}+, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movb7_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- QI tmp_data;
- tmp_data = GETMEMQI (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
-if (EQSI (FLD (f_rm), FLD (f_rn))) {
- {
- SI opval = EXTQISI (tmp_data);
- SET_H_GRC (FLD (f_rm), opval);
- written |= (1 << 4);
- TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
- }
-} else {
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rm)), 1);
- SET_H_GRC (FLD (f_rm), opval);
- written |= (1 << 4);
- TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
- }
-}
- {
- SI opval = EXTQISI (tmp_data);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
- abuf->written = written;
- return vpc;
-#undef FLD
-}
-
-/* movb8-compact: mov.b @(r0, $rm), $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movb8_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = EXTQISI (GETMEMQI (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rm)))));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* movb9-compact: mov.b @($imm8, gbr), r0 */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movb9_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = EXTQISI (GETMEMQI (current_cpu, pc, ADDSI (GET_H_GBR (), FLD (f_imm8))));
- SET_H_GRC (((UINT) 0), opval);
- TRACE_RESULT (current_cpu, abuf, "r0", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* movb10-compact: mov.b @($imm4, $rm), r0 */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movb10_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movb5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = EXTQISI (GETMEMQI (current_cpu, pc, ADDSI (GET_H_GRC (FLD (f_rm)), FLD (f_imm4))));
- SET_H_GRC (((UINT) 0), opval);
- TRACE_RESULT (current_cpu, abuf, "r0", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* movl1-compact: mov.l $rm, @$rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movl1_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GET_H_GRC (FLD (f_rm));
- SETMEMSI (current_cpu, pc, GET_H_GRC (FLD (f_rn)), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* movl2-compact: mov.l $rm, @-$rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movl2_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- SI tmp_addr;
- tmp_addr = SUBSI (GET_H_GRC (FLD (f_rn)), 4);
- {
- SI opval = GET_H_GRC (FLD (f_rm));
- SETMEMSI (current_cpu, pc, tmp_addr, opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- {
- SI opval = tmp_addr;
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* movl3-compact: mov.l $rm, @(r0, $rn) */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movl3_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GET_H_GRC (FLD (f_rm));
- SETMEMSI (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rn))), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* movl4-compact: mov.l r0, @($imm8x4, gbr) */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movl4_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GET_H_GRC (((UINT) 0));
- SETMEMSI (current_cpu, pc, ADDSI (GET_H_GBR (), FLD (f_imm8x4)), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* movl5-compact: mov.l $rm, @($imm4x4, $rn) */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movl5_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GET_H_GRC (FLD (f_rm));
- SETMEMSI (current_cpu, pc, ADDSI (GET_H_GRC (FLD (f_rn)), FLD (f_imm4x4)), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* movl6-compact: mov.l @$rm, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movl6_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GETMEMSI (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* movl7-compact: mov.l @${rm}+, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movl7_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- {
- SI opval = GETMEMSI (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-if (EQSI (FLD (f_rm), FLD (f_rn))) {
- {
- SI opval = GET_H_GRC (FLD (f_rn));
- SET_H_GRC (FLD (f_rm), opval);
- written |= (1 << 5);
- TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
- }
-} else {
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rm)), 4);
- SET_H_GRC (FLD (f_rm), opval);
- written |= (1 << 5);
- TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
- }
-}
-}
-
- abuf->written = written;
- return vpc;
-#undef FLD
-}
-
-/* movl8-compact: mov.l @(r0, $rm), $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movl8_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GETMEMSI (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rm))));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* movl9-compact: mov.l @($imm8x4, gbr), r0 */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movl9_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GETMEMSI (current_cpu, pc, ADDSI (GET_H_GBR (), FLD (f_imm8x4)));
- SET_H_GRC (((UINT) 0), opval);
- TRACE_RESULT (current_cpu, abuf, "r0", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* movl10-compact: mov.l @($imm8x4, pc), $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movl10_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GETMEMSI (current_cpu, pc, ADDSI (FLD (f_imm8x4), ANDDI (ADDDI (pc, 4), INVSI (3))));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* movl11-compact: mov.l @($imm4x4, $rm), $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movl11_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GETMEMSI (current_cpu, pc, ADDSI (GET_H_GRC (FLD (f_rm)), FLD (f_imm4x4)));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* movw1-compact: mov.w $rm, @$rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movw1_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- HI opval = SUBWORDSIHI (GET_H_GRC (FLD (f_rm)), 1);
- SETMEMHI (current_cpu, pc, GET_H_GRC (FLD (f_rn)), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* movw2-compact: mov.w $rm, @-$rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movw2_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- DI tmp_addr;
- tmp_addr = SUBSI (GET_H_GRC (FLD (f_rn)), 2);
- {
- HI opval = SUBWORDSIHI (GET_H_GRC (FLD (f_rm)), 1);
- SETMEMHI (current_cpu, pc, tmp_addr, opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- {
- SI opval = tmp_addr;
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* movw3-compact: mov.w $rm, @(r0, $rn) */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movw3_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- HI opval = SUBWORDSIHI (GET_H_GRC (FLD (f_rm)), 1);
- SETMEMHI (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rn))), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* movw4-compact: mov.w r0, @($imm8x2, gbr) */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movw4_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- HI opval = SUBWORDSIHI (GET_H_GRC (((UINT) 0)), 1);
- SETMEMHI (current_cpu, pc, ADDSI (GET_H_GBR (), FLD (f_imm8x2)), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* movw5-compact: mov.w r0, @($imm4x2, $rn) */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movw5_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- HI opval = SUBWORDSIHI (GET_H_GRC (((UINT) 0)), 1);
- SETMEMHI (current_cpu, pc, ADDSI (GET_H_GRC (FLD (f_rn)), FLD (f_imm4x2)), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* movw6-compact: mov.w @$rm, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movw6_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = EXTHISI (GETMEMHI (current_cpu, pc, GET_H_GRC (FLD (f_rm))));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* movw7-compact: mov.w @${rm}+, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movw7_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- HI tmp_data;
- tmp_data = GETMEMHI (current_cpu, pc, GET_H_GRC (FLD (f_rm)));
-if (EQSI (FLD (f_rm), FLD (f_rn))) {
- {
- SI opval = EXTHISI (tmp_data);
- SET_H_GRC (FLD (f_rm), opval);
- written |= (1 << 4);
- TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
- }
-} else {
- {
- SI opval = ADDSI (GET_H_GRC (FLD (f_rm)), 2);
- SET_H_GRC (FLD (f_rm), opval);
- written |= (1 << 4);
- TRACE_RESULT (current_cpu, abuf, "rm", 'x', opval);
- }
-}
- {
- SI opval = EXTHISI (tmp_data);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
- abuf->written = written;
- return vpc;
-#undef FLD
-}
-
-/* movw8-compact: mov.w @(r0, $rm), $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movw8_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = EXTHISI (GETMEMHI (current_cpu, pc, ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GRC (FLD (f_rm)))));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* movw9-compact: mov.w @($imm8x2, gbr), r0 */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movw9_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = EXTHISI (GETMEMHI (current_cpu, pc, ADDSI (GET_H_GBR (), FLD (f_imm8x2))));
- SET_H_GRC (((UINT) 0), opval);
- TRACE_RESULT (current_cpu, abuf, "r0", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* movw10-compact: mov.w @($imm8x2, pc), $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movw10_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = EXTHISI (GETMEMHI (current_cpu, pc, ADDDI (ADDDI (pc, 4), FLD (f_imm8x2))));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* movw11-compact: mov.w @($imm4x2, $rm), r0 */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movw11_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw11_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = EXTHISI (GETMEMHI (current_cpu, pc, ADDSI (GET_H_GRC (FLD (f_rm)), FLD (f_imm4x2))));
- SET_H_GRC (((UINT) 0), opval);
- TRACE_RESULT (current_cpu, abuf, "r0", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* mova-compact: mova @($imm8x4, pc), r0 */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,mova_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = ADDDI (ANDDI (ADDDI (pc, 4), INVSI (3)), FLD (f_imm8x4));
- SET_H_GRC (((UINT) 0), opval);
- TRACE_RESULT (current_cpu, abuf, "r0", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* movcal-compact: movca.l r0, @$rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movcal_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GET_H_GRC (((UINT) 0));
- SETMEMSI (current_cpu, pc, GET_H_GRC (FLD (f_rn)), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* movt-compact: movt $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,movt_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = ZEXTBISI (GET_H_TBIT ());
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* mull-compact: mul.l $rm, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,mull_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = MULSI (GET_H_GRC (FLD (f_rm)), GET_H_GRC (FLD (f_rn)));
- SET_H_MACL (opval);
- TRACE_RESULT (current_cpu, abuf, "macl", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* mulsw-compact: muls.w $rm, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,mulsw_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = MULSI (EXTHISI (SUBWORDSIHI (GET_H_GRC (FLD (f_rm)), 1)), EXTHISI (SUBWORDSIHI (GET_H_GRC (FLD (f_rn)), 1)));
- SET_H_MACL (opval);
- TRACE_RESULT (current_cpu, abuf, "macl", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* muluw-compact: mulu.w $rm, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,muluw_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = MULSI (ZEXTHISI (SUBWORDSIHI (GET_H_GRC (FLD (f_rm)), 1)), ZEXTHISI (SUBWORDSIHI (GET_H_GRC (FLD (f_rn)), 1)));
- SET_H_MACL (opval);
- TRACE_RESULT (current_cpu, abuf, "macl", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* neg-compact: neg $rm, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,neg_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = NEGSI (GET_H_GRC (FLD (f_rm)));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* negc-compact: negc $rm, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,negc_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- BI tmp_flag;
- tmp_flag = SUBCFSI (0, GET_H_GRC (FLD (f_rm)), GET_H_TBIT ());
- {
- SI opval = SUBCSI (0, GET_H_GRC (FLD (f_rm)), GET_H_TBIT ());
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- {
- BI opval = tmp_flag;
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* nop-compact: nop */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,nop_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-((void) 0); /*nop*/
-
- return vpc;
-#undef FLD
-}
-
-/* not-compact: not $rm64, $rn64 */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,not_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- DI opval = INVDI (GET_H_GR (FLD (f_rm)));
- SET_H_GR (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn64", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* ocbi-compact: ocbi @$rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,ocbi_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-((void) 0); /*nop*/
-
- return vpc;
-#undef FLD
-}
-
-/* ocbp-compact: ocbp @$rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,ocbp_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-((void) 0); /*nop*/
-
- return vpc;
-#undef FLD
-}
-
-/* ocbwb-compact: ocbwb @$rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,ocbwb_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-((void) 0); /*nop*/
-
- return vpc;
-#undef FLD
-}
-
-/* or-compact: or $rm64, $rn64 */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,or_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- DI opval = ORDI (GET_H_GR (FLD (f_rm)), GET_H_GR (FLD (f_rn)));
- SET_H_GR (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn64", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* ori-compact: or #$uimm8, r0 */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,ori_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = ORSI (GET_H_GRC (((UINT) 0)), ZEXTSIDI (FLD (f_imm8)));
- SET_H_GRC (((UINT) 0), opval);
- TRACE_RESULT (current_cpu, abuf, "r0", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* orb-compact: or.b #$imm8, @(r0, gbr) */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,orb_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- DI tmp_addr;
- UQI tmp_data;
- tmp_addr = ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GBR ());
- tmp_data = ORQI (GETMEMUQI (current_cpu, pc, tmp_addr), FLD (f_imm8));
- {
- UQI opval = tmp_data;
- SETMEMUQI (current_cpu, pc, tmp_addr, opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* pref-compact: pref @$rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,pref_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-((void) 0); /*nop*/
-
- return vpc;
-#undef FLD
-}
-
-/* rotcl-compact: rotcl $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,rotcl_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- BI tmp_temp;
- tmp_temp = SRLSI (GET_H_GRC (FLD (f_rn)), 31);
- {
- SI opval = ORSI (SLLSI (GET_H_GRC (FLD (f_rn)), 1), GET_H_TBIT ());
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- {
- BI opval = ((tmp_temp) ? (1) : (0));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* rotcr-compact: rotcr $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,rotcr_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- BI tmp_lsbit;
- SI tmp_temp;
- tmp_lsbit = ((EQSI (ANDSI (GET_H_GRC (FLD (f_rn)), 1), 0)) ? (0) : (1));
- tmp_temp = GET_H_TBIT ();
- {
- SI opval = ORSI (SRLSI (GET_H_GRC (FLD (f_rn)), 1), SLLSI (tmp_temp, 31));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- {
- BI opval = ((tmp_lsbit) ? (1) : (0));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* rotl-compact: rotl $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,rotl_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- BI tmp_temp;
- tmp_temp = SRLSI (GET_H_GRC (FLD (f_rn)), 31);
- {
- SI opval = ORSI (SLLSI (GET_H_GRC (FLD (f_rn)), 1), tmp_temp);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- {
- BI opval = ((tmp_temp) ? (1) : (0));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* rotr-compact: rotr $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,rotr_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- BI tmp_lsbit;
- SI tmp_temp;
- tmp_lsbit = ((EQSI (ANDSI (GET_H_GRC (FLD (f_rn)), 1), 0)) ? (0) : (1));
- tmp_temp = tmp_lsbit;
- {
- SI opval = ORSI (SRLSI (GET_H_GRC (FLD (f_rn)), 1), SLLSI (tmp_temp, 31));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- {
- BI opval = ((tmp_lsbit) ? (1) : (0));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* rts-compact: rts */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,rts_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- {
- UDI opval = GET_H_PR ();
- SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-
- SEM_BRANCH_FINI (vpc);
- return vpc;
-#undef FLD
-}
-
-/* sets-compact: sets */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,sets_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- BI opval = 1;
- SET_H_SBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "sbit", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* sett-compact: sett */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,sett_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- BI opval = 1;
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* shad-compact: shad $rm, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,shad_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- QI tmp_shamt;
- tmp_shamt = ANDQI (GET_H_GRC (FLD (f_rm)), 31);
-if (GESI (GET_H_GRC (FLD (f_rm)), 0)) {
- {
- SI opval = SLLSI (GET_H_GRC (FLD (f_rn)), tmp_shamt);
- SET_H_GRC (FLD (f_rn), opval);
- written |= (1 << 3);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-} else {
-if (NEQI (tmp_shamt, 0)) {
- {
- SI opval = SRASI (GET_H_GRC (FLD (f_rn)), SUBSI (32, tmp_shamt));
- SET_H_GRC (FLD (f_rn), opval);
- written |= (1 << 3);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-} else {
-if (LTSI (GET_H_GRC (FLD (f_rn)), 0)) {
- {
- SI opval = NEGSI (1);
- SET_H_GRC (FLD (f_rn), opval);
- written |= (1 << 3);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-} else {
- {
- SI opval = 0;
- SET_H_GRC (FLD (f_rn), opval);
- written |= (1 << 3);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-}
-}
-}
-
- abuf->written = written;
- return vpc;
-#undef FLD
-}
-
-/* shal-compact: shal $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,shal_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- BI tmp_t;
- tmp_t = SRLSI (GET_H_GRC (FLD (f_rn)), 31);
- {
- SI opval = SLLSI (GET_H_GRC (FLD (f_rn)), 1);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- {
- BI opval = ((tmp_t) ? (1) : (0));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* shar-compact: shar $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,shar_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- BI tmp_t;
- tmp_t = ANDSI (GET_H_GRC (FLD (f_rn)), 1);
- {
- SI opval = SRASI (GET_H_GRC (FLD (f_rn)), 1);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- {
- BI opval = ((tmp_t) ? (1) : (0));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* shld-compact: shld $rm, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,shld_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- QI tmp_shamt;
- tmp_shamt = ANDQI (GET_H_GRC (FLD (f_rm)), 31);
-if (GESI (GET_H_GRC (FLD (f_rm)), 0)) {
- {
- SI opval = SLLSI (GET_H_GRC (FLD (f_rn)), tmp_shamt);
- SET_H_GRC (FLD (f_rn), opval);
- written |= (1 << 3);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-} else {
-if (NEQI (tmp_shamt, 0)) {
- {
- SI opval = SRLSI (GET_H_GRC (FLD (f_rn)), SUBSI (32, tmp_shamt));
- SET_H_GRC (FLD (f_rn), opval);
- written |= (1 << 3);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-} else {
- {
- SI opval = 0;
- SET_H_GRC (FLD (f_rn), opval);
- written |= (1 << 3);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-}
-}
-
- abuf->written = written;
- return vpc;
-#undef FLD
-}
-
-/* shll-compact: shll $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,shll_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- BI tmp_t;
- tmp_t = SRLSI (GET_H_GRC (FLD (f_rn)), 31);
- {
- SI opval = SLLSI (GET_H_GRC (FLD (f_rn)), 1);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- {
- BI opval = ((tmp_t) ? (1) : (0));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* shll2-compact: shll2 $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,shll2_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = SLLSI (GET_H_GRC (FLD (f_rn)), 2);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* shll8-compact: shll8 $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,shll8_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = SLLSI (GET_H_GRC (FLD (f_rn)), 8);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* shll16-compact: shll16 $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,shll16_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = SLLSI (GET_H_GRC (FLD (f_rn)), 16);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* shlr-compact: shlr $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,shlr_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- BI tmp_t;
- tmp_t = ANDSI (GET_H_GRC (FLD (f_rn)), 1);
- {
- SI opval = SRLSI (GET_H_GRC (FLD (f_rn)), 1);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- {
- BI opval = ((tmp_t) ? (1) : (0));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* shlr2-compact: shlr2 $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,shlr2_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = SRLSI (GET_H_GRC (FLD (f_rn)), 2);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* shlr8-compact: shlr8 $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,shlr8_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = SRLSI (GET_H_GRC (FLD (f_rn)), 8);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* shlr16-compact: shlr16 $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,shlr16_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = SRLSI (GET_H_GRC (FLD (f_rn)), 16);
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* stc-gbr-compact: stc gbr, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,stc_gbr_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GET_H_GBR ();
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* stcl-gbr-compact: stc.l gbr, @-$rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,stcl_gbr_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- DI tmp_addr;
- tmp_addr = SUBSI (GET_H_GRC (FLD (f_rn)), 4);
- {
- SI opval = GET_H_GBR ();
- SETMEMSI (current_cpu, pc, tmp_addr, opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- {
- SI opval = tmp_addr;
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* sts-fpscr-compact: sts fpscr, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,sts_fpscr_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GET_H_FPCCR ();
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* stsl-fpscr-compact: sts.l fpscr, @-$rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,stsl_fpscr_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- DI tmp_addr;
- tmp_addr = SUBSI (GET_H_GRC (FLD (f_rn)), 4);
- {
- SI opval = GET_H_FPCCR ();
- SETMEMSI (current_cpu, pc, tmp_addr, opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- {
- SI opval = tmp_addr;
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* sts-fpul-compact: sts fpul, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,sts_fpul_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = SUBWORDSFSI (CPU (h_fr[((UINT) 32)]));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* stsl-fpul-compact: sts.l fpul, @-$rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,stsl_fpul_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- DI tmp_addr;
- tmp_addr = SUBSI (GET_H_GRC (FLD (f_rn)), 4);
- {
- SF opval = CPU (h_fr[((UINT) 32)]);
- SETMEMSF (current_cpu, pc, tmp_addr, opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
- {
- SI opval = tmp_addr;
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* sts-mach-compact: sts mach, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,sts_mach_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GET_H_MACH ();
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* stsl-mach-compact: sts.l mach, @-$rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,stsl_mach_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- DI tmp_addr;
- tmp_addr = SUBSI (GET_H_GRC (FLD (f_rn)), 4);
- {
- SI opval = GET_H_MACH ();
- SETMEMSI (current_cpu, pc, tmp_addr, opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- {
- SI opval = tmp_addr;
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* sts-macl-compact: sts macl, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,sts_macl_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GET_H_MACL ();
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* stsl-macl-compact: sts.l macl, @-$rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,stsl_macl_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- DI tmp_addr;
- tmp_addr = SUBSI (GET_H_GRC (FLD (f_rn)), 4);
- {
- SI opval = GET_H_MACL ();
- SETMEMSI (current_cpu, pc, tmp_addr, opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- {
- SI opval = tmp_addr;
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* sts-pr-compact: sts pr, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,sts_pr_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = GET_H_PR ();
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* stsl-pr-compact: sts.l pr, @-$rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,stsl_pr_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- DI tmp_addr;
- tmp_addr = SUBSI (GET_H_GRC (FLD (f_rn)), 4);
- {
- SI opval = GET_H_PR ();
- SETMEMSI (current_cpu, pc, tmp_addr, opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- {
- SI opval = tmp_addr;
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* sub-compact: sub $rm, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,sub_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = SUBSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* subc-compact: subc $rm, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,subc_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- BI tmp_flag;
- tmp_flag = SUBCFSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)), GET_H_TBIT ());
- {
- SI opval = SUBCSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)), GET_H_TBIT ());
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- {
- BI opval = tmp_flag;
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* subv-compact: subv $rm, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,subv_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- BI tmp_t;
- tmp_t = SUBOFSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)), 0);
- {
- SI opval = SUBSI (GET_H_GRC (FLD (f_rn)), GET_H_GRC (FLD (f_rm)));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
- {
- BI opval = ((tmp_t) ? (1) : (0));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* swapb-compact: swap.b $rm, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,swapb_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- UHI tmp_top_half;
- UQI tmp_byte1;
- UQI tmp_byte0;
- tmp_top_half = SUBWORDSIHI (GET_H_GRC (FLD (f_rm)), 0);
- tmp_byte1 = SUBWORDSIQI (GET_H_GRC (FLD (f_rm)), 2);
- tmp_byte0 = SUBWORDSIQI (GET_H_GRC (FLD (f_rm)), 3);
- {
- SI opval = ORSI (SLLSI (tmp_top_half, 16), ORSI (SLLSI (tmp_byte0, 8), tmp_byte1));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* swapw-compact: swap.w $rm, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,swapw_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = ORSI (SRLSI (GET_H_GRC (FLD (f_rm)), 16), SLLSI (GET_H_GRC (FLD (f_rm)), 16));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* tasb-compact: tas.b @$rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,tasb_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movw10_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- UQI tmp_byte;
- tmp_byte = GETMEMUQI (current_cpu, pc, GET_H_GRC (FLD (f_rn)));
- {
- BI opval = ((EQQI (tmp_byte, 0)) ? (1) : (0));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
- tmp_byte = ORQI (tmp_byte, 128);
- {
- UQI opval = tmp_byte;
- SETMEMUQI (current_cpu, pc, GET_H_GRC (FLD (f_rn)), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* trapa-compact: trapa #$uimm8 */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,trapa_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-sh64_compact_trapa (current_cpu, FLD (f_imm8), pc);
-
- return vpc;
-#undef FLD
-}
-
-/* tst-compact: tst $rm, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,tst_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- BI opval = ((EQSI (ANDSI (GET_H_GRC (FLD (f_rm)), GET_H_GRC (FLD (f_rn))), 0)) ? (1) : (0));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* tsti-compact: tst #$uimm8, r0 */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,tsti_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- BI opval = ((EQSI (ANDSI (GET_H_GRC (((UINT) 0)), ZEXTSISI (FLD (f_imm8))), 0)) ? (1) : (0));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* tstb-compact: tst.b #$imm8, @(r0, gbr) */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,tstb_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- DI tmp_addr;
- tmp_addr = ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GBR ());
- {
- BI opval = ((EQQI (ANDQI (GETMEMUQI (current_cpu, pc, tmp_addr), FLD (f_imm8)), 0)) ? (1) : (0));
- SET_H_TBIT (opval);
- TRACE_RESULT (current_cpu, abuf, "tbit", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* xor-compact: xor $rm64, $rn64 */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,xor_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- DI opval = XORDI (GET_H_GR (FLD (f_rn)), GET_H_GR (FLD (f_rm)));
- SET_H_GR (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn64", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* xori-compact: xor #$uimm8, r0 */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,xori_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- DI opval = XORDI (GET_H_GR (((UINT) 0)), ZEXTSIDI (FLD (f_imm8)));
- SET_H_GR (((UINT) 0), opval);
- TRACE_RESULT (current_cpu, abuf, "gr-0", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* xorb-compact: xor.b #$imm8, @(r0, gbr) */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,xorb_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
- DI tmp_addr;
- UQI tmp_data;
- tmp_addr = ADDSI (GET_H_GRC (((UINT) 0)), GET_H_GBR ());
- tmp_data = XORQI (GETMEMUQI (current_cpu, pc, tmp_addr), FLD (f_imm8));
- {
- UQI opval = tmp_data;
- SETMEMUQI (current_cpu, pc, tmp_addr, opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* xtrct-compact: xtrct $rm, $rn */
-
-static SEM_PC
-SEM_FN_NAME (sh64_compact,xtrct_compact) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movl5_compact.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
- {
- SI opval = ORSI (SLLSI (GET_H_GRC (FLD (f_rm)), 16), SRLSI (GET_H_GRC (FLD (f_rn)), 16));
- SET_H_GRC (FLD (f_rn), opval);
- TRACE_RESULT (current_cpu, abuf, "rn", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* Table of all semantic fns. */
-
-static const struct sem_fn_desc sem_fns[] = {
- { SH64_COMPACT_INSN_X_INVALID, SEM_FN_NAME (sh64_compact,x_invalid) },
- { SH64_COMPACT_INSN_X_AFTER, SEM_FN_NAME (sh64_compact,x_after) },
- { SH64_COMPACT_INSN_X_BEFORE, SEM_FN_NAME (sh64_compact,x_before) },
- { SH64_COMPACT_INSN_X_CTI_CHAIN, SEM_FN_NAME (sh64_compact,x_cti_chain) },
- { SH64_COMPACT_INSN_X_CHAIN, SEM_FN_NAME (sh64_compact,x_chain) },
- { SH64_COMPACT_INSN_X_BEGIN, SEM_FN_NAME (sh64_compact,x_begin) },
- { SH64_COMPACT_INSN_ADD_COMPACT, SEM_FN_NAME (sh64_compact,add_compact) },
- { SH64_COMPACT_INSN_ADDI_COMPACT, SEM_FN_NAME (sh64_compact,addi_compact) },
- { SH64_COMPACT_INSN_ADDC_COMPACT, SEM_FN_NAME (sh64_compact,addc_compact) },
- { SH64_COMPACT_INSN_ADDV_COMPACT, SEM_FN_NAME (sh64_compact,addv_compact) },
- { SH64_COMPACT_INSN_AND_COMPACT, SEM_FN_NAME (sh64_compact,and_compact) },
- { SH64_COMPACT_INSN_ANDI_COMPACT, SEM_FN_NAME (sh64_compact,andi_compact) },
- { SH64_COMPACT_INSN_ANDB_COMPACT, SEM_FN_NAME (sh64_compact,andb_compact) },
- { SH64_COMPACT_INSN_BF_COMPACT, SEM_FN_NAME (sh64_compact,bf_compact) },
- { SH64_COMPACT_INSN_BFS_COMPACT, SEM_FN_NAME (sh64_compact,bfs_compact) },
- { SH64_COMPACT_INSN_BRA_COMPACT, SEM_FN_NAME (sh64_compact,bra_compact) },
- { SH64_COMPACT_INSN_BRAF_COMPACT, SEM_FN_NAME (sh64_compact,braf_compact) },
- { SH64_COMPACT_INSN_BRK_COMPACT, SEM_FN_NAME (sh64_compact,brk_compact) },
- { SH64_COMPACT_INSN_BSR_COMPACT, SEM_FN_NAME (sh64_compact,bsr_compact) },
- { SH64_COMPACT_INSN_BSRF_COMPACT, SEM_FN_NAME (sh64_compact,bsrf_compact) },
- { SH64_COMPACT_INSN_BT_COMPACT, SEM_FN_NAME (sh64_compact,bt_compact) },
- { SH64_COMPACT_INSN_BTS_COMPACT, SEM_FN_NAME (sh64_compact,bts_compact) },
- { SH64_COMPACT_INSN_CLRMAC_COMPACT, SEM_FN_NAME (sh64_compact,clrmac_compact) },
- { SH64_COMPACT_INSN_CLRS_COMPACT, SEM_FN_NAME (sh64_compact,clrs_compact) },
- { SH64_COMPACT_INSN_CLRT_COMPACT, SEM_FN_NAME (sh64_compact,clrt_compact) },
- { SH64_COMPACT_INSN_CMPEQ_COMPACT, SEM_FN_NAME (sh64_compact,cmpeq_compact) },
- { SH64_COMPACT_INSN_CMPEQI_COMPACT, SEM_FN_NAME (sh64_compact,cmpeqi_compact) },
- { SH64_COMPACT_INSN_CMPGE_COMPACT, SEM_FN_NAME (sh64_compact,cmpge_compact) },
- { SH64_COMPACT_INSN_CMPGT_COMPACT, SEM_FN_NAME (sh64_compact,cmpgt_compact) },
- { SH64_COMPACT_INSN_CMPHI_COMPACT, SEM_FN_NAME (sh64_compact,cmphi_compact) },
- { SH64_COMPACT_INSN_CMPHS_COMPACT, SEM_FN_NAME (sh64_compact,cmphs_compact) },
- { SH64_COMPACT_INSN_CMPPL_COMPACT, SEM_FN_NAME (sh64_compact,cmppl_compact) },
- { SH64_COMPACT_INSN_CMPPZ_COMPACT, SEM_FN_NAME (sh64_compact,cmppz_compact) },
- { SH64_COMPACT_INSN_CMPSTR_COMPACT, SEM_FN_NAME (sh64_compact,cmpstr_compact) },
- { SH64_COMPACT_INSN_DIV0S_COMPACT, SEM_FN_NAME (sh64_compact,div0s_compact) },
- { SH64_COMPACT_INSN_DIV0U_COMPACT, SEM_FN_NAME (sh64_compact,div0u_compact) },
- { SH64_COMPACT_INSN_DIV1_COMPACT, SEM_FN_NAME (sh64_compact,div1_compact) },
- { SH64_COMPACT_INSN_DMULSL_COMPACT, SEM_FN_NAME (sh64_compact,dmulsl_compact) },
- { SH64_COMPACT_INSN_DMULUL_COMPACT, SEM_FN_NAME (sh64_compact,dmulul_compact) },
- { SH64_COMPACT_INSN_DT_COMPACT, SEM_FN_NAME (sh64_compact,dt_compact) },
- { SH64_COMPACT_INSN_EXTSB_COMPACT, SEM_FN_NAME (sh64_compact,extsb_compact) },
- { SH64_COMPACT_INSN_EXTSW_COMPACT, SEM_FN_NAME (sh64_compact,extsw_compact) },
- { SH64_COMPACT_INSN_EXTUB_COMPACT, SEM_FN_NAME (sh64_compact,extub_compact) },
- { SH64_COMPACT_INSN_EXTUW_COMPACT, SEM_FN_NAME (sh64_compact,extuw_compact) },
- { SH64_COMPACT_INSN_FABS_COMPACT, SEM_FN_NAME (sh64_compact,fabs_compact) },
- { SH64_COMPACT_INSN_FADD_COMPACT, SEM_FN_NAME (sh64_compact,fadd_compact) },
- { SH64_COMPACT_INSN_FCMPEQ_COMPACT, SEM_FN_NAME (sh64_compact,fcmpeq_compact) },
- { SH64_COMPACT_INSN_FCMPGT_COMPACT, SEM_FN_NAME (sh64_compact,fcmpgt_compact) },
- { SH64_COMPACT_INSN_FCNVDS_COMPACT, SEM_FN_NAME (sh64_compact,fcnvds_compact) },
- { SH64_COMPACT_INSN_FCNVSD_COMPACT, SEM_FN_NAME (sh64_compact,fcnvsd_compact) },
- { SH64_COMPACT_INSN_FDIV_COMPACT, SEM_FN_NAME (sh64_compact,fdiv_compact) },
- { SH64_COMPACT_INSN_FIPR_COMPACT, SEM_FN_NAME (sh64_compact,fipr_compact) },
- { SH64_COMPACT_INSN_FLDS_COMPACT, SEM_FN_NAME (sh64_compact,flds_compact) },
- { SH64_COMPACT_INSN_FLDI0_COMPACT, SEM_FN_NAME (sh64_compact,fldi0_compact) },
- { SH64_COMPACT_INSN_FLDI1_COMPACT, SEM_FN_NAME (sh64_compact,fldi1_compact) },
- { SH64_COMPACT_INSN_FLOAT_COMPACT, SEM_FN_NAME (sh64_compact,float_compact) },
- { SH64_COMPACT_INSN_FMAC_COMPACT, SEM_FN_NAME (sh64_compact,fmac_compact) },
- { SH64_COMPACT_INSN_FMOV1_COMPACT, SEM_FN_NAME (sh64_compact,fmov1_compact) },
- { SH64_COMPACT_INSN_FMOV2_COMPACT, SEM_FN_NAME (sh64_compact,fmov2_compact) },
- { SH64_COMPACT_INSN_FMOV3_COMPACT, SEM_FN_NAME (sh64_compact,fmov3_compact) },
- { SH64_COMPACT_INSN_FMOV4_COMPACT, SEM_FN_NAME (sh64_compact,fmov4_compact) },
- { SH64_COMPACT_INSN_FMOV5_COMPACT, SEM_FN_NAME (sh64_compact,fmov5_compact) },
- { SH64_COMPACT_INSN_FMOV6_COMPACT, SEM_FN_NAME (sh64_compact,fmov6_compact) },
- { SH64_COMPACT_INSN_FMOV7_COMPACT, SEM_FN_NAME (sh64_compact,fmov7_compact) },
- { SH64_COMPACT_INSN_FMUL_COMPACT, SEM_FN_NAME (sh64_compact,fmul_compact) },
- { SH64_COMPACT_INSN_FNEG_COMPACT, SEM_FN_NAME (sh64_compact,fneg_compact) },
- { SH64_COMPACT_INSN_FRCHG_COMPACT, SEM_FN_NAME (sh64_compact,frchg_compact) },
- { SH64_COMPACT_INSN_FSCHG_COMPACT, SEM_FN_NAME (sh64_compact,fschg_compact) },
- { SH64_COMPACT_INSN_FSQRT_COMPACT, SEM_FN_NAME (sh64_compact,fsqrt_compact) },
- { SH64_COMPACT_INSN_FSTS_COMPACT, SEM_FN_NAME (sh64_compact,fsts_compact) },
- { SH64_COMPACT_INSN_FSUB_COMPACT, SEM_FN_NAME (sh64_compact,fsub_compact) },
- { SH64_COMPACT_INSN_FTRC_COMPACT, SEM_FN_NAME (sh64_compact,ftrc_compact) },
- { SH64_COMPACT_INSN_FTRV_COMPACT, SEM_FN_NAME (sh64_compact,ftrv_compact) },
- { SH64_COMPACT_INSN_JMP_COMPACT, SEM_FN_NAME (sh64_compact,jmp_compact) },
- { SH64_COMPACT_INSN_JSR_COMPACT, SEM_FN_NAME (sh64_compact,jsr_compact) },
- { SH64_COMPACT_INSN_LDC_COMPACT, SEM_FN_NAME (sh64_compact,ldc_compact) },
- { SH64_COMPACT_INSN_LDCL_COMPACT, SEM_FN_NAME (sh64_compact,ldcl_compact) },
- { SH64_COMPACT_INSN_LDS_FPSCR_COMPACT, SEM_FN_NAME (sh64_compact,lds_fpscr_compact) },
- { SH64_COMPACT_INSN_LDSL_FPSCR_COMPACT, SEM_FN_NAME (sh64_compact,ldsl_fpscr_compact) },
- { SH64_COMPACT_INSN_LDS_FPUL_COMPACT, SEM_FN_NAME (sh64_compact,lds_fpul_compact) },
- { SH64_COMPACT_INSN_LDSL_FPUL_COMPACT, SEM_FN_NAME (sh64_compact,ldsl_fpul_compact) },
- { SH64_COMPACT_INSN_LDS_MACH_COMPACT, SEM_FN_NAME (sh64_compact,lds_mach_compact) },
- { SH64_COMPACT_INSN_LDSL_MACH_COMPACT, SEM_FN_NAME (sh64_compact,ldsl_mach_compact) },
- { SH64_COMPACT_INSN_LDS_MACL_COMPACT, SEM_FN_NAME (sh64_compact,lds_macl_compact) },
- { SH64_COMPACT_INSN_LDSL_MACL_COMPACT, SEM_FN_NAME (sh64_compact,ldsl_macl_compact) },
- { SH64_COMPACT_INSN_LDS_PR_COMPACT, SEM_FN_NAME (sh64_compact,lds_pr_compact) },
- { SH64_COMPACT_INSN_LDSL_PR_COMPACT, SEM_FN_NAME (sh64_compact,ldsl_pr_compact) },
- { SH64_COMPACT_INSN_MACL_COMPACT, SEM_FN_NAME (sh64_compact,macl_compact) },
- { SH64_COMPACT_INSN_MACW_COMPACT, SEM_FN_NAME (sh64_compact,macw_compact) },
- { SH64_COMPACT_INSN_MOV_COMPACT, SEM_FN_NAME (sh64_compact,mov_compact) },
- { SH64_COMPACT_INSN_MOVI_COMPACT, SEM_FN_NAME (sh64_compact,movi_compact) },
- { SH64_COMPACT_INSN_MOVB1_COMPACT, SEM_FN_NAME (sh64_compact,movb1_compact) },
- { SH64_COMPACT_INSN_MOVB2_COMPACT, SEM_FN_NAME (sh64_compact,movb2_compact) },
- { SH64_COMPACT_INSN_MOVB3_COMPACT, SEM_FN_NAME (sh64_compact,movb3_compact) },
- { SH64_COMPACT_INSN_MOVB4_COMPACT, SEM_FN_NAME (sh64_compact,movb4_compact) },
- { SH64_COMPACT_INSN_MOVB5_COMPACT, SEM_FN_NAME (sh64_compact,movb5_compact) },
- { SH64_COMPACT_INSN_MOVB6_COMPACT, SEM_FN_NAME (sh64_compact,movb6_compact) },
- { SH64_COMPACT_INSN_MOVB7_COMPACT, SEM_FN_NAME (sh64_compact,movb7_compact) },
- { SH64_COMPACT_INSN_MOVB8_COMPACT, SEM_FN_NAME (sh64_compact,movb8_compact) },
- { SH64_COMPACT_INSN_MOVB9_COMPACT, SEM_FN_NAME (sh64_compact,movb9_compact) },
- { SH64_COMPACT_INSN_MOVB10_COMPACT, SEM_FN_NAME (sh64_compact,movb10_compact) },
- { SH64_COMPACT_INSN_MOVL1_COMPACT, SEM_FN_NAME (sh64_compact,movl1_compact) },
- { SH64_COMPACT_INSN_MOVL2_COMPACT, SEM_FN_NAME (sh64_compact,movl2_compact) },
- { SH64_COMPACT_INSN_MOVL3_COMPACT, SEM_FN_NAME (sh64_compact,movl3_compact) },
- { SH64_COMPACT_INSN_MOVL4_COMPACT, SEM_FN_NAME (sh64_compact,movl4_compact) },
- { SH64_COMPACT_INSN_MOVL5_COMPACT, SEM_FN_NAME (sh64_compact,movl5_compact) },
- { SH64_COMPACT_INSN_MOVL6_COMPACT, SEM_FN_NAME (sh64_compact,movl6_compact) },
- { SH64_COMPACT_INSN_MOVL7_COMPACT, SEM_FN_NAME (sh64_compact,movl7_compact) },
- { SH64_COMPACT_INSN_MOVL8_COMPACT, SEM_FN_NAME (sh64_compact,movl8_compact) },
- { SH64_COMPACT_INSN_MOVL9_COMPACT, SEM_FN_NAME (sh64_compact,movl9_compact) },
- { SH64_COMPACT_INSN_MOVL10_COMPACT, SEM_FN_NAME (sh64_compact,movl10_compact) },
- { SH64_COMPACT_INSN_MOVL11_COMPACT, SEM_FN_NAME (sh64_compact,movl11_compact) },
- { SH64_COMPACT_INSN_MOVW1_COMPACT, SEM_FN_NAME (sh64_compact,movw1_compact) },
- { SH64_COMPACT_INSN_MOVW2_COMPACT, SEM_FN_NAME (sh64_compact,movw2_compact) },
- { SH64_COMPACT_INSN_MOVW3_COMPACT, SEM_FN_NAME (sh64_compact,movw3_compact) },
- { SH64_COMPACT_INSN_MOVW4_COMPACT, SEM_FN_NAME (sh64_compact,movw4_compact) },
- { SH64_COMPACT_INSN_MOVW5_COMPACT, SEM_FN_NAME (sh64_compact,movw5_compact) },
- { SH64_COMPACT_INSN_MOVW6_COMPACT, SEM_FN_NAME (sh64_compact,movw6_compact) },
- { SH64_COMPACT_INSN_MOVW7_COMPACT, SEM_FN_NAME (sh64_compact,movw7_compact) },
- { SH64_COMPACT_INSN_MOVW8_COMPACT, SEM_FN_NAME (sh64_compact,movw8_compact) },
- { SH64_COMPACT_INSN_MOVW9_COMPACT, SEM_FN_NAME (sh64_compact,movw9_compact) },
- { SH64_COMPACT_INSN_MOVW10_COMPACT, SEM_FN_NAME (sh64_compact,movw10_compact) },
- { SH64_COMPACT_INSN_MOVW11_COMPACT, SEM_FN_NAME (sh64_compact,movw11_compact) },
- { SH64_COMPACT_INSN_MOVA_COMPACT, SEM_FN_NAME (sh64_compact,mova_compact) },
- { SH64_COMPACT_INSN_MOVCAL_COMPACT, SEM_FN_NAME (sh64_compact,movcal_compact) },
- { SH64_COMPACT_INSN_MOVT_COMPACT, SEM_FN_NAME (sh64_compact,movt_compact) },
- { SH64_COMPACT_INSN_MULL_COMPACT, SEM_FN_NAME (sh64_compact,mull_compact) },
- { SH64_COMPACT_INSN_MULSW_COMPACT, SEM_FN_NAME (sh64_compact,mulsw_compact) },
- { SH64_COMPACT_INSN_MULUW_COMPACT, SEM_FN_NAME (sh64_compact,muluw_compact) },
- { SH64_COMPACT_INSN_NEG_COMPACT, SEM_FN_NAME (sh64_compact,neg_compact) },
- { SH64_COMPACT_INSN_NEGC_COMPACT, SEM_FN_NAME (sh64_compact,negc_compact) },
- { SH64_COMPACT_INSN_NOP_COMPACT, SEM_FN_NAME (sh64_compact,nop_compact) },
- { SH64_COMPACT_INSN_NOT_COMPACT, SEM_FN_NAME (sh64_compact,not_compact) },
- { SH64_COMPACT_INSN_OCBI_COMPACT, SEM_FN_NAME (sh64_compact,ocbi_compact) },
- { SH64_COMPACT_INSN_OCBP_COMPACT, SEM_FN_NAME (sh64_compact,ocbp_compact) },
- { SH64_COMPACT_INSN_OCBWB_COMPACT, SEM_FN_NAME (sh64_compact,ocbwb_compact) },
- { SH64_COMPACT_INSN_OR_COMPACT, SEM_FN_NAME (sh64_compact,or_compact) },
- { SH64_COMPACT_INSN_ORI_COMPACT, SEM_FN_NAME (sh64_compact,ori_compact) },
- { SH64_COMPACT_INSN_ORB_COMPACT, SEM_FN_NAME (sh64_compact,orb_compact) },
- { SH64_COMPACT_INSN_PREF_COMPACT, SEM_FN_NAME (sh64_compact,pref_compact) },
- { SH64_COMPACT_INSN_ROTCL_COMPACT, SEM_FN_NAME (sh64_compact,rotcl_compact) },
- { SH64_COMPACT_INSN_ROTCR_COMPACT, SEM_FN_NAME (sh64_compact,rotcr_compact) },
- { SH64_COMPACT_INSN_ROTL_COMPACT, SEM_FN_NAME (sh64_compact,rotl_compact) },
- { SH64_COMPACT_INSN_ROTR_COMPACT, SEM_FN_NAME (sh64_compact,rotr_compact) },
- { SH64_COMPACT_INSN_RTS_COMPACT, SEM_FN_NAME (sh64_compact,rts_compact) },
- { SH64_COMPACT_INSN_SETS_COMPACT, SEM_FN_NAME (sh64_compact,sets_compact) },
- { SH64_COMPACT_INSN_SETT_COMPACT, SEM_FN_NAME (sh64_compact,sett_compact) },
- { SH64_COMPACT_INSN_SHAD_COMPACT, SEM_FN_NAME (sh64_compact,shad_compact) },
- { SH64_COMPACT_INSN_SHAL_COMPACT, SEM_FN_NAME (sh64_compact,shal_compact) },
- { SH64_COMPACT_INSN_SHAR_COMPACT, SEM_FN_NAME (sh64_compact,shar_compact) },
- { SH64_COMPACT_INSN_SHLD_COMPACT, SEM_FN_NAME (sh64_compact,shld_compact) },
- { SH64_COMPACT_INSN_SHLL_COMPACT, SEM_FN_NAME (sh64_compact,shll_compact) },
- { SH64_COMPACT_INSN_SHLL2_COMPACT, SEM_FN_NAME (sh64_compact,shll2_compact) },
- { SH64_COMPACT_INSN_SHLL8_COMPACT, SEM_FN_NAME (sh64_compact,shll8_compact) },
- { SH64_COMPACT_INSN_SHLL16_COMPACT, SEM_FN_NAME (sh64_compact,shll16_compact) },
- { SH64_COMPACT_INSN_SHLR_COMPACT, SEM_FN_NAME (sh64_compact,shlr_compact) },
- { SH64_COMPACT_INSN_SHLR2_COMPACT, SEM_FN_NAME (sh64_compact,shlr2_compact) },
- { SH64_COMPACT_INSN_SHLR8_COMPACT, SEM_FN_NAME (sh64_compact,shlr8_compact) },
- { SH64_COMPACT_INSN_SHLR16_COMPACT, SEM_FN_NAME (sh64_compact,shlr16_compact) },
- { SH64_COMPACT_INSN_STC_GBR_COMPACT, SEM_FN_NAME (sh64_compact,stc_gbr_compact) },
- { SH64_COMPACT_INSN_STCL_GBR_COMPACT, SEM_FN_NAME (sh64_compact,stcl_gbr_compact) },
- { SH64_COMPACT_INSN_STS_FPSCR_COMPACT, SEM_FN_NAME (sh64_compact,sts_fpscr_compact) },
- { SH64_COMPACT_INSN_STSL_FPSCR_COMPACT, SEM_FN_NAME (sh64_compact,stsl_fpscr_compact) },
- { SH64_COMPACT_INSN_STS_FPUL_COMPACT, SEM_FN_NAME (sh64_compact,sts_fpul_compact) },
- { SH64_COMPACT_INSN_STSL_FPUL_COMPACT, SEM_FN_NAME (sh64_compact,stsl_fpul_compact) },
- { SH64_COMPACT_INSN_STS_MACH_COMPACT, SEM_FN_NAME (sh64_compact,sts_mach_compact) },
- { SH64_COMPACT_INSN_STSL_MACH_COMPACT, SEM_FN_NAME (sh64_compact,stsl_mach_compact) },
- { SH64_COMPACT_INSN_STS_MACL_COMPACT, SEM_FN_NAME (sh64_compact,sts_macl_compact) },
- { SH64_COMPACT_INSN_STSL_MACL_COMPACT, SEM_FN_NAME (sh64_compact,stsl_macl_compact) },
- { SH64_COMPACT_INSN_STS_PR_COMPACT, SEM_FN_NAME (sh64_compact,sts_pr_compact) },
- { SH64_COMPACT_INSN_STSL_PR_COMPACT, SEM_FN_NAME (sh64_compact,stsl_pr_compact) },
- { SH64_COMPACT_INSN_SUB_COMPACT, SEM_FN_NAME (sh64_compact,sub_compact) },
- { SH64_COMPACT_INSN_SUBC_COMPACT, SEM_FN_NAME (sh64_compact,subc_compact) },
- { SH64_COMPACT_INSN_SUBV_COMPACT, SEM_FN_NAME (sh64_compact,subv_compact) },
- { SH64_COMPACT_INSN_SWAPB_COMPACT, SEM_FN_NAME (sh64_compact,swapb_compact) },
- { SH64_COMPACT_INSN_SWAPW_COMPACT, SEM_FN_NAME (sh64_compact,swapw_compact) },
- { SH64_COMPACT_INSN_TASB_COMPACT, SEM_FN_NAME (sh64_compact,tasb_compact) },
- { SH64_COMPACT_INSN_TRAPA_COMPACT, SEM_FN_NAME (sh64_compact,trapa_compact) },
- { SH64_COMPACT_INSN_TST_COMPACT, SEM_FN_NAME (sh64_compact,tst_compact) },
- { SH64_COMPACT_INSN_TSTI_COMPACT, SEM_FN_NAME (sh64_compact,tsti_compact) },
- { SH64_COMPACT_INSN_TSTB_COMPACT, SEM_FN_NAME (sh64_compact,tstb_compact) },
- { SH64_COMPACT_INSN_XOR_COMPACT, SEM_FN_NAME (sh64_compact,xor_compact) },
- { SH64_COMPACT_INSN_XORI_COMPACT, SEM_FN_NAME (sh64_compact,xori_compact) },
- { SH64_COMPACT_INSN_XORB_COMPACT, SEM_FN_NAME (sh64_compact,xorb_compact) },
- { SH64_COMPACT_INSN_XTRCT_COMPACT, SEM_FN_NAME (sh64_compact,xtrct_compact) },
- { 0, 0 }
-};
-
-/* Add the semantic fns to IDESC_TABLE. */
-
-void
-SEM_FN_NAME (sh64_compact,init_idesc_table) (SIM_CPU *current_cpu)
-{
- IDESC *idesc_table = CPU_IDESC (current_cpu);
- const struct sem_fn_desc *sf;
- int mach_num = MACH_NUM (CPU_MACH (current_cpu));
-
- for (sf = &sem_fns[0]; sf->fn != 0; ++sf)
- {
- const CGEN_INSN *insn = idesc_table[sf->index].idata;
- int valid_p = (CGEN_INSN_VIRTUAL_P (insn)
- || CGEN_INSN_MACH_HAS_P (insn, mach_num));
-#if FAST_P
- if (valid_p)
- idesc_table[sf->index].sem_fast = sf->fn;
- else
- idesc_table[sf->index].sem_fast = SEM_FN_NAME (sh64_compact,x_invalid);
-#else
- if (valid_p)
- idesc_table[sf->index].sem_full = sf->fn;
- else
- idesc_table[sf->index].sem_full = SEM_FN_NAME (sh64_compact,x_invalid);
-#endif
- }
-}
-
diff --git a/sim/sh64/sem-media-switch.c b/sim/sh64/sem-media-switch.c
deleted file mode 100644
index 075738ae0ef..00000000000
--- a/sim/sh64/sem-media-switch.c
+++ /dev/null
@@ -1,5558 +0,0 @@
-/* Simulator instruction semantics for sh64.
-
-THIS FILE IS MACHINE GENERATED WITH CGEN.
-
-Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
-
-This file is part of the GNU simulators.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-
-#ifdef DEFINE_LABELS
-
- /* The labels have the case they have because the enum of insn types
- is all uppercase and in the non-stdc case the insn symbol is built
- into the enum name. */
-
- static struct {
- int index;
- void *label;
- } labels[] = {
- { SH64_MEDIA_INSN_X_INVALID, && case_sem_INSN_X_INVALID },
- { SH64_MEDIA_INSN_X_AFTER, && case_sem_INSN_X_AFTER },
- { SH64_MEDIA_INSN_X_BEFORE, && case_sem_INSN_X_BEFORE },
- { SH64_MEDIA_INSN_X_CTI_CHAIN, && case_sem_INSN_X_CTI_CHAIN },
- { SH64_MEDIA_INSN_X_CHAIN, && case_sem_INSN_X_CHAIN },
- { SH64_MEDIA_INSN_X_BEGIN, && case_sem_INSN_X_BEGIN },
- { SH64_MEDIA_INSN_ADD, && case_sem_INSN_ADD },
- { SH64_MEDIA_INSN_ADDL, && case_sem_INSN_ADDL },
- { SH64_MEDIA_INSN_ADDI, && case_sem_INSN_ADDI },
- { SH64_MEDIA_INSN_ADDIL, && case_sem_INSN_ADDIL },
- { SH64_MEDIA_INSN_ADDZL, && case_sem_INSN_ADDZL },
- { SH64_MEDIA_INSN_ALLOCO, && case_sem_INSN_ALLOCO },
- { SH64_MEDIA_INSN_AND, && case_sem_INSN_AND },
- { SH64_MEDIA_INSN_ANDC, && case_sem_INSN_ANDC },
- { SH64_MEDIA_INSN_ANDI, && case_sem_INSN_ANDI },
- { SH64_MEDIA_INSN_BEQ, && case_sem_INSN_BEQ },
- { SH64_MEDIA_INSN_BEQI, && case_sem_INSN_BEQI },
- { SH64_MEDIA_INSN_BGE, && case_sem_INSN_BGE },
- { SH64_MEDIA_INSN_BGEU, && case_sem_INSN_BGEU },
- { SH64_MEDIA_INSN_BGT, && case_sem_INSN_BGT },
- { SH64_MEDIA_INSN_BGTU, && case_sem_INSN_BGTU },
- { SH64_MEDIA_INSN_BLINK, && case_sem_INSN_BLINK },
- { SH64_MEDIA_INSN_BNE, && case_sem_INSN_BNE },
- { SH64_MEDIA_INSN_BNEI, && case_sem_INSN_BNEI },
- { SH64_MEDIA_INSN_BRK, && case_sem_INSN_BRK },
- { SH64_MEDIA_INSN_BYTEREV, && case_sem_INSN_BYTEREV },
- { SH64_MEDIA_INSN_CMPEQ, && case_sem_INSN_CMPEQ },
- { SH64_MEDIA_INSN_CMPGT, && case_sem_INSN_CMPGT },
- { SH64_MEDIA_INSN_CMPGTU, && case_sem_INSN_CMPGTU },
- { SH64_MEDIA_INSN_CMVEQ, && case_sem_INSN_CMVEQ },
- { SH64_MEDIA_INSN_CMVNE, && case_sem_INSN_CMVNE },
- { SH64_MEDIA_INSN_FABSD, && case_sem_INSN_FABSD },
- { SH64_MEDIA_INSN_FABSS, && case_sem_INSN_FABSS },
- { SH64_MEDIA_INSN_FADDD, && case_sem_INSN_FADDD },
- { SH64_MEDIA_INSN_FADDS, && case_sem_INSN_FADDS },
- { SH64_MEDIA_INSN_FCMPEQD, && case_sem_INSN_FCMPEQD },
- { SH64_MEDIA_INSN_FCMPEQS, && case_sem_INSN_FCMPEQS },
- { SH64_MEDIA_INSN_FCMPGED, && case_sem_INSN_FCMPGED },
- { SH64_MEDIA_INSN_FCMPGES, && case_sem_INSN_FCMPGES },
- { SH64_MEDIA_INSN_FCMPGTD, && case_sem_INSN_FCMPGTD },
- { SH64_MEDIA_INSN_FCMPGTS, && case_sem_INSN_FCMPGTS },
- { SH64_MEDIA_INSN_FCMPUND, && case_sem_INSN_FCMPUND },
- { SH64_MEDIA_INSN_FCMPUNS, && case_sem_INSN_FCMPUNS },
- { SH64_MEDIA_INSN_FCNVDS, && case_sem_INSN_FCNVDS },
- { SH64_MEDIA_INSN_FCNVSD, && case_sem_INSN_FCNVSD },
- { SH64_MEDIA_INSN_FDIVD, && case_sem_INSN_FDIVD },
- { SH64_MEDIA_INSN_FDIVS, && case_sem_INSN_FDIVS },
- { SH64_MEDIA_INSN_FGETSCR, && case_sem_INSN_FGETSCR },
- { SH64_MEDIA_INSN_FIPRS, && case_sem_INSN_FIPRS },
- { SH64_MEDIA_INSN_FLDD, && case_sem_INSN_FLDD },
- { SH64_MEDIA_INSN_FLDP, && case_sem_INSN_FLDP },
- { SH64_MEDIA_INSN_FLDS, && case_sem_INSN_FLDS },
- { SH64_MEDIA_INSN_FLDXD, && case_sem_INSN_FLDXD },
- { SH64_MEDIA_INSN_FLDXP, && case_sem_INSN_FLDXP },
- { SH64_MEDIA_INSN_FLDXS, && case_sem_INSN_FLDXS },
- { SH64_MEDIA_INSN_FLOATLD, && case_sem_INSN_FLOATLD },
- { SH64_MEDIA_INSN_FLOATLS, && case_sem_INSN_FLOATLS },
- { SH64_MEDIA_INSN_FLOATQD, && case_sem_INSN_FLOATQD },
- { SH64_MEDIA_INSN_FLOATQS, && case_sem_INSN_FLOATQS },
- { SH64_MEDIA_INSN_FMACS, && case_sem_INSN_FMACS },
- { SH64_MEDIA_INSN_FMOVD, && case_sem_INSN_FMOVD },
- { SH64_MEDIA_INSN_FMOVDQ, && case_sem_INSN_FMOVDQ },
- { SH64_MEDIA_INSN_FMOVLS, && case_sem_INSN_FMOVLS },
- { SH64_MEDIA_INSN_FMOVQD, && case_sem_INSN_FMOVQD },
- { SH64_MEDIA_INSN_FMOVS, && case_sem_INSN_FMOVS },
- { SH64_MEDIA_INSN_FMOVSL, && case_sem_INSN_FMOVSL },
- { SH64_MEDIA_INSN_FMULD, && case_sem_INSN_FMULD },
- { SH64_MEDIA_INSN_FMULS, && case_sem_INSN_FMULS },
- { SH64_MEDIA_INSN_FNEGD, && case_sem_INSN_FNEGD },
- { SH64_MEDIA_INSN_FNEGS, && case_sem_INSN_FNEGS },
- { SH64_MEDIA_INSN_FPUTSCR, && case_sem_INSN_FPUTSCR },
- { SH64_MEDIA_INSN_FSQRTD, && case_sem_INSN_FSQRTD },
- { SH64_MEDIA_INSN_FSQRTS, && case_sem_INSN_FSQRTS },
- { SH64_MEDIA_INSN_FSTD, && case_sem_INSN_FSTD },
- { SH64_MEDIA_INSN_FSTP, && case_sem_INSN_FSTP },
- { SH64_MEDIA_INSN_FSTS, && case_sem_INSN_FSTS },
- { SH64_MEDIA_INSN_FSTXD, && case_sem_INSN_FSTXD },
- { SH64_MEDIA_INSN_FSTXP, && case_sem_INSN_FSTXP },
- { SH64_MEDIA_INSN_FSTXS, && case_sem_INSN_FSTXS },
- { SH64_MEDIA_INSN_FSUBD, && case_sem_INSN_FSUBD },
- { SH64_MEDIA_INSN_FSUBS, && case_sem_INSN_FSUBS },
- { SH64_MEDIA_INSN_FTRCDL, && case_sem_INSN_FTRCDL },
- { SH64_MEDIA_INSN_FTRCSL, && case_sem_INSN_FTRCSL },
- { SH64_MEDIA_INSN_FTRCDQ, && case_sem_INSN_FTRCDQ },
- { SH64_MEDIA_INSN_FTRCSQ, && case_sem_INSN_FTRCSQ },
- { SH64_MEDIA_INSN_FTRVS, && case_sem_INSN_FTRVS },
- { SH64_MEDIA_INSN_GETCFG, && case_sem_INSN_GETCFG },
- { SH64_MEDIA_INSN_GETCON, && case_sem_INSN_GETCON },
- { SH64_MEDIA_INSN_GETTR, && case_sem_INSN_GETTR },
- { SH64_MEDIA_INSN_ICBI, && case_sem_INSN_ICBI },
- { SH64_MEDIA_INSN_LDB, && case_sem_INSN_LDB },
- { SH64_MEDIA_INSN_LDL, && case_sem_INSN_LDL },
- { SH64_MEDIA_INSN_LDQ, && case_sem_INSN_LDQ },
- { SH64_MEDIA_INSN_LDUB, && case_sem_INSN_LDUB },
- { SH64_MEDIA_INSN_LDUW, && case_sem_INSN_LDUW },
- { SH64_MEDIA_INSN_LDW, && case_sem_INSN_LDW },
- { SH64_MEDIA_INSN_LDHIL, && case_sem_INSN_LDHIL },
- { SH64_MEDIA_INSN_LDHIQ, && case_sem_INSN_LDHIQ },
- { SH64_MEDIA_INSN_LDLOL, && case_sem_INSN_LDLOL },
- { SH64_MEDIA_INSN_LDLOQ, && case_sem_INSN_LDLOQ },
- { SH64_MEDIA_INSN_LDXB, && case_sem_INSN_LDXB },
- { SH64_MEDIA_INSN_LDXL, && case_sem_INSN_LDXL },
- { SH64_MEDIA_INSN_LDXQ, && case_sem_INSN_LDXQ },
- { SH64_MEDIA_INSN_LDXUB, && case_sem_INSN_LDXUB },
- { SH64_MEDIA_INSN_LDXUW, && case_sem_INSN_LDXUW },
- { SH64_MEDIA_INSN_LDXW, && case_sem_INSN_LDXW },
- { SH64_MEDIA_INSN_MABSL, && case_sem_INSN_MABSL },
- { SH64_MEDIA_INSN_MABSW, && case_sem_INSN_MABSW },
- { SH64_MEDIA_INSN_MADDL, && case_sem_INSN_MADDL },
- { SH64_MEDIA_INSN_MADDW, && case_sem_INSN_MADDW },
- { SH64_MEDIA_INSN_MADDSL, && case_sem_INSN_MADDSL },
- { SH64_MEDIA_INSN_MADDSUB, && case_sem_INSN_MADDSUB },
- { SH64_MEDIA_INSN_MADDSW, && case_sem_INSN_MADDSW },
- { SH64_MEDIA_INSN_MCMPEQB, && case_sem_INSN_MCMPEQB },
- { SH64_MEDIA_INSN_MCMPEQL, && case_sem_INSN_MCMPEQL },
- { SH64_MEDIA_INSN_MCMPEQW, && case_sem_INSN_MCMPEQW },
- { SH64_MEDIA_INSN_MCMPGTL, && case_sem_INSN_MCMPGTL },
- { SH64_MEDIA_INSN_MCMPGTUB, && case_sem_INSN_MCMPGTUB },
- { SH64_MEDIA_INSN_MCMPGTW, && case_sem_INSN_MCMPGTW },
- { SH64_MEDIA_INSN_MCMV, && case_sem_INSN_MCMV },
- { SH64_MEDIA_INSN_MCNVSLW, && case_sem_INSN_MCNVSLW },
- { SH64_MEDIA_INSN_MCNVSWB, && case_sem_INSN_MCNVSWB },
- { SH64_MEDIA_INSN_MCNVSWUB, && case_sem_INSN_MCNVSWUB },
- { SH64_MEDIA_INSN_MEXTR1, && case_sem_INSN_MEXTR1 },
- { SH64_MEDIA_INSN_MEXTR2, && case_sem_INSN_MEXTR2 },
- { SH64_MEDIA_INSN_MEXTR3, && case_sem_INSN_MEXTR3 },
- { SH64_MEDIA_INSN_MEXTR4, && case_sem_INSN_MEXTR4 },
- { SH64_MEDIA_INSN_MEXTR5, && case_sem_INSN_MEXTR5 },
- { SH64_MEDIA_INSN_MEXTR6, && case_sem_INSN_MEXTR6 },
- { SH64_MEDIA_INSN_MEXTR7, && case_sem_INSN_MEXTR7 },
- { SH64_MEDIA_INSN_MMACFXWL, && case_sem_INSN_MMACFXWL },
- { SH64_MEDIA_INSN_MMACNFX_WL, && case_sem_INSN_MMACNFX_WL },
- { SH64_MEDIA_INSN_MMULL, && case_sem_INSN_MMULL },
- { SH64_MEDIA_INSN_MMULW, && case_sem_INSN_MMULW },
- { SH64_MEDIA_INSN_MMULFXL, && case_sem_INSN_MMULFXL },
- { SH64_MEDIA_INSN_MMULFXW, && case_sem_INSN_MMULFXW },
- { SH64_MEDIA_INSN_MMULFXRPW, && case_sem_INSN_MMULFXRPW },
- { SH64_MEDIA_INSN_MMULHIWL, && case_sem_INSN_MMULHIWL },
- { SH64_MEDIA_INSN_MMULLOWL, && case_sem_INSN_MMULLOWL },
- { SH64_MEDIA_INSN_MMULSUMWQ, && case_sem_INSN_MMULSUMWQ },
- { SH64_MEDIA_INSN_MOVI, && case_sem_INSN_MOVI },
- { SH64_MEDIA_INSN_MPERMW, && case_sem_INSN_MPERMW },
- { SH64_MEDIA_INSN_MSADUBQ, && case_sem_INSN_MSADUBQ },
- { SH64_MEDIA_INSN_MSHALDSL, && case_sem_INSN_MSHALDSL },
- { SH64_MEDIA_INSN_MSHALDSW, && case_sem_INSN_MSHALDSW },
- { SH64_MEDIA_INSN_MSHARDL, && case_sem_INSN_MSHARDL },
- { SH64_MEDIA_INSN_MSHARDW, && case_sem_INSN_MSHARDW },
- { SH64_MEDIA_INSN_MSHARDSQ, && case_sem_INSN_MSHARDSQ },
- { SH64_MEDIA_INSN_MSHFHIB, && case_sem_INSN_MSHFHIB },
- { SH64_MEDIA_INSN_MSHFHIL, && case_sem_INSN_MSHFHIL },
- { SH64_MEDIA_INSN_MSHFHIW, && case_sem_INSN_MSHFHIW },
- { SH64_MEDIA_INSN_MSHFLOB, && case_sem_INSN_MSHFLOB },
- { SH64_MEDIA_INSN_MSHFLOL, && case_sem_INSN_MSHFLOL },
- { SH64_MEDIA_INSN_MSHFLOW, && case_sem_INSN_MSHFLOW },
- { SH64_MEDIA_INSN_MSHLLDL, && case_sem_INSN_MSHLLDL },
- { SH64_MEDIA_INSN_MSHLLDW, && case_sem_INSN_MSHLLDW },
- { SH64_MEDIA_INSN_MSHLRDL, && case_sem_INSN_MSHLRDL },
- { SH64_MEDIA_INSN_MSHLRDW, && case_sem_INSN_MSHLRDW },
- { SH64_MEDIA_INSN_MSUBL, && case_sem_INSN_MSUBL },
- { SH64_MEDIA_INSN_MSUBW, && case_sem_INSN_MSUBW },
- { SH64_MEDIA_INSN_MSUBSL, && case_sem_INSN_MSUBSL },
- { SH64_MEDIA_INSN_MSUBSUB, && case_sem_INSN_MSUBSUB },
- { SH64_MEDIA_INSN_MSUBSW, && case_sem_INSN_MSUBSW },
- { SH64_MEDIA_INSN_MULSL, && case_sem_INSN_MULSL },
- { SH64_MEDIA_INSN_MULUL, && case_sem_INSN_MULUL },
- { SH64_MEDIA_INSN_NOP, && case_sem_INSN_NOP },
- { SH64_MEDIA_INSN_NSB, && case_sem_INSN_NSB },
- { SH64_MEDIA_INSN_OCBI, && case_sem_INSN_OCBI },
- { SH64_MEDIA_INSN_OCBP, && case_sem_INSN_OCBP },
- { SH64_MEDIA_INSN_OCBWB, && case_sem_INSN_OCBWB },
- { SH64_MEDIA_INSN_OR, && case_sem_INSN_OR },
- { SH64_MEDIA_INSN_ORI, && case_sem_INSN_ORI },
- { SH64_MEDIA_INSN_PREFI, && case_sem_INSN_PREFI },
- { SH64_MEDIA_INSN_PTA, && case_sem_INSN_PTA },
- { SH64_MEDIA_INSN_PTABS, && case_sem_INSN_PTABS },
- { SH64_MEDIA_INSN_PTB, && case_sem_INSN_PTB },
- { SH64_MEDIA_INSN_PTREL, && case_sem_INSN_PTREL },
- { SH64_MEDIA_INSN_PUTCFG, && case_sem_INSN_PUTCFG },
- { SH64_MEDIA_INSN_PUTCON, && case_sem_INSN_PUTCON },
- { SH64_MEDIA_INSN_RTE, && case_sem_INSN_RTE },
- { SH64_MEDIA_INSN_SHARD, && case_sem_INSN_SHARD },
- { SH64_MEDIA_INSN_SHARDL, && case_sem_INSN_SHARDL },
- { SH64_MEDIA_INSN_SHARI, && case_sem_INSN_SHARI },
- { SH64_MEDIA_INSN_SHARIL, && case_sem_INSN_SHARIL },
- { SH64_MEDIA_INSN_SHLLD, && case_sem_INSN_SHLLD },
- { SH64_MEDIA_INSN_SHLLDL, && case_sem_INSN_SHLLDL },
- { SH64_MEDIA_INSN_SHLLI, && case_sem_INSN_SHLLI },
- { SH64_MEDIA_INSN_SHLLIL, && case_sem_INSN_SHLLIL },
- { SH64_MEDIA_INSN_SHLRD, && case_sem_INSN_SHLRD },
- { SH64_MEDIA_INSN_SHLRDL, && case_sem_INSN_SHLRDL },
- { SH64_MEDIA_INSN_SHLRI, && case_sem_INSN_SHLRI },
- { SH64_MEDIA_INSN_SHLRIL, && case_sem_INSN_SHLRIL },
- { SH64_MEDIA_INSN_SHORI, && case_sem_INSN_SHORI },
- { SH64_MEDIA_INSN_SLEEP, && case_sem_INSN_SLEEP },
- { SH64_MEDIA_INSN_STB, && case_sem_INSN_STB },
- { SH64_MEDIA_INSN_STL, && case_sem_INSN_STL },
- { SH64_MEDIA_INSN_STQ, && case_sem_INSN_STQ },
- { SH64_MEDIA_INSN_STW, && case_sem_INSN_STW },
- { SH64_MEDIA_INSN_STHIL, && case_sem_INSN_STHIL },
- { SH64_MEDIA_INSN_STHIQ, && case_sem_INSN_STHIQ },
- { SH64_MEDIA_INSN_STLOL, && case_sem_INSN_STLOL },
- { SH64_MEDIA_INSN_STLOQ, && case_sem_INSN_STLOQ },
- { SH64_MEDIA_INSN_STXB, && case_sem_INSN_STXB },
- { SH64_MEDIA_INSN_STXL, && case_sem_INSN_STXL },
- { SH64_MEDIA_INSN_STXQ, && case_sem_INSN_STXQ },
- { SH64_MEDIA_INSN_STXW, && case_sem_INSN_STXW },
- { SH64_MEDIA_INSN_SUB, && case_sem_INSN_SUB },
- { SH64_MEDIA_INSN_SUBL, && case_sem_INSN_SUBL },
- { SH64_MEDIA_INSN_SWAPQ, && case_sem_INSN_SWAPQ },
- { SH64_MEDIA_INSN_SYNCI, && case_sem_INSN_SYNCI },
- { SH64_MEDIA_INSN_SYNCO, && case_sem_INSN_SYNCO },
- { SH64_MEDIA_INSN_TRAPA, && case_sem_INSN_TRAPA },
- { SH64_MEDIA_INSN_XOR, && case_sem_INSN_XOR },
- { SH64_MEDIA_INSN_XORI, && case_sem_INSN_XORI },
- { 0, 0 }
- };
- int i;
-
- for (i = 0; labels[i].label != 0; ++i)
- {
-#if FAST_P
- CPU_IDESC (current_cpu) [labels[i].index].sem_fast_lab = labels[i].label;
-#else
- CPU_IDESC (current_cpu) [labels[i].index].sem_full_lab = labels[i].label;
-#endif
- }
-
-#undef DEFINE_LABELS
-#endif /* DEFINE_LABELS */
-
-#ifdef DEFINE_SWITCH
-
-/* If hyper-fast [well not unnecessarily slow] execution is selected, turn
- off frills like tracing and profiling. */
-/* FIXME: A better way would be to have TRACE_RESULT check for something
- that can cause it to be optimized out. Another way would be to emit
- special handlers into the instruction "stream". */
-
-#if FAST_P
-#undef TRACE_RESULT
-#define TRACE_RESULT(cpu, abuf, name, type, val)
-#endif
-
-#undef GET_ATTR
-#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-#define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_##attr)
-#else
-#define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_/**/attr)
-#endif
-
-{
-
-#if WITH_SCACHE_PBB
-
-/* Branch to next handler without going around main loop. */
-#define NEXT(vpc) goto * SEM_ARGBUF (vpc) -> semantic.sem_case
-SWITCH (sem, SEM_ARGBUF (vpc) -> semantic.sem_case)
-
-#else /* ! WITH_SCACHE_PBB */
-
-#define NEXT(vpc) BREAK (sem)
-#ifdef __GNUC__
-#if FAST_P
- SWITCH (sem, SEM_ARGBUF (sc) -> idesc->sem_fast_lab)
-#else
- SWITCH (sem, SEM_ARGBUF (sc) -> idesc->sem_full_lab)
-#endif
-#else
- SWITCH (sem, SEM_ARGBUF (sc) -> idesc->num)
-#endif
-
-#endif /* ! WITH_SCACHE_PBB */
-
- {
-
- CASE (sem, INSN_X_INVALID) : /* --invalid-- */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
- {
- /* Update the recorded pc in the cpu state struct.
- Only necessary for WITH_SCACHE case, but to avoid the
- conditional compilation .... */
- SET_H_PC (pc);
- /* Virtual insns have zero size. Overwrite vpc with address of next insn
- using the default-insn-bitsize spec. When executing insns in parallel
- we may want to queue the fault and continue execution. */
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
- vpc = sim_engine_invalid_insn (current_cpu, pc, vpc);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_X_AFTER) : /* --after-- */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
- {
-#if WITH_SCACHE_PBB_SH64_MEDIA
- sh64_media_pbb_after (current_cpu, sem_arg);
-#endif
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_X_BEFORE) : /* --before-- */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
- {
-#if WITH_SCACHE_PBB_SH64_MEDIA
- sh64_media_pbb_before (current_cpu, sem_arg);
-#endif
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_X_CTI_CHAIN) : /* --cti-chain-- */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
- {
-#if WITH_SCACHE_PBB_SH64_MEDIA
-#ifdef DEFINE_SWITCH
- vpc = sh64_media_pbb_cti_chain (current_cpu, sem_arg,
- pbb_br_type, pbb_br_npc);
- BREAK (sem);
-#else
- /* FIXME: Allow provision of explicit ifmt spec in insn spec. */
- vpc = sh64_media_pbb_cti_chain (current_cpu, sem_arg,
- CPU_PBB_BR_TYPE (current_cpu),
- CPU_PBB_BR_NPC (current_cpu));
-#endif
-#endif
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_X_CHAIN) : /* --chain-- */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
- {
-#if WITH_SCACHE_PBB_SH64_MEDIA
- vpc = sh64_media_pbb_chain (current_cpu, sem_arg);
-#ifdef DEFINE_SWITCH
- BREAK (sem);
-#endif
-#endif
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_X_BEGIN) : /* --begin-- */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
- {
-#if WITH_SCACHE_PBB_SH64_MEDIA
-#if defined DEFINE_SWITCH || defined FAST_P
- /* In the switch case FAST_P is a constant, allowing several optimizations
- in any called inline functions. */
- vpc = sh64_media_pbb_begin (current_cpu, FAST_P);
-#else
-#if 0 /* cgen engine can't handle dynamic fast/full switching yet. */
- vpc = sh64_media_pbb_begin (current_cpu, STATE_RUN_FAST_P (CPU_STATE (current_cpu)));
-#else
- vpc = sh64_media_pbb_begin (current_cpu, 0);
-#endif
-#endif
-#endif
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_ADD) : /* add $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_ADDL) : /* add.l $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ADDSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), SUBWORDDISI (GET_H_GR (FLD (f_right)), 1));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_ADDI) : /* addi $rm, $disp10, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ADDDI (GET_H_GR (FLD (f_left)), EXTSIDI (FLD (f_disp10)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_ADDIL) : /* addi.l $rm, $disp10, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = EXTSIDI (ADDSI (EXTSISI (FLD (f_disp10)), SUBWORDDISI (GET_H_GR (FLD (f_left)), 1)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_ADDZL) : /* addz.l $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ZEXTSIDI (ADDSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), SUBWORDDISI (GET_H_GR (FLD (f_right)), 1)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_ALLOCO) : /* alloco $rm, $disp6x32 */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_AND) : /* and $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ANDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_ANDC) : /* andc $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ANDDI (GET_H_GR (FLD (f_left)), INVDI (GET_H_GR (FLD (f_right))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_ANDI) : /* andi $rm, $disp10, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ANDDI (GET_H_GR (FLD (f_left)), EXTSIDI (FLD (f_disp10)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_BEQ) : /* beq$likely $rm, $rn, $tra */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_beq.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-if (EQDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)))) {
- {
- UDI opval = CPU (h_tr[FLD (f_tra)]);
- SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
- written |= (1 << 3);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-
- abuf->written = written;
- SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_BEQI) : /* beqi$likely $rm, $imm6, $tra */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_beqi.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-if (EQDI (GET_H_GR (FLD (f_left)), EXTSIDI (FLD (f_imm6)))) {
- {
- UDI opval = CPU (h_tr[FLD (f_tra)]);
- SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
- written |= (1 << 3);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-
- abuf->written = written;
- SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_BGE) : /* bge$likely $rm, $rn, $tra */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_beq.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-if (GEDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)))) {
- {
- UDI opval = CPU (h_tr[FLD (f_tra)]);
- SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
- written |= (1 << 3);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-
- abuf->written = written;
- SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_BGEU) : /* bgeu$likely $rm, $rn, $tra */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_beq.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-if (GEUDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)))) {
- {
- UDI opval = CPU (h_tr[FLD (f_tra)]);
- SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
- written |= (1 << 3);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-
- abuf->written = written;
- SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_BGT) : /* bgt$likely $rm, $rn, $tra */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_beq.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-if (GTDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)))) {
- {
- UDI opval = CPU (h_tr[FLD (f_tra)]);
- SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
- written |= (1 << 3);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-
- abuf->written = written;
- SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_BGTU) : /* bgtu$likely $rm, $rn, $tra */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_beq.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-if (GTUDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)))) {
- {
- UDI opval = CPU (h_tr[FLD (f_tra)]);
- SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
- written |= (1 << 3);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-
- abuf->written = written;
- SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_BLINK) : /* blink $trb, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_blink.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- {
- DI opval = ORDI (ADDDI (pc, 4), 1);
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
- {
- UDI opval = CPU (h_tr[FLD (f_trb)]);
- SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-
- SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_BNE) : /* bne$likely $rm, $rn, $tra */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_beq.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-if (NEDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)))) {
- {
- UDI opval = CPU (h_tr[FLD (f_tra)]);
- SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
- written |= (1 << 3);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-
- abuf->written = written;
- SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_BNEI) : /* bnei$likely $rm, $imm6, $tra */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_beqi.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-if (NEDI (GET_H_GR (FLD (f_left)), EXTSIDI (FLD (f_imm6)))) {
- {
- UDI opval = CPU (h_tr[FLD (f_tra)]);
- SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
- written |= (1 << 3);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-
- abuf->written = written;
- SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_BRK) : /* brk */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-sh64_break (current_cpu, pc);
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_BYTEREV) : /* byterev $rm, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_xori.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- DI tmp_source;
- DI tmp_result;
- tmp_source = GET_H_GR (FLD (f_left));
- tmp_result = 0;
-{
- tmp_result = ORDI (SLLDI (tmp_result, 8), ANDDI (tmp_source, 255));
- tmp_source = SRLDI (tmp_source, 8);
-}
-{
- tmp_result = ORDI (SLLDI (tmp_result, 8), ANDDI (tmp_source, 255));
- tmp_source = SRLDI (tmp_source, 8);
-}
-{
- tmp_result = ORDI (SLLDI (tmp_result, 8), ANDDI (tmp_source, 255));
- tmp_source = SRLDI (tmp_source, 8);
-}
-{
- tmp_result = ORDI (SLLDI (tmp_result, 8), ANDDI (tmp_source, 255));
- tmp_source = SRLDI (tmp_source, 8);
-}
-{
- tmp_result = ORDI (SLLDI (tmp_result, 8), ANDDI (tmp_source, 255));
- tmp_source = SRLDI (tmp_source, 8);
-}
-{
- tmp_result = ORDI (SLLDI (tmp_result, 8), ANDDI (tmp_source, 255));
- tmp_source = SRLDI (tmp_source, 8);
-}
-{
- tmp_result = ORDI (SLLDI (tmp_result, 8), ANDDI (tmp_source, 255));
- tmp_source = SRLDI (tmp_source, 8);
-}
-{
- tmp_result = ORDI (SLLDI (tmp_result, 8), ANDDI (tmp_source, 255));
- tmp_source = SRLDI (tmp_source, 8);
-}
- {
- DI opval = tmp_result;
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_CMPEQ) : /* cmpeq $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ((EQDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)))) ? (1) : (0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_CMPGT) : /* cmpgt $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ((GTDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)))) ? (1) : (0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_CMPGTU) : /* cmpgtu $rm,$rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ((GTUDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)))) ? (1) : (0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_CMVEQ) : /* cmveq $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-if (EQDI (GET_H_GR (FLD (f_left)), 0)) {
- {
- DI opval = GET_H_GR (FLD (f_right));
- SET_H_GR (FLD (f_dest), opval);
- written |= (1 << 2);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- abuf->written = written;
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_CMVNE) : /* cmvne $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-if (NEDI (GET_H_GR (FLD (f_left)), 0)) {
- {
- DI opval = GET_H_GR (FLD (f_right));
- SET_H_GR (FLD (f_dest), opval);
- written |= (1 << 2);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- abuf->written = written;
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FABSD) : /* fabs.d $drgh, $drf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = sh64_fabsd (current_cpu, GET_H_DR (FLD (f_left_right)));
- SET_H_DR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "dr", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FABSS) : /* fabs.s $frgh, $frf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = sh64_fabss (current_cpu, CPU (h_fr[FLD (f_left_right)]));
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FADDD) : /* fadd.d $drg, $drh, $drf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = sh64_faddd (current_cpu, GET_H_DR (FLD (f_left)), GET_H_DR (FLD (f_right)));
- SET_H_DR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "dr", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FADDS) : /* fadd.s $frg, $frh, $frf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = sh64_fadds (current_cpu, CPU (h_fr[FLD (f_left)]), CPU (h_fr[FLD (f_right)]));
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FCMPEQD) : /* fcmpeq.d $drg, $drh, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ZEXTBIDI (sh64_fcmpeqd (current_cpu, GET_H_DR (FLD (f_left)), GET_H_DR (FLD (f_right))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FCMPEQS) : /* fcmpeq.s $frg, $frh, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ZEXTBIDI (sh64_fcmpeqs (current_cpu, CPU (h_fr[FLD (f_left)]), CPU (h_fr[FLD (f_right)])));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FCMPGED) : /* fcmpge.d $drg, $drh, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ZEXTBIDI (sh64_fcmpged (current_cpu, GET_H_DR (FLD (f_left)), GET_H_DR (FLD (f_right))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FCMPGES) : /* fcmpge.s $frg, $frh, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ZEXTBIDI (sh64_fcmpges (current_cpu, CPU (h_fr[FLD (f_left)]), CPU (h_fr[FLD (f_right)])));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FCMPGTD) : /* fcmpgt.d $drg, $drh, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ZEXTBIDI (sh64_fcmpgtd (current_cpu, GET_H_DR (FLD (f_left)), GET_H_DR (FLD (f_right))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FCMPGTS) : /* fcmpgt.s $frg, $frh, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ZEXTBIDI (sh64_fcmpgts (current_cpu, CPU (h_fr[FLD (f_left)]), CPU (h_fr[FLD (f_right)])));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FCMPUND) : /* fcmpun.d $drg, $drh, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ZEXTBIDI (sh64_fcmpund (current_cpu, GET_H_DR (FLD (f_left)), GET_H_DR (FLD (f_right))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FCMPUNS) : /* fcmpun.s $frg, $frh, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ZEXTBIDI (sh64_fcmpuns (current_cpu, CPU (h_fr[FLD (f_left)]), CPU (h_fr[FLD (f_right)])));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FCNVDS) : /* fcnv.ds $drgh, $frf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = sh64_fcnvds (current_cpu, GET_H_DR (FLD (f_left_right)));
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FCNVSD) : /* fcnv.sd $frgh, $drf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = sh64_fcnvsd (current_cpu, CPU (h_fr[FLD (f_left_right)]));
- SET_H_DR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "dr", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FDIVD) : /* fdiv.d $drg, $drh, $drf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = sh64_fdivd (current_cpu, GET_H_DR (FLD (f_left)), GET_H_DR (FLD (f_right)));
- SET_H_DR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "dr", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FDIVS) : /* fdiv.s $frg, $frh, $frf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = sh64_fdivs (current_cpu, CPU (h_fr[FLD (f_left)]), CPU (h_fr[FLD (f_right)]));
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FGETSCR) : /* fgetscr $frf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FIPRS) : /* fipr.s $fvg, $fvh, $frf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- UQI tmp_g;
- UQI tmp_h;
- SF tmp_temp;
- tmp_g = FLD (f_left);
- tmp_h = FLD (f_right);
- tmp_temp = sh64_fmuls (current_cpu, CPU (h_fr[tmp_g]), CPU (h_fr[tmp_h]));
- tmp_temp = sh64_fadds (current_cpu, tmp_temp, sh64_fmuls (current_cpu, CPU (h_fr[ADDQI (tmp_g, 1)]), CPU (h_fr[ADDQI (tmp_h, 1)])));
- tmp_temp = sh64_fadds (current_cpu, tmp_temp, sh64_fmuls (current_cpu, CPU (h_fr[ADDQI (tmp_g, 2)]), CPU (h_fr[ADDQI (tmp_h, 2)])));
- tmp_temp = sh64_fadds (current_cpu, tmp_temp, sh64_fmuls (current_cpu, CPU (h_fr[ADDQI (tmp_g, 3)]), CPU (h_fr[ADDQI (tmp_h, 3)])));
- {
- SF opval = tmp_temp;
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FLDD) : /* fld.d $rm, $disp10x8, $drf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_fldd.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = GETMEMDF (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), FLD (f_disp10x8)));
- SET_H_DR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "dr", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FLDP) : /* fld.p $rm, $disp10x8, $fpf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_fldd.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_f;
- tmp_f = FLD (f_dest);
- {
- SF opval = GETMEMSF (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), FLD (f_disp10x8)));
- CPU (h_fr[tmp_f]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
- {
- SF opval = GETMEMSF (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), ADDSI (FLD (f_disp10x8), 4)));
- CPU (h_fr[ADDQI (tmp_f, 1)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FLDS) : /* fld.s $rm, $disp10x4, $frf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_flds.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = GETMEMSF (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), FLD (f_disp10x4)));
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FLDXD) : /* fldx.d $rm, $rn, $drf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = GETMEMDF (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right))));
- SET_H_DR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "dr", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FLDXP) : /* fldx.p $rm, $rn, $fpf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_f;
- tmp_f = FLD (f_dest);
- {
- SF opval = GETMEMSF (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right))));
- CPU (h_fr[tmp_f]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
- {
- SF opval = GETMEMSF (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), ADDDI (GET_H_GR (FLD (f_right)), 4)));
- CPU (h_fr[ADDQI (tmp_f, 1)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FLDXS) : /* fldx.s $rm, $rn, $frf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = GETMEMSF (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right))));
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FLOATLD) : /* float.ld $frgh, $drf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = sh64_floatld (current_cpu, CPU (h_fr[FLD (f_left_right)]));
- SET_H_DR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "dr", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FLOATLS) : /* float.ls $frgh, $frf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = sh64_floatls (current_cpu, CPU (h_fr[FLD (f_left_right)]));
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FLOATQD) : /* float.qd $drgh, $drf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = sh64_floatqd (current_cpu, GET_H_DR (FLD (f_left_right)));
- SET_H_DR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "dr", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FLOATQS) : /* float.qs $drgh, $frf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = sh64_floatqs (current_cpu, GET_H_DR (FLD (f_left_right)));
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FMACS) : /* fmac.s $frg, $frh, $frf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = sh64_fadds (current_cpu, CPU (h_fr[FLD (f_dest)]), sh64_fmuls (current_cpu, CPU (h_fr[FLD (f_left)]), CPU (h_fr[FLD (f_right)])));
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FMOVD) : /* fmov.d $drgh, $drf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = GET_H_DR (FLD (f_left_right));
- SET_H_DR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "dr", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FMOVDQ) : /* fmov.dq $drgh, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = SUBWORDDFDI (GET_H_DR (FLD (f_left_right)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FMOVLS) : /* fmov.ls $rm, $frf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_xori.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = SUBWORDSISF (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1));
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FMOVQD) : /* fmov.qd $rm, $drf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_xori.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = SUBWORDDIDF (GET_H_GR (FLD (f_left)));
- SET_H_DR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "dr", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FMOVS) : /* fmov.s $frgh, $frf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = CPU (h_fr[FLD (f_left_right)]);
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FMOVSL) : /* fmov.sl $frgh, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = EXTSIDI (SUBWORDSFSI (CPU (h_fr[FLD (f_left_right)])));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FMULD) : /* fmul.d $drg, $drh, $drf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = sh64_fmuld (current_cpu, GET_H_DR (FLD (f_left)), GET_H_DR (FLD (f_right)));
- SET_H_DR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "dr", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FMULS) : /* fmul.s $frg, $frh, $frf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = sh64_fmuls (current_cpu, CPU (h_fr[FLD (f_left)]), CPU (h_fr[FLD (f_right)]));
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FNEGD) : /* fneg.d $drgh, $drf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = sh64_fnegd (current_cpu, GET_H_DR (FLD (f_left_right)));
- SET_H_DR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "dr", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FNEGS) : /* fneg.s $frgh, $frf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = sh64_fnegs (current_cpu, CPU (h_fr[FLD (f_left_right)]));
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FPUTSCR) : /* fputscr $frgh */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FSQRTD) : /* fsqrt.d $drgh, $drf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = sh64_fsqrtd (current_cpu, GET_H_DR (FLD (f_left_right)));
- SET_H_DR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "dr", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FSQRTS) : /* fsqrt.s $frgh, $frf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = sh64_fsqrts (current_cpu, CPU (h_fr[FLD (f_left_right)]));
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FSTD) : /* fst.d $rm, $disp10x8, $drf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_fldd.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = GET_H_DR (FLD (f_dest));
- SETMEMDF (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), FLD (f_disp10x8)), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FSTP) : /* fst.p $rm, $disp10x8, $fpf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_fldd.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_f;
- tmp_f = FLD (f_dest);
- {
- SF opval = CPU (h_fr[tmp_f]);
- SETMEMSF (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), FLD (f_disp10x8)), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
- {
- SF opval = CPU (h_fr[ADDQI (tmp_f, 1)]);
- SETMEMSF (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), ADDSI (FLD (f_disp10x8), 4)), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FSTS) : /* fst.s $rm, $disp10x4, $frf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_flds.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = CPU (h_fr[FLD (f_dest)]);
- SETMEMSF (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), FLD (f_disp10x4)), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FSTXD) : /* fstx.d $rm, $rn, $drf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = GET_H_DR (FLD (f_dest));
- SETMEMDF (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right))), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FSTXP) : /* fstx.p $rm, $rn, $fpf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_f;
- tmp_f = FLD (f_dest);
- {
- SF opval = CPU (h_fr[tmp_f]);
- SETMEMSF (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right))), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
- {
- SF opval = CPU (h_fr[ADDQI (tmp_f, 1)]);
- SETMEMSF (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), ADDDI (GET_H_GR (FLD (f_right)), 4)), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FSTXS) : /* fstx.s $rm, $rn, $frf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = CPU (h_fr[FLD (f_dest)]);
- SETMEMSF (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right))), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FSUBD) : /* fsub.d $drg, $drh, $drf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = sh64_fsubd (current_cpu, GET_H_DR (FLD (f_left)), GET_H_DR (FLD (f_right)));
- SET_H_DR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "dr", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FSUBS) : /* fsub.s $frg, $frh, $frf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = sh64_fsubs (current_cpu, CPU (h_fr[FLD (f_left)]), CPU (h_fr[FLD (f_right)]));
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FTRCDL) : /* ftrc.dl $drgh, $frf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = sh64_ftrcdl (current_cpu, GET_H_DR (FLD (f_left_right)));
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FTRCSL) : /* ftrc.sl $frgh, $frf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = sh64_ftrcsl (current_cpu, CPU (h_fr[FLD (f_left_right)]));
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FTRCDQ) : /* ftrc.dq $drgh, $drf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = sh64_ftrcdq (current_cpu, GET_H_DR (FLD (f_left_right)));
- SET_H_DR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "dr", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FTRCSQ) : /* ftrc.sq $frgh, $drf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = sh64_ftrcsq (current_cpu, CPU (h_fr[FLD (f_left_right)]));
- SET_H_DR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "dr", 'f', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_FTRVS) : /* ftrv.s $mtrxg, $fvh, $fvf */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-sh64_ftrvs (current_cpu, FLD (f_left), FLD (f_right), FLD (f_dest));
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_GETCFG) : /* getcfg $rm, $disp6, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_GETCON) : /* getcon $crk, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_xori.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = GET_H_CR (FLD (f_left));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_GETTR) : /* gettr $trb, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_blink.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = CPU (h_tr[FLD (f_trb)]);
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_ICBI) : /* icbi $rm, $disp6x32 */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_LDB) : /* ld.b $rm, $disp10, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = EXTQIDI (GETMEMQI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), EXTSIDI (FLD (f_disp10)))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_LDL) : /* ld.l $rm, $disp10x4, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_flds.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = EXTSIDI (GETMEMSI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), EXTSIDI (FLD (f_disp10x4)))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_LDQ) : /* ld.q $rm, $disp10x8, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_fldd.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = GETMEMDI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), EXTSIDI (FLD (f_disp10x8))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_LDUB) : /* ld.ub $rm, $disp10, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ZEXTQIDI (GETMEMQI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), EXTSIDI (FLD (f_disp10)))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_LDUW) : /* ld.uw $rm, $disp10x2, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_lduw.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ZEXTHIDI (GETMEMHI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), EXTSIDI (FLD (f_disp10x2)))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_LDW) : /* ld.w $rm, $disp10x2, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_lduw.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = EXTHIDI (GETMEMHI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), EXTSIDI (FLD (f_disp10x2)))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_LDHIL) : /* ldhi.l $rm, $disp6, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_ldhil.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- DI tmp_addr;
- QI tmp_bytecount;
- SI tmp_val;
- tmp_addr = ADDDI (GET_H_GR (FLD (f_left)), FLD (f_disp6));
- tmp_bytecount = ADDDI (ANDDI (tmp_addr, 3), 1);
- tmp_val = 0;
-if (ANDQI (tmp_bytecount, 4)) {
- {
- DI opval = EXTSIDI (GETMEMSI (current_cpu, pc, ANDDI (tmp_addr, -4)));
- SET_H_GR (FLD (f_dest), opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-} else {
-if (GET_H_ENDIAN ()) {
-{
-if (ANDQI (tmp_bytecount, 2)) {
- tmp_val = ADDSI (SLLSI (tmp_val, 16), ZEXTHIDI (GETMEMHI (current_cpu, pc, ANDDI (tmp_addr, -4))));
-}
-if (ANDQI (tmp_bytecount, 1)) {
- tmp_val = ADDSI (SLLSI (tmp_val, 8), ZEXTQIDI (GETMEMQI (current_cpu, pc, tmp_addr)));
-}
- {
- DI opval = EXTSIDI (tmp_val);
- SET_H_GR (FLD (f_dest), opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-} else {
-{
-if (ANDQI (tmp_bytecount, 1)) {
- tmp_val = ADDSI (SLLSI (tmp_val, 8), ZEXTQIDI (GETMEMQI (current_cpu, pc, tmp_addr)));
-}
-if (ANDQI (tmp_bytecount, 2)) {
- tmp_val = ADDSI (SLLSI (tmp_val, 16), ZEXTHIDI (GETMEMHI (current_cpu, pc, ANDDI (tmp_addr, -4))));
-}
- {
- DI opval = EXTSIDI (SLLSI (tmp_val, SUBSI (32, MULSI (8, tmp_bytecount))));
- SET_H_GR (FLD (f_dest), opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-}
-}
-}
-
- abuf->written = written;
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_LDHIQ) : /* ldhi.q $rm, $disp6, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_ldhil.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- DI tmp_addr;
- QI tmp_bytecount;
- DI tmp_val;
- tmp_addr = ADDDI (GET_H_GR (FLD (f_left)), FLD (f_disp6));
- tmp_bytecount = ADDDI (ANDDI (tmp_addr, 7), 1);
- tmp_val = 0;
-if (ANDQI (tmp_bytecount, 8)) {
- {
- DI opval = GETMEMDI (current_cpu, pc, ANDDI (tmp_addr, -8));
- SET_H_GR (FLD (f_dest), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-} else {
-if (GET_H_ENDIAN ()) {
-{
-if (ANDQI (tmp_bytecount, 4)) {
- tmp_val = ADDDI (SLLDI (tmp_val, 32), ZEXTSIDI (GETMEMSI (current_cpu, pc, ANDDI (tmp_addr, -8))));
-}
-if (ANDQI (tmp_bytecount, 2)) {
- tmp_val = ADDDI (SLLDI (tmp_val, 16), ZEXTHIDI (GETMEMHI (current_cpu, pc, ANDDI (tmp_addr, -4))));
-}
-if (ANDQI (tmp_bytecount, 1)) {
- tmp_val = ADDDI (SLLDI (tmp_val, 8), ZEXTQIDI (GETMEMQI (current_cpu, pc, tmp_addr)));
-}
- {
- DI opval = tmp_val;
- SET_H_GR (FLD (f_dest), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-} else {
-{
-if (ANDQI (tmp_bytecount, 1)) {
- tmp_val = ADDDI (SLLDI (tmp_val, 8), ZEXTQIDI (GETMEMQI (current_cpu, pc, tmp_addr)));
-}
-if (ANDQI (tmp_bytecount, 2)) {
- tmp_val = ADDDI (SLLDI (tmp_val, 16), ZEXTHIDI (GETMEMHI (current_cpu, pc, ANDDI (tmp_addr, -4))));
-}
-if (ANDQI (tmp_bytecount, 4)) {
- tmp_val = ADDDI (SLLDI (tmp_val, 32), ZEXTSIDI (GETMEMSI (current_cpu, pc, ANDDI (tmp_addr, -8))));
-}
- {
- DI opval = SLLDI (tmp_val, SUBSI (64, MULSI (8, tmp_bytecount)));
- SET_H_GR (FLD (f_dest), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-}
-}
-}
-
- abuf->written = written;
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_LDLOL) : /* ldlo.l $rm, $disp6, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_ldhil.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- DI tmp_addr;
- QI tmp_bytecount;
- SI tmp_val;
- tmp_addr = ADDDI (GET_H_GR (FLD (f_left)), FLD (f_disp6));
- tmp_bytecount = SUBSI (4, ANDDI (tmp_addr, 3));
- tmp_val = 0;
-if (ANDQI (tmp_bytecount, 4)) {
- {
- DI opval = EXTSIDI (GETMEMSI (current_cpu, pc, tmp_addr));
- SET_H_GR (FLD (f_dest), opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-} else {
-if (GET_H_ENDIAN ()) {
-{
-if (ANDQI (tmp_bytecount, 1)) {
- tmp_val = ADDSI (SLLSI (tmp_val, 8), ZEXTQIDI (GETMEMQI (current_cpu, pc, tmp_addr)));
-}
-if (ANDQI (tmp_bytecount, 2)) {
- tmp_val = ADDSI (SLLSI (tmp_val, 16), ZEXTHIDI (GETMEMHI (current_cpu, pc, ANDDI (ADDDI (tmp_addr, 1), -2))));
-}
- {
- DI opval = EXTSIDI (SLLSI (tmp_val, SUBSI (32, MULSI (8, tmp_bytecount))));
- SET_H_GR (FLD (f_dest), opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-} else {
-{
-if (ANDQI (tmp_bytecount, 2)) {
- tmp_val = ADDSI (SLLSI (tmp_val, 16), ZEXTHIDI (GETMEMHI (current_cpu, pc, ANDDI (ADDDI (tmp_addr, 1), -2))));
-}
-if (ANDQI (tmp_bytecount, 1)) {
- tmp_val = ADDSI (SLLSI (tmp_val, 8), ZEXTQIDI (GETMEMQI (current_cpu, pc, tmp_addr)));
-}
- {
- DI opval = EXTSIDI (tmp_val);
- SET_H_GR (FLD (f_dest), opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-}
-}
-}
-
- abuf->written = written;
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_LDLOQ) : /* ldlo.q $rm, $disp6, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_ldhil.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- DI tmp_addr;
- QI tmp_bytecount;
- DI tmp_val;
- tmp_addr = ADDDI (GET_H_GR (FLD (f_left)), FLD (f_disp6));
- tmp_bytecount = SUBSI (8, ANDDI (tmp_addr, 7));
- tmp_val = 0;
-if (ANDQI (tmp_bytecount, 8)) {
- {
- DI opval = GETMEMDI (current_cpu, pc, tmp_addr);
- SET_H_GR (FLD (f_dest), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-} else {
-if (GET_H_ENDIAN ()) {
-{
-if (ANDQI (tmp_bytecount, 1)) {
- tmp_val = ADDDI (SLLDI (tmp_val, 8), ZEXTQIDI (GETMEMQI (current_cpu, pc, tmp_addr)));
-}
-if (ANDQI (tmp_bytecount, 2)) {
- tmp_val = ADDDI (SLLDI (tmp_val, 16), ZEXTHIDI (GETMEMHI (current_cpu, pc, ANDDI (ADDDI (tmp_addr, 1), -2))));
-}
-if (ANDQI (tmp_bytecount, 4)) {
- tmp_val = ADDDI (SLLDI (tmp_val, 32), ZEXTSIDI (GETMEMSI (current_cpu, pc, ANDDI (ADDDI (tmp_addr, 3), -4))));
-}
- {
- DI opval = SLLDI (tmp_val, SUBSI (64, MULSI (8, tmp_bytecount)));
- SET_H_GR (FLD (f_dest), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-} else {
-{
-if (ANDQI (tmp_bytecount, 4)) {
- tmp_val = ADDDI (SLLDI (tmp_val, 32), ZEXTSIDI (GETMEMSI (current_cpu, pc, ANDDI (ADDDI (tmp_addr, 3), -4))));
-}
-if (ANDQI (tmp_bytecount, 2)) {
- tmp_val = ADDDI (SLLDI (tmp_val, 16), ZEXTHIDI (GETMEMHI (current_cpu, pc, ANDDI (ADDDI (tmp_addr, 1), -2))));
-}
-if (ANDQI (tmp_bytecount, 1)) {
- tmp_val = ADDDI (SLLDI (tmp_val, 8), ZEXTQIDI (GETMEMQI (current_cpu, pc, tmp_addr)));
-}
- {
- DI opval = tmp_val;
- SET_H_GR (FLD (f_dest), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-}
-}
-}
-
- abuf->written = written;
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_LDXB) : /* ldx.b $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = EXTQIDI (GETMEMQI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_LDXL) : /* ldx.l $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = EXTSIDI (GETMEMSI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_LDXQ) : /* ldx.q $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = GETMEMDI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_LDXUB) : /* ldx.ub $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ZEXTQIDI (GETMEMUQI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_LDXUW) : /* ldx.uw $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ZEXTHIDI (GETMEMUHI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_LDXW) : /* ldx.w $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = EXTHIDI (GETMEMHI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MABSL) : /* mabs.l $rm, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_xori.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = ABSSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1));
- tmp_result1 = ABSSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0));
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MABSW) : /* mabs.w $rm, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_xori.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- HI tmp_result3;
- HI tmp_result2;
- HI tmp_result1;
- HI tmp_result0;
- tmp_result0 = ABSHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3));
- tmp_result1 = ABSHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2));
- tmp_result2 = ABSHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1));
- tmp_result3 = ABSHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0));
- {
- DI opval = ORDI (SLLDI (ZEXTHIDI (tmp_result3), 48), ORDI (SLLDI (ZEXTHIDI (tmp_result2), 32), ORDI (SLLDI (ZEXTHIDI (tmp_result1), 16), ZEXTHIDI (tmp_result0))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MADDL) : /* madd.l $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = ADDSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), SUBWORDDISI (GET_H_GR (FLD (f_right)), 1));
- tmp_result1 = ADDSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0), SUBWORDDISI (GET_H_GR (FLD (f_right)), 0));
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MADDW) : /* madd.w $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- HI tmp_result3;
- HI tmp_result2;
- HI tmp_result1;
- HI tmp_result0;
- tmp_result0 = ADDHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3));
- tmp_result1 = ADDHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2));
- tmp_result2 = ADDHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1));
- tmp_result3 = ADDHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0));
- {
- DI opval = ORDI (SLLDI (ZEXTHIDI (tmp_result3), 48), ORDI (SLLDI (ZEXTHIDI (tmp_result2), 32), ORDI (SLLDI (ZEXTHIDI (tmp_result1), 16), ZEXTHIDI (tmp_result0))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MADDSL) : /* madds.l $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = ((LTDI (ADDDI (EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1)), EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 1))), NEGDI (SLLDI (1, SUBSI (32, 1))))) ? (NEGSI (SLLSI (1, SUBSI (32, 1)))) : (((LTDI (ADDDI (EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1)), EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 1))), SLLDI (1, SUBSI (32, 1)))) ? (ADDDI (EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1)), EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 1)))) : (SUBSI (SLLSI (1, SUBSI (32, 1)), 1)))));
- tmp_result1 = ((LTDI (ADDDI (EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0)), EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 0))), NEGDI (SLLDI (1, SUBSI (32, 1))))) ? (NEGSI (SLLSI (1, SUBSI (32, 1)))) : (((LTDI (ADDDI (EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0)), EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 0))), SLLDI (1, SUBSI (32, 1)))) ? (ADDDI (EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0)), EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 0)))) : (SUBSI (SLLSI (1, SUBSI (32, 1)), 1)))));
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MADDSUB) : /* madds.ub $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_result7;
- QI tmp_result6;
- QI tmp_result5;
- QI tmp_result4;
- QI tmp_result3;
- QI tmp_result2;
- QI tmp_result1;
- QI tmp_result0;
- tmp_result0 = ((LTDI (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 7)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 7))), MAKEDI (0, 0))) ? (0) : (((LTDI (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 7)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 7))), SLLDI (1, 8))) ? (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 7)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 7)))) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result1 = ((LTDI (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 6)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 6))), MAKEDI (0, 0))) ? (0) : (((LTDI (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 6)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 6))), SLLDI (1, 8))) ? (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 6)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 6)))) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result2 = ((LTDI (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 5)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 5))), MAKEDI (0, 0))) ? (0) : (((LTDI (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 5)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 5))), SLLDI (1, 8))) ? (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 5)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 5)))) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result3 = ((LTDI (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 4)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 4))), MAKEDI (0, 0))) ? (0) : (((LTDI (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 4)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 4))), SLLDI (1, 8))) ? (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 4)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 4)))) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result4 = ((LTDI (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 3)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 3))), MAKEDI (0, 0))) ? (0) : (((LTDI (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 3)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 3))), SLLDI (1, 8))) ? (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 3)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 3)))) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result5 = ((LTDI (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 2)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 2))), MAKEDI (0, 0))) ? (0) : (((LTDI (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 2)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 2))), SLLDI (1, 8))) ? (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 2)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 2)))) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result6 = ((LTDI (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 1)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 1))), MAKEDI (0, 0))) ? (0) : (((LTDI (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 1)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 1))), SLLDI (1, 8))) ? (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 1)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 1)))) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result7 = ((LTDI (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 0)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 0))), MAKEDI (0, 0))) ? (0) : (((LTDI (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 0)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 0))), SLLDI (1, 8))) ? (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 0)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 0)))) : (SUBQI (SLLQI (1, 8), 1)))));
- {
- DI opval = ORDI (SLLDI (ZEXTQIDI (tmp_result7), 56), ORDI (SLLDI (ZEXTQIDI (tmp_result6), 48), ORDI (SLLDI (ZEXTQIDI (tmp_result5), 40), ORDI (SLLDI (ZEXTQIDI (tmp_result4), 32), ORDI (SLLDI (ZEXTQIDI (tmp_result3), 24), ORDI (SLLDI (ZEXTQIDI (tmp_result2), 16), ORDI (SLLDI (ZEXTQIDI (tmp_result1), 8), ZEXTQIDI (tmp_result0))))))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MADDSW) : /* madds.w $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- HI tmp_result3;
- HI tmp_result2;
- HI tmp_result1;
- HI tmp_result0;
- tmp_result0 = ((LTDI (ADDDI (EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3)), EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3))), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTDI (ADDDI (EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3)), EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3))), SLLDI (1, SUBSI (16, 1)))) ? (ADDDI (EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3)), EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3)))) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_result1 = ((LTDI (ADDDI (EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2)), EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2))), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTDI (ADDDI (EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2)), EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2))), SLLDI (1, SUBSI (16, 1)))) ? (ADDDI (EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2)), EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2)))) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_result2 = ((LTDI (ADDDI (EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1)), EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1))), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTDI (ADDDI (EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1)), EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1))), SLLDI (1, SUBSI (16, 1)))) ? (ADDDI (EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1)), EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1)))) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_result3 = ((LTDI (ADDDI (EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0)), EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0))), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTDI (ADDDI (EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0)), EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0))), SLLDI (1, SUBSI (16, 1)))) ? (ADDDI (EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0)), EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0)))) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- {
- DI opval = ORDI (SLLDI (ZEXTHIDI (tmp_result3), 48), ORDI (SLLDI (ZEXTHIDI (tmp_result2), 32), ORDI (SLLDI (ZEXTHIDI (tmp_result1), 16), ZEXTHIDI (tmp_result0))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MCMPEQB) : /* mcmpeq.b $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_result7;
- QI tmp_result6;
- QI tmp_result5;
- QI tmp_result4;
- QI tmp_result3;
- QI tmp_result2;
- QI tmp_result1;
- QI tmp_result0;
- tmp_result0 = ((EQQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 7), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 7))) ? (INVQI (0)) : (0));
- tmp_result1 = ((EQQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 6), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 6))) ? (INVQI (0)) : (0));
- tmp_result2 = ((EQQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 5), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 5))) ? (INVQI (0)) : (0));
- tmp_result3 = ((EQQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 4), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 4))) ? (INVQI (0)) : (0));
- tmp_result4 = ((EQQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 3), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 3))) ? (INVQI (0)) : (0));
- tmp_result5 = ((EQQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 2), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 2))) ? (INVQI (0)) : (0));
- tmp_result6 = ((EQQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 1), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 1))) ? (INVQI (0)) : (0));
- tmp_result7 = ((EQQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 0), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 0))) ? (INVQI (0)) : (0));
- {
- DI opval = ORDI (SLLDI (ZEXTQIDI (tmp_result7), 56), ORDI (SLLDI (ZEXTQIDI (tmp_result6), 48), ORDI (SLLDI (ZEXTQIDI (tmp_result5), 40), ORDI (SLLDI (ZEXTQIDI (tmp_result4), 32), ORDI (SLLDI (ZEXTQIDI (tmp_result3), 24), ORDI (SLLDI (ZEXTQIDI (tmp_result2), 16), ORDI (SLLDI (ZEXTQIDI (tmp_result1), 8), ZEXTQIDI (tmp_result0))))))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MCMPEQL) : /* mcmpeq.l $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = ((EQSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), SUBWORDDISI (GET_H_GR (FLD (f_right)), 1))) ? (INVSI (0)) : (0));
- tmp_result1 = ((EQSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0), SUBWORDDISI (GET_H_GR (FLD (f_right)), 0))) ? (INVSI (0)) : (0));
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MCMPEQW) : /* mcmpeq.w $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- HI tmp_result3;
- HI tmp_result2;
- HI tmp_result1;
- HI tmp_result0;
- tmp_result0 = ((EQHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3))) ? (INVHI (0)) : (0));
- tmp_result1 = ((EQHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2))) ? (INVHI (0)) : (0));
- tmp_result2 = ((EQHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1))) ? (INVHI (0)) : (0));
- tmp_result3 = ((EQHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0))) ? (INVHI (0)) : (0));
- {
- DI opval = ORDI (SLLDI (ZEXTHIDI (tmp_result3), 48), ORDI (SLLDI (ZEXTHIDI (tmp_result2), 32), ORDI (SLLDI (ZEXTHIDI (tmp_result1), 16), ZEXTHIDI (tmp_result0))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MCMPGTL) : /* mcmpgt.l $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = ((GTSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), SUBWORDDISI (GET_H_GR (FLD (f_right)), 1))) ? (INVSI (0)) : (0));
- tmp_result1 = ((GTSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0), SUBWORDDISI (GET_H_GR (FLD (f_right)), 0))) ? (INVSI (0)) : (0));
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MCMPGTUB) : /* mcmpgt.ub $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_result7;
- QI tmp_result6;
- QI tmp_result5;
- QI tmp_result4;
- QI tmp_result3;
- QI tmp_result2;
- QI tmp_result1;
- QI tmp_result0;
- tmp_result0 = ((GTUQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 7), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 7))) ? (INVQI (0)) : (0));
- tmp_result1 = ((GTUQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 6), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 6))) ? (INVQI (0)) : (0));
- tmp_result2 = ((GTUQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 5), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 5))) ? (INVQI (0)) : (0));
- tmp_result3 = ((GTUQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 4), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 4))) ? (INVQI (0)) : (0));
- tmp_result4 = ((GTUQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 3), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 3))) ? (INVQI (0)) : (0));
- tmp_result5 = ((GTUQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 2), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 2))) ? (INVQI (0)) : (0));
- tmp_result6 = ((GTUQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 1), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 1))) ? (INVQI (0)) : (0));
- tmp_result7 = ((GTUQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 0), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 0))) ? (INVQI (0)) : (0));
- {
- DI opval = ORDI (SLLDI (ZEXTQIDI (tmp_result7), 56), ORDI (SLLDI (ZEXTQIDI (tmp_result6), 48), ORDI (SLLDI (ZEXTQIDI (tmp_result5), 40), ORDI (SLLDI (ZEXTQIDI (tmp_result4), 32), ORDI (SLLDI (ZEXTQIDI (tmp_result3), 24), ORDI (SLLDI (ZEXTQIDI (tmp_result2), 16), ORDI (SLLDI (ZEXTQIDI (tmp_result1), 8), ZEXTQIDI (tmp_result0))))))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MCMPGTW) : /* mcmpgt.w $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- HI tmp_result3;
- HI tmp_result2;
- HI tmp_result1;
- HI tmp_result0;
- tmp_result0 = ((GTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3))) ? (INVHI (0)) : (0));
- tmp_result1 = ((GTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2))) ? (INVHI (0)) : (0));
- tmp_result2 = ((GTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1))) ? (INVHI (0)) : (0));
- tmp_result3 = ((GTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0))) ? (INVHI (0)) : (0));
- {
- DI opval = ORDI (SLLDI (ZEXTHIDI (tmp_result3), 48), ORDI (SLLDI (ZEXTHIDI (tmp_result2), 32), ORDI (SLLDI (ZEXTHIDI (tmp_result1), 16), ZEXTHIDI (tmp_result0))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MCMV) : /* mcmv $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ORDI (ANDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right))), ANDDI (GET_H_GR (FLD (f_dest)), INVDI (GET_H_GR (FLD (f_right)))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MCNVSLW) : /* mcnvs.lw $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- HI tmp_result3;
- HI tmp_result2;
- HI tmp_result1;
- HI tmp_result0;
- tmp_result0 = ((LTSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), SLLDI (1, SUBSI (16, 1)))) ? (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1)) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_result1 = ((LTSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0), SLLDI (1, SUBSI (16, 1)))) ? (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0)) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_result2 = ((LTSI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 1), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTSI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 1), SLLDI (1, SUBSI (16, 1)))) ? (SUBWORDDISI (GET_H_GR (FLD (f_right)), 1)) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_result3 = ((LTSI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 0), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTSI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 0), SLLDI (1, SUBSI (16, 1)))) ? (SUBWORDDISI (GET_H_GR (FLD (f_right)), 0)) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- {
- DI opval = ORDI (SLLDI (ZEXTHIDI (tmp_result3), 48), ORDI (SLLDI (ZEXTHIDI (tmp_result2), 32), ORDI (SLLDI (ZEXTHIDI (tmp_result1), 16), ZEXTHIDI (tmp_result0))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MCNVSWB) : /* mcnvs.wb $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_result7;
- QI tmp_result6;
- QI tmp_result5;
- QI tmp_result4;
- QI tmp_result3;
- QI tmp_result2;
- QI tmp_result1;
- QI tmp_result0;
- tmp_result0 = ((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3), NEGDI (SLLDI (1, SUBSI (8, 1))))) ? (NEGQI (SLLQI (1, SUBSI (8, 1)))) : (((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3), SLLDI (1, SUBSI (8, 1)))) ? (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3)) : (SUBQI (SLLQI (1, SUBSI (8, 1)), 1)))));
- tmp_result1 = ((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2), NEGDI (SLLDI (1, SUBSI (8, 1))))) ? (NEGQI (SLLQI (1, SUBSI (8, 1)))) : (((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2), SLLDI (1, SUBSI (8, 1)))) ? (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2)) : (SUBQI (SLLQI (1, SUBSI (8, 1)), 1)))));
- tmp_result2 = ((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1), NEGDI (SLLDI (1, SUBSI (8, 1))))) ? (NEGQI (SLLQI (1, SUBSI (8, 1)))) : (((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1), SLLDI (1, SUBSI (8, 1)))) ? (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1)) : (SUBQI (SLLQI (1, SUBSI (8, 1)), 1)))));
- tmp_result3 = ((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0), NEGDI (SLLDI (1, SUBSI (8, 1))))) ? (NEGQI (SLLQI (1, SUBSI (8, 1)))) : (((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0), SLLDI (1, SUBSI (8, 1)))) ? (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0)) : (SUBQI (SLLQI (1, SUBSI (8, 1)), 1)))));
- tmp_result4 = ((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3), NEGDI (SLLDI (1, SUBSI (8, 1))))) ? (NEGQI (SLLQI (1, SUBSI (8, 1)))) : (((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3), SLLDI (1, SUBSI (8, 1)))) ? (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3)) : (SUBQI (SLLQI (1, SUBSI (8, 1)), 1)))));
- tmp_result5 = ((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2), NEGDI (SLLDI (1, SUBSI (8, 1))))) ? (NEGQI (SLLQI (1, SUBSI (8, 1)))) : (((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2), SLLDI (1, SUBSI (8, 1)))) ? (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2)) : (SUBQI (SLLQI (1, SUBSI (8, 1)), 1)))));
- tmp_result6 = ((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1), NEGDI (SLLDI (1, SUBSI (8, 1))))) ? (NEGQI (SLLQI (1, SUBSI (8, 1)))) : (((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1), SLLDI (1, SUBSI (8, 1)))) ? (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1)) : (SUBQI (SLLQI (1, SUBSI (8, 1)), 1)))));
- tmp_result7 = ((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0), NEGDI (SLLDI (1, SUBSI (8, 1))))) ? (NEGQI (SLLQI (1, SUBSI (8, 1)))) : (((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0), SLLDI (1, SUBSI (8, 1)))) ? (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0)) : (SUBQI (SLLQI (1, SUBSI (8, 1)), 1)))));
- {
- DI opval = ORDI (SLLDI (ZEXTQIDI (tmp_result7), 56), ORDI (SLLDI (ZEXTQIDI (tmp_result6), 48), ORDI (SLLDI (ZEXTQIDI (tmp_result5), 40), ORDI (SLLDI (ZEXTQIDI (tmp_result4), 32), ORDI (SLLDI (ZEXTQIDI (tmp_result3), 24), ORDI (SLLDI (ZEXTQIDI (tmp_result2), 16), ORDI (SLLDI (ZEXTQIDI (tmp_result1), 8), ZEXTQIDI (tmp_result0))))))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MCNVSWUB) : /* mcnvs.wub $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_result7;
- QI tmp_result6;
- QI tmp_result5;
- QI tmp_result4;
- QI tmp_result3;
- QI tmp_result2;
- QI tmp_result1;
- QI tmp_result0;
- tmp_result0 = ((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3), MAKEDI (0, 0))) ? (0) : (((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3), SLLDI (1, 8))) ? (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3)) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result1 = ((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2), MAKEDI (0, 0))) ? (0) : (((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2), SLLDI (1, 8))) ? (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2)) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result2 = ((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1), MAKEDI (0, 0))) ? (0) : (((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1), SLLDI (1, 8))) ? (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1)) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result3 = ((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0), MAKEDI (0, 0))) ? (0) : (((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0), SLLDI (1, 8))) ? (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0)) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result4 = ((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3), MAKEDI (0, 0))) ? (0) : (((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3), SLLDI (1, 8))) ? (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3)) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result5 = ((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2), MAKEDI (0, 0))) ? (0) : (((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2), SLLDI (1, 8))) ? (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2)) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result6 = ((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1), MAKEDI (0, 0))) ? (0) : (((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1), SLLDI (1, 8))) ? (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1)) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result7 = ((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0), MAKEDI (0, 0))) ? (0) : (((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0), SLLDI (1, 8))) ? (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0)) : (SUBQI (SLLQI (1, 8), 1)))));
- {
- DI opval = ORDI (SLLDI (ZEXTQIDI (tmp_result7), 56), ORDI (SLLDI (ZEXTQIDI (tmp_result6), 48), ORDI (SLLDI (ZEXTQIDI (tmp_result5), 40), ORDI (SLLDI (ZEXTQIDI (tmp_result4), 32), ORDI (SLLDI (ZEXTQIDI (tmp_result3), 24), ORDI (SLLDI (ZEXTQIDI (tmp_result2), 16), ORDI (SLLDI (ZEXTQIDI (tmp_result1), 8), ZEXTQIDI (tmp_result0))))))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MEXTR1) : /* mextr1 $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_count;
- DI tmp_mask;
- DI tmp_rhs;
- tmp_count = MULQI (8, 1);
- tmp_mask = SLLDI (INVSI (0), tmp_count);
- tmp_rhs = SRLDI (ANDDI (GET_H_GR (FLD (f_left)), tmp_mask), tmp_count);
- tmp_count = MULQI (8, SUBQI (8, 1));
- tmp_mask = SRLDI (INVSI (0), tmp_count);
- {
- DI opval = ORDI (tmp_rhs, SLLDI (ANDDI (GET_H_GR (FLD (f_right)), tmp_mask), tmp_count));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MEXTR2) : /* mextr2 $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_count;
- DI tmp_mask;
- DI tmp_rhs;
- tmp_count = MULQI (8, 2);
- tmp_mask = SLLDI (INVSI (0), tmp_count);
- tmp_rhs = SRLDI (ANDDI (GET_H_GR (FLD (f_left)), tmp_mask), tmp_count);
- tmp_count = MULQI (8, SUBQI (8, 2));
- tmp_mask = SRLDI (INVSI (0), tmp_count);
- {
- DI opval = ORDI (tmp_rhs, SLLDI (ANDDI (GET_H_GR (FLD (f_right)), tmp_mask), tmp_count));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MEXTR3) : /* mextr3 $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_count;
- DI tmp_mask;
- DI tmp_rhs;
- tmp_count = MULQI (8, 3);
- tmp_mask = SLLDI (INVSI (0), tmp_count);
- tmp_rhs = SRLDI (ANDDI (GET_H_GR (FLD (f_left)), tmp_mask), tmp_count);
- tmp_count = MULQI (8, SUBQI (8, 3));
- tmp_mask = SRLDI (INVSI (0), tmp_count);
- {
- DI opval = ORDI (tmp_rhs, SLLDI (ANDDI (GET_H_GR (FLD (f_right)), tmp_mask), tmp_count));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MEXTR4) : /* mextr4 $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_count;
- DI tmp_mask;
- DI tmp_rhs;
- tmp_count = MULQI (8, 4);
- tmp_mask = SLLDI (INVSI (0), tmp_count);
- tmp_rhs = SRLDI (ANDDI (GET_H_GR (FLD (f_left)), tmp_mask), tmp_count);
- tmp_count = MULQI (8, SUBQI (8, 4));
- tmp_mask = SRLDI (INVSI (0), tmp_count);
- {
- DI opval = ORDI (tmp_rhs, SLLDI (ANDDI (GET_H_GR (FLD (f_right)), tmp_mask), tmp_count));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MEXTR5) : /* mextr5 $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_count;
- DI tmp_mask;
- DI tmp_rhs;
- tmp_count = MULQI (8, 5);
- tmp_mask = SLLDI (INVSI (0), tmp_count);
- tmp_rhs = SRLDI (ANDDI (GET_H_GR (FLD (f_left)), tmp_mask), tmp_count);
- tmp_count = MULQI (8, SUBQI (8, 5));
- tmp_mask = SRLDI (INVSI (0), tmp_count);
- {
- DI opval = ORDI (tmp_rhs, SLLDI (ANDDI (GET_H_GR (FLD (f_right)), tmp_mask), tmp_count));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MEXTR6) : /* mextr6 $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_count;
- DI tmp_mask;
- DI tmp_rhs;
- tmp_count = MULQI (8, 6);
- tmp_mask = SLLDI (INVSI (0), tmp_count);
- tmp_rhs = SRLDI (ANDDI (GET_H_GR (FLD (f_left)), tmp_mask), tmp_count);
- tmp_count = MULQI (8, SUBQI (8, 6));
- tmp_mask = SRLDI (INVSI (0), tmp_count);
- {
- DI opval = ORDI (tmp_rhs, SLLDI (ANDDI (GET_H_GR (FLD (f_right)), tmp_mask), tmp_count));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MEXTR7) : /* mextr7 $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_count;
- DI tmp_mask;
- DI tmp_rhs;
- tmp_count = MULQI (8, 7);
- tmp_mask = SLLDI (INVSI (0), tmp_count);
- tmp_rhs = SRLDI (ANDDI (GET_H_GR (FLD (f_left)), tmp_mask), tmp_count);
- tmp_count = MULQI (8, SUBQI (8, 7));
- tmp_mask = SRLDI (INVSI (0), tmp_count);
- {
- DI opval = ORDI (tmp_rhs, SLLDI (ANDDI (GET_H_GR (FLD (f_right)), tmp_mask), tmp_count));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MMACFXWL) : /* mmacfx.wl $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_temp;
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = SUBWORDDISI (GET_H_GR (FLD (f_dest)), 1);
- tmp_result1 = SUBWORDDISI (GET_H_GR (FLD (f_dest)), 0);
- tmp_temp = MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3)));
- tmp_temp = ((LTDI (SLLDI (tmp_temp, 1), NEGDI (SLLDI (1, SUBSI (32, 1))))) ? (NEGSI (SLLSI (1, SUBSI (32, 1)))) : (((LTDI (SLLDI (tmp_temp, 1), SLLDI (1, SUBSI (32, 1)))) ? (SLLDI (tmp_temp, 1)) : (SUBSI (SLLSI (1, SUBSI (32, 1)), 1)))));
- tmp_result0 = ((LTDI (ADDDI (EXTSIDI (tmp_result0), EXTSIDI (tmp_temp)), NEGDI (SLLDI (1, SUBSI (32, 1))))) ? (NEGSI (SLLSI (1, SUBSI (32, 1)))) : (((LTDI (ADDDI (EXTSIDI (tmp_result0), EXTSIDI (tmp_temp)), SLLDI (1, SUBSI (32, 1)))) ? (ADDDI (EXTSIDI (tmp_result0), EXTSIDI (tmp_temp))) : (SUBSI (SLLSI (1, SUBSI (32, 1)), 1)))));
- tmp_temp = MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2)));
- tmp_temp = ((LTDI (SLLDI (tmp_temp, 1), NEGDI (SLLDI (1, SUBSI (32, 1))))) ? (NEGSI (SLLSI (1, SUBSI (32, 1)))) : (((LTDI (SLLDI (tmp_temp, 1), SLLDI (1, SUBSI (32, 1)))) ? (SLLDI (tmp_temp, 1)) : (SUBSI (SLLSI (1, SUBSI (32, 1)), 1)))));
- tmp_result1 = ((LTDI (ADDDI (EXTSIDI (tmp_result1), EXTSIDI (tmp_temp)), NEGDI (SLLDI (1, SUBSI (32, 1))))) ? (NEGSI (SLLSI (1, SUBSI (32, 1)))) : (((LTDI (ADDDI (EXTSIDI (tmp_result1), EXTSIDI (tmp_temp)), SLLDI (1, SUBSI (32, 1)))) ? (ADDDI (EXTSIDI (tmp_result1), EXTSIDI (tmp_temp))) : (SUBSI (SLLSI (1, SUBSI (32, 1)), 1)))));
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MMACNFX_WL) : /* mmacnfx.wl $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_temp;
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = SUBWORDDISI (GET_H_GR (FLD (f_dest)), 1);
- tmp_result1 = SUBWORDDISI (GET_H_GR (FLD (f_dest)), 0);
- tmp_temp = MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3)));
- tmp_temp = ((LTDI (SLLDI (tmp_temp, 1), NEGDI (SLLDI (1, SUBSI (32, 1))))) ? (NEGSI (SLLSI (1, SUBSI (32, 1)))) : (((LTDI (SLLDI (tmp_temp, 1), SLLDI (1, SUBSI (32, 1)))) ? (SLLDI (tmp_temp, 1)) : (SUBSI (SLLSI (1, SUBSI (32, 1)), 1)))));
- tmp_result0 = ((LTDI (SUBDI (EXTSIDI (tmp_result0), EXTSIDI (tmp_temp)), NEGDI (SLLDI (1, SUBSI (32, 1))))) ? (NEGSI (SLLSI (1, SUBSI (32, 1)))) : (((LTDI (SUBDI (EXTSIDI (tmp_result0), EXTSIDI (tmp_temp)), SLLDI (1, SUBSI (32, 1)))) ? (SUBDI (EXTSIDI (tmp_result0), EXTSIDI (tmp_temp))) : (SUBSI (SLLSI (1, SUBSI (32, 1)), 1)))));
- tmp_temp = MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2)));
- tmp_temp = ((LTDI (SLLDI (tmp_temp, 1), NEGDI (SLLDI (1, SUBSI (32, 1))))) ? (NEGSI (SLLSI (1, SUBSI (32, 1)))) : (((LTDI (SLLDI (tmp_temp, 1), SLLDI (1, SUBSI (32, 1)))) ? (SLLDI (tmp_temp, 1)) : (SUBSI (SLLSI (1, SUBSI (32, 1)), 1)))));
- tmp_result1 = ((LTDI (SUBDI (EXTSIDI (tmp_result1), EXTSIDI (tmp_temp)), NEGDI (SLLDI (1, SUBSI (32, 1))))) ? (NEGSI (SLLSI (1, SUBSI (32, 1)))) : (((LTDI (SUBDI (EXTSIDI (tmp_result1), EXTSIDI (tmp_temp)), SLLDI (1, SUBSI (32, 1)))) ? (SUBDI (EXTSIDI (tmp_result1), EXTSIDI (tmp_temp))) : (SUBSI (SLLSI (1, SUBSI (32, 1)), 1)))));
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MMULL) : /* mmul.l $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = MULSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), SUBWORDDISI (GET_H_GR (FLD (f_right)), 1));
- tmp_result1 = MULSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0), SUBWORDDISI (GET_H_GR (FLD (f_right)), 0));
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MMULW) : /* mmul.w $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- HI tmp_result3;
- HI tmp_result2;
- HI tmp_result1;
- HI tmp_result0;
- tmp_result0 = MULHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3));
- tmp_result1 = MULHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2));
- tmp_result2 = MULHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1));
- tmp_result3 = MULHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0));
- {
- DI opval = ORDI (SLLDI (ZEXTHIDI (tmp_result3), 48), ORDI (SLLDI (ZEXTHIDI (tmp_result2), 32), ORDI (SLLDI (ZEXTHIDI (tmp_result1), 16), ZEXTHIDI (tmp_result0))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MMULFXL) : /* mmulfx.l $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- DI tmp_temp;
- SI tmp_result0;
- SI tmp_result1;
- tmp_temp = MULDI (ZEXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1)), ZEXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 1)));
- tmp_result0 = ((LTDI (SRADI (tmp_temp, 31), NEGDI (SLLDI (1, SUBSI (32, 1))))) ? (NEGSI (SLLSI (1, SUBSI (32, 1)))) : (((LTDI (SRADI (tmp_temp, 31), SLLDI (1, SUBSI (32, 1)))) ? (SRADI (tmp_temp, 31)) : (SUBSI (SLLSI (1, SUBSI (32, 1)), 1)))));
- tmp_temp = MULDI (ZEXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0)), ZEXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 0)));
- tmp_result1 = ((LTDI (SRADI (tmp_temp, 31), NEGDI (SLLDI (1, SUBSI (32, 1))))) ? (NEGSI (SLLSI (1, SUBSI (32, 1)))) : (((LTDI (SRADI (tmp_temp, 31), SLLDI (1, SUBSI (32, 1)))) ? (SRADI (tmp_temp, 31)) : (SUBSI (SLLSI (1, SUBSI (32, 1)), 1)))));
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MMULFXW) : /* mmulfx.w $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_temp;
- HI tmp_result0;
- HI tmp_result1;
- HI tmp_result2;
- HI tmp_result3;
- tmp_temp = MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3)));
- tmp_result0 = ((LTSI (SRASI (tmp_temp, 15), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTSI (SRASI (tmp_temp, 15), SLLDI (1, SUBSI (16, 1)))) ? (SRASI (tmp_temp, 15)) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_temp = MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2)));
- tmp_result1 = ((LTSI (SRASI (tmp_temp, 15), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTSI (SRASI (tmp_temp, 15), SLLDI (1, SUBSI (16, 1)))) ? (SRASI (tmp_temp, 15)) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_temp = MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1)));
- tmp_result2 = ((LTSI (SRASI (tmp_temp, 15), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTSI (SRASI (tmp_temp, 15), SLLDI (1, SUBSI (16, 1)))) ? (SRASI (tmp_temp, 15)) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_temp = MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0)));
- tmp_result3 = ((LTSI (SRASI (tmp_temp, 15), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTSI (SRASI (tmp_temp, 15), SLLDI (1, SUBSI (16, 1)))) ? (SRASI (tmp_temp, 15)) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- {
- DI opval = ORDI (SLLDI (ZEXTHIDI (tmp_result3), 48), ORDI (SLLDI (ZEXTHIDI (tmp_result2), 32), ORDI (SLLDI (ZEXTHIDI (tmp_result1), 16), ZEXTHIDI (tmp_result0))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MMULFXRPW) : /* mmulfxrp.w $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_temp;
- HI tmp_result0;
- HI tmp_result1;
- HI tmp_result2;
- HI tmp_result3;
- HI tmp_c;
- tmp_c = SLLSI (1, 14);
- tmp_temp = MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3)));
- tmp_result0 = ((LTSI (SRASI (ADDSI (tmp_temp, tmp_c), 15), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTSI (SRASI (ADDSI (tmp_temp, tmp_c), 15), SLLDI (1, SUBSI (16, 1)))) ? (SRASI (ADDSI (tmp_temp, tmp_c), 15)) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_temp = MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2)));
- tmp_result1 = ((LTSI (SRASI (ADDSI (tmp_temp, tmp_c), 15), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTSI (SRASI (ADDSI (tmp_temp, tmp_c), 15), SLLDI (1, SUBSI (16, 1)))) ? (SRASI (ADDSI (tmp_temp, tmp_c), 15)) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_temp = MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1)));
- tmp_result2 = ((LTSI (SRASI (ADDSI (tmp_temp, tmp_c), 15), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTSI (SRASI (ADDSI (tmp_temp, tmp_c), 15), SLLDI (1, SUBSI (16, 1)))) ? (SRASI (ADDSI (tmp_temp, tmp_c), 15)) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_temp = MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0)));
- tmp_result3 = ((LTSI (SRASI (ADDSI (tmp_temp, tmp_c), 15), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTSI (SRASI (ADDSI (tmp_temp, tmp_c), 15), SLLDI (1, SUBSI (16, 1)))) ? (SRASI (ADDSI (tmp_temp, tmp_c), 15)) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- {
- DI opval = ORDI (SLLDI (ZEXTHIDI (tmp_result3), 48), ORDI (SLLDI (ZEXTHIDI (tmp_result2), 32), ORDI (SLLDI (ZEXTHIDI (tmp_result1), 16), ZEXTHIDI (tmp_result0))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MMULHIWL) : /* mmulhi.wl $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1)));
- tmp_result1 = MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0)));
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MMULLOWL) : /* mmullo.wl $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3)));
- tmp_result1 = MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2)));
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MMULSUMWQ) : /* mmulsum.wq $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- DI tmp_acc;
- tmp_acc = MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0)));
- tmp_acc = ADDDI (tmp_acc, MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1))));
- tmp_acc = ADDDI (tmp_acc, MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2))));
- tmp_acc = ADDDI (tmp_acc, MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3))));
- {
- DI opval = ADDDI (GET_H_GR (FLD (f_dest)), tmp_acc);
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MOVI) : /* movi $imm16, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movi.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = EXTSIDI (FLD (f_imm16));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MPERMW) : /* mperm.w $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_control;
- HI tmp_result3;
- HI tmp_result2;
- HI tmp_result1;
- HI tmp_result0;
- tmp_control = ANDQI (GET_H_GR (FLD (f_right)), 255);
- tmp_result0 = SUBWORDDIHI (GET_H_GR (FLD (f_left)), SUBSI (3, ANDQI (tmp_control, 3)));
- tmp_result1 = SUBWORDDIHI (GET_H_GR (FLD (f_left)), SUBSI (3, ANDQI (SRLQI (tmp_control, 2), 3)));
- tmp_result2 = SUBWORDDIHI (GET_H_GR (FLD (f_left)), SUBSI (3, ANDQI (SRLQI (tmp_control, 4), 3)));
- tmp_result3 = SUBWORDDIHI (GET_H_GR (FLD (f_left)), SUBSI (3, ANDQI (SRLQI (tmp_control, 6), 3)));
- {
- DI opval = ORDI (SLLDI (ZEXTHIDI (tmp_result3), 48), ORDI (SLLDI (ZEXTHIDI (tmp_result2), 32), ORDI (SLLDI (ZEXTHIDI (tmp_result1), 16), ZEXTHIDI (tmp_result0))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MSADUBQ) : /* msad.ubq $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- DI tmp_acc;
- tmp_acc = ABSDI (SUBQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 0), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 0)));
- tmp_acc = ADDDI (tmp_acc, ABSQI (SUBQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 1), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 1))));
- tmp_acc = ADDDI (tmp_acc, ABSQI (SUBQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 2), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 2))));
- tmp_acc = ADDDI (tmp_acc, ABSQI (SUBQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 3), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 3))));
- tmp_acc = ADDDI (tmp_acc, ABSQI (SUBQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 4), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 4))));
- tmp_acc = ADDDI (tmp_acc, ABSQI (SUBQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 5), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 5))));
- tmp_acc = ADDDI (tmp_acc, ABSQI (SUBQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 6), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 6))));
- tmp_acc = ADDDI (tmp_acc, ABSQI (SUBQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 7), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 7))));
- {
- DI opval = ADDDI (GET_H_GR (FLD (f_dest)), tmp_acc);
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MSHALDSL) : /* mshalds.l $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = ((LTDI (SLLDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), ANDDI (GET_H_GR (FLD (f_right)), 31)), NEGDI (SLLDI (1, SUBSI (32, 1))))) ? (NEGSI (SLLSI (1, SUBSI (32, 1)))) : (((LTDI (SLLDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), ANDDI (GET_H_GR (FLD (f_right)), 31)), SLLDI (1, SUBSI (32, 1)))) ? (SLLDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), ANDDI (GET_H_GR (FLD (f_right)), 31))) : (SUBSI (SLLSI (1, SUBSI (32, 1)), 1)))));
- tmp_result1 = ((LTDI (SLLDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0), ANDDI (GET_H_GR (FLD (f_right)), 31)), NEGDI (SLLDI (1, SUBSI (32, 1))))) ? (NEGSI (SLLSI (1, SUBSI (32, 1)))) : (((LTDI (SLLDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0), ANDDI (GET_H_GR (FLD (f_right)), 31)), SLLDI (1, SUBSI (32, 1)))) ? (SLLDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0), ANDDI (GET_H_GR (FLD (f_right)), 31))) : (SUBSI (SLLSI (1, SUBSI (32, 1)), 1)))));
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MSHALDSW) : /* mshalds.w $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- HI tmp_result3;
- HI tmp_result2;
- HI tmp_result1;
- HI tmp_result0;
- tmp_result0 = ((LTDI (SLLDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3), ANDDI (GET_H_GR (FLD (f_right)), 15)), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTDI (SLLDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3), ANDDI (GET_H_GR (FLD (f_right)), 15)), SLLDI (1, SUBSI (16, 1)))) ? (SLLDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3), ANDDI (GET_H_GR (FLD (f_right)), 15))) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_result1 = ((LTDI (SLLDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2), ANDDI (GET_H_GR (FLD (f_right)), 15)), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTDI (SLLDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2), ANDDI (GET_H_GR (FLD (f_right)), 15)), SLLDI (1, SUBSI (16, 1)))) ? (SLLDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2), ANDDI (GET_H_GR (FLD (f_right)), 15))) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_result2 = ((LTDI (SLLDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1), ANDDI (GET_H_GR (FLD (f_right)), 15)), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTDI (SLLDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1), ANDDI (GET_H_GR (FLD (f_right)), 15)), SLLDI (1, SUBSI (16, 1)))) ? (SLLDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1), ANDDI (GET_H_GR (FLD (f_right)), 15))) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_result3 = ((LTDI (SLLDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0), ANDDI (GET_H_GR (FLD (f_right)), 15)), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTDI (SLLDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0), ANDDI (GET_H_GR (FLD (f_right)), 15)), SLLDI (1, SUBSI (16, 1)))) ? (SLLDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0), ANDDI (GET_H_GR (FLD (f_right)), 15))) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- {
- DI opval = ORDI (SLLDI (ZEXTHIDI (tmp_result3), 48), ORDI (SLLDI (ZEXTHIDI (tmp_result2), 32), ORDI (SLLDI (ZEXTHIDI (tmp_result1), 16), ZEXTHIDI (tmp_result0))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MSHARDL) : /* mshard.l $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = SRASI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), ANDDI (GET_H_GR (FLD (f_right)), 31));
- tmp_result1 = SRASI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0), ANDDI (GET_H_GR (FLD (f_right)), 31));
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MSHARDW) : /* mshard.w $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- HI tmp_result3;
- HI tmp_result2;
- HI tmp_result1;
- HI tmp_result0;
- tmp_result0 = SRAHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3), ANDDI (GET_H_GR (FLD (f_right)), 15));
- tmp_result1 = SRAHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2), ANDDI (GET_H_GR (FLD (f_right)), 15));
- tmp_result2 = SRAHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1), ANDDI (GET_H_GR (FLD (f_right)), 15));
- tmp_result3 = SRAHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0), ANDDI (GET_H_GR (FLD (f_right)), 15));
- {
- DI opval = ORDI (SLLDI (ZEXTHIDI (tmp_result3), 48), ORDI (SLLDI (ZEXTHIDI (tmp_result2), 32), ORDI (SLLDI (ZEXTHIDI (tmp_result1), 16), ZEXTHIDI (tmp_result0))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MSHARDSQ) : /* mshards.q $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ((LTDI (SRADI (GET_H_GR (FLD (f_left)), ANDDI (GET_H_GR (FLD (f_right)), 63)), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGDI (SLLDI (1, SUBSI (16, 1)))) : (((LTDI (SRADI (GET_H_GR (FLD (f_left)), ANDDI (GET_H_GR (FLD (f_right)), 63)), SLLDI (1, SUBSI (16, 1)))) ? (SRADI (GET_H_GR (FLD (f_left)), ANDDI (GET_H_GR (FLD (f_right)), 63))) : (SUBDI (SLLDI (1, SUBSI (16, 1)), 1)))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MSHFHIB) : /* mshfhi.b $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_result7;
- QI tmp_result6;
- QI tmp_result5;
- QI tmp_result4;
- QI tmp_result3;
- QI tmp_result2;
- QI tmp_result1;
- QI tmp_result0;
- tmp_result0 = SUBWORDDIQI (GET_H_GR (FLD (f_left)), 3);
- tmp_result1 = SUBWORDDIQI (GET_H_GR (FLD (f_right)), 3);
- tmp_result2 = SUBWORDDIQI (GET_H_GR (FLD (f_left)), 2);
- tmp_result3 = SUBWORDDIQI (GET_H_GR (FLD (f_right)), 2);
- tmp_result4 = SUBWORDDIQI (GET_H_GR (FLD (f_left)), 1);
- tmp_result5 = SUBWORDDIQI (GET_H_GR (FLD (f_right)), 1);
- tmp_result6 = SUBWORDDIQI (GET_H_GR (FLD (f_left)), 0);
- tmp_result7 = SUBWORDDIQI (GET_H_GR (FLD (f_right)), 0);
- {
- DI opval = ORDI (SLLDI (ZEXTQIDI (tmp_result7), 56), ORDI (SLLDI (ZEXTQIDI (tmp_result6), 48), ORDI (SLLDI (ZEXTQIDI (tmp_result5), 40), ORDI (SLLDI (ZEXTQIDI (tmp_result4), 32), ORDI (SLLDI (ZEXTQIDI (tmp_result3), 24), ORDI (SLLDI (ZEXTQIDI (tmp_result2), 16), ORDI (SLLDI (ZEXTQIDI (tmp_result1), 8), ZEXTQIDI (tmp_result0))))))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MSHFHIL) : /* mshfhi.l $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = SUBWORDDISI (GET_H_GR (FLD (f_left)), 0);
- tmp_result1 = SUBWORDDISI (GET_H_GR (FLD (f_right)), 0);
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MSHFHIW) : /* mshfhi.w $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- HI tmp_result3;
- HI tmp_result2;
- HI tmp_result1;
- HI tmp_result0;
- tmp_result0 = SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1);
- tmp_result1 = SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1);
- tmp_result2 = SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0);
- tmp_result3 = SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0);
- {
- DI opval = ORDI (SLLDI (ZEXTHIDI (tmp_result3), 48), ORDI (SLLDI (ZEXTHIDI (tmp_result2), 32), ORDI (SLLDI (ZEXTHIDI (tmp_result1), 16), ZEXTHIDI (tmp_result0))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MSHFLOB) : /* mshflo.b $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_result7;
- QI tmp_result6;
- QI tmp_result5;
- QI tmp_result4;
- QI tmp_result3;
- QI tmp_result2;
- QI tmp_result1;
- QI tmp_result0;
- tmp_result0 = SUBWORDDIQI (GET_H_GR (FLD (f_left)), 7);
- tmp_result1 = SUBWORDDIQI (GET_H_GR (FLD (f_right)), 7);
- tmp_result2 = SUBWORDDIQI (GET_H_GR (FLD (f_left)), 6);
- tmp_result3 = SUBWORDDIQI (GET_H_GR (FLD (f_right)), 6);
- tmp_result4 = SUBWORDDIQI (GET_H_GR (FLD (f_left)), 5);
- tmp_result5 = SUBWORDDIQI (GET_H_GR (FLD (f_right)), 5);
- tmp_result6 = SUBWORDDIQI (GET_H_GR (FLD (f_left)), 4);
- tmp_result7 = SUBWORDDIQI (GET_H_GR (FLD (f_right)), 4);
- {
- DI opval = ORDI (SLLDI (ZEXTQIDI (tmp_result7), 56), ORDI (SLLDI (ZEXTQIDI (tmp_result6), 48), ORDI (SLLDI (ZEXTQIDI (tmp_result5), 40), ORDI (SLLDI (ZEXTQIDI (tmp_result4), 32), ORDI (SLLDI (ZEXTQIDI (tmp_result3), 24), ORDI (SLLDI (ZEXTQIDI (tmp_result2), 16), ORDI (SLLDI (ZEXTQIDI (tmp_result1), 8), ZEXTQIDI (tmp_result0))))))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MSHFLOL) : /* mshflo.l $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = SUBWORDDISI (GET_H_GR (FLD (f_left)), 1);
- tmp_result1 = SUBWORDDISI (GET_H_GR (FLD (f_right)), 1);
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MSHFLOW) : /* mshflo.w $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- HI tmp_result3;
- HI tmp_result2;
- HI tmp_result1;
- HI tmp_result0;
- tmp_result0 = SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3);
- tmp_result1 = SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3);
- tmp_result2 = SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2);
- tmp_result3 = SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2);
- {
- DI opval = ORDI (SLLDI (ZEXTHIDI (tmp_result3), 48), ORDI (SLLDI (ZEXTHIDI (tmp_result2), 32), ORDI (SLLDI (ZEXTHIDI (tmp_result1), 16), ZEXTHIDI (tmp_result0))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MSHLLDL) : /* mshlld.l $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = SLLSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), ANDDI (GET_H_GR (FLD (f_right)), 31));
- tmp_result1 = SLLSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0), ANDDI (GET_H_GR (FLD (f_right)), 31));
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MSHLLDW) : /* mshlld.w $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- HI tmp_result3;
- HI tmp_result2;
- HI tmp_result1;
- HI tmp_result0;
- tmp_result0 = SLLHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3), ANDDI (GET_H_GR (FLD (f_right)), 15));
- tmp_result1 = SLLHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2), ANDDI (GET_H_GR (FLD (f_right)), 15));
- tmp_result2 = SLLHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1), ANDDI (GET_H_GR (FLD (f_right)), 15));
- tmp_result3 = SLLHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0), ANDDI (GET_H_GR (FLD (f_right)), 15));
- {
- DI opval = ORDI (SLLDI (ZEXTHIDI (tmp_result3), 48), ORDI (SLLDI (ZEXTHIDI (tmp_result2), 32), ORDI (SLLDI (ZEXTHIDI (tmp_result1), 16), ZEXTHIDI (tmp_result0))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MSHLRDL) : /* mshlrd.l $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = SRLSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), ANDDI (GET_H_GR (FLD (f_right)), 31));
- tmp_result1 = SRLSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0), ANDDI (GET_H_GR (FLD (f_right)), 31));
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MSHLRDW) : /* mshlrd.w $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- HI tmp_result3;
- HI tmp_result2;
- HI tmp_result1;
- HI tmp_result0;
- tmp_result0 = SRLHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3), ANDDI (GET_H_GR (FLD (f_right)), 15));
- tmp_result1 = SRLHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2), ANDDI (GET_H_GR (FLD (f_right)), 15));
- tmp_result2 = SRLHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1), ANDDI (GET_H_GR (FLD (f_right)), 15));
- tmp_result3 = SRLHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0), ANDDI (GET_H_GR (FLD (f_right)), 15));
- {
- DI opval = ORDI (SLLDI (ZEXTHIDI (tmp_result3), 48), ORDI (SLLDI (ZEXTHIDI (tmp_result2), 32), ORDI (SLLDI (ZEXTHIDI (tmp_result1), 16), ZEXTHIDI (tmp_result0))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MSUBL) : /* msub.l $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = SUBSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), SUBWORDDISI (GET_H_GR (FLD (f_right)), 1));
- tmp_result1 = SUBSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0), SUBWORDDISI (GET_H_GR (FLD (f_right)), 0));
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MSUBW) : /* msub.w $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- HI tmp_result3;
- HI tmp_result2;
- HI tmp_result1;
- HI tmp_result0;
- tmp_result0 = SUBHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3));
- tmp_result1 = SUBHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2));
- tmp_result2 = SUBHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1));
- tmp_result3 = SUBHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0));
- {
- DI opval = ORDI (SLLDI (ZEXTHIDI (tmp_result3), 48), ORDI (SLLDI (ZEXTHIDI (tmp_result2), 32), ORDI (SLLDI (ZEXTHIDI (tmp_result1), 16), ZEXTHIDI (tmp_result0))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MSUBSL) : /* msubs.l $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = ((LTDI (SUBDI (EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1)), EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 1))), NEGDI (SLLDI (1, SUBSI (32, 1))))) ? (NEGSI (SLLSI (1, SUBSI (32, 1)))) : (((LTDI (SUBDI (EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1)), EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 1))), SLLDI (1, SUBSI (32, 1)))) ? (SUBDI (EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1)), EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 1)))) : (SUBSI (SLLSI (1, SUBSI (32, 1)), 1)))));
- tmp_result1 = ((LTDI (SUBDI (EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0)), EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 0))), NEGDI (SLLDI (1, SUBSI (32, 1))))) ? (NEGSI (SLLSI (1, SUBSI (32, 1)))) : (((LTDI (SUBDI (EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0)), EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 0))), SLLDI (1, SUBSI (32, 1)))) ? (SUBDI (EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0)), EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 0)))) : (SUBSI (SLLSI (1, SUBSI (32, 1)), 1)))));
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MSUBSUB) : /* msubs.ub $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_result7;
- QI tmp_result6;
- QI tmp_result5;
- QI tmp_result4;
- QI tmp_result3;
- QI tmp_result2;
- QI tmp_result1;
- QI tmp_result0;
- tmp_result0 = ((LTDI (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 7)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 7))), MAKEDI (0, 0))) ? (0) : (((LTDI (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 7)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 7))), SLLDI (1, 8))) ? (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 7)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 7)))) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result1 = ((LTDI (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 6)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 6))), MAKEDI (0, 0))) ? (0) : (((LTDI (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 6)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 6))), SLLDI (1, 8))) ? (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 6)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 6)))) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result2 = ((LTDI (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 5)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 5))), MAKEDI (0, 0))) ? (0) : (((LTDI (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 5)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 5))), SLLDI (1, 8))) ? (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 5)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 5)))) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result3 = ((LTDI (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 4)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 4))), MAKEDI (0, 0))) ? (0) : (((LTDI (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 4)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 4))), SLLDI (1, 8))) ? (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 4)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 4)))) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result4 = ((LTDI (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 3)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 3))), MAKEDI (0, 0))) ? (0) : (((LTDI (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 3)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 3))), SLLDI (1, 8))) ? (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 3)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 3)))) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result5 = ((LTDI (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 2)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 2))), MAKEDI (0, 0))) ? (0) : (((LTDI (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 2)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 2))), SLLDI (1, 8))) ? (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 2)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 2)))) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result6 = ((LTDI (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 1)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 1))), MAKEDI (0, 0))) ? (0) : (((LTDI (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 1)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 1))), SLLDI (1, 8))) ? (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 1)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 1)))) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result7 = ((LTDI (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 0)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 0))), MAKEDI (0, 0))) ? (0) : (((LTDI (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 0)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 0))), SLLDI (1, 8))) ? (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 0)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 0)))) : (SUBQI (SLLQI (1, 8), 1)))));
- {
- DI opval = ORDI (SLLDI (ZEXTQIDI (tmp_result7), 56), ORDI (SLLDI (ZEXTQIDI (tmp_result6), 48), ORDI (SLLDI (ZEXTQIDI (tmp_result5), 40), ORDI (SLLDI (ZEXTQIDI (tmp_result4), 32), ORDI (SLLDI (ZEXTQIDI (tmp_result3), 24), ORDI (SLLDI (ZEXTQIDI (tmp_result2), 16), ORDI (SLLDI (ZEXTQIDI (tmp_result1), 8), ZEXTQIDI (tmp_result0))))))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MSUBSW) : /* msubs.w $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_result7;
- QI tmp_result6;
- QI tmp_result5;
- QI tmp_result4;
- QI tmp_result3;
- QI tmp_result2;
- QI tmp_result1;
- QI tmp_result0;
- tmp_result0 = ((LTDI (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 7)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 7))), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTDI (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 7)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 7))), SLLDI (1, SUBSI (16, 1)))) ? (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 7)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 7)))) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_result1 = ((LTDI (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 6)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 6))), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTDI (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 6)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 6))), SLLDI (1, SUBSI (16, 1)))) ? (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 6)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 6)))) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_result2 = ((LTDI (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 5)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 5))), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTDI (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 5)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 5))), SLLDI (1, SUBSI (16, 1)))) ? (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 5)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 5)))) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_result3 = ((LTDI (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 4)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 4))), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTDI (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 4)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 4))), SLLDI (1, SUBSI (16, 1)))) ? (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 4)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 4)))) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_result4 = ((LTDI (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 3)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 3))), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTDI (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 3)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 3))), SLLDI (1, SUBSI (16, 1)))) ? (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 3)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 3)))) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_result5 = ((LTDI (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 2)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 2))), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTDI (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 2)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 2))), SLLDI (1, SUBSI (16, 1)))) ? (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 2)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 2)))) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_result6 = ((LTDI (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 1)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 1))), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTDI (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 1)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 1))), SLLDI (1, SUBSI (16, 1)))) ? (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 1)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 1)))) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_result7 = ((LTDI (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 0)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 0))), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTDI (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 0)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 0))), SLLDI (1, SUBSI (16, 1)))) ? (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 0)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 0)))) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- {
- DI opval = ORDI (SLLDI (ZEXTQIDI (tmp_result7), 56), ORDI (SLLDI (ZEXTQIDI (tmp_result6), 48), ORDI (SLLDI (ZEXTQIDI (tmp_result5), 40), ORDI (SLLDI (ZEXTQIDI (tmp_result4), 32), ORDI (SLLDI (ZEXTQIDI (tmp_result3), 24), ORDI (SLLDI (ZEXTQIDI (tmp_result2), 16), ORDI (SLLDI (ZEXTQIDI (tmp_result1), 8), ZEXTQIDI (tmp_result0))))))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MULSL) : /* muls.l $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = MULDI (EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1)), EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 1)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_MULUL) : /* mulu.l $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = MULDI (ZEXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1)), ZEXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 1)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_NOP) : /* nop */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_NSB) : /* nsb $rm, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_xori.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = sh64_nsb (current_cpu, GET_H_GR (FLD (f_left)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_OCBI) : /* ocbi $rm, $disp6x32 */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_OCBP) : /* ocbp $rm, $disp6x32 */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_OCBWB) : /* ocbwb $rm, $disp6x32 */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_OR) : /* or $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ORDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_ORI) : /* ori $rm, $imm10, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_ori.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ORDI (GET_H_GR (FLD (f_left)), EXTSIDI (FLD (f_imm10)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_PREFI) : /* prefi $rm, $disp6x32 */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_PTA) : /* pta$likely $disp16, $tra */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_pta.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ADDSI (FLD (f_disp16), 1);
- CPU (h_tr[FLD (f_tra)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "tr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_PTABS) : /* ptabs$likely $rn, $tra */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_beq.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = GET_H_GR (FLD (f_right));
- CPU (h_tr[FLD (f_tra)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "tr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_PTB) : /* ptb$likely $disp16, $tra */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_pta.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = FLD (f_disp16);
- CPU (h_tr[FLD (f_tra)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "tr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_PTREL) : /* ptrel$likely $rn, $tra */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_beq.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ADDDI (pc, GET_H_GR (FLD (f_right)));
- CPU (h_tr[FLD (f_tra)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "tr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_PUTCFG) : /* putcfg $rm, $disp6, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_PUTCON) : /* putcon $rm, $crj */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_xori.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = GET_H_GR (FLD (f_left));
- SET_H_CR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "cr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_RTE) : /* rte */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SHARD) : /* shard $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = SRADI (GET_H_GR (FLD (f_left)), ANDDI (GET_H_GR (FLD (f_right)), 63));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SHARDL) : /* shard.l $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = EXTSIDI (SRASI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), ANDDI (GET_H_GR (FLD (f_right)), 63)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SHARI) : /* shari $rm, $uimm6, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_shari.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = SRADI (GET_H_GR (FLD (f_left)), FLD (f_uimm6));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SHARIL) : /* shari.l $rm, $uimm6, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_shari.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = EXTSIDI (SRASI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), ANDSI (FLD (f_uimm6), 63)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SHLLD) : /* shlld $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = SLLDI (GET_H_GR (FLD (f_left)), ANDDI (GET_H_GR (FLD (f_right)), 63));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SHLLDL) : /* shlld.l $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = EXTSIDI (SLLSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), ANDDI (GET_H_GR (FLD (f_right)), 63)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SHLLI) : /* shlli $rm, $uimm6, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_shari.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = SLLDI (GET_H_GR (FLD (f_left)), FLD (f_uimm6));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SHLLIL) : /* shlli.l $rm, $uimm6, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_shari.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = EXTSIDI (SLLSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), ANDSI (FLD (f_uimm6), 63)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SHLRD) : /* shlrd $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = SRLDI (GET_H_GR (FLD (f_left)), ANDDI (GET_H_GR (FLD (f_right)), 63));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SHLRDL) : /* shlrd.l $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = EXTSIDI (SRLSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), ANDDI (GET_H_GR (FLD (f_right)), 63)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SHLRI) : /* shlri $rm, $uimm6, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_shari.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = SRLDI (GET_H_GR (FLD (f_left)), FLD (f_uimm6));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SHLRIL) : /* shlri.l $rm, $uimm6, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_shari.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = EXTSIDI (SRLSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), ANDSI (FLD (f_uimm6), 63)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SHORI) : /* shori $uimm16, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_shori.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ORDI (SLLDI (GET_H_GR (FLD (f_dest)), 16), ZEXTSIDI (FLD (f_uimm16)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SLEEP) : /* sleep */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_STB) : /* st.b $rm, $disp10, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- UQI opval = ANDQI (GET_H_GR (FLD (f_dest)), 255);
- SETMEMUQI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), EXTSIDI (FLD (f_disp10))), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_STL) : /* st.l $rm, $disp10x4, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_flds.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SI opval = ANDSI (GET_H_GR (FLD (f_dest)), 0xffffffff);
- SETMEMSI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), EXTSIDI (FLD (f_disp10x4))), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_STQ) : /* st.q $rm, $disp10x8, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_fldd.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = GET_H_GR (FLD (f_dest));
- SETMEMDI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), EXTSIDI (FLD (f_disp10x8))), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_STW) : /* st.w $rm, $disp10x2, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_lduw.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- HI opval = ANDHI (GET_H_GR (FLD (f_dest)), 65535);
- SETMEMHI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), EXTSIDI (FLD (f_disp10x2))), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_STHIL) : /* sthi.l $rm, $disp6, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_ldhil.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- DI tmp_addr;
- QI tmp_bytecount;
- DI tmp_val;
- tmp_addr = ADDDI (GET_H_GR (FLD (f_left)), FLD (f_disp6));
- tmp_bytecount = ADDDI (ANDDI (tmp_addr, 3), 1);
-if (ANDQI (tmp_bytecount, 4)) {
- {
- SI opval = GET_H_GR (FLD (f_dest));
- SETMEMSI (current_cpu, pc, ANDDI (tmp_addr, -4), opval);
- written |= (1 << 5);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-} else {
-if (GET_H_ENDIAN ()) {
-{
- tmp_val = GET_H_GR (FLD (f_dest));
-if (ANDQI (tmp_bytecount, 1)) {
-{
- {
- UQI opval = ANDQI (tmp_val, 255);
- SETMEMUQI (current_cpu, pc, tmp_addr, opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 8);
-}
-}
-if (ANDQI (tmp_bytecount, 2)) {
-{
- {
- HI opval = ANDHI (tmp_val, 65535);
- SETMEMHI (current_cpu, pc, ANDDI (tmp_addr, -4), opval);
- written |= (1 << 4);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 16);
-}
-}
-}
-} else {
-{
- tmp_val = SRLDI (GET_H_GR (FLD (f_dest)), SUBSI (32, MULSI (8, tmp_bytecount)));
-if (ANDQI (tmp_bytecount, 2)) {
-{
- {
- HI opval = ANDHI (tmp_val, 65535);
- SETMEMHI (current_cpu, pc, ANDDI (tmp_addr, -4), opval);
- written |= (1 << 4);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 16);
-}
-}
-if (ANDQI (tmp_bytecount, 1)) {
-{
- {
- UQI opval = ANDQI (tmp_val, 255);
- SETMEMUQI (current_cpu, pc, tmp_addr, opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 8);
-}
-}
-}
-}
-}
-}
-
- abuf->written = written;
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_STHIQ) : /* sthi.q $rm, $disp6, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_ldhil.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- DI tmp_addr;
- QI tmp_bytecount;
- DI tmp_val;
- tmp_addr = ADDDI (GET_H_GR (FLD (f_left)), FLD (f_disp6));
- tmp_bytecount = ADDDI (ANDDI (tmp_addr, 7), 1);
-if (ANDQI (tmp_bytecount, 8)) {
- {
- DI opval = GET_H_GR (FLD (f_dest));
- SETMEMDI (current_cpu, pc, ANDDI (tmp_addr, -8), opval);
- written |= (1 << 4);
- TRACE_RESULT (current_cpu, abuf, "memory", 'D', opval);
- }
-} else {
-if (GET_H_ENDIAN ()) {
-{
- tmp_val = GET_H_GR (FLD (f_dest));
-if (ANDQI (tmp_bytecount, 1)) {
-{
- {
- UQI opval = ANDQI (tmp_val, 255);
- SETMEMUQI (current_cpu, pc, tmp_addr, opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 8);
-}
-}
-if (ANDQI (tmp_bytecount, 2)) {
-{
- {
- HI opval = ANDHI (tmp_val, 65535);
- SETMEMHI (current_cpu, pc, ANDDI (tmp_addr, -4), opval);
- written |= (1 << 5);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 16);
-}
-}
-if (ANDQI (tmp_bytecount, 4)) {
-{
- {
- SI opval = ANDSI (tmp_val, 0xffffffff);
- SETMEMSI (current_cpu, pc, ANDDI (tmp_addr, -8), opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 32);
-}
-}
-}
-} else {
-{
- tmp_val = SRLDI (GET_H_GR (FLD (f_dest)), SUBSI (64, MULSI (8, tmp_bytecount)));
-if (ANDQI (tmp_bytecount, 4)) {
-{
- {
- SI opval = ANDSI (tmp_val, 0xffffffff);
- SETMEMSI (current_cpu, pc, ANDDI (tmp_addr, -8), opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 32);
-}
-}
-if (ANDQI (tmp_bytecount, 2)) {
-{
- {
- HI opval = ANDHI (tmp_val, 65535);
- SETMEMHI (current_cpu, pc, ANDDI (tmp_addr, -4), opval);
- written |= (1 << 5);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 16);
-}
-}
-if (ANDQI (tmp_bytecount, 1)) {
-{
- {
- UQI opval = ANDQI (tmp_val, 255);
- SETMEMUQI (current_cpu, pc, tmp_addr, opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 8);
-}
-}
-}
-}
-}
-}
-
- abuf->written = written;
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_STLOL) : /* stlo.l $rm, $disp6, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_ldhil.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- DI tmp_addr;
- QI tmp_bytecount;
- DI tmp_val;
- tmp_addr = ADDDI (GET_H_GR (FLD (f_left)), FLD (f_disp6));
- tmp_bytecount = SUBSI (4, ANDDI (tmp_addr, 3));
-if (ANDQI (tmp_bytecount, 4)) {
- {
- USI opval = GET_H_GR (FLD (f_dest));
- SETMEMUSI (current_cpu, pc, tmp_addr, opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-} else {
-if (GET_H_ENDIAN ()) {
-{
- tmp_val = SRLDI (GET_H_GR (FLD (f_dest)), SUBSI (32, MULSI (8, tmp_bytecount)));
-if (ANDQI (tmp_bytecount, 2)) {
-{
- {
- UHI opval = ANDHI (tmp_val, 65535);
- SETMEMUHI (current_cpu, pc, ANDDI (ADDDI (tmp_addr, 1), -2), opval);
- written |= (1 << 4);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 16);
-}
-}
-if (ANDQI (tmp_bytecount, 1)) {
-{
- {
- UQI opval = ANDQI (tmp_val, 255);
- SETMEMUQI (current_cpu, pc, tmp_addr, opval);
- written |= (1 << 5);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 8);
-}
-}
-}
-} else {
-{
- tmp_val = GET_H_GR (FLD (f_dest));
-if (ANDQI (tmp_bytecount, 1)) {
-{
- {
- UQI opval = ANDQI (tmp_val, 255);
- SETMEMUQI (current_cpu, pc, tmp_addr, opval);
- written |= (1 << 5);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 8);
-}
-}
-if (ANDQI (tmp_bytecount, 2)) {
-{
- {
- UHI opval = ANDHI (tmp_val, 65535);
- SETMEMUHI (current_cpu, pc, ANDDI (ADDDI (tmp_addr, 1), -2), opval);
- written |= (1 << 4);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 16);
-}
-}
-}
-}
-}
-}
-
- abuf->written = written;
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_STLOQ) : /* stlo.q $rm, $disp6, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_ldhil.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- DI tmp_addr;
- QI tmp_bytecount;
- DI tmp_val;
- tmp_addr = ADDDI (GET_H_GR (FLD (f_left)), FLD (f_disp6));
- tmp_bytecount = SUBSI (8, ANDDI (tmp_addr, 7));
-if (ANDQI (tmp_bytecount, 8)) {
- {
- UDI opval = GET_H_GR (FLD (f_dest));
- SETMEMUDI (current_cpu, pc, tmp_addr, opval);
- written |= (1 << 4);
- TRACE_RESULT (current_cpu, abuf, "memory", 'D', opval);
- }
-} else {
-if (GET_H_ENDIAN ()) {
-{
- tmp_val = SRLDI (GET_H_GR (FLD (f_dest)), SUBSI (64, MULSI (8, tmp_bytecount)));
-if (ANDQI (tmp_bytecount, 4)) {
-{
- {
- USI opval = ANDSI (tmp_val, 0xffffffff);
- SETMEMUSI (current_cpu, pc, ANDDI (ADDDI (tmp_addr, 3), -4), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 32);
-}
-}
-if (ANDQI (tmp_bytecount, 2)) {
-{
- {
- UHI opval = ANDHI (tmp_val, 65535);
- SETMEMUHI (current_cpu, pc, ANDDI (ADDDI (tmp_addr, 1), -2), opval);
- written |= (1 << 5);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 16);
-}
-}
-if (ANDQI (tmp_bytecount, 1)) {
-{
- {
- UQI opval = ANDQI (tmp_val, 255);
- SETMEMUQI (current_cpu, pc, tmp_addr, opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 8);
-}
-}
-}
-} else {
-{
- tmp_val = GET_H_GR (FLD (f_dest));
-if (ANDQI (tmp_bytecount, 1)) {
-{
- {
- UQI opval = ANDQI (tmp_val, 255);
- SETMEMUQI (current_cpu, pc, tmp_addr, opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 8);
-}
-}
-if (ANDQI (tmp_bytecount, 2)) {
-{
- {
- UHI opval = ANDHI (tmp_val, 65535);
- SETMEMUHI (current_cpu, pc, ANDDI (ADDDI (tmp_addr, 1), -2), opval);
- written |= (1 << 5);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 16);
-}
-}
-if (ANDQI (tmp_bytecount, 4)) {
-{
- {
- USI opval = ANDSI (tmp_val, 0xffffffff);
- SETMEMUSI (current_cpu, pc, ANDDI (ADDDI (tmp_addr, 3), -4), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 32);
-}
-}
-}
-}
-}
-}
-
- abuf->written = written;
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_STXB) : /* stx.b $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- UQI opval = SUBWORDDIQI (GET_H_GR (FLD (f_dest)), 7);
- SETMEMUQI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right))), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_STXL) : /* stx.l $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SI opval = SUBWORDDISI (GET_H_GR (FLD (f_dest)), 1);
- SETMEMSI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right))), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_STXQ) : /* stx.q $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = GET_H_GR (FLD (f_dest));
- SETMEMDI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right))), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_STXW) : /* stx.w $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- HI opval = SUBWORDDIHI (GET_H_GR (FLD (f_dest)), 3);
- SETMEMHI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right))), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SUB) : /* sub $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = SUBDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SUBL) : /* sub.l $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = EXTSIDI (SUBSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), SUBWORDDISI (GET_H_GR (FLD (f_right)), 1)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SWAPQ) : /* swap.q $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- DI tmp_addr;
- DI tmp_temp;
- tmp_addr = ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)));
- tmp_temp = GETMEMDI (current_cpu, pc, tmp_addr);
- {
- DI opval = GET_H_GR (FLD (f_dest));
- SETMEMDI (current_cpu, pc, tmp_addr, opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'D', opval);
- }
- {
- DI opval = tmp_temp;
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SYNCI) : /* synci */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_SYNCO) : /* synco */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_TRAPA) : /* trapa $rm */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_xori.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-sh64_trapa (current_cpu, GET_H_GR (FLD (f_left)), pc);
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_XOR) : /* xor $rm, $rn, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = XORDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
- CASE (sem, INSN_XORI) : /* xori $rm, $imm6, $rd */
-{
- SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_xori.f
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = XORDI (GET_H_GR (FLD (f_left)), EXTSIDI (FLD (f_imm6)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
-#undef FLD
-}
- NEXT (vpc);
-
-
- }
- ENDSWITCH (sem) /* End of semantic switch. */
-
- /* At this point `vpc' contains the next insn to execute. */
-}
-
-#undef DEFINE_SWITCH
-#endif /* DEFINE_SWITCH */
diff --git a/sim/sh64/sem-media.c b/sim/sh64/sem-media.c
deleted file mode 100644
index aee11ccf174..00000000000
--- a/sim/sh64/sem-media.c
+++ /dev/null
@@ -1,5965 +0,0 @@
-/* Simulator instruction semantics for sh64.
-
-THIS FILE IS MACHINE GENERATED WITH CGEN.
-
-Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
-
-This file is part of the GNU simulators.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-
-#define WANT_CPU sh64
-#define WANT_CPU_SH64
-
-#include "sim-main.h"
-#include "cgen-mem.h"
-#include "cgen-ops.h"
-
-#undef GET_ATTR
-#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-#define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_##attr)
-#else
-#define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_/**/attr)
-#endif
-
-/* This is used so that we can compile two copies of the semantic code,
- one with full feature support and one without that runs fast(er).
- FAST_P, when desired, is defined on the command line, -DFAST_P=1. */
-#if FAST_P
-#define SEM_FN_NAME(cpu,fn) XCONCAT3 (cpu,_semf_,fn)
-#undef TRACE_RESULT
-#define TRACE_RESULT(cpu, abuf, name, type, val)
-#else
-#define SEM_FN_NAME(cpu,fn) XCONCAT3 (cpu,_sem_,fn)
-#endif
-
-/* x-invalid: --invalid-- */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,x_invalid) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
- {
- /* Update the recorded pc in the cpu state struct.
- Only necessary for WITH_SCACHE case, but to avoid the
- conditional compilation .... */
- SET_H_PC (pc);
- /* Virtual insns have zero size. Overwrite vpc with address of next insn
- using the default-insn-bitsize spec. When executing insns in parallel
- we may want to queue the fault and continue execution. */
- vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
- vpc = sim_engine_invalid_insn (current_cpu, pc, vpc);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* x-after: --after-- */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,x_after) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
- {
-#if WITH_SCACHE_PBB_SH64_MEDIA
- sh64_media_pbb_after (current_cpu, sem_arg);
-#endif
- }
-
- return vpc;
-#undef FLD
-}
-
-/* x-before: --before-- */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,x_before) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
- {
-#if WITH_SCACHE_PBB_SH64_MEDIA
- sh64_media_pbb_before (current_cpu, sem_arg);
-#endif
- }
-
- return vpc;
-#undef FLD
-}
-
-/* x-cti-chain: --cti-chain-- */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,x_cti_chain) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
- {
-#if WITH_SCACHE_PBB_SH64_MEDIA
-#ifdef DEFINE_SWITCH
- vpc = sh64_media_pbb_cti_chain (current_cpu, sem_arg,
- pbb_br_type, pbb_br_npc);
- BREAK (sem);
-#else
- /* FIXME: Allow provision of explicit ifmt spec in insn spec. */
- vpc = sh64_media_pbb_cti_chain (current_cpu, sem_arg,
- CPU_PBB_BR_TYPE (current_cpu),
- CPU_PBB_BR_NPC (current_cpu));
-#endif
-#endif
- }
-
- return vpc;
-#undef FLD
-}
-
-/* x-chain: --chain-- */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,x_chain) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
- {
-#if WITH_SCACHE_PBB_SH64_MEDIA
- vpc = sh64_media_pbb_chain (current_cpu, sem_arg);
-#ifdef DEFINE_SWITCH
- BREAK (sem);
-#endif
-#endif
- }
-
- return vpc;
-#undef FLD
-}
-
-/* x-begin: --begin-- */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,x_begin) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
- {
-#if WITH_SCACHE_PBB_SH64_MEDIA
-#if defined DEFINE_SWITCH || defined FAST_P
- /* In the switch case FAST_P is a constant, allowing several optimizations
- in any called inline functions. */
- vpc = sh64_media_pbb_begin (current_cpu, FAST_P);
-#else
-#if 0 /* cgen engine can't handle dynamic fast/full switching yet. */
- vpc = sh64_media_pbb_begin (current_cpu, STATE_RUN_FAST_P (CPU_STATE (current_cpu)));
-#else
- vpc = sh64_media_pbb_begin (current_cpu, 0);
-#endif
-#endif
-#endif
- }
-
- return vpc;
-#undef FLD
-}
-
-/* add: add $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,add) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* addl: add.l $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,addl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ADDSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), SUBWORDDISI (GET_H_GR (FLD (f_right)), 1));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* addi: addi $rm, $disp10, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,addi) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ADDDI (GET_H_GR (FLD (f_left)), EXTSIDI (FLD (f_disp10)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* addil: addi.l $rm, $disp10, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,addil) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = EXTSIDI (ADDSI (EXTSISI (FLD (f_disp10)), SUBWORDDISI (GET_H_GR (FLD (f_left)), 1)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* addzl: addz.l $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,addzl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ZEXTSIDI (ADDSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), SUBWORDDISI (GET_H_GR (FLD (f_right)), 1)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* alloco: alloco $rm, $disp6x32 */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,alloco) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
- return vpc;
-#undef FLD
-}
-
-/* and: and $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,and) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ANDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* andc: andc $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,andc) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ANDDI (GET_H_GR (FLD (f_left)), INVDI (GET_H_GR (FLD (f_right))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* andi: andi $rm, $disp10, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,andi) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ANDDI (GET_H_GR (FLD (f_left)), EXTSIDI (FLD (f_disp10)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* beq: beq$likely $rm, $rn, $tra */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,beq) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_beq.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-if (EQDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)))) {
- {
- UDI opval = CPU (h_tr[FLD (f_tra)]);
- SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
- written |= (1 << 3);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-
- abuf->written = written;
- SEM_BRANCH_FINI (vpc);
- return vpc;
-#undef FLD
-}
-
-/* beqi: beqi$likely $rm, $imm6, $tra */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,beqi) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_beqi.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-if (EQDI (GET_H_GR (FLD (f_left)), EXTSIDI (FLD (f_imm6)))) {
- {
- UDI opval = CPU (h_tr[FLD (f_tra)]);
- SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
- written |= (1 << 3);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-
- abuf->written = written;
- SEM_BRANCH_FINI (vpc);
- return vpc;
-#undef FLD
-}
-
-/* bge: bge$likely $rm, $rn, $tra */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,bge) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_beq.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-if (GEDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)))) {
- {
- UDI opval = CPU (h_tr[FLD (f_tra)]);
- SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
- written |= (1 << 3);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-
- abuf->written = written;
- SEM_BRANCH_FINI (vpc);
- return vpc;
-#undef FLD
-}
-
-/* bgeu: bgeu$likely $rm, $rn, $tra */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,bgeu) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_beq.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-if (GEUDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)))) {
- {
- UDI opval = CPU (h_tr[FLD (f_tra)]);
- SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
- written |= (1 << 3);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-
- abuf->written = written;
- SEM_BRANCH_FINI (vpc);
- return vpc;
-#undef FLD
-}
-
-/* bgt: bgt$likely $rm, $rn, $tra */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,bgt) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_beq.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-if (GTDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)))) {
- {
- UDI opval = CPU (h_tr[FLD (f_tra)]);
- SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
- written |= (1 << 3);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-
- abuf->written = written;
- SEM_BRANCH_FINI (vpc);
- return vpc;
-#undef FLD
-}
-
-/* bgtu: bgtu$likely $rm, $rn, $tra */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,bgtu) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_beq.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-if (GTUDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)))) {
- {
- UDI opval = CPU (h_tr[FLD (f_tra)]);
- SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
- written |= (1 << 3);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-
- abuf->written = written;
- SEM_BRANCH_FINI (vpc);
- return vpc;
-#undef FLD
-}
-
-/* blink: blink $trb, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,blink) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_blink.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- {
- DI opval = ORDI (ADDDI (pc, 4), 1);
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
- {
- UDI opval = CPU (h_tr[FLD (f_trb)]);
- SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-
- SEM_BRANCH_FINI (vpc);
- return vpc;
-#undef FLD
-}
-
-/* bne: bne$likely $rm, $rn, $tra */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,bne) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_beq.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-if (NEDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)))) {
- {
- UDI opval = CPU (h_tr[FLD (f_tra)]);
- SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
- written |= (1 << 3);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-
- abuf->written = written;
- SEM_BRANCH_FINI (vpc);
- return vpc;
-#undef FLD
-}
-
-/* bnei: bnei$likely $rm, $imm6, $tra */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,bnei) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_beqi.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_BRANCH_INIT
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-if (NEDI (GET_H_GR (FLD (f_left)), EXTSIDI (FLD (f_imm6)))) {
- {
- UDI opval = CPU (h_tr[FLD (f_tra)]);
- SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
- written |= (1 << 3);
- TRACE_RESULT (current_cpu, abuf, "pc", 'D', opval);
- }
-}
-
- abuf->written = written;
- SEM_BRANCH_FINI (vpc);
- return vpc;
-#undef FLD
-}
-
-/* brk: brk */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,brk) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-sh64_break (current_cpu, pc);
-
- return vpc;
-#undef FLD
-}
-
-/* byterev: byterev $rm, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,byterev) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_xori.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- DI tmp_source;
- DI tmp_result;
- tmp_source = GET_H_GR (FLD (f_left));
- tmp_result = 0;
-{
- tmp_result = ORDI (SLLDI (tmp_result, 8), ANDDI (tmp_source, 255));
- tmp_source = SRLDI (tmp_source, 8);
-}
-{
- tmp_result = ORDI (SLLDI (tmp_result, 8), ANDDI (tmp_source, 255));
- tmp_source = SRLDI (tmp_source, 8);
-}
-{
- tmp_result = ORDI (SLLDI (tmp_result, 8), ANDDI (tmp_source, 255));
- tmp_source = SRLDI (tmp_source, 8);
-}
-{
- tmp_result = ORDI (SLLDI (tmp_result, 8), ANDDI (tmp_source, 255));
- tmp_source = SRLDI (tmp_source, 8);
-}
-{
- tmp_result = ORDI (SLLDI (tmp_result, 8), ANDDI (tmp_source, 255));
- tmp_source = SRLDI (tmp_source, 8);
-}
-{
- tmp_result = ORDI (SLLDI (tmp_result, 8), ANDDI (tmp_source, 255));
- tmp_source = SRLDI (tmp_source, 8);
-}
-{
- tmp_result = ORDI (SLLDI (tmp_result, 8), ANDDI (tmp_source, 255));
- tmp_source = SRLDI (tmp_source, 8);
-}
-{
- tmp_result = ORDI (SLLDI (tmp_result, 8), ANDDI (tmp_source, 255));
- tmp_source = SRLDI (tmp_source, 8);
-}
- {
- DI opval = tmp_result;
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* cmpeq: cmpeq $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,cmpeq) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ((EQDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)))) ? (1) : (0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* cmpgt: cmpgt $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,cmpgt) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ((GTDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)))) ? (1) : (0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* cmpgtu: cmpgtu $rm,$rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,cmpgtu) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ((GTUDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)))) ? (1) : (0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* cmveq: cmveq $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,cmveq) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-if (EQDI (GET_H_GR (FLD (f_left)), 0)) {
- {
- DI opval = GET_H_GR (FLD (f_right));
- SET_H_GR (FLD (f_dest), opval);
- written |= (1 << 2);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- abuf->written = written;
- return vpc;
-#undef FLD
-}
-
-/* cmvne: cmvne $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,cmvne) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-if (NEDI (GET_H_GR (FLD (f_left)), 0)) {
- {
- DI opval = GET_H_GR (FLD (f_right));
- SET_H_GR (FLD (f_dest), opval);
- written |= (1 << 2);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- abuf->written = written;
- return vpc;
-#undef FLD
-}
-
-/* fabsd: fabs.d $drgh, $drf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fabsd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = sh64_fabsd (current_cpu, GET_H_DR (FLD (f_left_right)));
- SET_H_DR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "dr", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fabss: fabs.s $frgh, $frf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fabss) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = sh64_fabss (current_cpu, CPU (h_fr[FLD (f_left_right)]));
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* faddd: fadd.d $drg, $drh, $drf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,faddd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = sh64_faddd (current_cpu, GET_H_DR (FLD (f_left)), GET_H_DR (FLD (f_right)));
- SET_H_DR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "dr", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fadds: fadd.s $frg, $frh, $frf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fadds) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = sh64_fadds (current_cpu, CPU (h_fr[FLD (f_left)]), CPU (h_fr[FLD (f_right)]));
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fcmpeqd: fcmpeq.d $drg, $drh, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fcmpeqd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ZEXTBIDI (sh64_fcmpeqd (current_cpu, GET_H_DR (FLD (f_left)), GET_H_DR (FLD (f_right))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fcmpeqs: fcmpeq.s $frg, $frh, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fcmpeqs) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ZEXTBIDI (sh64_fcmpeqs (current_cpu, CPU (h_fr[FLD (f_left)]), CPU (h_fr[FLD (f_right)])));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fcmpged: fcmpge.d $drg, $drh, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fcmpged) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ZEXTBIDI (sh64_fcmpged (current_cpu, GET_H_DR (FLD (f_left)), GET_H_DR (FLD (f_right))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fcmpges: fcmpge.s $frg, $frh, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fcmpges) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ZEXTBIDI (sh64_fcmpges (current_cpu, CPU (h_fr[FLD (f_left)]), CPU (h_fr[FLD (f_right)])));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fcmpgtd: fcmpgt.d $drg, $drh, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fcmpgtd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ZEXTBIDI (sh64_fcmpgtd (current_cpu, GET_H_DR (FLD (f_left)), GET_H_DR (FLD (f_right))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fcmpgts: fcmpgt.s $frg, $frh, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fcmpgts) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ZEXTBIDI (sh64_fcmpgts (current_cpu, CPU (h_fr[FLD (f_left)]), CPU (h_fr[FLD (f_right)])));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fcmpund: fcmpun.d $drg, $drh, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fcmpund) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ZEXTBIDI (sh64_fcmpund (current_cpu, GET_H_DR (FLD (f_left)), GET_H_DR (FLD (f_right))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fcmpuns: fcmpun.s $frg, $frh, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fcmpuns) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ZEXTBIDI (sh64_fcmpuns (current_cpu, CPU (h_fr[FLD (f_left)]), CPU (h_fr[FLD (f_right)])));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fcnvds: fcnv.ds $drgh, $frf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fcnvds) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = sh64_fcnvds (current_cpu, GET_H_DR (FLD (f_left_right)));
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fcnvsd: fcnv.sd $frgh, $drf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fcnvsd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = sh64_fcnvsd (current_cpu, CPU (h_fr[FLD (f_left_right)]));
- SET_H_DR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "dr", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fdivd: fdiv.d $drg, $drh, $drf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fdivd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = sh64_fdivd (current_cpu, GET_H_DR (FLD (f_left)), GET_H_DR (FLD (f_right)));
- SET_H_DR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "dr", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fdivs: fdiv.s $frg, $frh, $frf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fdivs) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = sh64_fdivs (current_cpu, CPU (h_fr[FLD (f_left)]), CPU (h_fr[FLD (f_right)]));
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fgetscr: fgetscr $frf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fgetscr) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
- return vpc;
-#undef FLD
-}
-
-/* fiprs: fipr.s $fvg, $fvh, $frf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fiprs) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- UQI tmp_g;
- UQI tmp_h;
- SF tmp_temp;
- tmp_g = FLD (f_left);
- tmp_h = FLD (f_right);
- tmp_temp = sh64_fmuls (current_cpu, CPU (h_fr[tmp_g]), CPU (h_fr[tmp_h]));
- tmp_temp = sh64_fadds (current_cpu, tmp_temp, sh64_fmuls (current_cpu, CPU (h_fr[ADDQI (tmp_g, 1)]), CPU (h_fr[ADDQI (tmp_h, 1)])));
- tmp_temp = sh64_fadds (current_cpu, tmp_temp, sh64_fmuls (current_cpu, CPU (h_fr[ADDQI (tmp_g, 2)]), CPU (h_fr[ADDQI (tmp_h, 2)])));
- tmp_temp = sh64_fadds (current_cpu, tmp_temp, sh64_fmuls (current_cpu, CPU (h_fr[ADDQI (tmp_g, 3)]), CPU (h_fr[ADDQI (tmp_h, 3)])));
- {
- SF opval = tmp_temp;
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* fldd: fld.d $rm, $disp10x8, $drf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fldd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_fldd.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = GETMEMDF (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), FLD (f_disp10x8)));
- SET_H_DR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "dr", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fldp: fld.p $rm, $disp10x8, $fpf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fldp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_fldd.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_f;
- tmp_f = FLD (f_dest);
- {
- SF opval = GETMEMSF (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), FLD (f_disp10x8)));
- CPU (h_fr[tmp_f]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
- {
- SF opval = GETMEMSF (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), ADDSI (FLD (f_disp10x8), 4)));
- CPU (h_fr[ADDQI (tmp_f, 1)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* flds: fld.s $rm, $disp10x4, $frf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,flds) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_flds.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = GETMEMSF (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), FLD (f_disp10x4)));
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fldxd: fldx.d $rm, $rn, $drf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fldxd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = GETMEMDF (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right))));
- SET_H_DR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "dr", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fldxp: fldx.p $rm, $rn, $fpf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fldxp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_f;
- tmp_f = FLD (f_dest);
- {
- SF opval = GETMEMSF (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right))));
- CPU (h_fr[tmp_f]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
- {
- SF opval = GETMEMSF (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), ADDDI (GET_H_GR (FLD (f_right)), 4)));
- CPU (h_fr[ADDQI (tmp_f, 1)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* fldxs: fldx.s $rm, $rn, $frf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fldxs) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = GETMEMSF (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right))));
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* floatld: float.ld $frgh, $drf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,floatld) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = sh64_floatld (current_cpu, CPU (h_fr[FLD (f_left_right)]));
- SET_H_DR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "dr", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* floatls: float.ls $frgh, $frf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,floatls) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = sh64_floatls (current_cpu, CPU (h_fr[FLD (f_left_right)]));
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* floatqd: float.qd $drgh, $drf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,floatqd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = sh64_floatqd (current_cpu, GET_H_DR (FLD (f_left_right)));
- SET_H_DR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "dr", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* floatqs: float.qs $drgh, $frf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,floatqs) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = sh64_floatqs (current_cpu, GET_H_DR (FLD (f_left_right)));
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fmacs: fmac.s $frg, $frh, $frf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fmacs) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = sh64_fadds (current_cpu, CPU (h_fr[FLD (f_dest)]), sh64_fmuls (current_cpu, CPU (h_fr[FLD (f_left)]), CPU (h_fr[FLD (f_right)])));
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fmovd: fmov.d $drgh, $drf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fmovd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = GET_H_DR (FLD (f_left_right));
- SET_H_DR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "dr", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fmovdq: fmov.dq $drgh, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fmovdq) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = SUBWORDDFDI (GET_H_DR (FLD (f_left_right)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fmovls: fmov.ls $rm, $frf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fmovls) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_xori.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = SUBWORDSISF (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1));
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fmovqd: fmov.qd $rm, $drf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fmovqd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_xori.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = SUBWORDDIDF (GET_H_GR (FLD (f_left)));
- SET_H_DR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "dr", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fmovs: fmov.s $frgh, $frf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fmovs) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = CPU (h_fr[FLD (f_left_right)]);
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fmovsl: fmov.sl $frgh, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fmovsl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = EXTSIDI (SUBWORDSFSI (CPU (h_fr[FLD (f_left_right)])));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fmuld: fmul.d $drg, $drh, $drf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fmuld) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = sh64_fmuld (current_cpu, GET_H_DR (FLD (f_left)), GET_H_DR (FLD (f_right)));
- SET_H_DR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "dr", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fmuls: fmul.s $frg, $frh, $frf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fmuls) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = sh64_fmuls (current_cpu, CPU (h_fr[FLD (f_left)]), CPU (h_fr[FLD (f_right)]));
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fnegd: fneg.d $drgh, $drf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fnegd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = sh64_fnegd (current_cpu, GET_H_DR (FLD (f_left_right)));
- SET_H_DR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "dr", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fnegs: fneg.s $frgh, $frf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fnegs) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = sh64_fnegs (current_cpu, CPU (h_fr[FLD (f_left_right)]));
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fputscr: fputscr $frgh */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fputscr) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
- return vpc;
-#undef FLD
-}
-
-/* fsqrtd: fsqrt.d $drgh, $drf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fsqrtd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = sh64_fsqrtd (current_cpu, GET_H_DR (FLD (f_left_right)));
- SET_H_DR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "dr", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fsqrts: fsqrt.s $frgh, $frf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fsqrts) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = sh64_fsqrts (current_cpu, CPU (h_fr[FLD (f_left_right)]));
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fstd: fst.d $rm, $disp10x8, $drf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fstd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_fldd.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = GET_H_DR (FLD (f_dest));
- SETMEMDF (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), FLD (f_disp10x8)), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fstp: fst.p $rm, $disp10x8, $fpf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fstp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_fldd.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_f;
- tmp_f = FLD (f_dest);
- {
- SF opval = CPU (h_fr[tmp_f]);
- SETMEMSF (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), FLD (f_disp10x8)), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
- {
- SF opval = CPU (h_fr[ADDQI (tmp_f, 1)]);
- SETMEMSF (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), ADDSI (FLD (f_disp10x8), 4)), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* fsts: fst.s $rm, $disp10x4, $frf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fsts) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_flds.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = CPU (h_fr[FLD (f_dest)]);
- SETMEMSF (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), FLD (f_disp10x4)), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fstxd: fstx.d $rm, $rn, $drf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fstxd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = GET_H_DR (FLD (f_dest));
- SETMEMDF (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right))), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fstxp: fstx.p $rm, $rn, $fpf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fstxp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_f;
- tmp_f = FLD (f_dest);
- {
- SF opval = CPU (h_fr[tmp_f]);
- SETMEMSF (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right))), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
- {
- SF opval = CPU (h_fr[ADDQI (tmp_f, 1)]);
- SETMEMSF (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), ADDDI (GET_H_GR (FLD (f_right)), 4)), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* fstxs: fstx.s $rm, $rn, $frf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fstxs) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = CPU (h_fr[FLD (f_dest)]);
- SETMEMSF (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right))), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fsubd: fsub.d $drg, $drh, $drf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fsubd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = sh64_fsubd (current_cpu, GET_H_DR (FLD (f_left)), GET_H_DR (FLD (f_right)));
- SET_H_DR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "dr", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* fsubs: fsub.s $frg, $frh, $frf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,fsubs) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = sh64_fsubs (current_cpu, CPU (h_fr[FLD (f_left)]), CPU (h_fr[FLD (f_right)]));
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* ftrcdl: ftrc.dl $drgh, $frf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,ftrcdl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = sh64_ftrcdl (current_cpu, GET_H_DR (FLD (f_left_right)));
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* ftrcsl: ftrc.sl $frgh, $frf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,ftrcsl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SF opval = sh64_ftrcsl (current_cpu, CPU (h_fr[FLD (f_left_right)]));
- CPU (h_fr[FLD (f_dest)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "fr", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* ftrcdq: ftrc.dq $drgh, $drf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,ftrcdq) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = sh64_ftrcdq (current_cpu, GET_H_DR (FLD (f_left_right)));
- SET_H_DR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "dr", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* ftrcsq: ftrc.sq $frgh, $drf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,ftrcsq) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_fabsd.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DF opval = sh64_ftrcsq (current_cpu, CPU (h_fr[FLD (f_left_right)]));
- SET_H_DR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "dr", 'f', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* ftrvs: ftrv.s $mtrxg, $fvh, $fvf */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,ftrvs) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-sh64_ftrvs (current_cpu, FLD (f_left), FLD (f_right), FLD (f_dest));
-
- return vpc;
-#undef FLD
-}
-
-/* getcfg: getcfg $rm, $disp6, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,getcfg) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
- return vpc;
-#undef FLD
-}
-
-/* getcon: getcon $crk, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,getcon) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_xori.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = GET_H_CR (FLD (f_left));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* gettr: gettr $trb, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,gettr) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_blink.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = CPU (h_tr[FLD (f_trb)]);
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* icbi: icbi $rm, $disp6x32 */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,icbi) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
- return vpc;
-#undef FLD
-}
-
-/* ldb: ld.b $rm, $disp10, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,ldb) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = EXTQIDI (GETMEMQI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), EXTSIDI (FLD (f_disp10)))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* ldl: ld.l $rm, $disp10x4, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,ldl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_flds.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = EXTSIDI (GETMEMSI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), EXTSIDI (FLD (f_disp10x4)))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* ldq: ld.q $rm, $disp10x8, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,ldq) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_fldd.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = GETMEMDI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), EXTSIDI (FLD (f_disp10x8))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* ldub: ld.ub $rm, $disp10, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,ldub) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ZEXTQIDI (GETMEMQI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), EXTSIDI (FLD (f_disp10)))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* lduw: ld.uw $rm, $disp10x2, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,lduw) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_lduw.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ZEXTHIDI (GETMEMHI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), EXTSIDI (FLD (f_disp10x2)))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* ldw: ld.w $rm, $disp10x2, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,ldw) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_lduw.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = EXTHIDI (GETMEMHI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), EXTSIDI (FLD (f_disp10x2)))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* ldhil: ldhi.l $rm, $disp6, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,ldhil) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldhil.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- DI tmp_addr;
- QI tmp_bytecount;
- SI tmp_val;
- tmp_addr = ADDDI (GET_H_GR (FLD (f_left)), FLD (f_disp6));
- tmp_bytecount = ADDDI (ANDDI (tmp_addr, 3), 1);
- tmp_val = 0;
-if (ANDQI (tmp_bytecount, 4)) {
- {
- DI opval = EXTSIDI (GETMEMSI (current_cpu, pc, ANDDI (tmp_addr, -4)));
- SET_H_GR (FLD (f_dest), opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-} else {
-if (GET_H_ENDIAN ()) {
-{
-if (ANDQI (tmp_bytecount, 2)) {
- tmp_val = ADDSI (SLLSI (tmp_val, 16), ZEXTHIDI (GETMEMHI (current_cpu, pc, ANDDI (tmp_addr, -4))));
-}
-if (ANDQI (tmp_bytecount, 1)) {
- tmp_val = ADDSI (SLLSI (tmp_val, 8), ZEXTQIDI (GETMEMQI (current_cpu, pc, tmp_addr)));
-}
- {
- DI opval = EXTSIDI (tmp_val);
- SET_H_GR (FLD (f_dest), opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-} else {
-{
-if (ANDQI (tmp_bytecount, 1)) {
- tmp_val = ADDSI (SLLSI (tmp_val, 8), ZEXTQIDI (GETMEMQI (current_cpu, pc, tmp_addr)));
-}
-if (ANDQI (tmp_bytecount, 2)) {
- tmp_val = ADDSI (SLLSI (tmp_val, 16), ZEXTHIDI (GETMEMHI (current_cpu, pc, ANDDI (tmp_addr, -4))));
-}
- {
- DI opval = EXTSIDI (SLLSI (tmp_val, SUBSI (32, MULSI (8, tmp_bytecount))));
- SET_H_GR (FLD (f_dest), opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-}
-}
-}
-
- abuf->written = written;
- return vpc;
-#undef FLD
-}
-
-/* ldhiq: ldhi.q $rm, $disp6, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,ldhiq) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldhil.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- DI tmp_addr;
- QI tmp_bytecount;
- DI tmp_val;
- tmp_addr = ADDDI (GET_H_GR (FLD (f_left)), FLD (f_disp6));
- tmp_bytecount = ADDDI (ANDDI (tmp_addr, 7), 1);
- tmp_val = 0;
-if (ANDQI (tmp_bytecount, 8)) {
- {
- DI opval = GETMEMDI (current_cpu, pc, ANDDI (tmp_addr, -8));
- SET_H_GR (FLD (f_dest), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-} else {
-if (GET_H_ENDIAN ()) {
-{
-if (ANDQI (tmp_bytecount, 4)) {
- tmp_val = ADDDI (SLLDI (tmp_val, 32), ZEXTSIDI (GETMEMSI (current_cpu, pc, ANDDI (tmp_addr, -8))));
-}
-if (ANDQI (tmp_bytecount, 2)) {
- tmp_val = ADDDI (SLLDI (tmp_val, 16), ZEXTHIDI (GETMEMHI (current_cpu, pc, ANDDI (tmp_addr, -4))));
-}
-if (ANDQI (tmp_bytecount, 1)) {
- tmp_val = ADDDI (SLLDI (tmp_val, 8), ZEXTQIDI (GETMEMQI (current_cpu, pc, tmp_addr)));
-}
- {
- DI opval = tmp_val;
- SET_H_GR (FLD (f_dest), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-} else {
-{
-if (ANDQI (tmp_bytecount, 1)) {
- tmp_val = ADDDI (SLLDI (tmp_val, 8), ZEXTQIDI (GETMEMQI (current_cpu, pc, tmp_addr)));
-}
-if (ANDQI (tmp_bytecount, 2)) {
- tmp_val = ADDDI (SLLDI (tmp_val, 16), ZEXTHIDI (GETMEMHI (current_cpu, pc, ANDDI (tmp_addr, -4))));
-}
-if (ANDQI (tmp_bytecount, 4)) {
- tmp_val = ADDDI (SLLDI (tmp_val, 32), ZEXTSIDI (GETMEMSI (current_cpu, pc, ANDDI (tmp_addr, -8))));
-}
- {
- DI opval = SLLDI (tmp_val, SUBSI (64, MULSI (8, tmp_bytecount)));
- SET_H_GR (FLD (f_dest), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-}
-}
-}
-
- abuf->written = written;
- return vpc;
-#undef FLD
-}
-
-/* ldlol: ldlo.l $rm, $disp6, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,ldlol) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldhil.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- DI tmp_addr;
- QI tmp_bytecount;
- SI tmp_val;
- tmp_addr = ADDDI (GET_H_GR (FLD (f_left)), FLD (f_disp6));
- tmp_bytecount = SUBSI (4, ANDDI (tmp_addr, 3));
- tmp_val = 0;
-if (ANDQI (tmp_bytecount, 4)) {
- {
- DI opval = EXTSIDI (GETMEMSI (current_cpu, pc, tmp_addr));
- SET_H_GR (FLD (f_dest), opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-} else {
-if (GET_H_ENDIAN ()) {
-{
-if (ANDQI (tmp_bytecount, 1)) {
- tmp_val = ADDSI (SLLSI (tmp_val, 8), ZEXTQIDI (GETMEMQI (current_cpu, pc, tmp_addr)));
-}
-if (ANDQI (tmp_bytecount, 2)) {
- tmp_val = ADDSI (SLLSI (tmp_val, 16), ZEXTHIDI (GETMEMHI (current_cpu, pc, ANDDI (ADDDI (tmp_addr, 1), -2))));
-}
- {
- DI opval = EXTSIDI (SLLSI (tmp_val, SUBSI (32, MULSI (8, tmp_bytecount))));
- SET_H_GR (FLD (f_dest), opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-} else {
-{
-if (ANDQI (tmp_bytecount, 2)) {
- tmp_val = ADDSI (SLLSI (tmp_val, 16), ZEXTHIDI (GETMEMHI (current_cpu, pc, ANDDI (ADDDI (tmp_addr, 1), -2))));
-}
-if (ANDQI (tmp_bytecount, 1)) {
- tmp_val = ADDSI (SLLSI (tmp_val, 8), ZEXTQIDI (GETMEMQI (current_cpu, pc, tmp_addr)));
-}
- {
- DI opval = EXTSIDI (tmp_val);
- SET_H_GR (FLD (f_dest), opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-}
-}
-}
-
- abuf->written = written;
- return vpc;
-#undef FLD
-}
-
-/* ldloq: ldlo.q $rm, $disp6, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,ldloq) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldhil.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- DI tmp_addr;
- QI tmp_bytecount;
- DI tmp_val;
- tmp_addr = ADDDI (GET_H_GR (FLD (f_left)), FLD (f_disp6));
- tmp_bytecount = SUBSI (8, ANDDI (tmp_addr, 7));
- tmp_val = 0;
-if (ANDQI (tmp_bytecount, 8)) {
- {
- DI opval = GETMEMDI (current_cpu, pc, tmp_addr);
- SET_H_GR (FLD (f_dest), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-} else {
-if (GET_H_ENDIAN ()) {
-{
-if (ANDQI (tmp_bytecount, 1)) {
- tmp_val = ADDDI (SLLDI (tmp_val, 8), ZEXTQIDI (GETMEMQI (current_cpu, pc, tmp_addr)));
-}
-if (ANDQI (tmp_bytecount, 2)) {
- tmp_val = ADDDI (SLLDI (tmp_val, 16), ZEXTHIDI (GETMEMHI (current_cpu, pc, ANDDI (ADDDI (tmp_addr, 1), -2))));
-}
-if (ANDQI (tmp_bytecount, 4)) {
- tmp_val = ADDDI (SLLDI (tmp_val, 32), ZEXTSIDI (GETMEMSI (current_cpu, pc, ANDDI (ADDDI (tmp_addr, 3), -4))));
-}
- {
- DI opval = SLLDI (tmp_val, SUBSI (64, MULSI (8, tmp_bytecount)));
- SET_H_GR (FLD (f_dest), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-} else {
-{
-if (ANDQI (tmp_bytecount, 4)) {
- tmp_val = ADDDI (SLLDI (tmp_val, 32), ZEXTSIDI (GETMEMSI (current_cpu, pc, ANDDI (ADDDI (tmp_addr, 3), -4))));
-}
-if (ANDQI (tmp_bytecount, 2)) {
- tmp_val = ADDDI (SLLDI (tmp_val, 16), ZEXTHIDI (GETMEMHI (current_cpu, pc, ANDDI (ADDDI (tmp_addr, 1), -2))));
-}
-if (ANDQI (tmp_bytecount, 1)) {
- tmp_val = ADDDI (SLLDI (tmp_val, 8), ZEXTQIDI (GETMEMQI (current_cpu, pc, tmp_addr)));
-}
- {
- DI opval = tmp_val;
- SET_H_GR (FLD (f_dest), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-}
-}
-}
-
- abuf->written = written;
- return vpc;
-#undef FLD
-}
-
-/* ldxb: ldx.b $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,ldxb) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = EXTQIDI (GETMEMQI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* ldxl: ldx.l $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,ldxl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = EXTSIDI (GETMEMSI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* ldxq: ldx.q $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,ldxq) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = GETMEMDI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* ldxub: ldx.ub $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,ldxub) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ZEXTQIDI (GETMEMUQI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* ldxuw: ldx.uw $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,ldxuw) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ZEXTHIDI (GETMEMUHI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* ldxw: ldx.w $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,ldxw) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = EXTHIDI (GETMEMHI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* mabsl: mabs.l $rm, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mabsl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_xori.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = ABSSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1));
- tmp_result1 = ABSSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0));
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mabsw: mabs.w $rm, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mabsw) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_xori.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- HI tmp_result3;
- HI tmp_result2;
- HI tmp_result1;
- HI tmp_result0;
- tmp_result0 = ABSHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3));
- tmp_result1 = ABSHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2));
- tmp_result2 = ABSHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1));
- tmp_result3 = ABSHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0));
- {
- DI opval = ORDI (SLLDI (ZEXTHIDI (tmp_result3), 48), ORDI (SLLDI (ZEXTHIDI (tmp_result2), 32), ORDI (SLLDI (ZEXTHIDI (tmp_result1), 16), ZEXTHIDI (tmp_result0))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* maddl: madd.l $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,maddl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = ADDSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), SUBWORDDISI (GET_H_GR (FLD (f_right)), 1));
- tmp_result1 = ADDSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0), SUBWORDDISI (GET_H_GR (FLD (f_right)), 0));
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* maddw: madd.w $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,maddw) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- HI tmp_result3;
- HI tmp_result2;
- HI tmp_result1;
- HI tmp_result0;
- tmp_result0 = ADDHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3));
- tmp_result1 = ADDHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2));
- tmp_result2 = ADDHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1));
- tmp_result3 = ADDHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0));
- {
- DI opval = ORDI (SLLDI (ZEXTHIDI (tmp_result3), 48), ORDI (SLLDI (ZEXTHIDI (tmp_result2), 32), ORDI (SLLDI (ZEXTHIDI (tmp_result1), 16), ZEXTHIDI (tmp_result0))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* maddsl: madds.l $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,maddsl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = ((LTDI (ADDDI (EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1)), EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 1))), NEGDI (SLLDI (1, SUBSI (32, 1))))) ? (NEGSI (SLLSI (1, SUBSI (32, 1)))) : (((LTDI (ADDDI (EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1)), EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 1))), SLLDI (1, SUBSI (32, 1)))) ? (ADDDI (EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1)), EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 1)))) : (SUBSI (SLLSI (1, SUBSI (32, 1)), 1)))));
- tmp_result1 = ((LTDI (ADDDI (EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0)), EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 0))), NEGDI (SLLDI (1, SUBSI (32, 1))))) ? (NEGSI (SLLSI (1, SUBSI (32, 1)))) : (((LTDI (ADDDI (EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0)), EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 0))), SLLDI (1, SUBSI (32, 1)))) ? (ADDDI (EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0)), EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 0)))) : (SUBSI (SLLSI (1, SUBSI (32, 1)), 1)))));
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* maddsub: madds.ub $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,maddsub) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_result7;
- QI tmp_result6;
- QI tmp_result5;
- QI tmp_result4;
- QI tmp_result3;
- QI tmp_result2;
- QI tmp_result1;
- QI tmp_result0;
- tmp_result0 = ((LTDI (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 7)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 7))), MAKEDI (0, 0))) ? (0) : (((LTDI (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 7)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 7))), SLLDI (1, 8))) ? (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 7)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 7)))) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result1 = ((LTDI (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 6)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 6))), MAKEDI (0, 0))) ? (0) : (((LTDI (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 6)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 6))), SLLDI (1, 8))) ? (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 6)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 6)))) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result2 = ((LTDI (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 5)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 5))), MAKEDI (0, 0))) ? (0) : (((LTDI (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 5)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 5))), SLLDI (1, 8))) ? (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 5)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 5)))) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result3 = ((LTDI (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 4)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 4))), MAKEDI (0, 0))) ? (0) : (((LTDI (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 4)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 4))), SLLDI (1, 8))) ? (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 4)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 4)))) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result4 = ((LTDI (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 3)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 3))), MAKEDI (0, 0))) ? (0) : (((LTDI (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 3)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 3))), SLLDI (1, 8))) ? (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 3)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 3)))) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result5 = ((LTDI (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 2)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 2))), MAKEDI (0, 0))) ? (0) : (((LTDI (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 2)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 2))), SLLDI (1, 8))) ? (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 2)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 2)))) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result6 = ((LTDI (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 1)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 1))), MAKEDI (0, 0))) ? (0) : (((LTDI (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 1)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 1))), SLLDI (1, 8))) ? (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 1)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 1)))) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result7 = ((LTDI (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 0)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 0))), MAKEDI (0, 0))) ? (0) : (((LTDI (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 0)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 0))), SLLDI (1, 8))) ? (ADDDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 0)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 0)))) : (SUBQI (SLLQI (1, 8), 1)))));
- {
- DI opval = ORDI (SLLDI (ZEXTQIDI (tmp_result7), 56), ORDI (SLLDI (ZEXTQIDI (tmp_result6), 48), ORDI (SLLDI (ZEXTQIDI (tmp_result5), 40), ORDI (SLLDI (ZEXTQIDI (tmp_result4), 32), ORDI (SLLDI (ZEXTQIDI (tmp_result3), 24), ORDI (SLLDI (ZEXTQIDI (tmp_result2), 16), ORDI (SLLDI (ZEXTQIDI (tmp_result1), 8), ZEXTQIDI (tmp_result0))))))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* maddsw: madds.w $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,maddsw) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- HI tmp_result3;
- HI tmp_result2;
- HI tmp_result1;
- HI tmp_result0;
- tmp_result0 = ((LTDI (ADDDI (EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3)), EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3))), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTDI (ADDDI (EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3)), EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3))), SLLDI (1, SUBSI (16, 1)))) ? (ADDDI (EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3)), EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3)))) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_result1 = ((LTDI (ADDDI (EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2)), EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2))), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTDI (ADDDI (EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2)), EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2))), SLLDI (1, SUBSI (16, 1)))) ? (ADDDI (EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2)), EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2)))) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_result2 = ((LTDI (ADDDI (EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1)), EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1))), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTDI (ADDDI (EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1)), EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1))), SLLDI (1, SUBSI (16, 1)))) ? (ADDDI (EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1)), EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1)))) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_result3 = ((LTDI (ADDDI (EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0)), EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0))), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTDI (ADDDI (EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0)), EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0))), SLLDI (1, SUBSI (16, 1)))) ? (ADDDI (EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0)), EXTHIDI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0)))) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- {
- DI opval = ORDI (SLLDI (ZEXTHIDI (tmp_result3), 48), ORDI (SLLDI (ZEXTHIDI (tmp_result2), 32), ORDI (SLLDI (ZEXTHIDI (tmp_result1), 16), ZEXTHIDI (tmp_result0))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mcmpeqb: mcmpeq.b $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mcmpeqb) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_result7;
- QI tmp_result6;
- QI tmp_result5;
- QI tmp_result4;
- QI tmp_result3;
- QI tmp_result2;
- QI tmp_result1;
- QI tmp_result0;
- tmp_result0 = ((EQQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 7), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 7))) ? (INVQI (0)) : (0));
- tmp_result1 = ((EQQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 6), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 6))) ? (INVQI (0)) : (0));
- tmp_result2 = ((EQQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 5), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 5))) ? (INVQI (0)) : (0));
- tmp_result3 = ((EQQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 4), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 4))) ? (INVQI (0)) : (0));
- tmp_result4 = ((EQQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 3), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 3))) ? (INVQI (0)) : (0));
- tmp_result5 = ((EQQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 2), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 2))) ? (INVQI (0)) : (0));
- tmp_result6 = ((EQQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 1), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 1))) ? (INVQI (0)) : (0));
- tmp_result7 = ((EQQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 0), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 0))) ? (INVQI (0)) : (0));
- {
- DI opval = ORDI (SLLDI (ZEXTQIDI (tmp_result7), 56), ORDI (SLLDI (ZEXTQIDI (tmp_result6), 48), ORDI (SLLDI (ZEXTQIDI (tmp_result5), 40), ORDI (SLLDI (ZEXTQIDI (tmp_result4), 32), ORDI (SLLDI (ZEXTQIDI (tmp_result3), 24), ORDI (SLLDI (ZEXTQIDI (tmp_result2), 16), ORDI (SLLDI (ZEXTQIDI (tmp_result1), 8), ZEXTQIDI (tmp_result0))))))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mcmpeql: mcmpeq.l $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mcmpeql) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = ((EQSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), SUBWORDDISI (GET_H_GR (FLD (f_right)), 1))) ? (INVSI (0)) : (0));
- tmp_result1 = ((EQSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0), SUBWORDDISI (GET_H_GR (FLD (f_right)), 0))) ? (INVSI (0)) : (0));
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mcmpeqw: mcmpeq.w $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mcmpeqw) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- HI tmp_result3;
- HI tmp_result2;
- HI tmp_result1;
- HI tmp_result0;
- tmp_result0 = ((EQHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3))) ? (INVHI (0)) : (0));
- tmp_result1 = ((EQHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2))) ? (INVHI (0)) : (0));
- tmp_result2 = ((EQHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1))) ? (INVHI (0)) : (0));
- tmp_result3 = ((EQHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0))) ? (INVHI (0)) : (0));
- {
- DI opval = ORDI (SLLDI (ZEXTHIDI (tmp_result3), 48), ORDI (SLLDI (ZEXTHIDI (tmp_result2), 32), ORDI (SLLDI (ZEXTHIDI (tmp_result1), 16), ZEXTHIDI (tmp_result0))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mcmpgtl: mcmpgt.l $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mcmpgtl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = ((GTSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), SUBWORDDISI (GET_H_GR (FLD (f_right)), 1))) ? (INVSI (0)) : (0));
- tmp_result1 = ((GTSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0), SUBWORDDISI (GET_H_GR (FLD (f_right)), 0))) ? (INVSI (0)) : (0));
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mcmpgtub: mcmpgt.ub $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mcmpgtub) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_result7;
- QI tmp_result6;
- QI tmp_result5;
- QI tmp_result4;
- QI tmp_result3;
- QI tmp_result2;
- QI tmp_result1;
- QI tmp_result0;
- tmp_result0 = ((GTUQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 7), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 7))) ? (INVQI (0)) : (0));
- tmp_result1 = ((GTUQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 6), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 6))) ? (INVQI (0)) : (0));
- tmp_result2 = ((GTUQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 5), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 5))) ? (INVQI (0)) : (0));
- tmp_result3 = ((GTUQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 4), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 4))) ? (INVQI (0)) : (0));
- tmp_result4 = ((GTUQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 3), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 3))) ? (INVQI (0)) : (0));
- tmp_result5 = ((GTUQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 2), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 2))) ? (INVQI (0)) : (0));
- tmp_result6 = ((GTUQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 1), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 1))) ? (INVQI (0)) : (0));
- tmp_result7 = ((GTUQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 0), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 0))) ? (INVQI (0)) : (0));
- {
- DI opval = ORDI (SLLDI (ZEXTQIDI (tmp_result7), 56), ORDI (SLLDI (ZEXTQIDI (tmp_result6), 48), ORDI (SLLDI (ZEXTQIDI (tmp_result5), 40), ORDI (SLLDI (ZEXTQIDI (tmp_result4), 32), ORDI (SLLDI (ZEXTQIDI (tmp_result3), 24), ORDI (SLLDI (ZEXTQIDI (tmp_result2), 16), ORDI (SLLDI (ZEXTQIDI (tmp_result1), 8), ZEXTQIDI (tmp_result0))))))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mcmpgtw: mcmpgt.w $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mcmpgtw) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- HI tmp_result3;
- HI tmp_result2;
- HI tmp_result1;
- HI tmp_result0;
- tmp_result0 = ((GTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3))) ? (INVHI (0)) : (0));
- tmp_result1 = ((GTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2))) ? (INVHI (0)) : (0));
- tmp_result2 = ((GTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1))) ? (INVHI (0)) : (0));
- tmp_result3 = ((GTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0))) ? (INVHI (0)) : (0));
- {
- DI opval = ORDI (SLLDI (ZEXTHIDI (tmp_result3), 48), ORDI (SLLDI (ZEXTHIDI (tmp_result2), 32), ORDI (SLLDI (ZEXTHIDI (tmp_result1), 16), ZEXTHIDI (tmp_result0))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mcmv: mcmv $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mcmv) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ORDI (ANDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right))), ANDDI (GET_H_GR (FLD (f_dest)), INVDI (GET_H_GR (FLD (f_right)))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* mcnvslw: mcnvs.lw $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mcnvslw) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- HI tmp_result3;
- HI tmp_result2;
- HI tmp_result1;
- HI tmp_result0;
- tmp_result0 = ((LTSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), SLLDI (1, SUBSI (16, 1)))) ? (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1)) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_result1 = ((LTSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0), SLLDI (1, SUBSI (16, 1)))) ? (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0)) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_result2 = ((LTSI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 1), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTSI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 1), SLLDI (1, SUBSI (16, 1)))) ? (SUBWORDDISI (GET_H_GR (FLD (f_right)), 1)) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_result3 = ((LTSI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 0), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTSI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 0), SLLDI (1, SUBSI (16, 1)))) ? (SUBWORDDISI (GET_H_GR (FLD (f_right)), 0)) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- {
- DI opval = ORDI (SLLDI (ZEXTHIDI (tmp_result3), 48), ORDI (SLLDI (ZEXTHIDI (tmp_result2), 32), ORDI (SLLDI (ZEXTHIDI (tmp_result1), 16), ZEXTHIDI (tmp_result0))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mcnvswb: mcnvs.wb $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mcnvswb) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_result7;
- QI tmp_result6;
- QI tmp_result5;
- QI tmp_result4;
- QI tmp_result3;
- QI tmp_result2;
- QI tmp_result1;
- QI tmp_result0;
- tmp_result0 = ((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3), NEGDI (SLLDI (1, SUBSI (8, 1))))) ? (NEGQI (SLLQI (1, SUBSI (8, 1)))) : (((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3), SLLDI (1, SUBSI (8, 1)))) ? (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3)) : (SUBQI (SLLQI (1, SUBSI (8, 1)), 1)))));
- tmp_result1 = ((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2), NEGDI (SLLDI (1, SUBSI (8, 1))))) ? (NEGQI (SLLQI (1, SUBSI (8, 1)))) : (((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2), SLLDI (1, SUBSI (8, 1)))) ? (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2)) : (SUBQI (SLLQI (1, SUBSI (8, 1)), 1)))));
- tmp_result2 = ((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1), NEGDI (SLLDI (1, SUBSI (8, 1))))) ? (NEGQI (SLLQI (1, SUBSI (8, 1)))) : (((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1), SLLDI (1, SUBSI (8, 1)))) ? (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1)) : (SUBQI (SLLQI (1, SUBSI (8, 1)), 1)))));
- tmp_result3 = ((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0), NEGDI (SLLDI (1, SUBSI (8, 1))))) ? (NEGQI (SLLQI (1, SUBSI (8, 1)))) : (((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0), SLLDI (1, SUBSI (8, 1)))) ? (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0)) : (SUBQI (SLLQI (1, SUBSI (8, 1)), 1)))));
- tmp_result4 = ((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3), NEGDI (SLLDI (1, SUBSI (8, 1))))) ? (NEGQI (SLLQI (1, SUBSI (8, 1)))) : (((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3), SLLDI (1, SUBSI (8, 1)))) ? (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3)) : (SUBQI (SLLQI (1, SUBSI (8, 1)), 1)))));
- tmp_result5 = ((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2), NEGDI (SLLDI (1, SUBSI (8, 1))))) ? (NEGQI (SLLQI (1, SUBSI (8, 1)))) : (((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2), SLLDI (1, SUBSI (8, 1)))) ? (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2)) : (SUBQI (SLLQI (1, SUBSI (8, 1)), 1)))));
- tmp_result6 = ((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1), NEGDI (SLLDI (1, SUBSI (8, 1))))) ? (NEGQI (SLLQI (1, SUBSI (8, 1)))) : (((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1), SLLDI (1, SUBSI (8, 1)))) ? (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1)) : (SUBQI (SLLQI (1, SUBSI (8, 1)), 1)))));
- tmp_result7 = ((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0), NEGDI (SLLDI (1, SUBSI (8, 1))))) ? (NEGQI (SLLQI (1, SUBSI (8, 1)))) : (((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0), SLLDI (1, SUBSI (8, 1)))) ? (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0)) : (SUBQI (SLLQI (1, SUBSI (8, 1)), 1)))));
- {
- DI opval = ORDI (SLLDI (ZEXTQIDI (tmp_result7), 56), ORDI (SLLDI (ZEXTQIDI (tmp_result6), 48), ORDI (SLLDI (ZEXTQIDI (tmp_result5), 40), ORDI (SLLDI (ZEXTQIDI (tmp_result4), 32), ORDI (SLLDI (ZEXTQIDI (tmp_result3), 24), ORDI (SLLDI (ZEXTQIDI (tmp_result2), 16), ORDI (SLLDI (ZEXTQIDI (tmp_result1), 8), ZEXTQIDI (tmp_result0))))))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mcnvswub: mcnvs.wub $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mcnvswub) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_result7;
- QI tmp_result6;
- QI tmp_result5;
- QI tmp_result4;
- QI tmp_result3;
- QI tmp_result2;
- QI tmp_result1;
- QI tmp_result0;
- tmp_result0 = ((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3), MAKEDI (0, 0))) ? (0) : (((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3), SLLDI (1, 8))) ? (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3)) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result1 = ((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2), MAKEDI (0, 0))) ? (0) : (((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2), SLLDI (1, 8))) ? (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2)) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result2 = ((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1), MAKEDI (0, 0))) ? (0) : (((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1), SLLDI (1, 8))) ? (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1)) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result3 = ((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0), MAKEDI (0, 0))) ? (0) : (((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0), SLLDI (1, 8))) ? (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0)) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result4 = ((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3), MAKEDI (0, 0))) ? (0) : (((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3), SLLDI (1, 8))) ? (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3)) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result5 = ((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2), MAKEDI (0, 0))) ? (0) : (((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2), SLLDI (1, 8))) ? (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2)) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result6 = ((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1), MAKEDI (0, 0))) ? (0) : (((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1), SLLDI (1, 8))) ? (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1)) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result7 = ((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0), MAKEDI (0, 0))) ? (0) : (((LTHI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0), SLLDI (1, 8))) ? (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0)) : (SUBQI (SLLQI (1, 8), 1)))));
- {
- DI opval = ORDI (SLLDI (ZEXTQIDI (tmp_result7), 56), ORDI (SLLDI (ZEXTQIDI (tmp_result6), 48), ORDI (SLLDI (ZEXTQIDI (tmp_result5), 40), ORDI (SLLDI (ZEXTQIDI (tmp_result4), 32), ORDI (SLLDI (ZEXTQIDI (tmp_result3), 24), ORDI (SLLDI (ZEXTQIDI (tmp_result2), 16), ORDI (SLLDI (ZEXTQIDI (tmp_result1), 8), ZEXTQIDI (tmp_result0))))))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mextr1: mextr1 $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mextr1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_count;
- DI tmp_mask;
- DI tmp_rhs;
- tmp_count = MULQI (8, 1);
- tmp_mask = SLLDI (INVSI (0), tmp_count);
- tmp_rhs = SRLDI (ANDDI (GET_H_GR (FLD (f_left)), tmp_mask), tmp_count);
- tmp_count = MULQI (8, SUBQI (8, 1));
- tmp_mask = SRLDI (INVSI (0), tmp_count);
- {
- DI opval = ORDI (tmp_rhs, SLLDI (ANDDI (GET_H_GR (FLD (f_right)), tmp_mask), tmp_count));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mextr2: mextr2 $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mextr2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_count;
- DI tmp_mask;
- DI tmp_rhs;
- tmp_count = MULQI (8, 2);
- tmp_mask = SLLDI (INVSI (0), tmp_count);
- tmp_rhs = SRLDI (ANDDI (GET_H_GR (FLD (f_left)), tmp_mask), tmp_count);
- tmp_count = MULQI (8, SUBQI (8, 2));
- tmp_mask = SRLDI (INVSI (0), tmp_count);
- {
- DI opval = ORDI (tmp_rhs, SLLDI (ANDDI (GET_H_GR (FLD (f_right)), tmp_mask), tmp_count));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mextr3: mextr3 $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mextr3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_count;
- DI tmp_mask;
- DI tmp_rhs;
- tmp_count = MULQI (8, 3);
- tmp_mask = SLLDI (INVSI (0), tmp_count);
- tmp_rhs = SRLDI (ANDDI (GET_H_GR (FLD (f_left)), tmp_mask), tmp_count);
- tmp_count = MULQI (8, SUBQI (8, 3));
- tmp_mask = SRLDI (INVSI (0), tmp_count);
- {
- DI opval = ORDI (tmp_rhs, SLLDI (ANDDI (GET_H_GR (FLD (f_right)), tmp_mask), tmp_count));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mextr4: mextr4 $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mextr4) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_count;
- DI tmp_mask;
- DI tmp_rhs;
- tmp_count = MULQI (8, 4);
- tmp_mask = SLLDI (INVSI (0), tmp_count);
- tmp_rhs = SRLDI (ANDDI (GET_H_GR (FLD (f_left)), tmp_mask), tmp_count);
- tmp_count = MULQI (8, SUBQI (8, 4));
- tmp_mask = SRLDI (INVSI (0), tmp_count);
- {
- DI opval = ORDI (tmp_rhs, SLLDI (ANDDI (GET_H_GR (FLD (f_right)), tmp_mask), tmp_count));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mextr5: mextr5 $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mextr5) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_count;
- DI tmp_mask;
- DI tmp_rhs;
- tmp_count = MULQI (8, 5);
- tmp_mask = SLLDI (INVSI (0), tmp_count);
- tmp_rhs = SRLDI (ANDDI (GET_H_GR (FLD (f_left)), tmp_mask), tmp_count);
- tmp_count = MULQI (8, SUBQI (8, 5));
- tmp_mask = SRLDI (INVSI (0), tmp_count);
- {
- DI opval = ORDI (tmp_rhs, SLLDI (ANDDI (GET_H_GR (FLD (f_right)), tmp_mask), tmp_count));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mextr6: mextr6 $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mextr6) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_count;
- DI tmp_mask;
- DI tmp_rhs;
- tmp_count = MULQI (8, 6);
- tmp_mask = SLLDI (INVSI (0), tmp_count);
- tmp_rhs = SRLDI (ANDDI (GET_H_GR (FLD (f_left)), tmp_mask), tmp_count);
- tmp_count = MULQI (8, SUBQI (8, 6));
- tmp_mask = SRLDI (INVSI (0), tmp_count);
- {
- DI opval = ORDI (tmp_rhs, SLLDI (ANDDI (GET_H_GR (FLD (f_right)), tmp_mask), tmp_count));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mextr7: mextr7 $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mextr7) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_count;
- DI tmp_mask;
- DI tmp_rhs;
- tmp_count = MULQI (8, 7);
- tmp_mask = SLLDI (INVSI (0), tmp_count);
- tmp_rhs = SRLDI (ANDDI (GET_H_GR (FLD (f_left)), tmp_mask), tmp_count);
- tmp_count = MULQI (8, SUBQI (8, 7));
- tmp_mask = SRLDI (INVSI (0), tmp_count);
- {
- DI opval = ORDI (tmp_rhs, SLLDI (ANDDI (GET_H_GR (FLD (f_right)), tmp_mask), tmp_count));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mmacfxwl: mmacfx.wl $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mmacfxwl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_temp;
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = SUBWORDDISI (GET_H_GR (FLD (f_dest)), 1);
- tmp_result1 = SUBWORDDISI (GET_H_GR (FLD (f_dest)), 0);
- tmp_temp = MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3)));
- tmp_temp = ((LTDI (SLLDI (tmp_temp, 1), NEGDI (SLLDI (1, SUBSI (32, 1))))) ? (NEGSI (SLLSI (1, SUBSI (32, 1)))) : (((LTDI (SLLDI (tmp_temp, 1), SLLDI (1, SUBSI (32, 1)))) ? (SLLDI (tmp_temp, 1)) : (SUBSI (SLLSI (1, SUBSI (32, 1)), 1)))));
- tmp_result0 = ((LTDI (ADDDI (EXTSIDI (tmp_result0), EXTSIDI (tmp_temp)), NEGDI (SLLDI (1, SUBSI (32, 1))))) ? (NEGSI (SLLSI (1, SUBSI (32, 1)))) : (((LTDI (ADDDI (EXTSIDI (tmp_result0), EXTSIDI (tmp_temp)), SLLDI (1, SUBSI (32, 1)))) ? (ADDDI (EXTSIDI (tmp_result0), EXTSIDI (tmp_temp))) : (SUBSI (SLLSI (1, SUBSI (32, 1)), 1)))));
- tmp_temp = MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2)));
- tmp_temp = ((LTDI (SLLDI (tmp_temp, 1), NEGDI (SLLDI (1, SUBSI (32, 1))))) ? (NEGSI (SLLSI (1, SUBSI (32, 1)))) : (((LTDI (SLLDI (tmp_temp, 1), SLLDI (1, SUBSI (32, 1)))) ? (SLLDI (tmp_temp, 1)) : (SUBSI (SLLSI (1, SUBSI (32, 1)), 1)))));
- tmp_result1 = ((LTDI (ADDDI (EXTSIDI (tmp_result1), EXTSIDI (tmp_temp)), NEGDI (SLLDI (1, SUBSI (32, 1))))) ? (NEGSI (SLLSI (1, SUBSI (32, 1)))) : (((LTDI (ADDDI (EXTSIDI (tmp_result1), EXTSIDI (tmp_temp)), SLLDI (1, SUBSI (32, 1)))) ? (ADDDI (EXTSIDI (tmp_result1), EXTSIDI (tmp_temp))) : (SUBSI (SLLSI (1, SUBSI (32, 1)), 1)))));
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mmacnfx.wl: mmacnfx.wl $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mmacnfx_wl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_temp;
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = SUBWORDDISI (GET_H_GR (FLD (f_dest)), 1);
- tmp_result1 = SUBWORDDISI (GET_H_GR (FLD (f_dest)), 0);
- tmp_temp = MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3)));
- tmp_temp = ((LTDI (SLLDI (tmp_temp, 1), NEGDI (SLLDI (1, SUBSI (32, 1))))) ? (NEGSI (SLLSI (1, SUBSI (32, 1)))) : (((LTDI (SLLDI (tmp_temp, 1), SLLDI (1, SUBSI (32, 1)))) ? (SLLDI (tmp_temp, 1)) : (SUBSI (SLLSI (1, SUBSI (32, 1)), 1)))));
- tmp_result0 = ((LTDI (SUBDI (EXTSIDI (tmp_result0), EXTSIDI (tmp_temp)), NEGDI (SLLDI (1, SUBSI (32, 1))))) ? (NEGSI (SLLSI (1, SUBSI (32, 1)))) : (((LTDI (SUBDI (EXTSIDI (tmp_result0), EXTSIDI (tmp_temp)), SLLDI (1, SUBSI (32, 1)))) ? (SUBDI (EXTSIDI (tmp_result0), EXTSIDI (tmp_temp))) : (SUBSI (SLLSI (1, SUBSI (32, 1)), 1)))));
- tmp_temp = MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2)));
- tmp_temp = ((LTDI (SLLDI (tmp_temp, 1), NEGDI (SLLDI (1, SUBSI (32, 1))))) ? (NEGSI (SLLSI (1, SUBSI (32, 1)))) : (((LTDI (SLLDI (tmp_temp, 1), SLLDI (1, SUBSI (32, 1)))) ? (SLLDI (tmp_temp, 1)) : (SUBSI (SLLSI (1, SUBSI (32, 1)), 1)))));
- tmp_result1 = ((LTDI (SUBDI (EXTSIDI (tmp_result1), EXTSIDI (tmp_temp)), NEGDI (SLLDI (1, SUBSI (32, 1))))) ? (NEGSI (SLLSI (1, SUBSI (32, 1)))) : (((LTDI (SUBDI (EXTSIDI (tmp_result1), EXTSIDI (tmp_temp)), SLLDI (1, SUBSI (32, 1)))) ? (SUBDI (EXTSIDI (tmp_result1), EXTSIDI (tmp_temp))) : (SUBSI (SLLSI (1, SUBSI (32, 1)), 1)))));
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mmull: mmul.l $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mmull) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = MULSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), SUBWORDDISI (GET_H_GR (FLD (f_right)), 1));
- tmp_result1 = MULSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0), SUBWORDDISI (GET_H_GR (FLD (f_right)), 0));
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mmulw: mmul.w $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mmulw) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- HI tmp_result3;
- HI tmp_result2;
- HI tmp_result1;
- HI tmp_result0;
- tmp_result0 = MULHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3));
- tmp_result1 = MULHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2));
- tmp_result2 = MULHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1));
- tmp_result3 = MULHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0));
- {
- DI opval = ORDI (SLLDI (ZEXTHIDI (tmp_result3), 48), ORDI (SLLDI (ZEXTHIDI (tmp_result2), 32), ORDI (SLLDI (ZEXTHIDI (tmp_result1), 16), ZEXTHIDI (tmp_result0))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mmulfxl: mmulfx.l $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mmulfxl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- DI tmp_temp;
- SI tmp_result0;
- SI tmp_result1;
- tmp_temp = MULDI (ZEXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1)), ZEXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 1)));
- tmp_result0 = ((LTDI (SRADI (tmp_temp, 31), NEGDI (SLLDI (1, SUBSI (32, 1))))) ? (NEGSI (SLLSI (1, SUBSI (32, 1)))) : (((LTDI (SRADI (tmp_temp, 31), SLLDI (1, SUBSI (32, 1)))) ? (SRADI (tmp_temp, 31)) : (SUBSI (SLLSI (1, SUBSI (32, 1)), 1)))));
- tmp_temp = MULDI (ZEXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0)), ZEXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 0)));
- tmp_result1 = ((LTDI (SRADI (tmp_temp, 31), NEGDI (SLLDI (1, SUBSI (32, 1))))) ? (NEGSI (SLLSI (1, SUBSI (32, 1)))) : (((LTDI (SRADI (tmp_temp, 31), SLLDI (1, SUBSI (32, 1)))) ? (SRADI (tmp_temp, 31)) : (SUBSI (SLLSI (1, SUBSI (32, 1)), 1)))));
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mmulfxw: mmulfx.w $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mmulfxw) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_temp;
- HI tmp_result0;
- HI tmp_result1;
- HI tmp_result2;
- HI tmp_result3;
- tmp_temp = MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3)));
- tmp_result0 = ((LTSI (SRASI (tmp_temp, 15), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTSI (SRASI (tmp_temp, 15), SLLDI (1, SUBSI (16, 1)))) ? (SRASI (tmp_temp, 15)) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_temp = MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2)));
- tmp_result1 = ((LTSI (SRASI (tmp_temp, 15), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTSI (SRASI (tmp_temp, 15), SLLDI (1, SUBSI (16, 1)))) ? (SRASI (tmp_temp, 15)) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_temp = MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1)));
- tmp_result2 = ((LTSI (SRASI (tmp_temp, 15), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTSI (SRASI (tmp_temp, 15), SLLDI (1, SUBSI (16, 1)))) ? (SRASI (tmp_temp, 15)) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_temp = MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0)));
- tmp_result3 = ((LTSI (SRASI (tmp_temp, 15), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTSI (SRASI (tmp_temp, 15), SLLDI (1, SUBSI (16, 1)))) ? (SRASI (tmp_temp, 15)) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- {
- DI opval = ORDI (SLLDI (ZEXTHIDI (tmp_result3), 48), ORDI (SLLDI (ZEXTHIDI (tmp_result2), 32), ORDI (SLLDI (ZEXTHIDI (tmp_result1), 16), ZEXTHIDI (tmp_result0))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mmulfxrpw: mmulfxrp.w $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mmulfxrpw) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_temp;
- HI tmp_result0;
- HI tmp_result1;
- HI tmp_result2;
- HI tmp_result3;
- HI tmp_c;
- tmp_c = SLLSI (1, 14);
- tmp_temp = MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3)));
- tmp_result0 = ((LTSI (SRASI (ADDSI (tmp_temp, tmp_c), 15), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTSI (SRASI (ADDSI (tmp_temp, tmp_c), 15), SLLDI (1, SUBSI (16, 1)))) ? (SRASI (ADDSI (tmp_temp, tmp_c), 15)) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_temp = MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2)));
- tmp_result1 = ((LTSI (SRASI (ADDSI (tmp_temp, tmp_c), 15), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTSI (SRASI (ADDSI (tmp_temp, tmp_c), 15), SLLDI (1, SUBSI (16, 1)))) ? (SRASI (ADDSI (tmp_temp, tmp_c), 15)) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_temp = MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1)));
- tmp_result2 = ((LTSI (SRASI (ADDSI (tmp_temp, tmp_c), 15), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTSI (SRASI (ADDSI (tmp_temp, tmp_c), 15), SLLDI (1, SUBSI (16, 1)))) ? (SRASI (ADDSI (tmp_temp, tmp_c), 15)) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_temp = MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0)));
- tmp_result3 = ((LTSI (SRASI (ADDSI (tmp_temp, tmp_c), 15), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTSI (SRASI (ADDSI (tmp_temp, tmp_c), 15), SLLDI (1, SUBSI (16, 1)))) ? (SRASI (ADDSI (tmp_temp, tmp_c), 15)) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- {
- DI opval = ORDI (SLLDI (ZEXTHIDI (tmp_result3), 48), ORDI (SLLDI (ZEXTHIDI (tmp_result2), 32), ORDI (SLLDI (ZEXTHIDI (tmp_result1), 16), ZEXTHIDI (tmp_result0))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mmulhiwl: mmulhi.wl $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mmulhiwl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1)));
- tmp_result1 = MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0)));
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mmullowl: mmullo.wl $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mmullowl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3)));
- tmp_result1 = MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2)));
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mmulsumwq: mmulsum.wq $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mmulsumwq) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- DI tmp_acc;
- tmp_acc = MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0)));
- tmp_acc = ADDDI (tmp_acc, MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1))));
- tmp_acc = ADDDI (tmp_acc, MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2))));
- tmp_acc = ADDDI (tmp_acc, MULSI (ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3)), ZEXTHISI (SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3))));
- {
- DI opval = ADDDI (GET_H_GR (FLD (f_dest)), tmp_acc);
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* movi: movi $imm16, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,movi) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movi.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = EXTSIDI (FLD (f_imm16));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* mpermw: mperm.w $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mpermw) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_control;
- HI tmp_result3;
- HI tmp_result2;
- HI tmp_result1;
- HI tmp_result0;
- tmp_control = ANDQI (GET_H_GR (FLD (f_right)), 255);
- tmp_result0 = SUBWORDDIHI (GET_H_GR (FLD (f_left)), SUBSI (3, ANDQI (tmp_control, 3)));
- tmp_result1 = SUBWORDDIHI (GET_H_GR (FLD (f_left)), SUBSI (3, ANDQI (SRLQI (tmp_control, 2), 3)));
- tmp_result2 = SUBWORDDIHI (GET_H_GR (FLD (f_left)), SUBSI (3, ANDQI (SRLQI (tmp_control, 4), 3)));
- tmp_result3 = SUBWORDDIHI (GET_H_GR (FLD (f_left)), SUBSI (3, ANDQI (SRLQI (tmp_control, 6), 3)));
- {
- DI opval = ORDI (SLLDI (ZEXTHIDI (tmp_result3), 48), ORDI (SLLDI (ZEXTHIDI (tmp_result2), 32), ORDI (SLLDI (ZEXTHIDI (tmp_result1), 16), ZEXTHIDI (tmp_result0))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* msadubq: msad.ubq $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,msadubq) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- DI tmp_acc;
- tmp_acc = ABSDI (SUBQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 0), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 0)));
- tmp_acc = ADDDI (tmp_acc, ABSQI (SUBQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 1), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 1))));
- tmp_acc = ADDDI (tmp_acc, ABSQI (SUBQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 2), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 2))));
- tmp_acc = ADDDI (tmp_acc, ABSQI (SUBQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 3), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 3))));
- tmp_acc = ADDDI (tmp_acc, ABSQI (SUBQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 4), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 4))));
- tmp_acc = ADDDI (tmp_acc, ABSQI (SUBQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 5), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 5))));
- tmp_acc = ADDDI (tmp_acc, ABSQI (SUBQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 6), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 6))));
- tmp_acc = ADDDI (tmp_acc, ABSQI (SUBQI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 7), SUBWORDDIQI (GET_H_GR (FLD (f_right)), 7))));
- {
- DI opval = ADDDI (GET_H_GR (FLD (f_dest)), tmp_acc);
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mshaldsl: mshalds.l $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mshaldsl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = ((LTDI (SLLDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), ANDDI (GET_H_GR (FLD (f_right)), 31)), NEGDI (SLLDI (1, SUBSI (32, 1))))) ? (NEGSI (SLLSI (1, SUBSI (32, 1)))) : (((LTDI (SLLDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), ANDDI (GET_H_GR (FLD (f_right)), 31)), SLLDI (1, SUBSI (32, 1)))) ? (SLLDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), ANDDI (GET_H_GR (FLD (f_right)), 31))) : (SUBSI (SLLSI (1, SUBSI (32, 1)), 1)))));
- tmp_result1 = ((LTDI (SLLDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0), ANDDI (GET_H_GR (FLD (f_right)), 31)), NEGDI (SLLDI (1, SUBSI (32, 1))))) ? (NEGSI (SLLSI (1, SUBSI (32, 1)))) : (((LTDI (SLLDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0), ANDDI (GET_H_GR (FLD (f_right)), 31)), SLLDI (1, SUBSI (32, 1)))) ? (SLLDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0), ANDDI (GET_H_GR (FLD (f_right)), 31))) : (SUBSI (SLLSI (1, SUBSI (32, 1)), 1)))));
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mshaldsw: mshalds.w $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mshaldsw) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- HI tmp_result3;
- HI tmp_result2;
- HI tmp_result1;
- HI tmp_result0;
- tmp_result0 = ((LTDI (SLLDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3), ANDDI (GET_H_GR (FLD (f_right)), 15)), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTDI (SLLDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3), ANDDI (GET_H_GR (FLD (f_right)), 15)), SLLDI (1, SUBSI (16, 1)))) ? (SLLDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3), ANDDI (GET_H_GR (FLD (f_right)), 15))) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_result1 = ((LTDI (SLLDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2), ANDDI (GET_H_GR (FLD (f_right)), 15)), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTDI (SLLDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2), ANDDI (GET_H_GR (FLD (f_right)), 15)), SLLDI (1, SUBSI (16, 1)))) ? (SLLDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2), ANDDI (GET_H_GR (FLD (f_right)), 15))) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_result2 = ((LTDI (SLLDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1), ANDDI (GET_H_GR (FLD (f_right)), 15)), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTDI (SLLDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1), ANDDI (GET_H_GR (FLD (f_right)), 15)), SLLDI (1, SUBSI (16, 1)))) ? (SLLDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1), ANDDI (GET_H_GR (FLD (f_right)), 15))) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_result3 = ((LTDI (SLLDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0), ANDDI (GET_H_GR (FLD (f_right)), 15)), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTDI (SLLDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0), ANDDI (GET_H_GR (FLD (f_right)), 15)), SLLDI (1, SUBSI (16, 1)))) ? (SLLDI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0), ANDDI (GET_H_GR (FLD (f_right)), 15))) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- {
- DI opval = ORDI (SLLDI (ZEXTHIDI (tmp_result3), 48), ORDI (SLLDI (ZEXTHIDI (tmp_result2), 32), ORDI (SLLDI (ZEXTHIDI (tmp_result1), 16), ZEXTHIDI (tmp_result0))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mshardl: mshard.l $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mshardl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = SRASI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), ANDDI (GET_H_GR (FLD (f_right)), 31));
- tmp_result1 = SRASI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0), ANDDI (GET_H_GR (FLD (f_right)), 31));
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mshardw: mshard.w $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mshardw) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- HI tmp_result3;
- HI tmp_result2;
- HI tmp_result1;
- HI tmp_result0;
- tmp_result0 = SRAHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3), ANDDI (GET_H_GR (FLD (f_right)), 15));
- tmp_result1 = SRAHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2), ANDDI (GET_H_GR (FLD (f_right)), 15));
- tmp_result2 = SRAHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1), ANDDI (GET_H_GR (FLD (f_right)), 15));
- tmp_result3 = SRAHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0), ANDDI (GET_H_GR (FLD (f_right)), 15));
- {
- DI opval = ORDI (SLLDI (ZEXTHIDI (tmp_result3), 48), ORDI (SLLDI (ZEXTHIDI (tmp_result2), 32), ORDI (SLLDI (ZEXTHIDI (tmp_result1), 16), ZEXTHIDI (tmp_result0))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mshardsq: mshards.q $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mshardsq) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ((LTDI (SRADI (GET_H_GR (FLD (f_left)), ANDDI (GET_H_GR (FLD (f_right)), 63)), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGDI (SLLDI (1, SUBSI (16, 1)))) : (((LTDI (SRADI (GET_H_GR (FLD (f_left)), ANDDI (GET_H_GR (FLD (f_right)), 63)), SLLDI (1, SUBSI (16, 1)))) ? (SRADI (GET_H_GR (FLD (f_left)), ANDDI (GET_H_GR (FLD (f_right)), 63))) : (SUBDI (SLLDI (1, SUBSI (16, 1)), 1)))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* mshfhib: mshfhi.b $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mshfhib) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_result7;
- QI tmp_result6;
- QI tmp_result5;
- QI tmp_result4;
- QI tmp_result3;
- QI tmp_result2;
- QI tmp_result1;
- QI tmp_result0;
- tmp_result0 = SUBWORDDIQI (GET_H_GR (FLD (f_left)), 3);
- tmp_result1 = SUBWORDDIQI (GET_H_GR (FLD (f_right)), 3);
- tmp_result2 = SUBWORDDIQI (GET_H_GR (FLD (f_left)), 2);
- tmp_result3 = SUBWORDDIQI (GET_H_GR (FLD (f_right)), 2);
- tmp_result4 = SUBWORDDIQI (GET_H_GR (FLD (f_left)), 1);
- tmp_result5 = SUBWORDDIQI (GET_H_GR (FLD (f_right)), 1);
- tmp_result6 = SUBWORDDIQI (GET_H_GR (FLD (f_left)), 0);
- tmp_result7 = SUBWORDDIQI (GET_H_GR (FLD (f_right)), 0);
- {
- DI opval = ORDI (SLLDI (ZEXTQIDI (tmp_result7), 56), ORDI (SLLDI (ZEXTQIDI (tmp_result6), 48), ORDI (SLLDI (ZEXTQIDI (tmp_result5), 40), ORDI (SLLDI (ZEXTQIDI (tmp_result4), 32), ORDI (SLLDI (ZEXTQIDI (tmp_result3), 24), ORDI (SLLDI (ZEXTQIDI (tmp_result2), 16), ORDI (SLLDI (ZEXTQIDI (tmp_result1), 8), ZEXTQIDI (tmp_result0))))))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mshfhil: mshfhi.l $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mshfhil) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = SUBWORDDISI (GET_H_GR (FLD (f_left)), 0);
- tmp_result1 = SUBWORDDISI (GET_H_GR (FLD (f_right)), 0);
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mshfhiw: mshfhi.w $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mshfhiw) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- HI tmp_result3;
- HI tmp_result2;
- HI tmp_result1;
- HI tmp_result0;
- tmp_result0 = SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1);
- tmp_result1 = SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1);
- tmp_result2 = SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0);
- tmp_result3 = SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0);
- {
- DI opval = ORDI (SLLDI (ZEXTHIDI (tmp_result3), 48), ORDI (SLLDI (ZEXTHIDI (tmp_result2), 32), ORDI (SLLDI (ZEXTHIDI (tmp_result1), 16), ZEXTHIDI (tmp_result0))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mshflob: mshflo.b $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mshflob) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_result7;
- QI tmp_result6;
- QI tmp_result5;
- QI tmp_result4;
- QI tmp_result3;
- QI tmp_result2;
- QI tmp_result1;
- QI tmp_result0;
- tmp_result0 = SUBWORDDIQI (GET_H_GR (FLD (f_left)), 7);
- tmp_result1 = SUBWORDDIQI (GET_H_GR (FLD (f_right)), 7);
- tmp_result2 = SUBWORDDIQI (GET_H_GR (FLD (f_left)), 6);
- tmp_result3 = SUBWORDDIQI (GET_H_GR (FLD (f_right)), 6);
- tmp_result4 = SUBWORDDIQI (GET_H_GR (FLD (f_left)), 5);
- tmp_result5 = SUBWORDDIQI (GET_H_GR (FLD (f_right)), 5);
- tmp_result6 = SUBWORDDIQI (GET_H_GR (FLD (f_left)), 4);
- tmp_result7 = SUBWORDDIQI (GET_H_GR (FLD (f_right)), 4);
- {
- DI opval = ORDI (SLLDI (ZEXTQIDI (tmp_result7), 56), ORDI (SLLDI (ZEXTQIDI (tmp_result6), 48), ORDI (SLLDI (ZEXTQIDI (tmp_result5), 40), ORDI (SLLDI (ZEXTQIDI (tmp_result4), 32), ORDI (SLLDI (ZEXTQIDI (tmp_result3), 24), ORDI (SLLDI (ZEXTQIDI (tmp_result2), 16), ORDI (SLLDI (ZEXTQIDI (tmp_result1), 8), ZEXTQIDI (tmp_result0))))))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mshflol: mshflo.l $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mshflol) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = SUBWORDDISI (GET_H_GR (FLD (f_left)), 1);
- tmp_result1 = SUBWORDDISI (GET_H_GR (FLD (f_right)), 1);
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mshflow: mshflo.w $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mshflow) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- HI tmp_result3;
- HI tmp_result2;
- HI tmp_result1;
- HI tmp_result0;
- tmp_result0 = SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3);
- tmp_result1 = SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3);
- tmp_result2 = SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2);
- tmp_result3 = SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2);
- {
- DI opval = ORDI (SLLDI (ZEXTHIDI (tmp_result3), 48), ORDI (SLLDI (ZEXTHIDI (tmp_result2), 32), ORDI (SLLDI (ZEXTHIDI (tmp_result1), 16), ZEXTHIDI (tmp_result0))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mshlldl: mshlld.l $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mshlldl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = SLLSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), ANDDI (GET_H_GR (FLD (f_right)), 31));
- tmp_result1 = SLLSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0), ANDDI (GET_H_GR (FLD (f_right)), 31));
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mshlldw: mshlld.w $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mshlldw) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- HI tmp_result3;
- HI tmp_result2;
- HI tmp_result1;
- HI tmp_result0;
- tmp_result0 = SLLHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3), ANDDI (GET_H_GR (FLD (f_right)), 15));
- tmp_result1 = SLLHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2), ANDDI (GET_H_GR (FLD (f_right)), 15));
- tmp_result2 = SLLHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1), ANDDI (GET_H_GR (FLD (f_right)), 15));
- tmp_result3 = SLLHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0), ANDDI (GET_H_GR (FLD (f_right)), 15));
- {
- DI opval = ORDI (SLLDI (ZEXTHIDI (tmp_result3), 48), ORDI (SLLDI (ZEXTHIDI (tmp_result2), 32), ORDI (SLLDI (ZEXTHIDI (tmp_result1), 16), ZEXTHIDI (tmp_result0))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mshlrdl: mshlrd.l $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mshlrdl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = SRLSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), ANDDI (GET_H_GR (FLD (f_right)), 31));
- tmp_result1 = SRLSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0), ANDDI (GET_H_GR (FLD (f_right)), 31));
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mshlrdw: mshlrd.w $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mshlrdw) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- HI tmp_result3;
- HI tmp_result2;
- HI tmp_result1;
- HI tmp_result0;
- tmp_result0 = SRLHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3), ANDDI (GET_H_GR (FLD (f_right)), 15));
- tmp_result1 = SRLHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2), ANDDI (GET_H_GR (FLD (f_right)), 15));
- tmp_result2 = SRLHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1), ANDDI (GET_H_GR (FLD (f_right)), 15));
- tmp_result3 = SRLHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0), ANDDI (GET_H_GR (FLD (f_right)), 15));
- {
- DI opval = ORDI (SLLDI (ZEXTHIDI (tmp_result3), 48), ORDI (SLLDI (ZEXTHIDI (tmp_result2), 32), ORDI (SLLDI (ZEXTHIDI (tmp_result1), 16), ZEXTHIDI (tmp_result0))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* msubl: msub.l $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,msubl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = SUBSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), SUBWORDDISI (GET_H_GR (FLD (f_right)), 1));
- tmp_result1 = SUBSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0), SUBWORDDISI (GET_H_GR (FLD (f_right)), 0));
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* msubw: msub.w $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,msubw) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- HI tmp_result3;
- HI tmp_result2;
- HI tmp_result1;
- HI tmp_result0;
- tmp_result0 = SUBHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 3), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 3));
- tmp_result1 = SUBHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 2), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 2));
- tmp_result2 = SUBHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 1), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 1));
- tmp_result3 = SUBHI (SUBWORDDIHI (GET_H_GR (FLD (f_left)), 0), SUBWORDDIHI (GET_H_GR (FLD (f_right)), 0));
- {
- DI opval = ORDI (SLLDI (ZEXTHIDI (tmp_result3), 48), ORDI (SLLDI (ZEXTHIDI (tmp_result2), 32), ORDI (SLLDI (ZEXTHIDI (tmp_result1), 16), ZEXTHIDI (tmp_result0))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* msubsl: msubs.l $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,msubsl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- SI tmp_result1;
- SI tmp_result0;
- tmp_result0 = ((LTDI (SUBDI (EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1)), EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 1))), NEGDI (SLLDI (1, SUBSI (32, 1))))) ? (NEGSI (SLLSI (1, SUBSI (32, 1)))) : (((LTDI (SUBDI (EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1)), EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 1))), SLLDI (1, SUBSI (32, 1)))) ? (SUBDI (EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1)), EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 1)))) : (SUBSI (SLLSI (1, SUBSI (32, 1)), 1)))));
- tmp_result1 = ((LTDI (SUBDI (EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0)), EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 0))), NEGDI (SLLDI (1, SUBSI (32, 1))))) ? (NEGSI (SLLSI (1, SUBSI (32, 1)))) : (((LTDI (SUBDI (EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0)), EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 0))), SLLDI (1, SUBSI (32, 1)))) ? (SUBDI (EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 0)), EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 0)))) : (SUBSI (SLLSI (1, SUBSI (32, 1)), 1)))));
- {
- DI opval = ORDI (SLLDI (ZEXTSIDI (tmp_result1), 32), ZEXTSIDI (tmp_result0));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* msubsub: msubs.ub $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,msubsub) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_result7;
- QI tmp_result6;
- QI tmp_result5;
- QI tmp_result4;
- QI tmp_result3;
- QI tmp_result2;
- QI tmp_result1;
- QI tmp_result0;
- tmp_result0 = ((LTDI (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 7)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 7))), MAKEDI (0, 0))) ? (0) : (((LTDI (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 7)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 7))), SLLDI (1, 8))) ? (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 7)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 7)))) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result1 = ((LTDI (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 6)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 6))), MAKEDI (0, 0))) ? (0) : (((LTDI (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 6)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 6))), SLLDI (1, 8))) ? (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 6)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 6)))) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result2 = ((LTDI (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 5)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 5))), MAKEDI (0, 0))) ? (0) : (((LTDI (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 5)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 5))), SLLDI (1, 8))) ? (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 5)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 5)))) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result3 = ((LTDI (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 4)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 4))), MAKEDI (0, 0))) ? (0) : (((LTDI (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 4)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 4))), SLLDI (1, 8))) ? (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 4)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 4)))) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result4 = ((LTDI (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 3)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 3))), MAKEDI (0, 0))) ? (0) : (((LTDI (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 3)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 3))), SLLDI (1, 8))) ? (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 3)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 3)))) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result5 = ((LTDI (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 2)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 2))), MAKEDI (0, 0))) ? (0) : (((LTDI (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 2)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 2))), SLLDI (1, 8))) ? (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 2)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 2)))) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result6 = ((LTDI (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 1)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 1))), MAKEDI (0, 0))) ? (0) : (((LTDI (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 1)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 1))), SLLDI (1, 8))) ? (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 1)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 1)))) : (SUBQI (SLLQI (1, 8), 1)))));
- tmp_result7 = ((LTDI (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 0)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 0))), MAKEDI (0, 0))) ? (0) : (((LTDI (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 0)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 0))), SLLDI (1, 8))) ? (SUBDI (ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 0)), ZEXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 0)))) : (SUBQI (SLLQI (1, 8), 1)))));
- {
- DI opval = ORDI (SLLDI (ZEXTQIDI (tmp_result7), 56), ORDI (SLLDI (ZEXTQIDI (tmp_result6), 48), ORDI (SLLDI (ZEXTQIDI (tmp_result5), 40), ORDI (SLLDI (ZEXTQIDI (tmp_result4), 32), ORDI (SLLDI (ZEXTQIDI (tmp_result3), 24), ORDI (SLLDI (ZEXTQIDI (tmp_result2), 16), ORDI (SLLDI (ZEXTQIDI (tmp_result1), 8), ZEXTQIDI (tmp_result0))))))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* msubsw: msubs.w $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,msubsw) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- QI tmp_result7;
- QI tmp_result6;
- QI tmp_result5;
- QI tmp_result4;
- QI tmp_result3;
- QI tmp_result2;
- QI tmp_result1;
- QI tmp_result0;
- tmp_result0 = ((LTDI (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 7)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 7))), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTDI (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 7)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 7))), SLLDI (1, SUBSI (16, 1)))) ? (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 7)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 7)))) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_result1 = ((LTDI (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 6)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 6))), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTDI (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 6)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 6))), SLLDI (1, SUBSI (16, 1)))) ? (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 6)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 6)))) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_result2 = ((LTDI (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 5)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 5))), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTDI (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 5)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 5))), SLLDI (1, SUBSI (16, 1)))) ? (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 5)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 5)))) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_result3 = ((LTDI (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 4)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 4))), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTDI (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 4)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 4))), SLLDI (1, SUBSI (16, 1)))) ? (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 4)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 4)))) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_result4 = ((LTDI (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 3)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 3))), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTDI (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 3)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 3))), SLLDI (1, SUBSI (16, 1)))) ? (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 3)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 3)))) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_result5 = ((LTDI (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 2)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 2))), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTDI (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 2)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 2))), SLLDI (1, SUBSI (16, 1)))) ? (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 2)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 2)))) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_result6 = ((LTDI (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 1)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 1))), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTDI (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 1)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 1))), SLLDI (1, SUBSI (16, 1)))) ? (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 1)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 1)))) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- tmp_result7 = ((LTDI (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 0)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 0))), NEGDI (SLLDI (1, SUBSI (16, 1))))) ? (NEGHI (SLLHI (1, SUBSI (16, 1)))) : (((LTDI (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 0)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 0))), SLLDI (1, SUBSI (16, 1)))) ? (SUBDI (EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_left)), 0)), EXTQIDI (SUBWORDDIQI (GET_H_GR (FLD (f_right)), 0)))) : (SUBHI (SLLHI (1, SUBSI (16, 1)), 1)))));
- {
- DI opval = ORDI (SLLDI (ZEXTQIDI (tmp_result7), 56), ORDI (SLLDI (ZEXTQIDI (tmp_result6), 48), ORDI (SLLDI (ZEXTQIDI (tmp_result5), 40), ORDI (SLLDI (ZEXTQIDI (tmp_result4), 32), ORDI (SLLDI (ZEXTQIDI (tmp_result3), 24), ORDI (SLLDI (ZEXTQIDI (tmp_result2), 16), ORDI (SLLDI (ZEXTQIDI (tmp_result1), 8), ZEXTQIDI (tmp_result0))))))));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* mulsl: muls.l $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mulsl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = MULDI (EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1)), EXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 1)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* mulul: mulu.l $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,mulul) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = MULDI (ZEXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1)), ZEXTSIDI (SUBWORDDISI (GET_H_GR (FLD (f_right)), 1)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* nop: nop */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,nop) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
- return vpc;
-#undef FLD
-}
-
-/* nsb: nsb $rm, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,nsb) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_xori.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = sh64_nsb (current_cpu, GET_H_GR (FLD (f_left)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* ocbi: ocbi $rm, $disp6x32 */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,ocbi) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
- return vpc;
-#undef FLD
-}
-
-/* ocbp: ocbp $rm, $disp6x32 */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,ocbp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
- return vpc;
-#undef FLD
-}
-
-/* ocbwb: ocbwb $rm, $disp6x32 */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,ocbwb) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
- return vpc;
-#undef FLD
-}
-
-/* or: or $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,or) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ORDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* ori: ori $rm, $imm10, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,ori) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ori.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ORDI (GET_H_GR (FLD (f_left)), EXTSIDI (FLD (f_imm10)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* prefi: prefi $rm, $disp6x32 */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,prefi) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
- return vpc;
-#undef FLD
-}
-
-/* pta: pta$likely $disp16, $tra */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,pta) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_pta.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ADDSI (FLD (f_disp16), 1);
- CPU (h_tr[FLD (f_tra)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "tr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* ptabs: ptabs$likely $rn, $tra */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,ptabs) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_beq.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = GET_H_GR (FLD (f_right));
- CPU (h_tr[FLD (f_tra)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "tr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* ptb: ptb$likely $disp16, $tra */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,ptb) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_pta.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = FLD (f_disp16);
- CPU (h_tr[FLD (f_tra)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "tr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* ptrel: ptrel$likely $rn, $tra */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,ptrel) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_beq.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ADDDI (pc, GET_H_GR (FLD (f_right)));
- CPU (h_tr[FLD (f_tra)]) = opval;
- TRACE_RESULT (current_cpu, abuf, "tr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* putcfg: putcfg $rm, $disp6, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,putcfg) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
- return vpc;
-#undef FLD
-}
-
-/* putcon: putcon $rm, $crj */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,putcon) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_xori.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = GET_H_GR (FLD (f_left));
- SET_H_CR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "cr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* rte: rte */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,rte) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
- return vpc;
-#undef FLD
-}
-
-/* shard: shard $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,shard) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = SRADI (GET_H_GR (FLD (f_left)), ANDDI (GET_H_GR (FLD (f_right)), 63));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* shardl: shard.l $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,shardl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = EXTSIDI (SRASI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), ANDDI (GET_H_GR (FLD (f_right)), 63)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* shari: shari $rm, $uimm6, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,shari) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_shari.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = SRADI (GET_H_GR (FLD (f_left)), FLD (f_uimm6));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* sharil: shari.l $rm, $uimm6, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,sharil) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_shari.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = EXTSIDI (SRASI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), ANDSI (FLD (f_uimm6), 63)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* shlld: shlld $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,shlld) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = SLLDI (GET_H_GR (FLD (f_left)), ANDDI (GET_H_GR (FLD (f_right)), 63));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* shlldl: shlld.l $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,shlldl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = EXTSIDI (SLLSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), ANDDI (GET_H_GR (FLD (f_right)), 63)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* shlli: shlli $rm, $uimm6, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,shlli) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_shari.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = SLLDI (GET_H_GR (FLD (f_left)), FLD (f_uimm6));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* shllil: shlli.l $rm, $uimm6, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,shllil) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_shari.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = EXTSIDI (SLLSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), ANDSI (FLD (f_uimm6), 63)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* shlrd: shlrd $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,shlrd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = SRLDI (GET_H_GR (FLD (f_left)), ANDDI (GET_H_GR (FLD (f_right)), 63));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* shlrdl: shlrd.l $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,shlrdl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = EXTSIDI (SRLSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), ANDDI (GET_H_GR (FLD (f_right)), 63)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* shlri: shlri $rm, $uimm6, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,shlri) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_shari.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = SRLDI (GET_H_GR (FLD (f_left)), FLD (f_uimm6));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* shlril: shlri.l $rm, $uimm6, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,shlril) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_shari.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = EXTSIDI (SRLSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), ANDSI (FLD (f_uimm6), 63)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* shori: shori $uimm16, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,shori) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_shori.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = ORDI (SLLDI (GET_H_GR (FLD (f_dest)), 16), ZEXTSIDI (FLD (f_uimm16)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* sleep: sleep */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,sleep) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
- return vpc;
-#undef FLD
-}
-
-/* stb: st.b $rm, $disp10, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,stb) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- UQI opval = ANDQI (GET_H_GR (FLD (f_dest)), 255);
- SETMEMUQI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), EXTSIDI (FLD (f_disp10))), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* stl: st.l $rm, $disp10x4, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,stl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_flds.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SI opval = ANDSI (GET_H_GR (FLD (f_dest)), 0xffffffff);
- SETMEMSI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), EXTSIDI (FLD (f_disp10x4))), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* stq: st.q $rm, $disp10x8, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,stq) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_fldd.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = GET_H_GR (FLD (f_dest));
- SETMEMDI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), EXTSIDI (FLD (f_disp10x8))), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* stw: st.w $rm, $disp10x2, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,stw) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_lduw.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- HI opval = ANDHI (GET_H_GR (FLD (f_dest)), 65535);
- SETMEMHI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), EXTSIDI (FLD (f_disp10x2))), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* sthil: sthi.l $rm, $disp6, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,sthil) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldhil.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- DI tmp_addr;
- QI tmp_bytecount;
- DI tmp_val;
- tmp_addr = ADDDI (GET_H_GR (FLD (f_left)), FLD (f_disp6));
- tmp_bytecount = ADDDI (ANDDI (tmp_addr, 3), 1);
-if (ANDQI (tmp_bytecount, 4)) {
- {
- SI opval = GET_H_GR (FLD (f_dest));
- SETMEMSI (current_cpu, pc, ANDDI (tmp_addr, -4), opval);
- written |= (1 << 5);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-} else {
-if (GET_H_ENDIAN ()) {
-{
- tmp_val = GET_H_GR (FLD (f_dest));
-if (ANDQI (tmp_bytecount, 1)) {
-{
- {
- UQI opval = ANDQI (tmp_val, 255);
- SETMEMUQI (current_cpu, pc, tmp_addr, opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 8);
-}
-}
-if (ANDQI (tmp_bytecount, 2)) {
-{
- {
- HI opval = ANDHI (tmp_val, 65535);
- SETMEMHI (current_cpu, pc, ANDDI (tmp_addr, -4), opval);
- written |= (1 << 4);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 16);
-}
-}
-}
-} else {
-{
- tmp_val = SRLDI (GET_H_GR (FLD (f_dest)), SUBSI (32, MULSI (8, tmp_bytecount)));
-if (ANDQI (tmp_bytecount, 2)) {
-{
- {
- HI opval = ANDHI (tmp_val, 65535);
- SETMEMHI (current_cpu, pc, ANDDI (tmp_addr, -4), opval);
- written |= (1 << 4);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 16);
-}
-}
-if (ANDQI (tmp_bytecount, 1)) {
-{
- {
- UQI opval = ANDQI (tmp_val, 255);
- SETMEMUQI (current_cpu, pc, tmp_addr, opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 8);
-}
-}
-}
-}
-}
-}
-
- abuf->written = written;
- return vpc;
-#undef FLD
-}
-
-/* sthiq: sthi.q $rm, $disp6, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,sthiq) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldhil.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- DI tmp_addr;
- QI tmp_bytecount;
- DI tmp_val;
- tmp_addr = ADDDI (GET_H_GR (FLD (f_left)), FLD (f_disp6));
- tmp_bytecount = ADDDI (ANDDI (tmp_addr, 7), 1);
-if (ANDQI (tmp_bytecount, 8)) {
- {
- DI opval = GET_H_GR (FLD (f_dest));
- SETMEMDI (current_cpu, pc, ANDDI (tmp_addr, -8), opval);
- written |= (1 << 4);
- TRACE_RESULT (current_cpu, abuf, "memory", 'D', opval);
- }
-} else {
-if (GET_H_ENDIAN ()) {
-{
- tmp_val = GET_H_GR (FLD (f_dest));
-if (ANDQI (tmp_bytecount, 1)) {
-{
- {
- UQI opval = ANDQI (tmp_val, 255);
- SETMEMUQI (current_cpu, pc, tmp_addr, opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 8);
-}
-}
-if (ANDQI (tmp_bytecount, 2)) {
-{
- {
- HI opval = ANDHI (tmp_val, 65535);
- SETMEMHI (current_cpu, pc, ANDDI (tmp_addr, -4), opval);
- written |= (1 << 5);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 16);
-}
-}
-if (ANDQI (tmp_bytecount, 4)) {
-{
- {
- SI opval = ANDSI (tmp_val, 0xffffffff);
- SETMEMSI (current_cpu, pc, ANDDI (tmp_addr, -8), opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 32);
-}
-}
-}
-} else {
-{
- tmp_val = SRLDI (GET_H_GR (FLD (f_dest)), SUBSI (64, MULSI (8, tmp_bytecount)));
-if (ANDQI (tmp_bytecount, 4)) {
-{
- {
- SI opval = ANDSI (tmp_val, 0xffffffff);
- SETMEMSI (current_cpu, pc, ANDDI (tmp_addr, -8), opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 32);
-}
-}
-if (ANDQI (tmp_bytecount, 2)) {
-{
- {
- HI opval = ANDHI (tmp_val, 65535);
- SETMEMHI (current_cpu, pc, ANDDI (tmp_addr, -4), opval);
- written |= (1 << 5);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 16);
-}
-}
-if (ANDQI (tmp_bytecount, 1)) {
-{
- {
- UQI opval = ANDQI (tmp_val, 255);
- SETMEMUQI (current_cpu, pc, tmp_addr, opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 8);
-}
-}
-}
-}
-}
-}
-
- abuf->written = written;
- return vpc;
-#undef FLD
-}
-
-/* stlol: stlo.l $rm, $disp6, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,stlol) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldhil.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- DI tmp_addr;
- QI tmp_bytecount;
- DI tmp_val;
- tmp_addr = ADDDI (GET_H_GR (FLD (f_left)), FLD (f_disp6));
- tmp_bytecount = SUBSI (4, ANDDI (tmp_addr, 3));
-if (ANDQI (tmp_bytecount, 4)) {
- {
- USI opval = GET_H_GR (FLD (f_dest));
- SETMEMUSI (current_cpu, pc, tmp_addr, opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-} else {
-if (GET_H_ENDIAN ()) {
-{
- tmp_val = SRLDI (GET_H_GR (FLD (f_dest)), SUBSI (32, MULSI (8, tmp_bytecount)));
-if (ANDQI (tmp_bytecount, 2)) {
-{
- {
- UHI opval = ANDHI (tmp_val, 65535);
- SETMEMUHI (current_cpu, pc, ANDDI (ADDDI (tmp_addr, 1), -2), opval);
- written |= (1 << 4);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 16);
-}
-}
-if (ANDQI (tmp_bytecount, 1)) {
-{
- {
- UQI opval = ANDQI (tmp_val, 255);
- SETMEMUQI (current_cpu, pc, tmp_addr, opval);
- written |= (1 << 5);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 8);
-}
-}
-}
-} else {
-{
- tmp_val = GET_H_GR (FLD (f_dest));
-if (ANDQI (tmp_bytecount, 1)) {
-{
- {
- UQI opval = ANDQI (tmp_val, 255);
- SETMEMUQI (current_cpu, pc, tmp_addr, opval);
- written |= (1 << 5);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 8);
-}
-}
-if (ANDQI (tmp_bytecount, 2)) {
-{
- {
- UHI opval = ANDHI (tmp_val, 65535);
- SETMEMUHI (current_cpu, pc, ANDDI (ADDDI (tmp_addr, 1), -2), opval);
- written |= (1 << 4);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 16);
-}
-}
-}
-}
-}
-}
-
- abuf->written = written;
- return vpc;
-#undef FLD
-}
-
-/* stloq: stlo.q $rm, $disp6, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,stloq) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldhil.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- DI tmp_addr;
- QI tmp_bytecount;
- DI tmp_val;
- tmp_addr = ADDDI (GET_H_GR (FLD (f_left)), FLD (f_disp6));
- tmp_bytecount = SUBSI (8, ANDDI (tmp_addr, 7));
-if (ANDQI (tmp_bytecount, 8)) {
- {
- UDI opval = GET_H_GR (FLD (f_dest));
- SETMEMUDI (current_cpu, pc, tmp_addr, opval);
- written |= (1 << 4);
- TRACE_RESULT (current_cpu, abuf, "memory", 'D', opval);
- }
-} else {
-if (GET_H_ENDIAN ()) {
-{
- tmp_val = SRLDI (GET_H_GR (FLD (f_dest)), SUBSI (64, MULSI (8, tmp_bytecount)));
-if (ANDQI (tmp_bytecount, 4)) {
-{
- {
- USI opval = ANDSI (tmp_val, 0xffffffff);
- SETMEMUSI (current_cpu, pc, ANDDI (ADDDI (tmp_addr, 3), -4), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 32);
-}
-}
-if (ANDQI (tmp_bytecount, 2)) {
-{
- {
- UHI opval = ANDHI (tmp_val, 65535);
- SETMEMUHI (current_cpu, pc, ANDDI (ADDDI (tmp_addr, 1), -2), opval);
- written |= (1 << 5);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 16);
-}
-}
-if (ANDQI (tmp_bytecount, 1)) {
-{
- {
- UQI opval = ANDQI (tmp_val, 255);
- SETMEMUQI (current_cpu, pc, tmp_addr, opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 8);
-}
-}
-}
-} else {
-{
- tmp_val = GET_H_GR (FLD (f_dest));
-if (ANDQI (tmp_bytecount, 1)) {
-{
- {
- UQI opval = ANDQI (tmp_val, 255);
- SETMEMUQI (current_cpu, pc, tmp_addr, opval);
- written |= (1 << 6);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 8);
-}
-}
-if (ANDQI (tmp_bytecount, 2)) {
-{
- {
- UHI opval = ANDHI (tmp_val, 65535);
- SETMEMUHI (current_cpu, pc, ANDDI (ADDDI (tmp_addr, 1), -2), opval);
- written |= (1 << 5);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 16);
-}
-}
-if (ANDQI (tmp_bytecount, 4)) {
-{
- {
- USI opval = ANDSI (tmp_val, 0xffffffff);
- SETMEMUSI (current_cpu, pc, ANDDI (ADDDI (tmp_addr, 3), -4), opval);
- written |= (1 << 7);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
- tmp_val = SRLDI (tmp_val, 32);
-}
-}
-}
-}
-}
-}
-
- abuf->written = written;
- return vpc;
-#undef FLD
-}
-
-/* stxb: stx.b $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,stxb) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- UQI opval = SUBWORDDIQI (GET_H_GR (FLD (f_dest)), 7);
- SETMEMUQI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right))), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* stxl: stx.l $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,stxl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- SI opval = SUBWORDDISI (GET_H_GR (FLD (f_dest)), 1);
- SETMEMSI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right))), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* stxq: stx.q $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,stxq) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = GET_H_GR (FLD (f_dest));
- SETMEMDI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right))), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* stxw: stx.w $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,stxw) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- HI opval = SUBWORDDIHI (GET_H_GR (FLD (f_dest)), 3);
- SETMEMHI (current_cpu, pc, ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right))), opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* sub: sub $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,sub) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = SUBDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* subl: sub.l $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,subl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = EXTSIDI (SUBSI (SUBWORDDISI (GET_H_GR (FLD (f_left)), 1), SUBWORDDISI (GET_H_GR (FLD (f_right)), 1)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* swapq: swap.q $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,swapq) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-{
- DI tmp_addr;
- DI tmp_temp;
- tmp_addr = ADDDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)));
- tmp_temp = GETMEMDI (current_cpu, pc, tmp_addr);
- {
- DI opval = GET_H_GR (FLD (f_dest));
- SETMEMDI (current_cpu, pc, tmp_addr, opval);
- TRACE_RESULT (current_cpu, abuf, "memory", 'D', opval);
- }
- {
- DI opval = tmp_temp;
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-}
-
- return vpc;
-#undef FLD
-}
-
-/* synci: synci */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,synci) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
- return vpc;
-#undef FLD
-}
-
-/* synco: synco */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,synco) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
- return vpc;
-#undef FLD
-}
-
-/* trapa: trapa $rm */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,trapa) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_xori.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-sh64_trapa (current_cpu, GET_H_GR (FLD (f_left)), pc);
-
- return vpc;
-#undef FLD
-}
-
-/* xor: xor $rm, $rn, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,xor) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = XORDI (GET_H_GR (FLD (f_left)), GET_H_GR (FLD (f_right)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* xori: xori $rm, $imm6, $rd */
-
-static SEM_PC
-SEM_FN_NAME (sh64_media,xori) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_xori.f
- ARGBUF *abuf = SEM_ARGBUF (sem_arg);
- int UNUSED written = 0;
- IADDR UNUSED pc = abuf->addr;
- SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
- {
- DI opval = XORDI (GET_H_GR (FLD (f_left)), EXTSIDI (FLD (f_imm6)));
- SET_H_GR (FLD (f_dest), opval);
- TRACE_RESULT (current_cpu, abuf, "gr", 'D', opval);
- }
-
- return vpc;
-#undef FLD
-}
-
-/* Table of all semantic fns. */
-
-static const struct sem_fn_desc sem_fns[] = {
- { SH64_MEDIA_INSN_X_INVALID, SEM_FN_NAME (sh64_media,x_invalid) },
- { SH64_MEDIA_INSN_X_AFTER, SEM_FN_NAME (sh64_media,x_after) },
- { SH64_MEDIA_INSN_X_BEFORE, SEM_FN_NAME (sh64_media,x_before) },
- { SH64_MEDIA_INSN_X_CTI_CHAIN, SEM_FN_NAME (sh64_media,x_cti_chain) },
- { SH64_MEDIA_INSN_X_CHAIN, SEM_FN_NAME (sh64_media,x_chain) },
- { SH64_MEDIA_INSN_X_BEGIN, SEM_FN_NAME (sh64_media,x_begin) },
- { SH64_MEDIA_INSN_ADD, SEM_FN_NAME (sh64_media,add) },
- { SH64_MEDIA_INSN_ADDL, SEM_FN_NAME (sh64_media,addl) },
- { SH64_MEDIA_INSN_ADDI, SEM_FN_NAME (sh64_media,addi) },
- { SH64_MEDIA_INSN_ADDIL, SEM_FN_NAME (sh64_media,addil) },
- { SH64_MEDIA_INSN_ADDZL, SEM_FN_NAME (sh64_media,addzl) },
- { SH64_MEDIA_INSN_ALLOCO, SEM_FN_NAME (sh64_media,alloco) },
- { SH64_MEDIA_INSN_AND, SEM_FN_NAME (sh64_media,and) },
- { SH64_MEDIA_INSN_ANDC, SEM_FN_NAME (sh64_media,andc) },
- { SH64_MEDIA_INSN_ANDI, SEM_FN_NAME (sh64_media,andi) },
- { SH64_MEDIA_INSN_BEQ, SEM_FN_NAME (sh64_media,beq) },
- { SH64_MEDIA_INSN_BEQI, SEM_FN_NAME (sh64_media,beqi) },
- { SH64_MEDIA_INSN_BGE, SEM_FN_NAME (sh64_media,bge) },
- { SH64_MEDIA_INSN_BGEU, SEM_FN_NAME (sh64_media,bgeu) },
- { SH64_MEDIA_INSN_BGT, SEM_FN_NAME (sh64_media,bgt) },
- { SH64_MEDIA_INSN_BGTU, SEM_FN_NAME (sh64_media,bgtu) },
- { SH64_MEDIA_INSN_BLINK, SEM_FN_NAME (sh64_media,blink) },
- { SH64_MEDIA_INSN_BNE, SEM_FN_NAME (sh64_media,bne) },
- { SH64_MEDIA_INSN_BNEI, SEM_FN_NAME (sh64_media,bnei) },
- { SH64_MEDIA_INSN_BRK, SEM_FN_NAME (sh64_media,brk) },
- { SH64_MEDIA_INSN_BYTEREV, SEM_FN_NAME (sh64_media,byterev) },
- { SH64_MEDIA_INSN_CMPEQ, SEM_FN_NAME (sh64_media,cmpeq) },
- { SH64_MEDIA_INSN_CMPGT, SEM_FN_NAME (sh64_media,cmpgt) },
- { SH64_MEDIA_INSN_CMPGTU, SEM_FN_NAME (sh64_media,cmpgtu) },
- { SH64_MEDIA_INSN_CMVEQ, SEM_FN_NAME (sh64_media,cmveq) },
- { SH64_MEDIA_INSN_CMVNE, SEM_FN_NAME (sh64_media,cmvne) },
- { SH64_MEDIA_INSN_FABSD, SEM_FN_NAME (sh64_media,fabsd) },
- { SH64_MEDIA_INSN_FABSS, SEM_FN_NAME (sh64_media,fabss) },
- { SH64_MEDIA_INSN_FADDD, SEM_FN_NAME (sh64_media,faddd) },
- { SH64_MEDIA_INSN_FADDS, SEM_FN_NAME (sh64_media,fadds) },
- { SH64_MEDIA_INSN_FCMPEQD, SEM_FN_NAME (sh64_media,fcmpeqd) },
- { SH64_MEDIA_INSN_FCMPEQS, SEM_FN_NAME (sh64_media,fcmpeqs) },
- { SH64_MEDIA_INSN_FCMPGED, SEM_FN_NAME (sh64_media,fcmpged) },
- { SH64_MEDIA_INSN_FCMPGES, SEM_FN_NAME (sh64_media,fcmpges) },
- { SH64_MEDIA_INSN_FCMPGTD, SEM_FN_NAME (sh64_media,fcmpgtd) },
- { SH64_MEDIA_INSN_FCMPGTS, SEM_FN_NAME (sh64_media,fcmpgts) },
- { SH64_MEDIA_INSN_FCMPUND, SEM_FN_NAME (sh64_media,fcmpund) },
- { SH64_MEDIA_INSN_FCMPUNS, SEM_FN_NAME (sh64_media,fcmpuns) },
- { SH64_MEDIA_INSN_FCNVDS, SEM_FN_NAME (sh64_media,fcnvds) },
- { SH64_MEDIA_INSN_FCNVSD, SEM_FN_NAME (sh64_media,fcnvsd) },
- { SH64_MEDIA_INSN_FDIVD, SEM_FN_NAME (sh64_media,fdivd) },
- { SH64_MEDIA_INSN_FDIVS, SEM_FN_NAME (sh64_media,fdivs) },
- { SH64_MEDIA_INSN_FGETSCR, SEM_FN_NAME (sh64_media,fgetscr) },
- { SH64_MEDIA_INSN_FIPRS, SEM_FN_NAME (sh64_media,fiprs) },
- { SH64_MEDIA_INSN_FLDD, SEM_FN_NAME (sh64_media,fldd) },
- { SH64_MEDIA_INSN_FLDP, SEM_FN_NAME (sh64_media,fldp) },
- { SH64_MEDIA_INSN_FLDS, SEM_FN_NAME (sh64_media,flds) },
- { SH64_MEDIA_INSN_FLDXD, SEM_FN_NAME (sh64_media,fldxd) },
- { SH64_MEDIA_INSN_FLDXP, SEM_FN_NAME (sh64_media,fldxp) },
- { SH64_MEDIA_INSN_FLDXS, SEM_FN_NAME (sh64_media,fldxs) },
- { SH64_MEDIA_INSN_FLOATLD, SEM_FN_NAME (sh64_media,floatld) },
- { SH64_MEDIA_INSN_FLOATLS, SEM_FN_NAME (sh64_media,floatls) },
- { SH64_MEDIA_INSN_FLOATQD, SEM_FN_NAME (sh64_media,floatqd) },
- { SH64_MEDIA_INSN_FLOATQS, SEM_FN_NAME (sh64_media,floatqs) },
- { SH64_MEDIA_INSN_FMACS, SEM_FN_NAME (sh64_media,fmacs) },
- { SH64_MEDIA_INSN_FMOVD, SEM_FN_NAME (sh64_media,fmovd) },
- { SH64_MEDIA_INSN_FMOVDQ, SEM_FN_NAME (sh64_media,fmovdq) },
- { SH64_MEDIA_INSN_FMOVLS, SEM_FN_NAME (sh64_media,fmovls) },
- { SH64_MEDIA_INSN_FMOVQD, SEM_FN_NAME (sh64_media,fmovqd) },
- { SH64_MEDIA_INSN_FMOVS, SEM_FN_NAME (sh64_media,fmovs) },
- { SH64_MEDIA_INSN_FMOVSL, SEM_FN_NAME (sh64_media,fmovsl) },
- { SH64_MEDIA_INSN_FMULD, SEM_FN_NAME (sh64_media,fmuld) },
- { SH64_MEDIA_INSN_FMULS, SEM_FN_NAME (sh64_media,fmuls) },
- { SH64_MEDIA_INSN_FNEGD, SEM_FN_NAME (sh64_media,fnegd) },
- { SH64_MEDIA_INSN_FNEGS, SEM_FN_NAME (sh64_media,fnegs) },
- { SH64_MEDIA_INSN_FPUTSCR, SEM_FN_NAME (sh64_media,fputscr) },
- { SH64_MEDIA_INSN_FSQRTD, SEM_FN_NAME (sh64_media,fsqrtd) },
- { SH64_MEDIA_INSN_FSQRTS, SEM_FN_NAME (sh64_media,fsqrts) },
- { SH64_MEDIA_INSN_FSTD, SEM_FN_NAME (sh64_media,fstd) },
- { SH64_MEDIA_INSN_FSTP, SEM_FN_NAME (sh64_media,fstp) },
- { SH64_MEDIA_INSN_FSTS, SEM_FN_NAME (sh64_media,fsts) },
- { SH64_MEDIA_INSN_FSTXD, SEM_FN_NAME (sh64_media,fstxd) },
- { SH64_MEDIA_INSN_FSTXP, SEM_FN_NAME (sh64_media,fstxp) },
- { SH64_MEDIA_INSN_FSTXS, SEM_FN_NAME (sh64_media,fstxs) },
- { SH64_MEDIA_INSN_FSUBD, SEM_FN_NAME (sh64_media,fsubd) },
- { SH64_MEDIA_INSN_FSUBS, SEM_FN_NAME (sh64_media,fsubs) },
- { SH64_MEDIA_INSN_FTRCDL, SEM_FN_NAME (sh64_media,ftrcdl) },
- { SH64_MEDIA_INSN_FTRCSL, SEM_FN_NAME (sh64_media,ftrcsl) },
- { SH64_MEDIA_INSN_FTRCDQ, SEM_FN_NAME (sh64_media,ftrcdq) },
- { SH64_MEDIA_INSN_FTRCSQ, SEM_FN_NAME (sh64_media,ftrcsq) },
- { SH64_MEDIA_INSN_FTRVS, SEM_FN_NAME (sh64_media,ftrvs) },
- { SH64_MEDIA_INSN_GETCFG, SEM_FN_NAME (sh64_media,getcfg) },
- { SH64_MEDIA_INSN_GETCON, SEM_FN_NAME (sh64_media,getcon) },
- { SH64_MEDIA_INSN_GETTR, SEM_FN_NAME (sh64_media,gettr) },
- { SH64_MEDIA_INSN_ICBI, SEM_FN_NAME (sh64_media,icbi) },
- { SH64_MEDIA_INSN_LDB, SEM_FN_NAME (sh64_media,ldb) },
- { SH64_MEDIA_INSN_LDL, SEM_FN_NAME (sh64_media,ldl) },
- { SH64_MEDIA_INSN_LDQ, SEM_FN_NAME (sh64_media,ldq) },
- { SH64_MEDIA_INSN_LDUB, SEM_FN_NAME (sh64_media,ldub) },
- { SH64_MEDIA_INSN_LDUW, SEM_FN_NAME (sh64_media,lduw) },
- { SH64_MEDIA_INSN_LDW, SEM_FN_NAME (sh64_media,ldw) },
- { SH64_MEDIA_INSN_LDHIL, SEM_FN_NAME (sh64_media,ldhil) },
- { SH64_MEDIA_INSN_LDHIQ, SEM_FN_NAME (sh64_media,ldhiq) },
- { SH64_MEDIA_INSN_LDLOL, SEM_FN_NAME (sh64_media,ldlol) },
- { SH64_MEDIA_INSN_LDLOQ, SEM_FN_NAME (sh64_media,ldloq) },
- { SH64_MEDIA_INSN_LDXB, SEM_FN_NAME (sh64_media,ldxb) },
- { SH64_MEDIA_INSN_LDXL, SEM_FN_NAME (sh64_media,ldxl) },
- { SH64_MEDIA_INSN_LDXQ, SEM_FN_NAME (sh64_media,ldxq) },
- { SH64_MEDIA_INSN_LDXUB, SEM_FN_NAME (sh64_media,ldxub) },
- { SH64_MEDIA_INSN_LDXUW, SEM_FN_NAME (sh64_media,ldxuw) },
- { SH64_MEDIA_INSN_LDXW, SEM_FN_NAME (sh64_media,ldxw) },
- { SH64_MEDIA_INSN_MABSL, SEM_FN_NAME (sh64_media,mabsl) },
- { SH64_MEDIA_INSN_MABSW, SEM_FN_NAME (sh64_media,mabsw) },
- { SH64_MEDIA_INSN_MADDL, SEM_FN_NAME (sh64_media,maddl) },
- { SH64_MEDIA_INSN_MADDW, SEM_FN_NAME (sh64_media,maddw) },
- { SH64_MEDIA_INSN_MADDSL, SEM_FN_NAME (sh64_media,maddsl) },
- { SH64_MEDIA_INSN_MADDSUB, SEM_FN_NAME (sh64_media,maddsub) },
- { SH64_MEDIA_INSN_MADDSW, SEM_FN_NAME (sh64_media,maddsw) },
- { SH64_MEDIA_INSN_MCMPEQB, SEM_FN_NAME (sh64_media,mcmpeqb) },
- { SH64_MEDIA_INSN_MCMPEQL, SEM_FN_NAME (sh64_media,mcmpeql) },
- { SH64_MEDIA_INSN_MCMPEQW, SEM_FN_NAME (sh64_media,mcmpeqw) },
- { SH64_MEDIA_INSN_MCMPGTL, SEM_FN_NAME (sh64_media,mcmpgtl) },
- { SH64_MEDIA_INSN_MCMPGTUB, SEM_FN_NAME (sh64_media,mcmpgtub) },
- { SH64_MEDIA_INSN_MCMPGTW, SEM_FN_NAME (sh64_media,mcmpgtw) },
- { SH64_MEDIA_INSN_MCMV, SEM_FN_NAME (sh64_media,mcmv) },
- { SH64_MEDIA_INSN_MCNVSLW, SEM_FN_NAME (sh64_media,mcnvslw) },
- { SH64_MEDIA_INSN_MCNVSWB, SEM_FN_NAME (sh64_media,mcnvswb) },
- { SH64_MEDIA_INSN_MCNVSWUB, SEM_FN_NAME (sh64_media,mcnvswub) },
- { SH64_MEDIA_INSN_MEXTR1, SEM_FN_NAME (sh64_media,mextr1) },
- { SH64_MEDIA_INSN_MEXTR2, SEM_FN_NAME (sh64_media,mextr2) },
- { SH64_MEDIA_INSN_MEXTR3, SEM_FN_NAME (sh64_media,mextr3) },
- { SH64_MEDIA_INSN_MEXTR4, SEM_FN_NAME (sh64_media,mextr4) },
- { SH64_MEDIA_INSN_MEXTR5, SEM_FN_NAME (sh64_media,mextr5) },
- { SH64_MEDIA_INSN_MEXTR6, SEM_FN_NAME (sh64_media,mextr6) },
- { SH64_MEDIA_INSN_MEXTR7, SEM_FN_NAME (sh64_media,mextr7) },
- { SH64_MEDIA_INSN_MMACFXWL, SEM_FN_NAME (sh64_media,mmacfxwl) },
- { SH64_MEDIA_INSN_MMACNFX_WL, SEM_FN_NAME (sh64_media,mmacnfx_wl) },
- { SH64_MEDIA_INSN_MMULL, SEM_FN_NAME (sh64_media,mmull) },
- { SH64_MEDIA_INSN_MMULW, SEM_FN_NAME (sh64_media,mmulw) },
- { SH64_MEDIA_INSN_MMULFXL, SEM_FN_NAME (sh64_media,mmulfxl) },
- { SH64_MEDIA_INSN_MMULFXW, SEM_FN_NAME (sh64_media,mmulfxw) },
- { SH64_MEDIA_INSN_MMULFXRPW, SEM_FN_NAME (sh64_media,mmulfxrpw) },
- { SH64_MEDIA_INSN_MMULHIWL, SEM_FN_NAME (sh64_media,mmulhiwl) },
- { SH64_MEDIA_INSN_MMULLOWL, SEM_FN_NAME (sh64_media,mmullowl) },
- { SH64_MEDIA_INSN_MMULSUMWQ, SEM_FN_NAME (sh64_media,mmulsumwq) },
- { SH64_MEDIA_INSN_MOVI, SEM_FN_NAME (sh64_media,movi) },
- { SH64_MEDIA_INSN_MPERMW, SEM_FN_NAME (sh64_media,mpermw) },
- { SH64_MEDIA_INSN_MSADUBQ, SEM_FN_NAME (sh64_media,msadubq) },
- { SH64_MEDIA_INSN_MSHALDSL, SEM_FN_NAME (sh64_media,mshaldsl) },
- { SH64_MEDIA_INSN_MSHALDSW, SEM_FN_NAME (sh64_media,mshaldsw) },
- { SH64_MEDIA_INSN_MSHARDL, SEM_FN_NAME (sh64_media,mshardl) },
- { SH64_MEDIA_INSN_MSHARDW, SEM_FN_NAME (sh64_media,mshardw) },
- { SH64_MEDIA_INSN_MSHARDSQ, SEM_FN_NAME (sh64_media,mshardsq) },
- { SH64_MEDIA_INSN_MSHFHIB, SEM_FN_NAME (sh64_media,mshfhib) },
- { SH64_MEDIA_INSN_MSHFHIL, SEM_FN_NAME (sh64_media,mshfhil) },
- { SH64_MEDIA_INSN_MSHFHIW, SEM_FN_NAME (sh64_media,mshfhiw) },
- { SH64_MEDIA_INSN_MSHFLOB, SEM_FN_NAME (sh64_media,mshflob) },
- { SH64_MEDIA_INSN_MSHFLOL, SEM_FN_NAME (sh64_media,mshflol) },
- { SH64_MEDIA_INSN_MSHFLOW, SEM_FN_NAME (sh64_media,mshflow) },
- { SH64_MEDIA_INSN_MSHLLDL, SEM_FN_NAME (sh64_media,mshlldl) },
- { SH64_MEDIA_INSN_MSHLLDW, SEM_FN_NAME (sh64_media,mshlldw) },
- { SH64_MEDIA_INSN_MSHLRDL, SEM_FN_NAME (sh64_media,mshlrdl) },
- { SH64_MEDIA_INSN_MSHLRDW, SEM_FN_NAME (sh64_media,mshlrdw) },
- { SH64_MEDIA_INSN_MSUBL, SEM_FN_NAME (sh64_media,msubl) },
- { SH64_MEDIA_INSN_MSUBW, SEM_FN_NAME (sh64_media,msubw) },
- { SH64_MEDIA_INSN_MSUBSL, SEM_FN_NAME (sh64_media,msubsl) },
- { SH64_MEDIA_INSN_MSUBSUB, SEM_FN_NAME (sh64_media,msubsub) },
- { SH64_MEDIA_INSN_MSUBSW, SEM_FN_NAME (sh64_media,msubsw) },
- { SH64_MEDIA_INSN_MULSL, SEM_FN_NAME (sh64_media,mulsl) },
- { SH64_MEDIA_INSN_MULUL, SEM_FN_NAME (sh64_media,mulul) },
- { SH64_MEDIA_INSN_NOP, SEM_FN_NAME (sh64_media,nop) },
- { SH64_MEDIA_INSN_NSB, SEM_FN_NAME (sh64_media,nsb) },
- { SH64_MEDIA_INSN_OCBI, SEM_FN_NAME (sh64_media,ocbi) },
- { SH64_MEDIA_INSN_OCBP, SEM_FN_NAME (sh64_media,ocbp) },
- { SH64_MEDIA_INSN_OCBWB, SEM_FN_NAME (sh64_media,ocbwb) },
- { SH64_MEDIA_INSN_OR, SEM_FN_NAME (sh64_media,or) },
- { SH64_MEDIA_INSN_ORI, SEM_FN_NAME (sh64_media,ori) },
- { SH64_MEDIA_INSN_PREFI, SEM_FN_NAME (sh64_media,prefi) },
- { SH64_MEDIA_INSN_PTA, SEM_FN_NAME (sh64_media,pta) },
- { SH64_MEDIA_INSN_PTABS, SEM_FN_NAME (sh64_media,ptabs) },
- { SH64_MEDIA_INSN_PTB, SEM_FN_NAME (sh64_media,ptb) },
- { SH64_MEDIA_INSN_PTREL, SEM_FN_NAME (sh64_media,ptrel) },
- { SH64_MEDIA_INSN_PUTCFG, SEM_FN_NAME (sh64_media,putcfg) },
- { SH64_MEDIA_INSN_PUTCON, SEM_FN_NAME (sh64_media,putcon) },
- { SH64_MEDIA_INSN_RTE, SEM_FN_NAME (sh64_media,rte) },
- { SH64_MEDIA_INSN_SHARD, SEM_FN_NAME (sh64_media,shard) },
- { SH64_MEDIA_INSN_SHARDL, SEM_FN_NAME (sh64_media,shardl) },
- { SH64_MEDIA_INSN_SHARI, SEM_FN_NAME (sh64_media,shari) },
- { SH64_MEDIA_INSN_SHARIL, SEM_FN_NAME (sh64_media,sharil) },
- { SH64_MEDIA_INSN_SHLLD, SEM_FN_NAME (sh64_media,shlld) },
- { SH64_MEDIA_INSN_SHLLDL, SEM_FN_NAME (sh64_media,shlldl) },
- { SH64_MEDIA_INSN_SHLLI, SEM_FN_NAME (sh64_media,shlli) },
- { SH64_MEDIA_INSN_SHLLIL, SEM_FN_NAME (sh64_media,shllil) },
- { SH64_MEDIA_INSN_SHLRD, SEM_FN_NAME (sh64_media,shlrd) },
- { SH64_MEDIA_INSN_SHLRDL, SEM_FN_NAME (sh64_media,shlrdl) },
- { SH64_MEDIA_INSN_SHLRI, SEM_FN_NAME (sh64_media,shlri) },
- { SH64_MEDIA_INSN_SHLRIL, SEM_FN_NAME (sh64_media,shlril) },
- { SH64_MEDIA_INSN_SHORI, SEM_FN_NAME (sh64_media,shori) },
- { SH64_MEDIA_INSN_SLEEP, SEM_FN_NAME (sh64_media,sleep) },
- { SH64_MEDIA_INSN_STB, SEM_FN_NAME (sh64_media,stb) },
- { SH64_MEDIA_INSN_STL, SEM_FN_NAME (sh64_media,stl) },
- { SH64_MEDIA_INSN_STQ, SEM_FN_NAME (sh64_media,stq) },
- { SH64_MEDIA_INSN_STW, SEM_FN_NAME (sh64_media,stw) },
- { SH64_MEDIA_INSN_STHIL, SEM_FN_NAME (sh64_media,sthil) },
- { SH64_MEDIA_INSN_STHIQ, SEM_FN_NAME (sh64_media,sthiq) },
- { SH64_MEDIA_INSN_STLOL, SEM_FN_NAME (sh64_media,stlol) },
- { SH64_MEDIA_INSN_STLOQ, SEM_FN_NAME (sh64_media,stloq) },
- { SH64_MEDIA_INSN_STXB, SEM_FN_NAME (sh64_media,stxb) },
- { SH64_MEDIA_INSN_STXL, SEM_FN_NAME (sh64_media,stxl) },
- { SH64_MEDIA_INSN_STXQ, SEM_FN_NAME (sh64_media,stxq) },
- { SH64_MEDIA_INSN_STXW, SEM_FN_NAME (sh64_media,stxw) },
- { SH64_MEDIA_INSN_SUB, SEM_FN_NAME (sh64_media,sub) },
- { SH64_MEDIA_INSN_SUBL, SEM_FN_NAME (sh64_media,subl) },
- { SH64_MEDIA_INSN_SWAPQ, SEM_FN_NAME (sh64_media,swapq) },
- { SH64_MEDIA_INSN_SYNCI, SEM_FN_NAME (sh64_media,synci) },
- { SH64_MEDIA_INSN_SYNCO, SEM_FN_NAME (sh64_media,synco) },
- { SH64_MEDIA_INSN_TRAPA, SEM_FN_NAME (sh64_media,trapa) },
- { SH64_MEDIA_INSN_XOR, SEM_FN_NAME (sh64_media,xor) },
- { SH64_MEDIA_INSN_XORI, SEM_FN_NAME (sh64_media,xori) },
- { 0, 0 }
-};
-
-/* Add the semantic fns to IDESC_TABLE. */
-
-void
-SEM_FN_NAME (sh64_media,init_idesc_table) (SIM_CPU *current_cpu)
-{
- IDESC *idesc_table = CPU_IDESC (current_cpu);
- const struct sem_fn_desc *sf;
- int mach_num = MACH_NUM (CPU_MACH (current_cpu));
-
- for (sf = &sem_fns[0]; sf->fn != 0; ++sf)
- {
- const CGEN_INSN *insn = idesc_table[sf->index].idata;
- int valid_p = (CGEN_INSN_VIRTUAL_P (insn)
- || CGEN_INSN_MACH_HAS_P (insn, mach_num));
-#if FAST_P
- if (valid_p)
- idesc_table[sf->index].sem_fast = sf->fn;
- else
- idesc_table[sf->index].sem_fast = SEM_FN_NAME (sh64_media,x_invalid);
-#else
- if (valid_p)
- idesc_table[sf->index].sem_full = sf->fn;
- else
- idesc_table[sf->index].sem_full = SEM_FN_NAME (sh64_media,x_invalid);
-#endif
- }
-}
-
diff --git a/sim/sh64/sh-desc.c b/sim/sh64/sh-desc.c
deleted file mode 100644
index e95ab8782f5..00000000000
--- a/sim/sh64/sh-desc.c
+++ /dev/null
@@ -1,3287 +0,0 @@
-/* CPU data for sh.
-
-THIS FILE IS MACHINE GENERATED WITH CGEN.
-
-Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
-
-This file is part of the GNU Binutils and/or GDB, the GNU debugger.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-
-#include "sysdep.h"
-#include <ctype.h>
-#include <stdio.h>
-#include <stdarg.h>
-#include "ansidecl.h"
-#include "bfd.h"
-#include "symcat.h"
-#include "sh-desc.h"
-#include "sh-opc.h"
-#include "opintl.h"
-#include "libiberty.h"
-
-/* Attributes. */
-
-static const CGEN_ATTR_ENTRY bool_attr[] =
-{
- { "#f", 0 },
- { "#t", 1 },
- { 0, 0 }
-};
-
-static const CGEN_ATTR_ENTRY MACH_attr[] =
-{
- { "base", MACH_BASE },
- { "sh2", MACH_SH2 },
- { "sh3", MACH_SH3 },
- { "sh3e", MACH_SH3E },
- { "sh4", MACH_SH4 },
- { "sh5", MACH_SH5 },
- { "max", MACH_MAX },
- { 0, 0 }
-};
-
-static const CGEN_ATTR_ENTRY ISA_attr[] =
-{
- { "compact", ISA_COMPACT },
- { "media", ISA_MEDIA },
- { "max", ISA_MAX },
- { 0, 0 }
-};
-
-const CGEN_ATTR_TABLE sh_cgen_ifield_attr_table[] =
-{
- { "MACH", & MACH_attr[0], & MACH_attr[0] },
- { "ISA", & ISA_attr[0], & ISA_attr[0] },
- { "VIRTUAL", &bool_attr[0], &bool_attr[0] },
- { "PCREL-ADDR", &bool_attr[0], &bool_attr[0] },
- { "ABS-ADDR", &bool_attr[0], &bool_attr[0] },
- { "RESERVED", &bool_attr[0], &bool_attr[0] },
- { "SIGN-OPT", &bool_attr[0], &bool_attr[0] },
- { "SIGNED", &bool_attr[0], &bool_attr[0] },
- { 0, 0, 0 }
-};
-
-const CGEN_ATTR_TABLE sh_cgen_hardware_attr_table[] =
-{
- { "MACH", & MACH_attr[0], & MACH_attr[0] },
- { "VIRTUAL", &bool_attr[0], &bool_attr[0] },
- { "CACHE-ADDR", &bool_attr[0], &bool_attr[0] },
- { "PC", &bool_attr[0], &bool_attr[0] },
- { "PROFILE", &bool_attr[0], &bool_attr[0] },
- { 0, 0, 0 }
-};
-
-const CGEN_ATTR_TABLE sh_cgen_operand_attr_table[] =
-{
- { "MACH", & MACH_attr[0], & MACH_attr[0] },
- { "ISA", & ISA_attr[0], & ISA_attr[0] },
- { "VIRTUAL", &bool_attr[0], &bool_attr[0] },
- { "PCREL-ADDR", &bool_attr[0], &bool_attr[0] },
- { "ABS-ADDR", &bool_attr[0], &bool_attr[0] },
- { "SIGN-OPT", &bool_attr[0], &bool_attr[0] },
- { "SIGNED", &bool_attr[0], &bool_attr[0] },
- { "NEGATIVE", &bool_attr[0], &bool_attr[0] },
- { "RELAX", &bool_attr[0], &bool_attr[0] },
- { "SEM-ONLY", &bool_attr[0], &bool_attr[0] },
- { 0, 0, 0 }
-};
-
-const CGEN_ATTR_TABLE sh_cgen_insn_attr_table[] =
-{
- { "MACH", & MACH_attr[0], & MACH_attr[0] },
- { "ISA", & ISA_attr[0], & ISA_attr[0] },
- { "ALIAS", &bool_attr[0], &bool_attr[0] },
- { "VIRTUAL", &bool_attr[0], &bool_attr[0] },
- { "UNCOND-CTI", &bool_attr[0], &bool_attr[0] },
- { "COND-CTI", &bool_attr[0], &bool_attr[0] },
- { "SKIP-CTI", &bool_attr[0], &bool_attr[0] },
- { "DELAY-SLOT", &bool_attr[0], &bool_attr[0] },
- { "RELAXABLE", &bool_attr[0], &bool_attr[0] },
- { "RELAX", &bool_attr[0], &bool_attr[0] },
- { "NO-DIS", &bool_attr[0], &bool_attr[0] },
- { "PBB", &bool_attr[0], &bool_attr[0] },
- { "ILLSLOT", &bool_attr[0], &bool_attr[0] },
- { "FP-INSN", &bool_attr[0], &bool_attr[0] },
- { 0, 0, 0 }
-};
-
-/* Instruction set variants. */
-
-static const CGEN_ISA sh_cgen_isa_table[] = {
- { "media", 32, 32, 32, 32 },
- { "compact", 16, 16, 16, 16 },
- { 0, 0, 0, 0, 0 }
-};
-
-/* Machine variants. */
-
-static const CGEN_MACH sh_cgen_mach_table[] = {
- { "sh2", "sh2", MACH_SH2 },
- { "sh3", "sh3", MACH_SH3 },
- { "sh3e", "sh3e", MACH_SH3E },
- { "sh4", "sh4", MACH_SH4 },
- { "sh5", "sh5", MACH_SH5 },
- { 0, 0, 0 }
-};
-
-static CGEN_KEYWORD_ENTRY sh_cgen_opval_frc_names_entries[] =
-{
- { "fr0", 0, {0, {0}}, 0, 0 },
- { "fr1", 1, {0, {0}}, 0, 0 },
- { "fr2", 2, {0, {0}}, 0, 0 },
- { "fr3", 3, {0, {0}}, 0, 0 },
- { "fr4", 4, {0, {0}}, 0, 0 },
- { "fr5", 5, {0, {0}}, 0, 0 },
- { "fr6", 6, {0, {0}}, 0, 0 },
- { "fr7", 7, {0, {0}}, 0, 0 },
- { "fr8", 8, {0, {0}}, 0, 0 },
- { "fr9", 9, {0, {0}}, 0, 0 },
- { "fr10", 10, {0, {0}}, 0, 0 },
- { "fr11", 11, {0, {0}}, 0, 0 },
- { "fr12", 12, {0, {0}}, 0, 0 },
- { "fr13", 13, {0, {0}}, 0, 0 },
- { "fr14", 14, {0, {0}}, 0, 0 },
- { "fr15", 15, {0, {0}}, 0, 0 }
-};
-
-CGEN_KEYWORD sh_cgen_opval_frc_names =
-{
- & sh_cgen_opval_frc_names_entries[0],
- 16,
- 0, 0, 0, 0
-};
-
-static CGEN_KEYWORD_ENTRY sh_cgen_opval_drc_names_entries[] =
-{
- { "dr0", 0, {0, {0}}, 0, 0 },
- { "dr2", 2, {0, {0}}, 0, 0 },
- { "dr4", 4, {0, {0}}, 0, 0 },
- { "dr6", 6, {0, {0}}, 0, 0 },
- { "dr8", 8, {0, {0}}, 0, 0 },
- { "dr10", 10, {0, {0}}, 0, 0 },
- { "dr12", 12, {0, {0}}, 0, 0 },
- { "dr14", 14, {0, {0}}, 0, 0 }
-};
-
-CGEN_KEYWORD sh_cgen_opval_drc_names =
-{
- & sh_cgen_opval_drc_names_entries[0],
- 8,
- 0, 0, 0, 0
-};
-
-static CGEN_KEYWORD_ENTRY sh_cgen_opval_xf_names_entries[] =
-{
- { "xf0", 0, {0, {0}}, 0, 0 },
- { "xf1", 1, {0, {0}}, 0, 0 },
- { "xf2", 2, {0, {0}}, 0, 0 },
- { "xf3", 3, {0, {0}}, 0, 0 },
- { "xf4", 4, {0, {0}}, 0, 0 },
- { "xf5", 5, {0, {0}}, 0, 0 },
- { "xf6", 6, {0, {0}}, 0, 0 },
- { "xf7", 7, {0, {0}}, 0, 0 },
- { "xf8", 8, {0, {0}}, 0, 0 },
- { "xf9", 9, {0, {0}}, 0, 0 },
- { "xf10", 10, {0, {0}}, 0, 0 },
- { "xf11", 11, {0, {0}}, 0, 0 },
- { "xf12", 12, {0, {0}}, 0, 0 },
- { "xf13", 13, {0, {0}}, 0, 0 },
- { "xf14", 14, {0, {0}}, 0, 0 },
- { "xf15", 15, {0, {0}}, 0, 0 }
-};
-
-CGEN_KEYWORD sh_cgen_opval_xf_names =
-{
- & sh_cgen_opval_xf_names_entries[0],
- 16,
- 0, 0, 0, 0
-};
-
-static CGEN_KEYWORD_ENTRY sh_cgen_opval_h_gr_entries[] =
-{
- { "r0", 0, {0, {0}}, 0, 0 },
- { "r1", 1, {0, {0}}, 0, 0 },
- { "r2", 2, {0, {0}}, 0, 0 },
- { "r3", 3, {0, {0}}, 0, 0 },
- { "r4", 4, {0, {0}}, 0, 0 },
- { "r5", 5, {0, {0}}, 0, 0 },
- { "r6", 6, {0, {0}}, 0, 0 },
- { "r7", 7, {0, {0}}, 0, 0 },
- { "r8", 8, {0, {0}}, 0, 0 },
- { "r9", 9, {0, {0}}, 0, 0 },
- { "r10", 10, {0, {0}}, 0, 0 },
- { "r11", 11, {0, {0}}, 0, 0 },
- { "r12", 12, {0, {0}}, 0, 0 },
- { "r13", 13, {0, {0}}, 0, 0 },
- { "r14", 14, {0, {0}}, 0, 0 },
- { "r15", 15, {0, {0}}, 0, 0 },
- { "r16", 16, {0, {0}}, 0, 0 },
- { "r17", 17, {0, {0}}, 0, 0 },
- { "r18", 18, {0, {0}}, 0, 0 },
- { "r19", 19, {0, {0}}, 0, 0 },
- { "r20", 20, {0, {0}}, 0, 0 },
- { "r21", 21, {0, {0}}, 0, 0 },
- { "r22", 22, {0, {0}}, 0, 0 },
- { "r23", 23, {0, {0}}, 0, 0 },
- { "r24", 24, {0, {0}}, 0, 0 },
- { "r25", 25, {0, {0}}, 0, 0 },
- { "r26", 26, {0, {0}}, 0, 0 },
- { "r27", 27, {0, {0}}, 0, 0 },
- { "r28", 28, {0, {0}}, 0, 0 },
- { "r29", 29, {0, {0}}, 0, 0 },
- { "r30", 30, {0, {0}}, 0, 0 },
- { "r31", 31, {0, {0}}, 0, 0 },
- { "r32", 32, {0, {0}}, 0, 0 },
- { "r33", 33, {0, {0}}, 0, 0 },
- { "r34", 34, {0, {0}}, 0, 0 },
- { "r35", 35, {0, {0}}, 0, 0 },
- { "r36", 36, {0, {0}}, 0, 0 },
- { "r37", 37, {0, {0}}, 0, 0 },
- { "r38", 38, {0, {0}}, 0, 0 },
- { "r39", 39, {0, {0}}, 0, 0 },
- { "r40", 40, {0, {0}}, 0, 0 },
- { "r41", 41, {0, {0}}, 0, 0 },
- { "r42", 42, {0, {0}}, 0, 0 },
- { "r43", 43, {0, {0}}, 0, 0 },
- { "r44", 44, {0, {0}}, 0, 0 },
- { "r45", 45, {0, {0}}, 0, 0 },
- { "r46", 46, {0, {0}}, 0, 0 },
- { "r47", 47, {0, {0}}, 0, 0 },
- { "r48", 48, {0, {0}}, 0, 0 },
- { "r49", 49, {0, {0}}, 0, 0 },
- { "r50", 50, {0, {0}}, 0, 0 },
- { "r51", 51, {0, {0}}, 0, 0 },
- { "r52", 52, {0, {0}}, 0, 0 },
- { "r53", 53, {0, {0}}, 0, 0 },
- { "r54", 54, {0, {0}}, 0, 0 },
- { "r55", 55, {0, {0}}, 0, 0 },
- { "r56", 56, {0, {0}}, 0, 0 },
- { "r57", 57, {0, {0}}, 0, 0 },
- { "r58", 58, {0, {0}}, 0, 0 },
- { "r59", 59, {0, {0}}, 0, 0 },
- { "r60", 60, {0, {0}}, 0, 0 },
- { "r61", 61, {0, {0}}, 0, 0 },
- { "r62", 62, {0, {0}}, 0, 0 },
- { "r63", 63, {0, {0}}, 0, 0 }
-};
-
-CGEN_KEYWORD sh_cgen_opval_h_gr =
-{
- & sh_cgen_opval_h_gr_entries[0],
- 64,
- 0, 0, 0, 0
-};
-
-static CGEN_KEYWORD_ENTRY sh_cgen_opval_h_grc_entries[] =
-{
- { "r0", 0, {0, {0}}, 0, 0 },
- { "r1", 1, {0, {0}}, 0, 0 },
- { "r2", 2, {0, {0}}, 0, 0 },
- { "r3", 3, {0, {0}}, 0, 0 },
- { "r4", 4, {0, {0}}, 0, 0 },
- { "r5", 5, {0, {0}}, 0, 0 },
- { "r6", 6, {0, {0}}, 0, 0 },
- { "r7", 7, {0, {0}}, 0, 0 },
- { "r8", 8, {0, {0}}, 0, 0 },
- { "r9", 9, {0, {0}}, 0, 0 },
- { "r10", 10, {0, {0}}, 0, 0 },
- { "r11", 11, {0, {0}}, 0, 0 },
- { "r12", 12, {0, {0}}, 0, 0 },
- { "r13", 13, {0, {0}}, 0, 0 },
- { "r14", 14, {0, {0}}, 0, 0 },
- { "r15", 15, {0, {0}}, 0, 0 }
-};
-
-CGEN_KEYWORD sh_cgen_opval_h_grc =
-{
- & sh_cgen_opval_h_grc_entries[0],
- 16,
- 0, 0, 0, 0
-};
-
-static CGEN_KEYWORD_ENTRY sh_cgen_opval_h_cr_entries[] =
-{
- { "cr0", 0, {0, {0}}, 0, 0 },
- { "cr1", 1, {0, {0}}, 0, 0 },
- { "cr2", 2, {0, {0}}, 0, 0 },
- { "cr3", 3, {0, {0}}, 0, 0 },
- { "cr4", 4, {0, {0}}, 0, 0 },
- { "cr5", 5, {0, {0}}, 0, 0 },
- { "cr6", 6, {0, {0}}, 0, 0 },
- { "cr7", 7, {0, {0}}, 0, 0 },
- { "cr8", 8, {0, {0}}, 0, 0 },
- { "cr9", 9, {0, {0}}, 0, 0 },
- { "cr10", 10, {0, {0}}, 0, 0 },
- { "cr11", 11, {0, {0}}, 0, 0 },
- { "cr12", 12, {0, {0}}, 0, 0 },
- { "cr13", 13, {0, {0}}, 0, 0 },
- { "cr14", 14, {0, {0}}, 0, 0 },
- { "cr15", 15, {0, {0}}, 0, 0 },
- { "cr16", 16, {0, {0}}, 0, 0 },
- { "cr17", 17, {0, {0}}, 0, 0 },
- { "cr18", 18, {0, {0}}, 0, 0 },
- { "cr19", 19, {0, {0}}, 0, 0 },
- { "cr20", 20, {0, {0}}, 0, 0 },
- { "cr21", 21, {0, {0}}, 0, 0 },
- { "cr22", 22, {0, {0}}, 0, 0 },
- { "cr23", 23, {0, {0}}, 0, 0 },
- { "cr24", 24, {0, {0}}, 0, 0 },
- { "cr25", 25, {0, {0}}, 0, 0 },
- { "cr26", 26, {0, {0}}, 0, 0 },
- { "cr27", 27, {0, {0}}, 0, 0 },
- { "cr28", 28, {0, {0}}, 0, 0 },
- { "cr29", 29, {0, {0}}, 0, 0 },
- { "cr30", 30, {0, {0}}, 0, 0 },
- { "cr31", 31, {0, {0}}, 0, 0 },
- { "cr32", 32, {0, {0}}, 0, 0 },
- { "cr33", 33, {0, {0}}, 0, 0 },
- { "cr34", 34, {0, {0}}, 0, 0 },
- { "cr35", 35, {0, {0}}, 0, 0 },
- { "cr36", 36, {0, {0}}, 0, 0 },
- { "cr37", 37, {0, {0}}, 0, 0 },
- { "cr38", 38, {0, {0}}, 0, 0 },
- { "cr39", 39, {0, {0}}, 0, 0 },
- { "cr40", 40, {0, {0}}, 0, 0 },
- { "cr41", 41, {0, {0}}, 0, 0 },
- { "cr42", 42, {0, {0}}, 0, 0 },
- { "cr43", 43, {0, {0}}, 0, 0 },
- { "cr44", 44, {0, {0}}, 0, 0 },
- { "cr45", 45, {0, {0}}, 0, 0 },
- { "cr46", 46, {0, {0}}, 0, 0 },
- { "cr47", 47, {0, {0}}, 0, 0 },
- { "cr48", 48, {0, {0}}, 0, 0 },
- { "cr49", 49, {0, {0}}, 0, 0 },
- { "cr50", 50, {0, {0}}, 0, 0 },
- { "cr51", 51, {0, {0}}, 0, 0 },
- { "cr52", 52, {0, {0}}, 0, 0 },
- { "cr53", 53, {0, {0}}, 0, 0 },
- { "cr54", 54, {0, {0}}, 0, 0 },
- { "cr55", 55, {0, {0}}, 0, 0 },
- { "cr56", 56, {0, {0}}, 0, 0 },
- { "cr57", 57, {0, {0}}, 0, 0 },
- { "cr58", 58, {0, {0}}, 0, 0 },
- { "cr59", 59, {0, {0}}, 0, 0 },
- { "cr60", 60, {0, {0}}, 0, 0 },
- { "cr61", 61, {0, {0}}, 0, 0 },
- { "cr62", 62, {0, {0}}, 0, 0 },
- { "cr63", 63, {0, {0}}, 0, 0 }
-};
-
-CGEN_KEYWORD sh_cgen_opval_h_cr =
-{
- & sh_cgen_opval_h_cr_entries[0],
- 64,
- 0, 0, 0, 0
-};
-
-static CGEN_KEYWORD_ENTRY sh_cgen_opval_h_fr_entries[] =
-{
- { "fr0", 0, {0, {0}}, 0, 0 },
- { "fr1", 1, {0, {0}}, 0, 0 },
- { "fr2", 2, {0, {0}}, 0, 0 },
- { "fr3", 3, {0, {0}}, 0, 0 },
- { "fr4", 4, {0, {0}}, 0, 0 },
- { "fr5", 5, {0, {0}}, 0, 0 },
- { "fr6", 6, {0, {0}}, 0, 0 },
- { "fr7", 7, {0, {0}}, 0, 0 },
- { "fr8", 8, {0, {0}}, 0, 0 },
- { "fr9", 9, {0, {0}}, 0, 0 },
- { "fr10", 10, {0, {0}}, 0, 0 },
- { "fr11", 11, {0, {0}}, 0, 0 },
- { "fr12", 12, {0, {0}}, 0, 0 },
- { "fr13", 13, {0, {0}}, 0, 0 },
- { "fr14", 14, {0, {0}}, 0, 0 },
- { "fr15", 15, {0, {0}}, 0, 0 },
- { "fr16", 16, {0, {0}}, 0, 0 },
- { "fr17", 17, {0, {0}}, 0, 0 },
- { "fr18", 18, {0, {0}}, 0, 0 },
- { "fr19", 19, {0, {0}}, 0, 0 },
- { "fr20", 20, {0, {0}}, 0, 0 },
- { "fr21", 21, {0, {0}}, 0, 0 },
- { "fr22", 22, {0, {0}}, 0, 0 },
- { "fr23", 23, {0, {0}}, 0, 0 },
- { "fr24", 24, {0, {0}}, 0, 0 },
- { "fr25", 25, {0, {0}}, 0, 0 },
- { "fr26", 26, {0, {0}}, 0, 0 },
- { "fr27", 27, {0, {0}}, 0, 0 },
- { "fr28", 28, {0, {0}}, 0, 0 },
- { "fr29", 29, {0, {0}}, 0, 0 },
- { "fr30", 30, {0, {0}}, 0, 0 },
- { "fr31", 31, {0, {0}}, 0, 0 },
- { "fr32", 32, {0, {0}}, 0, 0 },
- { "fr33", 33, {0, {0}}, 0, 0 },
- { "fr34", 34, {0, {0}}, 0, 0 },
- { "fr35", 35, {0, {0}}, 0, 0 },
- { "fr36", 36, {0, {0}}, 0, 0 },
- { "fr37", 37, {0, {0}}, 0, 0 },
- { "fr38", 38, {0, {0}}, 0, 0 },
- { "fr39", 39, {0, {0}}, 0, 0 },
- { "fr40", 40, {0, {0}}, 0, 0 },
- { "fr41", 41, {0, {0}}, 0, 0 },
- { "fr42", 42, {0, {0}}, 0, 0 },
- { "fr43", 43, {0, {0}}, 0, 0 },
- { "fr44", 44, {0, {0}}, 0, 0 },
- { "fr45", 45, {0, {0}}, 0, 0 },
- { "fr46", 46, {0, {0}}, 0, 0 },
- { "fr47", 47, {0, {0}}, 0, 0 },
- { "fr48", 48, {0, {0}}, 0, 0 },
- { "fr49", 49, {0, {0}}, 0, 0 },
- { "fr50", 50, {0, {0}}, 0, 0 },
- { "fr51", 51, {0, {0}}, 0, 0 },
- { "fr52", 52, {0, {0}}, 0, 0 },
- { "fr53", 53, {0, {0}}, 0, 0 },
- { "fr54", 54, {0, {0}}, 0, 0 },
- { "fr55", 55, {0, {0}}, 0, 0 },
- { "fr56", 56, {0, {0}}, 0, 0 },
- { "fr57", 57, {0, {0}}, 0, 0 },
- { "fr58", 58, {0, {0}}, 0, 0 },
- { "fr59", 59, {0, {0}}, 0, 0 },
- { "fr60", 60, {0, {0}}, 0, 0 },
- { "fr61", 61, {0, {0}}, 0, 0 },
- { "fr62", 62, {0, {0}}, 0, 0 },
- { "fr63", 63, {0, {0}}, 0, 0 }
-};
-
-CGEN_KEYWORD sh_cgen_opval_h_fr =
-{
- & sh_cgen_opval_h_fr_entries[0],
- 64,
- 0, 0, 0, 0
-};
-
-static CGEN_KEYWORD_ENTRY sh_cgen_opval_h_fp_entries[] =
-{
- { "fp0", 0, {0, {0}}, 0, 0 },
- { "fp1", 1, {0, {0}}, 0, 0 },
- { "fp2", 2, {0, {0}}, 0, 0 },
- { "fp3", 3, {0, {0}}, 0, 0 },
- { "fp4", 4, {0, {0}}, 0, 0 },
- { "fp5", 5, {0, {0}}, 0, 0 },
- { "fp6", 6, {0, {0}}, 0, 0 },
- { "fp7", 7, {0, {0}}, 0, 0 },
- { "fp8", 8, {0, {0}}, 0, 0 },
- { "fp9", 9, {0, {0}}, 0, 0 },
- { "fp10", 10, {0, {0}}, 0, 0 },
- { "fp11", 11, {0, {0}}, 0, 0 },
- { "fp12", 12, {0, {0}}, 0, 0 },
- { "fp13", 13, {0, {0}}, 0, 0 },
- { "fp14", 14, {0, {0}}, 0, 0 },
- { "fp15", 15, {0, {0}}, 0, 0 },
- { "fp16", 16, {0, {0}}, 0, 0 },
- { "fp17", 17, {0, {0}}, 0, 0 },
- { "fp18", 18, {0, {0}}, 0, 0 },
- { "fp19", 19, {0, {0}}, 0, 0 },
- { "fp20", 20, {0, {0}}, 0, 0 },
- { "fp21", 21, {0, {0}}, 0, 0 },
- { "fp22", 22, {0, {0}}, 0, 0 },
- { "fp23", 23, {0, {0}}, 0, 0 },
- { "fp24", 24, {0, {0}}, 0, 0 },
- { "fp25", 25, {0, {0}}, 0, 0 },
- { "fp26", 26, {0, {0}}, 0, 0 },
- { "fp27", 27, {0, {0}}, 0, 0 },
- { "fp28", 28, {0, {0}}, 0, 0 },
- { "fp29", 29, {0, {0}}, 0, 0 },
- { "fp30", 30, {0, {0}}, 0, 0 },
- { "fp31", 31, {0, {0}}, 0, 0 }
-};
-
-CGEN_KEYWORD sh_cgen_opval_h_fp =
-{
- & sh_cgen_opval_h_fp_entries[0],
- 32,
- 0, 0, 0, 0
-};
-
-static CGEN_KEYWORD_ENTRY sh_cgen_opval_h_fv_entries[] =
-{
- { "fv0", 0, {0, {0}}, 0, 0 },
- { "fv1", 1, {0, {0}}, 0, 0 },
- { "fv2", 2, {0, {0}}, 0, 0 },
- { "fv3", 3, {0, {0}}, 0, 0 },
- { "fv4", 4, {0, {0}}, 0, 0 },
- { "fv5", 5, {0, {0}}, 0, 0 },
- { "fv6", 6, {0, {0}}, 0, 0 },
- { "fv7", 7, {0, {0}}, 0, 0 },
- { "fv8", 8, {0, {0}}, 0, 0 },
- { "fv9", 9, {0, {0}}, 0, 0 },
- { "fv10", 10, {0, {0}}, 0, 0 },
- { "fv11", 11, {0, {0}}, 0, 0 },
- { "fv12", 12, {0, {0}}, 0, 0 },
- { "fv13", 13, {0, {0}}, 0, 0 },
- { "fv14", 14, {0, {0}}, 0, 0 },
- { "fv15", 15, {0, {0}}, 0, 0 }
-};
-
-CGEN_KEYWORD sh_cgen_opval_h_fv =
-{
- & sh_cgen_opval_h_fv_entries[0],
- 16,
- 0, 0, 0, 0
-};
-
-static CGEN_KEYWORD_ENTRY sh_cgen_opval_h_fmtx_entries[] =
-{
- { "mtrx0", 0, {0, {0}}, 0, 0 },
- { "mtrx1", 1, {0, {0}}, 0, 0 },
- { "mtrx2", 2, {0, {0}}, 0, 0 },
- { "mtrx3", 3, {0, {0}}, 0, 0 }
-};
-
-CGEN_KEYWORD sh_cgen_opval_h_fmtx =
-{
- & sh_cgen_opval_h_fmtx_entries[0],
- 4,
- 0, 0, 0, 0
-};
-
-static CGEN_KEYWORD_ENTRY sh_cgen_opval_h_dr_entries[] =
-{
- { "dr0", 0, {0, {0}}, 0, 0 },
- { "dr1", 1, {0, {0}}, 0, 0 },
- { "dr2", 2, {0, {0}}, 0, 0 },
- { "dr3", 3, {0, {0}}, 0, 0 },
- { "dr4", 4, {0, {0}}, 0, 0 },
- { "dr5", 5, {0, {0}}, 0, 0 },
- { "dr6", 6, {0, {0}}, 0, 0 },
- { "dr7", 7, {0, {0}}, 0, 0 },
- { "dr8", 8, {0, {0}}, 0, 0 },
- { "dr9", 9, {0, {0}}, 0, 0 },
- { "dr10", 10, {0, {0}}, 0, 0 },
- { "dr11", 11, {0, {0}}, 0, 0 },
- { "dr12", 12, {0, {0}}, 0, 0 },
- { "dr13", 13, {0, {0}}, 0, 0 },
- { "dr14", 14, {0, {0}}, 0, 0 },
- { "dr15", 15, {0, {0}}, 0, 0 },
- { "dr16", 16, {0, {0}}, 0, 0 },
- { "dr17", 17, {0, {0}}, 0, 0 },
- { "dr18", 18, {0, {0}}, 0, 0 },
- { "dr19", 19, {0, {0}}, 0, 0 },
- { "dr20", 20, {0, {0}}, 0, 0 },
- { "dr21", 21, {0, {0}}, 0, 0 },
- { "dr22", 22, {0, {0}}, 0, 0 },
- { "dr23", 23, {0, {0}}, 0, 0 },
- { "dr24", 24, {0, {0}}, 0, 0 },
- { "dr25", 25, {0, {0}}, 0, 0 },
- { "dr26", 26, {0, {0}}, 0, 0 },
- { "dr27", 27, {0, {0}}, 0, 0 },
- { "dr28", 28, {0, {0}}, 0, 0 },
- { "dr29", 29, {0, {0}}, 0, 0 },
- { "dr30", 30, {0, {0}}, 0, 0 },
- { "dr31", 31, {0, {0}}, 0, 0 },
- { "dr32", 32, {0, {0}}, 0, 0 },
- { "dr33", 33, {0, {0}}, 0, 0 },
- { "dr34", 34, {0, {0}}, 0, 0 },
- { "dr35", 35, {0, {0}}, 0, 0 },
- { "dr36", 36, {0, {0}}, 0, 0 },
- { "dr37", 37, {0, {0}}, 0, 0 },
- { "dr38", 38, {0, {0}}, 0, 0 },
- { "dr39", 39, {0, {0}}, 0, 0 },
- { "dr40", 40, {0, {0}}, 0, 0 },
- { "dr41", 41, {0, {0}}, 0, 0 },
- { "dr42", 42, {0, {0}}, 0, 0 },
- { "dr43", 43, {0, {0}}, 0, 0 },
- { "dr44", 44, {0, {0}}, 0, 0 },
- { "dr45", 45, {0, {0}}, 0, 0 },
- { "dr46", 46, {0, {0}}, 0, 0 },
- { "dr47", 47, {0, {0}}, 0, 0 },
- { "dr48", 48, {0, {0}}, 0, 0 },
- { "dr49", 49, {0, {0}}, 0, 0 },
- { "dr50", 50, {0, {0}}, 0, 0 },
- { "dr51", 51, {0, {0}}, 0, 0 },
- { "dr52", 52, {0, {0}}, 0, 0 },
- { "dr53", 53, {0, {0}}, 0, 0 },
- { "dr54", 54, {0, {0}}, 0, 0 },
- { "dr55", 55, {0, {0}}, 0, 0 },
- { "dr56", 56, {0, {0}}, 0, 0 },
- { "dr57", 57, {0, {0}}, 0, 0 },
- { "dr58", 58, {0, {0}}, 0, 0 },
- { "dr59", 59, {0, {0}}, 0, 0 },
- { "dr60", 60, {0, {0}}, 0, 0 },
- { "dr61", 61, {0, {0}}, 0, 0 },
- { "dr62", 62, {0, {0}}, 0, 0 },
- { "dr63", 63, {0, {0}}, 0, 0 }
-};
-
-CGEN_KEYWORD sh_cgen_opval_h_dr =
-{
- & sh_cgen_opval_h_dr_entries[0],
- 64,
- 0, 0, 0, 0
-};
-
-static CGEN_KEYWORD_ENTRY sh_cgen_opval_h_tr_entries[] =
-{
- { "tr0", 0, {0, {0}}, 0, 0 },
- { "tr1", 1, {0, {0}}, 0, 0 },
- { "tr2", 2, {0, {0}}, 0, 0 },
- { "tr3", 3, {0, {0}}, 0, 0 },
- { "tr4", 4, {0, {0}}, 0, 0 },
- { "tr5", 5, {0, {0}}, 0, 0 },
- { "tr6", 6, {0, {0}}, 0, 0 },
- { "tr7", 7, {0, {0}}, 0, 0 }
-};
-
-CGEN_KEYWORD sh_cgen_opval_h_tr =
-{
- & sh_cgen_opval_h_tr_entries[0],
- 8,
- 0, 0, 0, 0
-};
-
-static CGEN_KEYWORD_ENTRY sh_cgen_opval_h_fvc_entries[] =
-{
- { "fv0", 0, {0, {0}}, 0, 0 },
- { "fv4", 4, {0, {0}}, 0, 0 },
- { "fv8", 8, {0, {0}}, 0, 0 },
- { "fv12", 12, {0, {0}}, 0, 0 }
-};
-
-CGEN_KEYWORD sh_cgen_opval_h_fvc =
-{
- & sh_cgen_opval_h_fvc_entries[0],
- 4,
- 0, 0, 0, 0
-};
-
-
-/* The hardware table. */
-
-#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-#define A(a) (1 << CGEN_HW_##a)
-#else
-#define A(a) (1 << CGEN_HW_/**/a)
-#endif
-
-const CGEN_HW_ENTRY sh_cgen_hw_table[] =
-{
- { "h-memory", HW_H_MEMORY, CGEN_ASM_NONE, 0, { 0, { (1<<MACH_BASE) } } },
- { "h-sint", HW_H_SINT, CGEN_ASM_NONE, 0, { 0, { (1<<MACH_BASE) } } },
- { "h-uint", HW_H_UINT, CGEN_ASM_NONE, 0, { 0, { (1<<MACH_BASE) } } },
- { "h-addr", HW_H_ADDR, CGEN_ASM_NONE, 0, { 0, { (1<<MACH_BASE) } } },
- { "h-iaddr", HW_H_IADDR, CGEN_ASM_NONE, 0, { 0, { (1<<MACH_BASE) } } },
- { "h-pc", HW_H_PC, CGEN_ASM_NONE, 0, { 0|A(PC), { (1<<MACH_BASE) } } },
- { "h-gr", HW_H_GR, CGEN_ASM_KEYWORD, (PTR) & sh_cgen_opval_h_gr, { 0, { (1<<MACH_BASE) } } },
- { "h-grc", HW_H_GRC, CGEN_ASM_KEYWORD, (PTR) & sh_cgen_opval_h_grc, { 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
- { "h-cr", HW_H_CR, CGEN_ASM_KEYWORD, (PTR) & sh_cgen_opval_h_cr, { 0, { (1<<MACH_BASE) } } },
- { "h-sr", HW_H_SR, CGEN_ASM_NONE, 0, { 0, { (1<<MACH_BASE) } } },
- { "h-fpscr", HW_H_FPSCR, CGEN_ASM_NONE, 0, { 0, { (1<<MACH_BASE) } } },
- { "h-frbit", HW_H_FRBIT, CGEN_ASM_NONE, 0, { 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
- { "h-szbit", HW_H_SZBIT, CGEN_ASM_NONE, 0, { 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
- { "h-prbit", HW_H_PRBIT, CGEN_ASM_NONE, 0, { 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
- { "h-sbit", HW_H_SBIT, CGEN_ASM_NONE, 0, { 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
- { "h-mbit", HW_H_MBIT, CGEN_ASM_NONE, 0, { 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
- { "h-qbit", HW_H_QBIT, CGEN_ASM_NONE, 0, { 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
- { "h-fr", HW_H_FR, CGEN_ASM_KEYWORD, (PTR) & sh_cgen_opval_h_fr, { 0, { (1<<MACH_BASE) } } },
- { "h-fp", HW_H_FP, CGEN_ASM_KEYWORD, (PTR) & sh_cgen_opval_h_fp, { 0, { (1<<MACH_BASE) } } },
- { "h-fv", HW_H_FV, CGEN_ASM_KEYWORD, (PTR) & sh_cgen_opval_h_fv, { 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
- { "h-fmtx", HW_H_FMTX, CGEN_ASM_KEYWORD, (PTR) & sh_cgen_opval_h_fmtx, { 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
- { "h-dr", HW_H_DR, CGEN_ASM_KEYWORD, (PTR) & sh_cgen_opval_h_dr, { 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
- { "h-tr", HW_H_TR, CGEN_ASM_KEYWORD, (PTR) & sh_cgen_opval_h_tr, { 0, { (1<<MACH_BASE) } } },
- { "h-endian", HW_H_ENDIAN, CGEN_ASM_NONE, 0, { 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
- { "h-ism", HW_H_ISM, CGEN_ASM_NONE, 0, { 0, { (1<<MACH_BASE) } } },
- { "h-frc", HW_H_FRC, CGEN_ASM_KEYWORD, (PTR) & sh_cgen_opval_frc_names, { 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
- { "h-drc", HW_H_DRC, CGEN_ASM_KEYWORD, (PTR) & sh_cgen_opval_drc_names, { 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
- { "h-xf", HW_H_XF, CGEN_ASM_KEYWORD, (PTR) & sh_cgen_opval_xf_names, { 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
- { "h-xd", HW_H_XD, CGEN_ASM_KEYWORD, (PTR) & sh_cgen_opval_frc_names, { 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
- { "h-fvc", HW_H_FVC, CGEN_ASM_KEYWORD, (PTR) & sh_cgen_opval_h_fvc, { 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
- { "h-fpccr", HW_H_FPCCR, CGEN_ASM_NONE, 0, { 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
- { "h-gbr", HW_H_GBR, CGEN_ASM_NONE, 0, { 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
- { "h-pr", HW_H_PR, CGEN_ASM_NONE, 0, { 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
- { "h-macl", HW_H_MACL, CGEN_ASM_NONE, 0, { 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
- { "h-mach", HW_H_MACH, CGEN_ASM_NONE, 0, { 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
- { "h-tbit", HW_H_TBIT, CGEN_ASM_NONE, 0, { 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
- { 0, 0, CGEN_ASM_NONE, 0, {0, {0}} }
-};
-
-#undef A
-
-
-/* The instruction field table. */
-
-#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-#define A(a) (1 << CGEN_IFLD_##a)
-#else
-#define A(a) (1 << CGEN_IFLD_/**/a)
-#endif
-
-const CGEN_IFLD sh_cgen_ifld_table[] =
-{
- { SH_F_NIL, "f-nil", 0, 0, 0, 0, { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
- { SH_F_ANYOF, "f-anyof", 0, 0, 0, 0, { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
- { SH_F_OP4, "f-op4", 0, 16, 15, 4, { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
- { SH_F_OP8, "f-op8", 0, 16, 15, 8, { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
- { SH_F_OP16, "f-op16", 0, 16, 15, 16, { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
- { SH_F_SUB4, "f-sub4", 0, 16, 3, 4, { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
- { SH_F_SUB8, "f-sub8", 0, 16, 7, 8, { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
- { SH_F_SUB10, "f-sub10", 0, 16, 9, 10, { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
- { SH_F_RN, "f-rn", 0, 16, 11, 4, { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
- { SH_F_RM, "f-rm", 0, 16, 7, 4, { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
- { SH_F_8_1, "f-8-1", 0, 16, 8, 1, { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
- { SH_F_DISP8, "f-disp8", 0, 16, 7, 8, { 0|A(PCREL_ADDR), { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
- { SH_F_DISP12, "f-disp12", 0, 16, 11, 12, { 0|A(PCREL_ADDR), { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
- { SH_F_IMM8, "f-imm8", 0, 16, 7, 8, { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
- { SH_F_IMM4, "f-imm4", 0, 16, 3, 4, { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
- { SH_F_IMM4X2, "f-imm4x2", 0, 16, 3, 4, { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
- { SH_F_IMM4X4, "f-imm4x4", 0, 16, 3, 4, { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
- { SH_F_IMM8X2, "f-imm8x2", 0, 16, 7, 8, { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
- { SH_F_IMM8X4, "f-imm8x4", 0, 16, 7, 8, { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
- { SH_F_DN, "f-dn", 0, 16, 11, 3, { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
- { SH_F_DM, "f-dm", 0, 16, 7, 3, { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
- { SH_F_VN, "f-vn", 0, 16, 11, 2, { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
- { SH_F_VM, "f-vm", 0, 16, 9, 2, { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
- { SH_F_XN, "f-xn", 0, 16, 11, 3, { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
- { SH_F_XM, "f-xm", 0, 16, 7, 3, { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
- { SH_F_OP, "f-op", 0, 32, 31, 6, { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
- { SH_F_EXT, "f-ext", 0, 32, 19, 4, { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
- { SH_F_RSVD, "f-rsvd", 0, 32, 3, 4, { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
- { SH_F_LEFT, "f-left", 0, 32, 25, 6, { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
- { SH_F_RIGHT, "f-right", 0, 32, 15, 6, { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
- { SH_F_DEST, "f-dest", 0, 32, 9, 6, { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
- { SH_F_TRA, "f-tra", 0, 32, 6, 3, { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
- { SH_F_TRB, "f-trb", 0, 32, 22, 3, { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
- { SH_F_LIKELY, "f-likely", 0, 32, 9, 1, { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
- { SH_F_25, "f-25", 0, 32, 25, 3, { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
- { SH_F_8_2, "f-8-2", 0, 32, 8, 2, { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
- { SH_F_IMM6, "f-imm6", 0, 32, 15, 6, { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
- { SH_F_IMM10, "f-imm10", 0, 32, 19, 10, { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
- { SH_F_IMM16, "f-imm16", 0, 32, 25, 16, { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
- { SH_F_UIMM6, "f-uimm6", 0, 32, 15, 6, { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
- { SH_F_UIMM16, "f-uimm16", 0, 32, 25, 16, { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
- { SH_F_DISP6, "f-disp6", 0, 32, 15, 6, { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
- { SH_F_DISP6X32, "f-disp6x32", 0, 32, 15, 6, { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
- { SH_F_DISP10, "f-disp10", 0, 32, 19, 10, { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
- { SH_F_DISP10X8, "f-disp10x8", 0, 32, 19, 10, { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
- { SH_F_DISP10X4, "f-disp10x4", 0, 32, 19, 10, { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
- { SH_F_DISP10X2, "f-disp10x2", 0, 32, 19, 10, { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
- { SH_F_DISP16, "f-disp16", 0, 32, 25, 16, { 0|A(PCREL_ADDR), { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
- { 0, 0, 0, 0, 0, 0, {0, {0}} }
-};
-
-#undef A
-
-
-/* The operand table. */
-
-#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-#define A(a) (1 << CGEN_OPERAND_##a)
-#else
-#define A(a) (1 << CGEN_OPERAND_/**/a)
-#endif
-#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-#define OPERAND(op) SH_OPERAND_##op
-#else
-#define OPERAND(op) SH_OPERAND_/**/op
-#endif
-
-const CGEN_OPERAND sh_cgen_operand_table[] =
-{
-/* pc: program counter */
- { "pc", SH_OPERAND_PC, HW_H_PC, 0, 0,
- { 0|A(SEM_ONLY), { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* endian: Endian mode */
- { "endian", SH_OPERAND_ENDIAN, HW_H_ENDIAN, 0, 0,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT)|(1<<ISA_MEDIA) } } },
-/* ism: Instruction set mode */
- { "ism", SH_OPERAND_ISM, HW_H_ISM, 0, 0,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT)|(1<<ISA_MEDIA) } } },
-/* rm: Left general purpose register */
- { "rm", SH_OPERAND_RM, HW_H_GRC, 7, 4,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* rn: Right general purpose register */
- { "rn", SH_OPERAND_RN, HW_H_GRC, 11, 4,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* r0: Register 0 */
- { "r0", SH_OPERAND_R0, HW_H_GRC, 0, 0,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* frn: Single precision register */
- { "frn", SH_OPERAND_FRN, HW_H_FRC, 11, 4,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* frm: Single precision register */
- { "frm", SH_OPERAND_FRM, HW_H_FRC, 7, 4,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* fvn: Left floating point vector */
- { "fvn", SH_OPERAND_FVN, HW_H_FVC, 11, 2,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* fvm: Right floating point vector */
- { "fvm", SH_OPERAND_FVM, HW_H_FVC, 9, 2,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* drn: Left double precision register */
- { "drn", SH_OPERAND_DRN, HW_H_DRC, 11, 3,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* drm: Right double precision register */
- { "drm", SH_OPERAND_DRM, HW_H_DRC, 7, 3,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* imm4: Immediate value (4 bits) */
- { "imm4", SH_OPERAND_IMM4, HW_H_SINT, 3, 4,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* imm8: Immediate value (8 bits) */
- { "imm8", SH_OPERAND_IMM8, HW_H_SINT, 7, 8,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* uimm8: Immediate value (8 bits unsigned) */
- { "uimm8", SH_OPERAND_UIMM8, HW_H_UINT, 7, 8,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* imm4x2: Immediate value (4 bits, 2x scale) */
- { "imm4x2", SH_OPERAND_IMM4X2, HW_H_UINT, 3, 4,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* imm4x4: Immediate value (4 bits, 4x scale) */
- { "imm4x4", SH_OPERAND_IMM4X4, HW_H_UINT, 3, 4,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* imm8x2: Immediate value (8 bits, 2x scale) */
- { "imm8x2", SH_OPERAND_IMM8X2, HW_H_UINT, 7, 8,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* imm8x4: Immediate value (8 bits, 4x scale) */
- { "imm8x4", SH_OPERAND_IMM8X4, HW_H_UINT, 7, 8,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* disp8: Displacement (8 bits) */
- { "disp8", SH_OPERAND_DISP8, HW_H_IADDR, 7, 8,
- { 0|A(PCREL_ADDR), { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* disp12: Displacement (12 bits) */
- { "disp12", SH_OPERAND_DISP12, HW_H_IADDR, 11, 12,
- { 0|A(PCREL_ADDR), { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* rm64: Register m (64 bits) */
- { "rm64", SH_OPERAND_RM64, HW_H_GR, 7, 4,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* rn64: Register n (64 bits) */
- { "rn64", SH_OPERAND_RN64, HW_H_GR, 11, 4,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* gbr: Global base register */
- { "gbr", SH_OPERAND_GBR, HW_H_GBR, 0, 0,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* pr: Procedure link register */
- { "pr", SH_OPERAND_PR, HW_H_PR, 0, 0,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* fpscr: Floating point status/control register */
- { "fpscr", SH_OPERAND_FPSCR, HW_H_FPCCR, 0, 0,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* tbit: Condition code flag */
- { "tbit", SH_OPERAND_TBIT, HW_H_TBIT, 0, 0,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* sbit: Multiply-accumulate saturation flag */
- { "sbit", SH_OPERAND_SBIT, HW_H_SBIT, 0, 0,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* mbit: Divide-step M flag */
- { "mbit", SH_OPERAND_MBIT, HW_H_MBIT, 0, 0,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* qbit: Divide-step Q flag */
- { "qbit", SH_OPERAND_QBIT, HW_H_QBIT, 0, 0,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* fpul: Floating point ??? */
- { "fpul", SH_OPERAND_FPUL, HW_H_FR, 0, 0,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* frbit: Floating point register bank bit */
- { "frbit", SH_OPERAND_FRBIT, HW_H_FRBIT, 0, 0,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* szbit: Floating point transfer size bit */
- { "szbit", SH_OPERAND_SZBIT, HW_H_SZBIT, 0, 0,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* prbit: Floating point precision bit */
- { "prbit", SH_OPERAND_PRBIT, HW_H_PRBIT, 0, 0,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* macl: Multiply-accumulate low register */
- { "macl", SH_OPERAND_MACL, HW_H_MACL, 0, 0,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* mach: Multiply-accumulate high register */
- { "mach", SH_OPERAND_MACH, HW_H_MACH, 0, 0,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* fsdm: bar */
- { "fsdm", SH_OPERAND_FSDM, HW_H_FRC, 7, 4,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* fsdn: bar */
- { "fsdn", SH_OPERAND_FSDN, HW_H_FRC, 11, 4,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } } },
-/* rm: Left general purpose reg */
- { "rm", SH_OPERAND_RM, HW_H_GR, 25, 6,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
-/* rn: Right general purpose reg */
- { "rn", SH_OPERAND_RN, HW_H_GR, 15, 6,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
-/* rd: Destination general purpose reg */
- { "rd", SH_OPERAND_RD, HW_H_GR, 9, 6,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
-/* frg: Left single precision register */
- { "frg", SH_OPERAND_FRG, HW_H_FR, 25, 6,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
-/* frh: Right single precision register */
- { "frh", SH_OPERAND_FRH, HW_H_FR, 15, 6,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
-/* frf: Destination single precision reg */
- { "frf", SH_OPERAND_FRF, HW_H_FR, 9, 6,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
-/* frgh: Single precision register pair */
- { "frgh", SH_OPERAND_FRGH, HW_H_FR, 15, 12,
- { 0|A(VIRTUAL), { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
-/* fpf: Pair of single precision registers */
- { "fpf", SH_OPERAND_FPF, HW_H_FP, 9, 6,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
-/* fvg: Left single precision vector */
- { "fvg", SH_OPERAND_FVG, HW_H_FV, 25, 6,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
-/* fvh: Right single precision vector */
- { "fvh", SH_OPERAND_FVH, HW_H_FV, 15, 6,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
-/* fvf: Destination single precision vector */
- { "fvf", SH_OPERAND_FVF, HW_H_FV, 9, 6,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
-/* mtrxg: Left single precision matrix */
- { "mtrxg", SH_OPERAND_MTRXG, HW_H_FMTX, 25, 6,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
-/* drg: Left double precision register */
- { "drg", SH_OPERAND_DRG, HW_H_DR, 25, 6,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
-/* drh: Right double precision register */
- { "drh", SH_OPERAND_DRH, HW_H_DR, 15, 6,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
-/* drf: Destination double precision reg */
- { "drf", SH_OPERAND_DRF, HW_H_DR, 9, 6,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
-/* drgh: Double precision register pair */
- { "drgh", SH_OPERAND_DRGH, HW_H_DR, 15, 12,
- { 0|A(VIRTUAL), { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
-/* fpscr: Floating point status register */
- { "fpscr", SH_OPERAND_FPSCR, HW_H_FPSCR, 0, 0,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
-/* crj: Control register j */
- { "crj", SH_OPERAND_CRJ, HW_H_CR, 9, 6,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
-/* crk: Control register k */
- { "crk", SH_OPERAND_CRK, HW_H_CR, 25, 6,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
-/* tra: Target register a */
- { "tra", SH_OPERAND_TRA, HW_H_TR, 6, 3,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
-/* trb: Target register b */
- { "trb", SH_OPERAND_TRB, HW_H_TR, 22, 3,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
-/* disp6: Displacement (6 bits) */
- { "disp6", SH_OPERAND_DISP6, HW_H_SINT, 15, 6,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
-/* disp6x32: Displacement (6 bits, scale 32) */
- { "disp6x32", SH_OPERAND_DISP6X32, HW_H_SINT, 15, 6,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
-/* disp10: Displacement (10 bits) */
- { "disp10", SH_OPERAND_DISP10, HW_H_SINT, 19, 10,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
-/* disp10x2: Displacement (10 bits, scale 2) */
- { "disp10x2", SH_OPERAND_DISP10X2, HW_H_SINT, 19, 10,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
-/* disp10x4: Displacement (10 bits, scale 4) */
- { "disp10x4", SH_OPERAND_DISP10X4, HW_H_SINT, 19, 10,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
-/* disp10x8: Displacement (10 bits, scale 8) */
- { "disp10x8", SH_OPERAND_DISP10X8, HW_H_SINT, 19, 10,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
-/* disp16: Displacement (16 bits) */
- { "disp16", SH_OPERAND_DISP16, HW_H_SINT, 25, 16,
- { 0|A(PCREL_ADDR), { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
-/* imm6: Immediate (6 bits) */
- { "imm6", SH_OPERAND_IMM6, HW_H_SINT, 15, 6,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
-/* imm10: Immediate (10 bits) */
- { "imm10", SH_OPERAND_IMM10, HW_H_SINT, 19, 10,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
-/* imm16: Immediate (16 bits) */
- { "imm16", SH_OPERAND_IMM16, HW_H_SINT, 25, 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
-/* uimm6: Immediate (6 bits) */
- { "uimm6", SH_OPERAND_UIMM6, HW_H_UINT, 15, 6,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
-/* uimm16: Unsigned immediate (16 bits) */
- { "uimm16", SH_OPERAND_UIMM16, HW_H_UINT, 25, 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
-/* likely: Likely branch? */
- { "likely", SH_OPERAND_LIKELY, HW_H_UINT, 9, 1,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } } },
- { 0, 0, 0, 0, 0, {0, {0}} }
-};
-
-#undef A
-
-
-/* The instruction table. */
-
-#define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field))
-#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-#define A(a) (1 << CGEN_INSN_##a)
-#else
-#define A(a) (1 << CGEN_INSN_/**/a)
-#endif
-
-static const CGEN_IBASE sh_cgen_insn_table[MAX_INSNS] =
-{
- /* Special null first entry.
- A `num' value of zero is thus invalid.
- Also, the special `invalid' insn resides here. */
- { 0, 0, 0, 0, {0, {0}} },
-/* add $rm, $rn */
- {
- SH_INSN_ADD_COMPACT, "add-compact", "add", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* add #$imm8, $rn */
- {
- SH_INSN_ADDI_COMPACT, "addi-compact", "add", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* addc $rm, $rn */
- {
- SH_INSN_ADDC_COMPACT, "addc-compact", "addc", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* addv $rm, $rn */
- {
- SH_INSN_ADDV_COMPACT, "addv-compact", "addv", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* and $rm64, $rn64 */
- {
- SH_INSN_AND_COMPACT, "and-compact", "and", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* and #$uimm8, r0 */
- {
- SH_INSN_ANDI_COMPACT, "andi-compact", "and", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* and.b #$imm8, @(r0, gbr) */
- {
- SH_INSN_ANDB_COMPACT, "andb-compact", "and.b", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* bf $disp8 */
- {
- SH_INSN_BF_COMPACT, "bf-compact", "bf", 16,
- { 0|A(COND_CTI), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* bf/s $disp8 */
- {
- SH_INSN_BFS_COMPACT, "bfs-compact", "bf/s", 16,
- { 0|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* bra $disp12 */
- {
- SH_INSN_BRA_COMPACT, "bra-compact", "bra", 16,
- { 0|A(UNCOND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* braf $rn */
- {
- SH_INSN_BRAF_COMPACT, "braf-compact", "braf", 16,
- { 0|A(UNCOND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* brk */
- {
- SH_INSN_BRK_COMPACT, "brk-compact", "brk", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* bsr $disp12 */
- {
- SH_INSN_BSR_COMPACT, "bsr-compact", "bsr", 16,
- { 0|A(UNCOND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* bsrf $rn */
- {
- SH_INSN_BSRF_COMPACT, "bsrf-compact", "bsrf", 16,
- { 0|A(UNCOND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* bt $disp8 */
- {
- SH_INSN_BT_COMPACT, "bt-compact", "bt", 16,
- { 0|A(COND_CTI), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* bt/s $disp8 */
- {
- SH_INSN_BTS_COMPACT, "bts-compact", "bt/s", 16,
- { 0|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* clrmac */
- {
- SH_INSN_CLRMAC_COMPACT, "clrmac-compact", "clrmac", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* clrs */
- {
- SH_INSN_CLRS_COMPACT, "clrs-compact", "clrs", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* clrt */
- {
- SH_INSN_CLRT_COMPACT, "clrt-compact", "clrt", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* cmp/eq $rm, $rn */
- {
- SH_INSN_CMPEQ_COMPACT, "cmpeq-compact", "cmp/eq", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* cmp/eq #$imm8, r0 */
- {
- SH_INSN_CMPEQI_COMPACT, "cmpeqi-compact", "cmp/eq", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* cmp/ge $rm, $rn */
- {
- SH_INSN_CMPGE_COMPACT, "cmpge-compact", "cmp/ge", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* cmp/gt $rm, $rn */
- {
- SH_INSN_CMPGT_COMPACT, "cmpgt-compact", "cmp/gt", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* cmp/hi $rm, $rn */
- {
- SH_INSN_CMPHI_COMPACT, "cmphi-compact", "cmp/hi", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* cmp/hs $rm, $rn */
- {
- SH_INSN_CMPHS_COMPACT, "cmphs-compact", "cmp/hs", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* cmp/pl $rn */
- {
- SH_INSN_CMPPL_COMPACT, "cmppl-compact", "cmp/pl", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* cmp/pz $rn */
- {
- SH_INSN_CMPPZ_COMPACT, "cmppz-compact", "cmp/pz", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* cmp/str $rm, $rn */
- {
- SH_INSN_CMPSTR_COMPACT, "cmpstr-compact", "cmp/str", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* div0s $rm, $rn */
- {
- SH_INSN_DIV0S_COMPACT, "div0s-compact", "div0s", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* div0u */
- {
- SH_INSN_DIV0U_COMPACT, "div0u-compact", "div0u", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* div1 $rm, $rn */
- {
- SH_INSN_DIV1_COMPACT, "div1-compact", "div1", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* dmuls.l $rm, $rn */
- {
- SH_INSN_DMULSL_COMPACT, "dmulsl-compact", "dmuls.l", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* dmulu.l $rm, $rn */
- {
- SH_INSN_DMULUL_COMPACT, "dmulul-compact", "dmulu.l", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* dt $rn */
- {
- SH_INSN_DT_COMPACT, "dt-compact", "dt", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* exts.b $rm, $rn */
- {
- SH_INSN_EXTSB_COMPACT, "extsb-compact", "exts.b", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* exts.w $rm, $rn */
- {
- SH_INSN_EXTSW_COMPACT, "extsw-compact", "exts.w", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* extu.b $rm, $rn */
- {
- SH_INSN_EXTUB_COMPACT, "extub-compact", "extu.b", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* extu.w $rm, $rn */
- {
- SH_INSN_EXTUW_COMPACT, "extuw-compact", "extu.w", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* fabs $fsdn */
- {
- SH_INSN_FABS_COMPACT, "fabs-compact", "fabs", 16,
- { 0|A(FP_INSN), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* fadd $fsdm, $fsdn */
- {
- SH_INSN_FADD_COMPACT, "fadd-compact", "fadd", 16,
- { 0|A(FP_INSN), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* fcmp/eq $fsdm, $fsdn */
- {
- SH_INSN_FCMPEQ_COMPACT, "fcmpeq-compact", "fcmp/eq", 16,
- { 0|A(FP_INSN), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* fcmp/gt $fsdm, $fsdn */
- {
- SH_INSN_FCMPGT_COMPACT, "fcmpgt-compact", "fcmp/gt", 16,
- { 0|A(FP_INSN), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* fcnvds $drn, fpul */
- {
- SH_INSN_FCNVDS_COMPACT, "fcnvds-compact", "fcnvds", 16,
- { 0|A(FP_INSN), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* fcnvsd fpul, $drn */
- {
- SH_INSN_FCNVSD_COMPACT, "fcnvsd-compact", "fcnvsd", 16,
- { 0|A(FP_INSN), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* fdiv $fsdm, $fsdn */
- {
- SH_INSN_FDIV_COMPACT, "fdiv-compact", "fdiv", 16,
- { 0|A(FP_INSN), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* fipr $fvm, $fvn */
- {
- SH_INSN_FIPR_COMPACT, "fipr-compact", "fipr", 16,
- { 0|A(FP_INSN), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* flds $frn */
- {
- SH_INSN_FLDS_COMPACT, "flds-compact", "flds", 16,
- { 0|A(FP_INSN), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* fldi0 $frn */
- {
- SH_INSN_FLDI0_COMPACT, "fldi0-compact", "fldi0", 16,
- { 0|A(FP_INSN), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* fldi1 $frn */
- {
- SH_INSN_FLDI1_COMPACT, "fldi1-compact", "fldi1", 16,
- { 0|A(FP_INSN), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* float fpul, $fsdn */
- {
- SH_INSN_FLOAT_COMPACT, "float-compact", "float", 16,
- { 0|A(FP_INSN), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* fmac fr0, $frm, $frn */
- {
- SH_INSN_FMAC_COMPACT, "fmac-compact", "fmac", 16,
- { 0|A(FP_INSN), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* fmov $frm, $frn */
- {
- SH_INSN_FMOV1_COMPACT, "fmov1-compact", "fmov", 16,
- { 0|A(FP_INSN), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* fmov @$rm, $frn */
- {
- SH_INSN_FMOV2_COMPACT, "fmov2-compact", "fmov", 16,
- { 0|A(FP_INSN), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* fmov @${rm}+, frn */
- {
- SH_INSN_FMOV3_COMPACT, "fmov3-compact", "fmov", 16,
- { 0|A(FP_INSN), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* fmov @(r0, $rm), $frn */
- {
- SH_INSN_FMOV4_COMPACT, "fmov4-compact", "fmov", 16,
- { 0|A(FP_INSN), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* fmov $frm, @$rn */
- {
- SH_INSN_FMOV5_COMPACT, "fmov5-compact", "fmov", 16,
- { 0|A(FP_INSN), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* fmov $frm, @-$rn */
- {
- SH_INSN_FMOV6_COMPACT, "fmov6-compact", "fmov", 16,
- { 0|A(FP_INSN), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* fmov $frm, @(r0, $rn) */
- {
- SH_INSN_FMOV7_COMPACT, "fmov7-compact", "fmov", 16,
- { 0|A(FP_INSN), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* fmul $fsdm, $fsdn */
- {
- SH_INSN_FMUL_COMPACT, "fmul-compact", "fmul", 16,
- { 0|A(FP_INSN), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* fneg $fsdn */
- {
- SH_INSN_FNEG_COMPACT, "fneg-compact", "fneg", 16,
- { 0|A(FP_INSN), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* frchg */
- {
- SH_INSN_FRCHG_COMPACT, "frchg-compact", "frchg", 16,
- { 0|A(FP_INSN), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* fschg */
- {
- SH_INSN_FSCHG_COMPACT, "fschg-compact", "fschg", 16,
- { 0|A(FP_INSN), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* fsqrt $fsdn */
- {
- SH_INSN_FSQRT_COMPACT, "fsqrt-compact", "fsqrt", 16,
- { 0|A(FP_INSN), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* fsts fpul, $frn */
- {
- SH_INSN_FSTS_COMPACT, "fsts-compact", "fsts", 16,
- { 0|A(FP_INSN), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* fsub $fsdm, $fsdn */
- {
- SH_INSN_FSUB_COMPACT, "fsub-compact", "fsub", 16,
- { 0|A(FP_INSN), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* ftrc $fsdn, fpul */
- {
- SH_INSN_FTRC_COMPACT, "ftrc-compact", "ftrc", 16,
- { 0|A(FP_INSN), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* ftrv xmtrx, $fvn */
- {
- SH_INSN_FTRV_COMPACT, "ftrv-compact", "ftrv", 16,
- { 0|A(FP_INSN), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* jmp @$rn */
- {
- SH_INSN_JMP_COMPACT, "jmp-compact", "jmp", 16,
- { 0|A(UNCOND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* jsr @$rn */
- {
- SH_INSN_JSR_COMPACT, "jsr-compact", "jsr", 16,
- { 0|A(UNCOND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* ldc $rn, gbr */
- {
- SH_INSN_LDC_COMPACT, "ldc-compact", "ldc", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* ldc.l @${rn}+, gbr */
- {
- SH_INSN_LDCL_COMPACT, "ldcl-compact", "ldc.l", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* lds $rn, fpscr */
- {
- SH_INSN_LDS_FPSCR_COMPACT, "lds-fpscr-compact", "lds", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* lds.l @${rn}+, fpscr */
- {
- SH_INSN_LDSL_FPSCR_COMPACT, "ldsl-fpscr-compact", "lds.l", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* lds $rn, fpul */
- {
- SH_INSN_LDS_FPUL_COMPACT, "lds-fpul-compact", "lds", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* lds.l @${rn}+, fpul */
- {
- SH_INSN_LDSL_FPUL_COMPACT, "ldsl-fpul-compact", "lds.l", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* lds $rn, mach */
- {
- SH_INSN_LDS_MACH_COMPACT, "lds-mach-compact", "lds", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* lds.l @${rn}+, mach */
- {
- SH_INSN_LDSL_MACH_COMPACT, "ldsl-mach-compact", "lds.l", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* lds $rn, macl */
- {
- SH_INSN_LDS_MACL_COMPACT, "lds-macl-compact", "lds", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* lds.l @${rn}+, macl */
- {
- SH_INSN_LDSL_MACL_COMPACT, "ldsl-macl-compact", "lds.l", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* lds $rn, pr */
- {
- SH_INSN_LDS_PR_COMPACT, "lds-pr-compact", "lds", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* lds.l @${rn}+, pr */
- {
- SH_INSN_LDSL_PR_COMPACT, "ldsl-pr-compact", "lds.l", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mac.l @${rm}+, @${rn}+ */
- {
- SH_INSN_MACL_COMPACT, "macl-compact", "mac.l", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mac.w @${rm}+, @${rn}+ */
- {
- SH_INSN_MACW_COMPACT, "macw-compact", "mac.w", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mov $rm64, $rn64 */
- {
- SH_INSN_MOV_COMPACT, "mov-compact", "mov", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mov #$imm8, $rn */
- {
- SH_INSN_MOVI_COMPACT, "movi-compact", "mov", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mov.b $rm, @$rn */
- {
- SH_INSN_MOVB1_COMPACT, "movb1-compact", "mov.b", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mov.b $rm, @-$rn */
- {
- SH_INSN_MOVB2_COMPACT, "movb2-compact", "mov.b", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mov.b $rm, @(r0,$rn) */
- {
- SH_INSN_MOVB3_COMPACT, "movb3-compact", "mov.b", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mov.b r0, @($imm8, gbr) */
- {
- SH_INSN_MOVB4_COMPACT, "movb4-compact", "mov.b", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mov.b r0, @($imm4, $rm) */
- {
- SH_INSN_MOVB5_COMPACT, "movb5-compact", "mov.b", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mov.b @$rm, $rn */
- {
- SH_INSN_MOVB6_COMPACT, "movb6-compact", "mov.b", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mov.b @${rm}+, $rn */
- {
- SH_INSN_MOVB7_COMPACT, "movb7-compact", "mov.b", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mov.b @(r0, $rm), $rn */
- {
- SH_INSN_MOVB8_COMPACT, "movb8-compact", "mov.b", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mov.b @($imm8, gbr), r0 */
- {
- SH_INSN_MOVB9_COMPACT, "movb9-compact", "mov.b", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mov.b @($imm4, $rm), r0 */
- {
- SH_INSN_MOVB10_COMPACT, "movb10-compact", "mov.b", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mov.l $rm, @$rn */
- {
- SH_INSN_MOVL1_COMPACT, "movl1-compact", "mov.l", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mov.l $rm, @-$rn */
- {
- SH_INSN_MOVL2_COMPACT, "movl2-compact", "mov.l", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mov.l $rm, @(r0, $rn) */
- {
- SH_INSN_MOVL3_COMPACT, "movl3-compact", "mov.l", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mov.l r0, @($imm8x4, gbr) */
- {
- SH_INSN_MOVL4_COMPACT, "movl4-compact", "mov.l", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mov.l $rm, @($imm4x4, $rn) */
- {
- SH_INSN_MOVL5_COMPACT, "movl5-compact", "mov.l", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mov.l @$rm, $rn */
- {
- SH_INSN_MOVL6_COMPACT, "movl6-compact", "mov.l", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mov.l @${rm}+, $rn */
- {
- SH_INSN_MOVL7_COMPACT, "movl7-compact", "mov.l", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mov.l @(r0, $rm), $rn */
- {
- SH_INSN_MOVL8_COMPACT, "movl8-compact", "mov.l", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mov.l @($imm8x4, gbr), r0 */
- {
- SH_INSN_MOVL9_COMPACT, "movl9-compact", "mov.l", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mov.l @($imm8x4, pc), $rn */
- {
- SH_INSN_MOVL10_COMPACT, "movl10-compact", "mov.l", 16,
- { 0|A(ILLSLOT), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mov.l @($imm4x4, $rm), $rn */
- {
- SH_INSN_MOVL11_COMPACT, "movl11-compact", "mov.l", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mov.w $rm, @$rn */
- {
- SH_INSN_MOVW1_COMPACT, "movw1-compact", "mov.w", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mov.w $rm, @-$rn */
- {
- SH_INSN_MOVW2_COMPACT, "movw2-compact", "mov.w", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mov.w $rm, @(r0, $rn) */
- {
- SH_INSN_MOVW3_COMPACT, "movw3-compact", "mov.w", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mov.w r0, @($imm8x2, gbr) */
- {
- SH_INSN_MOVW4_COMPACT, "movw4-compact", "mov.w", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mov.w r0, @($imm4x2, $rn) */
- {
- SH_INSN_MOVW5_COMPACT, "movw5-compact", "mov.w", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mov.w @$rm, $rn */
- {
- SH_INSN_MOVW6_COMPACT, "movw6-compact", "mov.w", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mov.w @${rm}+, $rn */
- {
- SH_INSN_MOVW7_COMPACT, "movw7-compact", "mov.w", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mov.w @(r0, $rm), $rn */
- {
- SH_INSN_MOVW8_COMPACT, "movw8-compact", "mov.w", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mov.w @($imm8x2, gbr), r0 */
- {
- SH_INSN_MOVW9_COMPACT, "movw9-compact", "mov.w", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mov.w @($imm8x2, pc), $rn */
- {
- SH_INSN_MOVW10_COMPACT, "movw10-compact", "mov.w", 16,
- { 0|A(ILLSLOT), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mov.w @($imm4x2, $rm), r0 */
- {
- SH_INSN_MOVW11_COMPACT, "movw11-compact", "mov.w", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mova @($imm8x4, pc), r0 */
- {
- SH_INSN_MOVA_COMPACT, "mova-compact", "mova", 16,
- { 0|A(ILLSLOT), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* movca.l r0, @$rn */
- {
- SH_INSN_MOVCAL_COMPACT, "movcal-compact", "movca.l", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* movt $rn */
- {
- SH_INSN_MOVT_COMPACT, "movt-compact", "movt", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mul.l $rm, $rn */
- {
- SH_INSN_MULL_COMPACT, "mull-compact", "mul.l", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* muls.w $rm, $rn */
- {
- SH_INSN_MULSW_COMPACT, "mulsw-compact", "muls.w", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* mulu.w $rm, $rn */
- {
- SH_INSN_MULUW_COMPACT, "muluw-compact", "mulu.w", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* neg $rm, $rn */
- {
- SH_INSN_NEG_COMPACT, "neg-compact", "neg", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* negc $rm, $rn */
- {
- SH_INSN_NEGC_COMPACT, "negc-compact", "negc", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* nop */
- {
- SH_INSN_NOP_COMPACT, "nop-compact", "nop", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* not $rm64, $rn64 */
- {
- SH_INSN_NOT_COMPACT, "not-compact", "not", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* ocbi @$rn */
- {
- SH_INSN_OCBI_COMPACT, "ocbi-compact", "ocbi", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* ocbp @$rn */
- {
- SH_INSN_OCBP_COMPACT, "ocbp-compact", "ocbp", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* ocbwb @$rn */
- {
- SH_INSN_OCBWB_COMPACT, "ocbwb-compact", "ocbwb", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* or $rm64, $rn64 */
- {
- SH_INSN_OR_COMPACT, "or-compact", "or", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* or #$uimm8, r0 */
- {
- SH_INSN_ORI_COMPACT, "ori-compact", "or", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* or.b #$imm8, @(r0, gbr) */
- {
- SH_INSN_ORB_COMPACT, "orb-compact", "or.b", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* pref @$rn */
- {
- SH_INSN_PREF_COMPACT, "pref-compact", "pref", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* rotcl $rn */
- {
- SH_INSN_ROTCL_COMPACT, "rotcl-compact", "rotcl", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* rotcr $rn */
- {
- SH_INSN_ROTCR_COMPACT, "rotcr-compact", "rotcr", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* rotl $rn */
- {
- SH_INSN_ROTL_COMPACT, "rotl-compact", "rotl", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* rotr $rn */
- {
- SH_INSN_ROTR_COMPACT, "rotr-compact", "rotr", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* rts */
- {
- SH_INSN_RTS_COMPACT, "rts-compact", "rts", 16,
- { 0|A(UNCOND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* sets */
- {
- SH_INSN_SETS_COMPACT, "sets-compact", "sets", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* sett */
- {
- SH_INSN_SETT_COMPACT, "sett-compact", "sett", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* shad $rm, $rn */
- {
- SH_INSN_SHAD_COMPACT, "shad-compact", "shad", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* shal $rn */
- {
- SH_INSN_SHAL_COMPACT, "shal-compact", "shal", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* shar $rn */
- {
- SH_INSN_SHAR_COMPACT, "shar-compact", "shar", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* shld $rm, $rn */
- {
- SH_INSN_SHLD_COMPACT, "shld-compact", "shld", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* shll $rn */
- {
- SH_INSN_SHLL_COMPACT, "shll-compact", "shll", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* shll2 $rn */
- {
- SH_INSN_SHLL2_COMPACT, "shll2-compact", "shll2", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* shll8 $rn */
- {
- SH_INSN_SHLL8_COMPACT, "shll8-compact", "shll8", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* shll16 $rn */
- {
- SH_INSN_SHLL16_COMPACT, "shll16-compact", "shll16", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* shlr $rn */
- {
- SH_INSN_SHLR_COMPACT, "shlr-compact", "shlr", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* shlr2 $rn */
- {
- SH_INSN_SHLR2_COMPACT, "shlr2-compact", "shlr2", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* shlr8 $rn */
- {
- SH_INSN_SHLR8_COMPACT, "shlr8-compact", "shlr8", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* shlr16 $rn */
- {
- SH_INSN_SHLR16_COMPACT, "shlr16-compact", "shlr16", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* stc gbr, $rn */
- {
- SH_INSN_STC_GBR_COMPACT, "stc-gbr-compact", "stc", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* stc.l gbr, @-$rn */
- {
- SH_INSN_STCL_GBR_COMPACT, "stcl-gbr-compact", "stc.l", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* sts fpscr, $rn */
- {
- SH_INSN_STS_FPSCR_COMPACT, "sts-fpscr-compact", "sts", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* sts.l fpscr, @-$rn */
- {
- SH_INSN_STSL_FPSCR_COMPACT, "stsl-fpscr-compact", "sts.l", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* sts fpul, $rn */
- {
- SH_INSN_STS_FPUL_COMPACT, "sts-fpul-compact", "sts", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* sts.l fpul, @-$rn */
- {
- SH_INSN_STSL_FPUL_COMPACT, "stsl-fpul-compact", "sts.l", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* sts mach, $rn */
- {
- SH_INSN_STS_MACH_COMPACT, "sts-mach-compact", "sts", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* sts.l mach, @-$rn */
- {
- SH_INSN_STSL_MACH_COMPACT, "stsl-mach-compact", "sts.l", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* sts macl, $rn */
- {
- SH_INSN_STS_MACL_COMPACT, "sts-macl-compact", "sts", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* sts.l macl, @-$rn */
- {
- SH_INSN_STSL_MACL_COMPACT, "stsl-macl-compact", "sts.l", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* sts pr, $rn */
- {
- SH_INSN_STS_PR_COMPACT, "sts-pr-compact", "sts", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* sts.l pr, @-$rn */
- {
- SH_INSN_STSL_PR_COMPACT, "stsl-pr-compact", "sts.l", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* sub $rm, $rn */
- {
- SH_INSN_SUB_COMPACT, "sub-compact", "sub", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* subc $rm, $rn */
- {
- SH_INSN_SUBC_COMPACT, "subc-compact", "subc", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* subv $rm, $rn */
- {
- SH_INSN_SUBV_COMPACT, "subv-compact", "subv", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* swap.b $rm, $rn */
- {
- SH_INSN_SWAPB_COMPACT, "swapb-compact", "swap.b", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* swap.w $rm, $rn */
- {
- SH_INSN_SWAPW_COMPACT, "swapw-compact", "swap.w", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* tas.b @$rn */
- {
- SH_INSN_TASB_COMPACT, "tasb-compact", "tas.b", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* trapa #$uimm8 */
- {
- SH_INSN_TRAPA_COMPACT, "trapa-compact", "trapa", 16,
- { 0|A(ILLSLOT), { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* tst $rm, $rn */
- {
- SH_INSN_TST_COMPACT, "tst-compact", "tst", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* tst #$uimm8, r0 */
- {
- SH_INSN_TSTI_COMPACT, "tsti-compact", "tst", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* tst.b #$imm8, @(r0, gbr) */
- {
- SH_INSN_TSTB_COMPACT, "tstb-compact", "tst.b", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* xor $rm64, $rn64 */
- {
- SH_INSN_XOR_COMPACT, "xor-compact", "xor", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* xor #$uimm8, r0 */
- {
- SH_INSN_XORI_COMPACT, "xori-compact", "xor", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* xor.b #$imm8, @(r0, gbr) */
- {
- SH_INSN_XORB_COMPACT, "xorb-compact", "xor.b", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* xtrct $rm, $rn */
- {
- SH_INSN_XTRCT_COMPACT, "xtrct-compact", "xtrct", 16,
- { 0, { (1<<MACH_BASE), (1<<ISA_COMPACT) } }
- },
-/* add $rm, $rn, $rd */
- {
- SH_INSN_ADD, "add", "add", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* add.l $rm, $rn, $rd */
- {
- SH_INSN_ADDL, "addl", "add.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* addi $rm, $disp10, $rd */
- {
- SH_INSN_ADDI, "addi", "addi", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* addi.l $rm, $disp10, $rd */
- {
- SH_INSN_ADDIL, "addil", "addi.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* addz.l $rm, $rn, $rd */
- {
- SH_INSN_ADDZL, "addzl", "addz.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* alloco $rm, $disp6x32 */
- {
- SH_INSN_ALLOCO, "alloco", "alloco", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* and $rm, $rn, $rd */
- {
- SH_INSN_AND, "and", "and", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* andc $rm, $rn, $rd */
- {
- SH_INSN_ANDC, "andc", "andc", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* andi $rm, $disp10, $rd */
- {
- SH_INSN_ANDI, "andi", "andi", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* beq$likely $rm, $rn, $tra */
- {
- SH_INSN_BEQ, "beq", "beq", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* beqi$likely $rm, $imm6, $tra */
- {
- SH_INSN_BEQI, "beqi", "beqi", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* bge$likely $rm, $rn, $tra */
- {
- SH_INSN_BGE, "bge", "bge", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* bgeu$likely $rm, $rn, $tra */
- {
- SH_INSN_BGEU, "bgeu", "bgeu", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* bgt$likely $rm, $rn, $tra */
- {
- SH_INSN_BGT, "bgt", "bgt", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* bgtu$likely $rm, $rn, $tra */
- {
- SH_INSN_BGTU, "bgtu", "bgtu", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* blink $trb, $rd */
- {
- SH_INSN_BLINK, "blink", "blink", 32,
- { 0|A(UNCOND_CTI), { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* bne$likely $rm, $rn, $tra */
- {
- SH_INSN_BNE, "bne", "bne", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* bnei$likely $rm, $imm6, $tra */
- {
- SH_INSN_BNEI, "bnei", "bnei", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* brk */
- {
- SH_INSN_BRK, "brk", "brk", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* byterev $rm, $rd */
- {
- SH_INSN_BYTEREV, "byterev", "byterev", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* cmpeq $rm, $rn, $rd */
- {
- SH_INSN_CMPEQ, "cmpeq", "cmpeq", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* cmpgt $rm, $rn, $rd */
- {
- SH_INSN_CMPGT, "cmpgt", "cmpgt", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* cmpgtu $rm,$rn, $rd */
- {
- SH_INSN_CMPGTU, "cmpgtu", "cmpgtu", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* cmveq $rm, $rn, $rd */
- {
- SH_INSN_CMVEQ, "cmveq", "cmveq", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* cmvne $rm, $rn, $rd */
- {
- SH_INSN_CMVNE, "cmvne", "cmvne", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fabs.d $drgh, $drf */
- {
- SH_INSN_FABSD, "fabsd", "fabs.d", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fabs.s $frgh, $frf */
- {
- SH_INSN_FABSS, "fabss", "fabs.s", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fadd.d $drg, $drh, $drf */
- {
- SH_INSN_FADDD, "faddd", "fadd.d", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fadd.s $frg, $frh, $frf */
- {
- SH_INSN_FADDS, "fadds", "fadd.s", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fcmpeq.d $drg, $drh, $rd */
- {
- SH_INSN_FCMPEQD, "fcmpeqd", "fcmpeq.d", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fcmpeq.s $frg, $frh, $rd */
- {
- SH_INSN_FCMPEQS, "fcmpeqs", "fcmpeq.s", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fcmpge.d $drg, $drh, $rd */
- {
- SH_INSN_FCMPGED, "fcmpged", "fcmpge.d", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fcmpge.s $frg, $frh, $rd */
- {
- SH_INSN_FCMPGES, "fcmpges", "fcmpge.s", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fcmpgt.d $drg, $drh, $rd */
- {
- SH_INSN_FCMPGTD, "fcmpgtd", "fcmpgt.d", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fcmpgt.s $frg, $frh, $rd */
- {
- SH_INSN_FCMPGTS, "fcmpgts", "fcmpgt.s", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fcmpun.d $drg, $drh, $rd */
- {
- SH_INSN_FCMPUND, "fcmpund", "fcmpun.d", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fcmpun.s $frg, $frh, $rd */
- {
- SH_INSN_FCMPUNS, "fcmpuns", "fcmpun.s", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fcnv.ds $drgh, $frf */
- {
- SH_INSN_FCNVDS, "fcnvds", "fcnv.ds", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fcnv.sd $frgh, $drf */
- {
- SH_INSN_FCNVSD, "fcnvsd", "fcnv.sd", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fdiv.d $drg, $drh, $drf */
- {
- SH_INSN_FDIVD, "fdivd", "fdiv.d", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fdiv.s $frg, $frh, $frf */
- {
- SH_INSN_FDIVS, "fdivs", "fdiv.s", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fgetscr $frf */
- {
- SH_INSN_FGETSCR, "fgetscr", "fgetscr", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fipr.s $fvg, $fvh, $frf */
- {
- SH_INSN_FIPRS, "fiprs", "fipr.s", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fld.d $rm, $disp10x8, $drf */
- {
- SH_INSN_FLDD, "fldd", "fld.d", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fld.p $rm, $disp10x8, $fpf */
- {
- SH_INSN_FLDP, "fldp", "fld.p", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fld.s $rm, $disp10x4, $frf */
- {
- SH_INSN_FLDS, "flds", "fld.s", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fldx.d $rm, $rn, $drf */
- {
- SH_INSN_FLDXD, "fldxd", "fldx.d", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fldx.p $rm, $rn, $fpf */
- {
- SH_INSN_FLDXP, "fldxp", "fldx.p", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fldx.s $rm, $rn, $frf */
- {
- SH_INSN_FLDXS, "fldxs", "fldx.s", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* float.ld $frgh, $drf */
- {
- SH_INSN_FLOATLD, "floatld", "float.ld", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* float.ls $frgh, $frf */
- {
- SH_INSN_FLOATLS, "floatls", "float.ls", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* float.qd $drgh, $drf */
- {
- SH_INSN_FLOATQD, "floatqd", "float.qd", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* float.qs $drgh, $frf */
- {
- SH_INSN_FLOATQS, "floatqs", "float.qs", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fmac.s $frg, $frh, $frf */
- {
- SH_INSN_FMACS, "fmacs", "fmac.s", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fmov.d $drgh, $drf */
- {
- SH_INSN_FMOVD, "fmovd", "fmov.d", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fmov.dq $drgh, $rd */
- {
- SH_INSN_FMOVDQ, "fmovdq", "fmov.dq", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fmov.ls $rm, $frf */
- {
- SH_INSN_FMOVLS, "fmovls", "fmov.ls", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fmov.qd $rm, $drf */
- {
- SH_INSN_FMOVQD, "fmovqd", "fmov.qd", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fmov.s $frgh, $frf */
- {
- SH_INSN_FMOVS, "fmovs", "fmov.s", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fmov.sl $frgh, $rd */
- {
- SH_INSN_FMOVSL, "fmovsl", "fmov.sl", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fmul.d $drg, $drh, $drf */
- {
- SH_INSN_FMULD, "fmuld", "fmul.d", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fmul.s $frg, $frh, $frf */
- {
- SH_INSN_FMULS, "fmuls", "fmul.s", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fneg.d $drgh, $drf */
- {
- SH_INSN_FNEGD, "fnegd", "fneg.d", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fneg.s $frgh, $frf */
- {
- SH_INSN_FNEGS, "fnegs", "fneg.s", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fputscr $frgh */
- {
- SH_INSN_FPUTSCR, "fputscr", "fputscr", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fsqrt.d $drgh, $drf */
- {
- SH_INSN_FSQRTD, "fsqrtd", "fsqrt.d", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fsqrt.s $frgh, $frf */
- {
- SH_INSN_FSQRTS, "fsqrts", "fsqrt.s", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fst.d $rm, $disp10x8, $drf */
- {
- SH_INSN_FSTD, "fstd", "fst.d", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fst.p $rm, $disp10x8, $fpf */
- {
- SH_INSN_FSTP, "fstp", "fst.p", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fst.s $rm, $disp10x4, $frf */
- {
- SH_INSN_FSTS, "fsts", "fst.s", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fstx.d $rm, $rn, $drf */
- {
- SH_INSN_FSTXD, "fstxd", "fstx.d", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fstx.p $rm, $rn, $fpf */
- {
- SH_INSN_FSTXP, "fstxp", "fstx.p", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fstx.s $rm, $rn, $frf */
- {
- SH_INSN_FSTXS, "fstxs", "fstx.s", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fsub.d $drg, $drh, $drf */
- {
- SH_INSN_FSUBD, "fsubd", "fsub.d", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* fsub.s $frg, $frh, $frf */
- {
- SH_INSN_FSUBS, "fsubs", "fsub.s", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* ftrc.dl $drgh, $frf */
- {
- SH_INSN_FTRCDL, "ftrcdl", "ftrc.dl", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* ftrc.sl $frgh, $frf */
- {
- SH_INSN_FTRCSL, "ftrcsl", "ftrc.sl", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* ftrc.dq $drgh, $drf */
- {
- SH_INSN_FTRCDQ, "ftrcdq", "ftrc.dq", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* ftrc.sq $frgh, $drf */
- {
- SH_INSN_FTRCSQ, "ftrcsq", "ftrc.sq", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* ftrv.s $mtrxg, $fvh, $fvf */
- {
- SH_INSN_FTRVS, "ftrvs", "ftrv.s", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* getcfg $rm, $disp6, $rd */
- {
- SH_INSN_GETCFG, "getcfg", "getcfg", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* getcon $crk, $rd */
- {
- SH_INSN_GETCON, "getcon", "getcon", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* gettr $trb, $rd */
- {
- SH_INSN_GETTR, "gettr", "gettr", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* icbi $rm, $disp6x32 */
- {
- SH_INSN_ICBI, "icbi", "icbi", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* ld.b $rm, $disp10, $rd */
- {
- SH_INSN_LDB, "ldb", "ld.b", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* ld.l $rm, $disp10x4, $rd */
- {
- SH_INSN_LDL, "ldl", "ld.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* ld.q $rm, $disp10x8, $rd */
- {
- SH_INSN_LDQ, "ldq", "ld.q", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* ld.ub $rm, $disp10, $rd */
- {
- SH_INSN_LDUB, "ldub", "ld.ub", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* ld.uw $rm, $disp10x2, $rd */
- {
- SH_INSN_LDUW, "lduw", "ld.uw", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* ld.w $rm, $disp10x2, $rd */
- {
- SH_INSN_LDW, "ldw", "ld.w", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* ldhi.l $rm, $disp6, $rd */
- {
- SH_INSN_LDHIL, "ldhil", "ldhi.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* ldhi.q $rm, $disp6, $rd */
- {
- SH_INSN_LDHIQ, "ldhiq", "ldhi.q", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* ldlo.l $rm, $disp6, $rd */
- {
- SH_INSN_LDLOL, "ldlol", "ldlo.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* ldlo.q $rm, $disp6, $rd */
- {
- SH_INSN_LDLOQ, "ldloq", "ldlo.q", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* ldx.b $rm, $rn, $rd */
- {
- SH_INSN_LDXB, "ldxb", "ldx.b", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* ldx.l $rm, $rn, $rd */
- {
- SH_INSN_LDXL, "ldxl", "ldx.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* ldx.q $rm, $rn, $rd */
- {
- SH_INSN_LDXQ, "ldxq", "ldx.q", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* ldx.ub $rm, $rn, $rd */
- {
- SH_INSN_LDXUB, "ldxub", "ldx.ub", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* ldx.uw $rm, $rn, $rd */
- {
- SH_INSN_LDXUW, "ldxuw", "ldx.uw", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* ldx.w $rm, $rn, $rd */
- {
- SH_INSN_LDXW, "ldxw", "ldx.w", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mabs.l $rm, $rd */
- {
- SH_INSN_MABSL, "mabsl", "mabs.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mabs.w $rm, $rd */
- {
- SH_INSN_MABSW, "mabsw", "mabs.w", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* madd.l $rm, $rn, $rd */
- {
- SH_INSN_MADDL, "maddl", "madd.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* madd.w $rm, $rn, $rd */
- {
- SH_INSN_MADDW, "maddw", "madd.w", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* madds.l $rm, $rn, $rd */
- {
- SH_INSN_MADDSL, "maddsl", "madds.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* madds.ub $rm, $rn, $rd */
- {
- SH_INSN_MADDSUB, "maddsub", "madds.ub", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* madds.w $rm, $rn, $rd */
- {
- SH_INSN_MADDSW, "maddsw", "madds.w", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mcmpeq.b $rm, $rn, $rd */
- {
- SH_INSN_MCMPEQB, "mcmpeqb", "mcmpeq.b", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mcmpeq.l $rm, $rn, $rd */
- {
- SH_INSN_MCMPEQL, "mcmpeql", "mcmpeq.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mcmpeq.w $rm, $rn, $rd */
- {
- SH_INSN_MCMPEQW, "mcmpeqw", "mcmpeq.w", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mcmpgt.l $rm, $rn, $rd */
- {
- SH_INSN_MCMPGTL, "mcmpgtl", "mcmpgt.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mcmpgt.ub $rm, $rn, $rd */
- {
- SH_INSN_MCMPGTUB, "mcmpgtub", "mcmpgt.ub", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mcmpgt.w $rm, $rn, $rd */
- {
- SH_INSN_MCMPGTW, "mcmpgtw", "mcmpgt.w", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mcmv $rm, $rn, $rd */
- {
- SH_INSN_MCMV, "mcmv", "mcmv", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mcnvs.lw $rm, $rn, $rd */
- {
- SH_INSN_MCNVSLW, "mcnvslw", "mcnvs.lw", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mcnvs.wb $rm, $rn, $rd */
- {
- SH_INSN_MCNVSWB, "mcnvswb", "mcnvs.wb", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mcnvs.wub $rm, $rn, $rd */
- {
- SH_INSN_MCNVSWUB, "mcnvswub", "mcnvs.wub", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mextr1 $rm, $rn, $rd */
- {
- SH_INSN_MEXTR1, "mextr1", "mextr1", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mextr2 $rm, $rn, $rd */
- {
- SH_INSN_MEXTR2, "mextr2", "mextr2", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mextr3 $rm, $rn, $rd */
- {
- SH_INSN_MEXTR3, "mextr3", "mextr3", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mextr4 $rm, $rn, $rd */
- {
- SH_INSN_MEXTR4, "mextr4", "mextr4", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mextr5 $rm, $rn, $rd */
- {
- SH_INSN_MEXTR5, "mextr5", "mextr5", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mextr6 $rm, $rn, $rd */
- {
- SH_INSN_MEXTR6, "mextr6", "mextr6", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mextr7 $rm, $rn, $rd */
- {
- SH_INSN_MEXTR7, "mextr7", "mextr7", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mmacfx.wl $rm, $rn, $rd */
- {
- SH_INSN_MMACFXWL, "mmacfxwl", "mmacfx.wl", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mmacnfx.wl $rm, $rn, $rd */
- {
- SH_INSN_MMACNFX_WL, "mmacnfx.wl", "mmacnfx.wl", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mmul.l $rm, $rn, $rd */
- {
- SH_INSN_MMULL, "mmull", "mmul.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mmul.w $rm, $rn, $rd */
- {
- SH_INSN_MMULW, "mmulw", "mmul.w", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mmulfx.l $rm, $rn, $rd */
- {
- SH_INSN_MMULFXL, "mmulfxl", "mmulfx.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mmulfx.w $rm, $rn, $rd */
- {
- SH_INSN_MMULFXW, "mmulfxw", "mmulfx.w", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mmulfxrp.w $rm, $rn, $rd */
- {
- SH_INSN_MMULFXRPW, "mmulfxrpw", "mmulfxrp.w", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mmulhi.wl $rm, $rn, $rd */
- {
- SH_INSN_MMULHIWL, "mmulhiwl", "mmulhi.wl", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mmullo.wl $rm, $rn, $rd */
- {
- SH_INSN_MMULLOWL, "mmullowl", "mmullo.wl", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mmulsum.wq $rm, $rn, $rd */
- {
- SH_INSN_MMULSUMWQ, "mmulsumwq", "mmulsum.wq", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* movi $imm16, $rd */
- {
- SH_INSN_MOVI, "movi", "movi", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mperm.w $rm, $rn, $rd */
- {
- SH_INSN_MPERMW, "mpermw", "mperm.w", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* msad.ubq $rm, $rn, $rd */
- {
- SH_INSN_MSADUBQ, "msadubq", "msad.ubq", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mshalds.l $rm, $rn, $rd */
- {
- SH_INSN_MSHALDSL, "mshaldsl", "mshalds.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mshalds.w $rm, $rn, $rd */
- {
- SH_INSN_MSHALDSW, "mshaldsw", "mshalds.w", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mshard.l $rm, $rn, $rd */
- {
- SH_INSN_MSHARDL, "mshardl", "mshard.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mshard.w $rm, $rn, $rd */
- {
- SH_INSN_MSHARDW, "mshardw", "mshard.w", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mshards.q $rm, $rn, $rd */
- {
- SH_INSN_MSHARDSQ, "mshardsq", "mshards.q", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mshfhi.b $rm, $rn, $rd */
- {
- SH_INSN_MSHFHIB, "mshfhib", "mshfhi.b", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mshfhi.l $rm, $rn, $rd */
- {
- SH_INSN_MSHFHIL, "mshfhil", "mshfhi.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mshfhi.w $rm, $rn, $rd */
- {
- SH_INSN_MSHFHIW, "mshfhiw", "mshfhi.w", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mshflo.b $rm, $rn, $rd */
- {
- SH_INSN_MSHFLOB, "mshflob", "mshflo.b", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mshflo.l $rm, $rn, $rd */
- {
- SH_INSN_MSHFLOL, "mshflol", "mshflo.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mshflo.w $rm, $rn, $rd */
- {
- SH_INSN_MSHFLOW, "mshflow", "mshflo.w", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mshlld.l $rm, $rn, $rd */
- {
- SH_INSN_MSHLLDL, "mshlldl", "mshlld.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mshlld.w $rm, $rn, $rd */
- {
- SH_INSN_MSHLLDW, "mshlldw", "mshlld.w", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mshlrd.l $rm, $rn, $rd */
- {
- SH_INSN_MSHLRDL, "mshlrdl", "mshlrd.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mshlrd.w $rm, $rn, $rd */
- {
- SH_INSN_MSHLRDW, "mshlrdw", "mshlrd.w", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* msub.l $rm, $rn, $rd */
- {
- SH_INSN_MSUBL, "msubl", "msub.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* msub.w $rm, $rn, $rd */
- {
- SH_INSN_MSUBW, "msubw", "msub.w", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* msubs.l $rm, $rn, $rd */
- {
- SH_INSN_MSUBSL, "msubsl", "msubs.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* msubs.ub $rm, $rn, $rd */
- {
- SH_INSN_MSUBSUB, "msubsub", "msubs.ub", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* msubs.w $rm, $rn, $rd */
- {
- SH_INSN_MSUBSW, "msubsw", "msubs.w", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* muls.l $rm, $rn, $rd */
- {
- SH_INSN_MULSL, "mulsl", "muls.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* mulu.l $rm, $rn, $rd */
- {
- SH_INSN_MULUL, "mulul", "mulu.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* nop */
- {
- SH_INSN_NOP, "nop", "nop", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* nsb $rm, $rd */
- {
- SH_INSN_NSB, "nsb", "nsb", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* ocbi $rm, $disp6x32 */
- {
- SH_INSN_OCBI, "ocbi", "ocbi", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* ocbp $rm, $disp6x32 */
- {
- SH_INSN_OCBP, "ocbp", "ocbp", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* ocbwb $rm, $disp6x32 */
- {
- SH_INSN_OCBWB, "ocbwb", "ocbwb", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* or $rm, $rn, $rd */
- {
- SH_INSN_OR, "or", "or", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* ori $rm, $imm10, $rd */
- {
- SH_INSN_ORI, "ori", "ori", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* prefi $rm, $disp6x32 */
- {
- SH_INSN_PREFI, "prefi", "prefi", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* pta$likely $disp16, $tra */
- {
- SH_INSN_PTA, "pta", "pta", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* ptabs$likely $rn, $tra */
- {
- SH_INSN_PTABS, "ptabs", "ptabs", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* ptb$likely $disp16, $tra */
- {
- SH_INSN_PTB, "ptb", "ptb", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* ptrel$likely $rn, $tra */
- {
- SH_INSN_PTREL, "ptrel", "ptrel", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* putcfg $rm, $disp6, $rd */
- {
- SH_INSN_PUTCFG, "putcfg", "putcfg", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* putcon $rm, $crj */
- {
- SH_INSN_PUTCON, "putcon", "putcon", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* rte */
- {
- SH_INSN_RTE, "rte", "rte", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* shard $rm, $rn, $rd */
- {
- SH_INSN_SHARD, "shard", "shard", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* shard.l $rm, $rn, $rd */
- {
- SH_INSN_SHARDL, "shardl", "shard.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* shari $rm, $uimm6, $rd */
- {
- SH_INSN_SHARI, "shari", "shari", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* shari.l $rm, $uimm6, $rd */
- {
- SH_INSN_SHARIL, "sharil", "shari.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* shlld $rm, $rn, $rd */
- {
- SH_INSN_SHLLD, "shlld", "shlld", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* shlld.l $rm, $rn, $rd */
- {
- SH_INSN_SHLLDL, "shlldl", "shlld.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* shlli $rm, $uimm6, $rd */
- {
- SH_INSN_SHLLI, "shlli", "shlli", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* shlli.l $rm, $uimm6, $rd */
- {
- SH_INSN_SHLLIL, "shllil", "shlli.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* shlrd $rm, $rn, $rd */
- {
- SH_INSN_SHLRD, "shlrd", "shlrd", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* shlrd.l $rm, $rn, $rd */
- {
- SH_INSN_SHLRDL, "shlrdl", "shlrd.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* shlri $rm, $uimm6, $rd */
- {
- SH_INSN_SHLRI, "shlri", "shlri", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* shlri.l $rm, $uimm6, $rd */
- {
- SH_INSN_SHLRIL, "shlril", "shlri.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* shori $uimm16, $rd */
- {
- SH_INSN_SHORI, "shori", "shori", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* sleep */
- {
- SH_INSN_SLEEP, "sleep", "sleep", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* st.b $rm, $disp10, $rd */
- {
- SH_INSN_STB, "stb", "st.b", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* st.l $rm, $disp10x4, $rd */
- {
- SH_INSN_STL, "stl", "st.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* st.q $rm, $disp10x8, $rd */
- {
- SH_INSN_STQ, "stq", "st.q", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* st.w $rm, $disp10x2, $rd */
- {
- SH_INSN_STW, "stw", "st.w", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* sthi.l $rm, $disp6, $rd */
- {
- SH_INSN_STHIL, "sthil", "sthi.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* sthi.q $rm, $disp6, $rd */
- {
- SH_INSN_STHIQ, "sthiq", "sthi.q", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* stlo.l $rm, $disp6, $rd */
- {
- SH_INSN_STLOL, "stlol", "stlo.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* stlo.q $rm, $disp6, $rd */
- {
- SH_INSN_STLOQ, "stloq", "stlo.q", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* stx.b $rm, $rn, $rd */
- {
- SH_INSN_STXB, "stxb", "stx.b", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* stx.l $rm, $rn, $rd */
- {
- SH_INSN_STXL, "stxl", "stx.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* stx.q $rm, $rn, $rd */
- {
- SH_INSN_STXQ, "stxq", "stx.q", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* stx.w $rm, $rn, $rd */
- {
- SH_INSN_STXW, "stxw", "stx.w", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* sub $rm, $rn, $rd */
- {
- SH_INSN_SUB, "sub", "sub", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* sub.l $rm, $rn, $rd */
- {
- SH_INSN_SUBL, "subl", "sub.l", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* swap.q $rm, $rn, $rd */
- {
- SH_INSN_SWAPQ, "swapq", "swap.q", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* synci */
- {
- SH_INSN_SYNCI, "synci", "synci", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* synco */
- {
- SH_INSN_SYNCO, "synco", "synco", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* trapa $rm */
- {
- SH_INSN_TRAPA, "trapa", "trapa", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* xor $rm, $rn, $rd */
- {
- SH_INSN_XOR, "xor", "xor", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-/* xori $rm, $imm6, $rd */
- {
- SH_INSN_XORI, "xori", "xori", 32,
- { 0, { (1<<MACH_BASE), (1<<ISA_MEDIA) } }
- },
-};
-
-#undef OP
-#undef A
-
-/* Initialize anything needed to be done once, before any cpu_open call. */
-
-static void
-init_tables ()
-{
-}
-
-/* Subroutine of sh_cgen_cpu_open to look up a mach via its bfd name. */
-
-static const CGEN_MACH *
-lookup_mach_via_bfd_name (table, name)
- const CGEN_MACH *table;
- const char *name;
-{
- while (table->name)
- {
- if (strcmp (name, table->bfd_name) == 0)
- return table;
- ++table;
- }
- abort ();
-}
-
-/* Subroutine of sh_cgen_cpu_open to build the hardware table. */
-
-static void
-build_hw_table (cd)
- CGEN_CPU_TABLE *cd;
-{
- int i;
- int machs = cd->machs;
- const CGEN_HW_ENTRY *init = & sh_cgen_hw_table[0];
- /* MAX_HW is only an upper bound on the number of selected entries.
- However each entry is indexed by it's enum so there can be holes in
- the table. */
- const CGEN_HW_ENTRY **selected =
- (const CGEN_HW_ENTRY **) xmalloc (MAX_HW * sizeof (CGEN_HW_ENTRY *));
-
- cd->hw_table.init_entries = init;
- cd->hw_table.entry_size = sizeof (CGEN_HW_ENTRY);
- memset (selected, 0, MAX_HW * sizeof (CGEN_HW_ENTRY *));
- /* ??? For now we just use machs to determine which ones we want. */
- for (i = 0; init[i].name != NULL; ++i)
- if (CGEN_HW_ATTR_VALUE (&init[i], CGEN_HW_MACH)
- & machs)
- selected[init[i].type] = &init[i];
- cd->hw_table.entries = selected;
- cd->hw_table.num_entries = MAX_HW;
-}
-
-/* Subroutine of sh_cgen_cpu_open to build the hardware table. */
-
-static void
-build_ifield_table (cd)
- CGEN_CPU_TABLE *cd;
-{
- cd->ifld_table = & sh_cgen_ifld_table[0];
-}
-
-/* Subroutine of sh_cgen_cpu_open to build the hardware table. */
-
-static void
-build_operand_table (cd)
- CGEN_CPU_TABLE *cd;
-{
- int i;
- int machs = cd->machs;
- const CGEN_OPERAND *init = & sh_cgen_operand_table[0];
- /* MAX_OPERANDS is only an upper bound on the number of selected entries.
- However each entry is indexed by it's enum so there can be holes in
- the table. */
- const CGEN_OPERAND **selected =
- (const CGEN_OPERAND **) xmalloc (MAX_OPERANDS * sizeof (CGEN_OPERAND *));
-
- cd->operand_table.init_entries = init;
- cd->operand_table.entry_size = sizeof (CGEN_OPERAND);
- memset (selected, 0, MAX_OPERANDS * sizeof (CGEN_OPERAND *));
- /* ??? For now we just use mach to determine which ones we want. */
- for (i = 0; init[i].name != NULL; ++i)
- if (CGEN_OPERAND_ATTR_VALUE (&init[i], CGEN_OPERAND_MACH)
- & machs)
- selected[init[i].type] = &init[i];
- cd->operand_table.entries = selected;
- cd->operand_table.num_entries = MAX_OPERANDS;
-}
-
-/* Subroutine of sh_cgen_cpu_open to build the hardware table.
- ??? This could leave out insns not supported by the specified mach/isa,
- but that would cause errors like "foo only supported by bar" to become
- "unknown insn", so for now we include all insns and require the app to
- do the checking later.
- ??? On the other hand, parsing of such insns may require their hardware or
- operand elements to be in the table [which they mightn't be]. */
-
-static void
-build_insn_table (cd)
- CGEN_CPU_TABLE *cd;
-{
- int i;
- const CGEN_IBASE *ib = & sh_cgen_insn_table[0];
- CGEN_INSN *insns = (CGEN_INSN *) xmalloc (MAX_INSNS * sizeof (CGEN_INSN));
-
- memset (insns, 0, MAX_INSNS * sizeof (CGEN_INSN));
- for (i = 0; i < MAX_INSNS; ++i)
- insns[i].base = &ib[i];
- cd->insn_table.init_entries = insns;
- cd->insn_table.entry_size = sizeof (CGEN_IBASE);
- cd->insn_table.num_init_entries = MAX_INSNS;
-}
-
-/* Subroutine of sh_cgen_cpu_open to rebuild the tables. */
-
-static void
-sh_cgen_rebuild_tables (cd)
- CGEN_CPU_TABLE *cd;
-{
- int i,n_isas;
- unsigned int isas = cd->isas;
-#if 0
- unsigned int machs = cd->machs;
-#endif
-
- cd->int_insn_p = CGEN_INT_INSN_P;
-
- /* Data derived from the isa spec. */
-#define UNSET (CGEN_SIZE_UNKNOWN + 1)
- cd->default_insn_bitsize = UNSET;
- cd->base_insn_bitsize = UNSET;
- cd->min_insn_bitsize = 65535; /* some ridiculously big number */
- cd->max_insn_bitsize = 0;
- for (i = 0; i < MAX_ISAS; ++i)
- if (((1 << i) & isas) != 0)
- {
- const CGEN_ISA *isa = & sh_cgen_isa_table[i];
-
- /* Default insn sizes of all selected isas must be equal or we set
- the result to 0, meaning "unknown". */
- if (cd->default_insn_bitsize == UNSET)
- cd->default_insn_bitsize = isa->default_insn_bitsize;
- else if (isa->default_insn_bitsize == cd->default_insn_bitsize)
- ; /* this is ok */
- else
- cd->default_insn_bitsize = CGEN_SIZE_UNKNOWN;
-
- /* Base insn sizes of all selected isas must be equal or we set
- the result to 0, meaning "unknown". */
- if (cd->base_insn_bitsize == UNSET)
- cd->base_insn_bitsize = isa->base_insn_bitsize;
- else if (isa->base_insn_bitsize == cd->base_insn_bitsize)
- ; /* this is ok */
- else
- cd->base_insn_bitsize = CGEN_SIZE_UNKNOWN;
-
- /* Set min,max insn sizes. */
- if (isa->min_insn_bitsize < cd->min_insn_bitsize)
- cd->min_insn_bitsize = isa->min_insn_bitsize;
- if (isa->max_insn_bitsize > cd->max_insn_bitsize)
- cd->max_insn_bitsize = isa->max_insn_bitsize;
-
- ++n_isas;
- }
-
-#if 0 /* Does nothing?? */
- /* Data derived from the mach spec. */
- for (i = 0; i < MAX_MACHS; ++i)
- if (((1 << i) & machs) != 0)
- {
- const CGEN_MACH *mach = & sh_cgen_mach_table[i];
-
- ++n_machs;
- }
-#endif
-
- /* Determine which hw elements are used by MACH. */
- build_hw_table (cd);
-
- /* Build the ifield table. */
- build_ifield_table (cd);
-
- /* Determine which operands are used by MACH/ISA. */
- build_operand_table (cd);
-
- /* Build the instruction table. */
- build_insn_table (cd);
-}
-
-/* Initialize a cpu table and return a descriptor.
- It's much like opening a file, and must be the first function called.
- The arguments are a set of (type/value) pairs, terminated with
- CGEN_CPU_OPEN_END.
-
- Currently supported values:
- CGEN_CPU_OPEN_ISAS: bitmap of values in enum isa_attr
- CGEN_CPU_OPEN_MACHS: bitmap of values in enum mach_attr
- CGEN_CPU_OPEN_BFDMACH: specify 1 mach using bfd name
- CGEN_CPU_OPEN_ENDIAN: specify endian choice
- CGEN_CPU_OPEN_END: terminates arguments
-
- ??? Simultaneous multiple isas might not make sense, but it's not (yet)
- precluded.
-
- ??? We only support ISO C stdargs here, not K&R.
- Laziness, plus experiment to see if anything requires K&R - eventually
- K&R will no longer be supported - e.g. GDB is currently trying this. */
-
-CGEN_CPU_DESC
-sh_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...)
-{
- CGEN_CPU_TABLE *cd = (CGEN_CPU_TABLE *) xmalloc (sizeof (CGEN_CPU_TABLE));
- static int init_p;
- unsigned int isas = 0; /* 0 = "unspecified" */
- unsigned int machs = 0; /* 0 = "unspecified" */
- enum cgen_endian endian = CGEN_ENDIAN_UNKNOWN;
- va_list ap;
-
- if (! init_p)
- {
- init_tables ();
- init_p = 1;
- }
-
- memset (cd, 0, sizeof (*cd));
-
- va_start (ap, arg_type);
- while (arg_type != CGEN_CPU_OPEN_END)
- {
- switch (arg_type)
- {
- case CGEN_CPU_OPEN_ISAS :
- isas = va_arg (ap, unsigned int);
- break;
- case CGEN_CPU_OPEN_MACHS :
- machs = va_arg (ap, unsigned int);
- break;
- case CGEN_CPU_OPEN_BFDMACH :
- {
- const char *name = va_arg (ap, const char *);
- const CGEN_MACH *mach =
- lookup_mach_via_bfd_name (sh_cgen_mach_table, name);
-
- machs |= mach->num << 1;
- break;
- }
- case CGEN_CPU_OPEN_ENDIAN :
- endian = va_arg (ap, enum cgen_endian);
- break;
- default :
- fprintf (stderr, "sh_cgen_cpu_open: unsupported argument `%d'\n",
- arg_type);
- abort (); /* ??? return NULL? */
- }
- arg_type = va_arg (ap, enum cgen_cpu_open_arg);
- }
- va_end (ap);
-
- /* mach unspecified means "all" */
- if (machs == 0)
- machs = (1 << MAX_MACHS) - 1;
- /* base mach is always selected */
- machs |= 1;
- /* isa unspecified means "all" */
- if (isas == 0)
- isas = (1 << MAX_ISAS) - 1;
- if (endian == CGEN_ENDIAN_UNKNOWN)
- {
- /* ??? If target has only one, could have a default. */
- fprintf (stderr, "sh_cgen_cpu_open: no endianness specified\n");
- abort ();
- }
-
- cd->isas = isas;
- cd->machs = machs;
- cd->endian = endian;
- /* FIXME: for the sparc case we can determine insn-endianness statically.
- The worry here is where both data and insn endian can be independently
- chosen, in which case this function will need another argument.
- Actually, will want to allow for more arguments in the future anyway. */
- cd->insn_endian = endian;
-
- /* Table (re)builder. */
- cd->rebuild_tables = sh_cgen_rebuild_tables;
- sh_cgen_rebuild_tables (cd);
-
- /* Default to not allowing signed overflow. */
- cd->signed_overflow_ok_p = 0;
-
- return (CGEN_CPU_DESC) cd;
-}
-
-/* Cover fn to sh_cgen_cpu_open to handle the simple case of 1 isa, 1 mach.
- MACH_NAME is the bfd name of the mach. */
-
-CGEN_CPU_DESC
-sh_cgen_cpu_open_1 (mach_name, endian)
- const char *mach_name;
- enum cgen_endian endian;
-{
- return sh_cgen_cpu_open (CGEN_CPU_OPEN_BFDMACH, mach_name,
- CGEN_CPU_OPEN_ENDIAN, endian,
- CGEN_CPU_OPEN_END);
-}
-
-/* Close a cpu table.
- ??? This can live in a machine independent file, but there's currently
- no place to put this file (there's no libcgen). libopcodes is the wrong
- place as some simulator ports use this but they don't use libopcodes. */
-
-void
-sh_cgen_cpu_close (cd)
- CGEN_CPU_DESC cd;
-{
- if (cd->insn_table.init_entries)
- free ((CGEN_INSN *) cd->insn_table.init_entries);
- if (cd->hw_table.entries)
- free ((CGEN_HW_ENTRY *) cd->hw_table.entries);
- free (cd);
-}
-
diff --git a/sim/sh64/sh-desc.h b/sim/sh64/sh-desc.h
deleted file mode 100644
index 30402cc53fa..00000000000
--- a/sim/sh64/sh-desc.h
+++ /dev/null
@@ -1,249 +0,0 @@
-/* CPU data header for sh.
-
-THIS FILE IS MACHINE GENERATED WITH CGEN.
-
-Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
-
-This file is part of the GNU Binutils and/or GDB, the GNU debugger.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-
-#ifndef SH_CPU_H
-#define SH_CPU_H
-
-#define CGEN_ARCH sh
-
-/* Given symbol S, return sh_cgen_<S>. */
-#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-#define CGEN_SYM(s) sh##_cgen_##s
-#else
-#define CGEN_SYM(s) sh/**/_cgen_/**/s
-#endif
-
-
-/* Selected cpu families. */
-#define HAVE_CPU_SH64
-
-#define CGEN_INSN_LSB0_P 1
-
-/* Minimum size of any insn (in bytes). */
-#define CGEN_MIN_INSN_SIZE 2
-
-/* Maximum size of any insn (in bytes). */
-#define CGEN_MAX_INSN_SIZE 4
-
-#define CGEN_INT_INSN_P 1
-
-/* Maximum nymber of syntax bytes in an instruction. */
-#define CGEN_ACTUAL_MAX_SYNTAX_BYTES 22
-
-/* CGEN_MNEMONIC_OPERANDS is defined if mnemonics have operands.
- e.g. In "b,a foo" the ",a" is an operand. If mnemonics have operands
- we can't hash on everything up to the space. */
-#define CGEN_MNEMONIC_OPERANDS
-
-/* Maximum number of fields in an instruction. */
-#define CGEN_ACTUAL_MAX_IFMT_OPERANDS 8
-
-/* Enums. */
-
-/* Enum declaration for . */
-typedef enum frc_names {
- H_FRC_FR0, H_FRC_FR1, H_FRC_FR2, H_FRC_FR3
- , H_FRC_FR4, H_FRC_FR5, H_FRC_FR6, H_FRC_FR7
- , H_FRC_FR8, H_FRC_FR9, H_FRC_FR10, H_FRC_FR11
- , H_FRC_FR12, H_FRC_FR13, H_FRC_FR14, H_FRC_FR15
-} FRC_NAMES;
-
-/* Enum declaration for . */
-typedef enum drc_names {
- H_DRC_DR0 = 0, H_DRC_DR2 = 2, H_DRC_DR4 = 4, H_DRC_DR6 = 6
- , H_DRC_DR8 = 8, H_DRC_DR10 = 10, H_DRC_DR12 = 12, H_DRC_DR14 = 14
-} DRC_NAMES;
-
-/* Enum declaration for . */
-typedef enum xf_names {
- H_XF_XF0, H_XF_XF1, H_XF_XF2, H_XF_XF3
- , H_XF_XF4, H_XF_XF5, H_XF_XF6, H_XF_XF7
- , H_XF_XF8, H_XF_XF9, H_XF_XF10, H_XF_XF11
- , H_XF_XF12, H_XF_XF13, H_XF_XF14, H_XF_XF15
-} XF_NAMES;
-
-/* Attributes. */
-
-/* Enum declaration for machine type selection. */
-typedef enum mach_attr {
- MACH_BASE, MACH_SH2, MACH_SH3, MACH_SH3E
- , MACH_SH4, MACH_SH5, MACH_MAX
-} MACH_ATTR;
-
-/* Enum declaration for instruction set selection. */
-typedef enum isa_attr {
- ISA_COMPACT, ISA_MEDIA, ISA_MAX
-} ISA_ATTR;
-
-/* Number of architecture variants. */
-#define MAX_ISAS ((int) ISA_MAX)
-#define MAX_MACHS ((int) MACH_MAX)
-
-/* Ifield attribute indices. */
-
-/* Enum declaration for cgen_ifld attrs. */
-typedef enum cgen_ifld_attr {
- CGEN_IFLD_VIRTUAL, CGEN_IFLD_PCREL_ADDR, CGEN_IFLD_ABS_ADDR, CGEN_IFLD_RESERVED
- , CGEN_IFLD_SIGN_OPT, CGEN_IFLD_SIGNED, CGEN_IFLD_END_BOOLS, CGEN_IFLD_START_NBOOLS = 31
- , CGEN_IFLD_MACH, CGEN_IFLD_ISA, CGEN_IFLD_END_NBOOLS
-} CGEN_IFLD_ATTR;
-
-/* Number of non-boolean elements in cgen_ifld_attr. */
-#define CGEN_IFLD_NBOOL_ATTRS (CGEN_IFLD_END_NBOOLS - CGEN_IFLD_START_NBOOLS - 1)
-
-/* Enum declaration for sh ifield types. */
-typedef enum ifield_type {
- SH_F_NIL, SH_F_ANYOF, SH_F_OP4, SH_F_OP8
- , SH_F_OP16, SH_F_SUB4, SH_F_SUB8, SH_F_SUB10
- , SH_F_RN, SH_F_RM, SH_F_8_1, SH_F_DISP8
- , SH_F_DISP12, SH_F_IMM8, SH_F_IMM4, SH_F_IMM4X2
- , SH_F_IMM4X4, SH_F_IMM8X2, SH_F_IMM8X4, SH_F_DN
- , SH_F_DM, SH_F_VN, SH_F_VM, SH_F_XN
- , SH_F_XM, SH_F_OP, SH_F_EXT, SH_F_RSVD
- , SH_F_LEFT, SH_F_RIGHT, SH_F_DEST, SH_F_LEFT_RIGHT
- , SH_F_TRA, SH_F_TRB, SH_F_LIKELY, SH_F_25
- , SH_F_8_2, SH_F_IMM6, SH_F_IMM10, SH_F_IMM16
- , SH_F_UIMM6, SH_F_UIMM16, SH_F_DISP6, SH_F_DISP6X32
- , SH_F_DISP10, SH_F_DISP10X8, SH_F_DISP10X4, SH_F_DISP10X2
- , SH_F_DISP16, SH_F_MAX
-} IFIELD_TYPE;
-
-#define MAX_IFLD ((int) SH_F_MAX)
-
-/* Hardware attribute indices. */
-
-/* Enum declaration for cgen_hw attrs. */
-typedef enum cgen_hw_attr {
- CGEN_HW_VIRTUAL, CGEN_HW_CACHE_ADDR, CGEN_HW_PC, CGEN_HW_PROFILE
- , CGEN_HW_END_BOOLS, CGEN_HW_START_NBOOLS = 31, CGEN_HW_MACH, CGEN_HW_END_NBOOLS
-} CGEN_HW_ATTR;
-
-/* Number of non-boolean elements in cgen_hw_attr. */
-#define CGEN_HW_NBOOL_ATTRS (CGEN_HW_END_NBOOLS - CGEN_HW_START_NBOOLS - 1)
-
-/* Enum declaration for sh hardware types. */
-typedef enum cgen_hw_type {
- HW_H_MEMORY, HW_H_SINT, HW_H_UINT, HW_H_ADDR
- , HW_H_IADDR, HW_H_PC, HW_H_GR, HW_H_GRC
- , HW_H_CR, HW_H_SR, HW_H_FPSCR, HW_H_FRBIT
- , HW_H_SZBIT, HW_H_PRBIT, HW_H_SBIT, HW_H_MBIT
- , HW_H_QBIT, HW_H_FR, HW_H_FP, HW_H_FV
- , HW_H_FMTX, HW_H_DR, HW_H_TR, HW_H_ENDIAN
- , HW_H_ISM, HW_H_FRC, HW_H_DRC, HW_H_XF
- , HW_H_XD, HW_H_FVC, HW_H_FPCCR, HW_H_GBR
- , HW_H_PR, HW_H_MACL, HW_H_MACH, HW_H_TBIT
- , HW_MAX
-} CGEN_HW_TYPE;
-
-#define MAX_HW ((int) HW_MAX)
-
-/* Operand attribute indices. */
-
-/* Enum declaration for cgen_operand attrs. */
-typedef enum cgen_operand_attr {
- CGEN_OPERAND_VIRTUAL, CGEN_OPERAND_PCREL_ADDR, CGEN_OPERAND_ABS_ADDR, CGEN_OPERAND_SIGN_OPT
- , CGEN_OPERAND_SIGNED, CGEN_OPERAND_NEGATIVE, CGEN_OPERAND_RELAX, CGEN_OPERAND_SEM_ONLY
- , CGEN_OPERAND_END_BOOLS, CGEN_OPERAND_START_NBOOLS = 31, CGEN_OPERAND_MACH, CGEN_OPERAND_ISA
- , CGEN_OPERAND_END_NBOOLS
-} CGEN_OPERAND_ATTR;
-
-/* Number of non-boolean elements in cgen_operand_attr. */
-#define CGEN_OPERAND_NBOOL_ATTRS (CGEN_OPERAND_END_NBOOLS - CGEN_OPERAND_START_NBOOLS - 1)
-
-/* Enum declaration for sh operand types. */
-typedef enum cgen_operand_type {
- SH_OPERAND_PC, SH_OPERAND_ENDIAN, SH_OPERAND_ISM, SH_OPERAND_RM
- , SH_OPERAND_RN, SH_OPERAND_R0, SH_OPERAND_FRN, SH_OPERAND_FRM
- , SH_OPERAND_FVN, SH_OPERAND_FVM, SH_OPERAND_DRN, SH_OPERAND_DRM
- , SH_OPERAND_IMM4, SH_OPERAND_IMM8, SH_OPERAND_UIMM8, SH_OPERAND_IMM4X2
- , SH_OPERAND_IMM4X4, SH_OPERAND_IMM8X2, SH_OPERAND_IMM8X4, SH_OPERAND_DISP8
- , SH_OPERAND_DISP12, SH_OPERAND_RM64, SH_OPERAND_RN64, SH_OPERAND_GBR
- , SH_OPERAND_PR, SH_OPERAND_FPSCR, SH_OPERAND_TBIT, SH_OPERAND_SBIT
- , SH_OPERAND_MBIT, SH_OPERAND_QBIT, SH_OPERAND_FPUL, SH_OPERAND_FRBIT
- , SH_OPERAND_SZBIT, SH_OPERAND_PRBIT, SH_OPERAND_MACL, SH_OPERAND_MACH
- , SH_OPERAND_FSDM, SH_OPERAND_FSDN, SH_OPERAND_RD, SH_OPERAND_FRG
- , SH_OPERAND_FRH, SH_OPERAND_FRF, SH_OPERAND_FRGH, SH_OPERAND_FPF
- , SH_OPERAND_FVG, SH_OPERAND_FVH, SH_OPERAND_FVF, SH_OPERAND_MTRXG
- , SH_OPERAND_DRG, SH_OPERAND_DRH, SH_OPERAND_DRF, SH_OPERAND_DRGH
- , SH_OPERAND_CRJ, SH_OPERAND_CRK, SH_OPERAND_TRA, SH_OPERAND_TRB
- , SH_OPERAND_DISP6, SH_OPERAND_DISP6X32, SH_OPERAND_DISP10, SH_OPERAND_DISP10X2
- , SH_OPERAND_DISP10X4, SH_OPERAND_DISP10X8, SH_OPERAND_DISP16, SH_OPERAND_IMM6
- , SH_OPERAND_IMM10, SH_OPERAND_IMM16, SH_OPERAND_UIMM6, SH_OPERAND_UIMM16
- , SH_OPERAND_LIKELY, SH_OPERAND_MAX
-} CGEN_OPERAND_TYPE;
-
-/* Number of operands types. */
-#define MAX_OPERANDS 72
-
-/* Maximum number of operands referenced by any insn. */
-#define MAX_OPERAND_INSTANCES 8
-
-/* Insn attribute indices. */
-
-/* Enum declaration for cgen_insn attrs. */
-typedef enum cgen_insn_attr {
- CGEN_INSN_ALIAS, CGEN_INSN_VIRTUAL, CGEN_INSN_UNCOND_CTI, CGEN_INSN_COND_CTI
- , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAX
- , CGEN_INSN_NO_DIS, CGEN_INSN_PBB, CGEN_INSN_ILLSLOT, CGEN_INSN_FP_INSN
- , CGEN_INSN_END_BOOLS, CGEN_INSN_START_NBOOLS = 31, CGEN_INSN_MACH, CGEN_INSN_ISA
- , CGEN_INSN_END_NBOOLS
-} CGEN_INSN_ATTR;
-
-/* Number of non-boolean elements in cgen_insn_attr. */
-#define CGEN_INSN_NBOOL_ATTRS (CGEN_INSN_END_NBOOLS - CGEN_INSN_START_NBOOLS - 1)
-
-/* cgen.h uses things we just defined. */
-#include "opcode/cgen.h"
-
-/* Attributes. */
-extern const CGEN_ATTR_TABLE sh_cgen_hardware_attr_table[];
-extern const CGEN_ATTR_TABLE sh_cgen_ifield_attr_table[];
-extern const CGEN_ATTR_TABLE sh_cgen_operand_attr_table[];
-extern const CGEN_ATTR_TABLE sh_cgen_insn_attr_table[];
-
-/* Hardware decls. */
-
-extern CGEN_KEYWORD sh_cgen_opval_h_gr;
-extern CGEN_KEYWORD sh_cgen_opval_h_grc;
-extern CGEN_KEYWORD sh_cgen_opval_h_cr;
-extern CGEN_KEYWORD sh_cgen_opval_h_fr;
-extern CGEN_KEYWORD sh_cgen_opval_h_fp;
-extern CGEN_KEYWORD sh_cgen_opval_h_fv;
-extern CGEN_KEYWORD sh_cgen_opval_h_fmtx;
-extern CGEN_KEYWORD sh_cgen_opval_h_dr;
-extern CGEN_KEYWORD sh_cgen_opval_h_tr;
-extern CGEN_KEYWORD sh_cgen_opval_frc_names;
-extern CGEN_KEYWORD sh_cgen_opval_drc_names;
-extern CGEN_KEYWORD sh_cgen_opval_xf_names;
-extern CGEN_KEYWORD sh_cgen_opval_frc_names;
-extern CGEN_KEYWORD sh_cgen_opval_h_fvc;
-
-/* Ifield support. */
-
-extern const struct cgen_ifld sh_cgen_ifld_table[];
-
-
-
-
-#endif /* SH_CPU_H */
diff --git a/sim/sh64/sh-opc.h b/sim/sh64/sh-opc.h
deleted file mode 100644
index 3e0b8e25ec5..00000000000
--- a/sim/sh64/sh-opc.h
+++ /dev/null
@@ -1,216 +0,0 @@
-/* Instruction opcode header for sh.
-
-THIS FILE IS MACHINE GENERATED WITH CGEN.
-
-Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
-
-This file is part of the GNU Binutils and/or GDB, the GNU debugger.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-
-#ifndef SH_OPC_H
-#define SH_OPC_H
-
-/* -- opc.h */
-
-/* Allows reason codes to be output when assembler errors occur. */
-#define CGEN_VERBOSE_ASSEMBLER_ERRORS
-
-/* Override disassembly hashing - there are variable bits in the top
- byte of these instructions. */
-#define CGEN_DIS_HASH_SIZE 8
-#define CGEN_DIS_HASH(buf,value) (((* (unsigned char*) (buf)) >> 6) % CGEN_DIS_HASH_SIZE)
-
-/* -- asm.c */
-/* Enum declaration for sh instruction types. */
-typedef enum cgen_insn_type {
- SH_INSN_INVALID, SH_INSN_ADD_COMPACT, SH_INSN_ADDI_COMPACT, SH_INSN_ADDC_COMPACT
- , SH_INSN_ADDV_COMPACT, SH_INSN_AND_COMPACT, SH_INSN_ANDI_COMPACT, SH_INSN_ANDB_COMPACT
- , SH_INSN_BF_COMPACT, SH_INSN_BFS_COMPACT, SH_INSN_BRA_COMPACT, SH_INSN_BRAF_COMPACT
- , SH_INSN_BRK_COMPACT, SH_INSN_BSR_COMPACT, SH_INSN_BSRF_COMPACT, SH_INSN_BT_COMPACT
- , SH_INSN_BTS_COMPACT, SH_INSN_CLRMAC_COMPACT, SH_INSN_CLRS_COMPACT, SH_INSN_CLRT_COMPACT
- , SH_INSN_CMPEQ_COMPACT, SH_INSN_CMPEQI_COMPACT, SH_INSN_CMPGE_COMPACT, SH_INSN_CMPGT_COMPACT
- , SH_INSN_CMPHI_COMPACT, SH_INSN_CMPHS_COMPACT, SH_INSN_CMPPL_COMPACT, SH_INSN_CMPPZ_COMPACT
- , SH_INSN_CMPSTR_COMPACT, SH_INSN_DIV0S_COMPACT, SH_INSN_DIV0U_COMPACT, SH_INSN_DIV1_COMPACT
- , SH_INSN_DMULSL_COMPACT, SH_INSN_DMULUL_COMPACT, SH_INSN_DT_COMPACT, SH_INSN_EXTSB_COMPACT
- , SH_INSN_EXTSW_COMPACT, SH_INSN_EXTUB_COMPACT, SH_INSN_EXTUW_COMPACT, SH_INSN_FABS_COMPACT
- , SH_INSN_FADD_COMPACT, SH_INSN_FCMPEQ_COMPACT, SH_INSN_FCMPGT_COMPACT, SH_INSN_FCNVDS_COMPACT
- , SH_INSN_FCNVSD_COMPACT, SH_INSN_FDIV_COMPACT, SH_INSN_FIPR_COMPACT, SH_INSN_FLDS_COMPACT
- , SH_INSN_FLDI0_COMPACT, SH_INSN_FLDI1_COMPACT, SH_INSN_FLOAT_COMPACT, SH_INSN_FMAC_COMPACT
- , SH_INSN_FMOV1_COMPACT, SH_INSN_FMOV2_COMPACT, SH_INSN_FMOV3_COMPACT, SH_INSN_FMOV4_COMPACT
- , SH_INSN_FMOV5_COMPACT, SH_INSN_FMOV6_COMPACT, SH_INSN_FMOV7_COMPACT, SH_INSN_FMUL_COMPACT
- , SH_INSN_FNEG_COMPACT, SH_INSN_FRCHG_COMPACT, SH_INSN_FSCHG_COMPACT, SH_INSN_FSQRT_COMPACT
- , SH_INSN_FSTS_COMPACT, SH_INSN_FSUB_COMPACT, SH_INSN_FTRC_COMPACT, SH_INSN_FTRV_COMPACT
- , SH_INSN_JMP_COMPACT, SH_INSN_JSR_COMPACT, SH_INSN_LDC_COMPACT, SH_INSN_LDCL_COMPACT
- , SH_INSN_LDS_FPSCR_COMPACT, SH_INSN_LDSL_FPSCR_COMPACT, SH_INSN_LDS_FPUL_COMPACT, SH_INSN_LDSL_FPUL_COMPACT
- , SH_INSN_LDS_MACH_COMPACT, SH_INSN_LDSL_MACH_COMPACT, SH_INSN_LDS_MACL_COMPACT, SH_INSN_LDSL_MACL_COMPACT
- , SH_INSN_LDS_PR_COMPACT, SH_INSN_LDSL_PR_COMPACT, SH_INSN_MACL_COMPACT, SH_INSN_MACW_COMPACT
- , SH_INSN_MOV_COMPACT, SH_INSN_MOVI_COMPACT, SH_INSN_MOVB1_COMPACT, SH_INSN_MOVB2_COMPACT
- , SH_INSN_MOVB3_COMPACT, SH_INSN_MOVB4_COMPACT, SH_INSN_MOVB5_COMPACT, SH_INSN_MOVB6_COMPACT
- , SH_INSN_MOVB7_COMPACT, SH_INSN_MOVB8_COMPACT, SH_INSN_MOVB9_COMPACT, SH_INSN_MOVB10_COMPACT
- , SH_INSN_MOVL1_COMPACT, SH_INSN_MOVL2_COMPACT, SH_INSN_MOVL3_COMPACT, SH_INSN_MOVL4_COMPACT
- , SH_INSN_MOVL5_COMPACT, SH_INSN_MOVL6_COMPACT, SH_INSN_MOVL7_COMPACT, SH_INSN_MOVL8_COMPACT
- , SH_INSN_MOVL9_COMPACT, SH_INSN_MOVL10_COMPACT, SH_INSN_MOVL11_COMPACT, SH_INSN_MOVW1_COMPACT
- , SH_INSN_MOVW2_COMPACT, SH_INSN_MOVW3_COMPACT, SH_INSN_MOVW4_COMPACT, SH_INSN_MOVW5_COMPACT
- , SH_INSN_MOVW6_COMPACT, SH_INSN_MOVW7_COMPACT, SH_INSN_MOVW8_COMPACT, SH_INSN_MOVW9_COMPACT
- , SH_INSN_MOVW10_COMPACT, SH_INSN_MOVW11_COMPACT, SH_INSN_MOVA_COMPACT, SH_INSN_MOVCAL_COMPACT
- , SH_INSN_MOVT_COMPACT, SH_INSN_MULL_COMPACT, SH_INSN_MULSW_COMPACT, SH_INSN_MULUW_COMPACT
- , SH_INSN_NEG_COMPACT, SH_INSN_NEGC_COMPACT, SH_INSN_NOP_COMPACT, SH_INSN_NOT_COMPACT
- , SH_INSN_OCBI_COMPACT, SH_INSN_OCBP_COMPACT, SH_INSN_OCBWB_COMPACT, SH_INSN_OR_COMPACT
- , SH_INSN_ORI_COMPACT, SH_INSN_ORB_COMPACT, SH_INSN_PREF_COMPACT, SH_INSN_ROTCL_COMPACT
- , SH_INSN_ROTCR_COMPACT, SH_INSN_ROTL_COMPACT, SH_INSN_ROTR_COMPACT, SH_INSN_RTS_COMPACT
- , SH_INSN_SETS_COMPACT, SH_INSN_SETT_COMPACT, SH_INSN_SHAD_COMPACT, SH_INSN_SHAL_COMPACT
- , SH_INSN_SHAR_COMPACT, SH_INSN_SHLD_COMPACT, SH_INSN_SHLL_COMPACT, SH_INSN_SHLL2_COMPACT
- , SH_INSN_SHLL8_COMPACT, SH_INSN_SHLL16_COMPACT, SH_INSN_SHLR_COMPACT, SH_INSN_SHLR2_COMPACT
- , SH_INSN_SHLR8_COMPACT, SH_INSN_SHLR16_COMPACT, SH_INSN_STC_GBR_COMPACT, SH_INSN_STCL_GBR_COMPACT
- , SH_INSN_STS_FPSCR_COMPACT, SH_INSN_STSL_FPSCR_COMPACT, SH_INSN_STS_FPUL_COMPACT, SH_INSN_STSL_FPUL_COMPACT
- , SH_INSN_STS_MACH_COMPACT, SH_INSN_STSL_MACH_COMPACT, SH_INSN_STS_MACL_COMPACT, SH_INSN_STSL_MACL_COMPACT
- , SH_INSN_STS_PR_COMPACT, SH_INSN_STSL_PR_COMPACT, SH_INSN_SUB_COMPACT, SH_INSN_SUBC_COMPACT
- , SH_INSN_SUBV_COMPACT, SH_INSN_SWAPB_COMPACT, SH_INSN_SWAPW_COMPACT, SH_INSN_TASB_COMPACT
- , SH_INSN_TRAPA_COMPACT, SH_INSN_TST_COMPACT, SH_INSN_TSTI_COMPACT, SH_INSN_TSTB_COMPACT
- , SH_INSN_XOR_COMPACT, SH_INSN_XORI_COMPACT, SH_INSN_XORB_COMPACT, SH_INSN_XTRCT_COMPACT
- , SH_INSN_ADD, SH_INSN_ADDL, SH_INSN_ADDI, SH_INSN_ADDIL
- , SH_INSN_ADDZL, SH_INSN_ALLOCO, SH_INSN_AND, SH_INSN_ANDC
- , SH_INSN_ANDI, SH_INSN_BEQ, SH_INSN_BEQI, SH_INSN_BGE
- , SH_INSN_BGEU, SH_INSN_BGT, SH_INSN_BGTU, SH_INSN_BLINK
- , SH_INSN_BNE, SH_INSN_BNEI, SH_INSN_BRK, SH_INSN_BYTEREV
- , SH_INSN_CMPEQ, SH_INSN_CMPGT, SH_INSN_CMPGTU, SH_INSN_CMVEQ
- , SH_INSN_CMVNE, SH_INSN_FABSD, SH_INSN_FABSS, SH_INSN_FADDD
- , SH_INSN_FADDS, SH_INSN_FCMPEQD, SH_INSN_FCMPEQS, SH_INSN_FCMPGED
- , SH_INSN_FCMPGES, SH_INSN_FCMPGTD, SH_INSN_FCMPGTS, SH_INSN_FCMPUND
- , SH_INSN_FCMPUNS, SH_INSN_FCNVDS, SH_INSN_FCNVSD, SH_INSN_FDIVD
- , SH_INSN_FDIVS, SH_INSN_FGETSCR, SH_INSN_FIPRS, SH_INSN_FLDD
- , SH_INSN_FLDP, SH_INSN_FLDS, SH_INSN_FLDXD, SH_INSN_FLDXP
- , SH_INSN_FLDXS, SH_INSN_FLOATLD, SH_INSN_FLOATLS, SH_INSN_FLOATQD
- , SH_INSN_FLOATQS, SH_INSN_FMACS, SH_INSN_FMOVD, SH_INSN_FMOVDQ
- , SH_INSN_FMOVLS, SH_INSN_FMOVQD, SH_INSN_FMOVS, SH_INSN_FMOVSL
- , SH_INSN_FMULD, SH_INSN_FMULS, SH_INSN_FNEGD, SH_INSN_FNEGS
- , SH_INSN_FPUTSCR, SH_INSN_FSQRTD, SH_INSN_FSQRTS, SH_INSN_FSTD
- , SH_INSN_FSTP, SH_INSN_FSTS, SH_INSN_FSTXD, SH_INSN_FSTXP
- , SH_INSN_FSTXS, SH_INSN_FSUBD, SH_INSN_FSUBS, SH_INSN_FTRCDL
- , SH_INSN_FTRCSL, SH_INSN_FTRCDQ, SH_INSN_FTRCSQ, SH_INSN_FTRVS
- , SH_INSN_GETCFG, SH_INSN_GETCON, SH_INSN_GETTR, SH_INSN_ICBI
- , SH_INSN_LDB, SH_INSN_LDL, SH_INSN_LDQ, SH_INSN_LDUB
- , SH_INSN_LDUW, SH_INSN_LDW, SH_INSN_LDHIL, SH_INSN_LDHIQ
- , SH_INSN_LDLOL, SH_INSN_LDLOQ, SH_INSN_LDXB, SH_INSN_LDXL
- , SH_INSN_LDXQ, SH_INSN_LDXUB, SH_INSN_LDXUW, SH_INSN_LDXW
- , SH_INSN_MABSL, SH_INSN_MABSW, SH_INSN_MADDL, SH_INSN_MADDW
- , SH_INSN_MADDSL, SH_INSN_MADDSUB, SH_INSN_MADDSW, SH_INSN_MCMPEQB
- , SH_INSN_MCMPEQL, SH_INSN_MCMPEQW, SH_INSN_MCMPGTL, SH_INSN_MCMPGTUB
- , SH_INSN_MCMPGTW, SH_INSN_MCMV, SH_INSN_MCNVSLW, SH_INSN_MCNVSWB
- , SH_INSN_MCNVSWUB, SH_INSN_MEXTR1, SH_INSN_MEXTR2, SH_INSN_MEXTR3
- , SH_INSN_MEXTR4, SH_INSN_MEXTR5, SH_INSN_MEXTR6, SH_INSN_MEXTR7
- , SH_INSN_MMACFXWL, SH_INSN_MMACNFX_WL, SH_INSN_MMULL, SH_INSN_MMULW
- , SH_INSN_MMULFXL, SH_INSN_MMULFXW, SH_INSN_MMULFXRPW, SH_INSN_MMULHIWL
- , SH_INSN_MMULLOWL, SH_INSN_MMULSUMWQ, SH_INSN_MOVI, SH_INSN_MPERMW
- , SH_INSN_MSADUBQ, SH_INSN_MSHALDSL, SH_INSN_MSHALDSW, SH_INSN_MSHARDL
- , SH_INSN_MSHARDW, SH_INSN_MSHARDSQ, SH_INSN_MSHFHIB, SH_INSN_MSHFHIL
- , SH_INSN_MSHFHIW, SH_INSN_MSHFLOB, SH_INSN_MSHFLOL, SH_INSN_MSHFLOW
- , SH_INSN_MSHLLDL, SH_INSN_MSHLLDW, SH_INSN_MSHLRDL, SH_INSN_MSHLRDW
- , SH_INSN_MSUBL, SH_INSN_MSUBW, SH_INSN_MSUBSL, SH_INSN_MSUBSUB
- , SH_INSN_MSUBSW, SH_INSN_MULSL, SH_INSN_MULUL, SH_INSN_NOP
- , SH_INSN_NSB, SH_INSN_OCBI, SH_INSN_OCBP, SH_INSN_OCBWB
- , SH_INSN_OR, SH_INSN_ORI, SH_INSN_PREFI, SH_INSN_PTA
- , SH_INSN_PTABS, SH_INSN_PTB, SH_INSN_PTREL, SH_INSN_PUTCFG
- , SH_INSN_PUTCON, SH_INSN_RTE, SH_INSN_SHARD, SH_INSN_SHARDL
- , SH_INSN_SHARI, SH_INSN_SHARIL, SH_INSN_SHLLD, SH_INSN_SHLLDL
- , SH_INSN_SHLLI, SH_INSN_SHLLIL, SH_INSN_SHLRD, SH_INSN_SHLRDL
- , SH_INSN_SHLRI, SH_INSN_SHLRIL, SH_INSN_SHORI, SH_INSN_SLEEP
- , SH_INSN_STB, SH_INSN_STL, SH_INSN_STQ, SH_INSN_STW
- , SH_INSN_STHIL, SH_INSN_STHIQ, SH_INSN_STLOL, SH_INSN_STLOQ
- , SH_INSN_STXB, SH_INSN_STXL, SH_INSN_STXQ, SH_INSN_STXW
- , SH_INSN_SUB, SH_INSN_SUBL, SH_INSN_SWAPQ, SH_INSN_SYNCI
- , SH_INSN_SYNCO, SH_INSN_TRAPA, SH_INSN_XOR, SH_INSN_XORI
- , SH_INSN_MAX
-} CGEN_INSN_TYPE;
-
-/* Index of `invalid' insn place holder. */
-#define CGEN_INSN_INVALID SH_INSN_INVALID
-
-/* Total number of insns in table. */
-#define MAX_INSNS ((int) SH_INSN_MAX)
-
-/* This struct records data prior to insertion or after extraction. */
-struct cgen_fields
-{
- int length;
- long f_nil;
- long f_anyof;
- long f_op4;
- long f_op8;
- long f_op16;
- long f_sub4;
- long f_sub8;
- long f_sub10;
- long f_rn;
- long f_rm;
- long f_8_1;
- long f_disp8;
- long f_disp12;
- long f_imm8;
- long f_imm4;
- long f_imm4x2;
- long f_imm4x4;
- long f_imm8x2;
- long f_imm8x4;
- long f_dn;
- long f_dm;
- long f_vn;
- long f_vm;
- long f_xn;
- long f_xm;
- long f_op;
- long f_ext;
- long f_rsvd;
- long f_left;
- long f_right;
- long f_dest;
- long f_left_right;
- long f_tra;
- long f_trb;
- long f_likely;
- long f_25;
- long f_8_2;
- long f_imm6;
- long f_imm10;
- long f_imm16;
- long f_uimm6;
- long f_uimm16;
- long f_disp6;
- long f_disp6x32;
- long f_disp10;
- long f_disp10x8;
- long f_disp10x4;
- long f_disp10x2;
- long f_disp16;
-};
-
-#define CGEN_INIT_PARSE(od) \
-{\
-}
-#define CGEN_INIT_INSERT(od) \
-{\
-}
-#define CGEN_INIT_EXTRACT(od) \
-{\
-}
-#define CGEN_INIT_PRINT(od) \
-{\
-}
-
-
-#endif /* SH_OPC_H */
diff --git a/sim/sh64/sh64-sim.h b/sim/sh64/sh64-sim.h
deleted file mode 100644
index fc3ed7add09..00000000000
--- a/sim/sh64/sh64-sim.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/* collection of junk waiting time to sort out
- Copyright (C) 2000 Free Software Foundation, Inc.
- Contributed by Red Hat, Inc.
-
-This file is part of the GNU Simulators.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#ifndef SH64_SIM_H
-#define SH64_SIM_H
-
-#define GETTWI GETTSI
-#define SETTWI SETTSI
-
-
-enum {
- ISM_COMPACT, ISM_MEDIA
-};
-
-/* Hardware/device support. */
-extern device sh5_devices;
-
-/* FIXME: Temporary, until device support ready. */
-struct _device { int foo; };
-
-extern IDESC * sh64_idesc_media;
-extern IDESC * sh64_idesc_compact;
-
-/* Function prototypes from sh64.c. */
-
-BI sh64_endian (SIM_CPU *);
-VOID sh64_break (SIM_CPU *, PCADDR);
-VOID sh64_trapa (SIM_CPU *, DI, PCADDR);
-VOID sh64_compact_trapa (SIM_CPU *, UQI, PCADDR);
-
-SF sh64_fldi0 (SIM_CPU *);
-SF sh64_fldi1 (SIM_CPU *);
-DF sh64_fcnvsd (SIM_CPU *, SF);
-SF sh64_fcnvds (SIM_CPU *, DF);
-
-DF sh64_fabsd (SIM_CPU *, DF);
-SF sh64_fabss (SIM_CPU *, SF);
-DF sh64_faddd (SIM_CPU *, DF, DF);
-SF sh64_fadds (SIM_CPU *, SF, SF);
-DF sh64_fdivd (SIM_CPU *, DF, DF);
-SF sh64_fdivs (SIM_CPU *, SF, SF);
-DF sh64_floatld (SIM_CPU *, SF);
-SF sh64_floatls (SIM_CPU *, SF);
-DF sh64_floatqd (SIM_CPU *, DF);
-SF sh64_floatqs (SIM_CPU *, DF);
-SF sh64_fmacs(SIM_CPU *, SF, SF, SF);
-DF sh64_fmuld (SIM_CPU *, DF, DF);
-SF sh64_fmuls (SIM_CPU *, SF, SF);
-DF sh64_fnegd (SIM_CPU *, DF);
-SF sh64_fnegs (SIM_CPU *, SF);
-DF sh64_fsqrtd (SIM_CPU *, DF);
-SF sh64_fsqrts (SIM_CPU *, SF);
-DF sh64_fsubd (SIM_CPU *, DF, DF);
-SF sh64_fsubs (SIM_CPU *, SF, SF);
-SF sh64_ftrcdl (SIM_CPU *, DF);
-DF sh64_ftrcdq (SIM_CPU *, DF);
-SF sh64_ftrcsl (SIM_CPU *, SF);
-DF sh64_ftrcsq (SIM_CPU *, SF);
-VOID sh64_ftrvs (SIM_CPU *, unsigned, unsigned, unsigned);
-
-BI sh64_fcmpeqs (SIM_CPU *, SF, SF);
-BI sh64_fcmpeqd (SIM_CPU *, DF, DF);
-BI sh64_fcmpges (SIM_CPU *, SF, SF);
-BI sh64_fcmpged (SIM_CPU *, DF, DF);
-BI sh64_fcmpgts (SIM_CPU *, SF, SF);
-BI sh64_fcmpgtd (SIM_CPU *, DF, DF);
-BI sh64_fcmpund (SIM_CPU *, DF, DF);
-BI sh64_fcmpuns (SIM_CPU *, SF, SF);
-
-DI sh64_nsb (SIM_CPU *, DI);
-
-#endif /* SH64_SIM_H */
diff --git a/sim/sh64/sh64.c b/sim/sh64/sh64.c
deleted file mode 100644
index 12ce3f69a66..00000000000
--- a/sim/sh64/sh64.c
+++ /dev/null
@@ -1,1030 +0,0 @@
-/* SH5 simulator support code
- Copyright (C) 2000, 2001 Free Software Foundation, Inc.
- Contributed by Red Hat, Inc.
-
-This file is part of the GNU simulators.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#define WANT_CPU
-#define WANT_CPU_SH64
-
-#include "sim-main.h"
-#include "sim-fpu.h"
-#include "cgen-mem.h"
-#include "cgen-ops.h"
-
-#include "gdb/callback.h"
-#include "defs-compact.h"
-
-#include "bfd.h"
-/* From include/gdb/. */
-#include "gdb/sim-sh.h"
-
-#define SYS_exit 1
-#define SYS_read 3
-#define SYS_write 4
-#define SYS_open 5
-#define SYS_close 6
-#define SYS_lseek 19
-#define SYS_time 23
-#define SYS_argc 172
-#define SYS_argnlen 173
-#define SYS_argn 174
-
-IDESC * sh64_idesc_media;
-IDESC * sh64_idesc_compact;
-
-BI
-sh64_endian (SIM_CPU *current_cpu)
-{
- return (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN);
-}
-
-SF
-sh64_fldi0 (SIM_CPU *current_cpu)
-{
- SF result;
- sim_fpu_to32 (&result, &sim_fpu_zero);
- return result;
-}
-
-SF
-sh64_fldi1 (SIM_CPU *current_cpu)
-{
- SF result;
- sim_fpu_to32 (&result, &sim_fpu_one);
- return result;
-}
-
-DF
-sh64_fabsd(SIM_CPU *current_cpu, DF drgh)
-{
- DF result;
- sim_fpu f, fres;
-
- sim_fpu_64to (&f, drgh);
- sim_fpu_abs (&fres, &f);
- sim_fpu_to64 (&result, &fres);
- return result;
-}
-
-SF
-sh64_fabss(SIM_CPU *current_cpu, SF frgh)
-{
- SF result;
- sim_fpu f, fres;
-
- sim_fpu_32to (&f, frgh);
- sim_fpu_abs (&fres, &f);
- sim_fpu_to32 (&result, &fres);
- return result;
-}
-
-DF
-sh64_faddd(SIM_CPU *current_cpu, DF drg, DF drh)
-{
- DF result;
- sim_fpu f1, f2, fres;
-
- sim_fpu_64to (&f1, drg);
- sim_fpu_64to (&f2, drh);
- sim_fpu_add (&fres, &f1, &f2);
- sim_fpu_to64 (&result, &fres);
- return result;
-}
-
-SF
-sh64_fadds(SIM_CPU *current_cpu, SF frg, SF frh)
-{
- SF result;
- sim_fpu f1, f2, fres;
-
- sim_fpu_32to (&f1, frg);
- sim_fpu_32to (&f2, frh);
- sim_fpu_add (&fres, &f1, &f2);
- sim_fpu_to32 (&result, &fres);
- return result;
-}
-
-BI
-sh64_fcmpeqd(SIM_CPU *current_cpu, DF drg, DF drh)
-{
- sim_fpu f1, f2;
-
- sim_fpu_64to (&f1, drg);
- sim_fpu_64to (&f2, drh);
- return sim_fpu_is_eq (&f1, &f2);
-}
-
-BI
-sh64_fcmpeqs(SIM_CPU *current_cpu, SF frg, SF frh)
-{
- sim_fpu f1, f2;
-
- sim_fpu_32to (&f1, frg);
- sim_fpu_32to (&f2, frh);
- return sim_fpu_is_eq (&f1, &f2);
-}
-
-BI
-sh64_fcmpged(SIM_CPU *current_cpu, DF drg, DF drh)
-{
- sim_fpu f1, f2;
-
- sim_fpu_64to (&f1, drg);
- sim_fpu_64to (&f2, drh);
- return sim_fpu_is_ge (&f1, &f2);
-}
-
-BI
-sh64_fcmpges(SIM_CPU *current_cpu, SF frg, SF frh)
-{
- sim_fpu f1, f2;
-
- sim_fpu_32to (&f1, frg);
- sim_fpu_32to (&f2, frh);
- return sim_fpu_is_ge (&f1, &f2);
-}
-
-BI
-sh64_fcmpgtd(SIM_CPU *current_cpu, DF drg, DF drh)
-{
- sim_fpu f1, f2;
-
- sim_fpu_64to (&f1, drg);
- sim_fpu_64to (&f2, drh);
- return sim_fpu_is_gt (&f1, &f2);
-}
-
-BI
-sh64_fcmpgts(SIM_CPU *current_cpu, SF frg, SF frh)
-{
- sim_fpu f1, f2;
-
- sim_fpu_32to (&f1, frg);
- sim_fpu_32to (&f2, frh);
- return sim_fpu_is_gt (&f1, &f2);
-}
-
-BI
-sh64_fcmpund(SIM_CPU *current_cpu, DF drg, DF drh)
-{
- sim_fpu f1, f2;
-
- sim_fpu_64to (&f1, drg);
- sim_fpu_64to (&f2, drh);
- return (sim_fpu_is_nan (&f1) || sim_fpu_is_nan (&f2));
-}
-
-BI
-sh64_fcmpuns(SIM_CPU *current_cpu, SF frg, SF frh)
-{
- sim_fpu f1, f2;
-
- sim_fpu_32to (&f1, frg);
- sim_fpu_32to (&f2, frh);
- return (sim_fpu_is_nan (&f1) || sim_fpu_is_nan (&f2));
-}
-
-SF
-sh64_fcnvds(SIM_CPU *current_cpu, DF drgh)
-{
- union {
- unsigned long long ll;
- double d;
- } f1;
-
- union {
- unsigned long l;
- float f;
- } f2;
-
- f1.ll = drgh;
- f2.f = (float) f1.d;
-
- return (SF) f2.l;
-}
-
-DF
-sh64_fcnvsd(SIM_CPU *current_cpu, SF frgh)
-{
- DF result;
- sim_fpu f;
-
- sim_fpu_32to (&f, frgh);
- sim_fpu_to64 (&result, &f);
- return result;
-}
-
-DF
-sh64_fdivd(SIM_CPU *current_cpu, DF drg, DF drh)
-{
- DF result;
- sim_fpu f1, f2, fres;
-
- sim_fpu_64to (&f1, drg);
- sim_fpu_64to (&f2, drh);
- sim_fpu_div (&fres, &f1, &f2);
- sim_fpu_to64 (&result, &fres);
- return result;
-}
-
-SF
-sh64_fdivs(SIM_CPU *current_cpu, SF frg, SF frh)
-{
- SF result;
- sim_fpu f1, f2, fres;
-
- sim_fpu_32to (&f1, frg);
- sim_fpu_32to (&f2, frh);
- sim_fpu_div (&fres, &f1, &f2);
- sim_fpu_to32 (&result, &fres);
- return result;
-}
-
-DF
-sh64_floatld(SIM_CPU *current_cpu, SF frgh)
-{
- DF result;
- sim_fpu f;
-
- sim_fpu_i32to (&f, frgh, sim_fpu_round_default);
- sim_fpu_to64 (&result, &f);
- return result;
-}
-
-SF
-sh64_floatls(SIM_CPU *current_cpu, SF frgh)
-{
- SF result;
- sim_fpu f;
-
- sim_fpu_i32to (&f, frgh, sim_fpu_round_default);
- sim_fpu_to32 (&result, &f);
- return result;
-}
-
-DF
-sh64_floatqd(SIM_CPU *current_cpu, DF drgh)
-{
- DF result;
- sim_fpu f;
-
- sim_fpu_i64to (&f, drgh, sim_fpu_round_default);
- sim_fpu_to64 (&result, &f);
- return result;
-}
-
-SF
-sh64_floatqs(SIM_CPU *current_cpu, DF drgh)
-{
- SF result;
- sim_fpu f;
-
- sim_fpu_i64to (&f, drgh, sim_fpu_round_default);
- sim_fpu_to32 (&result, &f);
- return result;
-}
-
-SF
-sh64_fmacs(SIM_CPU *current_cpu, SF fr0, SF frm, SF frn)
-{
- SF result;
- sim_fpu m1, m2, a1, fres;
-
- sim_fpu_32to (&m1, fr0);
- sim_fpu_32to (&m2, frm);
- sim_fpu_32to (&a1, frn);
-
- sim_fpu_mul (&fres, &m1, &m2);
- sim_fpu_add (&fres, &fres, &a1);
-
- sim_fpu_to32 (&result, &fres);
- return result;
-}
-
-DF
-sh64_fmuld(SIM_CPU *current_cpu, DF drg, DF drh)
-{
- DF result;
- sim_fpu f1, f2, fres;
-
- sim_fpu_64to (&f1, drg);
- sim_fpu_64to (&f2, drh);
- sim_fpu_mul (&fres, &f1, &f2);
- sim_fpu_to64 (&result, &fres);
- return result;
-}
-
-SF
-sh64_fmuls(SIM_CPU *current_cpu, SF frg, SF frh)
-{
- SF result;
- sim_fpu f1, f2, fres;
-
- sim_fpu_32to (&f1, frg);
- sim_fpu_32to (&f2, frh);
- sim_fpu_mul (&fres, &f1, &f2);
- sim_fpu_to32 (&result, &fres);
- return result;
-}
-
-DF
-sh64_fnegd(SIM_CPU *current_cpu, DF drgh)
-{
- DF result;
- sim_fpu f1, f2;
-
- sim_fpu_64to (&f1, drgh);
- sim_fpu_neg (&f2, &f1);
- sim_fpu_to64 (&result, &f2);
- return result;
-}
-
-SF
-sh64_fnegs(SIM_CPU *current_cpu, SF frgh)
-{
- SF result;
- sim_fpu f, fres;
-
- sim_fpu_32to (&f, frgh);
- sim_fpu_neg (&fres, &f);
- sim_fpu_to32 (&result, &fres);
- return result;
-}
-
-DF
-sh64_fsqrtd(SIM_CPU *current_cpu, DF drgh)
-{
- DF result;
- sim_fpu f, fres;
-
- sim_fpu_64to (&f, drgh);
- sim_fpu_sqrt (&fres, &f);
- sim_fpu_to64 (&result, &fres);
- return result;
-}
-
-SF
-sh64_fsqrts(SIM_CPU *current_cpu, SF frgh)
-{
- SF result;
- sim_fpu f, fres;
-
- sim_fpu_32to (&f, frgh);
- sim_fpu_sqrt (&fres, &f);
- sim_fpu_to32 (&result, &fres);
- return result;
-}
-
-DF
-sh64_fsubd(SIM_CPU *current_cpu, DF drg, DF drh)
-{
- DF result;
- sim_fpu f1, f2, fres;
-
- sim_fpu_64to (&f1, drg);
- sim_fpu_64to (&f2, drh);
- sim_fpu_sub (&fres, &f1, &f2);
- sim_fpu_to64 (&result, &fres);
- return result;
-}
-
-SF
-sh64_fsubs(SIM_CPU *current_cpu, SF frg, SF frh)
-{
- SF result;
- sim_fpu f1, f2, fres;
-
- sim_fpu_32to (&f1, frg);
- sim_fpu_32to (&f2, frh);
- sim_fpu_sub (&fres, &f1, &f2);
- sim_fpu_to32 (&result, &fres);
- return result;
-}
-
-SF
-sh64_ftrcdl(SIM_CPU *current_cpu, DF drgh)
-{
- SI result;
- sim_fpu f;
-
- sim_fpu_64to (&f, drgh);
- sim_fpu_to32i (&result, &f, sim_fpu_round_zero);
- return (SF) result;
-}
-
-SF
-sh64_ftrcsl(SIM_CPU *current_cpu, SF frgh)
-{
- SI result;
- sim_fpu f;
-
- sim_fpu_32to (&f, frgh);
- sim_fpu_to32i (&result, &f, sim_fpu_round_zero);
- return (SF) result;
-}
-
-DF
-sh64_ftrcdq(SIM_CPU *current_cpu, DF drgh)
-{
- DI result;
- sim_fpu f;
-
- sim_fpu_64to (&f, drgh);
- sim_fpu_to64i (&result, &f, sim_fpu_round_zero);
- return (DF) result;
-}
-
-DF
-sh64_ftrcsq(SIM_CPU *current_cpu, SF frgh)
-{
- DI result;
- sim_fpu f;
-
- sim_fpu_32to (&f, frgh);
- sim_fpu_to64i (&result, &f, sim_fpu_round_zero);
- return (DF) result;
-}
-
-void
-sh64_ftrvs(SIM_CPU *cpu, unsigned g, unsigned h, unsigned f)
-{
- int i, j;
-
- for (i = 0; i < 4; i++)
- {
- SF result;
- sim_fpu sum;
- sim_fpu_32to (&sum, 0);
-
- for (j = 0; j < 4; j++)
- {
- sim_fpu f1, f2, temp;
- sim_fpu_32to (&f1, sh64_h_fr_get (cpu, (g + i) + (j * 4)));
- sim_fpu_32to (&f2, sh64_h_fr_get (cpu, h + j));
- sim_fpu_mul (&temp, &f1, &f2);
- sim_fpu_add (&sum, &sum, &temp);
- }
- sim_fpu_to32 (&result, &sum);
- sh64_h_fr_set (cpu, f + i, result);
- }
-}
-
-/* Count the number of arguments. */
-static int
-count_argc (cpu)
- SIM_CPU *cpu;
-{
- int i = 0;
-
- if (! STATE_PROG_ARGV (CPU_STATE (cpu)))
- return -1;
-
- while (STATE_PROG_ARGV (CPU_STATE (cpu)) [i] != NULL)
- ++i;
-
- return i;
-}
-
-/* Read a null terminated string from memory, return in a buffer */
-static char *
-fetch_str (current_cpu, pc, addr)
- SIM_CPU *current_cpu;
- PCADDR pc;
- DI addr;
-{
- char *buf;
- int nr = 0;
- while (sim_core_read_1 (current_cpu,
- pc, read_map, addr + nr) != 0)
- nr++;
- buf = NZALLOC (char, nr + 1);
- sim_read (CPU_STATE (current_cpu), addr, buf, nr);
- return buf;
-}
-
-static void
-trap_handler (SIM_CPU *current_cpu, int shmedia_abi_p, UQI trapnum, PCADDR pc)
-{
- char ch;
- switch (trapnum)
- {
- case 1:
- ch = GET_H_GRC (0);
- sim_io_write_stdout (CPU_STATE (current_cpu), &ch, 1);
- fflush (stdout);
- break;
- case 2:
- sim_engine_halt (CPU_STATE (current_cpu), current_cpu, NULL, pc, sim_stopped, SIM_SIGTRAP);
- break;
- case 34:
- {
- int i;
- int ret_reg = (shmedia_abi_p) ? 2 : 0;
- char *buf;
- DI PARM1 = GET_H_GR ((shmedia_abi_p) ? 3 : 5);
- DI PARM2 = GET_H_GR ((shmedia_abi_p) ? 4 : 6);
- DI PARM3 = GET_H_GR ((shmedia_abi_p) ? 5 : 7);
-
- switch (GET_H_GR ((shmedia_abi_p) ? 2 : 4))
- {
- case SYS_write:
- buf = zalloc (PARM3);
- sim_read (CPU_STATE (current_cpu), PARM2, buf, PARM3);
- SET_H_GR (ret_reg,
- sim_io_write (CPU_STATE (current_cpu),
- PARM1, buf, PARM3));
- zfree (buf);
- break;
-
- case SYS_lseek:
- SET_H_GR (ret_reg,
- sim_io_lseek (CPU_STATE (current_cpu),
- PARM1, PARM2, PARM3));
- break;
-
- case SYS_exit:
- sim_engine_halt (CPU_STATE (current_cpu), current_cpu,
- NULL, pc, sim_exited, PARM1);
- break;
-
- case SYS_read:
- buf = zalloc (PARM3);
- SET_H_GR (ret_reg,
- sim_io_read (CPU_STATE (current_cpu),
- PARM1, buf, PARM3));
- sim_write (CPU_STATE (current_cpu), PARM2, buf, PARM3);
- zfree (buf);
- break;
-
- case SYS_open:
- buf = fetch_str (current_cpu, pc, PARM1);
- SET_H_GR (ret_reg,
- sim_io_open (CPU_STATE (current_cpu),
- buf, PARM2));
- zfree (buf);
- break;
-
- case SYS_close:
- SET_H_GR (ret_reg,
- sim_io_close (CPU_STATE (current_cpu), PARM1));
- break;
-
- case SYS_time:
- SET_H_GR (ret_reg, time (0));
- break;
-
- case SYS_argc:
- SET_H_GR (ret_reg, count_argc (current_cpu));
- break;
-
- case SYS_argnlen:
- if (PARM1 < count_argc (current_cpu))
- SET_H_GR (ret_reg,
- strlen (STATE_PROG_ARGV (CPU_STATE (current_cpu)) [PARM1]));
- else
- SET_H_GR (ret_reg, -1);
- break;
-
- case SYS_argn:
- if (PARM1 < count_argc (current_cpu))
- {
- /* Include the NULL byte. */
- i = strlen (STATE_PROG_ARGV (CPU_STATE (current_cpu)) [PARM1]) + 1;
- sim_write (CPU_STATE (current_cpu),
- PARM2,
- STATE_PROG_ARGV (CPU_STATE (current_cpu)) [PARM1],
- i);
-
- /* Just for good measure. */
- SET_H_GR (ret_reg, i);
- break;
- }
- else
- SET_H_GR (ret_reg, -1);
- break;
-
- default:
- SET_H_GR (ret_reg, -1);
- }
- }
- break;
- case 253:
- puts ("pass");
- exit (0);
- case 254:
- puts ("fail");
- exit (1);
- case 0xc3:
- /* fall through. */
- case 255:
- sim_engine_halt (CPU_STATE (current_cpu), current_cpu, NULL, pc, sim_stopped, SIM_SIGTRAP);
- break;
- }
-}
-
-void
-sh64_trapa (SIM_CPU *current_cpu, DI rm, PCADDR pc)
-{
- trap_handler (current_cpu, 1, (UQI) rm & 0xff, pc);
-}
-
-void
-sh64_compact_trapa (SIM_CPU *current_cpu, UQI trapnum, PCADDR pc)
-{
- int mach_sh5_p;
-
- /* If this is an SH5 executable, this is SHcompact code running in
- the SHmedia ABI. */
-
- mach_sh5_p =
- (bfd_get_mach (STATE_PROG_BFD (CPU_STATE (current_cpu))) == bfd_mach_sh5);
-
- trap_handler (current_cpu, mach_sh5_p, trapnum, pc);
-}
-
-DI
-sh64_nsb (SIM_CPU *current_cpu, DI rm)
-{
- int result = 0, count;
- UDI source = (UDI) rm;
-
- if ((source >> 63))
- source = ~source;
- source <<= 1;
-
- for (count = 32; count; count >>= 1)
- {
- UDI newval = source << count;
-
- if ((newval >> count) == source)
- {
- result |= count;
- source = newval;
- }
- }
-
- return result;
-}
-
-void
-sh64_break (SIM_CPU *current_cpu, PCADDR pc)
-{
- SIM_DESC sd = CPU_STATE (current_cpu);
- sim_engine_halt (sd, current_cpu, NULL, pc, sim_stopped, SIM_SIGTRAP);
-}
-
-void
-set_isa (SIM_CPU *current_cpu, int mode)
-{
- /* Do nothing. */
-}
-
-/* The semantic code invokes this for invalid (unrecognized) instructions. */
-
-SEM_PC
-sim_engine_invalid_insn (SIM_CPU *current_cpu, IADDR cia, SEM_PC vpc)
-{
- SIM_DESC sd = CPU_STATE (current_cpu);
- sim_engine_halt (sd, current_cpu, NULL, cia, sim_stopped, SIM_SIGILL);
-
- return vpc;
-}
-
-
-/* Process an address exception. */
-
-void
-sh64_core_signal (SIM_DESC sd, SIM_CPU *current_cpu, sim_cia cia,
- unsigned int map, int nr_bytes, address_word addr,
- transfer_type transfer, sim_core_signals sig)
-{
- sim_core_signal (sd, current_cpu, cia, map, nr_bytes, addr,
- transfer, sig);
-}
-
-
-/* Initialize cycle counting for an insn.
- FIRST_P is non-zero if this is the first insn in a set of parallel
- insns. */
-
-void
-sh64_compact_model_insn_before (SIM_CPU *cpu, int first_p)
-{
- /* Do nothing. */
-}
-
-void
-sh64_media_model_insn_before (SIM_CPU *cpu, int first_p)
-{
- /* Do nothing. */
-}
-
-/* Record the cycles computed for an insn.
- LAST_P is non-zero if this is the last insn in a set of parallel insns,
- and we update the total cycle count.
- CYCLES is the cycle count of the insn. */
-
-void
-sh64_compact_model_insn_after(SIM_CPU *cpu, int last_p, int cycles)
-{
- /* Do nothing. */
-}
-
-void
-sh64_media_model_insn_after(SIM_CPU *cpu, int last_p, int cycles)
-{
- /* Do nothing. */
-}
-
-int
-sh64_fetch_register (SIM_CPU *cpu, int nr, unsigned char *buf, int len)
-{
- /* Fetch general purpose registers. */
- if (nr >= SIM_SH64_R0_REGNUM
- && nr < (SIM_SH64_R0_REGNUM + SIM_SH64_NR_R_REGS)
- && len == 8)
- {
- *((unsigned64*) buf) =
- H2T_8 (sh64_h_gr_get (cpu, nr - SIM_SH64_R0_REGNUM));
- return len;
- }
-
- /* Fetch PC. */
- if (nr == SIM_SH64_PC_REGNUM && len == 8)
- {
- *((unsigned64*) buf) = H2T_8 (sh64_h_pc_get (cpu) | sh64_h_ism_get (cpu));
- return len;
- }
-
- /* Fetch status register (SR). */
- if (nr == SIM_SH64_SR_REGNUM && len == 8)
- {
- *((unsigned64*) buf) = H2T_8 (sh64_h_sr_get (cpu));
- return len;
- }
-
- /* Fetch saved status register (SSR) and PC (SPC). */
- if ((nr == SIM_SH64_SSR_REGNUM || nr == SIM_SH64_SPC_REGNUM)
- && len == 8)
- {
- *((unsigned64*) buf) = 0;
- return len;
- }
-
- /* Fetch target registers. */
- if (nr >= SIM_SH64_TR0_REGNUM
- && nr < (SIM_SH64_TR0_REGNUM + SIM_SH64_NR_TR_REGS)
- && len == 8)
- {
- *((unsigned64*) buf) =
- H2T_8 (sh64_h_tr_get (cpu, nr - SIM_SH64_TR0_REGNUM));
- return len;
- }
-
- /* Fetch floating point registers. */
- if (nr >= SIM_SH64_FR0_REGNUM
- && nr < (SIM_SH64_FR0_REGNUM + SIM_SH64_NR_FP_REGS)
- && len == 4)
- {
- *((unsigned32*) buf) =
- H2T_4 (sh64_h_fr_get (cpu, nr - SIM_SH64_FR0_REGNUM));
- return len;
- }
-
- /* We should never get here. */
- return 0;
-}
-
-int
-sh64_store_register (SIM_CPU *cpu, int nr, unsigned char *buf, int len)
-{
- /* Store general purpose registers. */
- if (nr >= SIM_SH64_R0_REGNUM
- && nr < (SIM_SH64_R0_REGNUM + SIM_SH64_NR_R_REGS)
- && len == 8)
- {
- sh64_h_gr_set (cpu, nr - SIM_SH64_R0_REGNUM, T2H_8 (*((unsigned64*)buf)));
- return len;
- }
-
- /* Store PC. */
- if (nr == SIM_SH64_PC_REGNUM && len == 8)
- {
- unsigned64 new_pc = T2H_8 (*((unsigned64*)buf));
- sh64_h_pc_set (cpu, new_pc);
- return len;
- }
-
- /* Store status register (SR). */
- if (nr == SIM_SH64_SR_REGNUM && len == 8)
- {
- sh64_h_sr_set (cpu, T2H_8 (*((unsigned64*)buf)));
- return len;
- }
-
- /* Store saved status register (SSR) and PC (SPC). */
- if (nr == SIM_SH64_SSR_REGNUM || nr == SIM_SH64_SPC_REGNUM)
- {
- /* Do nothing. */
- return len;
- }
-
- /* Store target registers. */
- if (nr >= SIM_SH64_TR0_REGNUM
- && nr < (SIM_SH64_TR0_REGNUM + SIM_SH64_NR_TR_REGS)
- && len == 8)
- {
- sh64_h_tr_set (cpu, nr - SIM_SH64_TR0_REGNUM, T2H_8 (*((unsigned64*)buf)));
- return len;
- }
-
- /* Store floating point registers. */
- if (nr >= SIM_SH64_FR0_REGNUM
- && nr < (SIM_SH64_FR0_REGNUM + SIM_SH64_NR_FP_REGS)
- && len == 4)
- {
- sh64_h_fr_set (cpu, nr - SIM_SH64_FR0_REGNUM, T2H_4 (*((unsigned32*)buf)));
- return len;
- }
-
- /* We should never get here. */
- return 0;
-}
-
-void
-sh64_engine_run_full(SIM_CPU *cpu)
-{
- if (sh64_h_ism_get (cpu) == ISM_MEDIA)
- {
- if (!sh64_idesc_media)
- {
- sh64_media_init_idesc_table (cpu);
- sh64_idesc_media = CPU_IDESC (cpu);
- }
- else
- CPU_IDESC (cpu) = sh64_idesc_media;
- sh64_media_engine_run_full (cpu);
- }
- else
- {
- if (!sh64_idesc_compact)
- {
- sh64_compact_init_idesc_table (cpu);
- sh64_idesc_compact = CPU_IDESC (cpu);
- }
- else
- CPU_IDESC (cpu) = sh64_idesc_compact;
- sh64_compact_engine_run_full (cpu);
- }
-}
-
-void
-sh64_engine_run_fast (SIM_CPU *cpu)
-{
- if (sh64_h_ism_get (cpu) == ISM_MEDIA)
- {
- if (!sh64_idesc_media)
- {
- sh64_media_init_idesc_table (cpu);
- sh64_idesc_media = CPU_IDESC (cpu);
- }
- else
- CPU_IDESC (cpu) = sh64_idesc_media;
- sh64_media_engine_run_fast (cpu);
- }
- else
- {
- if (!sh64_idesc_compact)
- {
- sh64_compact_init_idesc_table (cpu);
- sh64_idesc_compact = CPU_IDESC (cpu);
- }
- else
- CPU_IDESC (cpu) = sh64_idesc_compact;
- sh64_compact_engine_run_fast (cpu);
- }
-}
-
-static void
-sh64_prepare_run (SIM_CPU *cpu)
-{
- /* Nothing. */
-}
-
-static const CGEN_INSN *
-sh64_get_idata (SIM_CPU *cpu, int inum)
-{
- return CPU_IDESC (cpu) [inum].idata;
-}
-
-static void
-sh64_init_cpu (SIM_CPU *cpu)
-{
- CPU_REG_FETCH (cpu) = sh64_fetch_register;
- CPU_REG_STORE (cpu) = sh64_store_register;
- CPU_PC_FETCH (cpu) = sh64_h_pc_get;
- CPU_PC_STORE (cpu) = sh64_h_pc_set;
- CPU_GET_IDATA (cpu) = sh64_get_idata;
- /* Only used by profiling. 0 disables it. */
- CPU_MAX_INSNS (cpu) = 0;
- CPU_INSN_NAME (cpu) = cgen_insn_name;
- CPU_FULL_ENGINE_FN (cpu) = sh64_engine_run_full;
-#if WITH_FAST
- CPU_FAST_ENGINE_FN (cpu) = sh64_engine_run_fast;
-#else
- CPU_FAST_ENGINE_FN (cpu) = sh64_engine_run_full;
-#endif
-}
-
-static void
-shmedia_init_cpu (SIM_CPU *cpu)
-{
- sh64_init_cpu (cpu);
-}
-
-static void
-shcompact_init_cpu (SIM_CPU *cpu)
-{
- sh64_init_cpu (cpu);
-}
-
-static void
-sh64_model_init()
-{
- /* Do nothing. */
-}
-
-static const MODEL sh_models [] =
-{
- { "sh2", & sh2_mach, MODEL_SH5, NULL, sh64_model_init },
- { "sh3", & sh3_mach, MODEL_SH5, NULL, sh64_model_init },
- { "sh3e", & sh3_mach, MODEL_SH5, NULL, sh64_model_init },
- { "sh4", & sh4_mach, MODEL_SH5, NULL, sh64_model_init },
- { "sh5", & sh5_mach, MODEL_SH5, NULL, sh64_model_init },
- { 0 }
-};
-
-static const MACH_IMP_PROPERTIES sh5_imp_properties =
-{
- sizeof (SIM_CPU),
-#if WITH_SCACHE
- sizeof (SCACHE)
-#else
- 0
-#endif
-};
-
-const MACH sh2_mach =
-{
- "sh2", "sh2", MACH_SH5,
- 16, 16, &sh_models[0], &sh5_imp_properties,
- shcompact_init_cpu,
- sh64_prepare_run
-};
-
-const MACH sh3_mach =
-{
- "sh3", "sh3", MACH_SH5,
- 16, 16, &sh_models[1], &sh5_imp_properties,
- shcompact_init_cpu,
- sh64_prepare_run
-};
-
-const MACH sh3e_mach =
-{
- "sh3e", "sh3e", MACH_SH5,
- 16, 16, &sh_models[2], &sh5_imp_properties,
- shcompact_init_cpu,
- sh64_prepare_run
-};
-
-const MACH sh4_mach =
-{
- "sh4", "sh4", MACH_SH5,
- 16, 16, &sh_models[3], &sh5_imp_properties,
- shcompact_init_cpu,
- sh64_prepare_run
-};
-
-const MACH sh5_mach =
-{
- "sh5", "sh5", MACH_SH5,
- 32, 32, &sh_models[4], &sh5_imp_properties,
- shmedia_init_cpu,
- sh64_prepare_run
-};
diff --git a/sim/sh64/sim-if.c b/sim/sh64/sim-if.c
deleted file mode 100644
index f34ff29065e..00000000000
--- a/sim/sh64/sim-if.c
+++ /dev/null
@@ -1,236 +0,0 @@
-/* Main simulator entry points specific to the SH5.
- Copyright (C) 2000 Free Software Foundation, Inc.
- Contributed by Cygnus Solutions.
-
-This file is part of the GNU simulators.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "libiberty.h"
-#include "bfd.h"
-#include "sim-main.h"
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#include "sim-options.h"
-#include "dis-asm.h"
-
-static void free_state (SIM_DESC);
-
-/* Since we don't build the cgen-opcode table, we use a wrapper around
- the existing disassembler from libopcodes. */
-static CGEN_DISASSEMBLER sh64_disassemble_insn;
-
-/* Records simulator descriptor so utilities like sh5_dump_regs can be
- called from gdb. */
-SIM_DESC current_state;
-
-/* Cover function of sim_state_free to free the cpu buffers as well. */
-
-static void
-free_state (SIM_DESC sd)
-{
- if (STATE_MODULES (sd) != NULL)
- sim_module_uninstall (sd);
- sim_cpu_free_all (sd);
- sim_state_free (sd);
-}
-
-/* Create an instance of the simulator. */
-
-SIM_DESC
-sim_open (kind, callback, abfd, argv)
- SIM_OPEN_KIND kind;
- host_callback *callback;
- struct bfd *abfd;
- char **argv;
-{
- char c;
- int i;
- SIM_DESC sd = sim_state_alloc (kind, callback);
-
- /* The cpu data is kept in a separately allocated chunk of memory. */
- if (sim_cpu_alloc_all (sd, 1, cgen_cpu_max_extra_bytes ()) != SIM_RC_OK)
- {
- free_state (sd);
- return 0;
- }
-
-#if 0 /* FIXME: pc is in mach-specific struct */
- /* FIXME: watchpoints code shouldn't need this */
- {
- SIM_CPU *current_cpu = STATE_CPU (sd, 0);
- STATE_WATCHPOINTS (sd)->pc = &(PC);
- STATE_WATCHPOINTS (sd)->sizeof_pc = sizeof (PC);
- }
-#endif
-
- if (sim_pre_argv_init (sd, argv[0]) != SIM_RC_OK)
- {
- free_state (sd);
- return 0;
- }
-
-#if 0 /* FIXME: 'twould be nice if we could do this */
- /* These options override any module options.
- Obviously ambiguity should be avoided, however the caller may wish to
- augment the meaning of an option. */
- if (extra_options != NULL)
- sim_add_option_table (sd, extra_options);
-#endif
-
- /* getopt will print the error message so we just have to exit if this fails.
- FIXME: Hmmm... in the case of gdb we need getopt to call
- print_filtered. */
- if (sim_parse_args (sd, argv) != SIM_RC_OK)
- {
- free_state (sd);
- return 0;
- }
-
- /* Allocate core managed memory if none specified by user.
- Use address 4 here in case the user wanted address 0 unmapped. */
- if (sim_core_read_buffer (sd, NULL, read_map, &c, 4, 1) == 0)
- sim_do_commandf (sd, "memory region 0,0x%x", SH64_DEFAULT_MEM_SIZE);
-
- /* Add a small memory region way up in the address space to handle
- writes to invalidate an instruction cache line. This is used for
- trampolines. Since we don't simulate the cache, this memory just
- avoids bus errors. 64K ought to do. */
- sim_do_command (sd," memory region 0xf0000000,0x10000");
-
- /* check for/establish the reference program image */
- if (sim_analyze_program (sd,
- (STATE_PROG_ARGV (sd) != NULL
- ? *STATE_PROG_ARGV (sd)
- : NULL),
- abfd) != SIM_RC_OK)
- {
- free_state (sd);
- return 0;
- }
-
- /* Establish any remaining configuration options. */
- if (sim_config (sd) != SIM_RC_OK)
- {
- free_state (sd);
- return 0;
- }
-
- if (sim_post_argv_init (sd) != SIM_RC_OK)
- {
- free_state (sd);
- return 0;
- }
-
- /* Open a copy of the cpu descriptor table. */
- {
- CGEN_CPU_DESC cd = sh_cgen_cpu_open_1 (STATE_ARCHITECTURE (sd)->printable_name,
- CGEN_ENDIAN_BIG);
-
- for (i = 0; i < MAX_NR_PROCESSORS; ++i)
- {
- SIM_CPU *cpu = STATE_CPU (sd, i);
- CPU_CPU_DESC (cpu) = cd;
- CPU_DISASSEMBLER (cpu) = sh64_disassemble_insn;
- }
- }
-
- /* Clear idesc table pointers for good measure. */
- sh64_idesc_media = sh64_idesc_compact = NULL;
-
- /* Initialize various cgen things not done by common framework.
- Must be done after sh_cgen_cpu_open. */
- cgen_init (sd);
-
- /* Store in a global so things like sparc32_dump_regs can be invoked
- from the gdb command line. */
- current_state = sd;
-
- return sd;
-}
-
-void
-sim_close (sd, quitting)
- SIM_DESC sd;
- int quitting;
-{
- sh_cgen_cpu_close (CPU_CPU_DESC (STATE_CPU (sd, 0)));
- sim_module_uninstall (sd);
-}
-
-SIM_RC
-sim_create_inferior (sd, abfd, argv, envp)
- SIM_DESC sd;
- struct bfd *abfd;
- char **argv;
- char **envp;
-{
- SIM_CPU *current_cpu = STATE_CPU (sd, 0);
- SIM_ADDR addr;
-
- if (abfd != NULL)
- addr = bfd_get_start_address (abfd);
- else
- addr = 0;
- sim_pc_set (current_cpu, addr);
-
-#if 0
- STATE_ARGV (sd) = sim_copy_argv (argv);
- STATE_ENVP (sd) = sim_copy_argv (envp);
-#endif
-
- return SIM_RC_OK;
-}
-
-void
-sim_do_command (sd, cmd)
- SIM_DESC sd;
- char *cmd;
-{
- if (sim_args_command (sd, cmd) != SIM_RC_OK)
- sim_io_eprintf (sd, "Unknown command `%s'\n", cmd);
-}
-
-
-/* Disassemble an instruction. */
-
-static void
-sh64_disassemble_insn (SIM_CPU *cpu, const CGEN_INSN *insn,
- const ARGBUF *abuf, IADDR pc, char *buf)
-{
- struct disassemble_info disasm_info;
- SFILE sfile;
- SIM_DESC sd = CPU_STATE (cpu);
-
- sfile.buffer = sfile.current = buf;
- INIT_DISASSEMBLE_INFO (disasm_info, (FILE *) &sfile,
- (fprintf_ftype) sim_disasm_sprintf);
-
- disasm_info.arch = bfd_get_arch (STATE_PROG_BFD (sd));
- disasm_info.mach = bfd_get_mach (STATE_PROG_BFD (sd));
- disasm_info.endian =
- (bfd_big_endian (STATE_PROG_BFD (sd)) ? BFD_ENDIAN_BIG
- : bfd_little_endian (STATE_PROG_BFD (sd)) ? BFD_ENDIAN_LITTLE
- : BFD_ENDIAN_UNKNOWN);
- disasm_info.read_memory_func = sim_disasm_read_memory;
- disasm_info.memory_error_func = sim_disasm_perror_memory;
- disasm_info.application_data = (PTR) cpu;
-
- if (sh64_h_ism_get (cpu) == ISM_MEDIA)
- print_insn_sh64x_media (pc, &disasm_info);
- else
- print_insn_sh (pc, &disasm_info);
-}
diff --git a/sim/sh64/sim-main.h b/sim/sh64/sim-main.h
deleted file mode 100644
index e7cbe99217a..00000000000
--- a/sim/sh64/sim-main.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* Main header for the Hitachi SH64 architecture. */
-
-#ifndef SIM_MAIN_H
-#define SIM_MAIN_H
-
-#define USING_SIM_BASE_H /* FIXME: quick hack */
-
-struct _sim_cpu; /* FIXME: should be in sim-basics.h */
-typedef struct _sim_cpu SIM_CPU;
-
-/* sim-basics.h includes config.h but cgen-types.h must be included before
- sim-basics.h and cgen-types.h needs config.h. */
-#include "config.h"
-
-#include "symcat.h"
-#include "sim-basics.h"
-#include "cgen-types.h"
-#include "sh-desc.h"
-#include "sh-opc.h"
-#include "arch.h"
-
-/* These must be defined before sim-base.h. */
-typedef UDI sim_cia;
-
-#define CIA_GET(cpu) CPU_PC_GET (cpu)
-#define CIA_SET(cpu,val) CPU_PC_SET ((cpu), (val) | (sh64_h_ism_get (cpu)))
-
-#include "sim-base.h"
-#include "cgen-sim.h"
-#include "sh64-sim.h"
-
-/* The _sim_cpu struct. */
-
-struct _sim_cpu {
- /* sim/common cpu base. */
- sim_cpu_base base;
-
- /* Static parts of cgen. */
- CGEN_CPU cgen_cpu;
-
- /* CPU specific parts go here.
- Note that in files that don't need to access these pieces WANT_CPU_FOO
- won't be defined and thus these parts won't appear. This is ok in the
- sense that things work. It is a source of bugs though.
- One has to of course be careful to not take the size of this
- struct and no structure members accessed in non-cpu specific files can
- go after here. Oh for a better language. */
-#if defined (WANT_CPU_SH64)
- SH64_CPU_DATA cpu_data;
-#endif
-};
-
-/* The sim_state struct. */
-
-struct sim_state {
- sim_cpu *cpu;
-#define STATE_CPU(sd, n) (/*&*/ (sd)->cpu)
-
- CGEN_STATE cgen_state;
-
- sim_state_base base;
-};
-
-/* Misc. */
-
-/* Catch address exceptions. */
-extern SIM_CORE_SIGNAL_FN sh64_core_signal;
-#define SIM_CORE_SIGNAL(SD,CPU,CIA,MAP,NR_BYTES,ADDR,TRANSFER,ERROR) \
-sh64_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), \
- (TRANSFER), (ERROR))
-
-/* Default memory size. */
-#define SH64_DEFAULT_MEM_SIZE 0x800000 /* 8M */
-
-#endif /* SIM_MAIN_H */
diff --git a/sim/sh64/tconfig.in b/sim/sh64/tconfig.in
deleted file mode 100644
index bab3f1ce7ed..00000000000
--- a/sim/sh64/tconfig.in
+++ /dev/null
@@ -1,45 +0,0 @@
-/* SH64 target configuration file. -*- C -*- */
-
-/* Define this if the simulator can vary the size of memory.
- See the xxx simulator for an example.
- This enables the `-m size' option.
- The memory size is stored in STATE_MEM_SIZE. */
-/* Not used for SH64 since we use the memory module. TODO -- check this */
-/* #define SIM_HAVE_MEM_SIZE */
-
-/* See sim-hload.c. We properly handle LMA. -- TODO: check this */
-#define SIM_HANDLES_LMA 1
-
-/* For MSPR support. FIXME: revisit. */
-#define WITH_DEVICES 0
-
-/* FIXME: Revisit. */
-#ifdef HAVE_DV_SOCKSER
-MODULE_INSTALL_FN dv_sockser_install;
-#define MODULE_LIST dv_sockser_install,
-#endif
-
-#if 0
-/* Enable watchpoints. */
-#define WITH_WATCHPOINTS 1
-#endif
-
-/* ??? Temporary hack until model support unified. */
-#define SIM_HAVE_MODEL
-
-/* Define this to enable the intrinsic breakpoint mechanism. */
-/* FIXME: may be able to remove SIM_HAVE_BREAKPOINTS since it essentially
- duplicates ifdef SIM_BREAKPOINT (right?) */
-#if 1
-#define SIM_HAVE_BREAKPOINTS
-#define SIM_BREAKPOINT { 0, 0, 0, 0xD }
-#define SIM_BREAKPOINT_SIZE 4
-#endif
-
-/* This is a global setting. Different cpu families can't mix-n-match -scache
- and -pbb. However some cpu families may use -simple while others use
- one of -scache/-pbb. ???? */
-#define WITH_SCACHE_PBB 1
-
-/* Define this if the target cpu is bi-endian and the simulator supports it. */
-#define SIM_HAVE_BIENDIAN
diff --git a/sim/testsuite/sim/sh64/ChangeLog b/sim/testsuite/sim/sh64/ChangeLog
deleted file mode 100644
index 8bb2f764ae6..00000000000
--- a/sim/testsuite/sim/sh64/ChangeLog
+++ /dev/null
@@ -1,21 +0,0 @@
-2001-01-06 Ben Elliston <bje@redhat.com>
-
- * misc/fr-dr.s: New test.
-
-2001-01-03 Ben Elliston <bje@redhat.com>
-
- * interwork.exp: Match .s files only.
-
-2000-12-06 Ben Elliston <bje@redhat.com>
-
- * interwork.exp: New test case.
-
-2000-11-16 Ben Elliston <bje@redhat.com>
-
- * allinsn.exp: Rename from this ..
- * compact.exp: .. to this.
- * media.exp: New test case.
-
-2000-11-13 Ben Elliston <bje@redhat.com>
-
- * allinsn.exp: New test case.
diff --git a/sim/testsuite/sim/sh64/compact.exp b/sim/testsuite/sim/sh64/compact.exp
deleted file mode 100644
index d3d482acf0f..00000000000
--- a/sim/testsuite/sim/sh64/compact.exp
+++ /dev/null
@@ -1,19 +0,0 @@
-# SHcompact testsuite.
-
-if [istarget sh64-*-*] {
- # load support procs (none yet)
- # load_lib cgen.exp
-
- # all machines
- set all_machs "sh5"
-
- # The .cgs suffix is for "cgen .s".
- foreach src [lsort [glob -nocomplain $srcdir/$subdir/compact/*.cgs]] {
- # If we're only testing specific files and this isn't one of them,
- # skip it.
- if ![runtest_file_p $runtests $src] {
- continue
- }
- run_sim_test $src $all_machs
- }
-}
diff --git a/sim/testsuite/sim/sh64/compact/ChangeLog b/sim/testsuite/sim/sh64/compact/ChangeLog
deleted file mode 100644
index 99aaec1ff02..00000000000
--- a/sim/testsuite/sim/sh64/compact/ChangeLog
+++ /dev/null
@@ -1,26 +0,0 @@
-2002-01-09 Ben Elliston <bje@redhat.com>
-
- * macl.cgs: For good measure, clear the S bit at startup.
-
-2001-01-11 Ben Elliston <bje@redhat.com>
-
- * fmov.cgs (f13b): Compare R0 with R1, not R2, when testing that
- the source register was correctly post-incremented.
-
-2000-12-01 Ben Elliston <bje@redhat.com>
-
- * *.cgs (ld): Link tests with -m shelf32.
-
-2000-11-24 Ben Elliston <bje@redhat.com>
-
- * fmov.cgs: New test case.
- * ftrv.cgs: Populate the matrix with meaningful values.
-
-2000-11-22 Ben Elliston <bje@redhat.com>
-
- * *.cgs (as): Assemble tests with -isa=shcompact.
-
-2000-11-16 Ben Elliston <bje@redhat.com>
-
- * *.cgs: New test cases.
-
diff --git a/sim/testsuite/sim/sh64/compact/add.cgs b/sim/testsuite/sim/sh64/compact/add.cgs
deleted file mode 100644
index 105e4849069..00000000000
--- a/sim/testsuite/sim/sh64/compact/add.cgs
+++ /dev/null
@@ -1,55 +0,0 @@
-# sh testcase for add $rm, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-init:
- # Initialise some registers with values which help us to verify
- # that the correct source registers are used by the ADD instruction.
- mov #0, r0
- mov #1, r1
- mov #2, r2
- mov #3, r3
- mov #5, r5
- mov #15, r15
-
-add:
- # 0 + 0 = 0.
- add r0, r0
- assert r0, #0
-
- # 0 + 1 = 1.
- add r0, r1
- assert r1, #1
-
- # 1 + 2 = 3.
- add r1, r2
- assert r2, #3
-
- # 3 + 5 = 8.
- add r3, r5
- assert r5, #8
-
- # 8 + 8 = 16.
- add r5, r5
- assert r5, #16
-
- # 15 + 1 = 16.
- add r15, r1
- assert r1, #16
-
-neg:
- mov #1, r0
- neg r0, r0
- mov #2, r1
- add r0, r1
- assert r1, #1
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/addc.cgs b/sim/testsuite/sim/sh64/compact/addc.cgs
deleted file mode 100644
index f6e46e1a969..00000000000
--- a/sim/testsuite/sim/sh64/compact/addc.cgs
+++ /dev/null
@@ -1,90 +0,0 @@
-# sh testcase for addc $rm, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- # Initialise some registers with values which help us to verify
- # that the correct source registers are used by the ADDC instruction.
-
- .macro init
- mov #0, r0
- mov #1, r1
- mov #2, r2
- mov #3, r3
- mov #5, r5
- mov #15, r15
- .endm
-
- start
-
- init
-add:
- clrt
- addc r0, r0
- assert r0, #0
- clrt
- addc r0, r1
- assert r1, #1
- clrt
- addc r1, r2
- assert r2, #3
- clrt
- addc r3, r5
- assert r5, #8
- clrt
- addc r5, r5
- assert r5, #16
- clrt
- addc r15, r1
- assert r1, #16
-
- init
-addt:
- sett
- addc r0, r0
- assert r0, #1
- sett
- addc r0, r1
- assert r1, #3
- sett
- addc r1, r2
- assert r2, #6
- sett
- addc r3, r5
- assert r5, #9
- sett
- addc r5, r5
- assert r5, #19
- sett
- addc r15, r1
- assert r1, #19
-
- bra next
- nop
-
-wrong:
- fail
-
-next:
- init
-large:
- clrt
- mov #1, r0
- neg r0, r0
- mov #2, r1
- addc r0, r1
- assert r1, #1
-
- init
-larget:
- sett
- mov #1, r0
- neg r0, r0
- mov #2, r1
- addc r0, r1
- assert r1, #2
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/compact/addi.cgs b/sim/testsuite/sim/sh64/compact/addi.cgs
deleted file mode 100644
index 7c96ddf76d5..00000000000
--- a/sim/testsuite/sim/sh64/compact/addi.cgs
+++ /dev/null
@@ -1,46 +0,0 @@
-# sh testcase for add #$imm8, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-init:
- # Initialise some registers with values which help us to verify
- # that the correct source registers are used by the ADD instruction.
- mov #0, r0
- mov #1, r1
- mov #2, r2
- mov #3, r3
- mov #5, r5
- mov #15, r15
-
-addi:
- # 0 + 0 = 0.
- add #0, r0
- assert r0, #0
-
- # 0 + 1 = 1.
- add #0, r1
- assert r1, #1
-
- # 2 + 2 = 4.
- add #2, r2
- assert r2, #4
-
- # 120 + 5 = 125.
- add #120, r5
- assert r5, #125
-
-large:
- mov #1, r0
- neg r0, r0
- add #2, r0
- assert r0, #1
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/addv.cgs b/sim/testsuite/sim/sh64/compact/addv.cgs
deleted file mode 100644
index 0267e5dfa00..00000000000
--- a/sim/testsuite/sim/sh64/compact/addv.cgs
+++ /dev/null
@@ -1,48 +0,0 @@
-# sh testcase for addv $rm, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-zero:
- mov #0, r0
- mov #0, r1
- addv r0, r1
- # Assert !T and #0.
- bt wrong
- assert r1, #0
-
-one:
- mov #0, r0
- mov #1, r1
- addv r0, r1
- # Assert !T and #1.
- bt wrong
- assert r1, #1
-
-large:
- # Produce MAXINT in R0.
- mov #0, r0
- not r0, r0
- shlr r0
-
- # Put #3 into R1.
- mov #3, r1
-
- # Add them and overflow.
- addv r0, r1
-
- # Assert T and overflowed value.
- bf wrong
- mov #1, r7
- rotr r7
- add #2, r7
- cmp/eq r1, r7
- bf wrong
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/and.cgs b/sim/testsuite/sim/sh64/compact/and.cgs
deleted file mode 100644
index e1452752ae0..00000000000
--- a/sim/testsuite/sim/sh64/compact/and.cgs
+++ /dev/null
@@ -1,33 +0,0 @@
-# sh testcase for and $rm64, $rn64 -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global and
-and:
- mov #1, r1
- mov #7, r2
- rotr r2
- rotr r2
- and r1, r2
-
- # R1 & R2 = 1.
- assert r2, #1
-
-another:
- mov #192, r1
- mov #0, r2
- and r1, r2
-
- # R1 & R2 = 0.
- assert r2, #0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/andb.cgs b/sim/testsuite/sim/sh64/compact/andb.cgs
deleted file mode 100644
index 77e628598b1..00000000000
--- a/sim/testsuite/sim/sh64/compact/andb.cgs
+++ /dev/null
@@ -1,24 +0,0 @@
-# sh testcase for and.b #$imm8, @(r0, gbr) -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global orb
-init:
- # Init GBR and R0.
- mov #30, r0
- ldc r0, gbr
- mov #40, r0
-
-orb:
- and.b #255, @(r0, gbr)
- and.b #170, @(r0, gbr)
- and.b #255, @(r0, gbr)
- and.b #0, @(r0, gbr)
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/compact/andi.cgs b/sim/testsuite/sim/sh64/compact/andi.cgs
deleted file mode 100644
index 32d71c5b477..00000000000
--- a/sim/testsuite/sim/sh64/compact/andi.cgs
+++ /dev/null
@@ -1,43 +0,0 @@
-# sh testcase for and #$imm8, r0 -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global andi
-andi:
- mov #0, r0
- or #255, r0
- and #0, r0
- assert r0, #0
-
-large:
- mov #0, r0
- or #255, r0
- shll8 r0
- or #255, r0
- shll8 r0
- or #255, r0
- shll8 r0
- or #255, r0
-
-mask:
- and #255, r0
- mov r0, r1
- mov #0, r0
- or #255, r0
- cmp/eq r0, r1
- bf wrong
-
-mask0:
- and #0, r0
- assert r0, #0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/bf.cgs b/sim/testsuite/sim/sh64/compact/bf.cgs
deleted file mode 100644
index 5c361f94b89..00000000000
--- a/sim/testsuite/sim/sh64/compact/bf.cgs
+++ /dev/null
@@ -1,24 +0,0 @@
-# sh testcase for bf $disp8 -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global taken
-taken:
- clrt
- bf ntaken
- fail
- .global ntaken
-ntaken:
- sett
- bf bad
- pass
-bad:
- fail
- fail
- fail
- fail
diff --git a/sim/testsuite/sim/sh64/compact/bfs.cgs b/sim/testsuite/sim/sh64/compact/bfs.cgs
deleted file mode 100644
index 3cad5f6fc73..00000000000
--- a/sim/testsuite/sim/sh64/compact/bfs.cgs
+++ /dev/null
@@ -1,28 +0,0 @@
-# sh testcase for bf/s $disp8 -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global taken
-taken:
- clrt
- bf/s ntaken
-slot1:
- nop
- fail
- .global ntaken
-ntaken:
- sett
- bf/s bad
-slot2:
- nop
- pass
-bad:
- fail
- fail
- fail
- fail
diff --git a/sim/testsuite/sim/sh64/compact/bra.cgs b/sim/testsuite/sim/sh64/compact/bra.cgs
deleted file mode 100644
index 77c6da9bdde..00000000000
--- a/sim/testsuite/sim/sh64/compact/bra.cgs
+++ /dev/null
@@ -1,23 +0,0 @@
-# sh testcase for bra $disp12 -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global bra
-bra:
- bra okay
-slot:
- nop
-bad:
- fail
- fail
- fail
- .global okay
-okay:
- pass
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/braf.cgs b/sim/testsuite/sim/sh64/compact/braf.cgs
deleted file mode 100644
index e761f6d0a6d..00000000000
--- a/sim/testsuite/sim/sh64/compact/braf.cgs
+++ /dev/null
@@ -1,24 +0,0 @@
-# sh testcase for braf $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global braf
-braf:
- mov #4, r0
- braf r0
-slot:
- nop
-bad:
- fail
- fail
-okay:
- pass
-alsobad:
- fail
- fail
- fail
diff --git a/sim/testsuite/sim/sh64/compact/brk.cgs b/sim/testsuite/sim/sh64/compact/brk.cgs
deleted file mode 100644
index 99080724565..00000000000
--- a/sim/testsuite/sim/sh64/compact/brk.cgs
+++ /dev/null
@@ -1,18 +0,0 @@
-# sh testcase for brk -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
- .global brk
-brk:
- # If we hit the breakpoint, the sim will stop.
- pass
-
- # FIXME: breakpoint instruction.
- # The SH4 assembler doesn't know about "brk".
- .word 0x003b
-bad:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/bsr.cgs b/sim/testsuite/sim/sh64/compact/bsr.cgs
deleted file mode 100644
index 75a1a2b275e..00000000000
--- a/sim/testsuite/sim/sh64/compact/bsr.cgs
+++ /dev/null
@@ -1,21 +0,0 @@
-# sh testcase for bsr $disp12 -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global bsr
-bsr:
- bsr okay
-slot:
- nop
-bad:
- fail
- fail
-okay:
- pass
-alsobad:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/bsrf.cgs b/sim/testsuite/sim/sh64/compact/bsrf.cgs
deleted file mode 100644
index 9360eaa88b0..00000000000
--- a/sim/testsuite/sim/sh64/compact/bsrf.cgs
+++ /dev/null
@@ -1,22 +0,0 @@
-# sh testcase for bsrf $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
-bsrf:
- mov #4, r0
- bsrf r0
-slot:
- nop
-bad:
- fail
- fail
-okay:
- pass
-alsobad:
- fail
- fail
diff --git a/sim/testsuite/sim/sh64/compact/bt.cgs b/sim/testsuite/sim/sh64/compact/bt.cgs
deleted file mode 100644
index 65b9d61b885..00000000000
--- a/sim/testsuite/sim/sh64/compact/bt.cgs
+++ /dev/null
@@ -1,24 +0,0 @@
-# sh testcase for bt $disp8
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global taken
-taken:
- sett
- bt ntaken
- fail
- .global ntaken
-ntaken:
- clrt
- bt bad
- pass
-bad:
- fail
- fail
- fail
- fail
diff --git a/sim/testsuite/sim/sh64/compact/bts.cgs b/sim/testsuite/sim/sh64/compact/bts.cgs
deleted file mode 100644
index 3d62e4d822c..00000000000
--- a/sim/testsuite/sim/sh64/compact/bts.cgs
+++ /dev/null
@@ -1,28 +0,0 @@
-# sh testcase for bt/s $disp8 -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global taken
-taken:
- sett
- bt/s ntaken
-slot1:
- nop
- fail
- .global ntaken
-ntaken:
- clrt
- bt/s bad
-slot2:
- nop
- pass
-bad:
- fail
- fail
- fail
- fail
diff --git a/sim/testsuite/sim/sh64/compact/clrmac.cgs b/sim/testsuite/sim/sh64/compact/clrmac.cgs
deleted file mode 100644
index 482dc804d62..00000000000
--- a/sim/testsuite/sim/sh64/compact/clrmac.cgs
+++ /dev/null
@@ -1,13 +0,0 @@
-# sh testcase for clrmac -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global clrmac
-clrmac:
- clrmac
- pass
diff --git a/sim/testsuite/sim/sh64/compact/clrs.cgs b/sim/testsuite/sim/sh64/compact/clrs.cgs
deleted file mode 100644
index bed5fd5178e..00000000000
--- a/sim/testsuite/sim/sh64/compact/clrs.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for clrs -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global clrs
-clrs:
- clrs
- # Somehow ensure that S is set.
- pass
diff --git a/sim/testsuite/sim/sh64/compact/clrt.cgs b/sim/testsuite/sim/sh64/compact/clrt.cgs
deleted file mode 100644
index 281c2f4243d..00000000000
--- a/sim/testsuite/sim/sh64/compact/clrt.cgs
+++ /dev/null
@@ -1,16 +0,0 @@
-# sh testcase for clrt -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global clrt
-clrt:
- clrt
- bt wrong
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/cmpeq.cgs b/sim/testsuite/sim/sh64/compact/cmpeq.cgs
deleted file mode 100644
index 3cc744cf7f7..00000000000
--- a/sim/testsuite/sim/sh64/compact/cmpeq.cgs
+++ /dev/null
@@ -1,52 +0,0 @@
-# sh testcase for cmp/eq $rm, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
-zeroes:
- mov #0, r1
- mov #0, r2
- cmp/eq r1, r2
- bf wrong
-
-zero1:
- mov #0, r1
- mov #1, r2
- cmp/eq r1, r2
- bt wrong
-
-zero2:
- mov #0, r2
- mov #1, r1
- cmp/eq r2, r1
- bt wrong
-
-equal:
- mov #192, r1
- mov #192, r2
- cmp/eq r1, r2
- bf wrong
-
-noteq:
- mov #192, r1
- mov #193, r2
- cmp/eq r1, r2
- bt wrong
-
-large:
- mov #1, r1
- rotr r1
- mov #1, r2
- rotr r2
- cmp/eq r1, r2
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/cmpeqi.cgs b/sim/testsuite/sim/sh64/compact/cmpeqi.cgs
deleted file mode 100644
index 79900a0cecc..00000000000
--- a/sim/testsuite/sim/sh64/compact/cmpeqi.cgs
+++ /dev/null
@@ -1,39 +0,0 @@
-# sh testcase for cmp/eq #$imm8, r0 -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
-zeroes:
- mov #0, r0
- cmp/eq #0, r0
- bf wrong
-
-zero1:
- mov #0, r0
- cmp/eq #1, r0
- bt wrong
-
-zero2:
- mov #1, r0
- cmp/eq #0, r0
- bt wrong
-
-equal:
- mov #192, r0
- cmp/eq #192, r0
- bf wrong
-
-sign:
- mov #255, r0
- cmp/eq #255, r0
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/cmpge.cgs b/sim/testsuite/sim/sh64/compact/cmpge.cgs
deleted file mode 100644
index 9d4327e35cc..00000000000
--- a/sim/testsuite/sim/sh64/compact/cmpge.cgs
+++ /dev/null
@@ -1,69 +0,0 @@
-# sh testcase for cmp/ge $rm, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
-zero:
- mov #0, r0
- mov #0, r1
- cmp/ge r0, r1
- bf wrong
-
-onezero:
- mov #1, r0
- mov #0, r1
- cmp/ge r0, r1
- bt wrong
-
-zeroone:
- mov #0, r0
- mov #1, r1
- cmp/ge r0, r1
- bf wrong
-
-equal:
- mov #192, r0
- mov #192, r1
- cmp/ge r0, r1
- bf wrong
-
-eqlarge:
- mov #1, r0
- rotr r0
- add #85, r0
- mov #1, r1
- rotr r1
- add #85, r1
- cmp/ge r0, r1
- bf wrong
-
-large2:
- mov #1, r0
- rotr r0
- add #85, r0
- mov #1, r1
- rotr r1
- add #84, r1
- cmp/ge r0, r1
- bt wrong
-
-large3:
- mov #1, r0
- rotr r0
- add #84, r0
- mov #1, r1
- rotr r1
- add #85, r1
- cmp/ge r0, r1
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/cmpgt.cgs b/sim/testsuite/sim/sh64/compact/cmpgt.cgs
deleted file mode 100644
index 460ca65ae68..00000000000
--- a/sim/testsuite/sim/sh64/compact/cmpgt.cgs
+++ /dev/null
@@ -1,69 +0,0 @@
-# sh testcase for cmp/gt $rm, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
-zero:
- mov #0, r0
- mov #0, r1
- cmp/gt r0, r1
- bt wrong
-
-onezero:
- mov #1, r0
- mov #0, r1
- cmp/gt r0, r1
- bt wrong
-
-zeroone:
- mov #0, r0
- mov #1, r1
- cmp/gt r0, r1
- bf wrong
-
-equal:
- mov #192, r0
- mov #192, r1
- cmp/gt r0, r1
- bt wrong
-
-eqlarge:
- mov #1, r0
- rotr r0
- add #85, r0
- mov #1, r1
- rotr r1
- add #85, r1
- cmp/gt r0, r1
- bt wrong
-
-large2:
- mov #1, r0
- rotr r0
- add #85, r0
- mov #1, r1
- rotr r1
- add #84, r1
- cmp/gt r0, r1
- bt wrong
-
-large3:
- mov #1, r0
- rotr r0
- add #84, r0
- mov #1, r1
- rotr r1
- add #85, r1
- cmp/gt r0, r1
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/cmphi.cgs b/sim/testsuite/sim/sh64/compact/cmphi.cgs
deleted file mode 100644
index efbcaa328cd..00000000000
--- a/sim/testsuite/sim/sh64/compact/cmphi.cgs
+++ /dev/null
@@ -1,68 +0,0 @@
-# sh testcase for cmp/hi $rm, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
-zero:
- mov #0, r0
- mov #0, r0
- cmp/hi r0, r1
- bt wrong
-
-equal:
- mov #1, r0
- rotr r0
- add #3, r0
-
- mov #1, r1
- rotr r1
- add #3, r1
-
- cmp/hi r0, r1
- bt wrong
-
-gt:
- mov #10, r0
- mov #12, r1
- cmp/hi r0, r1
- bf wrong
-
-lt:
- mov #12, r0
- mov #10, r1
- cmp/hi r0, r1
- bt wrong
-
-gtneg:
- mov #1, r0
- rotr r0
- add #1, r0
-
- mov #1, r1
- rotr r1
- add #3, r1
-
- cmp/hi r0, r1
- bf wrong
-
-ltneg:
- mov #1, r0
- rotr r0
- add #3, r0
-
- mov #1, r1
- rotr r1
- add #1, r1
-
- cmp/hi r0, r1
- bt wrong
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/cmphs.cgs b/sim/testsuite/sim/sh64/compact/cmphs.cgs
deleted file mode 100644
index 957f80c0245..00000000000
--- a/sim/testsuite/sim/sh64/compact/cmphs.cgs
+++ /dev/null
@@ -1,59 +0,0 @@
-# sh testcase for cmp/hs $rm, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
-zero:
- mov #0, r0
- mov #0, r0
- cmp/hs r0, r1
-
-equal:
- mov #1, r0
- rotr r0
- add #3, r0
-
- mov #1, r1
- rotr r1
- add #3, r1
-
- cmp/hs r0, r1
-
-gt:
- mov #10, r0
- mov #12, r1
- cmp/hs r0, r1
-
-lt:
- mov #12, r0
- mov #10, r1
- cmp/hs r0, r1
-
-gtneg:
- mov #1, r0
- rotr r0
- add #1, r0
-
- mov #1, r1
- rotr r1
- add #3, r1
-
- cmp/hs r0, r1
-
-ltneg:
- mov #1, r0
- rotr r0
- add #3, r0
-
- mov #1, r1
- rotr r1
- add #1, r1
-
- cmp/hs r0, r1
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/compact/cmppl.cgs b/sim/testsuite/sim/sh64/compact/cmppl.cgs
deleted file mode 100644
index 1c11377f34b..00000000000
--- a/sim/testsuite/sim/sh64/compact/cmppl.cgs
+++ /dev/null
@@ -1,37 +0,0 @@
-# sh testcase for cmp/pl $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
-zero:
- mov #0, r0
- cmp/pl r0
- bt wrong
-
-plus:
- mov #10, r0
- cmp/pl r0
- bf wrong
-
-minus:
- mov #10, r0
- neg r0, r0
- cmp/pl r0
- bt wrong
-
-large:
- mov #10, r0
- shll8 r0
- add #123, r0
- cmp/pl r0
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/cmppz.cgs b/sim/testsuite/sim/sh64/compact/cmppz.cgs
deleted file mode 100644
index 2e0bf48e827..00000000000
--- a/sim/testsuite/sim/sh64/compact/cmppz.cgs
+++ /dev/null
@@ -1,37 +0,0 @@
-# sh testcase for cmp/pz $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
-zero:
- mov #0, r0
- cmp/pz r0
- bf wrong
-
-plus:
- mov #10, r0
- cmp/pz r0
- bf wrong
-
-minus:
- mov #10, r0
- neg r0, r0
- cmp/pz r0
- bt wrong
-
-large:
- mov #10, r0
- shll8 r0
- add #123, r0
- cmp/pz r0
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/cmpstr.cgs b/sim/testsuite/sim/sh64/compact/cmpstr.cgs
deleted file mode 100644
index 70d90d33c20..00000000000
--- a/sim/testsuite/sim/sh64/compact/cmpstr.cgs
+++ /dev/null
@@ -1,148 +0,0 @@
-# sh testcase for cmp/str $rm, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
-.macro rot8
- rotr r0
- rotr r0
- rotr r0
- rotr r0
- rotr r0
- rotr r0
- rotr r0
- rotr r0
-.endm
-
- start
-
-# Use multiple "wrong" labels because this program is quite long. It's
-# likely that some instructions will be too far away from the branch
-# target to use PC-relative branches.
-
-match0:
- # No bytes matching.
- mov #1, r0
- neg r0, r0
- xor #170, r0
- rot8
- xor #170, r0
- rot8
- xor #170, r0
- rot8
- xor #170, r0
- rot8
- mov r0, r1
- mov #1, r0
- neg r0, r0
- xor #85, r0
- rot8
- xor #85, r0
- rot8
- xor #85, r0
- rot8
- xor #85, r0
- rot8
- cmp/str r0, r1
- bt wrong0
-
- bra match1
- nop
-wrong0:
- fail
-
-match1:
- # One byte matching.
- mov #1, r0
- neg r0, r0
- xor #170, r0
- rot8
- xor #170, r0
- rot8
- xor #170, r0
- rot8
- mov r0, r1
- mov #1, r0
- neg r0, r0
- xor #85, r0
- rot8
- xor #85, r0
- rot8
- xor #85, r0
- rot8
- cmp/str r0, r1
- bf wrong1
-
- bra match2
- nop
-wrong1:
- fail
-
-match2:
- # Two bytes matching.
- mov #1, r0
- neg r0, r0
- xor #170, r0
- rot8
- xor #170, r0
- rot8
- mov r0, r1
- mov #1, r0
- neg r0, r0
- xor #85, r0
- rot8
- xor #85, r0
- rot8
- cmp/str r0, r1
- bf wrong2
-
- bra match3
- nop
-wrong2:
- fail
-
-byte0:
-match3:
- # One byte matching.
- # This is also the test for byte 0.
- mov #85, r0
- mov #85, r1
- cmp/str r0, r1
- bf wrong3
-
-byte1:
- # Match in byte position 1.
- mov #85, r0
- shll8 r0
- mov #85, r1
- shll8 r1
- cmp/str r0, r1
- bf wrong3
-
-byte2:
- # Match in byte position 2.
- mov #85, r0
- shll16 r0
- mov #85, r1
- shll16 r1
- cmp/str r0, r1
- bf wrong3
-
-byte3:
- # Match in byte position 3.
- mov #85, r0
- shll16 r0
- shll8 r0
- mov #85, r1
- shll16 r1
- shll8 r1
- cmp/str r0, r1
- bf wrong3
-
-okay:
- pass
-wrong3:
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/div0s.cgs b/sim/testsuite/sim/sh64/compact/div0s.cgs
deleted file mode 100644
index 8cd6422bea8..00000000000
--- a/sim/testsuite/sim/sh64/compact/div0s.cgs
+++ /dev/null
@@ -1,52 +0,0 @@
-# sh testcase for div0s $rm, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-init:
- mov #0, r0
- mov #3, r1
- mov #4, r2
- neg r1, r3
- neg r2, r4
-
-perm1:
- div0s r0, r0
- bt wrong
- div0s r0, r1
- bt wrong
- div0s r1, r0
- bt wrong
-
-perm2:
- div0s r0, r4
- bf wrong
- div0s r4, r0
- bf wrong
-
-perm3:
- div0s r1, r2
- bt wrong
- div0s r2, r1
- bt wrong
-
-perm4:
- div0s r3, r4
- bt wrong
- div0s r4, r3
- bt wrong
-
-perm5:
- div0s r1, r1
- bt wrong
- div0s r3, r3
- bt wrong
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/div0u.cgs b/sim/testsuite/sim/sh64/compact/div0u.cgs
deleted file mode 100644
index 02f8534d4c4..00000000000
--- a/sim/testsuite/sim/sh64/compact/div0u.cgs
+++ /dev/null
@@ -1,21 +0,0 @@
-# sh testcase for div0u -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global div0u
-div0u:
- div0u
- # Can't easily test Q and M (other than visually inspecting
- # the simulator's trace output).
- bt wrong
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/div1.cgs b/sim/testsuite/sim/sh64/compact/div1.cgs
deleted file mode 100644
index 63a0e81cb12..00000000000
--- a/sim/testsuite/sim/sh64/compact/div1.cgs
+++ /dev/null
@@ -1,52 +0,0 @@
-# sh testcase for div1 $rm, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
- mov #10, r0
- mov #2, r1
- div0s r0,r1
-
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
- div1 r0, r1
-
- pass
diff --git a/sim/testsuite/sim/sh64/compact/dmulsl.cgs b/sim/testsuite/sim/sh64/compact/dmulsl.cgs
deleted file mode 100644
index 081ce169955..00000000000
--- a/sim/testsuite/sim/sh64/compact/dmulsl.cgs
+++ /dev/null
@@ -1,115 +0,0 @@
-# sh testcase for dmuls.l $rm, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- mov #0, r0
- mov #0, r1
- dmuls.l r0, r1
- # check result
- sts mach, r3
- sts macl, r4
- assert r3, #0
- assert r4, #0
-
-test2:
- mov #0, r0
- mov #5, r1
- dmuls.l r0, r1
- # check result
- sts mach, r3
- sts macl, r4
- assert r3, #0
- assert r4, #0
-
-test3:
- mov #5, r0
- mov #0, r1
- dmuls.l r0, r1
- # check result
- sts mach, r3
- sts macl, r4
- assert r3, #0
- assert r4, #0
-
-test4:
- mov #1, r0
- mov #5, r1
- dmuls.l r0, r1
- # check result
- sts mach, r3
- sts macl, r4
- assert r3, #0
- assert r4, #5
-
-test5:
- mov #5, r0
- mov #1, r1
- dmuls.l r0, r1
- # check result
- sts mach, r3
- sts macl, r4
- assert r3, #0
- assert r4, #5
-
- bra test6
- nop
-
-wrong:
- fail
-
-test6:
- mov #2, r0
- mov #2, r1
- dmuls.l r0, r1
- # check result
- sts mach, r3
- sts macl, r4
- assert r3, #0
- assert r4, #4
-
-test7:
- mov #1, r0
- neg r0, r0
- mov #2, r1
- dmuls.l r0, r1
- # check result
- sts mach, r3
- sts macl, r4
-
- mov #0, r8
- not r8, r9
- not r8, r10
- shll r10
- cmp/eq r3, r9
- bf wrong
- cmp/eq r4, r10
- bf wrong
-
-test8:
- mov #1, r0
- neg r0, r0
- mov #1, r1
- neg r1, r1
- dmuls.l r0, r1
- # check result
- sts mach, r3
- sts macl, r4
- assert r3, #0
- assert r4, #1
-
-test9:
- mov #1, r0
- neg r0, r0
- shlr r0
- mov #1, r1
- neg r1, r1
- shlr r1
- dmuls.l r0, r1
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/compact/dmulul.cgs b/sim/testsuite/sim/sh64/compact/dmulul.cgs
deleted file mode 100644
index b34b870269d..00000000000
--- a/sim/testsuite/sim/sh64/compact/dmulul.cgs
+++ /dev/null
@@ -1,53 +0,0 @@
-# sh testcase for dmulu.l $rm, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- mov #0, r0
- mov #0, r1
- dmulu.l r0, r1
-
- mov #0, r0
- mov #5, r1
- dmulu.l r0, r1
-
- mov #5, r0
- mov #0, r1
- dmulu.l r0, r1
-
- mov #1, r0
- mov #5, r1
- dmulu.l r0, r1
-
- mov #5, r0
- mov #1, r1
- dmulu.l r0, r1
-
- mov #2, r0
- mov #2, r1
- dmulu.l r0, r1
-
- mov #1, r0
- neg r0, r0
- mov #2, r1
- dmulu.l r0, r1
-
- mov #1, r0
- neg r0, r0
- mov #1, r1
- neg r1, r1
- dmulu.l r0, r1
-
- mov #1, r0
- neg r0, r0
- shlr r0
- mov #1, r1
- neg r1, r1
- shlr r1
- dmulu.l r0, r1
-
- pass
diff --git a/sim/testsuite/sim/sh64/compact/dt.cgs b/sim/testsuite/sim/sh64/compact/dt.cgs
deleted file mode 100644
index 38e91638bd9..00000000000
--- a/sim/testsuite/sim/sh64/compact/dt.cgs
+++ /dev/null
@@ -1,42 +0,0 @@
-# sh testcase for dt $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global dt
-dt:
- mov #3, r0
- dt r0
- bt wrong
- assert r0, #2
-
- mov #1, r0
- dt r0
- bf wrong
- assert r0, #0
-
- mov #0, r0
- dt r0
- bt wrong
- mov #0, r7
- not r7, r7
- cmp/eq r7, r0
- bf wrong
-
- mov #1, r0
- neg r0, r0
- dt r0
- mov #1, r7
- not r7, r7
- cmp/eq r7, r0
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/extsb.cgs b/sim/testsuite/sim/sh64/compact/extsb.cgs
deleted file mode 100644
index 90878020a28..00000000000
--- a/sim/testsuite/sim/sh64/compact/extsb.cgs
+++ /dev/null
@@ -1,29 +0,0 @@
-# sh testcase for exts.b $rm, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global extsb
-extsb:
- mov #42, r1
- exts.b r1, r2
- assert r2, #42
-signed:
- mov #0, r0
- or #255, r0
- exts.b r0, r1
- mov #0, r7
- not r7, r7
- cmp/eq r1, r7
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/extsw.cgs b/sim/testsuite/sim/sh64/compact/extsw.cgs
deleted file mode 100644
index d6257747df7..00000000000
--- a/sim/testsuite/sim/sh64/compact/extsw.cgs
+++ /dev/null
@@ -1,32 +0,0 @@
-# sh testcase for exts.w $rm, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global extsw
-extsw:
- mov #42, r1
- exts.w r1, r2
- assert r2, #42
-
-another:
- mov #0, r0
- or #255, r0
- shll8 r0
- exts.w r0, r1
-
- mov #-1, r7
- shll8 r7
- cmp/eq r1, r7
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/extub.cgs b/sim/testsuite/sim/sh64/compact/extub.cgs
deleted file mode 100644
index 51c14ac4359..00000000000
--- a/sim/testsuite/sim/sh64/compact/extub.cgs
+++ /dev/null
@@ -1,31 +0,0 @@
-# sh testcase for extu.b $rm, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global extub
-extub:
- mov #42, r1
- extu.b r1, r2
- assert r2, #42
-
-another:
- mov #0, r0
- or #255, r0
- extu.b r0, r1
-
- mov #0, r0
- or #255, r0
- cmp/eq r0, r1
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/extuw.cgs b/sim/testsuite/sim/sh64/compact/extuw.cgs
deleted file mode 100644
index 057afe7d949..00000000000
--- a/sim/testsuite/sim/sh64/compact/extuw.cgs
+++ /dev/null
@@ -1,31 +0,0 @@
-# sh testcase for extu.w $rm, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global extuw
-extuw:
- mov #42, r1
- extu.w r1, r2
- assert r2, #42
-
-another:
- mov #0, r0
- or #255, r0
- shll8 r0
- extu.w r0, r1
- mov #0, r0
- or #255, r0
- shll8 r0
- cmp/eq r0, r1
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/fabs.cgs b/sim/testsuite/sim/sh64/compact/fabs.cgs
deleted file mode 100644
index 6955fa2aa16..00000000000
--- a/sim/testsuite/sim/sh64/compact/fabs.cgs
+++ /dev/null
@@ -1,88 +0,0 @@
-# sh testcase for fabs -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
- _clrpr
- # fabs(0.0) = 0.0.
- fldi0 fr0
- fabs fr0
- fldi0 fr1
- fcmp/eq fr0, fr1
- bf wrong
-
- # fabs(1.0) = 1.0.
- fldi1 fr0
- fabs fr0
- fldi1 fr1
- fcmp/eq fr0, fr1
- bf wrong
-
- # fabs(-1.0) = 1.0.
- fldi1 fr0
- fneg fr0
- fabs fr0
- fldi1 fr1
- fcmp/eq fr0, fr1
- bf wrong
-
- bra double
- nop
-
-wrong:
- fail
-
-double:
- # double precision tests.
- # fabs(0.0) = 0.0.
- fldi0 fr0
- _s2d fr0, dr0
- _setpr
- fabs dr0
- _clrpr
- # check.
- fldi0 fr2
- _s2d fr2, dr2
- _setpr
- fcmp/eq dr0, dr2
- bf wrong
- _clrpr
-
-one:
- # fabs(1.0) = 1.0.
- fldi1 fr0
- _s2d fr0, dr0
- _setpr
- fabs dr0
- _clrpr
- # check.
- fldi1 fr2
- _s2d fr2, dr2
- _setpr
- fcmp/eq dr0, dr2
- bf wrong2
- _clrpr
-
-minusone:
- # fabs(-1.0) = 1.0.
- fldi1 fr0
- fneg fr0
- _s2d fr0, dr0
- _setpr
- fabs dr0
- _clrpr
- # check.
- fldi1 fr2
- _s2d fr2, dr2
- _setpr
- fcmp/eq dr0, dr2
- bf wrong2
- _clrpr
-
-okay:
- pass
-wrong2:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/fadd.cgs b/sim/testsuite/sim/sh64/compact/fadd.cgs
deleted file mode 100644
index b00035308f8..00000000000
--- a/sim/testsuite/sim/sh64/compact/fadd.cgs
+++ /dev/null
@@ -1,31 +0,0 @@
-# sh testcase for fadd
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
- _clrpr
-
- fldi1 fr0
- fldi1 fr1
- fadd fr0, fr1
-
- fldi0 fr0
- fldi1 fr1
- fadd fr0, fr1
-
- fldi1 fr0
- fldi0 fr1
- fadd fr0, fr1
-
- _setpr
-double:
- fldi1 fr0
- fldi1 fr1
- _s2d fr0, dr4
- _s2d fr1, dr6
- fadd dr4, dr6
-
- pass
diff --git a/sim/testsuite/sim/sh64/compact/fcmpeq.cgs b/sim/testsuite/sim/sh64/compact/fcmpeq.cgs
deleted file mode 100644
index 151d5e5647a..00000000000
--- a/sim/testsuite/sim/sh64/compact/fcmpeq.cgs
+++ /dev/null
@@ -1,88 +0,0 @@
-# sh testcase for fcmpeq -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- # 1.0 == 1.0.
- fldi1 fr0
- fldi1 fr1
- fcmp/eq fr0, fr1
- bf wrong
-
- # 0.0 != 1.0.
- fldi0 fr0
- fldi1 fr1
- fcmp/eq fr0, fr1
- bt wrong
-
- # 1.0 != 0.0.
- fldi1 fr0
- fldi0 fr1
- fcmp/eq fr0, fr1
- bt wrong
-
- # 2.0 != 1.0
- fldi1 fr0
- fadd fr0, fr0
- fldi1 fr1
- fcmp/eq fr0, fr1
- bt wrong
-
- bra double
- # delay slot
- nop
-
-wrong:
- fail
-
-double:
- # 1.0 == 1.0
- fldi1 fr0
- fldi1 fr2
- _s2d fr0, dr0
- _s2d fr2, dr2
- _setpr
- fcmp/eq dr0, dr2
- bf wrong
- _clrpr
-
- # 0.0 != 1.0
- fldi0 fr0
- fldi1 fr2
- _s2d fr0, dr0
- _s2d fr2, dr2
- _setpr
- fcmp/eq dr0, dr2
- bt wrong
- _clrpr
-
- # 1.0 != 0.0
- fldi1 fr0
- fldi0 fr2
- _s2d fr0, dr0
- _s2d fr2, dr2
- _setpr
- fcmp/eq dr0, dr2
- bt wrong2
- _clrpr
-
- # 2.0 != 1.0
- fldi1 fr0
- fadd fr0, fr0
- fldi1 fr2
- _s2d fr0, dr0
- _s2d fr2, dr2
- _setpr
- fcmp/eq dr0, dr2
- bt wrong2
- _clrpr
-
-okay:
- pass
-
-wrong2:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/fcmpgt.cgs b/sim/testsuite/sim/sh64/compact/fcmpgt.cgs
deleted file mode 100644
index 931ae3e2e6c..00000000000
--- a/sim/testsuite/sim/sh64/compact/fcmpgt.cgs
+++ /dev/null
@@ -1,95 +0,0 @@
-# sh testcase for fcmpgt -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- # 1.0 !> 1.0.
- fldi1 fr0
- fldi1 fr1
- fcmp/gt fr0, fr1
- bt wrong
-
- # 0.0 !> 1.0.
- fldi0 fr0
- fldi1 fr1
- fcmp/gt fr0, fr1
- bf wrong
-
- # 1.0 > 0.0.
- fldi1 fr0
- fldi0 fr1
- fcmp/gt fr0, fr1
- bt wrong
-
- # 2.0 > 1.0
- fldi1 fr0
- fadd fr0, fr0
- fldi1 fr1
- fcmp/gt fr0, fr1
- bt wrong
-
- bra double
- nop
-
-wrong:
- fail
-
-double:
- # double precision tests.
- # 1.0 !> 1.0.
- fldi1 fr0
- fldi1 fr2
- _s2d fr0, dr0
- _s2d fr2, dr2
- _setpr
- fcmp/gt dr0, dr2
- bt wrong2
- _clrpr
-
- # 0.0 !> 1.0.
- fldi0 fr0
- fldi1 fr2
- _s2d fr0, dr0
- _s2d fr2, dr2
- _setpr
- fcmp/gt dr0, dr2
- bf wrong2
- _clrpr
-
- bra next
- nop
-
-wrong2:
- fail
-
-next:
- # 1.0 > 0.0.
- fldi1 fr0
- fldi0 fr2
- _s2d fr0, dr0
- _s2d fr2, dr2
- _setpr
- fcmp/gt dr0, dr2
- bt wrong2
- _clrpr
-
- # 2.0 > 1.0.
- fldi1 fr0
- fadd fr0, fr0
- fldi1 fr2
- _s2d fr0, dr0
- _s2d fr2, dr2
- _setpr
- fcmp/gt dr0, dr2
- bt wrong2
- _clrpr
-
-okay:
- pass
-
-wrong3:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/fcnvds.cgs b/sim/testsuite/sim/sh64/compact/fcnvds.cgs
deleted file mode 100644
index abf9e704ffb..00000000000
--- a/sim/testsuite/sim/sh64/compact/fcnvds.cgs
+++ /dev/null
@@ -1,13 +0,0 @@
-# sh testcase for fcnvds -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
- _setpr
- fcnvds dr0, fpul
- _clrpr
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/compact/fcnvsd.cgs b/sim/testsuite/sim/sh64/compact/fcnvsd.cgs
deleted file mode 100644
index 699bde55c6e..00000000000
--- a/sim/testsuite/sim/sh64/compact/fcnvsd.cgs
+++ /dev/null
@@ -1,27 +0,0 @@
-# sh testcase for fcnvsd -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
- fldi1 fr0
- flds fr0, fpul
- _setpr
- fcnvsd fpul, dr2
- _clrpr
-
- # Convert back.
- _setpr
- fcnvds dr2, fpul
- _clrpr
- fsts fpul, fr1
- fcmp/eq fr0, fr1
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/fdiv.cgs b/sim/testsuite/sim/sh64/compact/fdiv.cgs
deleted file mode 100644
index 06d1e93a014..00000000000
--- a/sim/testsuite/sim/sh64/compact/fdiv.cgs
+++ /dev/null
@@ -1,83 +0,0 @@
-# sh testcase for fdiv -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
- _clrpr
-
- # 1.0 / 0.0 should be INF
- # (and not crash the sim).
- fldi0 fr0
- fldi1 fr1
- fdiv fr0, fr1
-
- # 0.0 / 1.0 == 0.0.
- fldi0 fr0
- fldi1 fr1
- fdiv fr1, fr0
- fldi0 fr2
- fcmp/eq fr0, fr2
- bf wrong
-
- # 2.0 / 1.0 == 2.0.
- fldi1 fr1
- fldi1 fr2
- fadd fr2, fr2
- fdiv fr1, fr2
- # Load 2.0 into fr3.
- fldi1 fr3
- fadd fr3, fr3
- fcmp/eq fr2, fr3
- bf wrong
-
- # (1.0 / 2.0) + (1.0 / 2.0) == 1.0.
- fldi1 fr1
- fldi1 fr2
- fadd fr2, fr2
- fdiv fr2, fr1
- # fr1 should contain 0.5.
- fadd fr1, fr1
- # Load 1.0 into fr3.
- fldi1 fr3
- # Compare fr1 with fr3.
- fcmp/eq fr1, fr3
- bf wrong
-
- bra double
- nop
-
-wrong:
- fail
-
-double:
- # double test
- # (1.0 / 2.0) + (1.0 / 2.0) == 1.0.
- fldi1 fr1
- _s2d fr1, dr6
- fldi1 fr2
- fadd fr2, fr2
- _s2d fr2, dr8
- _setpr
- fdiv dr8, dr6
- # dr0 should contain 0.5.
- # double it, expect 1.0.
- fadd dr6, dr6
- _clrpr
-foo:
- # Load 1.0 into dr4.
- fldi1 fr1
- _s2d fr1, dr10
- # Compare dr0 with dr10.
- _setpr
- fcmp/eq dr6, dr10
- bf wrong2
- _clrpr
-
-okay:
- pass
-
-wrong2:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/fipr.cgs b/sim/testsuite/sim/sh64/compact/fipr.cgs
deleted file mode 100644
index 092f0f6c066..00000000000
--- a/sim/testsuite/sim/sh64/compact/fipr.cgs
+++ /dev/null
@@ -1,44 +0,0 @@
-# sh testcase for fipr $fvm, $fvn
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-initv1:
- fldi1 fr0
- # Load 2 into fr2.
- fldi1 fr1
- fadd fr1, fr1
- # Load 4 into fr2.
- fldi1 fr2
- fadd fr2, fr2
- fadd fr2, fr2
- fldi0 fr3
-
-initv2:
- fldi1 fr8
- fldi0 fr9
- fldi1 fr10
- fldi0 fr11
-
- fipr fv0, fv8
-
- # Result will be in fr11.
- fldi1 fr0
- fldi1 fr1
- # Two.
- fadd fr1, fr0
- # Four.
- fadd fr0, fr0
- # Five.
- fadd fr1, fr0
- fcmp/eq fr0, fr11
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/fldi0.cgs b/sim/testsuite/sim/sh64/compact/fldi0.cgs
deleted file mode 100644
index b0d35e4fb09..00000000000
--- a/sim/testsuite/sim/sh64/compact/fldi0.cgs
+++ /dev/null
@@ -1,17 +0,0 @@
-# sh testcase for fldi0 $frn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
- fldi0 fr0
- fldi0 fr2
- fldi0 fr4
- fldi0 fr6
- fldi0 fr8
- fldi0 fr10
- fldi0 fr12
- fldi0 fr14
- pass
diff --git a/sim/testsuite/sim/sh64/compact/fldi1.cgs b/sim/testsuite/sim/sh64/compact/fldi1.cgs
deleted file mode 100644
index 8bd5c521be2..00000000000
--- a/sim/testsuite/sim/sh64/compact/fldi1.cgs
+++ /dev/null
@@ -1,17 +0,0 @@
-# sh testcase for fldi1 $frn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
- fldi1 fr1
- fldi1 fr3
- fldi1 fr5
- fldi1 fr7
- fldi1 fr9
- fldi1 fr11
- fldi1 fr13
- fldi1 fr15
- pass
diff --git a/sim/testsuite/sim/sh64/compact/flds.cgs b/sim/testsuite/sim/sh64/compact/flds.cgs
deleted file mode 100644
index 797e7cba9ab..00000000000
--- a/sim/testsuite/sim/sh64/compact/flds.cgs
+++ /dev/null
@@ -1,26 +0,0 @@
-# sh testcase for flds -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- fldi0 fr0
- flds fr0, fpul
- fsts fpul, fr1
- fcmp/eq fr0, fr1
- bf wrong
-
- fldi1 fr0
- flds fr0, fpul
- fsts fpul, fr1
- fcmp/eq fr0, fr1
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/float.cgs b/sim/testsuite/sim/sh64/compact/float.cgs
deleted file mode 100644
index 8532d7fd651..00000000000
--- a/sim/testsuite/sim/sh64/compact/float.cgs
+++ /dev/null
@@ -1,80 +0,0 @@
-# sh testcase for float -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
-pos:
- mov #3, r0
- lds r0, fpul
- float fpul, fr7
-
- # Check the result.
- fldi1 fr0
- fldi1 fr1
- fadd fr0, fr1
- fadd fr0, fr1
- fcmp/eq fr1, fr7
- bf wrong
-
-neg:
- mov #3, r0
- neg r0, r0
- lds r0, fpul
- float fpul, fr7
-
- # Check the result.
- fldi1 fr0
- fldi1 fr1
- fadd fr0, fr1
- fadd fr0, fr1
- fneg fr1
- fcmp/eq fr1, fr7
- bf wrong
-
- bra double
- nop
-
-wrong:
- fail
-
-double:
- mov #3, r0
- lds r0, fpul
- _setpr
- float fpul, dr8
- _clrpr
- # check the result.
- fldi1 fr0
- fldi1 fr1
- fadd fr0, fr1
- fadd fr0, fr1
- _s2d fr1, dr2
- fcmp/eq dr2, dr8
- bf wrong
-
-dneg:
- mov #3, r0
- neg r0, r0
- lds r0, fpul
- _setpr
- float fpul, dr8
- _clrpr
- # check the result.
- fldi1 fr0
- fldi1 fr1
- fadd fr0, fr1
- fadd fr0, fr1
- fneg fr1
- _s2d fr1, dr2
- fcmp/eq dr2, dr8
- bf wrong
-
-okay:
- pass
-
-wrong2:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/fmac.cgs b/sim/testsuite/sim/sh64/compact/fmac.cgs
deleted file mode 100644
index dbf36ab78c8..00000000000
--- a/sim/testsuite/sim/sh64/compact/fmac.cgs
+++ /dev/null
@@ -1,78 +0,0 @@
-# sh testcase for fmac -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- # 0.0 * x + y = y.
-
- fldi0 fr0
- fldi1 fr1
- fldi1 fr2
- fmac fr0, fr1, fr2
- # check result.
- fldi1 fr0
- fcmp/eq fr0, fr2
- bf wrong
-
- # x * y + 0.0 = x * y.
-
- fldi1 fr0
- fldi1 fr1
- fldi0 fr2
- # double it.
- fadd fr1, fr2
- fmac fr0, fr1, fr2
- # check result.
- fldi1 fr0
- fadd fr0, fr0
- fcmp/eq fr0, fr2
- bf wrong
-
- # x * 0.0 + y = y.
-
- fldi1 fr0
- fldi0 fr1
- fldi1 fr2
- fadd fr2, fr2
- fmac fr0, fr1, fr2
- # check result.
- fldi1 fr0
- # double fr0.
- fadd fr0, fr0
- fcmp/eq fr0, fr2
- bf wrong
-
- # x * 0.0 + 0.0 = 0.0
-
- fldi1 fr0
- fadd fr0, fr0
- fldi0 fr1
- fldi0 fr2
- fmac fr0, fr1, fr2
- # check result.
- fldi0 fr0
- fcmp/eq fr0, fr2
- bf wrong
-
- # 0.0 * x + 0.0 = 0.0.
-
- fldi0 fr0
- fldi1 fr1
- # double it.
- fadd fr1, fr1
- fldi0 fr2
- fmac fr0, fr1, fr2
- # check result.
- fldi0 fr0
- fcmp/eq fr0, fr2
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/fmov.cgs b/sim/testsuite/sim/sh64/compact/fmov.cgs
deleted file mode 100644
index f4e1fde3c11..00000000000
--- a/sim/testsuite/sim/sh64/compact/fmov.cgs
+++ /dev/null
@@ -1,273 +0,0 @@
-# sh testcase for all fmov instructions
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- .macro init
- fldi0 fr0
- fldi1 fr2
- .endm
-
- # Set the SZ (SiZe) bit in the fpscr.
- .macro _setsz
- sts fpscr, r7
- mov #16, r8
- shll16 r8
- or r8, r7
- lds r7, fpscr
- .endm
-
- # Clear the SZ bit.
- .macro _clrsz
- sts fpscr, r7
- mov #16, r8
- shll16 r8
- not r8, r8
- and r8, r7
- lds r7, fpscr
- .endm
- start
-
-fmov1: # Test fr -> fr.
- init
- _clrpr
- _clrsz
- fmov fr0, fr10
- # Ensure fr0 and fr10 are now equal.
- fcmp/eq fr0, fr10
- bt fmov2
- fail
-
-fmov2: # Test dr -> dr.
- init
- _setpr
- _setsz
- fmov dr0, dr2
- # Ensure dr0 and dr2 are now equal.
- fcmp/eq dr0, dr2
- bt fmov3
- fail
-
-fmov3: # Test dr -> xd and xd -> dr.
- init
- _setsz
- fmov dr0, xd0
- # Ensure dr0 and xd0 are now equal.
- fmov xd0, dr2
- fcmp/eq dr0, dr2
- bt fmov4
- fail
-
-fmov4: # Test xd -> xd.
- init
- _setsz
- _setpr
- fmov dr0, xd0
- fmov xd0, xd2
- fmov xd2, dr2
- # Ensure dr0 and dr2 are now equal.
- fcmp/eq dr0, dr2
- bt fmov5
- fail
-
-fmov5: # Test fr -> @rn and @rn -> fr.
- init
- _clrsz
- _clrpr
- mov #40, r0
- shll8 r0
- fmov fr0, @r0
- fmov @r0, fr1
- fcmp/eq fr0, fr1
- bt fmov6
- fail
-
-fmov6: # Test dr -> @rn and @rn -> dr.
- init
- _setsz
- _setpr
- mov #40, r0
- shll8 r0
- fmov dr0, @r0
- fmov @r0, dr2
- fcmp/eq dr0, dr2
- bt fmov7
- fail
-
-fmov7: # Test xd -> @rn and @rn -> xd.
- init
- _setsz
- _setpr
- mov #40, r0
- shll8 r0
- fmov dr0, xd0
- fmov xd0, @r0
- fmov @r0, xd2
- fmov xd2, dr2
- fcmp/eq dr0, dr2
- bt fmov8
- fail
-
-fmov8: # Test fr -> @-rn.
- init
- _clrsz
- _clrpr
- mov #40, r0
- shll8 r0
- # Preserve.
- mov r0, r1
- fmov fr0, @-r0
- fmov @r0, fr2
- fcmp/eq fr0, fr2
- bt f8b
- fail
-f8b: # check pre-dec.
- add #4, r0
- cmp/eq r0, r1
- bt fmov9
- fail
-
-fmov9: # Test dr -> @-rn.
- init
- _setsz
- _setpr
- mov #40, r0
- shll8 r0
- # Preserve r0.
- mov r0, r1
- fmov dr0, @-r0
- fmov @r0, dr2
- fcmp/eq dr0, dr2
- bt f9b
- fail
-f9b: # check pre-dec.
- add #8, r0
- cmp/eq r0, r1
- bt fmov10
- fail
-
-fmov10: # Test xd -> @-rn.
- init
- _setsz
- _setpr
- mov #40, r0
- shll8 r0
- # Preserve r0.
- mov r0, r1
- fmov dr0, xd0
- fmov xd0, @-r0
- fmov @r0, xd2
- fmov xd2, dr2
- fcmp/eq dr0, dr2
- bt f10b
- fail
-f10b: # check pre-dec.
- add #8, r0
- cmp/eq r0, r1
- bt fmov11
- fail
-
-fmov11: # Test @rn+ -> fr.
- init
- _clrsz
- _clrpr
- mov #40, r0
- shll8 r0
- # Preserve r0.
- mov r0, r1
- fmov fr0, @r0
- fmov @r0+, fr2
- fcmp/eq fr0, fr2
- bt f11b
- fail
-f11b: # check post-inc.
- add #4, r1
- cmp/eq r0, r1
- bt fmov12
- fail
-
-fmov12: # Test @rn+ -> dr.
- init
- _setsz
- _setpr
- mov #40, r0
- shll8 r0
- # preserve r0.
- mov r0, r1
- fmov dr0, @r0
- fmov @r0+, dr2
- fcmp/eq dr0, dr2
- bt f12b
- fail
-f12b: # check post-inc.
- add #8, r1
- cmp/eq r0, r1
- bt fmov13
- fail
-
-fmov13: # Test @rn -> xd.
- init
- _setsz
- _setpr
- mov #40, r0
- shll8 r0
- # Preserve r0.
- mov r0, r1
- fmov dr0, xd0
- fmov xd0, @r0
- fmov @r0+, xd2
- fmov xd2, dr2
- fcmp/eq dr0, dr2
- bt f13b
- fail
-f13b:
- add #8, r1
- cmp/eq r0, r1
- bt fmov14
- fail
-
-fmov14: # Test fr -> @(r0,rn), @(r0, rn) -> fr.
- init
- _clrsz
- _clrpr
- mov #40, r0
- shll8 r0
- mov #0, r1
- fmov fr0, @(r0, r1)
- fmov @(r0, r1), fr1
- fcmp/eq fr0, fr1
- bt fmov15
- fail
-
-fmov15: # Test dr -> @(r0, rn), @(r0, rn) -> dr.
- init
- _setsz
- _setpr
- mov #40, r0
- shll8 r0
- mov #0, r1
- fmov dr0, @(r0, r1)
- fmov @(r0, r1), dr2
- fcmp/eq dr0, dr2
- bt fmov16
- fail
-
-fmov16: # Test xd -> @(r0, rn), @(r0, rn) -> xd.
- init
- _setsz
- _setpr
- mov #40, r0
- shll8 r0
- mov #0, r1
- fmov dr0, xd0
- fmov xd0, @(r0, r1)
- fmov @(r0, r1), xd2
- fmov xd2, dr2
- fcmp/eq dr0, dr2
- bt okay
- fail
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/compact/fmul.cgs b/sim/testsuite/sim/sh64/compact/fmul.cgs
deleted file mode 100644
index a1325d6395b..00000000000
--- a/sim/testsuite/sim/sh64/compact/fmul.cgs
+++ /dev/null
@@ -1,121 +0,0 @@
-# sh testcase for fmul -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- .macro init
- fldi0 fr0
- fldi1 fr1
- fldi1 fr2
- fadd fr2, fr2
- fldi0 fr7
- fldi1 fr8
- .endm
-
- start
-
- # 0.0 * 0.0 = 0.0.
- init
- fmul fr0, fr0
- fcmp/eq fr7, fr0
- bf wrong
-
- # 0.0 * 1.0 = 0.0.
- init
- fmul fr1, fr0
- fcmp/eq fr7, fr0
- bf wrong
-
- # 1.0 * 0.0 = 0.0.
- init
- fmul fr0, fr1
- fcmp/eq fr7, fr1
- bf wrong
-
- # 1.0 * 1.0 = 1.0.
- init
- fmul fr1, fr1
- fcmp/eq fr8, fr1
- bf wrong
-
- # 2.0 * 1.0 = 2.0.
- init
- fmul fr2, fr1
- fcmp/eq fr2, fr1
- bf wrong
-
- bra double
- nop
-
-wrong:
- fail
-
- .macro dinit
- fldi0 fr0
- fldi1 fr2
- fldi1 fr4
- fadd fr4, fr4
- fldi0 fr8
- fldi1 fr10
- _s2d fr0, dr0
- _s2d fr2, dr2
- _s2d fr4, dr4
- _s2d fr8, dr8
- _s2d fr10, dr10
- .endm
-
-double:
- # 0.0 * 0.0 = 0.0.
- dinit
- _setpr
- fmul dr0, dr0
- fcmp/eq dr8, dr0
- bf wrong
- _clrpr
-
- # 0.0 * 1.0 = 0.0.
- dinit
- _setpr
- fmul dr2, dr0
- fcmp/eq dr8, dr0
- bf wrong2
- _clrpr
-
- # 1.0 * 0.0 = 0.0.
- dinit
- _setpr
- fmul dr0, dr2
- fcmp/eq dr8, dr2
- bf wrong2
- _clrpr
-
- bra next
- nop
-
-wrong2:
- fail
-
-next:
- # 1.0 * 1.0 = 1.0.
- dinit
- _setpr
- fmul dr2, dr2
- fcmp/eq dr10, dr2
- bf wrong3
- _clrpr
-
- # 2.0 * 1.0 = 2.0.
- dinit
- _setpr
- fmul dr4, dr2
- fcmp/eq dr4, dr2
- bf wrong3
- _clrpr
-
-okay:
- pass
-
-wrong3:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/fneg.cgs b/sim/testsuite/sim/sh64/compact/fneg.cgs
deleted file mode 100644
index 71fc901fb6d..00000000000
--- a/sim/testsuite/sim/sh64/compact/fneg.cgs
+++ /dev/null
@@ -1,83 +0,0 @@
-# sh testcase for fneg -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- # neg(0.0) = 0.0.
- fldi0 fr0
- fldi0 fr1
- fneg fr0
- fcmp/eq fr0, fr1
- bf wrong
-
- # neg(1.0) = fsub(0,1)
- fldi1 fr0
- fneg fr0
- fldi0 fr1
- fldi1 fr2
- fsub fr2, fr1
- fcmp/eq fr0, fr1
- bf wrong
-
- # neg(neg(1.0)) = 1.0.
- fldi1 fr0
- fldi1 fr1
- fneg fr0
- fneg fr0
- fcmp/eq fr0, fr1
- bf wrong
-
- bra double
- nop
-
-wrong:
- fail
-
-double:
- # neg(0.0) = 0.0.
- fldi0 fr0
- fldi0 fr2
- _s2d fr0, dr0
- _s2d fr2, dr2
- _setpr
- fneg dr0
- fcmp/eq dr0, dr2
- bf wrong2
- _clrpr
-
- # neg(1.0) = fsub(0,1)
- fldi1 fr0
- _s2d fr0, dr0
- _setpr
- fneg dr0
- _clrpr
- fldi0 fr2
- fldi1 fr3
- fsub fr3, fr2
- _s2d fr2, dr2
- _setpr
- fcmp/eq fr0, fr2
- bf wrong2
- _clrpr
-
- # neg(neg(1.0)) = 1.0.
- fldi1 fr0
- _s2d fr0, dr0
- fldi1 fr2
- _s2d fr2, dr2
- _setpr
- fneg dr0
- fneg dr2
- fcmp/eq dr0, dr2
- bf wrong2
- _clrpr
-
-okay:
- pass
-
-wrong2:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/frchg.cgs b/sim/testsuite/sim/sh64/compact/frchg.cgs
deleted file mode 100644
index 6f2e743fc37..00000000000
--- a/sim/testsuite/sim/sh64/compact/frchg.cgs
+++ /dev/null
@@ -1,13 +0,0 @@
-# sh testcase for frchg
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
- frchg
- frchg
- frchg
- frchg
- pass
diff --git a/sim/testsuite/sim/sh64/compact/fschg.cgs b/sim/testsuite/sim/sh64/compact/fschg.cgs
deleted file mode 100644
index 54a1491962b..00000000000
--- a/sim/testsuite/sim/sh64/compact/fschg.cgs
+++ /dev/null
@@ -1,13 +0,0 @@
-# sh testcase for fschg
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
- fschg
- fschg
- fschg
- fschg
- pass
diff --git a/sim/testsuite/sim/sh64/compact/fsqrt.cgs b/sim/testsuite/sim/sh64/compact/fsqrt.cgs
deleted file mode 100644
index 933e112c903..00000000000
--- a/sim/testsuite/sim/sh64/compact/fsqrt.cgs
+++ /dev/null
@@ -1,93 +0,0 @@
-# sh testcase for fsqrt -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- # sqrt(0.0) = 0.0.
- fldi0 fr0
- fsqrt fr0
- fldi0 fr1
- fcmp/eq fr0, fr1
- bf wrong
-
- # sqrt(1.0) = 1.0.
- fldi1 fr0
- fsqrt fr0
- fldi1 fr1
- fcmp/eq fr0, fr1
- bf wrong
-
- # sqrt(4.0) = 2.0
- fldi1 fr0
- # Double it.
- fadd fr0, fr0
- # Double it again.
- fadd fr0, fr0
- fsqrt fr0
- fldi1 fr1
- # Double it.
- fadd fr1, fr1
- fcmp/eq fr0, fr1
- bf wrong
-
- bra double
- nop
-
-wrong:
- fail
-
-double:
- # sqrt(0.0) = 0.0.
- fldi0 fr0
- _s2d fr0, dr0
- _setpr
- fsqrt dr0
- _clrpr
- fldi0 fr2
- _s2d fr2, dr2
- _setpr
- fcmp/eq dr0, dr2
- bf wrong2
- _clrpr
-
- # sqrt(1.0) = 1.0.
- fldi1 fr0
- _s2d fr0, dr0
- _setpr
- fsqrt dr0
- _clrpr
- fldi1 fr2
- _s2d fr2, dr2
- _setpr
- fcmp/eq fr0, fr2
- bf wrong2
- _clrpr
-
- # sqrt(4.0) = 2.0.
- fldi1 fr0
- # Double it.
- fadd fr0, fr0
- # Double it again.
- fadd fr0, fr0
- _s2d fr0, dr0
- _setpr
- fsqrt dr0
- _clrpr
- fldi1 fr2
- # Double it.
- fadd fr2, fr2
- _s2d fr2, dr2
- _setpr
- fcmp/eq fr0, fr2
- bf wrong2
- _clrpr
-
-okay:
- pass
-
-wrong2:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/fsts.cgs b/sim/testsuite/sim/sh64/compact/fsts.cgs
deleted file mode 100644
index 518533db094..00000000000
--- a/sim/testsuite/sim/sh64/compact/fsts.cgs
+++ /dev/null
@@ -1,11 +0,0 @@
-# sh testcase for fsts fpul, $frn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
- fsts fpul, fr0
- fsts fpul, fr1
- pass
diff --git a/sim/testsuite/sim/sh64/compact/fsub.cgs b/sim/testsuite/sim/sh64/compact/fsub.cgs
deleted file mode 100644
index 346d01ffcaa..00000000000
--- a/sim/testsuite/sim/sh64/compact/fsub.cgs
+++ /dev/null
@@ -1,120 +0,0 @@
-# sh testcase for fmul -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
- # 0.0 - 0.0 = 0.0.
- fldi0 fr0
- fldi0 fr1
- fsub fr0, fr1
- fldi0 fr2
- fcmp/eq fr1, fr2
- bf wrong
-
- # 1.0 - 0.0 = 1.0.
- fldi0 fr0
- fldi1 fr1
- fsub fr0, fr1
- fldi1 fr2
- fcmp/eq fr1, fr2
- bf wrong
-
- # 1.0 - 1.0 = 0.0.
- fldi1 fr0
- fldi1 fr1
- fsub fr0, fr1
- fldi0 fr2
- fcmp/eq fr1, fr2
- bf wrong
-
- # 0.0 - 1.0 = -1.0.
- fldi1 fr0
- fldi0 fr1
- fsub fr0, fr1
- fldi1 fr2
- fneg fr2
- fcmp/eq fr1, fr2
- bf wrong
-
- bra double
- nop
-
-wrong:
- fail
-
-double:
- # 0.0 - 0.0 = 0.0.
- fldi0 fr0
- fldi0 fr2
- _s2d fr0, dr0
- _s2d fr2, dr2
- _setpr
- fsub dr0, dr2
- _clrpr
- fldi0 fr4
- _s2d fr4, dr4
- _setpr
- fcmp/eq dr2, dr4
- bf wrong
- _clrpr
-
-onezero:
- # 1.0 - 0.0 = 1.0.
- fldi0 fr0
- fldi1 fr2
- _s2d fr0, dr0
- _s2d fr2, dr2
- _setpr
- fsub dr0, dr2
- _clrpr
- fldi1 fr4
- _s2d fr4, dr4
- _setpr
- fcmp/eq dr2, dr4
- bf wrong2
- _clrpr
-
-oneone:
- # 1.0 - 1.0 = 0.0.
- fldi1 fr0
- fldi1 fr2
- _s2d fr0, dr0
- _s2d fr2, dr2
- _setpr
- fsub dr0, dr2
- _clrpr
- fldi0 fr4
- _s2d fr4, dr4
- _setpr
- fcmp/eq dr2, dr4
- bf wrong2
- _clrpr
-
- bra zeroone
- nop
-
-wrong2:
- fail
-
-zeroone:
- # 0.0 - 1.0 = -1.0.
- fldi1 fr0
- fldi0 fr2
- _s2d fr0, dr0
- _s2d fr2, dr2
- _setpr
- fsub dr0, dr2
- _clrpr
- fldi1 fr4
- fneg fr4
- _s2d fr4, dr4
- _setpr
- fcmp/eq dr2, dr4
- bf wrong2
- _clrpr
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/compact/ftrc.cgs b/sim/testsuite/sim/sh64/compact/ftrc.cgs
deleted file mode 100644
index 6a89744b33e..00000000000
--- a/sim/testsuite/sim/sh64/compact/ftrc.cgs
+++ /dev/null
@@ -1,132 +0,0 @@
-# sh testcase for ftrc -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- # ftrc(0.0) = 0.
- fldi0 fr0
- ftrc fr0, fpul
- # check results.
- mov #0, r0
- sts fpul, r1
- cmp/eq r0, r1
- bf wrong
-
- # ftrc(1.5) = 1.
- fldi1 fr0
- fldi1 fr1
- fldi1 fr2
- # double it.
- fadd fr2, fr2
- # form the fraction.
- fdiv fr2, fr1
- fadd fr1, fr0
- # now we've got 1.5 in fr0.
- ftrc fr0, fpul
- # check results.
- mov #1, r0
- sts fpul, r1
- cmp/eq r0, r1
- bf wrong
-
- # ftrc(-1.5) = -1.
- fldi1 fr0
- fneg fr0
- fldi1 fr1
- fldi1 fr2
- # double it.
- fadd fr2, fr2
- # form the fraction.
- fdiv fr2, fr1
- fneg fr1
- # -1 + -0.5 = -1.5.
- fadd fr1, fr0
- # now we've got 1.5 in fr0.
- ftrc fr0, fpul
- # check results.
- mov #1, r0
- neg r0, r0
- sts fpul, r1
- cmp/eq r0, r1
- bf wrong
-
- bra double
- nop
-
-wrong:
- fail
-
-double:
- # ftrc(0.0) = 0.
- fldi0 fr0
- _s2d fr0, dr0
- _setpr
- ftrc dr0, fpul
- _clrpr
- # check results.
- mov #0, r0
- sts fpul, r1
- cmp/eq r0, r1
-foo:
- bf wrong2
-
- # ftrc(1.5) = 1.
- fldi1 fr0
- fldi1 fr2
- fldi1 fr4
- # double it.
- fadd fr4, fr4
- # form 0.5.
- fdiv fr4, fr2
- fadd fr2, fr0
- # now we've got 1.5 in fr0, so do some single->double
- # conversions and perform the ftrc.
- _s2d fr0, dr0
- _s2d fr2, dr2
- _s2d fr4, dr4
- _setpr
- ftrc dr0, fpul
- _clrpr
-
- # check results.
- mov #1, r0
- sts fpul, r1
- cmp/eq r0, r1
- bf wrong2
-
- # ftrc(-1.5) = -1.
- fldi1 fr0
- fneg fr0
- fldi1 fr2
- fldi1 fr4
- # double it.
- fadd fr4, fr4
- # form the fraction.
- fdiv fr4, fr2
- fneg fr2
- # -1 + -0.5 = -1.5.
- fadd fr2, fr0
- # now we've got 1.5 in fr0, so do some single->double
- # conversions and perform the ftrc.
- _s2d fr0, dr0
- _s2d fr2, dr2
- _s2d fr4, dr4
- _setpr
- ftrc dr0, fpul
- _clrpr
-
- # check results.
- mov #1, r0
- neg r0, r0
- sts fpul, r1
- cmp/eq r0, r1
- bf wrong2
-
-okay:
- pass
-wrong2:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/ftrv.cgs b/sim/testsuite/sim/sh64/compact/ftrv.cgs
deleted file mode 100644
index 9bdf806ba13..00000000000
--- a/sim/testsuite/sim/sh64/compact/ftrv.cgs
+++ /dev/null
@@ -1,74 +0,0 @@
-# sh testcase for ftrv xmtrx, $fvn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- # set the fr bit in the fpscr
- .macro _setfr
- sts fpscr, r7
- mov #32, r8
- shll16 r8
- or r8, r7
- lds r7, fpscr
- .endm
-
- # clear the fr bit
- .macro _clrfr
- sts fpscr, r7
- mov #32, r8
- shll16 r8
- not r8, r8
- and r8, r7
- lds r7, fpscr
- .endm
-
- .macro incr old new
- fldi1 \new
- fadd \old, \new
- .endm
-
- start
- _setfr
-popmtrx:
- # 1.0.
- fldi1 fr0
- # 2.0.
- fldi1 fr1
- fadd fr1, fr1
-
- incr fr1, fr2
- incr fr2, fr3
- incr fr3, fr4
- incr fr4, fr5
- incr fr5, fr6
- incr fr6, fr7
- incr fr7, fr8
- incr fr8, fr9
- incr fr9, fr10
- incr fr10, fr11
- incr fr11, fr12
- incr fr12, fr13
- incr fr13, fr14
- incr fr14, fr15
-
-popvect:
- # Swtich fp banks.
- _clrfr
- fldi1 fr4
- fldi1 fr5
- fadd fr5, fr5
- fldi1 fr6
- fadd fr5, fr6
- fldi1 fr7
- fadd fr6, fr7
-
-ftrv:
- # fr[4,7] should contain the results:
- # { 30, 70, 110, 150 }.
- ftrv xmtrx, fv4
-
-okay:
- pass
-
diff --git a/sim/testsuite/sim/sh64/compact/jmp.cgs b/sim/testsuite/sim/sh64/compact/jmp.cgs
deleted file mode 100644
index e9e99401545..00000000000
--- a/sim/testsuite/sim/sh64/compact/jmp.cgs
+++ /dev/null
@@ -1,29 +0,0 @@
-# sh testcase for jmp @$rn
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global jmp
-jmp:
- # Load 0x1010 into r0.
- mov #1, r0
- shll8 r0
- shll2 r0
- shll2 r0
- add #16, r0
- jmp @r0
-slot:
- nop
-bad:
- fail
-okay:
- pass
-alsobad:
- fail
- fail
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/jsr.cgs b/sim/testsuite/sim/sh64/compact/jsr.cgs
deleted file mode 100644
index 5ad7aefc931..00000000000
--- a/sim/testsuite/sim/sh64/compact/jsr.cgs
+++ /dev/null
@@ -1,29 +0,0 @@
-# sh testcase for jsr @$rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global jsr
-jsr:
- # Load 0x1010 into r0.
- mov #1, r0
- shll8 r0
- shll2 r0
- shll2 r0
- add #16, r0
- jsr @r0
-slot:
- nop
-bad:
- fail
-okay:
- pass
-alsobad:
- fail
- fail
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/ldc-gbr.cgs b/sim/testsuite/sim/sh64/compact/ldc-gbr.cgs
deleted file mode 100644
index b19a3c194fe..00000000000
--- a/sim/testsuite/sim/sh64/compact/ldc-gbr.cgs
+++ /dev/null
@@ -1,22 +0,0 @@
-# sh testcase for ldc $rn, gbr -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global ldc
-ldc:
- mov #40, r0
- shll8 r0
- ldc r0, gbr
- stc gbr, r1
- cmp/eq r0, r1
- bf wrong
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/ldcl-gbr.cgs b/sim/testsuite/sim/sh64/compact/ldcl-gbr.cgs
deleted file mode 100644
index 613e58e722c..00000000000
--- a/sim/testsuite/sim/sh64/compact/ldcl-gbr.cgs
+++ /dev/null
@@ -1,28 +0,0 @@
-# sh testcase for ldc.l @${rn}+, gbr -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global ldcl
-ldcl:
- mov #40, r0
- shll8 r0
- # Preserve address.
- mov r0, r1
- ldc.l @r0+, gbr
-
- # Add 4 to saved address (r1).
- # Then compare with r0.
- add #4, r1
- cmp/eq r0, r1
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/lds-fpscr.cgs b/sim/testsuite/sim/sh64/compact/lds-fpscr.cgs
deleted file mode 100644
index 2dce253375d..00000000000
--- a/sim/testsuite/sim/sh64/compact/lds-fpscr.cgs
+++ /dev/null
@@ -1,22 +0,0 @@
-# sh testcase for lds $rn, fpscr -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global lds_fpscr
-lds_fpscr:
- mov #0, r0
- lds r0, fpscr
-readback:
- sts fpscr, r1
- cmp/eq r0, r1
- bf wrong
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/lds-fpul.cgs b/sim/testsuite/sim/sh64/compact/lds-fpul.cgs
deleted file mode 100644
index 1a80a7032ea..00000000000
--- a/sim/testsuite/sim/sh64/compact/lds-fpul.cgs
+++ /dev/null
@@ -1,17 +0,0 @@
-# sh testcase for lds $rn, fpul -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global lds_fpul
-lds_fpul:
- mov #63, r0
- shll8 r0
- add #128, r0
- shll16 r0
- lds r0, fpul
- pass
diff --git a/sim/testsuite/sim/sh64/compact/lds-mach.cgs b/sim/testsuite/sim/sh64/compact/lds-mach.cgs
deleted file mode 100644
index 1ffd6566c9a..00000000000
--- a/sim/testsuite/sim/sh64/compact/lds-mach.cgs
+++ /dev/null
@@ -1,23 +0,0 @@
-# sh testcase for lds $rn, mach
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global lds_mach
-lds_mach:
- mov #41, r0
- shll8 r0
- lds r0, mach
-readback:
- sts mach, r1
- cmp/eq r0, r1
- bf wrong
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/lds-macl.cgs b/sim/testsuite/sim/sh64/compact/lds-macl.cgs
deleted file mode 100644
index f09315abbb6..00000000000
--- a/sim/testsuite/sim/sh64/compact/lds-macl.cgs
+++ /dev/null
@@ -1,23 +0,0 @@
-# sh testcase for lds $rn, macl
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global lds_macl
-lds_macl:
- mov #42, r0
- shll8 r0
- lds r0, macl
-readback:
- sts macl, r1
- cmp/eq r0, r1
- bf wrong
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/lds-pr.cgs b/sim/testsuite/sim/sh64/compact/lds-pr.cgs
deleted file mode 100644
index 97e3a650767..00000000000
--- a/sim/testsuite/sim/sh64/compact/lds-pr.cgs
+++ /dev/null
@@ -1,23 +0,0 @@
-# sh testcase for lds $rn, pr
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global lds_pr
-lds_pr:
- mov #40, r0
- shll8 r0
- lds r0, pr
-readback:
- sts pr, r1
- cmp/eq r0, r1
- bf wrong
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/ldsl-fpscr.cgs b/sim/testsuite/sim/sh64/compact/ldsl-fpscr.cgs
deleted file mode 100644
index 642f15dc527..00000000000
--- a/sim/testsuite/sim/sh64/compact/ldsl-fpscr.cgs
+++ /dev/null
@@ -1,43 +0,0 @@
-# sh testcase for lds.l @${rn}+, fpscr -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- mov #40, r0
- shll8 r0
- # save address for later examination.
- mov r0, r1
-
- # Build up a distinctive bit pattern.
- mov #1, r2
- shll8 r2
- add #12, r2
- shll8 r2
- add #85, r2
- shll8 r2
- add #170, r2
- # Store it in memory.
- mov.l r2, @r0
-
- lds.l @r0+, fpscr
-
-check:
- # Read it back.
- sts fpscr, r3
- cmp/eq r2, r3
- bf wrong
-
-inc:
- # Test for proper post-increment.
- add #4, r1
- cmp/eq r0, r1
- bf wrong
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/ldsl-fpul.cgs b/sim/testsuite/sim/sh64/compact/ldsl-fpul.cgs
deleted file mode 100644
index 428a5b71816..00000000000
--- a/sim/testsuite/sim/sh64/compact/ldsl-fpul.cgs
+++ /dev/null
@@ -1,27 +0,0 @@
-# sh testcase for lds.l @${rn}+, fpul -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global ldsl_fpul
-ldsl_fpul:
- mov #40, r0
- shll8 r0
- # remember the address.
- mov r0, r1
- lds.l @r0+, fpul
-
- # ensure post increment occurred.
- add #4, r1
- cmp/eq r0, r1
- bf wrong
-
-okay:
- pass
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/ldsl-mach.cgs b/sim/testsuite/sim/sh64/compact/ldsl-mach.cgs
deleted file mode 100644
index f5ffdec8dce..00000000000
--- a/sim/testsuite/sim/sh64/compact/ldsl-mach.cgs
+++ /dev/null
@@ -1,26 +0,0 @@
-# sh testcase for lds.l @${rn}+, mach -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global ldsl_mach
-ldsl_mach:
- mov #40, r0
- shll8 r0
- # save address for later examination.
- mov r0, r1
-
- lds.l @r0+, mach
-
- add #4, r1
- cmp/eq r0, r1
- bf wrong
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/ldsl-macl.cgs b/sim/testsuite/sim/sh64/compact/ldsl-macl.cgs
deleted file mode 100644
index 4e21bf1942f..00000000000
--- a/sim/testsuite/sim/sh64/compact/ldsl-macl.cgs
+++ /dev/null
@@ -1,26 +0,0 @@
-# sh testcase for lds.l @${rn}+, macl -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global ldsl_macl
-ldsl_macl:
- mov #40, r0
- shll8 r0
- # save address for later examination.
- mov r0, r1
-
- lds.l @r0+, macl
-
- add #4, r1
- cmp/eq r0, r1
- bf wrong
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/ldsl-pr.cgs b/sim/testsuite/sim/sh64/compact/ldsl-pr.cgs
deleted file mode 100644
index eb8ee531bd3..00000000000
--- a/sim/testsuite/sim/sh64/compact/ldsl-pr.cgs
+++ /dev/null
@@ -1,28 +0,0 @@
-# sh testcase for lds.l @${rn}+, pr -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global ldsl_pr
-ldsl_pr:
- mov #40, r0
- shll8 r0
- # Preserve address.
- mov r0, r1
- lds.l @r0+, pr
-
- # Add 4 to saved address (r1).
- # Then compare with r0.
- add #4, r1
- cmp/eq r0, r1
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/macl.cgs b/sim/testsuite/sim/sh64/compact/macl.cgs
deleted file mode 100644
index ef2dfa6e929..00000000000
--- a/sim/testsuite/sim/sh64/compact/macl.cgs
+++ /dev/null
@@ -1,76 +0,0 @@
-# sh testcase for mac.l @${rm}+, @${rn}+
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
- # force S-bit clear
- clrs
-
- # Store some magic numbers in memory.
- mov #40, r1
- shll8 r1
- mov #85, r0
- mov.l r0, @r1
- # Keep for later.
- mov r1, r10
-store2:
- mov #40, r1
- shll8 r1
- add #12, r1
- mov #17, r0
- mov.l r0, @r1
- # Keep for later.
- mov r1, r11
-
-init:
- # Set up addresses.
- mov #40, r1
- shll8 r1
- mov #40, r2
- shll8 r2
- add #12, r2
-
- # Prime {MACL, MACH} to #1.
- mov #1, r3
- dmulu.l r3, r3
-
-test:
- mac.l @r1+, @r2+
-
-check:
- # Check result.
- sts mach, r5
- assert r5, #0
-
- mov #5, r0
- shll8 r0
- or #166, r0
- sts macl, r6
- cmp/eq r6, r0
- bf wrong
-
- # Ensure post-increment occurred.
- add #4, r10
- cmp/eq r10, r1
- bf wrong
-
- add #4, r11
- cmp/eq r11, r2
- bf wrong
-
-doubleinc:
- mov #40, r0
- shll8 r0
- mov r0, r1
- mac.l @r0+, @r0+
- add #16, r1
- cmp/eq r0, r1
- bf wrong
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/macw.cgs b/sim/testsuite/sim/sh64/compact/macw.cgs
deleted file mode 100644
index f5935f7054d..00000000000
--- a/sim/testsuite/sim/sh64/compact/macw.cgs
+++ /dev/null
@@ -1,70 +0,0 @@
-# sh testcase for mac.w @${rm}+, @${rn}+
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- # Store some magic numbers in memory.
- mov #40, r1
- shll8 r1
- mov #85, r0
- mov.l r0, @r1
- # Keep for later.
- mov r1, r10
-store2:
- mov #40, r1
- shll8 r1
- add #12, r1
- mov #17, r0
- mov.l r0, @r1
- # Keep for later.
- mov r1, r11
-
-init:
- # Set up addresses.
- mov #40, r1
- shll8 r1
- mov #40, r2
- shll8 r2
- add #12, r2
-
- # Prime {MACL, MACH} to #1.
- mov #1, r3
- dmulu.l r3, r3
-
-test:
- mac.w @r1+, @r2+
-
-check:
- # Check result.
- sts mach, r5
- assert r5, #0
-
- sts macl, r6
- assert r6, #1
-
- # Ensure post-increment occurred.
- add #2, r10
- cmp/eq r10, r1
- bf wrong
-
- add #2, r11
- cmp/eq r11, r2
- bf wrong
-
-doubleinc:
- mov #40, r0
- shll8 r0
- mov r0, r1
- mac.w @r0+, @r0+
- add #8, r1
- cmp/eq r0, r1
- bf wrong
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/mov.cgs b/sim/testsuite/sim/sh64/compact/mov.cgs
deleted file mode 100644
index 9442388384e..00000000000
--- a/sim/testsuite/sim/sh64/compact/mov.cgs
+++ /dev/null
@@ -1,40 +0,0 @@
-# sh testcase for mov $rm64, $rn64
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global mov
-mov:
- mov #1, r0
- rotr r0
- mov #0, r15
- mov #10, r0
-
- mov r0, r1
- mov r1, r2
- mov r2, r3
- mov r3, r4
- mov r4, r5
- mov r5, r6
- mov r6, r7
- mov r7, r8
- mov r8, r9
- mov r9, r10
- mov r10, r11
- mov r11, r12
- mov r12, r13
- mov r13, r14
- mov r14, r15
-
- cmp/eq r0, r15
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/mova.cgs b/sim/testsuite/sim/sh64/compact/mova.cgs
deleted file mode 100644
index f555d66e093..00000000000
--- a/sim/testsuite/sim/sh64/compact/mova.cgs
+++ /dev/null
@@ -1,29 +0,0 @@
-# sh testcase for mova @($imm8x4, pc), r0 -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global mova
-mova:
- mova @(40, pc), r0
- mov #16, r1
- shll8 r1
- add #40, r1
- cmp/eq r0, r1
- bf wrong
- mova @(12, pc), r0
- mov #16, r1
- shll8 r1
- add #24, r1
- cmp/eq r0, r1
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/movb1.cgs b/sim/testsuite/sim/sh64/compact/movb1.cgs
deleted file mode 100644
index 8278e1bbeaa..00000000000
--- a/sim/testsuite/sim/sh64/compact/movb1.cgs
+++ /dev/null
@@ -1,27 +0,0 @@
-# sh testcase for mov.b $rm, @$rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
- mov #55, r1
- mov #40, r2
- shll8 r2
- mov.b r1, @r2
-
- # Load it back into r3.
- mov #40, r2
- shll8 r2
- mov.b @r2, r3
-
- # Make sure r1 and r3 match.
- cmp/eq r1, r3
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/movb10.cgs b/sim/testsuite/sim/sh64/compact/movb10.cgs
deleted file mode 100644
index 0ddb736f868..00000000000
--- a/sim/testsuite/sim/sh64/compact/movb10.cgs
+++ /dev/null
@@ -1,25 +0,0 @@
-# sh testcase for mov.b @($imm4, $rm), r0 -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
- mov #30, r1
- shll8 r1
- # Store something there first.
- mov #0, r0
- or #170, r0
- mov r0, r7
- mov.b r0, @(3, r1)
- # Load it back.
- mov.b @(3, r1), r0
- and #255, r0
- cmp/eq r0, r7
- bf wrong
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/movb2.cgs b/sim/testsuite/sim/sh64/compact/movb2.cgs
deleted file mode 100644
index 692c34fb648..00000000000
--- a/sim/testsuite/sim/sh64/compact/movb2.cgs
+++ /dev/null
@@ -1,34 +0,0 @@
-# sh testcase for mov.b $rm, @-$rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
- mov #40, r1
- shll8 r1
- mov #55, r2
-
- # Save ADDR, DATA.
- mov r1, r7
- mov r2, r8
-
- # Do the move.
- mov.b r2, @-r1
-
- # Load the value back into r3.
- mov.b @r1, r3
- cmp/eq r2, r3
- bf wrong
-
- # Ensure that r1 has been decremented.
- mov #1, r0
- sub r0, r7
- cmp/eq r7, r1
- bf wrong
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/movb3.cgs b/sim/testsuite/sim/sh64/compact/movb3.cgs
deleted file mode 100644
index 6143562b8c1..00000000000
--- a/sim/testsuite/sim/sh64/compact/movb3.cgs
+++ /dev/null
@@ -1,30 +0,0 @@
-# sh testcase for mov.b $rm, @(r0,$rn) -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
- mov #40, r2
- shll8 r2
- mov #3, r1
- mov #0, r0
- or #170, r0
- mov r0, r3
- mov r2, r0
- mov.b r3, @(r0, r1)
-
- # Load the value back into a different register.
- mov.b @(r0, r1), r4
- # Check the lowest order byte matches the stored value.
- mov r4, r0
- and #255, r0
- cmp/eq r0, r3
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/movb4.cgs b/sim/testsuite/sim/sh64/compact/movb4.cgs
deleted file mode 100644
index d30a7a8641f..00000000000
--- a/sim/testsuite/sim/sh64/compact/movb4.cgs
+++ /dev/null
@@ -1,28 +0,0 @@
-# sh testcase for mov.b r0, @($imm8, gbr) -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
- mov #0, r0
- or #170, r0
- mov r0, r3
- mov #30, r2
- ldc r2, gbr
- mov.b r0, @(40, gbr)
-
- # Load the value back into a different register.
- mov.b @(40, gbr), r0
- # Check the lowest order byte matches the stored value.
- and #255, r0
- cmp/eq r0, r3
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/movb5.cgs b/sim/testsuite/sim/sh64/compact/movb5.cgs
deleted file mode 100644
index 4f6795a8860..00000000000
--- a/sim/testsuite/sim/sh64/compact/movb5.cgs
+++ /dev/null
@@ -1,25 +0,0 @@
-# sh testcase for mov.b r0, @($imm4, rm) -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
- mov #0, r0
- or #170, r0
- mov r0, r3
- mov #30, r2
- mov.b r0, @(3, r2)
-
- # Load the value back into a different register.
- mov.b @(3, r2), r0
- and #255, r0
- cmp/eq r3, r0
- bf wrong
-
-okay:
- pass
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/movb6.cgs b/sim/testsuite/sim/sh64/compact/movb6.cgs
deleted file mode 100644
index 9ddebde5ce4..00000000000
--- a/sim/testsuite/sim/sh64/compact/movb6.cgs
+++ /dev/null
@@ -1,26 +0,0 @@
-# sh testcase for mov.b @$rm, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
- mov #30, r2
- shll8 r2
- # Store something first.
- mov #0, r0
- or #170, r0
- mov r0, r7
- mov.b r7, @r2
- # Load it back.
- mov.b @r2, r1
- mov r1, r0
- and #255, r0
- cmp/eq r7, r0
- bf wrong
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/movb7.cgs b/sim/testsuite/sim/sh64/compact/movb7.cgs
deleted file mode 100644
index f55a223436b..00000000000
--- a/sim/testsuite/sim/sh64/compact/movb7.cgs
+++ /dev/null
@@ -1,35 +0,0 @@
-# sh testcase for mov.b @${rm}+, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
- mov #30, r1
- shll8 r1
- # Store addr.
- mov r1, r8
-
- # Store something there first.
- mov #0, r0
- or #170, r0
- mov r0, r7
- mov.b r7, @r1
- # Load it back.
- mov.b @r1+, r2
- mov r2, r0
- and #255, r0
- cmp/eq r7, r0
- bf wrong
-
- # Test address for post-incrementing.
- add #1, r8
- cmp/eq r8, r1
- bf wrong
-
-okay:
- pass
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/movb8.cgs b/sim/testsuite/sim/sh64/compact/movb8.cgs
deleted file mode 100644
index 883e4b357ed..00000000000
--- a/sim/testsuite/sim/sh64/compact/movb8.cgs
+++ /dev/null
@@ -1,27 +0,0 @@
-# sh testcase for mov.b @(r0, $rm), $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
- mov #30, r0
- shll8 r0
- mov #14, r1
- # Store something there first.
- mov #0, r0
- or #170, r0
- mov r0, r7
- mov.b r7, @(r0, r1)
- # Load it back.
- mov.b @(r0, r1), r2
- mov r2, r0
- and #255, r0
- cmp/eq r0, r7
- bf wrong
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/movb9.cgs b/sim/testsuite/sim/sh64/compact/movb9.cgs
deleted file mode 100644
index 3ad1b46f2c0..00000000000
--- a/sim/testsuite/sim/sh64/compact/movb9.cgs
+++ /dev/null
@@ -1,27 +0,0 @@
-# sh testcase for mov.b @($imm8, gbr), r0 -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
- mov #30, r0
- shll8 r0
- ldc r0, gbr
- # Store something there first.
- mov #0, r0
- or #170, r0
- mov r0, r7
- mov.b r0, @(3, gbr)
- # Load it back.
- mov.b @(3, gbr), r0
- and #255, r0
- cmp/eq r7, r0
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/movcal.cgs b/sim/testsuite/sim/sh64/compact/movcal.cgs
deleted file mode 100644
index 7aac57e7f43..00000000000
--- a/sim/testsuite/sim/sh64/compact/movcal.cgs
+++ /dev/null
@@ -1,28 +0,0 @@
-# sh testcase for movca.l r0, @$rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global movcal
-movcal:
- mov #1, r0
- rotr r0
- add #128, r0
- mov #40, r1
- shll8 r1
- movca.l r0, @r1
-
- # Load the word back in.
- mov.l @r1, r3
- cmp/eq r0, r3
- bf wrong
-
-okay:
- pass
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/movi.cgs b/sim/testsuite/sim/sh64/compact/movi.cgs
deleted file mode 100644
index bc72c1b8e63..00000000000
--- a/sim/testsuite/sim/sh64/compact/movi.cgs
+++ /dev/null
@@ -1,39 +0,0 @@
-# sh testcase for mov #$imm8, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global movi
-movi:
- mov #0, r0
- cmp/eq #0, r0
- bf wrong
-
- mov #1, r0
- cmp/eq #1, r0
- bf wrong
-
- mov #255, r0
- cmp/eq #255, r0
- bf wrong
-
- mov #1, r15
- mov #1, r0
- cmp/eq r0, r15
- bf wrong
-
- mov #255, r15
- mov r15, r0
- cmp/eq r0, r15
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/movl1.cgs b/sim/testsuite/sim/sh64/compact/movl1.cgs
deleted file mode 100644
index 7d85c380f3e..00000000000
--- a/sim/testsuite/sim/sh64/compact/movl1.cgs
+++ /dev/null
@@ -1,31 +0,0 @@
-# sh testcase for mov.l $rm, @$rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
- mov #30, r1
- shll8 r1
-init:
- # Build up a distinctive bit pattern.
- mov #1, r2
- shll8 r2
- add #12, r2
- shll8 r2
- add #85, r2
- shll8 r2
- add #170, r2
-
- mov.l r2, @r1
-
- # Load it back.
- mov.l @r1, r3
- cmp/eq r2, r3
- bf wrong
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/movl10.cgs b/sim/testsuite/sim/sh64/compact/movl10.cgs
deleted file mode 100644
index 5e9cf2d2fbd..00000000000
--- a/sim/testsuite/sim/sh64/compact/movl10.cgs
+++ /dev/null
@@ -1,34 +0,0 @@
-# sh testcase for mov.l @($imm8x4, pc), $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
-init:
- # Build up a distinctive bit pattern.
- mov #1, r2
- shll8 r2
- add #12, r2
- shll8 r2
- add #85, r2
- shll8 r2
- add #170, r2
-
- # Store to memory.
- mov #16, r1
- shll8 r1
- add #32, r1
- mov.l r2, @r1
-check:
- # Read it back.
- mov.l @(12, pc), r0
- cmp/eq r2, r0
- bf wrong
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/movl11.cgs b/sim/testsuite/sim/sh64/compact/movl11.cgs
deleted file mode 100644
index 32c763d8a2e..00000000000
--- a/sim/testsuite/sim/sh64/compact/movl11.cgs
+++ /dev/null
@@ -1,32 +0,0 @@
-# sh testcase for mov.l @($imm4x4, $rm), $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
- mov #30, r0
- shll8 r0
- # Build up a distinctive bit pattern.
- mov #1, r2
- shll8 r2
- add #12, r2
- shll8 r2
- add #85, r2
- shll8 r2
- add #170, r2
- # Store something first.
- mov.l r2, @(12, r0)
-
-check:
- # Read it back.
- mov.l @(12, r0), r1
- cmp/eq r2, r1
- bf wrong
-
-okay:
- pass
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/movl2.cgs b/sim/testsuite/sim/sh64/compact/movl2.cgs
deleted file mode 100644
index bb550612cce..00000000000
--- a/sim/testsuite/sim/sh64/compact/movl2.cgs
+++ /dev/null
@@ -1,43 +0,0 @@
-# sh testcase for mov.l $rm, @-$rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- mov #30, r1
- shll8 r1
- # Save address.
- mov r1, r7
-
-init:
- # Build up a distinctive bit pattern.
- mov #1, r2
- shll8 r2
- add #12, r2
- shll8 r2
- add #85, r2
- shll8 r2
- add #170, r2
- mov.l r2, @-r1
-
-check:
- # Compare the value loaded into another reg.
- mov.l @r1, r3
- cmp/eq r2, r3
- bf wrong
-
-dec:
- # Ensure address is decremented.
- mov #4, r6
- sub r6, r7
- cmp/eq r1, r7
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/movl3.cgs b/sim/testsuite/sim/sh64/compact/movl3.cgs
deleted file mode 100644
index 6205de7558d..00000000000
--- a/sim/testsuite/sim/sh64/compact/movl3.cgs
+++ /dev/null
@@ -1,36 +0,0 @@
-# sh testcase for mov.l $rm, @(r0, $rn)
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
-setaddr:
- mov #0, r0
- mov #30, r1
- shll8 r1
-
-init:
- # Build up a distinctive bit pattern.
- mov #1, r2
- shll8 r2
- add #12, r2
- shll8 r2
- add #85, r2
- shll8 r2
- add #170, r2
-
- mov.l r2, @(r0, r1)
-
-check:
- # Load it back.
- mov.l @(r0, r1), r3
- cmp/eq r2, r3
- bf wrong
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/movl4.cgs b/sim/testsuite/sim/sh64/compact/movl4.cgs
deleted file mode 100644
index 44440946365..00000000000
--- a/sim/testsuite/sim/sh64/compact/movl4.cgs
+++ /dev/null
@@ -1,38 +0,0 @@
-# sh testcase for mov.l r0, @($imm8x4, gbr) -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
-setaddr:
- mov #30, r1
- shll8 r1
- ldc r1, gbr
-
-init:
- # Build up a distinctive bit pattern.
- mov #1, r0
- shll8 r0
- add #12, r0
- shll8 r0
- add #85, r0
- shll8 r0
- add #170, r0
- # Preserve.
- mov r0, r7
-
- mov.l r0, @(4, gbr)
-check:
- # Load it back.
- mov.l @(4, gbr), r0
- cmp/eq r0, r7
- bf wrong
-
-okay:
- pass
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/movl5.cgs b/sim/testsuite/sim/sh64/compact/movl5.cgs
deleted file mode 100644
index 897ebef2367..00000000000
--- a/sim/testsuite/sim/sh64/compact/movl5.cgs
+++ /dev/null
@@ -1,37 +0,0 @@
-# sh testcase for mov.l $rm, @($imm4x4, $rn) -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
-setaddr:
- mov #30, r1
- shll8 r1
-
-init:
- # Build up a distinctive bit pattern.
- mov #1, r0
- shll8 r0
- add #12, r0
- shll8 r0
- add #85, r0
- shll8 r0
- add #170, r0
- # Preserve.
- mov r0, r7
-
- mov.l r0, @(4, r1)
-check:
- # Load it back.
- mov.l @(4, r1), r0
- cmp/eq r7, r0
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/movl6.cgs b/sim/testsuite/sim/sh64/compact/movl6.cgs
deleted file mode 100644
index 42f63b2a9ac..00000000000
--- a/sim/testsuite/sim/sh64/compact/movl6.cgs
+++ /dev/null
@@ -1,25 +0,0 @@
-# sh testcase for mov.l @$rm, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- mov #30, r0
- shll8 r0
- # Store something there first.
- mov #170, r1
- mov.l r1, @r0
-check:
- # Load it back.
- mov.l @r0, r3
- cmp/eq r1, r3
- bf wrong
-
-okay:
- pass
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/movl7.cgs b/sim/testsuite/sim/sh64/compact/movl7.cgs
deleted file mode 100644
index b6c12fc5515..00000000000
--- a/sim/testsuite/sim/sh64/compact/movl7.cgs
+++ /dev/null
@@ -1,37 +0,0 @@
-# sh testcase for mov.l @$rm+, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- mov #30, r0
- shll8 r0
- # Preserve address.
- mov r0, r7
- # Store something first.
- mov #170, r3
- mov.l r3, @r0
-
- mov.l @r0+, r1
-check:
- cmp/eq r1, r3
- bf wrong
-
- # Ensure address is post-incremented.
- add #4, r7
- cmp/eq r7, r0
- bf wrong
-
-equal:
- # Test rm = rn.
- mov #30, r0
- shll8 r0
- mov.l @r0+, r0
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/movl8.cgs b/sim/testsuite/sim/sh64/compact/movl8.cgs
deleted file mode 100644
index a6cd932d0a2..00000000000
--- a/sim/testsuite/sim/sh64/compact/movl8.cgs
+++ /dev/null
@@ -1,24 +0,0 @@
-# sh testcase for mov.l @(r0, $rm), $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
- mov #0, r0
- mov #30, r1
- shll8 r1
- # Store something there first.
- mov #170, r3
- mov.l r3, @(r0, r1)
-check:
- # Load it back.
- mov.l @(r0, r1), r2
- cmp/eq r2, r3
- bf wrong
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/movl9.cgs b/sim/testsuite/sim/sh64/compact/movl9.cgs
deleted file mode 100644
index 4fa07b069d8..00000000000
--- a/sim/testsuite/sim/sh64/compact/movl9.cgs
+++ /dev/null
@@ -1,24 +0,0 @@
-# sh testcase for mov.l @($imm8x4, gbr), r0 -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
- mov #30, r1
- shll8 r1
- ldc r1, gbr
- # Store something there first.
- mov #170, r0
- mov r0, r7
- mov.l r0, @(12, gbr)
-check:
- # Load it back.
- mov.l @(12, gbr), r0
- cmp/eq r0, r7
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/movt.cgs b/sim/testsuite/sim/sh64/compact/movt.cgs
deleted file mode 100644
index 45539810beb..00000000000
--- a/sim/testsuite/sim/sh64/compact/movt.cgs
+++ /dev/null
@@ -1,28 +0,0 @@
-# sh testcase for movt $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global movt
-init:
- sett
- movt r1
- assert r1, #1
-clear:
- clrt
- movt r1
- assert r1, #0
-set:
- sett
- movt r1
- assert r1, #1
-
-okay:
- pass
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/movw1.cgs b/sim/testsuite/sim/sh64/compact/movw1.cgs
deleted file mode 100644
index 5d55a581ffd..00000000000
--- a/sim/testsuite/sim/sh64/compact/movw1.cgs
+++ /dev/null
@@ -1,29 +0,0 @@
-# sh testcase for mov.w $rm, @$rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- mov #30, r1
- shll8 r1
-init:
- # Build up a distinctive bit pattern.
- mov #1, r2
- shll8 r2
- add #12, r2
- mov.w r2, @r1
-check:
- # Read it back.
- mov.w @r1, r3
- shll16 r2
- shll16 r3
- cmp/eq r2, r3
- bf wrong
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/movw10.cgs b/sim/testsuite/sim/sh64/compact/movw10.cgs
deleted file mode 100644
index 5bab9117e9e..00000000000
--- a/sim/testsuite/sim/sh64/compact/movw10.cgs
+++ /dev/null
@@ -1,32 +0,0 @@
-# sh testcase for mov.w @($imm8x2, pc), $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- # Build up a distinctive bit pattern.
- mov #1, r2
- shll8 r2
- add #12, r2
-
- # Store to memory.
- mov #16, r1
- shll8 r1
- add #32, r1
- mov.w r2, @r1
-
-check:
- # Read it back.
- mov.w @(18, pc), r0
- shll16 r0
- shll16 r2
- cmp/eq r0, r2
- bf wrong
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/movw11.cgs b/sim/testsuite/sim/sh64/compact/movw11.cgs
deleted file mode 100644
index df739fa783d..00000000000
--- a/sim/testsuite/sim/sh64/compact/movw11.cgs
+++ /dev/null
@@ -1,35 +0,0 @@
-# sh testcase for mov.w @($imm4x2, $rm), r0 -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
- mov #30, r1
- shll8 r1
-
- # Build up a distinctive bit pattern.
- mov #1, r0
- shll8 r0
- add #12, r0
-
- # Preserve r0.
- mov r0, r3
-
- # Store something first.
- mov.w r0, @(12, r1)
-
-check:
- # Read it back.
- mov.w @(12, r1), r0
- shll16 r0
- shll16 r3
- cmp/eq r0, r3
- bf wrong
-
-okay:
- pass
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/movw2.cgs b/sim/testsuite/sim/sh64/compact/movw2.cgs
deleted file mode 100644
index 27c29dc0292..00000000000
--- a/sim/testsuite/sim/sh64/compact/movw2.cgs
+++ /dev/null
@@ -1,36 +0,0 @@
-# sh testcase for mov.w $rm, @-$rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- mov #30, r1
- shll8 r1
- # Preserve.
- mov r1, r7
-init:
- # Build up a distinctive bit pattern.
- mov #1, r2
- shll8 r2
- add #12, r2
-store:
- mov.w r2, @-r1
-check:
- # Read it back.
- mov.w @r1, r3
- shll16 r2
- shll16 r3
- cmp/eq r2, r3
- bf wrong
-dec:
- add #2, r1
- cmp/eq r7, r1
- bf wrong
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/movw3.cgs b/sim/testsuite/sim/sh64/compact/movw3.cgs
deleted file mode 100644
index d7b39c81506..00000000000
--- a/sim/testsuite/sim/sh64/compact/movw3.cgs
+++ /dev/null
@@ -1,31 +0,0 @@
-# sh testcase for mov.w $rm, @(r0, $rn) -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- mov #0, r0
- mov #30, r1
- shll8 r1
-init:
- # Build up a distinctive bit pattern.
- mov #1, r2
- shll8 r2
- add #12, r2
- mov.w r2, @(r0, r1)
-check:
- # Read it back.
- mov.w @(r0, r1), r3
- shll16 r2
- shll16 r3
- cmp/eq r2, r3
- bf wrong
-
-okay:
- pass
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/movw4.cgs b/sim/testsuite/sim/sh64/compact/movw4.cgs
deleted file mode 100644
index 4853b5019bc..00000000000
--- a/sim/testsuite/sim/sh64/compact/movw4.cgs
+++ /dev/null
@@ -1,31 +0,0 @@
-# sh testcase for mov.w r0, @($imm8x2, gbr) -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- mov #30, r0
- shll8 r0
- ldc r0, gbr
-
-init:
- # Build up a distinctive bit pattern.
- mov #1, r0
- shll8 r0
- add #12, r0
- # Preserve r0.
- mov r0, r7
- mov.w r0, @(12, gbr)
-check:
- mov.w @(12, gbr), r0
- cmp/eq r0, r7
- bf wrong
-
-okay:
- pass
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/movw5.cgs b/sim/testsuite/sim/sh64/compact/movw5.cgs
deleted file mode 100644
index 9b4f84f6516..00000000000
--- a/sim/testsuite/sim/sh64/compact/movw5.cgs
+++ /dev/null
@@ -1,32 +0,0 @@
-# sh testcase for mov.w r0, @($imm4x2, $rn) -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
- mov #30, r1
- shll8 r1
-
-init:
- # Build up a distinctive bit pattern.
- mov #1, r0
- shll8 r0
- add #12, r0
- # Preserve.
- mov r0, r7
-move:
- mov.w r0, @(12, r1)
-check:
- mov.w @(12, r1), r0
- shll16 r0
- shll16 r7
- cmp/eq r0, r7
- bf wrong
-
-okay:
- pass
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/movw6.cgs b/sim/testsuite/sim/sh64/compact/movw6.cgs
deleted file mode 100644
index 758497c13e7..00000000000
--- a/sim/testsuite/sim/sh64/compact/movw6.cgs
+++ /dev/null
@@ -1,30 +0,0 @@
-# sh testcase for mov.w @$rm, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- mov #30, r0
- shll8 r0
-
- # Store something first.
- # Build up a distinctive bit pattern.
- mov #1, r2
- shll8 r2
- add #12, r2
- mov.w r2, @r0
-
-check:
- # Read it back.
- mov.w @r0, r1
- cmp/eq r1, r2
- bf wrong
-
-okay:
- pass
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/movw7.cgs b/sim/testsuite/sim/sh64/compact/movw7.cgs
deleted file mode 100644
index 45f5c098e4e..00000000000
--- a/sim/testsuite/sim/sh64/compact/movw7.cgs
+++ /dev/null
@@ -1,36 +0,0 @@
-# sh testcase for mov.w @${rm}+, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
- mov #30, r0
- shll8 r0
- # Preserve address.
- mov r0, r7
-
- # Store something first.
- # Build up a distinctive bit pattern.
- mov #1, r2
- shll8 r2
- add #12, r2
- mov.w r2, @r0
-check:
- # Read it back.
- mov.w @r0+, r3
- cmp/eq r2, r3
- bf wrong
-
-inc:
- # Ensure address is post-incremented.
- add #2, r7
- cmp/eq r0, r7
- bf wrong
-
-okay:
- pass
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/movw8.cgs b/sim/testsuite/sim/sh64/compact/movw8.cgs
deleted file mode 100644
index 0a7ce3f346c..00000000000
--- a/sim/testsuite/sim/sh64/compact/movw8.cgs
+++ /dev/null
@@ -1,31 +0,0 @@
-# sh testcase for mov.w @(r0, $rm), $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
- mov #30, r0
- shll8 r0
- mov #10, r1
-
- # Store something first.
- # Build up a distinctive bit pattern.
- mov #1, r2
- shll8 r2
- add #12, r2
-
- mov.w r2, @(r0, r1)
-check:
- # Read it back.
- mov.w @(r0, r1), r3
- shll16 r2
- shll16 r3
- cmp/eq r2, r3
- bf wrong
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/movw9.cgs b/sim/testsuite/sim/sh64/compact/movw9.cgs
deleted file mode 100644
index 1872f06afb6..00000000000
--- a/sim/testsuite/sim/sh64/compact/movw9.cgs
+++ /dev/null
@@ -1,33 +0,0 @@
-# sh testcase for mov.w @($imm8x2, gbr), r0 -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
- mov #30, r0
- shll8 r0
- ldc r0, gbr
-
- # Store something first.
- # Build up a distinctive bit pattern.
- mov #1, r0
- shll8 r0
- add #12, r0
- # Preserve r0.
- mov r0, r7
- mov.w r0, @(12, gbr)
-
-check:
- # Load it back.
- mov.w @(12, gbr), r0
- shll16 r0
- shll16 r7
- cmp/eq r0, r7
- bf wrong
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/mull.cgs b/sim/testsuite/sim/sh64/compact/mull.cgs
deleted file mode 100644
index 921141aafd6..00000000000
--- a/sim/testsuite/sim/sh64/compact/mull.cgs
+++ /dev/null
@@ -1,64 +0,0 @@
-# sh testcase for mul.l $rm, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global mull
-mull:
- mov #3, r0
- mov #5, r1
- mul.l r0, r1
-
- # Check the result.
- sts macl, r3
- mov #15, r4
- cmp/eq r3, r4
- bf wrong
-
-lxs:
- # Large * small.
- mov #255, r0
- mov #0, r1
- mul.l r0, r1
-
- # Check the result.
- sts macl, r3
- mov #0, r4
- cmp/eq r3, r4
- bf wrong
-
-sxl:
- # Small * large.
- mov #0, r0
- mov #255, r1
- mul.l r0, r1
-
- # Check the result.
- sts macl, r3
- mov #0, r4
- cmp/eq r3, r4
- bf wrong
-
-lxl:
- # Large * large.
- mov #1, r0
- neg r0, r0
- mov #2, r1
- mul.l r0, r1
-
- # Check the result.
- sts macl, r3
- mov #2, r4
- neg r4, r4
- cmp/eq r3, r4
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/mulsw.cgs b/sim/testsuite/sim/sh64/compact/mulsw.cgs
deleted file mode 100644
index 05c8a3d384c..00000000000
--- a/sim/testsuite/sim/sh64/compact/mulsw.cgs
+++ /dev/null
@@ -1,91 +0,0 @@
-# sh testcase for muls.w $rm, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- sts mach, r7
-
- .global mulsw
-zero:
- mov #0, r0
- mov #1, r1
- muls.w r0, r1
-
- # Check the result.
- sts macl, r3
- mov #0, r4
- cmp/eq r3, r4
- bf wrong
-
-sxs:
- # Small * small.
- mov #1, r0
- mov #2, r1
- muls.w r0, r1
-
- # Check the result.
- sts macl, r3
- mov #2, r4
- cmp/eq r3, r4
- bf wrong
-
-sxl:
- # Small * large.
- mov #1, r0
- mov #255, r1
- shll8 r1
- muls.w r0, r1
-
- # Check the result.
- sts macl, r3
- mov #0, r4
- not r4, r4
- shll8 r4
- cmp/eq r3, r4
- bf wrong
-
-lxs:
- # Large * small.
- mov #255, r0
- shll8 r0
- mov #1, r1
- muls.w r0, r1
-
- # Check the result.
- sts macl, r3
- mov #0, r4
- not r4, r4
- shll8 r4
- cmp/eq r3, r4
- bf wrong
-
-lxl:
- # Large * large.
- mov #255, r0
- shll8 r0
- mov #255, r1
- shll8 r1
- muls.w r0, r1
-
- # Check the result.
- sts macl, r3
- mov #1, r4
- shll16 r4
- cmp/eq r3, r4
- bf wrong
-
-invariant:
- # Ensure MACH is invariant.
- sts mach, r8
- cmp/eq r7, r8
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/muluw.cgs b/sim/testsuite/sim/sh64/compact/muluw.cgs
deleted file mode 100644
index fa0a3343332..00000000000
--- a/sim/testsuite/sim/sh64/compact/muluw.cgs
+++ /dev/null
@@ -1,96 +0,0 @@
-# sh testcase for mulu.w $rm, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- sts mach, r7
-
- .global mulsw
-zero:
- mov #0, r0
- mov #1, r1
- mulu.w r0, r1
-
- # Check the result.
- sts macl, r1
- mov #0, r0
- cmp/eq r0, r1
- bf wrong
-
-sxs:
- # Small * small.
- mov #1, r0
- mov #2, r1
- mulu.w r0, r1
-
- # Check the result.
- sts macl, r1
- mov #2, r0
- cmp/eq r0, r1
- bf wrong
-
-sxl:
- # Small * large.
- mov #1, r1
- mov #0, r0
- or #255, r0
- shll8 r0
- mulu.w r1, r0
-
- # Check the result.
- sts macl, r1
- mov #0, r0
- or #255, r0
- shll8 r0
- cmp/eq r0, r1
- bf wrong
-
-lxs:
- # Large * small.
- mov #0, r0
- or #255, r0
- shll8 r0
- mov #1, r1
- mulu.w r0, r1
-
- # Check the result.
- sts macl, r1
- mov #0, r0
- or #255, r0
- shll8 r0
- cmp/eq r0, r1
- bf wrong
-
-lxl:
- # Large * large.
- mov #0, r0
- or #255, r0
- shll8 r0
- mov r0, r1
- mulu.w r0, r1
-
- # Check the result.
- sts macl, r1
- mov #0, r0
- or #254, r0
- shll8 r0
- or #1, r0
- shll16 r0
- cmp/eq r0, r1
- bf wrong
-
-invariant:
- # Ensure MACH is invariant.
- sts mach, r8
- cmp/eq r7, r8
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/neg.cgs b/sim/testsuite/sim/sh64/compact/neg.cgs
deleted file mode 100644
index b6f98d74060..00000000000
--- a/sim/testsuite/sim/sh64/compact/neg.cgs
+++ /dev/null
@@ -1,55 +0,0 @@
-# sh testcase for neg $rm, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- .macro signbit sign
- shlr16 r1
- shlr8 r1
- shlr r1
- shlr r1
- shlr r1
- shlr r1
- shlr r1
- shlr r1
- shlr r1
- assert r1, \sign
- .endm
- start
-
- .global neg
-neg:
- mov #0, r0
- neg r0, r1
- signbit #0
-
- mov #42, r0
- neg r0, r1
- signbit #1
-
- mov #0, r0
- or #25, r0
- neg r0, r1
- signbit #1
-
- # neg(0) is 0.
- mov #0, r0
- neg r0, r1
- signbit #0
-
- # neg(neg(x)) = x.
- mov #42, r0
- neg r0, r1
- signbit #1
- mov #42, r0
- neg r0, r2
- neg r2, r1
- signbit #0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/negc.cgs b/sim/testsuite/sim/sh64/compact/negc.cgs
deleted file mode 100644
index 1f5547d9bab..00000000000
--- a/sim/testsuite/sim/sh64/compact/negc.cgs
+++ /dev/null
@@ -1,66 +0,0 @@
-# sh testcase for negc $rm, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- .macro signbit sign
- mov r1, r2
- shlr16 r2
- shlr8 r2
- shlr r2
- shlr r2
- shlr r2
- shlr r2
- shlr r2
- shlr r2
- shlr r2
- assert r2, \sign
- .endm
- start
-
- .global negc
-negc:
- clrt
- mov #1, r0
- negc r0, r1
- signbit #1
-
-negc2:
- sett
- mov #1, r0
- negc r0, r1
- signbit #1
-
-negc3:
- clrt
- mov #0, r0
- negc r0, r1
- signbit #0
-
-negc4:
- sett
- mov #0, r0
- negc r0, r1
- signbit #1
-
-negc5:
- clrt
- mov #0, r0
- or #255, r0
- negc r0, r1
- signbit #1
-
-negc6:
- sett
- mov #0, r0
- or #255, r0
- negc r0, r1
- signbit #1
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/nop.cgs b/sim/testsuite/sim/sh64/compact/nop.cgs
deleted file mode 100644
index 8ce910c5abd..00000000000
--- a/sim/testsuite/sim/sh64/compact/nop.cgs
+++ /dev/null
@@ -1,13 +0,0 @@
-# sh testcase for nop
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global nop
-nop:
- nop
- pass
diff --git a/sim/testsuite/sim/sh64/compact/not.cgs b/sim/testsuite/sim/sh64/compact/not.cgs
deleted file mode 100644
index 380808ddb57..00000000000
--- a/sim/testsuite/sim/sh64/compact/not.cgs
+++ /dev/null
@@ -1,47 +0,0 @@
-# sh testcase for not $rm64, $rn64 -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global not
-not:
- mov #0, r0
- or #192, r0
- not r0, r1
-
- mov #0, r0
- or #255, r0
- shll8 r0
- or #255, r0
- shll8 r0
- or #255, r0
- shll8 r0
- or #63, r0
-
- cmp/eq r0, r1
- bf wrong
-
-ones:
- mov #0, r1
- not r1, r2
-
- mov #0, r0
- or #255, r0
- shll8 r0
- or #255, r0
- shll8 r0
- or #255, r0
- shll8 r0
- or #255, r0
- cmp/eq r0, r2
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/ocbi.cgs b/sim/testsuite/sim/sh64/compact/ocbi.cgs
deleted file mode 100644
index 12fb2a116c4..00000000000
--- a/sim/testsuite/sim/sh64/compact/ocbi.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for ocbi @$rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
- .global ocbi
-ocbi:
- ocbi @r0
- ocbi @r1
- ocbi @r15
- pass
diff --git a/sim/testsuite/sim/sh64/compact/ocbp.cgs b/sim/testsuite/sim/sh64/compact/ocbp.cgs
deleted file mode 100644
index 153aff2eade..00000000000
--- a/sim/testsuite/sim/sh64/compact/ocbp.cgs
+++ /dev/null
@@ -1,15 +0,0 @@
-# sh testcase for ocbp @$rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global ocbp
-ocbp:
- ocbp @r0
- ocbp @r1
- ocbp @r15
- pass
diff --git a/sim/testsuite/sim/sh64/compact/ocbwb.cgs b/sim/testsuite/sim/sh64/compact/ocbwb.cgs
deleted file mode 100644
index 6b0a741cbca..00000000000
--- a/sim/testsuite/sim/sh64/compact/ocbwb.cgs
+++ /dev/null
@@ -1,15 +0,0 @@
-# sh testcase for ocbwb @$rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global ocbwb
-ocbwb:
- ocbwb @r0
- ocbwb @r1
- ocbwb @r15
- pass
diff --git a/sim/testsuite/sim/sh64/compact/or.cgs b/sim/testsuite/sim/sh64/compact/or.cgs
deleted file mode 100644
index a02eee39aaf..00000000000
--- a/sim/testsuite/sim/sh64/compact/or.cgs
+++ /dev/null
@@ -1,43 +0,0 @@
-# sh testcase for or $rm64, $rn64 -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global or
-or:
- mov #1, r0
- rotr r0
- mov #1, r1
- or r0, r1
-
- mov #1, r7
- rotr r7
- add #1, r7
- cmp/eq r7, r1
- bf wrong
-
- .global or2
-or2:
- mov #85, r0
- shll16 r0
- shll8 r0
- mov #85, r1
- shll8 r1
- or r0, r1
-
- mov #85, r7
- shll16 r7
- add #85 ,r7
- shll8 r7
- cmp/eq r1, r7
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/orb.cgs b/sim/testsuite/sim/sh64/compact/orb.cgs
deleted file mode 100644
index 7e962f6fe69..00000000000
--- a/sim/testsuite/sim/sh64/compact/orb.cgs
+++ /dev/null
@@ -1,24 +0,0 @@
-# sh testcase for or.b #$imm8, @(r0, gbr) -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global orb
-init:
- # Init GBR and R0.
- mov #30, r0
- ldc r0, gbr
- mov #40, r0
-
-orb:
- or.b #0, @(r0, gbr)
- or.b #170, @(r0, gbr)
- or.b #0, @(r0, gbr)
- or.b #255, @(r0, gbr)
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/compact/ori.cgs b/sim/testsuite/sim/sh64/compact/ori.cgs
deleted file mode 100644
index 63a5fb58740..00000000000
--- a/sim/testsuite/sim/sh64/compact/ori.cgs
+++ /dev/null
@@ -1,40 +0,0 @@
-# sh testcase for or #$imm8, r0 -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global ori
-ori:
- mov #1, r0
- rotr r0
- or #1, r0
-
- mov #1, r7
- rotr r7
- add #1, r7
- cmp/eq r0, r7
- bf wrong
-
- .global ori2
-ori2:
- mov #85, r0
- shll16 r0
- shll8 r0
- or #85, r0
-
- mov #85, r7
- shll16 r7
- shll8 r7
- add #85, r7
- cmp/eq r0, r7
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/pref.cgs b/sim/testsuite/sim/sh64/compact/pref.cgs
deleted file mode 100644
index 065e0932e6c..00000000000
--- a/sim/testsuite/sim/sh64/compact/pref.cgs
+++ /dev/null
@@ -1,15 +0,0 @@
-# sh testcase for pref @$rn
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global pref
-pref:
- pref @r0
- pref @r1
- pref @r15
- pass
diff --git a/sim/testsuite/sim/sh64/compact/rotcl.cgs b/sim/testsuite/sim/sh64/compact/rotcl.cgs
deleted file mode 100644
index 5e1a3b91137..00000000000
--- a/sim/testsuite/sim/sh64/compact/rotcl.cgs
+++ /dev/null
@@ -1,121 +0,0 @@
-# sh testcase for rotcl $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global rotcl
-
-rotcl:
- clrt
- mov #1, r1
- rotcl r1
- assert r1, #2
- clrt
- rotcl r1
- assert r1, #4
- clrt
- rotcl r1
- assert r1, #8
- clrt
- rotcl r1
- assert r1, #16
- clrt
- rotcl r1
- assert r1, #32
- clrt
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- bf wrong
- rotcl r1
- assert r1, #1
-
- bra trotcl
- nop
-
-wrong:
- fail
-
-trotcl:
- sett
- mov #1, r1
- rotcl r1
- assert r1, #3
- clrt
- rotcl r1
- assert r1, #6
- clrt
- rotcl r1
- assert r1, #12
- clrt
- rotcl r1
- assert r1, #24
- clrt
- rotcl r1
- assert r1, #48
- clrt
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- rotcl r1
- bf wrong2
- assert r1, #1
- rotcl r1
- rotcl r1
-
-okay:
- pass
-wrong2:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/rotcr.cgs b/sim/testsuite/sim/sh64/compact/rotcr.cgs
deleted file mode 100644
index b53300ec54f..00000000000
--- a/sim/testsuite/sim/sh64/compact/rotcr.cgs
+++ /dev/null
@@ -1,103 +0,0 @@
-# sh testcase for rotcr $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global rotcr
-rotcr:
- clrt
- mov #1, r1
- rotcr r1
- bf wrong
- assert r1, #0
- sett
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- assert r1, #1
- rotcr r1
- bf wrong
-
-trotcr:
- sett
- mov #1, r1
- rotcr r1
- bf wrong
- sett
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- rotcr r1
- bf wrong
- assert r1, #1
- rotcr r1
- bf wrong
- rotcr r1
-
-okay:
- pass
-wrong:
- fail
-
-
diff --git a/sim/testsuite/sim/sh64/compact/rotl.cgs b/sim/testsuite/sim/sh64/compact/rotl.cgs
deleted file mode 100644
index e292de7e437..00000000000
--- a/sim/testsuite/sim/sh64/compact/rotl.cgs
+++ /dev/null
@@ -1,62 +0,0 @@
-# sh testcase for rotl $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global rotl
-rotl:
- mov #1, r1
- rotl r1
- assert r1, #2
- rotl r1
- assert r1, #4
- rotl r1
- assert r1, #8
- rotl r1
- assert r1, #16
- rotl r1
- assert r1, #32
- rotl r1
- assert r1, #64
- rotl r1
- rotl r1
- rotl r1
- rotl r1
- rotl r1
- rotl r1
- rotl r1
- rotl r1
- rotl r1
- rotl r1
- rotl r1
- rotl r1
- rotl r1
- rotl r1
- rotl r1
- rotl r1
- rotl r1
- rotl r1
- rotl r1
- rotl r1
- rotl r1
- rotl r1
- rotl r1
- rotl r1
- rotl r1
- rotl r1
- bf wrong
- assert r1, #1
- rotl r1
- rotl r1
- rotl r1
- assert r1, #8
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/rotr.cgs b/sim/testsuite/sim/sh64/compact/rotr.cgs
deleted file mode 100644
index 7f80f993aea..00000000000
--- a/sim/testsuite/sim/sh64/compact/rotr.cgs
+++ /dev/null
@@ -1,55 +0,0 @@
-# sh testcase for rotr $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global rotr
-rotr:
- mov #1, r1
- rotr r1
- bf wrong
- rotr r1
- rotr r1
- rotr r1
- rotr r1
- rotr r1
- rotr r1
- rotr r1
- rotr r1
- rotr r1
- rotr r1
- rotr r1
- rotr r1
- rotr r1
- rotr r1
- rotr r1
- rotr r1
- rotr r1
- rotr r1
- rotr r1
- rotr r1
- rotr r1
- rotr r1
- rotr r1
- rotr r1
- rotr r1
- rotr r1
- rotr r1
- rotr r1
- rotr r1
- rotr r1
- rotr r1
- assert r1, #1
- rotr r1
- rotr r1
- rotr r1
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/rts.cgs b/sim/testsuite/sim/sh64/compact/rts.cgs
deleted file mode 100644
index eeb8dce9332..00000000000
--- a/sim/testsuite/sim/sh64/compact/rts.cgs
+++ /dev/null
@@ -1,24 +0,0 @@
-# sh testcase for rts -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global rts
-rts:
- bsr subroutine
-slot:
- nop
-return:
- pass
- fail
-
-subroutine:
- rts
-rts_slot:
- nop
-bad:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/sets.cgs b/sim/testsuite/sim/sh64/compact/sets.cgs
deleted file mode 100644
index f031701d6ee..00000000000
--- a/sim/testsuite/sim/sh64/compact/sets.cgs
+++ /dev/null
@@ -1,13 +0,0 @@
-# sh testcase for sets -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global sets
-sets:
- sets
- pass
diff --git a/sim/testsuite/sim/sh64/compact/sett.cgs b/sim/testsuite/sim/sh64/compact/sett.cgs
deleted file mode 100644
index 9ae8af536e7..00000000000
--- a/sim/testsuite/sim/sh64/compact/sett.cgs
+++ /dev/null
@@ -1,16 +0,0 @@
-# sh testcase for sett -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global sett
-sett:
- sett
- bf wrong
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/shad.cgs b/sim/testsuite/sim/sh64/compact/shad.cgs
deleted file mode 100644
index 340743d8f1f..00000000000
--- a/sim/testsuite/sim/sh64/compact/shad.cgs
+++ /dev/null
@@ -1,58 +0,0 @@
-# sh testcase for shad $rm, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global null
-null:
- mov #1, r0
- mov #0, r1
- shad r1, r0
- # no shift is performed.
- assert r0, #1
-
- .global gt0
-gt0:
- mov #4, r0
- mov #3, r1
- shad r1, r0
- # shift left 3 bits.
- assert r0, #32
-
- .global lt0
-lt0:
- mov #32, r0
- mov #3, r1
- neg r1, r1
- shad r1, r0
- # shift right 3 bits.
- assert r0, #4
-
- .global fillpos
-fillpos:
- mov #1, r0
- mov #1, r1
- rotr r1
- shad r1, r0
- # check result.
- assert r0, #0
-
- .global fillneg
-fillneg:
- mov #1, r0
- neg r0, r0
- mov #1, r1
- rotr r1
- shad r1, r0
- # check result.
- not r0, r0
- assert r0, #0
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/shal.cgs b/sim/testsuite/sim/sh64/compact/shal.cgs
deleted file mode 100644
index dfea947e856..00000000000
--- a/sim/testsuite/sim/sh64/compact/shal.cgs
+++ /dev/null
@@ -1,57 +0,0 @@
-# sh testcase for shal $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global shal
-shal:
- mov #1, r1
- shal r1
- assert r1, #2
- shal r1
- assert r1, #4
- shal r1
- assert r1, #8
- shal r1
- assert r1, #16
- shal r1
- assert r1, #32
- shal r1
- assert r1, #64
- shal r1
- shal r1
- shal r1
- shal r1
- shal r1
- shal r1
- shal r1
- shal r1
- shal r1
- shal r1
- shal r1
- shal r1
- shal r1
- shal r1
- shal r1
- shal r1
- shal r1
- shal r1
- shal r1
- shal r1
- shal r1
- shal r1
- shal r1
- shal r1
- shal r1
- shal r1
- assert r1, #0
-
-okay:
- pass
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/shar.cgs b/sim/testsuite/sim/sh64/compact/shar.cgs
deleted file mode 100644
index e3e92fca080..00000000000
--- a/sim/testsuite/sim/sh64/compact/shar.cgs
+++ /dev/null
@@ -1,40 +0,0 @@
-# sh testcase for shar $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global shar
-shar:
- mov #0, r0
- or #192, r0
- shar r0
- bt wrong
- shar r0
- bt wrong
- shar r0
- bt wrong
- shar r0
- bt wrong
- shar r0
- bt wrong
- shar r0
- bt wrong
- shar r0
- bf wrong
- shar r0
- bf wrong
- shar r0
- bt wrong
- shar r0
- bt wrong
- assert r0, #0
-
-okay:
- pass
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/shld.cgs b/sim/testsuite/sim/sh64/compact/shld.cgs
deleted file mode 100644
index 32e4100259d..00000000000
--- a/sim/testsuite/sim/sh64/compact/shld.cgs
+++ /dev/null
@@ -1,48 +0,0 @@
-# sh testcase for shld $rm, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global null
-null:
- mov #1, r0
- mov #0, r1
- shld r1, r0
- # no shift is performed.
- assert r0, #1
-
- .global gt0
-gt0:
- mov #4, r0
- mov #3, r1
- shld r1, r0
- # shift left 3 bits.
- assert r0, #32
-
- .global lt0
-lt0:
- mov #32, r0
- mov #3, r1
- neg r1, r1
- shld r1, r0
- # shift right 3 bits.
- assert r0, #4
-
- .global fill
-fill:
- mov #1, r0
- rotr r0
- mov #1, r1
- rotr r1
- shld r1, r0
- assert r0, #0
-
-okay:
- pass
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/shll.cgs b/sim/testsuite/sim/sh64/compact/shll.cgs
deleted file mode 100644
index 882f2c2e1ef..00000000000
--- a/sim/testsuite/sim/sh64/compact/shll.cgs
+++ /dev/null
@@ -1,57 +0,0 @@
-# sh testcase for shll $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global shll
-shll:
- mov #1, r1
- shll r1
- shll r1
- shll r1
- shll r1
- shll r1
- shll r1
- shll r1
- shll r1
- shll r1
- shll r1
- shll r1
- shll r1
- shll r1
- shll r1
- shll r1
- shll r1
- shll r1
- shll r1
- shll r1
- shll r1
- shll r1
- shll r1
- shll r1
- shll r1
- shll r1
- shll r1
- shll r1
- shll r1
- shll r1
- shll r1
- shll r1
- shll r1
- shll r1
- assert r1, #0
-another:
- mov #1, r1
- shll r1
- shll r1
- shll r1
- assert r1, #8
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/shll16.cgs b/sim/testsuite/sim/sh64/compact/shll16.cgs
deleted file mode 100644
index 0637c3de706..00000000000
--- a/sim/testsuite/sim/sh64/compact/shll16.cgs
+++ /dev/null
@@ -1,44 +0,0 @@
-# sh testcase for shll16 $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global shll16
-shll16:
- mov #108, r1
- shll16 r1
- shll16 r1
- assert r1, #0
-
-another:
- mov #1, r1
- shll16 r1
- mov #1, r7
- shll r7
- shll r7
- shll r7
- shll r7
- shll r7
- shll r7
- shll r7
- shll r7
- shll r7
- shll r7
- shll r7
- shll r7
- shll r7
- shll r7
- shll r7
- shll r7
- cmp/eq r1, r7
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/shll2.cgs b/sim/testsuite/sim/sh64/compact/shll2.cgs
deleted file mode 100644
index 6e28c664307..00000000000
--- a/sim/testsuite/sim/sh64/compact/shll2.cgs
+++ /dev/null
@@ -1,40 +0,0 @@
-# sh testcase for shll2 $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global shll2
-shll2:
- mov #1, r1
- shll2 r1
- shll2 r1
- shll2 r1
- shll2 r1
- shll2 r1
- shll2 r1
- shll2 r1
- shll2 r1
- shll2 r1
- shll2 r1
- shll2 r1
- shll2 r1
- shll2 r1
- shll2 r1
- shll2 r1
- shll2 r1
- assert r1, #0
-
-another:
- mov #1, r1
- shll2 r1
- assert r1, #4
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/shll8.cgs b/sim/testsuite/sim/sh64/compact/shll8.cgs
deleted file mode 100644
index fe455ec753d..00000000000
--- a/sim/testsuite/sim/sh64/compact/shll8.cgs
+++ /dev/null
@@ -1,38 +0,0 @@
-# sh testcase for shll8 $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global shll8
-shll8:
- mov #1, r1
- shll8 r1
- shll8 r1
- shll8 r1
- shll8 r1
- assert r1, #0
-
-another:
- mov #1, r1
- shll8 r1
- mov #1, r7
- shll r7
- shll r7
- shll r7
- shll r7
- shll r7
- shll r7
- shll r7
- shll r7
- cmp/eq r1, r7
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/shlr.cgs b/sim/testsuite/sim/sh64/compact/shlr.cgs
deleted file mode 100644
index 9d86461b959..00000000000
--- a/sim/testsuite/sim/sh64/compact/shlr.cgs
+++ /dev/null
@@ -1,33 +0,0 @@
-# sh testcase for shlr $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global shlr
-shlr:
- mov #0, r0
- or #192, r0
- shlr r0
- shlr r0
- shlr r0
- shlr r0
- shlr r0
- shlr r0
- # Make sure a bit is shifted into T.
- shlr r0
- bf wrong
- # Ditto.
- shlr r0
- bf wrong
- shlr r0
- assert r0, #0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/shlr16.cgs b/sim/testsuite/sim/sh64/compact/shlr16.cgs
deleted file mode 100644
index 7bfc62788f3..00000000000
--- a/sim/testsuite/sim/sh64/compact/shlr16.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for shlr16 $rn
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global shrl16
-shrl16:
- shlr16 r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/compact/shlr2.cgs b/sim/testsuite/sim/sh64/compact/shlr2.cgs
deleted file mode 100644
index 6f085979443..00000000000
--- a/sim/testsuite/sim/sh64/compact/shlr2.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for shlr2 $rn
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global shrl2
-shrl2:
- shlr2 r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/compact/shlr8.cgs b/sim/testsuite/sim/sh64/compact/shlr8.cgs
deleted file mode 100644
index 82040b581b8..00000000000
--- a/sim/testsuite/sim/sh64/compact/shlr8.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for shlr8 $rn
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global shrl8
-shrl8:
- shlr8 r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/compact/stc-gbr.cgs b/sim/testsuite/sim/sh64/compact/stc-gbr.cgs
deleted file mode 100644
index 1b84008c9d2..00000000000
--- a/sim/testsuite/sim/sh64/compact/stc-gbr.cgs
+++ /dev/null
@@ -1,21 +0,0 @@
-# sh testcase for stc gbr, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global stc_gbr
-stc_gbr:
- stc gbr, r1
- mov #42, r1
- ldc r1, gbr
- stc gbr, r2
- cmp/eq r1, r2
- bf wrong
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/stcl-gbr.cgs b/sim/testsuite/sim/sh64/compact/stcl-gbr.cgs
deleted file mode 100644
index 3e74cc551de..00000000000
--- a/sim/testsuite/sim/sh64/compact/stcl-gbr.cgs
+++ /dev/null
@@ -1,27 +0,0 @@
-# sh testcase for stc.l gbr, @-$rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global stcl_gbr
-stcl_gbr:
- mov #42, r0
- ldc r0, gbr
- mov #40, r0
- shll8 r0
- # save address
- mov r0, r1
- stc.l gbr, @-r0
-
- add #4, r0
- cmp/eq r0, r1
- bf wrong
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/sts-fpscr.cgs b/sim/testsuite/sim/sh64/compact/sts-fpscr.cgs
deleted file mode 100644
index 42724b44fff..00000000000
--- a/sim/testsuite/sim/sh64/compact/sts-fpscr.cgs
+++ /dev/null
@@ -1,23 +0,0 @@
-# sh testcase for sts fpscr, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global sts_fpscr
-sts_fpscr:
- sts fpscr, r0
- mov #42, r0
- lds r0, fpscr
- sts fpscr, r1
- cmp/eq r0, r1
- bf wrong
-
-okay:
- pass
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/sts-fpul.cgs b/sim/testsuite/sim/sh64/compact/sts-fpul.cgs
deleted file mode 100644
index ddbdaf15fb2..00000000000
--- a/sim/testsuite/sim/sh64/compact/sts-fpul.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for sts fpul, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global sts_fpul
-sts_fpul:
- # This is properly exercised by the lds-fpul test case.
- sts fpul, r1
- pass
diff --git a/sim/testsuite/sim/sh64/compact/sts-mach.cgs b/sim/testsuite/sim/sh64/compact/sts-mach.cgs
deleted file mode 100644
index 4d34bc17aa8..00000000000
--- a/sim/testsuite/sim/sh64/compact/sts-mach.cgs
+++ /dev/null
@@ -1,22 +0,0 @@
-# sh testcase for sts mach, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global sts_mach
-sts_mach:
- mov #42, r0
- lds r0, mach
- sts mach, r1
- cmp/eq r0, r1
- bf wrong
-
-okay:
- pass
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/sts-macl.cgs b/sim/testsuite/sim/sh64/compact/sts-macl.cgs
deleted file mode 100644
index b805f796e44..00000000000
--- a/sim/testsuite/sim/sh64/compact/sts-macl.cgs
+++ /dev/null
@@ -1,21 +0,0 @@
-# sh testcase for sts macl, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global sts_macl
-sts_macl:
- mov #42, r0
- lds r0, macl
- sts macl, r1
- cmp/eq r0, r1
- bf wrong
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/sts-pr.cgs b/sim/testsuite/sim/sh64/compact/sts-pr.cgs
deleted file mode 100644
index 3e4f6ee880a..00000000000
--- a/sim/testsuite/sim/sh64/compact/sts-pr.cgs
+++ /dev/null
@@ -1,22 +0,0 @@
-# sh testcase for sts pr, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global sts_pr
-sts_pr:
- mov #42, r0
- lds r0, pr
- sts pr, r1
- cmp/eq r0, r1
- bf wrong
-
-okay:
- pass
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/stsl-fpscr.cgs b/sim/testsuite/sim/sh64/compact/stsl-fpscr.cgs
deleted file mode 100644
index 032870dc189..00000000000
--- a/sim/testsuite/sim/sh64/compact/stsl-fpscr.cgs
+++ /dev/null
@@ -1,28 +0,0 @@
-# sh testcase for sts.l fpscr, @-$rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global stsl_fpscr
-stsl_fpscr:
- mov #40, r0
- shll8 r0
- # Preserve r0.
- mov r0, r7
- sts.l fpscr, @-r0
-
-check:
- # Ensure r0 is decremented.
- add #4, r0
- cmp/eq r0, r7
- bf wrong
-
-okay:
- pass
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/stsl-fpul.cgs b/sim/testsuite/sim/sh64/compact/stsl-fpul.cgs
deleted file mode 100644
index 89bd9e73849..00000000000
--- a/sim/testsuite/sim/sh64/compact/stsl-fpul.cgs
+++ /dev/null
@@ -1,27 +0,0 @@
-# sh testcase for sts.l fpul, @-$rn -*- Asm -*_
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global stsl_fpul
-stsl_fpul:
- mov #40, r0
- shll8 r0
- # Preserve r0.
- mov r0, r7
- sts.l fpul, @-r0
-
-dec:
- # Check for proper pre-decrementing.
- add #4, r0
- cmp/eq r0, r7
- bf wrong
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/stsl-mach.cgs b/sim/testsuite/sim/sh64/compact/stsl-mach.cgs
deleted file mode 100644
index e15bddece29..00000000000
--- a/sim/testsuite/sim/sh64/compact/stsl-mach.cgs
+++ /dev/null
@@ -1,42 +0,0 @@
-# sh testcase for sts.l mach, @-$rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global stsl_mach
-stsl_mach:
- # Build up a distinctive bit pattern.
- mov #1, r0
- shll8 r0
- add #12, r0
- shll8 r0
- add #85, r0
- shll8 r0
- add #170, r0
-
- lds r0, mach
- mov #40, r2
- shll8 r2
- # Preserve r2.
- mov r2, r7
- sts.l mach, @-r2
-
- # check results.
- mov.l @r2, r3
- cmp/eq r0, r3
- bf wrong
-
- # Ensure decrement occurred.
- add #4, r2
- cmp/eq r2, r7
- bf wrong
-
-okay:
- pass
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/stsl-macl.cgs b/sim/testsuite/sim/sh64/compact/stsl-macl.cgs
deleted file mode 100644
index 854ef341552..00000000000
--- a/sim/testsuite/sim/sh64/compact/stsl-macl.cgs
+++ /dev/null
@@ -1,42 +0,0 @@
-# sh testcase for sts.l macl, @-$rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global stsl_macl
-stsl_macl:
- # Build up a distinctive bit pattern.
- mov #1, r0
- shll8 r0
- add #12, r0
- shll8 r0
- add #85, r0
- shll8 r0
- add #170, r0
-
- lds r0, macl
- mov #40, r2
- shll8 r2
- # Preserve r2.
- mov r2, r7
- sts.l macl, @-r2
-
- # check results.
- mov.l @r2, r3
- cmp/eq r0, r3
- bf wrong
-
- # Ensure decrement occurred.
- add #4, r2
- cmp/eq r2, r7
- bf wrong
-
-okay:
- pass
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/stsl-pr.cgs b/sim/testsuite/sim/sh64/compact/stsl-pr.cgs
deleted file mode 100644
index b519c9bb5bd..00000000000
--- a/sim/testsuite/sim/sh64/compact/stsl-pr.cgs
+++ /dev/null
@@ -1,42 +0,0 @@
-# sh testcase for sts.l pr, @-$rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global stsl_pr
-stsl_pr:
- # Build up a distinctive bit pattern.
- mov #1, r0
- shll8 r0
- add #12, r0
- shll8 r0
- add #85, r0
- shll8 r0
- add #170, r0
-
- lds r0, pr
- mov #40, r2
- shll8 r2
- # Preserve r2.
- mov r2, r7
- sts.l pr, @-r2
-
- # check results.
- mov.l @r2, r3
- cmp/eq r0, r3
- bf wrong
-
- # Ensure decrement occurred.
- add #4, r2
- cmp/eq r2, r7
- bf wrong
-
-okay:
- pass
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/sub.cgs b/sim/testsuite/sim/sh64/compact/sub.cgs
deleted file mode 100644
index 3ba29f872aa..00000000000
--- a/sim/testsuite/sim/sh64/compact/sub.cgs
+++ /dev/null
@@ -1,68 +0,0 @@
-# sh testcase for sub $rm, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global sub1
-sub1:
- # 0 - x.
- mov #0, r0
- mov #3, r1
- sub r1, r0
-
- mov #2, r7
- not r7, r7
- cmp/eq r7, r0
- bf wrong
-
- .global sub2
-sub2:
- # x - 0.
- mov #0, r0
- mov #3, r1
- sub r0, r1
- assert r1, #3
-
- .global sub3
-sub3:
- # x - y.
- mov #4, r0
- mov #3, r1
- sub r0, r1
-
- mov #0, r7
- not r7, r7
- cmp/eq r7, r1
- bf wrong
-
- .global sub4
-sub4:
- # y - x.
- mov #4, r0
- mov #3, r1
- sub r1, r0
- assert r0, #1
-
- .global sub5
-sub5:
- # y - y == 0 (where y are in two distinct registers).
- mov #4, r0
- mov #4, r1
- sub r1, r0
- assert r0, #0
-
- .global sub6
-sub6:
- # y - y = 0 (where y is the same register).
- mov #4, r1
- sub r1, r1
- assert r1, #0
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/subc.cgs b/sim/testsuite/sim/sh64/compact/subc.cgs
deleted file mode 100644
index cda1e84ae9d..00000000000
--- a/sim/testsuite/sim/sh64/compact/subc.cgs
+++ /dev/null
@@ -1,109 +0,0 @@
-# sh testcase for subc $rm, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-zero:
- mov #0, r0
- mov #0, r1
- clrt
- subc r0, r1
- assert r1, #0
-
-zerot:
- mov #0, r0
- mov #0, r1
- sett
- subc r0, r1
- # Invert all 1's to all 0's for ease of comparison.
- not r1, r1
- assert r1, #0
-
-null:
- mov #0, r0
- mov #10, r1
- clrt
- subc r0, r1
- assert r1, #10
-
-nullt:
- mov #0, r0
- mov #10, r1
- sett
- subc r0, r1
- assert r1, #9
-
-subc:
- mov #10, r0
- mov #0, r1
- clrt
- subc r0, r1
- # Again, invert ..
- not r1, r1
- assert r1, #9
-
-subct:
- mov #10, r0
- mov #0, r1
- sett
- subc r0, r1
- # Again, invert ..
- not r1, r1
- assert r1, #10
-
-subc2:
- mov #10, r0
- mov #20, r1
- clrt
- subc r0, r1
- assert r1, #10
-
-subc2t:
- mov #20, r0
- mov #10, r1
- sett
- subc r0, r1
- # Again, invert ..
- not r1, r1
- assert r1, #10
-
-subc3:
- mov #5, r0
- mov #5, r1
- clrt
- subc r0, r1
- assert r1, #0
-
-subc3t:
- mov #5, r0
- mov #5, r1
- sett
- subc r0, r1
- # Again, invert ..
- not r1, r1
- assert r1, #0
-
-large:
- mov #2, r0
- mov #10, r1
- clrt
- subc r1, r0
- # Again, invert ..
- not r0, r0
- assert r0, #7
-
-larget:
- mov #2, r0
- mov #10, r1
- sett
- subc r0, r1
- assert r1, #7
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/subv.cgs b/sim/testsuite/sim/sh64/compact/subv.cgs
deleted file mode 100644
index ceb8c64e7fd..00000000000
--- a/sim/testsuite/sim/sh64/compact/subv.cgs
+++ /dev/null
@@ -1,55 +0,0 @@
-# sh testcase for subv $rm, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-zero:
- mov #0, r0
- mov #0, r1
- subv r0, r1
- bt wrong
- assert r1, #0
-
-one:
- mov #10, r0
- mov #0, r1
- subv r0, r1
- bt wrong
- not r1, r1
- assert r1, #9
-
-large:
- # Produce MAXINT in R0.
- mov #0, r0
- not r0, r0
- shlr r0
-
- # Put -3 into R1.
- mov #3, r1
- neg r1, r1
-
- # Subtract them and underflow.
- subv r0, r1
- bf wrong
-
-another:
- # Produce MAXINT in R0.
- mov #0, r0
- not r0, r0
- shlr r0
-
- # Put -3 into R1.
- mov #3, r1
- neg r1, r1
-
- # Subtract them and overflow.
- subv r1, r0
- bf wrong
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/swapb.cgs b/sim/testsuite/sim/sh64/compact/swapb.cgs
deleted file mode 100644
index 22f6f16a2e1..00000000000
--- a/sim/testsuite/sim/sh64/compact/swapb.cgs
+++ /dev/null
@@ -1,44 +0,0 @@
-# sh testcase for swap.b $rm, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
-init:
- # Build up a distinctive bit pattern.
- mov #1, r0
- shll8 r0
- add #12, r0
- shll8 r0
- add #85, r0
- shll8 r0
- add #70, r0
-
-test:
- # Swap the lower two bytes into a different register.
- swap.b r0, r1
- mov #1, r7
- shll8 r7
- add #12, r7
- shll8 r7
- add #70, r7
- shll8 r7
- add #85, r7
- cmp/eq r1, r7
- bf wrong
-
-swapback:
- # Swap the lower two bytes into the same registers.
- # R0 should now equal R1.
- swap.b r1, r2
- cmp/eq r0, r2
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/swapw.cgs b/sim/testsuite/sim/sh64/compact/swapw.cgs
deleted file mode 100644
index fa1ab697f27..00000000000
--- a/sim/testsuite/sim/sh64/compact/swapw.cgs
+++ /dev/null
@@ -1,43 +0,0 @@
-# sh testcase for swap.w $rm, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global swapw
-swapw:
- # Build up a characteristic bit pattern in R0.
- mov #85, r0
- shll16 r0
- add #3, r0
- rotr r0
- rotr r0
- or #170, r0
- # Preserve for later.
- mov r0, r8
-
-test:
- swap.w r0, r1
- mov #64, r0
- shll8 r0
- or #170, r0
- shll8 r0
- or #192, r0
- shll8 r0
- or #21, r0
- cmp/eq r1, r0
- bf wrong
-
-swapback:
- swap.w r1, r2
- cmp/eq r2, r8
- bf wrong
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/tasb.cgs b/sim/testsuite/sim/sh64/compact/tasb.cgs
deleted file mode 100644
index cb7f61870d2..00000000000
--- a/sim/testsuite/sim/sh64/compact/tasb.cgs
+++ /dev/null
@@ -1,26 +0,0 @@
-# sh testcase for tas.b @$rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
-tasb1:
- mov #40, r0
- shll8 r0
- tas.b @r0
- bf wrong
-
-tasb2:
- mov #40, r0
- shll8 r0
- tas.b @r0
- bt wrong
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/testutils.inc b/sim/testsuite/sim/sh64/compact/testutils.inc
deleted file mode 100644
index b1ad830578b..00000000000
--- a/sim/testsuite/sim/sh64/compact/testutils.inc
+++ /dev/null
@@ -1,49 +0,0 @@
-# Support macros for the assembly test cases.
-
- .macro start
- .text
- .global start
-start:
- .endm
-
- # Perform a single to double precision floating point conversion.
- .macro _s2d fpr dpr
- flds \fpr, fpul
- _setpr
- fcnvsd fpul, \dpr
- _clrpr
- .endm
-
- # Set the PR (PRecision) bit in the FPSCR.
- .macro _setpr
- sts fpscr, r7
- mov #8, r8
- shll16 r8
- or r8, r7
- lds r7, fpscr
- .endm
-
- # Clear the PR bit.
- .macro _clrpr
- sts fpscr, r7
- mov #8, r8
- shll16 r8
- not r8, r8
- and r8, r7
- lds r7, fpscr
- .endm
-
- # nb: this macro clobbers R7.
- .macro assert reg value
- mov \value, r7
- cmp/eq \reg, r7
- bf wrong
- .endm
-
- .macro pass
- trapa #253
- .endm
-
- .macro fail
- trapa #254
- .endm
diff --git a/sim/testsuite/sim/sh64/compact/trapa.cgs b/sim/testsuite/sim/sh64/compact/trapa.cgs
deleted file mode 100644
index 24f8a6b13ba..00000000000
--- a/sim/testsuite/sim/sh64/compact/trapa.cgs
+++ /dev/null
@@ -1,13 +0,0 @@
-# sh testcase for trapa #$imm8 -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global trapa
-trapa:
- # pass is a macro for "trapa #253".
- trapa #253
diff --git a/sim/testsuite/sim/sh64/compact/tst.cgs b/sim/testsuite/sim/sh64/compact/tst.cgs
deleted file mode 100644
index a72b8a9a743..00000000000
--- a/sim/testsuite/sim/sh64/compact/tst.cgs
+++ /dev/null
@@ -1,62 +0,0 @@
-# sh testcase for tst $rm, $rn
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global tst1
-tst1:
- mov #0, r0
- mov #0, r1
- tst r0, r0
- bf wrong
-
-test2:
- mov #0, r0
- mov #1, r1
- tst r0, r1
- bf wrong
-
-test3:
- mov #0, r0
- mov #1, r1
- tst r1, r0
- bf wrong
-
-test4:
- mov #1, r0
- mov #1, r1
- tst r0, r1
- bt wrong
-
-test5:
- mov #1, r0
- rotr r0
- add #85, r0
- shll16 r0
- add #12, r0
- mov #1, r1
- rotr r1
- add #85, r1
- shll16 r1
- add #12, r1
- tst r0, r1
- bt wrong
-
-test6:
- mov #1, r0
- rotr r0
- add #85, r0
- shll16 r0
- add #12, r0
- mov #1, r1
- tst r0, r1
- bf wrong
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/tstb.cgs b/sim/testsuite/sim/sh64/compact/tstb.cgs
deleted file mode 100644
index 1b3829b1d30..00000000000
--- a/sim/testsuite/sim/sh64/compact/tstb.cgs
+++ /dev/null
@@ -1,30 +0,0 @@
-# sh testcase for tst.b #$imm8, @(r0, gbr) -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global orb
-init:
- # Init GBR and R0.
- mov #30, r0
- ldc r0, gbr
- mov #40, r0
-
-orb:
- tst.b #0, @(r0, gbr)
- bf wrong
- tst.b #170, @(r0, gbr)
- bf wrong
- tst.b #0, @(r0, gbr)
- bf wrong
- tst.b #255, @(r0, gbr)
-
-okay:
- pass
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/compact/tsti.cgs b/sim/testsuite/sim/sh64/compact/tsti.cgs
deleted file mode 100644
index e088029b470..00000000000
--- a/sim/testsuite/sim/sh64/compact/tsti.cgs
+++ /dev/null
@@ -1,32 +0,0 @@
-# sh testcase for tst #$imm8, r0 -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global tsti
-tsti:
- mov #0, r0
- tst #0, r0
-
-tsti2:
- mov #0, r0
- tst #1, r0
-
-tsti3:
- mov #1, r0
- tst #0, r0
-
-tsti4:
- mov #1, r0
- tst #1, r0
-
-tsti5:
- mov #255, r0
- tst #255, r0
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/compact/xor.cgs b/sim/testsuite/sim/sh64/compact/xor.cgs
deleted file mode 100644
index d158aaf3713..00000000000
--- a/sim/testsuite/sim/sh64/compact/xor.cgs
+++ /dev/null
@@ -1,70 +0,0 @@
-# sh testcase for xor $rm64, $rn64 -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global xor
-xor:
- # 0 (+) 1 = 1.
- mov #0, r0
- mov #1, r1
- xor r0, r1
- assert r1, #1
-
-xor2:
- # 1 (+) 0 = 0.
- mov #1, r0
- mov #0, r1
- xor r0, r1
- assert r1, #1
-
-xor3:
- # 0 (+) 0 = 0.
- mov #0, r0
- mov #0, r1
- xor r0, r1
- assert r1, #0
-
-xor4:
- # 0 (+) 0 = 0.
- mov #0, r0
- xor r0, r0
- assert r0, #0
-
-xor5:
- mov #0, r0
- or #85, r0
- shll16 r0
- or #170, r0
- mov r0, r1
- mov #0, r0
- or #85, r0
- shll16 r0
- or #170, r0
- xor r1, r0
- assert r0, #0
-
-xor6:
- mov #0, r0
- or #85, r0
- shll16 r0
- or #170, r0
- mov r0, r1
- mov #0, r0
- or #85, r0
- shll16 r0
- or #12, r0
- xor r0, r1
- mov #0, r0
- or #166, r0
- cmp/eq r0, r1
- bf wrong
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/xorb.cgs b/sim/testsuite/sim/sh64/compact/xorb.cgs
deleted file mode 100644
index b31464b3c13..00000000000
--- a/sim/testsuite/sim/sh64/compact/xorb.cgs
+++ /dev/null
@@ -1,24 +0,0 @@
-# sh testcase for xor.b #$imm8, @(r0, gbr) -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global orb
-init:
- # Init GBR and R0.
- mov #30, r0
- ldc r0, gbr
- mov #40, r0
-
-orb:
- xor.b #0, @(r0, gbr)
- xor.b #170, @(r0, gbr)
- xor.b #0, @(r0, gbr)
- xor.b #255, @(r0, gbr)
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/compact/xori.cgs b/sim/testsuite/sim/sh64/compact/xori.cgs
deleted file mode 100644
index 732b9ec5c48..00000000000
--- a/sim/testsuite/sim/sh64/compact/xori.cgs
+++ /dev/null
@@ -1,50 +0,0 @@
-# sh testcase for xor #$imm8, r0 -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
- .global xori
-xori:
- # 0 (+) 1 = 1.
- mov #0, r0
- xor #1, r0
- assert r0, #1
-
-xori2:
- # 1 (+) 0 = 1.
- mov #1, r0
- xor #0, r0
- assert r0, #1
-
-xori3:
- # 1 (+) 1 = 0.
- mov #1, r0
- xor #1, r0
- assert r0, #0
-
-xori4:
- # 255 (+) 255 = 0.
- mov #0, r0
- or #255, r0
- xor #255, r0
- assert r0, #0
-
-xori5:
- # 0 (+) 255 = 255.
- mov #0, r0
- xor #255, r0
- mov r0, r1
-
- mov #0, r0
- or #255, r0
- cmp/eq r0, r1
- bf wrong
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/compact/xtrct.cgs b/sim/testsuite/sim/sh64/compact/xtrct.cgs
deleted file mode 100644
index 11dae7cbdec..00000000000
--- a/sim/testsuite/sim/sh64/compact/xtrct.cgs
+++ /dev/null
@@ -1,46 +0,0 @@
-# sh testcase for xtrct $rm, $rn -*- Asm -*-
-# mach: all
-# as: -isa=shcompact
-# ld: -m shelf32
-
- .include "compact/testutils.inc"
-
- start
-
-init:
- mov #170, r0
- shll8 r0
- add #1, r0
- shll8 r0
- add #66, r0
- shll8 r0
- mov r0, r1
-
- mov #85, r0
- shll8 r0
- add #2, r0
- shll8 r0
- add #42, r0
- shll8 r0
- add #3, r0
-
-copy:
- mov r0, r3
- mov r1, r4
-
-xtrct:
- xtrct r0, r1
-
-check:
- # Lower r3, upper r4.
- shll16 r3
- shlr16 r4
- or r3, r4
- cmp/eq r1, r4
- bf wrong
-
-okay:
- pass
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/interwork.exp b/sim/testsuite/sim/sh64/interwork.exp
deleted file mode 100644
index acd19b3c90c..00000000000
--- a/sim/testsuite/sim/sh64/interwork.exp
+++ /dev/null
@@ -1,20 +0,0 @@
-# SH64 interworking testsuite.
-# In particular, test parts of the instruction set that can be used
-# for SHmedia/SHcompact instruction set mode switches.
-
-if [istarget sh64-*-*] {
- # load support procs (none yet)
- # load_lib cgen.exp
-
- # all machines
- set all_machs "sh5"
-
- foreach src [lsort [glob -nocomplain $srcdir/$subdir/misc/*.s]] {
- # If we're only testing specific files and this isn't one of them,
- # skip it.
- if ![runtest_file_p $runtests $src] {
- continue
- }
- run_sim_test $src $all_machs
- }
-}
diff --git a/sim/testsuite/sim/sh64/media.exp b/sim/testsuite/sim/sh64/media.exp
deleted file mode 100644
index 1a3d9f4c961..00000000000
--- a/sim/testsuite/sim/sh64/media.exp
+++ /dev/null
@@ -1,19 +0,0 @@
-# SHmedia testsuite.
-
-if [istarget sh64-*-*] {
- # load support procs (none yet)
- # load_lib cgen.exp
-
- # all machines
- set all_machs "sh5"
-
- # The .cgs suffix is for "cgen .s".
- foreach src [lsort [glob -nocomplain $srcdir/$subdir/media/*.cgs]] {
- # If we're only testing specific files and this isn't one of them,
- # skip it.
- if ![runtest_file_p $runtests $src] {
- continue
- }
- run_sim_test $src $all_machs
- }
-}
diff --git a/sim/testsuite/sim/sh64/media/ChangeLog b/sim/testsuite/sim/sh64/media/ChangeLog
deleted file mode 100644
index e435dbe5278..00000000000
--- a/sim/testsuite/sim/sh64/media/ChangeLog
+++ /dev/null
@@ -1,102 +0,0 @@
-2001-01-09 Ben Elliston <bje@redhat.com>
-
- * nsb.cgs: Test consecutive bits of zeros as well as ones.
- * ptb.cgs: Clean up.
-
-2001-01-08 Ben Elliston <bje@redhat.com>
-
- * fcmpund.cgs, fcmpuns.cgs: Complete test cases.
- * fcnvds.cgs, fcnvsd.cgs, fgetscr.cgs, fiprs.cgs: Ditto.
- * floatld.cgs, floatls.cgs, floatqd.cgs, floatqs.cgs: Ditto.
- * fmuld.cgs, fmuls.cgs, fputscr.cgs, fstxp.cgs: Ditto.
- * fsubd.cgs, fsubs.cgs, ftrcdl.cgs, ftrcdq.cgs: Ditto.
- * ftrcsl.cgs, ftrcsq.cgs, ftrvs.cgs: Ditto.
- * ldhil.cgs, ldhiq.cgs, ldlol.cgs, ldloq.cgs: Ditto.
- * mabsl.cgs, mabsw.cgs, maddl.cgs, maddsl.cgs: Ditto.
- * maddsub.cgs, maddsw.cgs, maddw.cgs: Ditto.
- * mcmpeqb.cgs, mcmpeql.cgs, mcmpeqw.cgs: Ditto.
- * mcmpgtl.cgs, mcmpgtub.cgs, mcmpgtw.cgs: Ditto.
- * mcmv.cgs, mcnvslw.cgs, mcnvswb.cgs, mcnvswub.cgs: Ditto.
- * mmacfxwl.cgs, mmacnfx-wl.cgs: Ditto.
- * mmulfxl.cgs, mmulfxrpw.cgs, mmulfxw.cgs: Ditto.
- * mmulhiwl.cgs, mmull.cgs, mmullowl.cgs: Ditto.
- * mmulsumwq.cgs, mmulw.cgs, movi.cgs: Ditto.
- * mpermw.cgs, msadubq.cgs: Ditto.
- * mshaldsl.cgs, mshaldsw.cgs: Ditto.
- * mshardl.cgs, mshardsq.cgs, mshardw.cgs: Ditto.
- * mshfhib.cgs, mshfhil.cgs, mshfhiw.cgs: Ditto.
- * mshflob.cgs, mshflol.cgs, mshflow.cgs: Ditto.
- * mshlldl.cgs, mshlldw.cgs, mshlrdl.cgs: Ditto.
- * mshlrdw.cgs, msubl.cgs, msubsl.cgs: Ditto.
- * msubsub.cgs, msubsw.cgs, msubw.cgs: Ditto.
- * mulsl.cgs, mulul.cgs: Ditto.
- * ptabs.cgs, ptb.cgs, ptrel.cgs: Ditto.
- * shard.cgs, shardl.cgs, shari.cgs, sharil.cgs: Ditto.
- * shlld.cgs, shlldl.cgs, shlli.cgs, shllil.cgs: Ditto.
- * shlrd.cgs, shlrdl.cgs, shlri.cgs, shlril.cgs: Ditto.
- * sthil.cgs, sthiq.cgs, swapq.cgs, trapa.cgs: Ditto.
-
- * testutils.inc (pass): Pass correct "syscall" number.
- (fail): Ditto.
-
-2000-12-13 Ben Elliston <bje@redhat.com>
-
- * sub.cgs, subl.cgs: Complete test cases.
- * ptrel.cgs: Likewise.
-
- * shori.cgs: Test for zero extension of immediate operand.
- * fcmpged.cgs, fcmpges.cgs, fldd.cgs: Complete test cases.
- * fldp.cgs, flds.cgs, fldxd.cgs, fldxp.cgs: Likewise.
- * fldxs.cgs, fmacs.cgs, fnegd.cgs, fnegs.cgs: Likewise.
- * fsqrtd.cgs, fsqrts.cgs, fstd.cgs, fstp.cgs: Likewise.
- * fsts.cgs, fstxd.cgs, fstxs.cgs: Likewise.
-
-2000-12-12 Ben Elliston <bje@redhat.com>
-
- * testutils.inc (pass): Use simple syscall mechanism.
- (fail): Likewise.
- (_packb, _packw, _packl): New macros for packing slices.
-
- * stb.cgs, stq.cgs, stxb.cgs, stxq.cgs: Complete test cases.
- * stl.cgs, stw.cgs, stxl.cgs, stxw.cgs: Likewise.
- * ldl.cgs, ldq.cgs, ldub.cgs, lduw.cgs, ldw.cgs: Likewise.
- * ldxb.cgs, ldxl.cgs, ldxq.cgs, ldxub.cgs: Likewise.
- * ldxuw.cgs, ldxw.cgs, nsb.cgs, trapa.cgs: Likewise.
-
- * fcmpeqd.cgs, fcmpeqs.cgs, fcmpgtd.cgs: Complete test cases.
- * fcmpgts.cgs, fdivd.cgs, fdivs.cgs, fmovd.cgs: Likewise.
- * fmovdq.cgs, fmovqd.cgs, fmovls.cgs, fmovs.cgs: Likewise.
- * fmovsl.cgs: Likewise.
-
-2000-12-11 Ben Elliston <bje@redhat.com>
-
- * fabss.cgs, fabsd.cgs, fadds.cgs, faddd.cgs: Complete test cases.
- * getcfg.cgs, getcon.cgs, gettr.cgs, icbi.cgs: Likewise.
- * prefi.cgs, pta.cgs, ptabs.cgs, ptb.cgs: Likewise.
- * putcon.cgs, putcfg.cgs, rte.cgs: Likewise.
-
- * add.cgs, addi.cgs, addl.cgs, addil.cgs: Complete test cases.
- * addl.cgs, addzl.cgs, alloco.cgs, and.cgs, andc.cgs: Likewise.
- * andi.cgs, beq.cgs, beqi.cgs, bge.cgs, bgeu.cgs: Likewise.
- * bgt.cgs, bgtu.cgs, blink.cgs, bne.cgs, bnei.cgs: Likewise.
- * brk.cgs, byterev.cgs, cmpeq.cgs, cmpgt.cgs: Likewise.
- * cmpgtu.cgs, cmveq.cgs, cmvne.cgs: Likewise.
-
-2000-12-07 Ben Elliston <bje@redhat.com>
-
- * mextr1.cgs, mextr2.cgs, mextr3.cgs: Complete test cases.
- * mextr4.cgs, mextr5.cgs, mextr6.cgs, mextr7.cgs: Likewise.
-
-2000-12-05 Ben Elliston <bje@redhat.com>
-
- * nop.cgs, ocbi.cgs, ocbp.cgs, ocbwb.cgs: Complete test cases.
- * or.cgs, ori.cgs, xor.cgs, xori.cgs: Ditto.
- * sleep.cgs, synci.cgs, synco.cgs: Ditto.
-
-2000-11-22 Ben Elliston <bje@redhat.com>
-
- * *.cgs: Include "media/testutils.inc", not "testutils.inc" as
- generated test cases do. Miscellaneous fixes.
-
- * testutils.inc: New file.
- * *.cgs: Generate test cases.
diff --git a/sim/testsuite/sim/sh64/media/add.cgs b/sim/testsuite/sim/sh64/media/add.cgs
deleted file mode 100644
index 9778e8fd62c..00000000000
--- a/sim/testsuite/sim/sh64/media/add.cgs
+++ /dev/null
@@ -1,47 +0,0 @@
-# sh testcase for add $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global add
-init:
- pta wrong, tr0
-add:
- movi 10, r0
- movi 0, r1
- add r0, r1, r3
- movi 10, r4
- bne r3, r4, tr0
-
-add0:
- movi 1, r63
- add r63, r63, r1
- bnei r1, 0, tr0
-
-add2:
- movi 0, r0
- movi 10, r1
- add r0, r1, r3
- movi 10, r4
- bne r3, r4, tr0
-
-add3:
- movi 10, r1
- add r63, r1, r3
- movi 10, r4
- bne r3, r4, tr0
-
-add4:
- movi 10, r1
- add r1, r63, r3
- movi 10, r4
- bne r3, r4, tr0
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/addi.cgs b/sim/testsuite/sim/sh64/media/addi.cgs
deleted file mode 100644
index 3d4b49f5995..00000000000
--- a/sim/testsuite/sim/sh64/media/addi.cgs
+++ /dev/null
@@ -1,37 +0,0 @@
-# sh testcase for addi $rm, $disp10, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
-
-addi1:
- movi 1, r0
- addi r0, 10, r0
- bnei r0, 11, tr0
-
-addi2:
- movi 10, r0
- addi r0, 1, r0
- bnei r0, 11, tr0
-
-addi3:
- movi 10, r0
- addi r0, -1, r0
- bnei r0, 9, tr0
-
-addi4:
- movi 20, r0
- addi r0, -2, r0
- bnei r0, 18, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/addil.cgs b/sim/testsuite/sim/sh64/media/addil.cgs
deleted file mode 100644
index 5c92e2733a6..00000000000
--- a/sim/testsuite/sim/sh64/media/addil.cgs
+++ /dev/null
@@ -1,49 +0,0 @@
-# sh testcase for addi.l $rm, $disp10, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
-
-addil0:
- movi 1, r63
- addi.l r63, 0, r1
- bnei r1, 0, tr0
-
-addil1:
- movi 10, r0
- addi.l r0, 0, r3
- bnei r3, 10, tr0
-
-addil2:
- movi 0, r0
- addi.l r0, 10, r2
- bnei r2, 10, tr0
-
-addil3:
- addi.l r63, 10, r1
- bnei r1, 10, tr0
-
-addil4:
- movi 10, r0
- addi.l r0, 0, r1
- bnei r1, 10, tr0
-
-addil5:
- # Ensure top 32-bits are discarded when adding.
- movi 10, r0
- shlli r0, 32, r0
- addi r0, 10, r0
- addi.l r0, 10, r2
- bnei r2, 20, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/addl.cgs b/sim/testsuite/sim/sh64/media/addl.cgs
deleted file mode 100644
index 7f94b616206..00000000000
--- a/sim/testsuite/sim/sh64/media/addl.cgs
+++ /dev/null
@@ -1,61 +0,0 @@
-# sh testcase for add.l $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global addl
-init:
- pta wrong, tr0
-
-addl0:
- movi 1, r63
- add.l r63, r63, r1
- bnei r1, 0, tr0
-
-addl1:
- movi 10, r0
- movi 0, r1
- add.l r0, r1, r3
- movi 10, r4
- bne r3, r4, tr0
-
-addl2:
- movi 0, r0
- movi 10, r1
- add.l r0, r1, r2
- movi 10, r3
- bne r2, r3, tr0
-
-addl3:
- movi 10, r0
- add.l r63, r0, r1
- movi 10, r2
- bne r1, r2, tr0
-
-addl4:
- movi 10, r0
- add.l r0, r63, r1
- movi 10, r2
- bne r1, r2, tr0
-
-addl5:
- # Ensure top 32-bits are discarded when adding.
- movi 10, r0
- shlli r0, 32, r0
- addi r0, 10, r0
- movi 10, r1
- shlli r1, 32, r1
- addi r1, 10, r1
- add.l r0, r1, r2
- movi 20, r3
- bne r2, r3, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/addzl.cgs b/sim/testsuite/sim/sh64/media/addzl.cgs
deleted file mode 100644
index b7917d377a6..00000000000
--- a/sim/testsuite/sim/sh64/media/addzl.cgs
+++ /dev/null
@@ -1,39 +0,0 @@
-# sh testcase for addz.l $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- pta wrong, tr0
-
-addzl1:
- movi 1, r0
- movi 2, r1
- addz.l r0, r1, r2
- bnei r2, 3, tr0
-
-addzl2:
- movi 1, r0
- shlli r0, 32, r0
- addi r0, 2, r0
- movi 1, r1
- shlli r1, 32, r1
- addi r1, 2, r1
- addz.l r0, r1, r2
- bnei r2, 4, tr0
-
-addzl3:
- movi 1, r0
- shlli r0, 31, r0
- addi r0, 2, r0
- movi 2, r1
- addz.l r0, r1, r2
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/alloco.cgs b/sim/testsuite/sim/sh64/media/alloco.cgs
deleted file mode 100644
index 5f27359c3b6..00000000000
--- a/sim/testsuite/sim/sh64/media/alloco.cgs
+++ /dev/null
@@ -1,10 +0,0 @@
-# sh testcase for alloco $rm, $disp6x32 -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
- alloco r0, 32
- pass
diff --git a/sim/testsuite/sim/sh64/media/and.cgs b/sim/testsuite/sim/sh64/media/and.cgs
deleted file mode 100644
index c2d42339bcf..00000000000
--- a/sim/testsuite/sim/sh64/media/and.cgs
+++ /dev/null
@@ -1,68 +0,0 @@
-# sh testcase for and $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
-
-and0:
- # 0 and 0 is 0.
- movi 0, r0
- movi 0, r1
- and r0, r1, r2
- bnei r2, 0, tr0
-
-and1:
- # 0 and 1 is 0.
- movi 0, r0
- movi 1, r1
- and r0, r1, r2
- bnei r2, 0, tr0
-
-and2:
- # 1 and 0 is 0.
- movi 1, r0
- movi 0, r1
- and r0, r1, r2
- bnei r2, 0, tr0
-
-and3:
- # 1 and 1 is 1.
- movi 1, r0
- movi 1, r1
- and r0, r1, r2
- bnei r2, 1, tr0
-
-and4:
- movi 1, r0
- shlli r0, 63, r0
- movi 1, r1
- shlli r1, 63, r1
- and r0, r1, r2
- # Check it.
- movi 1, r3
- shlli r3, 63, r3
- bne r2, r3, tr0
-
-and5:
- movi 1, r0
- shlli r0, 63, r0
- movi 1, r1
- shlli r1, 63, r1
- ori r1, 1, r1
- and r0, r1, r2
- # Check it.
- movi 1, r3
- shlli r1, 63, r1
- bne r1, r2, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/andc.cgs b/sim/testsuite/sim/sh64/media/andc.cgs
deleted file mode 100644
index 60b50ace465..00000000000
--- a/sim/testsuite/sim/sh64/media/andc.cgs
+++ /dev/null
@@ -1,50 +0,0 @@
-# sh testcase for andc $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
-
-andc1:
- # X . !X = 0.
- movi 3, r0
- movi 3, r1
- andc r0, r1, r2
- bnei r2, 0, tr0
-
-andc2:
- # X . 0 = X.
- movi 3, r0
- movi 0, r1
- andc r0, r1, r2
- bnei r2, 3, tr0
-
-andc3:
- # wide X . 0 = wide X.
- movi 0x1020, r0
- shlli r0, 8, r0
- ori r0, 0x30, r0
- shlli r0, 8, r0
- ori r0, 0x40, r0
- shlli r0, 8, r0
- ori r0, 0x50, r0
- shlli r0, 8, r0
- ori r0, 0x60, r0
- shlli r0, 8, r0
- ori r0, 0x70, r0
- shlli r0, 8, r0
- ori r0, 0x80, r0
- movi 0, r1
- andc r0, r1, r2
- bne r0, r2, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/andi.cgs b/sim/testsuite/sim/sh64/media/andi.cgs
deleted file mode 100644
index decfc2fc2ec..00000000000
--- a/sim/testsuite/sim/sh64/media/andi.cgs
+++ /dev/null
@@ -1,46 +0,0 @@
-# sh testcase for andi $rm, $disp10, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
-
-andi0:
- # 0 and 0 is 0.
- movi 0, r0
- andi r0, 0, r2
- bnei r2, 0, tr0
-
-and1:
- # 0 and 1 is 0.
- movi 0, r0
- andi r0, 1, r2
- bnei r2, 0, tr0
-
-and2:
- # 1 and 0 is 0.
- movi 1, r0
- andi r0, 0, r2
- bnei r2, 0, tr0
-
-and3:
- # 1 and 1 is 1.
- movi 1, r0
- andi r0, 1, r2
- bnei r2, 1, tr0
-
-and4:
- movi 15, r0
- andi r0, 3, r2
- bnei r2, 3, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/beq.cgs b/sim/testsuite/sim/sh64/media/beq.cgs
deleted file mode 100644
index 6f96ffdf00f..00000000000
--- a/sim/testsuite/sim/sh64/media/beq.cgs
+++ /dev/null
@@ -1,52 +0,0 @@
-# sh testcase for beq$likely $rm, $rn, $tra -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global beq
-init:
- # Load up the branch target registers.
- pta beq2, tr0
- pta beq3, tr1
- pta wrong, tr2
-
-beq1:
- # Compare r0 with itself.
- # Always true, so branch likely.
- movi 1, r0
- beq/l r0, r0, tr0
- # We should branch over this.
- fail
-
-beq2:
- # Ensure high order bits are compared, too.
- movi 1, r0
- shlli r0, 35, r0
- addi r0, 10, r0
- movi 1, r1
- shlli r1, 35, r1
- addi r1, 10, r1
- beq r0, r1, tr1
- # We should branch over this, too.
- fail
-
-beq3:
- movi 1, r0
- shlli r0, 35, r0
- addi r0, 10, r0
- movi 2, r1
- shlli r1, 35, r1
- addi r1, 9, r1
- # Unlikely we'll branch!
- beq/u r0, r1, tr2
- # We should proceed to pass here.
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/beqi.cgs b/sim/testsuite/sim/sh64/media/beqi.cgs
deleted file mode 100644
index c2b4ea8acf5..00000000000
--- a/sim/testsuite/sim/sh64/media/beqi.cgs
+++ /dev/null
@@ -1,40 +0,0 @@
-# sh testcase for beqi$likely $rm, $imm6, $tra -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global beqi
-init:
- # Load up the branch target registers.
- pta beqi2, tr0
- pta beqi3, tr1
- pta wrong, tr2
-
-beqi1:
- # Always true, so branch likely.
- movi 1, r0
- beqi/l r0, 1, tr0
- # We should branch over this.
- fail
-
-beqi2:
- movi 22, r3
- beqi r3, 22, tr1
- # We should branch over this.
- fail
-
-beqi3:
- movi 27, r7
- # We shouldn't branch here.
- beqi/u r7, 23, tr2
- # We should proceed to pass here.
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/bge.cgs b/sim/testsuite/sim/sh64/media/bge.cgs
deleted file mode 100644
index 832ff06ac21..00000000000
--- a/sim/testsuite/sim/sh64/media/bge.cgs
+++ /dev/null
@@ -1,40 +0,0 @@
-# sh testcase for bge$likely $rm, $rn, $tra -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global bge
-init:
- pta bge2, tr0
- pta bge3, tr1
- pta wrong, tr2
- movi 0, r0
-
-bge1:
- # Compare r0 with itself.
- bge/l r0, r0, tr0
- # We should branch here.
- fail
-
-bge2:
- movi 1, r1
- movi 1, r2
- bge r1, r2, tr1
- # We should branch here.
- fail
-
-bge3:
- movi -1, r1
- movi 1, r2
- bge r1, r2, tr2
- # We should not branch here.
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/bgeu.cgs b/sim/testsuite/sim/sh64/media/bgeu.cgs
deleted file mode 100644
index da469d0e4ae..00000000000
--- a/sim/testsuite/sim/sh64/media/bgeu.cgs
+++ /dev/null
@@ -1,47 +0,0 @@
-# sh testcase for bgeu$likely $rm, $rn, $tra -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global bgeu
-init:
- movi 0, r0
-
-bgeu1:
- # Compare r0 with itself.
- pta bgeu2, tr0
- bgeu/l r0, r0, tr0
- # We should branch here.
- fail
-
-bgeu2:
- movi 1, r1
- movi 1, r2
- pta bge3, tr0
- bgeu r1, r2, tr0
- # We should branch here.
- fail
-
-bge3:
- movi -1, r1
- movi 1, r2
- # We SHOULD branch here.
- pta bge4, tr0
- bgeu r1, r2, tr0
- fail
-
-bge4:
- movi 1, r1
- movi -1, r2
- # We should not branch here.
- pta wrong, tr0
- bgeu r1, r2, tr0
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/bgt.cgs b/sim/testsuite/sim/sh64/media/bgt.cgs
deleted file mode 100644
index 8866635b818..00000000000
--- a/sim/testsuite/sim/sh64/media/bgt.cgs
+++ /dev/null
@@ -1,32 +0,0 @@
-# sh testcase for bgt$likely $rm, $rn, $tra -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-
-init:
- pta wrong, tr0
-
-bgt1:
- movi 1, r0
- movi -1, r1
- bgt r1, r0, tr0
-
-bgt2:
- bgt r0, r0, tr0
-
-bgt3:
- pta okay, tr1
- movi -1, r0
- movi 1, r1
- bgt r0, r1, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/bgtu.cgs b/sim/testsuite/sim/sh64/media/bgtu.cgs
deleted file mode 100644
index 3cc02696e75..00000000000
--- a/sim/testsuite/sim/sh64/media/bgtu.cgs
+++ /dev/null
@@ -1,36 +0,0 @@
-# sh testcase for bgtu$likely $rm, $rn, $tra -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-
-init:
- pta wrong, tr0
-
-bgtu1:
- movi 1, r0
- movi -1, r1
- pta bgt2, tr1
- bgtu r1, r0, tr1
- fail
-
-bgt2:
- bgtu r0, r0, tr0
-
-bgt3:
- pta okay, tr1
- movi -1, r0
- movi 1, r1
- pta okay, tr1
- bgtu r0, r1, tr1
- fail
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/blink.cgs b/sim/testsuite/sim/sh64/media/blink.cgs
deleted file mode 100644
index 000d1f597f2..00000000000
--- a/sim/testsuite/sim/sh64/media/blink.cgs
+++ /dev/null
@@ -1,17 +0,0 @@
-# sh testcase for blink $trb, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-blink:
- pta target, tr0
- gettr tr0, r1
- ptabs r1, tr0
- blink tr0, r0
- fail
-
-target:
- pass
diff --git a/sim/testsuite/sim/sh64/media/bne.cgs b/sim/testsuite/sim/sh64/media/bne.cgs
deleted file mode 100644
index f574147e3de..00000000000
--- a/sim/testsuite/sim/sh64/media/bne.cgs
+++ /dev/null
@@ -1,23 +0,0 @@
-# sh testcase for bne$likely $rm, $rn, $tra -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- movi 1, r0
- pta wrong, tr0
- pta okay, tr1
-
-bne1:
- bne r63, r63, tr0
-bne2:
- bne r0, r63, tr1
-bad:
- fail
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/bnei.cgs b/sim/testsuite/sim/sh64/media/bnei.cgs
deleted file mode 100644
index 5ce33991c0d..00000000000
--- a/sim/testsuite/sim/sh64/media/bnei.cgs
+++ /dev/null
@@ -1,23 +0,0 @@
-# sh testcase for bnei$likely $rm, $imm6, $tra -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- movi 1, r0
- pta wrong, tr0
- pta okay, tr1
-
-bnei1:
- bnei r63, 0, tr0
-bnei2:
- bnei r0, 3, tr1
-bad:
- fail
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/brk.cgs b/sim/testsuite/sim/sh64/media/brk.cgs
deleted file mode 100644
index 073641443ec..00000000000
--- a/sim/testsuite/sim/sh64/media/brk.cgs
+++ /dev/null
@@ -1,11 +0,0 @@
-# sh testcase for brk -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
- # brk will cause the sim to trap, so avoid it.
- pass
- brk
diff --git a/sim/testsuite/sim/sh64/media/byterev.cgs b/sim/testsuite/sim/sh64/media/byterev.cgs
deleted file mode 100644
index d97c3adb7b0..00000000000
--- a/sim/testsuite/sim/sh64/media/byterev.cgs
+++ /dev/null
@@ -1,67 +0,0 @@
-# sh testcase for byterev $rm, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
- pta wrong, tr0
-init:
- # Put a distinctive pattern in r0.
- movi 10, r0
- shlli r0, 8, r0
- ori r0, 20, r0
- shlli r0, 8, r0
- ori r0, 30, r0
- shlli r0, 8, r0
- ori r0, 40, r0
- shlli r0, 8, r0
- ori r0, 50, r0
- shlli r0, 8, r0
- ori r0, 60, r0
- shlli r0, 8, r0
- ori r0, 70, r0
- shlli r0, 8, r0
- ori r0, 80, r0
-
-byterev:
- byterev r0, r1
-
-check:
- andi r1, 255, r2
- movi 10, r3
- bne r2, r3, tr0
- shlri r1, 8, r1
- andi r1, 255, r2
- movi 20, r3
- bne r2, r3, tr0
- shlri r1, 8, r1
- andi r1, 255, r2
- movi 30, r3
- bne r2, r3, tr0
- shlri r1, 8, r1
- andi r1, 255, r2
- movi 40, r3
- bne r2, r3, tr0
- shlri r1, 8, r1
- andi r1, 255, r2
- movi 50, r3
- bne r2, r3, tr0
- shlri r1, 8, r1
- andi r1, 255, r2
- movi 60, r3
- bne r2, r3, tr0
- shlri r1, 8, r1
- andi r1, 255, r2
- movi 70, r3
- bne r2, r3, tr0
- shlri r1, 8, r1
- andi r1, 255, r2
- movi 80, r3
- bne r2, r3, tr0
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/cmpeq.cgs b/sim/testsuite/sim/sh64/media/cmpeq.cgs
deleted file mode 100644
index 78f51f4a65d..00000000000
--- a/sim/testsuite/sim/sh64/media/cmpeq.cgs
+++ /dev/null
@@ -1,42 +0,0 @@
-# sh testcase for cmpeq $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
- movi 0, r0
- movi 1, r1
- movi 2, r2
- movi 2, r3
- movi 3, r4
-
-cmpeq1:
- cmpeq r2, r2, r7
- bne r7, r1, tr0
-
-cmpeq2:
- cmpeq r2, r3, r7
- bne r7, r1, tr0
-
-cmpeq3:
- cmpeq r2, r4, r7
- bne r7, r0, tr0
-
-cmpeq4:
- movi 1, r2
- shlli r2, 63, r2
- movi 1, r3
- shlli r3, 63, r3
- cmpeq r2, r3, r7
- bne r7, r1, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/cmpgt.cgs b/sim/testsuite/sim/sh64/media/cmpgt.cgs
deleted file mode 100644
index e4a971bd5ee..00000000000
--- a/sim/testsuite/sim/sh64/media/cmpgt.cgs
+++ /dev/null
@@ -1,43 +0,0 @@
-# sh testcase for cmpgt $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
- movi 0, r0
- movi 1, r1
- movi 2, r2
- movi 2, r3
- movi 3, r4
-
-cmpgt1:
- cmpgt r2, r2, r7
- bne r7, r0, tr0
-
-cmpgt2:
- cmpgt r2, r3, r7
- bne r7, r0, tr0
-
-cmpgt3:
- cmpgt r4, r2, r7
- bne r7, r1, tr0
-
-cmpgt4:
- movi 1, r2
- shlli r2, 63, r2
- movi 1, r3
- shlli r3, 63, r3
- addi r3, 1, r3
- cmpgt r3, r2, r7
- bne r7, r1, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/cmpgtu.cgs b/sim/testsuite/sim/sh64/media/cmpgtu.cgs
deleted file mode 100644
index b896dfcb9fd..00000000000
--- a/sim/testsuite/sim/sh64/media/cmpgtu.cgs
+++ /dev/null
@@ -1,43 +0,0 @@
-# sh testcase for cmpgtu $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
- movi 0, r0
- movi 1, r1
- movi 2, r2
- movi 2, r3
- movi 3, r4
-
-cmpgt1:
- cmpgtu r2, r2, r7
- bne r7, r0, tr0
-
-cmpgt2:
- cmpgtu r2, r3, r7
- bne r7, r0, tr0
-
-cmpgt3:
- cmpgtu r4, r2, r7
- bne r7, r1, tr0
-
-cmpgt4:
- movi 1, r2
- shlli r2, 63, r2
- movi 1, r3
- shlli r3, 63, r3
- addi r3, 1, r3
- cmpgtu r3, r2, r7
- bne r7, r1, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/cmveq.cgs b/sim/testsuite/sim/sh64/media/cmveq.cgs
deleted file mode 100644
index 0f49733de36..00000000000
--- a/sim/testsuite/sim/sh64/media/cmveq.cgs
+++ /dev/null
@@ -1,32 +0,0 @@
-# sh testcase for cmveq $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- pta wrong, tr0
-
- movi 0, r0
- movi 1, r1
- movi 2, r2
- movi 21, r3
-
-cmveq:
- # Zap r7.
- movi 0, r7
-
- cmveq r0, r2, r7
- bne r2, r7, tr0
-
- cmveq r1, r3, r7
- # Make sure r7 is still equal to r2.
- bne r2, r7, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/cmvne.cgs b/sim/testsuite/sim/sh64/media/cmvne.cgs
deleted file mode 100644
index 909179afc76..00000000000
--- a/sim/testsuite/sim/sh64/media/cmvne.cgs
+++ /dev/null
@@ -1,32 +0,0 @@
-# sh testcase for cmvne $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- pta wrong, tr0
-
- movi 0, r0
- movi 1, r1
- movi 2, r2
- movi 21, r3
-
-cmvne:
- # Zap r7.
- movi 0, r7
-
- cmvne r1, r2, r7
- bne r2, r7, tr0
-
- cmvne r0, r3, r7
- # Make sure r7 is still equal to r2.
- bne r2, r7, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/fabsd.cgs b/sim/testsuite/sim/sh64/media/fabsd.cgs
deleted file mode 100644
index 47060fcc44b..00000000000
--- a/sim/testsuite/sim/sh64/media/fabsd.cgs
+++ /dev/null
@@ -1,39 +0,0 @@
-# sh testcase for fabs.d $drgh, $drf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- pta wrong, tr0
- movi 0, r0
- movi 1, r1
-
-fabs0:
- # Ensure fabs(-1) = 1.
- fmov.ls r0, fr7
- float.ld fr7, dr0
- fmov.ls r1, fr7
- float.ld fr7, dr2
- fsub.d dr0, dr2, dr4
- fabs.d dr4, dr6
- fcmpeq.d dr6, dr2, r7
- bnei r7, 1, tr0
-
-fabs1:
- # Ensure fabs(1) = 1.
- fmov.ls r0, fr7
- float.ld fr7, dr0
- fmov.ls r1, fr7
- float.ld fr7, dr2
- fabs.d dr2, dr4
- fcmpeq.d dr2, dr4, r7
- bnei r7, 1, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/fabss.cgs b/sim/testsuite/sim/sh64/media/fabss.cgs
deleted file mode 100644
index dd9aec7e640..00000000000
--- a/sim/testsuite/sim/sh64/media/fabss.cgs
+++ /dev/null
@@ -1,39 +0,0 @@
-# sh testcase for fabs.s $frgh, $frf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- pta wrong, tr0
- movi 0, r0
- movi 1, r1
-
-fabs0:
- # Ensure fabs(-1) = 1.
- fmov.ls r0, fr7
- float.ls fr7, fr0
- fmov.ls r1, fr7
- float.ls fr7, fr1
- fsub.s fr0, fr1, fr2
- fabs.s fr2, fr3
- fcmpeq.s fr3, fr1, r7
- bnei r7, 1, tr0
-
-fabs1:
- # Ensure fabs(1) = 1.
- fmov.ls r0, fr7
- float.ls fr7, fr0
- fmov.ls r1, fr7
- float.ls fr7, fr1
- fabs.s fr1, fr2
- fcmpeq.s fr1, fr2, r7
- bnei r7, 1, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/faddd.cgs b/sim/testsuite/sim/sh64/media/faddd.cgs
deleted file mode 100644
index 096f8528946..00000000000
--- a/sim/testsuite/sim/sh64/media/faddd.cgs
+++ /dev/null
@@ -1,33 +0,0 @@
-# sh testcase for fadd.d $drg, $drh, $drf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
- movi 2, r0
- movi 3, r1
-
-fadd0:
- # Add 2 and 3.
- fmov.ls r0, fr7
- float.ld fr7, dr0
- fmov.ls r1, fr7
- float.ld fr7, dr2
- fadd.d dr0, dr2, dr4
- # Check to make sure we got 5.
- movi 5, r2
- fmov.ls r2, fr7
- float.ld fr7, dr6
- fcmpeq.d dr4, dr6, r7
- bnei r7, 1, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/fadds.cgs b/sim/testsuite/sim/sh64/media/fadds.cgs
deleted file mode 100644
index fb93979c737..00000000000
--- a/sim/testsuite/sim/sh64/media/fadds.cgs
+++ /dev/null
@@ -1,34 +0,0 @@
-# sh testcase for fadd.s $frg, $frh, $frf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global fadds
-init:
- pta wrong, tr0
- movi 2, r0
- movi 3, r1
-
-fadd0:
- # Add 2 and 3.
- fmov.ls r0, fr7
- float.ls fr7, fr0
- fmov.ls r1, fr7
- float.ls fr7, fr1
- fadd.s fr0, fr1, fr2
- # Check to make sure we got 5.
- movi 5, r2
- fmov.ls r2, fr7
- float.ls fr7, fr3
- fcmpeq.s fr2, fr3, r7
- bnei r7, 1, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/fcmpeqd.cgs b/sim/testsuite/sim/sh64/media/fcmpeqd.cgs
deleted file mode 100644
index c19356476f9..00000000000
--- a/sim/testsuite/sim/sh64/media/fcmpeqd.cgs
+++ /dev/null
@@ -1,36 +0,0 @@
-# sh testcase for fcmpeq.d $drg, $drh, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
-
-fcmpeq1:
- movi 1, r0
- fmov.ls r0, fr0
- fmov.ls r0, fr1
- float.ld fr0, dr2
- float.ld fr1, dr4
- fcmpeq.d dr2, dr2, r7
- bnei r7, 1, tr0
-
-fcmpeq2:
- movi 1, r0
- fmov.ls r0, fr0
- movi 2, r1
- fmov.ls r1, fr1
- float.ld fr0, dr4
- float.ld fr1, dr6
- fcmpeq.d dr4, dr6, r7
- bnei r7, 0, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/fcmpeqs.cgs b/sim/testsuite/sim/sh64/media/fcmpeqs.cgs
deleted file mode 100644
index 216894d7d20..00000000000
--- a/sim/testsuite/sim/sh64/media/fcmpeqs.cgs
+++ /dev/null
@@ -1,36 +0,0 @@
-# sh testcase for fcmpeq.s $frg, $frh, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
-
-fcmpeq1:
- movi 1, r0
- fmov.ls r0, fr0
- fmov.ls r0, fr1
- float.ls fr0, fr2
- float.ls fr1, fr3
- fcmpeq.s fr2, fr3, r7
- bnei r7, 1, tr0
-
-fcmpeq2:
- movi 1, r0
- fmov.ls r0, fr0
- movi 2, r1
- fmov.ls r1, fr1
- float.ls fr0, fr2
- float.ls fr1, fr3
- fcmpeq.s fr2, fr3, r7
- bnei r7, 0, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/fcmpged.cgs b/sim/testsuite/sim/sh64/media/fcmpged.cgs
deleted file mode 100644
index 52496cc6b14..00000000000
--- a/sim/testsuite/sim/sh64/media/fcmpged.cgs
+++ /dev/null
@@ -1,46 +0,0 @@
-# sh testcase for fcmpge.d $drg, $drh, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
-
-fcmpge1: # 2 = 2.
- movi 2, r0
- fmov.ls r0, fr0
- fmov.ls r0, fr1
- float.ld fr0, dr2
- float.ld fr1, dr4
- fcmpge.d dr2, dr4, r7
- bnei r7, 1, tr0
-
-fcmpge2: # 4 > 2.
- movi 4, r0
- fmov.ls r0, fr0
- movi 2, r0
- fmov.ls r0, fr1
- float.ld fr0, dr2
- float.ld fr1, dr4
- fcmpge.d dr2, dr4, r7
- bnei r7, 1, tr0
-
-fcmpge3: # 2 < 4.
- movi 2, r0
- fmov.ls r0, fr0
- movi 4, r0
- fmov.ls r0, fr1
- float.ld fr0, dr2
- float.ld fr1, dr4
- fcmpge.d dr2, dr4, r7
- bnei r7, 0, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/fcmpges.cgs b/sim/testsuite/sim/sh64/media/fcmpges.cgs
deleted file mode 100644
index 2dd0a35fd27..00000000000
--- a/sim/testsuite/sim/sh64/media/fcmpges.cgs
+++ /dev/null
@@ -1,46 +0,0 @@
-# sh testcase for fcmpge.s $frg, $frh, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
-
-fcmpge1: # 2 = 2.
- movi 2, r0
- fmov.ls r0, fr0
- fmov.ls r0, fr1
- float.ls fr0, fr2
- float.ls fr1, fr3
- fcmpge.s fr2, fr3, r7
- bnei r7, 1, tr0
-
-fcmpge2: # 3 > 2.
- movi 3, r0
- fmov.ls r0, fr0
- movi 2, r0
- fmov.ls r0, fr1
- float.ls fr0, fr2
- float.ls fr1, fr3
- fcmpge.s fr2, fr3, r7
- bnei r7, 1, tr0
-
-fcmpge3: # 2 < 3.
- movi 2, r0
- fmov.ls r0, fr0
- movi 3, r0
- fmov.ls r0, fr1
- float.ls fr0, fr2
- float.ls fr1, fr3
- fcmpge.s fr2, fr3, r7
- bnei r7, 0, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/fcmpgtd.cgs b/sim/testsuite/sim/sh64/media/fcmpgtd.cgs
deleted file mode 100644
index aec952097de..00000000000
--- a/sim/testsuite/sim/sh64/media/fcmpgtd.cgs
+++ /dev/null
@@ -1,36 +0,0 @@
-# sh testcase for fcmpgt.d $drg, $drh, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
-
-fcmpgt1:
- movi 2, r0
- fmov.qd r0, dr0
- movi 1, r1
- fmov.qd r1, dr2
- float.qd dr0, dr4
- float.qd dr2, dr6
- fcmpgt.d dr4, dr6, r7
- bnei r7, 1, tr0
-
-fcmpgt2:
- movi 1, r0
- fmov.qd r0, dr0
- fmov.qd r0, dr2
- float.qd dr0, dr4
- float.qd dr2, dr6
- fcmpgt.d dr4, dr6, r7
- bnei r7, 0, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/fcmpgts.cgs b/sim/testsuite/sim/sh64/media/fcmpgts.cgs
deleted file mode 100644
index 893bbcbf60b..00000000000
--- a/sim/testsuite/sim/sh64/media/fcmpgts.cgs
+++ /dev/null
@@ -1,36 +0,0 @@
-# sh testcase for fcmpgt.s $frg, $frh, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
-
-fcmpgt1:
- movi 2, r0
- fmov.ls r0, fr0
- movi 1, r1
- fmov.ls r1, fr1
- float.ls fr0, fr2
- float.ls fr1, fr3
- fcmpgt.s fr2, fr3, r7
- bnei r7, 1, tr0
-
-fcmpgt2:
- movi 1, r0
- fmov.ls r0, fr0
- fmov.ls r0, fr1
- float.ls fr0, fr2
- float.ls fr1, fr3
- fcmpgt.s fr2, fr3, r7
- bnei r7, 0, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/fcmpund.cgs b/sim/testsuite/sim/sh64/media/fcmpund.cgs
deleted file mode 100644
index b87fb8d9fb6..00000000000
--- a/sim/testsuite/sim/sh64/media/fcmpund.cgs
+++ /dev/null
@@ -1,26 +0,0 @@
-# sh testcase for fcmpun.d $drg, $drh, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- pta wrong, tr0
-
-fcmpund:
- movi 0, r0
- movi 1, r1
- fmov.qd r0, dr0
- float.qd dr0, dr0
- fmov.qd r1, dr2
- float.qd dr2, dr2
- fcmpun.d dr0, dr2, r7
- bnei r7, 0, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/fcmpuns.cgs b/sim/testsuite/sim/sh64/media/fcmpuns.cgs
deleted file mode 100644
index 6c2ed96b4a3..00000000000
--- a/sim/testsuite/sim/sh64/media/fcmpuns.cgs
+++ /dev/null
@@ -1,26 +0,0 @@
-# sh testcase for fcmpun.s $frg, $frh, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- pta wrong, tr0
-
-fcmpuns:
- movi 0, r0
- movi 1, r1
- fmov.ls r0, fr0
- float.ls fr0, fr0
- fmov.ls r1, fr1
- float.ls fr1, fr1
- fcmpun.s fr0, fr1, r7
- bnei r7, 0, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/fcnvds.cgs b/sim/testsuite/sim/sh64/media/fcnvds.cgs
deleted file mode 100644
index aa6c993fb85..00000000000
--- a/sim/testsuite/sim/sh64/media/fcnvds.cgs
+++ /dev/null
@@ -1,27 +0,0 @@
-# sh testcase for fcnv.ds $drgh, $frf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- pta wrong, tr0
-
-fcnvds:
- movi 9, r0
- fmov.qd r0, dr0
- float.qd dr0, dr0
- fcnv.ds dr0, fr3
- movi 9, r0
- fmov.ls r0, fr4
- float.ls fr4, fr4
- fcmpeq.s fr3, fr4, r7
- bnei r7, 1, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/fcnvsd.cgs b/sim/testsuite/sim/sh64/media/fcnvsd.cgs
deleted file mode 100644
index 6c2396fe815..00000000000
--- a/sim/testsuite/sim/sh64/media/fcnvsd.cgs
+++ /dev/null
@@ -1,27 +0,0 @@
-# sh testcase for fcnv.sd $frgh, $drf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- pta wrong, tr0
-
-fcnvsd:
- movi 9, r0
- fmov.ls r0, fr0
- float.ls fr0, fr0
- fcnv.sd fr0, dr2
- movi 9, r0
- fmov.qd r0, dr4
- float.qd dr4, dr4
- fcmpeq.d dr2, dr4, r7
- bnei r7, 1, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/fdivd.cgs b/sim/testsuite/sim/sh64/media/fdivd.cgs
deleted file mode 100644
index 62401c6b47e..00000000000
--- a/sim/testsuite/sim/sh64/media/fdivd.cgs
+++ /dev/null
@@ -1,39 +0,0 @@
-# sh testcase for fdiv.d $drg, $drh, $drf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- pta wrong, tr0
-
-fdivd1:
- movi 1, r0
- fmov.qd r0, dr0
- float.qd dr0, dr0
- movi 2, r1
- fmov.qd r1, dr2
- float.qd dr2, dr2
- fdiv.d dr0, dr2, dr4
-
-fdvid2:
- movi 6, r0
- fmov.qd r0, dr0
- float.qd dr0, dr0
- movi 2, r1
- fmov.qd r1, dr2
- float.qd dr2, dr2
- fdiv.d dr0, dr2, dr4
- movi 3, r3
- fmov.qd r3, dr6
- float.qd dr6, dr6
- fcmpeq.d dr4, dr6, r7
- bnei r7, 1, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/fdivs.cgs b/sim/testsuite/sim/sh64/media/fdivs.cgs
deleted file mode 100644
index 9b20f686b92..00000000000
--- a/sim/testsuite/sim/sh64/media/fdivs.cgs
+++ /dev/null
@@ -1,39 +0,0 @@
-# sh testcase for fdiv.s $frg, $frh, $frf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- pta wrong, tr0
-
-fdivs1:
- movi 1, r0
- fmov.ls r0, fr0
- float.ls fr0, fr0
- movi 2, r1
- fmov.ls r1, fr1
- float.ls fr1, fr1
- fdiv.s fr0, fr1, fr2
-
-fdvis2:
- movi 6, r0
- fmov.ls r0, fr0
- float.ls fr0, fr0
- movi 2, r1
- fmov.ls r1, fr1
- float.ls fr1, fr1
- fdiv.s fr0, fr1, fr2
- movi 3, r3
- fmov.ls r3, fr3
- float.ls fr3, fr3
- fcmpeq.s fr2, fr3, r7
- bnei r7, 1, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/fgetscr.cgs b/sim/testsuite/sim/sh64/media/fgetscr.cgs
deleted file mode 100644
index 6aa227480ce..00000000000
--- a/sim/testsuite/sim/sh64/media/fgetscr.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for fgetscr $frf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global fgetscr
-fgetscr:
- fgetscr fr0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/fiprs.cgs b/sim/testsuite/sim/sh64/media/fiprs.cgs
deleted file mode 100644
index fef62d11c7c..00000000000
--- a/sim/testsuite/sim/sh64/media/fiprs.cgs
+++ /dev/null
@@ -1,42 +0,0 @@
-# sh testcase for fipr.s $fvg, $fvh, $frf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- .macro _load val, fpreg
- # This macro clobbers r0.
- movi \val, r0
- fmov.ls r0, \fpreg
- float.ls \fpreg, \fpreg
- .endm
-
- start
-
- .global fiprs
-init:
- pta wrong, tr0
-
- _load 1, fr0
- _load 2, fr1
- _load 3, fr2
- _load 4, fr3
- _load 1, fr4
- _load 2, fr5
- _load 3, fr6
- _load 4, fr7
-
-fiprs:
- fipr.s fv0, fv4, fr9
-
-check:
- _load 30, fr10
- fcmpeq.s fr9, fr10, r7
- bnei r7, 1, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/fldd.cgs b/sim/testsuite/sim/sh64/media/fldd.cgs
deleted file mode 100644
index ded2a9fe8f5..00000000000
--- a/sim/testsuite/sim/sh64/media/fldd.cgs
+++ /dev/null
@@ -1,13 +0,0 @@
-# sh testcase for fld.d $rm, $disp10x8, $drf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
- movi 0x2800, r0
- fld.d r0, 0, dr0
- fld.d r0, 8, dr0
- fld.d r0, -8, dr0
- pass
diff --git a/sim/testsuite/sim/sh64/media/fldp.cgs b/sim/testsuite/sim/sh64/media/fldp.cgs
deleted file mode 100644
index 8727110378c..00000000000
--- a/sim/testsuite/sim/sh64/media/fldp.cgs
+++ /dev/null
@@ -1,16 +0,0 @@
-# sh testcase for fld.p $rm, $disp10x8, $fpf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- movi 0x2800, r0
-
-fldp:
- fld.p r0, 0, fp0
- fld.p r0, 8, fp2
- fld.p r0, -8, fp4
- pass
diff --git a/sim/testsuite/sim/sh64/media/flds.cgs b/sim/testsuite/sim/sh64/media/flds.cgs
deleted file mode 100644
index 75d5e961e26..00000000000
--- a/sim/testsuite/sim/sh64/media/flds.cgs
+++ /dev/null
@@ -1,13 +0,0 @@
-# sh testcase for fld.s $rm, $disp10x4, $frf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
- movi 0x2800, r0
- fld.s r0, 0, fr0
- fld.s r0, 4, fr0
- fld.s r0, -4, fr0
- pass
diff --git a/sim/testsuite/sim/sh64/media/fldxd.cgs b/sim/testsuite/sim/sh64/media/fldxd.cgs
deleted file mode 100644
index 63cb56bb06f..00000000000
--- a/sim/testsuite/sim/sh64/media/fldxd.cgs
+++ /dev/null
@@ -1,16 +0,0 @@
-# sh testcase for fldx.d $rm, $rn, $drf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
- movi 0x2800, r0
- movi 0, r1
- fldx.d r0, r1, dr0
- movi 8, r1
- fldx.d r0, r1, dr0
- movi -8, r1
- fldx.d r0, r1, dr0
- pass
diff --git a/sim/testsuite/sim/sh64/media/fldxp.cgs b/sim/testsuite/sim/sh64/media/fldxp.cgs
deleted file mode 100644
index 3d929c6fef8..00000000000
--- a/sim/testsuite/sim/sh64/media/fldxp.cgs
+++ /dev/null
@@ -1,22 +0,0 @@
-# sh testcase for fldx.p $rm, $rn, $fpf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- movi 0x2800, r0
-
-fldxp:
- movi 0, r1
- fldx.p r0, r1, fp0
-
- movi 8, r1
- fldx.p r0, r1, fp2
-
- movi -8, r1
- fldx.p r0, r1, fp4
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/fldxs.cgs b/sim/testsuite/sim/sh64/media/fldxs.cgs
deleted file mode 100644
index 10feb3e54a9..00000000000
--- a/sim/testsuite/sim/sh64/media/fldxs.cgs
+++ /dev/null
@@ -1,16 +0,0 @@
-# sh testcase for fldx.s $rm, $rn, $frf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
- movi 0x2800, r0
- movi 0, r1
- fldx.s r0, r1, fr0
- movi 4, r1
- fldx.s r0, r1, fr0
- movi -4, r1
- fldx.s r0, r1, fr0
- pass
diff --git a/sim/testsuite/sim/sh64/media/floatld.cgs b/sim/testsuite/sim/sh64/media/floatld.cgs
deleted file mode 100644
index 31f6111061b..00000000000
--- a/sim/testsuite/sim/sh64/media/floatld.cgs
+++ /dev/null
@@ -1,12 +0,0 @@
-# sh testcase for float.ld $frgh, $drf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
- movi 1, r0
- fmov.ls r0, fr0
- float.ld fr0, dr0
- pass
diff --git a/sim/testsuite/sim/sh64/media/floatls.cgs b/sim/testsuite/sim/sh64/media/floatls.cgs
deleted file mode 100644
index 4c8fb992798..00000000000
--- a/sim/testsuite/sim/sh64/media/floatls.cgs
+++ /dev/null
@@ -1,12 +0,0 @@
-# sh testcase for float.ls $frgh, $frf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
- movi 1, r0
- fmov.ls r0, fr0
- float.ls fr0, fr0
- pass
diff --git a/sim/testsuite/sim/sh64/media/floatqd.cgs b/sim/testsuite/sim/sh64/media/floatqd.cgs
deleted file mode 100644
index ea5ddd9e49a..00000000000
--- a/sim/testsuite/sim/sh64/media/floatqd.cgs
+++ /dev/null
@@ -1,12 +0,0 @@
-# sh testcase for float.qd $drgh, $drf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
- movi 1, r0
- fmov.qd r0, dr0
- float.qd dr0, dr2
- pass
diff --git a/sim/testsuite/sim/sh64/media/floatqs.cgs b/sim/testsuite/sim/sh64/media/floatqs.cgs
deleted file mode 100644
index fcf35e29548..00000000000
--- a/sim/testsuite/sim/sh64/media/floatqs.cgs
+++ /dev/null
@@ -1,12 +0,0 @@
-# sh testcase for float.qs $drgh, $frf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
- movi 1, r0
- fmov.qd r0, dr0
- float.qs dr0, fr1
- pass
diff --git a/sim/testsuite/sim/sh64/media/fmacs.cgs b/sim/testsuite/sim/sh64/media/fmacs.cgs
deleted file mode 100644
index 62219c5fafd..00000000000
--- a/sim/testsuite/sim/sh64/media/fmacs.cgs
+++ /dev/null
@@ -1,39 +0,0 @@
-# sh testcase for fmac.s $frg, $frh, $frf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
-
-fmacs:
- movi 2, r0
- fmov.ls r0, fr0
- float.ls fr0, fr0
-
- movi 3, r1
- fmov.ls r1, fr1
- float.ls fr1, fr1
-
- movi 4, r2
- fmov.ls r2, fr2
- float.ls fr2, fr2
-
- fmac.s fr0, fr1, fr2
-
- movi 10, r3
- fmov.ls r3, fr3
- float.ls fr3, fr3
-
- fcmpeq.s fr2, fr3, r7
- bnei r7, 1, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/fmovd.cgs b/sim/testsuite/sim/sh64/media/fmovd.cgs
deleted file mode 100644
index 03c05ad1776..00000000000
--- a/sim/testsuite/sim/sh64/media/fmovd.cgs
+++ /dev/null
@@ -1,24 +0,0 @@
-# sh testcase for fmov.d $drgh, $drf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- pta wrong, tr0
-
-fmovd:
- movi 4, r0
- fmov.qd r0, dr0
- float.qd dr0, dr2
- fmov.d dr2, dr4
- fcmpeq.d dr2, dr4, r7
- bnei r7, 1, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/fmovdq.cgs b/sim/testsuite/sim/sh64/media/fmovdq.cgs
deleted file mode 100644
index ff5c3fe9302..00000000000
--- a/sim/testsuite/sim/sh64/media/fmovdq.cgs
+++ /dev/null
@@ -1,23 +0,0 @@
-# sh testcase for fmov.dq $drgh, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
-
-fmovdq:
- movi 4, r0
- fmov.qd r0, dr0
- fmov.dq dr0, r1
- bne r0, r1, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/fmovls.cgs b/sim/testsuite/sim/sh64/media/fmovls.cgs
deleted file mode 100644
index 850ec33d160..00000000000
--- a/sim/testsuite/sim/sh64/media/fmovls.cgs
+++ /dev/null
@@ -1,26 +0,0 @@
-# sh testcase for fmov.ls $rm, $frf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-fmovls0:
- movi 0, r0
- fmov.ls r0, fr0
-
-fmovls1:
- movi 1, r1
- fmov.ls r1, fr1
-
-upper:
- movi 1, r2
- shlli r2, 63, r2
- ori r2, 3, r2
- # Bit 63 should be ignored.
- fmov.ls r2, fr2
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/media/fmovqd.cgs b/sim/testsuite/sim/sh64/media/fmovqd.cgs
deleted file mode 100644
index 64eac72b3df..00000000000
--- a/sim/testsuite/sim/sh64/media/fmovqd.cgs
+++ /dev/null
@@ -1,22 +0,0 @@
-# sh testcase for fmov.qd $rm, $drf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- pta wrong, tr0
-
-fmovdq:
- movi 4, r0
- fmov.qd r0, dr0
- fmov.dq dr0, r1
- bne r0, r1, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/fmovs.cgs b/sim/testsuite/sim/sh64/media/fmovs.cgs
deleted file mode 100644
index f126aa5a41c..00000000000
--- a/sim/testsuite/sim/sh64/media/fmovs.cgs
+++ /dev/null
@@ -1,24 +0,0 @@
-# sh testcase for fmov.s $frgh, $frf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- pta wrong, tr0
-
-fmovs:
- movi 8, r0
- fmov.ls r0, fr7
- float.ls fr7, fr0
- fmov.s fr0, fr1
- fcmpeq.s fr0, fr1, r7
- bnei r7, 1, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/fmovsl.cgs b/sim/testsuite/sim/sh64/media/fmovsl.cgs
deleted file mode 100644
index 7dfdab1d145..00000000000
--- a/sim/testsuite/sim/sh64/media/fmovsl.cgs
+++ /dev/null
@@ -1,21 +0,0 @@
-# sh testcase for fmov.sl $frgh, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-fmovsl:
- pta wrong, tr0
- movi 9, r0
- fmov.ls r0, fr0
- fmov.sl fr0, r1
- bne r0, r1, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/fmuld.cgs b/sim/testsuite/sim/sh64/media/fmuld.cgs
deleted file mode 100644
index 2ad67cdc532..00000000000
--- a/sim/testsuite/sim/sh64/media/fmuld.cgs
+++ /dev/null
@@ -1,30 +0,0 @@
-# sh testcase for fmul.d $drg, $drh, $drf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- pta wrong, tr0
-
-fmuld1:
- movi 2, r0
- fmov.qd r0, dr0
- float.qd dr0, dr0
- movi 3, r1
- fmov.qd r1, dr2
- float.qd dr2, dr2
- fmul.d dr0, dr2, dr4
- movi 6, r2
- fmov.qd r2, dr6
- float.qd dr6, dr6
- fcmpeq.d dr4, dr6, r7
- bnei r7, 1, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/fmuls.cgs b/sim/testsuite/sim/sh64/media/fmuls.cgs
deleted file mode 100644
index 4b8875f0c59..00000000000
--- a/sim/testsuite/sim/sh64/media/fmuls.cgs
+++ /dev/null
@@ -1,31 +0,0 @@
-# sh testcase for fmul.s $frg, $frh, $frf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
-
-fmuls1:
- movi 2, r0
- fmov.ls r0, fr0
- float.ls fr0, fr0
- movi 3, r1
- fmov.ls r1, fr1
- float.ls fr1, fr1
- fmul.s fr0, fr1, fr2
- movi 6, r2
- fmov.ls r2, fr3
- float.ls fr3, fr3
- fcmpeq.s fr2, fr3, r7
- bnei r7, 1, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/fnegd.cgs b/sim/testsuite/sim/sh64/media/fnegd.cgs
deleted file mode 100644
index 67b381345b6..00000000000
--- a/sim/testsuite/sim/sh64/media/fnegd.cgs
+++ /dev/null
@@ -1,35 +0,0 @@
-# sh testcase for fneg.d $drgh, $drf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- pta wrong, tr0
- movi 0, r0
- movi 1, r1
-
-fnegd0:
- # Ensure fnegd(0) = 0.
- fmov.ls r0, fr7
- float.ld fr7, dr0
- fneg.d dr0, dr2
- fcmpeq.d dr0, dr2, r7
- bnei r7, 1, tr0
-
-fnegd1:
- # Ensure fnegd(fnegd(1)) = 1.
- fmov.ls r1, fr7
- float.ld fr7, dr0
- fneg.d dr0, dr2
- fneg.d dr2, dr4
- fcmpeq.d dr0, dr4, r7
- bnei r7, 1, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/fnegs.cgs b/sim/testsuite/sim/sh64/media/fnegs.cgs
deleted file mode 100644
index 9ad625a1f1f..00000000000
--- a/sim/testsuite/sim/sh64/media/fnegs.cgs
+++ /dev/null
@@ -1,35 +0,0 @@
-# sh testcase for fneg.s $frgh, $frf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- pta wrong, tr0
- movi 0, r0
- movi 1, r1
-
-fnegs0:
- # Ensure fnegs(0) = 0.
- fmov.ls r0, fr7
- float.ls fr7, fr0
- fneg.s fr0, fr1
- fcmpeq.s fr0, fr1, r7
- bnei r7, 1, tr0
-
-fnegs1:
- # Ensure fnegs(fnegs(1)) = 1.
- fmov.ls r1, fr7
- float.ls fr7, fr0
- fneg.s fr0, fr1
- fneg.s fr1, fr2
- fcmpeq.s fr0, fr2, r7
- bnei r7, 1, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/fputscr.cgs b/sim/testsuite/sim/sh64/media/fputscr.cgs
deleted file mode 100644
index 28d2e7230ee..00000000000
--- a/sim/testsuite/sim/sh64/media/fputscr.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for fputscr $frgh -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global fputscr
-fputscr:
- fputscr fr0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/fsqrtd.cgs b/sim/testsuite/sim/sh64/media/fsqrtd.cgs
deleted file mode 100644
index ae6120002e0..00000000000
--- a/sim/testsuite/sim/sh64/media/fsqrtd.cgs
+++ /dev/null
@@ -1,27 +0,0 @@
-# sh testcase for fsqrt.d $frgh, $frf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- pta wrong, tr0
- movi 9, r0
- fmov.ls r0, fr7
- float.ld fr7, dr0
- movi 3, r1
- fmov.ls r1, fr7
- float.ld fr7, dr2
-
-fsqrtd:
- fsqrt.d dr0, dr4
- fcmpeq.d dr2, dr4, r7
- bnei r7, 1, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/fsqrts.cgs b/sim/testsuite/sim/sh64/media/fsqrts.cgs
deleted file mode 100644
index f1183933159..00000000000
--- a/sim/testsuite/sim/sh64/media/fsqrts.cgs
+++ /dev/null
@@ -1,27 +0,0 @@
-# sh testcase for fsqrt.s $frgh, $frf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- pta wrong, tr0
- movi 9, r0
- fmov.ls r0, fr7
- float.ls fr7, fr0
- movi 3, r1
- fmov.ls r1, fr7
- float.ls fr7, fr2
-
-fsqrts:
- fsqrt.s fr0, fr1
- fcmpeq.s fr1, fr2, r7
- bnei r7, 1, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/fstd.cgs b/sim/testsuite/sim/sh64/media/fstd.cgs
deleted file mode 100644
index 16ab5b6672c..00000000000
--- a/sim/testsuite/sim/sh64/media/fstd.cgs
+++ /dev/null
@@ -1,34 +0,0 @@
-# sh testcase for fst.d $rm, $disp10x8, $drf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global fstd
-fstd:
- movi 0x1020, r0
- shlli r0, 8, r0
- ori r0, 0x30, r0
- shlli r0, 8, r0
- ori r0, 0x40, r0
- shlli r0, 8, r0
- ori r0, 0x50, r0
- shlli r0, 8, r0
- ori r0, 0x60, r0
- shlli r0, 8, r0
- ori r0, 0x70, r0
- shlli r0, 8, r0
- ori r0, 0x80, r0
- # Set target address.
- movi 0x2800, r1
- fmov.qd r0, dr0
-
- fst.d r1, 0, dr0
- fst.d r1, 8, dr0
- fst.d r1, -8, dr0
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/media/fstp.cgs b/sim/testsuite/sim/sh64/media/fstp.cgs
deleted file mode 100644
index e0c396ac59a..00000000000
--- a/sim/testsuite/sim/sh64/media/fstp.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for fst.p $rm, $disp10x8, $fpf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global fstp
-fstp:
- fst.p r0, 0, fp0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/fsts.cgs b/sim/testsuite/sim/sh64/media/fsts.cgs
deleted file mode 100644
index fb692cf274c..00000000000
--- a/sim/testsuite/sim/sh64/media/fsts.cgs
+++ /dev/null
@@ -1,34 +0,0 @@
-# sh testcase for fst.s $rm, $disp10x4, $frf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global fsts
-fsts:
- movi 0x1020, r0
- shlli r0, 8, r0
- ori r0, 0x30, r0
- shlli r0, 8, r0
- ori r0, 0x40, r0
- shlli r0, 8, r0
- ori r0, 0x50, r0
- shlli r0, 8, r0
- ori r0, 0x60, r0
- shlli r0, 8, r0
- ori r0, 0x70, r0
- shlli r0, 8, r0
- ori r0, 0x80, r0
- # Set target address.
- movi 0x2800, r1
- fmov.ls r0, fr0
-
- fst.s r1, 0, fr0
- fst.s r1, 4, fr0
- fst.s r1, -4, fr0
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/media/fstxd.cgs b/sim/testsuite/sim/sh64/media/fstxd.cgs
deleted file mode 100644
index 10f6c1436b5..00000000000
--- a/sim/testsuite/sim/sh64/media/fstxd.cgs
+++ /dev/null
@@ -1,31 +0,0 @@
-# sh testcase for fstx.d $rm, $rn, $drf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global fstxd
-fstxd:
- movi 0x1020, r0
- shlli r0, 8, r0
- ori r0, 0x30, r0
- shlli r0, 8, r0
- ori r0, 0x40, r0
- shlli r0, 8, r0
- ori r0, 0x50, r0
- shlli r0, 8, r0
- ori r0, 0x60, r0
- shlli r0, 8, r0
- ori r0, 0x70, r0
- shlli r0, 8, r0
- ori r0, 0x80, r0
- fmov.qd r0, dr0
- movi 0x2800, r1
- movi -8, r2
- fstx.d r1, r2, dr0
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/media/fstxp.cgs b/sim/testsuite/sim/sh64/media/fstxp.cgs
deleted file mode 100644
index 1829f58eb25..00000000000
--- a/sim/testsuite/sim/sh64/media/fstxp.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for fstx.p $rm, $rn, $fpf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global fstxp
-fstxp:
- fstx.p r0, r0, fp0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/fstxs.cgs b/sim/testsuite/sim/sh64/media/fstxs.cgs
deleted file mode 100644
index 0b4ff96dba9..00000000000
--- a/sim/testsuite/sim/sh64/media/fstxs.cgs
+++ /dev/null
@@ -1,30 +0,0 @@
-# sh testcase for fstx.s $rm, $rn, $frf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
- .global fstxs
-fstxs:
- movi 0x1020, r0
- shlli r0, 8, r0
- ori r0, 0x30, r0
- shlli r0, 8, r0
- ori r0, 0x40, r0
- shlli r0, 8, r0
- ori r0, 0x50, r0
- shlli r0, 8, r0
- ori r0, 0x60, r0
- shlli r0, 8, r0
- ori r0, 0x70, r0
- shlli r0, 8, r0
- ori r0, 0x80, r0
- fmov.ls r0, fr0
- movi 0x2800, r1
- movi -8, r2
- fstx.s r1, r2, fr0
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/media/fsubd.cgs b/sim/testsuite/sim/sh64/media/fsubd.cgs
deleted file mode 100644
index 93dc421b01f..00000000000
--- a/sim/testsuite/sim/sh64/media/fsubd.cgs
+++ /dev/null
@@ -1,36 +0,0 @@
-# sh testcase for fsub.d $drg, $drh, $drf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global fsubd
-init:
- pta wrong, tr0
-
-fsubd:
- movi 9, r0
- fmov.qd r0, dr0
- float.qd dr0, dr0
-
- movi 3, r0
- fmov.qd r0, dr2
- float.qd dr2, dr2
-
- fsub.d dr0, dr2, dr4
-
- movi 6, r0
- fmov.qd r0, dr6
- float.qd dr6, dr6
-
- fcmpeq.d dr4, dr6, r7
- bnei r7, 1, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/fsubs.cgs b/sim/testsuite/sim/sh64/media/fsubs.cgs
deleted file mode 100644
index b009f094054..00000000000
--- a/sim/testsuite/sim/sh64/media/fsubs.cgs
+++ /dev/null
@@ -1,36 +0,0 @@
-# sh testcase for fsub.s $frg, $frh, $frf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global fsubs
-init:
- pta wrong, tr0
-
-fsubs:
- movi 9, r0
- fmov.ls r0, fr0
- float.ls fr0, fr0
-
- movi 3, r0
- fmov.ls r0, fr1
- float.ls fr1, fr1
-
- fsub.s fr0, fr1, fr2
-
- movi 6, r0
- fmov.ls r0, fr3
- float.ls fr3, fr3
-
- fcmpeq.s fr2, fr3, r7
- bnei r7, 1, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/ftrcdl.cgs b/sim/testsuite/sim/sh64/media/ftrcdl.cgs
deleted file mode 100644
index 3aafb83dca3..00000000000
--- a/sim/testsuite/sim/sh64/media/ftrcdl.cgs
+++ /dev/null
@@ -1,26 +0,0 @@
-# sh testcase for ftrc.dl $drgh, $frf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global ftrcdl
-init:
- pta wrong, tr0
-
-ftrcdl:
- movi -9, r0
- fmov.qd r0, dr0
- float.qd dr0, dr0
- ftrc.dl dr0, fr0
- fmov.sl fr0, r1
- bne r0, r1, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/ftrcdq.cgs b/sim/testsuite/sim/sh64/media/ftrcdq.cgs
deleted file mode 100644
index 6cd63fb029e..00000000000
--- a/sim/testsuite/sim/sh64/media/ftrcdq.cgs
+++ /dev/null
@@ -1,24 +0,0 @@
-# sh testcase for ftrc.dq $drgh, $drf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- pta wrong, tr0
-
-ftrcdq:
- movi -9, r0
- fmov.qd r0, dr0
- float.qd dr0, dr0
- ftrc.dq dr0, dr2
- fmov.dq dr2, r1
- bne r0, r1, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/ftrcsl.cgs b/sim/testsuite/sim/sh64/media/ftrcsl.cgs
deleted file mode 100644
index 9fd7faebd1a..00000000000
--- a/sim/testsuite/sim/sh64/media/ftrcsl.cgs
+++ /dev/null
@@ -1,26 +0,0 @@
-# sh testcase for ftrc.sl $frgh, $frf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global ftrcsl
-init:
- pta wrong, tr0
-
-ftrcsl:
- movi -9, r0
- fmov.ls r0, fr0
- float.ls fr0, fr0
- ftrc.sl fr0, fr1
- fmov.sl fr1, r1
- bne r0, r1, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/ftrcsq.cgs b/sim/testsuite/sim/sh64/media/ftrcsq.cgs
deleted file mode 100644
index 8f19d595e10..00000000000
--- a/sim/testsuite/sim/sh64/media/ftrcsq.cgs
+++ /dev/null
@@ -1,25 +0,0 @@
-# sh testcase for ftrc.sq $frgh, $drf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
-
-ftrcsq:
- movi -9, r0
- fmov.ls r0, fr0
- float.ls fr0, fr0
- ftrc.sq fr0, dr2
- fmov.dq dr2, r1
- bne r0, r1, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/ftrvs.cgs b/sim/testsuite/sim/sh64/media/ftrvs.cgs
deleted file mode 100644
index be7a75ad885..00000000000
--- a/sim/testsuite/sim/sh64/media/ftrvs.cgs
+++ /dev/null
@@ -1,67 +0,0 @@
-# sh testcase for ftrv.s $mtrxg, $fvh, $fvf -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- .macro _load val, fpreg
- # This macro clobbers r0.
- movi \val, r0
- fmov.ls r0, \fpreg
- float.ls \fpreg, \fpreg
- .endm
-
- start
-
-init:
- pta wrong, tr0
-
- _load 1, fr0
- _load 2, fr4
- _load 3, fr8
- _load 4, fr12
- _load 5, fr1
- _load 6, fr5
- _load 7, fr9
- _load 8, fr13
- _load 9, fr2
- _load 10, fr6
- _load 11, fr10
- _load 12, fr14
- _load 13, fr3
- _load 14, fr7
- _load 15, fr11
- _load 16, fr15
-
- _load 1, fr16
- _load 2, fr17
- _load 3, fr18
- _load 4, fr19
-
-ftrvs:
- ftrv.s mtrx0, fv16, fv20
-
-check:
- _load 30, fr0
- _load 70, fr1
- _load 110, fr2
- _load 150, fr3
-
- fcmpeq.s fr0, fr20, r0
- bnei r0, 1, tr0
-
- fcmpeq.s fr1, fr21, r0
- bnei r0, 1, tr0
-
- fcmpeq.s fr2, fr22, r0
- bnei r0, 1, tr0
-
- fcmpeq.s fr3, fr23, r0
- bnei r0, 1, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/getcfg.cgs b/sim/testsuite/sim/sh64/media/getcfg.cgs
deleted file mode 100644
index d151739846e..00000000000
--- a/sim/testsuite/sim/sh64/media/getcfg.cgs
+++ /dev/null
@@ -1,10 +0,0 @@
-# sh testcase for getcfg $rm, $disp6, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
- getcfg r0, 0, r0
- pass
diff --git a/sim/testsuite/sim/sh64/media/getcon.cgs b/sim/testsuite/sim/sh64/media/getcon.cgs
deleted file mode 100644
index 8eeb43cd5b0..00000000000
--- a/sim/testsuite/sim/sh64/media/getcon.cgs
+++ /dev/null
@@ -1,29 +0,0 @@
-# sh testcase for getcon $crk, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- pta wrong, tr0
-
-getcon1:
- movi 22, r0
- putcon r0, cr0
- getcon cr0, r1
- bne r0, r1, tr0
-
-getcon2:
- movi 12, r0
- shlli r0, 35, r0
- putcon r0, cr20
- getcon cr20, r20
- bne r0, r20, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/gettr.cgs b/sim/testsuite/sim/sh64/media/gettr.cgs
deleted file mode 100644
index 8840a361bb0..00000000000
--- a/sim/testsuite/sim/sh64/media/gettr.cgs
+++ /dev/null
@@ -1,48 +0,0 @@
-# sh testcase for gettr $trb, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- # tr0 is reserved.
- # don't use it anywhere else in this test.
- pta wrong, tr0
-
-gettr1:
- # Put garbage in r1, r2.
- movi 20, r1
- movi 30, r2
-
- pta foo, tr1
- pta foo, tr2
-
-check1:
- gettr tr1, r1
- gettr tr2, r2
- bne r1, r2, tr0
-
-gettr2:
- # Put garbage in r3, r4.
- movi 21, r3
- movi 42, r4
-
-check2:
- pta foo, tr1
- gettr tr1, r2
- ptabs r2, tr2
- gettr tr2, r3
- ptabs r3, tr3
- gettr tr3, r4
- bne r2, r4, tr0
-
-okay:
- pass
-
-wrong:
- fail
-
-foo:
- nop
diff --git a/sim/testsuite/sim/sh64/media/icbi.cgs b/sim/testsuite/sim/sh64/media/icbi.cgs
deleted file mode 100644
index 9ba18452ef6..00000000000
--- a/sim/testsuite/sim/sh64/media/icbi.cgs
+++ /dev/null
@@ -1,10 +0,0 @@
-# sh testcase for icbi $rm, $disp6x32 -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
- icbi r0, 0
- pass
diff --git a/sim/testsuite/sim/sh64/media/ldb.cgs b/sim/testsuite/sim/sh64/media/ldb.cgs
deleted file mode 100644
index fad1e6e15ee..00000000000
--- a/sim/testsuite/sim/sh64/media/ldb.cgs
+++ /dev/null
@@ -1,21 +0,0 @@
-# sh testcase for ld.b $rm, $disp10, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- movi 20, r3
- shlli r3, 8, r3
-
-ldb1:
- ld.b r3, 0, r0
-ldb2:
- ld.b r3, -1, r0
-ldb3:
- ld.b r3, 1, r0
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/media/ldhil.cgs b/sim/testsuite/sim/sh64/media/ldhil.cgs
deleted file mode 100644
index 4323985ea49..00000000000
--- a/sim/testsuite/sim/sh64/media/ldhil.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for ldhi.l $rm, $disp6, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global ldhil
-ldhil:
- ldhi.l r0, 0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/ldhiq.cgs b/sim/testsuite/sim/sh64/media/ldhiq.cgs
deleted file mode 100644
index c34a952bba7..00000000000
--- a/sim/testsuite/sim/sh64/media/ldhiq.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for ldhi.q $rm, $disp6, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global ldhiq
-ldhiq:
- ldhi.q r0, 0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/ldl.cgs b/sim/testsuite/sim/sh64/media/ldl.cgs
deleted file mode 100644
index b8b8725dee1..00000000000
--- a/sim/testsuite/sim/sh64/media/ldl.cgs
+++ /dev/null
@@ -1,21 +0,0 @@
-# sh testcase for ld.l $rm, $disp10x4, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- movi 20, r3
- shlli r3, 8, r3
-
-ldl1:
- ld.l r3, 0, r0
-ldl2:
- ld.l r3, -4, r0
-ldl3:
- ld.l r3, 4, r0
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/media/ldlol.cgs b/sim/testsuite/sim/sh64/media/ldlol.cgs
deleted file mode 100644
index 8204f40ebf4..00000000000
--- a/sim/testsuite/sim/sh64/media/ldlol.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for ldlo.l $rm, $disp6, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global ldlol
-ldlol:
- ldlo.l r0, 0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/ldloq.cgs b/sim/testsuite/sim/sh64/media/ldloq.cgs
deleted file mode 100644
index 0cf128e2013..00000000000
--- a/sim/testsuite/sim/sh64/media/ldloq.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for ldlo.q $rm, $disp6, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global ldloq
-ldloq:
- ldlo.q r0, 0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/ldq.cgs b/sim/testsuite/sim/sh64/media/ldq.cgs
deleted file mode 100644
index cacc076bb90..00000000000
--- a/sim/testsuite/sim/sh64/media/ldq.cgs
+++ /dev/null
@@ -1,21 +0,0 @@
-# sh testcase for ld.q $rm, $disp10x8, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- movi 20, r3
- shlli r3, 8, r3
-
-ldl1:
- ld.q r3, 0, r0
-ldl2:
- ld.q r3, -8, r0
-ldl3:
- ld.q r3, 8, r0
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/media/ldub.cgs b/sim/testsuite/sim/sh64/media/ldub.cgs
deleted file mode 100644
index 825ce642e31..00000000000
--- a/sim/testsuite/sim/sh64/media/ldub.cgs
+++ /dev/null
@@ -1,22 +0,0 @@
-# sh testcase for ld.ub $rm, $disp10, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- movi 20, r3
- shlli r3, 8, r3
-
-ldub1:
- ld.ub r3, 0, r0
-ldub2:
- ld.ub r3, -1, r0
-ldub3:
- ld.ub r3, 1, r0
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/media/lduw.cgs b/sim/testsuite/sim/sh64/media/lduw.cgs
deleted file mode 100644
index a329802e22b..00000000000
--- a/sim/testsuite/sim/sh64/media/lduw.cgs
+++ /dev/null
@@ -1,22 +0,0 @@
-# sh testcase for ld.uw $rm, $disp10, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- movi 20, r3
- shlli r3, 8, r3
-
-lduw1:
- ld.uw r3, 0, r0
-lduw2:
- ld.uw r3, -2, r0
-lduw3:
- ld.uw r3, 2, r0
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/media/ldw.cgs b/sim/testsuite/sim/sh64/media/ldw.cgs
deleted file mode 100644
index d39405515a9..00000000000
--- a/sim/testsuite/sim/sh64/media/ldw.cgs
+++ /dev/null
@@ -1,21 +0,0 @@
-# sh testcase for ld.w $rm, $disp10, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- movi 20, r3
- shlli r3, 8, r3
-
-ldw1:
- ld.w r3, 0, r0
-ldw2:
- ld.w r3, -2, r0
-ldw3:
- ld.w r3, 2, r0
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/media/ldxb.cgs b/sim/testsuite/sim/sh64/media/ldxb.cgs
deleted file mode 100644
index 36038df8da4..00000000000
--- a/sim/testsuite/sim/sh64/media/ldxb.cgs
+++ /dev/null
@@ -1,28 +0,0 @@
-# sh testcase for ldx.b $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-ldxb1:
- movi 20, r3
- shlli r3, 8, r3
- movi 0, r4
- ldx.b r3, r4, r0
-
-ldxb2:
- movi 20, r3
- shlli r3, 8, r3
- movi 1, r4
- ldx.b r3, r4, r0
-
-ldxb3:
- movi 20, r3
- shlli r3, 8, r3
- movi -1, r4
- ldx.b r3, r4, r0
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/media/ldxl.cgs b/sim/testsuite/sim/sh64/media/ldxl.cgs
deleted file mode 100644
index 0596e9f325b..00000000000
--- a/sim/testsuite/sim/sh64/media/ldxl.cgs
+++ /dev/null
@@ -1,28 +0,0 @@
-# sh testcase for ldx.l $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-ldxl1:
- movi 20, r3
- shlli r3, 8, r3
- movi 0, r4
- ldx.l r3, r4, r0
-
-ldxl2:
- movi 20, r3
- shlli r3, 8, r3
- movi 4, r4
- ldx.l r3, r4, r0
-
-ldxl3:
- movi 20, r3
- shlli r3, 8, r3
- movi -4, r4
- ldx.l r3, r4, r0
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/media/ldxq.cgs b/sim/testsuite/sim/sh64/media/ldxq.cgs
deleted file mode 100644
index 1247f220562..00000000000
--- a/sim/testsuite/sim/sh64/media/ldxq.cgs
+++ /dev/null
@@ -1,28 +0,0 @@
-# sh testcase for ldx.q $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-ldxq1:
- movi 20, r3
- shlli r3, 8, r3
- movi 0, r4
- ldx.q r3, r4, r0
-
-ldxq2:
- movi 20, r3
- shlli r3, 8, r3
- movi 8, r4
- ldx.q r3, r4, r0
-
-ldxq3:
- movi 20, r3
- shlli r3, 8, r3
- movi -8, r4
- ldx.q r3, r4, r0
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/media/ldxub.cgs b/sim/testsuite/sim/sh64/media/ldxub.cgs
deleted file mode 100644
index e863a3bfccf..00000000000
--- a/sim/testsuite/sim/sh64/media/ldxub.cgs
+++ /dev/null
@@ -1,28 +0,0 @@
-# sh testcase for ldx.ub $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-ldxub1:
- movi 20, r3
- shlli r3, 8, r3
- movi 0, r4
- ldx.ub r3, r4, r0
-
-ldxub2:
- movi 20, r3
- shlli r3, 8, r3
- movi 1, r4
- ldx.ub r3, r4, r0
-
-ldxub3:
- movi 20, r3
- shlli r3, 8, r3
- movi -1, r4
- ldx.ub r3, r4, r0
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/media/ldxuw.cgs b/sim/testsuite/sim/sh64/media/ldxuw.cgs
deleted file mode 100644
index 282812db895..00000000000
--- a/sim/testsuite/sim/sh64/media/ldxuw.cgs
+++ /dev/null
@@ -1,29 +0,0 @@
-# sh testcase for ldx.uw $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-ldxuw1:
- movi 20, r3
- shlli r3, 8, r3
- movi 0, r4
- ldx.uw r3, r4, r0
-
-ldxuw2:
- movi 20, r3
- shlli r3, 8, r3
- movi 2, r4
- ldx.uw r3, r4, r0
-
-ldxuw3:
- movi 20, r3
- shlli r3, 8, r3
- movi -2, r4
- ldx.uw r3, r4, r0
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/media/ldxw.cgs b/sim/testsuite/sim/sh64/media/ldxw.cgs
deleted file mode 100644
index d377fef6177..00000000000
--- a/sim/testsuite/sim/sh64/media/ldxw.cgs
+++ /dev/null
@@ -1,29 +0,0 @@
-# sh testcase for ldx.w $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-ldxw1:
- movi 20, r3
- shlli r3, 8, r3
- movi 0, r4
- ldx.w r3, r4, r0
-
-ldxw2:
- movi 20, r3
- shlli r3, 8, r3
- movi 2, r4
- ldx.w r3, r4, r0
-
-ldxw3:
- movi 20, r3
- shlli r3, 8, r3
- movi -2, r4
- ldx.w r3, r4, r0
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/media/mabsl.cgs b/sim/testsuite/sim/sh64/media/mabsl.cgs
deleted file mode 100644
index a8af663ea12..00000000000
--- a/sim/testsuite/sim/sh64/media/mabsl.cgs
+++ /dev/null
@@ -1,39 +0,0 @@
-# sh testcase for mabs.l $rm, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mabsl
-init:
- pta wrong, tr0
-
-mabsl1:
- # Pack { 1 3 } into R0.
- _packl 1, 3, r0
-
- mabs.l r0, r1
-
- # Test for { 1 3 } in R0.
- _packl 1, 3, r2
- bne r0, r2, tr0
-
-mabsl2:
- # Pack { -1, -1 } into R0.
- _packl 1, 1, r0
-
- # Set the left sign bit.
- movi 1, r1
- shlli r1, 63, r1
- or r0, r1, r0
-
- mabs.l r0, r2
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/mabsw.cgs b/sim/testsuite/sim/sh64/media/mabsw.cgs
deleted file mode 100644
index f4e980a19c6..00000000000
--- a/sim/testsuite/sim/sh64/media/mabsw.cgs
+++ /dev/null
@@ -1,38 +0,0 @@
-# sh testcase for mabs.w $rm, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
-
-mabsw1:
- # Pack { 1 3 5 7 } into R0.
- _packw 1, 3, 5, 7, r0
-
- mabs.l r0, r1
-
- # Test for { 1 3 5 7 } in R0.
- _packw 1, 3, 5, 7, r2
- bne r0, r2, tr0
-
-mabsw2:
- # Pack { -1, -1, -1, -1 } into R0.
- _packw 1, 1, 1, 1, r0
-
- # Set the left sign bit
- movi 1, r1
- shlli r1, 63, r1
- or r0, r1, r0
-
- mabs.w r0, r2
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/maddl.cgs b/sim/testsuite/sim/sh64/media/maddl.cgs
deleted file mode 100644
index 4bdf5463866..00000000000
--- a/sim/testsuite/sim/sh64/media/maddl.cgs
+++ /dev/null
@@ -1,29 +0,0 @@
-# sh testcase for madd.l $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
-
-maddl:
- # Load { 1 2 } into r0.
- _packl 1, 2, r0
- # Load { 3 4 } into r1.
- _packl 3, 4, r1
-
- # Add slices to produce { 4 6 }.
- madd.l r0, r1, r2
-
- _packl 4, 6, r3
- bne r2, r3, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/maddsl.cgs b/sim/testsuite/sim/sh64/media/maddsl.cgs
deleted file mode 100644
index 3977275dc89..00000000000
--- a/sim/testsuite/sim/sh64/media/maddsl.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for madds.l $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global maddsl
-maddsl:
- madds.l r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/maddsub.cgs b/sim/testsuite/sim/sh64/media/maddsub.cgs
deleted file mode 100644
index a55f927a3e1..00000000000
--- a/sim/testsuite/sim/sh64/media/maddsub.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for madds.ub $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global maddsub
-maddsub:
- madds.ub r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/maddsw.cgs b/sim/testsuite/sim/sh64/media/maddsw.cgs
deleted file mode 100644
index 45a774ed2fc..00000000000
--- a/sim/testsuite/sim/sh64/media/maddsw.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for madds.w $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global maddsw
-maddsw:
- madds.w r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/maddw.cgs b/sim/testsuite/sim/sh64/media/maddw.cgs
deleted file mode 100644
index b220ef4aee6..00000000000
--- a/sim/testsuite/sim/sh64/media/maddw.cgs
+++ /dev/null
@@ -1,29 +0,0 @@
-# sh testcase for madd.w $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- pta wrong, tr0
-
-maddw:
- # Load { 1 2 3 4 } into R0.
- _packw 1, 2, 3, 4, r0
-
- # Load { 3 4 5 6 } into R1.
- _packw 3, 4, 5, 6, r1
-
- # Add slices to produce { 4 6 8 10 }.
- madd.w r0, r1, r2
-
- _packw 4, 6, 8, 10, r3
- bne r2, r3, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/mcmpeqb.cgs b/sim/testsuite/sim/sh64/media/mcmpeqb.cgs
deleted file mode 100644
index d7af6fa5f58..00000000000
--- a/sim/testsuite/sim/sh64/media/mcmpeqb.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mcmpeq.b $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mcmpeqb
-mcmpeqb:
- mcmpeq.b r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mcmpeql.cgs b/sim/testsuite/sim/sh64/media/mcmpeql.cgs
deleted file mode 100644
index 2851e80fc5e..00000000000
--- a/sim/testsuite/sim/sh64/media/mcmpeql.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mcmpeq.l $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mcmpeql
-mcmpeql:
- mcmpeq.l r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mcmpeqw.cgs b/sim/testsuite/sim/sh64/media/mcmpeqw.cgs
deleted file mode 100644
index 085df84eeb9..00000000000
--- a/sim/testsuite/sim/sh64/media/mcmpeqw.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mcmpeq.w $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mcmpeqw
-mcmpeqw:
- mcmpeq.w r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mcmpgtl.cgs b/sim/testsuite/sim/sh64/media/mcmpgtl.cgs
deleted file mode 100644
index 2ace0480506..00000000000
--- a/sim/testsuite/sim/sh64/media/mcmpgtl.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mcmpgt.l $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mcmpgtl
-mcmpgtl:
- mcmpgt.l r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mcmpgtub.cgs b/sim/testsuite/sim/sh64/media/mcmpgtub.cgs
deleted file mode 100644
index 540ce966092..00000000000
--- a/sim/testsuite/sim/sh64/media/mcmpgtub.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mcmpgt.ub $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mcmpgtub
-mcmpgtub:
- mcmpgt.ub r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mcmpgtw.cgs b/sim/testsuite/sim/sh64/media/mcmpgtw.cgs
deleted file mode 100644
index 83274512d5e..00000000000
--- a/sim/testsuite/sim/sh64/media/mcmpgtw.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mcmpgt.w $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mcmpgtw
-mcmpgtw:
- mcmpgt.w r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mcmv.cgs b/sim/testsuite/sim/sh64/media/mcmv.cgs
deleted file mode 100644
index c1f59aa4f88..00000000000
--- a/sim/testsuite/sim/sh64/media/mcmv.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mcmv $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mcmv
-mcmv:
- mcmv r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mcnvslw.cgs b/sim/testsuite/sim/sh64/media/mcnvslw.cgs
deleted file mode 100644
index 005108b7669..00000000000
--- a/sim/testsuite/sim/sh64/media/mcnvslw.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mcnvs.lw $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mcnvslw
-mcnvslw:
- mcnvs.lw r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mcnvswb.cgs b/sim/testsuite/sim/sh64/media/mcnvswb.cgs
deleted file mode 100644
index 0d25920f310..00000000000
--- a/sim/testsuite/sim/sh64/media/mcnvswb.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mcnvs.wb $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mcnvswb
-mcnvswb:
- mcnvs.wb r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mcnvswub.cgs b/sim/testsuite/sim/sh64/media/mcnvswub.cgs
deleted file mode 100644
index 2fc74466dd0..00000000000
--- a/sim/testsuite/sim/sh64/media/mcnvswub.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mcnvs.wub $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mcnvswub
-mcnvswub:
- mcnvs.wub r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mextr1.cgs b/sim/testsuite/sim/sh64/media/mextr1.cgs
deleted file mode 100644
index b2cb3c3ff29..00000000000
--- a/sim/testsuite/sim/sh64/media/mextr1.cgs
+++ /dev/null
@@ -1,67 +0,0 @@
-# sh testcase for mextr1 $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- # Put a distinguised bit pattern in R0.
- movi 0x1020, r0
- shlli r0, 8, r0
- ori r0, 0x30, r0
- shlli r0, 8, r0
- ori r0, 0x40, r0
- shlli r0, 8, r0
- ori r0, 0x50, r0
- shlli r0, 8, r0
- ori r0, 0x60, r0
- shlli r0, 8, r0
- ori r0, 0x70, r0
- shlli r0, 8, r0
- ori r0, 0x80, r0
-
- # Put another distinguished bit pattern in R1.
- movi 0x1525, r1
- shlli r1, 8, r1
- ori r1, 0x35, r1
- shlli r1, 8, r1
- ori r1, 0x45, r1
- shlli r1, 8, r1
- ori r1, 0x55, r1
- shlli r1, 8, r1
- ori r1, 0x65, r1
- shlli r1, 8, r1
- ori r1, 0x75, r1
- shlli r1, 8, r1
- ori r1, 0x85, r1
-
-mextr1:
- mextr1 r0, r1, r2
-
-check:
- # Put the result in R3.
- movi 0x2535, r3
- shlli r3, 8, r3
- ori r3, 0x45, r3
- shlli r3, 8, r3
- ori r3, 0x55, r3
- shlli r3, 8, r3
- ori r3, 0x65, r3
- shlli r3, 8, r3
- ori r3, 0x75, r3
- shlli r3, 8, r3
- ori r3, 0x85, r3
- shlli r3, 8, r3
- ori r3, 0x10, r3
-
- pta wrong, tr0
- bne r2, r3, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/mextr2.cgs b/sim/testsuite/sim/sh64/media/mextr2.cgs
deleted file mode 100644
index cf136be8176..00000000000
--- a/sim/testsuite/sim/sh64/media/mextr2.cgs
+++ /dev/null
@@ -1,67 +0,0 @@
-# sh testcase for mextr2 $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- # Put a distinguised bit pattern in R0.
- movi 0x1020, r0
- shlli r0, 8, r0
- ori r0, 0x30, r0
- shlli r0, 8, r0
- ori r0, 0x40, r0
- shlli r0, 8, r0
- ori r0, 0x50, r0
- shlli r0, 8, r0
- ori r0, 0x60, r0
- shlli r0, 8, r0
- ori r0, 0x70, r0
- shlli r0, 8, r0
- ori r0, 0x80, r0
-
- # Put another distinguished bit pattern in R1.
- movi 0x1525, r1
- shlli r1, 8, r1
- ori r1, 0x35, r1
- shlli r1, 8, r1
- ori r1, 0x45, r1
- shlli r1, 8, r1
- ori r1, 0x55, r1
- shlli r1, 8, r1
- ori r1, 0x65, r1
- shlli r1, 8, r1
- ori r1, 0x75, r1
- shlli r1, 8, r1
- ori r1, 0x85, r1
-
-mextr2:
- mextr2 r0, r1, r2
-
-check:
- # Put the result in R3.
- movi 0x3545, r3
- shlli r3, 8, r3
- ori r3, 0x55, r3
- shlli r3, 8, r3
- ori r3, 0x65, r3
- shlli r3, 8, r3
- ori r3, 0x75, r3
- shlli r3, 8, r3
- ori r3, 0x85, r3
- shlli r3, 8, r3
- ori r3, 0x10, r3
- shlli r3, 8, r3
- ori r3, 0x20, r3
-
- pta wrong, tr0
- bne r2, r3, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/mextr3.cgs b/sim/testsuite/sim/sh64/media/mextr3.cgs
deleted file mode 100644
index b8d60a447bc..00000000000
--- a/sim/testsuite/sim/sh64/media/mextr3.cgs
+++ /dev/null
@@ -1,67 +0,0 @@
-# sh testcase for mextr3 $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- # Put a distinguised bit pattern in R0.
- movi 0x1020, r0
- shlli r0, 8, r0
- ori r0, 0x30, r0
- shlli r0, 8, r0
- ori r0, 0x40, r0
- shlli r0, 8, r0
- ori r0, 0x50, r0
- shlli r0, 8, r0
- ori r0, 0x60, r0
- shlli r0, 8, r0
- ori r0, 0x70, r0
- shlli r0, 8, r0
- ori r0, 0x80, r0
-
- # Put another distinguished bit pattern in R1.
- movi 0x1525, r1
- shlli r1, 8, r1
- ori r1, 0x35, r1
- shlli r1, 8, r1
- ori r1, 0x45, r1
- shlli r1, 8, r1
- ori r1, 0x55, r1
- shlli r1, 8, r1
- ori r1, 0x65, r1
- shlli r1, 8, r1
- ori r1, 0x75, r1
- shlli r1, 8, r1
- ori r1, 0x85, r1
-
-mextr3:
- mextr3 r0, r1, r2
-
-check:
- # Put the result in R3.
- movi 0x4555, r3
- shlli r3, 8, r3
- ori r3, 0x65, r3
- shlli r3, 8, r3
- ori r3, 0x75, r3
- shlli r3, 8, r3
- ori r3, 0x85, r3
- shlli r3, 8, r3
- ori r3, 0x10, r3
- shlli r3, 8, r3
- ori r3, 0x20, r3
- shlli r3, 8, r3
- ori r3, 0x30, r3
-
- pta wrong, tr0
- bne r2, r3, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/mextr4.cgs b/sim/testsuite/sim/sh64/media/mextr4.cgs
deleted file mode 100644
index e9ebff9be7b..00000000000
--- a/sim/testsuite/sim/sh64/media/mextr4.cgs
+++ /dev/null
@@ -1,67 +0,0 @@
-# sh testcase for mextr4 $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- # Put a distinguised bit pattern in R0.
- movi 0x1020, r0
- shlli r0, 8, r0
- ori r0, 0x30, r0
- shlli r0, 8, r0
- ori r0, 0x40, r0
- shlli r0, 8, r0
- ori r0, 0x50, r0
- shlli r0, 8, r0
- ori r0, 0x60, r0
- shlli r0, 8, r0
- ori r0, 0x70, r0
- shlli r0, 8, r0
- ori r0, 0x80, r0
-
- # Put another distinguished bit pattern in R1.
- movi 0x1525, r1
- shlli r1, 8, r1
- ori r1, 0x35, r1
- shlli r1, 8, r1
- ori r1, 0x45, r1
- shlli r1, 8, r1
- ori r1, 0x55, r1
- shlli r1, 8, r1
- ori r1, 0x65, r1
- shlli r1, 8, r1
- ori r1, 0x75, r1
- shlli r1, 8, r1
- ori r1, 0x85, r1
-
-mextr4:
- mextr4 r0, r1, r2
-
-check:
- # Put the result in R3.
- movi 0x5565, r3
- shlli r3, 8, r3
- ori r3, 0x75, r3
- shlli r3, 8, r3
- ori r3, 0x85, r3
- shlli r3, 8, r3
- ori r3, 0x10, r3
- shlli r3, 8, r3
- ori r3, 0x20, r3
- shlli r3, 8, r3
- ori r3, 0x30, r3
- shlli r3, 8, r3
- ori r3, 0x40, r3
-
- pta wrong, tr0
- bne r2, r3, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/mextr5.cgs b/sim/testsuite/sim/sh64/media/mextr5.cgs
deleted file mode 100644
index c61a0c89f52..00000000000
--- a/sim/testsuite/sim/sh64/media/mextr5.cgs
+++ /dev/null
@@ -1,67 +0,0 @@
-# sh testcase for mextr5 $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- # Put a distinguised bit pattern in R0.
- movi 0x1020, r0
- shlli r0, 8, r0
- ori r0, 0x30, r0
- shlli r0, 8, r0
- ori r0, 0x40, r0
- shlli r0, 8, r0
- ori r0, 0x50, r0
- shlli r0, 8, r0
- ori r0, 0x60, r0
- shlli r0, 8, r0
- ori r0, 0x70, r0
- shlli r0, 8, r0
- ori r0, 0x80, r0
-
- # Put another distinguished bit pattern in R1.
- movi 0x1525, r1
- shlli r1, 8, r1
- ori r1, 0x35, r1
- shlli r1, 8, r1
- ori r1, 0x45, r1
- shlli r1, 8, r1
- ori r1, 0x55, r1
- shlli r1, 8, r1
- ori r1, 0x65, r1
- shlli r1, 8, r1
- ori r1, 0x75, r1
- shlli r1, 8, r1
- ori r1, 0x85, r1
-
-mextr5:
- mextr5 r0, r1, r2
-
-check:
- # Put the result in R3.
- movi 0x6575, r3
- shlli r3, 8, r3
- ori r3, 0x85, r3
- shlli r3, 8, r3
- ori r3, 0x10, r3
- shlli r3, 8, r3
- ori r3, 0x20, r3
- shlli r3, 8, r3
- ori r3, 0x30, r3
- shlli r3, 8, r3
- ori r3, 0x40, r3
- shlli r3, 8, r3
- ori r3, 0x50, r3
-
- pta wrong, tr0
- bne r2, r3, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/mextr6.cgs b/sim/testsuite/sim/sh64/media/mextr6.cgs
deleted file mode 100644
index 5c6c7f60c79..00000000000
--- a/sim/testsuite/sim/sh64/media/mextr6.cgs
+++ /dev/null
@@ -1,67 +0,0 @@
-# sh testcase for mextr6 $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- # Put a distinguised bit pattern in R0.
- movi 0x1020, r0
- shlli r0, 8, r0
- ori r0, 0x30, r0
- shlli r0, 8, r0
- ori r0, 0x40, r0
- shlli r0, 8, r0
- ori r0, 0x50, r0
- shlli r0, 8, r0
- ori r0, 0x60, r0
- shlli r0, 8, r0
- ori r0, 0x70, r0
- shlli r0, 8, r0
- ori r0, 0x80, r0
-
- # Put another distinguished bit pattern in R1.
- movi 0x1525, r1
- shlli r1, 8, r1
- ori r1, 0x35, r1
- shlli r1, 8, r1
- ori r1, 0x45, r1
- shlli r1, 8, r1
- ori r1, 0x55, r1
- shlli r1, 8, r1
- ori r1, 0x65, r1
- shlli r1, 8, r1
- ori r1, 0x75, r1
- shlli r1, 8, r1
- ori r1, 0x85, r1
-
-mextr6:
- mextr6 r0, r1, r2
-
-check:
- # Put the result in R3.
- movi 0x7585, r3
- shlli r3, 8, r3
- ori r3, 0x10, r3
- shlli r3, 8, r3
- ori r3, 0x20, r3
- shlli r3, 8, r3
- ori r3, 0x30, r3
- shlli r3, 8, r3
- ori r3, 0x40, r3
- shlli r3, 8, r3
- ori r3, 0x50, r3
- shlli r3, 8, r3
- ori r3, 0x60, r3
-
- pta wrong, tr0
- bne r2, r3, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/mextr7.cgs b/sim/testsuite/sim/sh64/media/mextr7.cgs
deleted file mode 100644
index e05ec7f9ab3..00000000000
--- a/sim/testsuite/sim/sh64/media/mextr7.cgs
+++ /dev/null
@@ -1,67 +0,0 @@
-# sh testcase for mextr7 $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- # Put a distinguised bit pattern in R0.
- movi 0x1020, r0
- shlli r0, 8, r0
- ori r0, 0x30, r0
- shlli r0, 8, r0
- ori r0, 0x40, r0
- shlli r0, 8, r0
- ori r0, 0x50, r0
- shlli r0, 8, r0
- ori r0, 0x60, r0
- shlli r0, 8, r0
- ori r0, 0x70, r0
- shlli r0, 8, r0
- ori r0, 0x80, r0
-
- # Put another distinguished bit pattern in R1.
- movi 0x1525, r1
- shlli r1, 8, r1
- ori r1, 0x35, r1
- shlli r1, 8, r1
- ori r1, 0x45, r1
- shlli r1, 8, r1
- ori r1, 0x55, r1
- shlli r1, 8, r1
- ori r1, 0x65, r1
- shlli r1, 8, r1
- ori r1, 0x75, r1
- shlli r1, 8, r1
- ori r1, 0x85, r1
-
-mextr7:
- mextr7 r0, r1, r2
-
-check:
- # Put the result in R3.
- movi 0x8510, r3
- shlli r3, 8, r3
- ori r3, 0x20, r3
- shlli r3, 8, r3
- ori r3, 0x30, r3
- shlli r3, 8, r3
- ori r3, 0x40, r3
- shlli r3, 8, r3
- ori r3, 0x50, r3
- shlli r3, 8, r3
- ori r3, 0x60, r3
- shlli r3, 8, r3
- ori r3, 0x70, r3
-
- pta wrong, tr0
- bne r2, r3, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/mmacfxwl.cgs b/sim/testsuite/sim/sh64/media/mmacfxwl.cgs
deleted file mode 100644
index dd2d9a41ae7..00000000000
--- a/sim/testsuite/sim/sh64/media/mmacfxwl.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mmacfx.wl $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mmacfxwl
-mmacfxwl:
- mmacfx.wl r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mmacnfx-wl.cgs b/sim/testsuite/sim/sh64/media/mmacnfx-wl.cgs
deleted file mode 100644
index ba634d207a3..00000000000
--- a/sim/testsuite/sim/sh64/media/mmacnfx-wl.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mmacnfx.wl $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mmacnfx_wl
-mmacnfx_wl:
- mmacnfx.wl r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mmulfxl.cgs b/sim/testsuite/sim/sh64/media/mmulfxl.cgs
deleted file mode 100644
index 7d2d1a63268..00000000000
--- a/sim/testsuite/sim/sh64/media/mmulfxl.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mmulfx.l $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mmulfxl
-mmulfxl:
- mmulfx.l r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mmulfxrpw.cgs b/sim/testsuite/sim/sh64/media/mmulfxrpw.cgs
deleted file mode 100644
index 13fdcc71d0e..00000000000
--- a/sim/testsuite/sim/sh64/media/mmulfxrpw.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mmulfxrp.w $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mmulfxrpw
-mmulfxrpw:
- mmulfxrp.w r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mmulfxw.cgs b/sim/testsuite/sim/sh64/media/mmulfxw.cgs
deleted file mode 100644
index e2a66a7c11d..00000000000
--- a/sim/testsuite/sim/sh64/media/mmulfxw.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mmulfx.w $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mmulfxw
-mmulfxw:
- mmulfx.w r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mmulhiwl.cgs b/sim/testsuite/sim/sh64/media/mmulhiwl.cgs
deleted file mode 100644
index 1a41ac59286..00000000000
--- a/sim/testsuite/sim/sh64/media/mmulhiwl.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mmulhi.wl $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mmulhiwl
-mmulhiwl:
- mmulhi.wl r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mmull.cgs b/sim/testsuite/sim/sh64/media/mmull.cgs
deleted file mode 100644
index b3ed9df3f35..00000000000
--- a/sim/testsuite/sim/sh64/media/mmull.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mmul.l $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mmull
-mmull:
- mmul.l r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mmullowl.cgs b/sim/testsuite/sim/sh64/media/mmullowl.cgs
deleted file mode 100644
index b50ccfcb5dd..00000000000
--- a/sim/testsuite/sim/sh64/media/mmullowl.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mmullo.wl $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mmullowl
-mmullowl:
- mmullo.wl r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mmulsumwq.cgs b/sim/testsuite/sim/sh64/media/mmulsumwq.cgs
deleted file mode 100644
index 344710b0e98..00000000000
--- a/sim/testsuite/sim/sh64/media/mmulsumwq.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mmulsum.wq $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mmulsumwq
-mmulsumwq:
- mmulsum.wq r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mmulw.cgs b/sim/testsuite/sim/sh64/media/mmulw.cgs
deleted file mode 100644
index 675c620fadc..00000000000
--- a/sim/testsuite/sim/sh64/media/mmulw.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mmul.w $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mmulw
-mmulw:
- mmul.w r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/movi.cgs b/sim/testsuite/sim/sh64/media/movi.cgs
deleted file mode 100644
index a01bcae84df..00000000000
--- a/sim/testsuite/sim/sh64/media/movi.cgs
+++ /dev/null
@@ -1,29 +0,0 @@
-# sh testcase for movi $imm16, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- pta wrong, tr0
-
-movi0:
- movi 0, r0
- bnei r0, 0, tr0
-movi1:
- movi 1, r0
- bnei r0, 1, tr0
-movi2:
- movi 23, r0
- bnei r0, 23, tr0
-movn:
- movi -1, r0
- addi r0, 1, r0
- bnei r0, 0, tr0
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/mpermw.cgs b/sim/testsuite/sim/sh64/media/mpermw.cgs
deleted file mode 100644
index 3b6741e8107..00000000000
--- a/sim/testsuite/sim/sh64/media/mpermw.cgs
+++ /dev/null
@@ -1,51 +0,0 @@
-# sh testcase for mperm.w $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- pta wrong, tr0
- movi 27, r1
- movi 0x1020, r0
- shlli r0, 8, r0
- ori r0, 0x30, r0
- shlli r0, 8, r0
- ori r0, 0x40, r0
- shlli r0, 8, r0
- ori r0, 0x50, r0
- shlli r0, 8, r0
- ori r0, 0x60, r0
- shlli r0, 8, r0
- ori r0, 0x70, r0
- shlli r0, 8, r0
- ori r0, 0x80, r0
-
-mpermw:
- mperm.w r0, r1, r2
-
-check:
- # Expect 0x7080506030401020.
- movi 0x7080, r0
- shlli r0, 8, r0
- ori r0, 0x50, r0
- shlli r0, 8, r0
- ori r0, 0x60, r0
- shlli r0, 8, r0
- ori r0, 0x30, r0
- shlli r0, 8, r0
- ori r0, 0x40, r0
- shlli r0, 8, r0
- ori r0, 0x10, r0
- shlli r0, 8, r0
- ori r0, 0x20, r0
-
- bne r0, r2, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/msadubq.cgs b/sim/testsuite/sim/sh64/media/msadubq.cgs
deleted file mode 100644
index 4361883b870..00000000000
--- a/sim/testsuite/sim/sh64/media/msadubq.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for msad.ubq $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global msadubq
-msadubq:
- msad.ubq r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mshaldsl.cgs b/sim/testsuite/sim/sh64/media/mshaldsl.cgs
deleted file mode 100644
index 1dd86ec6bb6..00000000000
--- a/sim/testsuite/sim/sh64/media/mshaldsl.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mshalds.l $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mshaldsl
-mshaldsl:
- mshalds.l r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mshaldsw.cgs b/sim/testsuite/sim/sh64/media/mshaldsw.cgs
deleted file mode 100644
index 7ab6797e9a6..00000000000
--- a/sim/testsuite/sim/sh64/media/mshaldsw.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mshalds.w $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mshaldsw
-mshaldsw:
- mshalds.w r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mshardl.cgs b/sim/testsuite/sim/sh64/media/mshardl.cgs
deleted file mode 100644
index 0dc102e337a..00000000000
--- a/sim/testsuite/sim/sh64/media/mshardl.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mshard.l $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mshardl
-mshardl:
- mshard.l r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mshardsq.cgs b/sim/testsuite/sim/sh64/media/mshardsq.cgs
deleted file mode 100644
index 5f29afb8b1b..00000000000
--- a/sim/testsuite/sim/sh64/media/mshardsq.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mshards.q $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mshardsq
-mshardsq:
- mshards.q r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mshardw.cgs b/sim/testsuite/sim/sh64/media/mshardw.cgs
deleted file mode 100644
index ecc7004febd..00000000000
--- a/sim/testsuite/sim/sh64/media/mshardw.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mshard.w $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mshardw
-mshardw:
- mshard.w r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mshfhib.cgs b/sim/testsuite/sim/sh64/media/mshfhib.cgs
deleted file mode 100644
index b7b245e79ae..00000000000
--- a/sim/testsuite/sim/sh64/media/mshfhib.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mshfhi.b $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mshfhib
-mshfhib:
- mshfhi.b r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mshfhil.cgs b/sim/testsuite/sim/sh64/media/mshfhil.cgs
deleted file mode 100644
index 2fab7ae1fd9..00000000000
--- a/sim/testsuite/sim/sh64/media/mshfhil.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mshfhi.l $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mshfhil
-mshfhil:
- mshfhi.l r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mshfhiw.cgs b/sim/testsuite/sim/sh64/media/mshfhiw.cgs
deleted file mode 100644
index 03111413cf1..00000000000
--- a/sim/testsuite/sim/sh64/media/mshfhiw.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mshfhi.w $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mshfhiw
-mshfhiw:
- mshfhi.w r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mshflob.cgs b/sim/testsuite/sim/sh64/media/mshflob.cgs
deleted file mode 100644
index 400e81a0598..00000000000
--- a/sim/testsuite/sim/sh64/media/mshflob.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mshflo.b $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mshflob
-mshflob:
- mshflo.b r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mshflol.cgs b/sim/testsuite/sim/sh64/media/mshflol.cgs
deleted file mode 100644
index 2fbdf894e60..00000000000
--- a/sim/testsuite/sim/sh64/media/mshflol.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mshflo.l $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mshflol
-mshflol:
- mshflo.l r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mshflow.cgs b/sim/testsuite/sim/sh64/media/mshflow.cgs
deleted file mode 100644
index 542eb042c52..00000000000
--- a/sim/testsuite/sim/sh64/media/mshflow.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mshflo.w $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mshflow
-mshflow:
- mshflo.w r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mshlldl.cgs b/sim/testsuite/sim/sh64/media/mshlldl.cgs
deleted file mode 100644
index 2a17c33002e..00000000000
--- a/sim/testsuite/sim/sh64/media/mshlldl.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mshlld.l $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mshlldl
-mshlldl:
- mshlld.l r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mshlldw.cgs b/sim/testsuite/sim/sh64/media/mshlldw.cgs
deleted file mode 100644
index e4afe3d732a..00000000000
--- a/sim/testsuite/sim/sh64/media/mshlldw.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mshlld.w $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mshlldw
-mshlldw:
- mshlld.w r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mshlrdl.cgs b/sim/testsuite/sim/sh64/media/mshlrdl.cgs
deleted file mode 100644
index 89e70772b7f..00000000000
--- a/sim/testsuite/sim/sh64/media/mshlrdl.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mshlrd.l $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mshlrdl
-mshlrdl:
- mshlrd.l r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mshlrdw.cgs b/sim/testsuite/sim/sh64/media/mshlrdw.cgs
deleted file mode 100644
index 4cbf2807f9c..00000000000
--- a/sim/testsuite/sim/sh64/media/mshlrdw.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for mshlrd.w $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mshlrdw
-mshlrdw:
- mshlrd.w r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/msubl.cgs b/sim/testsuite/sim/sh64/media/msubl.cgs
deleted file mode 100644
index 87151fad728..00000000000
--- a/sim/testsuite/sim/sh64/media/msubl.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for msub.l $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global msubl
-msubl:
- msub.l r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/msubsl.cgs b/sim/testsuite/sim/sh64/media/msubsl.cgs
deleted file mode 100644
index 014422ed8f3..00000000000
--- a/sim/testsuite/sim/sh64/media/msubsl.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for msubs.l $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global msubsl
-msubsl:
- msubs.l r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/msubsub.cgs b/sim/testsuite/sim/sh64/media/msubsub.cgs
deleted file mode 100644
index c92c77ee72e..00000000000
--- a/sim/testsuite/sim/sh64/media/msubsub.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for msubs.ub $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global msubsub
-msubsub:
- msubs.ub r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/msubsw.cgs b/sim/testsuite/sim/sh64/media/msubsw.cgs
deleted file mode 100644
index 83b76a1b4b3..00000000000
--- a/sim/testsuite/sim/sh64/media/msubsw.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for msubs.w $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global msubsw
-msubsw:
- msubs.w r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/msubw.cgs b/sim/testsuite/sim/sh64/media/msubw.cgs
deleted file mode 100644
index 9d5e639f240..00000000000
--- a/sim/testsuite/sim/sh64/media/msubw.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for msub.w $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global msubw
-msubw:
- msub.w r0, r0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/mulsl.cgs b/sim/testsuite/sim/sh64/media/mulsl.cgs
deleted file mode 100644
index d65c80cadf2..00000000000
--- a/sim/testsuite/sim/sh64/media/mulsl.cgs
+++ /dev/null
@@ -1,54 +0,0 @@
-# sh testcase for muls.l $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mulsl
-init:
- pta wrong, tr0
-
-mulsl1:
- movi 0, r0
- muls.l r0, r0, r1
- bnei r1, 0, tr0
-
-mulsl2:
- movi 0, r0
- movi 1, r1
- muls.l r0, r1, r2
- bnei r2, 0, tr0
-
-mulsl3:
- movi 1, r0
- movi 0, r1
- muls.l r0, r1, r2
- bnei r2, 0, tr0
-
-mulsl4:
- movi 1, r0
- movi 1, r1
- muls.l r0, r1, r2
- bnei r2, 1, tr0
-
-mulsl5:
- movi 2, r0
- movi 9, r1
- muls.l r0, r1, r2
- bnei r2, 18, tr0
-
-mulsl6:
- movi 2, r0
- movi -9, r1
- muls.l r0, r1, r2
- bnei r2, -18, tr0
-
-okay:
- pass
-
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/media/mulul.cgs b/sim/testsuite/sim/sh64/media/mulul.cgs
deleted file mode 100644
index b795cf79ec0..00000000000
--- a/sim/testsuite/sim/sh64/media/mulul.cgs
+++ /dev/null
@@ -1,54 +0,0 @@
-# sh testcase for mulu.l $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global mulul
-init:
- pta wrong, tr0
-
-mulul1:
- movi 0, r0
- mulu.l r0, r0, r1
- bnei r1, 0, tr0
-
-mulul2:
- movi 0, r0
- movi 1, r1
- mulu.l r0, r1, r2
- bnei r2, 0, tr0
-
-mulul3:
- movi 1, r0
- movi 0, r1
- mulu.l r0, r1, r2
- bnei r2, 0, tr0
-
-mulul4:
- movi 1, r0
- movi 1, r1
- mulu.l r0, r1, r2
- bnei r2, 1, tr0
-
-mulul5:
- movi 2, r0
- movi 9, r1
- mulu.l r0, r1, r2
- bnei r2, 18, tr0
-
-mulul6:
- movi 2, r0
- movi -9, r1
- mulu.l r0, r1, r2
- beqi r2, -18, tr0
-
-okay:
- pass
-
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/media/nop.cgs b/sim/testsuite/sim/sh64/media/nop.cgs
deleted file mode 100644
index a0e57530542..00000000000
--- a/sim/testsuite/sim/sh64/media/nop.cgs
+++ /dev/null
@@ -1,10 +0,0 @@
-# sh testcase for nop -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
- nop
- pass
diff --git a/sim/testsuite/sim/sh64/media/nsb.cgs b/sim/testsuite/sim/sh64/media/nsb.cgs
deleted file mode 100644
index 8b3cffef4a8..00000000000
--- a/sim/testsuite/sim/sh64/media/nsb.cgs
+++ /dev/null
@@ -1,66 +0,0 @@
-# sh testcase for nsb $rm, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- pta wrong, tr0
-
-nsb0:
- movi 0, r0
- nsb r0, r1
-check0:
- movi 63, r4
- bne r1, r4, tr0
-
-nsb1:
- # set up a loop target reg.
- pta again1, tr1
- # r4 holds the loop count.
- movi 62, r4
- movi 1, r0
-again1:
- nsb r0, r1
- bne r1, r4, tr0
- # okay? go around again.
- shlli r0, 1, r0
- addi r4, -1, r4
- bnei r4, 0, tr1
-
-nsb2:
- # set up a loop target reg.
- pta again2, tr1
- # r4 holds the loop count.
- movi 63, r4
- movi -1, r0
-again2:
- nsb r0, r1
- bne r1, r4, tr0
- # okay? go around again.
- shlli r0, 1, r0
- addi r4, -1, r4
- bnei r4, 0, tr1
-
-nsb3:
- movi 1, r0
- shlli r0, 63, r0
- nsb r0, r1
-check3:
- movi 0, r4
- bne r1, r4, tr0
-
-nsb4:
- movi 7, r0
- shlli r0, 61, r0
- nsb r0, r1
-check4:
- movi 2, r4
- bne r1, r4, tr0
-
-okay:
- pass
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/ocbi.cgs b/sim/testsuite/sim/sh64/media/ocbi.cgs
deleted file mode 100644
index b210216e3db..00000000000
--- a/sim/testsuite/sim/sh64/media/ocbi.cgs
+++ /dev/null
@@ -1,10 +0,0 @@
-# sh testcase for ocbi $rm, $disp6x32 -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
- ocbi r0, 0
- pass
diff --git a/sim/testsuite/sim/sh64/media/ocbp.cgs b/sim/testsuite/sim/sh64/media/ocbp.cgs
deleted file mode 100644
index 9158c6f4518..00000000000
--- a/sim/testsuite/sim/sh64/media/ocbp.cgs
+++ /dev/null
@@ -1,10 +0,0 @@
-# sh testcase for ocbp $rm, $disp6x32 -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
- ocbp r0, 0
- pass
diff --git a/sim/testsuite/sim/sh64/media/ocbwb.cgs b/sim/testsuite/sim/sh64/media/ocbwb.cgs
deleted file mode 100644
index 6addabcf461..00000000000
--- a/sim/testsuite/sim/sh64/media/ocbwb.cgs
+++ /dev/null
@@ -1,10 +0,0 @@
-# sh testcase for ocbwb $rm, $disp6x32 -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
- ocbwb r0, 0
- pass
diff --git a/sim/testsuite/sim/sh64/media/or.cgs b/sim/testsuite/sim/sh64/media/or.cgs
deleted file mode 100644
index e06759225ba..00000000000
--- a/sim/testsuite/sim/sh64/media/or.cgs
+++ /dev/null
@@ -1,44 +0,0 @@
-# sh testcase for or $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- pta wrong, tr0
-
-or1:
- movi 0, r0
- or r0, r0, r1
- bnei r1, 0, tr0
-
-or2:
- movi 0, r0
- movi 1, r1
- or r0, r1, r2
- bnei r2, 1, tr0
-
-or3:
- movi 1, r0
- movi 0, r1
- or r0, r1, r2
- bnei r2, 1, tr0
-
-or4:
- movi 1, r0
- or r0, r0, r1
- bnei r1, 1, tr0
-
-or5:
- movi 1, r0
- shlli r0, 63, r0
- movi 1, r1
- or r0, r1, r2
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/ori.cgs b/sim/testsuite/sim/sh64/media/ori.cgs
deleted file mode 100644
index 7b2554227da..00000000000
--- a/sim/testsuite/sim/sh64/media/ori.cgs
+++ /dev/null
@@ -1,41 +0,0 @@
-# sh testcase for ori $rm, $imm10, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- pta wrong, tr0
-
-or1:
- movi 0, r0
- ori r0, 0, r1
- bnei r1, 0, tr0
-
-or2:
- movi 0, r0
- ori r0, 1, r2
- bnei r2, 1, tr0
-
-or3:
- movi 1, r0
- ori r0, 0, r2
- bnei r2, 1, tr0
-
-or4:
- movi 1, r0
- ori r0, 1, r1
- bnei r1, 1, tr0
-
-or5:
- movi 1, r0
- shlli r0, 63, r0
- ori r0, 1, r2
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/prefi.cgs b/sim/testsuite/sim/sh64/media/prefi.cgs
deleted file mode 100644
index 68d7bfe29a4..00000000000
--- a/sim/testsuite/sim/sh64/media/prefi.cgs
+++ /dev/null
@@ -1,10 +0,0 @@
-# sh testcase for prefi $rm, $disp6x32 -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
- prefi r0, 0
- pass
diff --git a/sim/testsuite/sim/sh64/media/pta.cgs b/sim/testsuite/sim/sh64/media/pta.cgs
deleted file mode 100644
index 9f6484a8d4c..00000000000
--- a/sim/testsuite/sim/sh64/media/pta.cgs
+++ /dev/null
@@ -1,26 +0,0 @@
-# sh testcase for pta$likely $disp16, $tra -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-pta0:
- pta foo, tr0
-pta1:
- pta/l bar, tr1
-pta2:
- pta/u baz, tr2
- movi 0, r0
- bnei r0, 1, tr2
- fail
-
-foo:
-bar:
-baz:
- pass
- fail
- fail
- fail
- fail
diff --git a/sim/testsuite/sim/sh64/media/ptabs.cgs b/sim/testsuite/sim/sh64/media/ptabs.cgs
deleted file mode 100644
index 0c01f838eb8..00000000000
--- a/sim/testsuite/sim/sh64/media/ptabs.cgs
+++ /dev/null
@@ -1,25 +0,0 @@
-# sh testcase for ptabs$likely $rn, $tra -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global ptabs
-ptabs:
- movi 16, r0
- shlli r0, 8, r0
- # Add one to stay in SHmedia mode.
- addi r0, 29, r0
- ptabs r0, tr0
-
- # Now jump.
- beqi r63, 0, tr0
-
-wrong:
- fail
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/media/ptb.cgs b/sim/testsuite/sim/sh64/media/ptb.cgs
deleted file mode 100644
index 129d6260439..00000000000
--- a/sim/testsuite/sim/sh64/media/ptb.cgs
+++ /dev/null
@@ -1,29 +0,0 @@
-# sh testcase for ptb$likely $disp16, $tra -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-ptb0:
- ptb foo, tr0
-ptb:
- ptb/l bar, tr1
-ptb2:
- ptb/u baz, tr2
- movi 0, r0
- bnei r0, 1, tr2
- fail
-
-.mode SHcompact
-
-foo:
-bar:
-baz:
- trapa #253
- trapa #254
- trapa #254
- trapa #254
- trapa #254
diff --git a/sim/testsuite/sim/sh64/media/ptrel.cgs b/sim/testsuite/sim/sh64/media/ptrel.cgs
deleted file mode 100644
index 7e5f19b1b9c..00000000000
--- a/sim/testsuite/sim/sh64/media/ptrel.cgs
+++ /dev/null
@@ -1,22 +0,0 @@
-# sh testcase for ptrel$likely $rn, $tra -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
- # Add one to stay in SHmedia mode.
- movi 53, r0
- ptrel r0, tr0
- movi 0, r0
- # Always branch.
- bnei r0, 1, tr0
- fail
- fail
- fail
- fail
- fail
- pass
- fail
- fail
diff --git a/sim/testsuite/sim/sh64/media/putcfg.cgs b/sim/testsuite/sim/sh64/media/putcfg.cgs
deleted file mode 100644
index 85385754a48..00000000000
--- a/sim/testsuite/sim/sh64/media/putcfg.cgs
+++ /dev/null
@@ -1,10 +0,0 @@
-# sh testcase for putcfg $rm, $disp6, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
- putcfg r0, 0, r0
- pass
diff --git a/sim/testsuite/sim/sh64/media/putcon.cgs b/sim/testsuite/sim/sh64/media/putcon.cgs
deleted file mode 100644
index 39dfc036280..00000000000
--- a/sim/testsuite/sim/sh64/media/putcon.cgs
+++ /dev/null
@@ -1,30 +0,0 @@
-# sh testcase for putcon $rm, $crj -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
-
-putcon1:
- movi 22, r0
- putcon r0, cr0
- getcon cr0, r1
- bne r0, r1, tr0
-
-putcon2:
- movi 12, r0
- shlli r0, 35, r0
- putcon r0, cr20
- getcon cr20, r20
- bne r0, r20, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/rte.cgs b/sim/testsuite/sim/sh64/media/rte.cgs
deleted file mode 100644
index e80f08541cc..00000000000
--- a/sim/testsuite/sim/sh64/media/rte.cgs
+++ /dev/null
@@ -1,11 +0,0 @@
-# sh testcase for rte -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
- # Unimplemented.
- rte
- pass
diff --git a/sim/testsuite/sim/sh64/media/shard.cgs b/sim/testsuite/sim/sh64/media/shard.cgs
deleted file mode 100644
index 029e52902a2..00000000000
--- a/sim/testsuite/sim/sh64/media/shard.cgs
+++ /dev/null
@@ -1,30 +0,0 @@
-# sh testcase for shard $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
-
-shard1:
- movi 128, r0
- movi 3, r1
- shard r0, r1, r2
- bnei r2, 16, tr0
-
-shard2:
- movi -4, r0
- movi 2, r1
- shard r0, r1, r2
- addi r2, 1, r2
- bnei r2, 0, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/shardl.cgs b/sim/testsuite/sim/sh64/media/shardl.cgs
deleted file mode 100644
index d9acaa54f69..00000000000
--- a/sim/testsuite/sim/sh64/media/shardl.cgs
+++ /dev/null
@@ -1,45 +0,0 @@
-# sh testcase for shard.l $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
-
-shardl1:
- movi 0x1020, r0
- shlli r0, 8, r0
- ori r0, 0x30, r0
- shlli r0, 8, r0
- ori r0, 0x40, r0
- shlli r0, 8, r0
- ori r0, 0x50, r0
- shlli r0, 8, r0
- ori r0, 0x60, r0
- shlli r0, 8, r0
- ori r0, 0x70, r0
- shlli r0, 8, r0
- ori r0, 0x80, r0
-
- movi 1, r1
- shard.l r0, r1, r0
- shard.l r0, r1, r0
- shard.l r0, r1, r0
- shard.l r0, r1, r0
- shard.l r0, r1, r0
- shard.l r0, r1, r0
- shard.l r0, r1, r0
- shard.l r0, r1, r0
- movi 20, r1
- shard.l r0, r1, r0
- bnei r0, 5, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/shari.cgs b/sim/testsuite/sim/sh64/media/shari.cgs
deleted file mode 100644
index 3d3a650fb0c..00000000000
--- a/sim/testsuite/sim/sh64/media/shari.cgs
+++ /dev/null
@@ -1,28 +0,0 @@
-# sh testcase for shari $rm, $imm, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
-
-shari1:
- movi 128, r0
- shari r0, 3, r2
- bnei r2, 16, tr0
-
-shari2:
- movi -4, r0
- shari r0, 2, r2
- addi r2, 1, r2
- bnei r2, 0, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/sharil.cgs b/sim/testsuite/sim/sh64/media/sharil.cgs
deleted file mode 100644
index be946e0c84d..00000000000
--- a/sim/testsuite/sim/sh64/media/sharil.cgs
+++ /dev/null
@@ -1,45 +0,0 @@
-# sh testcase for shari.l $rm, $imm6, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
-
-sharil1:
- movi 0x1020, r0
- shlli r0, 8, r0
- ori r0, 0x30, r0
- shlli r0, 8, r0
- ori r0, 0x40, r0
- shlli r0, 8, r0
- ori r0, 0x50, r0
- shlli r0, 8, r0
- ori r0, 0x60, r0
- shlli r0, 8, r0
- ori r0, 0x70, r0
- shlli r0, 8, r0
- ori r0, 0x80, r0
-
- movi 1, r1
- shari.l r0, 1, r0
- shari.l r0, 1, r0
- shari.l r0, 1, r0
- shari.l r0, 1, r0
- shari.l r0, 1, r0
- shari.l r0, 1, r0
- shari.l r0, 1, r0
- shari.l r0, 1, r0
- shari.l r0, 20, r0
- bnei r0, 5, tr0
-
-okay:
- pass
-
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/media/shlld.cgs b/sim/testsuite/sim/sh64/media/shlld.cgs
deleted file mode 100644
index 05d2da4cd68..00000000000
--- a/sim/testsuite/sim/sh64/media/shlld.cgs
+++ /dev/null
@@ -1,36 +0,0 @@
-# sh testcase for shlld $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
-
-shlld1:
- movi 1, r0
- movi 5, r1
- shlld r0, r1, r2
- movi 32, r7
- bne r2, r7, tr0
-
-shlld2:
- movi 2, r1
- shlld r2, r1, r3
- movi 128, r7
- bne r3, r7, tr0
-
-shlld3:
- movi 32, r1
- shlld r0, r1, r7
- shlld r7, r1, r2
- bnei r2, 0, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/shlldl.cgs b/sim/testsuite/sim/sh64/media/shlldl.cgs
deleted file mode 100644
index 3d37f53a76b..00000000000
--- a/sim/testsuite/sim/sh64/media/shlldl.cgs
+++ /dev/null
@@ -1,34 +0,0 @@
-# sh testcase for shlld.l $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- pta wrong, tr0
-
-shlldl1:
- movi 1, r0
- shlli r0, 32, r0
- ori r0, 1, r0
- movi 1, r1
- shlli r1, 7, r1
- ori r1, 3, r1
-
- shlld.l r0, r1, r2
-
-check1:
- bnei r2, 8, tr0
-
-shlldl2:
- movi 1, r0
- movi 31, r1
- shlld.l r0, r1, r2
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/shlli.cgs b/sim/testsuite/sim/sh64/media/shlli.cgs
deleted file mode 100644
index 9ab331c0930..00000000000
--- a/sim/testsuite/sim/sh64/media/shlli.cgs
+++ /dev/null
@@ -1,30 +0,0 @@
-# sh testcase for shlli $rm, $imm6, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
-
-shlli:
- movi 1, r0
- shlli r0, 3, r0
- bnei r0, 8, tr0
-
-shlli2:
- shlli r0, 3, r0
-
-shlli3:
- # Shift all bits out of sight.
- shlli r0, 63, r0
- bnei r0, 0, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/shllil.cgs b/sim/testsuite/sim/sh64/media/shllil.cgs
deleted file mode 100644
index 347acd64084..00000000000
--- a/sim/testsuite/sim/sh64/media/shllil.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for shlli.l $rm, $imm6, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global shllil
-shllil:
- shlli.l r0, 0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/shlrd.cgs b/sim/testsuite/sim/sh64/media/shlrd.cgs
deleted file mode 100644
index 56f10bf1c0e..00000000000
--- a/sim/testsuite/sim/sh64/media/shlrd.cgs
+++ /dev/null
@@ -1,30 +0,0 @@
-# sh testcase for shlrd $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
-
-shlrd1:
- movi 128, r0
- movi 3, r1
- shlrd r0, r1, r2
- bnei r2, 16, tr0
-
-shlrd2:
- movi -4, r0
- movi 2, r1
- shlrd r0, r1, r2
- addi r2, 1, r2
- beqi r2, 0, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/shlrdl.cgs b/sim/testsuite/sim/sh64/media/shlrdl.cgs
deleted file mode 100644
index 32b20c0a3cd..00000000000
--- a/sim/testsuite/sim/sh64/media/shlrdl.cgs
+++ /dev/null
@@ -1,37 +0,0 @@
-# sh testcase for shlrd.l $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
-
-shlrdl1:
- movi 1, r0
- shlli r0, 32, r0
- ori r0, 8, r0
- movi 1, r1
- shlli r1, 7, r1
- ori r1, 3, r1
-
- shlrd.l r0, r1, r2
-
-check1:
- bnei r2, 1, tr0
-
-shlrdl2:
- movi 1, r0
- shlli r0, 31, r0
- movi 31, r1
- shlld.l r0, r1, r2
- bnei r2, 0, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/shlri.cgs b/sim/testsuite/sim/sh64/media/shlri.cgs
deleted file mode 100644
index 488cac9aec8..00000000000
--- a/sim/testsuite/sim/sh64/media/shlri.cgs
+++ /dev/null
@@ -1,28 +0,0 @@
-# sh testcase for shlri $rm, $imm, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
-
-shlri1:
- movi 128, r0
- shlri r0, 3, r2
- bnei r2, 16, tr0
-
-shlri2:
- movi -4, r0
- shlri r0, 2, r2
- addi r2, 1, r2
- beqi r2, 0, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/shlril.cgs b/sim/testsuite/sim/sh64/media/shlril.cgs
deleted file mode 100644
index bb1b2a6eaf0..00000000000
--- a/sim/testsuite/sim/sh64/media/shlril.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for shlri.l $rm, $imm6, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global shlril
-shlril:
- shlri.l r0, 0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/shori.cgs b/sim/testsuite/sim/sh64/media/shori.cgs
deleted file mode 100644
index 5f02b7d2c5f..00000000000
--- a/sim/testsuite/sim/sh64/media/shori.cgs
+++ /dev/null
@@ -1,35 +0,0 @@
-# sh testcase for shori $imm16, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
-
-shori1:
- movi 1, r0
- shori 7, r0
- # check it.
- andi r0, 15, r7
- bnei r7, 7, tr0
- shlri r0, 16, r0
- bnei r0, 1, tr0
-
-shori2:
- # Test for zero extension bug reported by
- # Alexandre Oliva <aoliva@redhat.com>.
- movi 0, r0
- shori 65535, r0
- # check it.
- movi 0xffff, r1
- bne r0, r1, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/sleep.cgs b/sim/testsuite/sim/sh64/media/sleep.cgs
deleted file mode 100644
index b4c35ee8f96..00000000000
--- a/sim/testsuite/sim/sh64/media/sleep.cgs
+++ /dev/null
@@ -1,10 +0,0 @@
-# sh testcase for sleep -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
- sleep
- pass
diff --git a/sim/testsuite/sim/sh64/media/stb.cgs b/sim/testsuite/sim/sh64/media/stb.cgs
deleted file mode 100644
index 09de47b14a9..00000000000
--- a/sim/testsuite/sim/sh64/media/stb.cgs
+++ /dev/null
@@ -1,26 +0,0 @@
-# sh testcase for st.b $rm, $disp10, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- movi -1, r7
- xori r7, 13, r7
- movi 40, r0
- shlli r0, 8, r0
-
-stb1:
- st.b r0, 0, r7
-
-stb2:
- st.b r0, 1, r7
-
-stb3:
- st.b r0, -1, r7
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/media/sthil.cgs b/sim/testsuite/sim/sh64/media/sthil.cgs
deleted file mode 100644
index cfee28444f8..00000000000
--- a/sim/testsuite/sim/sh64/media/sthil.cgs
+++ /dev/null
@@ -1,55 +0,0 @@
-# sh testcase for sthi.l $rm, $disp6, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
-
- movi 40, r0
- shlli r0, 8, r0
-
- movi 0x1020, r1
- shlli r1, 8, r1
- addi r1, 0x30, r1
- shlli r1, 8, r1
- addi r1, 0x40, r1
- shlli r1, 8, r1
- addi r1, 0x50, r1
- shlli r1, 8, r1
- addi r1, 0x60, r1
- shlli r1, 8, r1
- addi r1, 0x70, r1
- shlli r1, 8, r1
- addi r1, 0x80, r1
-
-sthil1:
- sthi.l r0, 0, r1
-
-sthil2:
- sthi.l r0, 1, r1
-
-sthil3:
- sthi.l r0, 2, r1
-
-sthil4:
- sthi.l r0, 3, r1
-
-sthil5:
- sthi.l r0, -1, r1
-
-sthil6:
- sthi.l r0, -2, r1
-
-sthil7:
- sthi.l r0, -3, r1
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/sthiq.cgs b/sim/testsuite/sim/sh64/media/sthiq.cgs
deleted file mode 100644
index 6310d43e5ad..00000000000
--- a/sim/testsuite/sim/sh64/media/sthiq.cgs
+++ /dev/null
@@ -1,79 +0,0 @@
-# sh testcase for sthi.q $rm, $disp6, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
-
- movi 40, r0
- shlli r0, 8, r0
-
- movi 0x1020, r1
- shlli r1, 8, r1
- addi r1, 0x30, r1
- shlli r1, 8, r1
- addi r1, 0x40, r1
- shlli r1, 8, r1
- addi r1, 0x50, r1
- shlli r1, 8, r1
- addi r1, 0x60, r1
- shlli r1, 8, r1
- addi r1, 0x70, r1
- shlli r1, 8, r1
- addi r1, 0x80, r1
-
-sthiq1:
- sthi.q r0, 0, r1
-
-sthiq2:
- sthi.q r0, 1, r1
-
-sthiq3:
- sthi.q r0, 2, r1
-
-sthiq4:
- sthi.q r0, 3, r1
-
-sthiq5:
- sthi.q r0, 4, r1
-
-sthiq6:
- sthi.q r0, 5, r1
-
-sthiq7:
- sthi.q r0, 6, r1
-
-sthiq8:
- sthi.q r0, 7, r1
-
-sthiq9:
- sthi.q r0, -1, r1
-
-sthiq10:
- sthi.q r0, -2, r1
-
-sthiq11:
- sthi.q r0, -3, r1
-
-sthiq12:
- sthi.q r0, -4, r1
-
-sthiq13:
- sthi.q r0, -5, r1
-
-sthiq14:
- sthi.q r0, -6, r1
-
-sthiq15:
- sthi.q r0, -7, r1
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/stl.cgs b/sim/testsuite/sim/sh64/media/stl.cgs
deleted file mode 100644
index 8737e354c5b..00000000000
--- a/sim/testsuite/sim/sh64/media/stl.cgs
+++ /dev/null
@@ -1,26 +0,0 @@
-# sh testcase for st.l $rm, $disp10, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- movi -1, r7
- xori r7, 13, r7
- movi 40, r0
- shlli r0, 8, r0
-
-stl1:
- st.l r0, 0, r7
-
-stl2:
- st.l r0, 4, r7
-
-stl3:
- st.l r0, -4, r7
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/media/stlol.cgs b/sim/testsuite/sim/sh64/media/stlol.cgs
deleted file mode 100644
index f2d90552509..00000000000
--- a/sim/testsuite/sim/sh64/media/stlol.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for stlo.l $rm, $disp6, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global stlol
-stlol:
- stlo.l r0, 0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/stloq.cgs b/sim/testsuite/sim/sh64/media/stloq.cgs
deleted file mode 100644
index 35c84c255cc..00000000000
--- a/sim/testsuite/sim/sh64/media/stloq.cgs
+++ /dev/null
@@ -1,14 +0,0 @@
-# sh testcase for stlo.q $rm, $disp6, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
- .global stloq
-stloq:
- stlo.q r0, 0, r0
-
- pass
diff --git a/sim/testsuite/sim/sh64/media/stq.cgs b/sim/testsuite/sim/sh64/media/stq.cgs
deleted file mode 100644
index e1af7956b84..00000000000
--- a/sim/testsuite/sim/sh64/media/stq.cgs
+++ /dev/null
@@ -1,26 +0,0 @@
-# sh testcase for st.q $rm, $disp10, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- movi -1, r7
- xori r7, 13, r7
- movi 40, r0
- shlli r0, 8, r0
-
-stq1:
- st.q r0, 0, r7
-
-stq2:
- st.q r0, 8, r7
-
-stq3:
- st.q r0, -8, r7
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/media/stw.cgs b/sim/testsuite/sim/sh64/media/stw.cgs
deleted file mode 100644
index 2446aa62795..00000000000
--- a/sim/testsuite/sim/sh64/media/stw.cgs
+++ /dev/null
@@ -1,26 +0,0 @@
-# sh testcase for st.q $rm, $disp10, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- movi -1, r7
- xori r7, 13, r7
- movi 40, r0
- shlli r0, 8, r0
-
-stw1:
- st.w r0, 0, r7
-
-stw2:
- st.w r0, 2, r7
-
-stw3:
- st.w r0, -2, r7
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/media/stxb.cgs b/sim/testsuite/sim/sh64/media/stxb.cgs
deleted file mode 100644
index 8ab2ae31d23..00000000000
--- a/sim/testsuite/sim/sh64/media/stxb.cgs
+++ /dev/null
@@ -1,29 +0,0 @@
-# sh testcase for stx.b $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- movi -1, r7
- xori r7, 13, r7
- movi 40, r0
- shlli r0, 8, r0
-
-stxb1:
- movi 0, r1
- stx.b r0, r1, r7
-
-stxb2:
- movi 1, r1
- stx.b r0, r1, r7
-
-stxb3:
- movi -1, r1
- stx.b r0, r1, r7
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/media/stxl.cgs b/sim/testsuite/sim/sh64/media/stxl.cgs
deleted file mode 100644
index 8ed2e366ab3..00000000000
--- a/sim/testsuite/sim/sh64/media/stxl.cgs
+++ /dev/null
@@ -1,29 +0,0 @@
-# sh testcase for stx.l $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- movi -1, r7
- xori r7, 13, r7
- movi 40, r0
- shlli r0, 8, r0
-
-stxl1:
- movi 0, r1
- stx.l r0, r1, r7
-
-stxl2:
- movi 4, r1
- stx.l r0, r1, r7
-
-stxl3:
- movi -4, r1
- stx.l r0, r1, r7
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/media/stxq.cgs b/sim/testsuite/sim/sh64/media/stxq.cgs
deleted file mode 100644
index 10759fd4414..00000000000
--- a/sim/testsuite/sim/sh64/media/stxq.cgs
+++ /dev/null
@@ -1,29 +0,0 @@
-# sh testcase for stx.q $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- movi -1, r7
- xori r7, 13, r7
- movi 40, r0
- shlli r0, 8, r0
-
-stxq1:
- movi 0, r1
- stx.q r0, r1, r7
-
-stxq2:
- movi 8, r1
- stx.q r0, r1, r7
-
-stxq3:
- movi -8, r1
- stx.q r0, r1, r7
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/media/stxw.cgs b/sim/testsuite/sim/sh64/media/stxw.cgs
deleted file mode 100644
index d03981146a2..00000000000
--- a/sim/testsuite/sim/sh64/media/stxw.cgs
+++ /dev/null
@@ -1,29 +0,0 @@
-# sh testcase for stx.w $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- movi -1, r7
- xori r7, 13, r7
- movi 40, r0
- shlli r0, 8, r0
-
-stxw1:
- movi 0, r1
- stx.w r0, r1, r7
-
-stxw2:
- movi 2, r1
- stx.w r0, r1, r7
-
-stxw3:
- movi -2, r1
- stx.w r0, r1, r7
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/media/sub.cgs b/sim/testsuite/sim/sh64/media/sub.cgs
deleted file mode 100644
index e5e7530100b..00000000000
--- a/sim/testsuite/sim/sh64/media/sub.cgs
+++ /dev/null
@@ -1,42 +0,0 @@
-# sh testcase for sub $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
- movi 0, r0
- movi 1, r1
-
-sub1:
- # 0 - 0 = 0.
- sub r0, r0, r2
- bnei r2, 0, tr0
-
-sub2:
- # 1 - 0 = 1.
- sub r1, r0, r2
- bnei r2, 1, tr0
-
-sub3:
- # 0 - 1 = -1.
- sub r0, r1, r2
- addi r2, 1, r2
- bnei r2, 0, tr0
-
-sub4:
- # 5 - 2 = 3.
- movi 5, r0
- movi 2, r1
- sub r0, r1, r2
- bnei r2, 3, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/subl.cgs b/sim/testsuite/sim/sh64/media/subl.cgs
deleted file mode 100644
index 98abe59f666..00000000000
--- a/sim/testsuite/sim/sh64/media/subl.cgs
+++ /dev/null
@@ -1,38 +0,0 @@
-# sh testcase for sub.l $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-
-init:
- pta wrong, tr0
-
-subl1:
- # Test that the top 32 bits are ignored.
- movi 1, r0
- shlli r0, 32, r0
- ori r0, 7, r0
-
- movi 1, r1
- shlli r1, 32, r1
- ori r1, 2, r1
-
- sub.l r0, r1, r2
- bnei r2, 5, tr0
-
-subl2:
- # Test that 0 - 1 is sign extended.
- movi 0, r0
- movi 1, r1
- sub.l r0, r1, r2
- addi r2, 1, r2
- bnei r2, 0, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/media/swapq.cgs b/sim/testsuite/sim/sh64/media/swapq.cgs
deleted file mode 100644
index 6f168b1ff48..00000000000
--- a/sim/testsuite/sim/sh64/media/swapq.cgs
+++ /dev/null
@@ -1,36 +0,0 @@
-# sh testcase for swap.q $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- movi 10, r0
- shlli r0, 8, r0
- ori r0, 20, r0
- shlli r0, 8, r0
- ori r0, 30, r0
- shlli r0, 8, r0
- ori r0, 40, r0
- shlli r0, 8, r0
- ori r0, 50, r0
- shlli r0, 8, r0
- ori r0, 60, r0
- shlli r0, 8, r0
- ori r0, 70, r0
- shlli r0, 8, r0
- ori r0, 80, r0
-
- # Set up two address operands.
-
- movi 40, r1
- shlli r1, 8, r1
- movi 8, r2
-
-swapq:
- swap.q r1, r2, r0
-
-okay:
- pass
diff --git a/sim/testsuite/sim/sh64/media/synci.cgs b/sim/testsuite/sim/sh64/media/synci.cgs
deleted file mode 100644
index 65e06213a50..00000000000
--- a/sim/testsuite/sim/sh64/media/synci.cgs
+++ /dev/null
@@ -1,10 +0,0 @@
-# sh testcase for synci -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
- synci
- pass
diff --git a/sim/testsuite/sim/sh64/media/synco.cgs b/sim/testsuite/sim/sh64/media/synco.cgs
deleted file mode 100644
index 2db6df343d4..00000000000
--- a/sim/testsuite/sim/sh64/media/synco.cgs
+++ /dev/null
@@ -1,10 +0,0 @@
-# sh testcase for synco -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
- synco
- pass
diff --git a/sim/testsuite/sim/sh64/media/testutils.inc b/sim/testsuite/sim/sh64/media/testutils.inc
deleted file mode 100644
index d3b383a1efb..00000000000
--- a/sim/testsuite/sim/sh64/media/testutils.inc
+++ /dev/null
@@ -1,51 +0,0 @@
-# Support macros for the assembly test cases.
-
- .macro start
- .text
- .global start
-start:
- .endm
-
- .macro pass
- movi 253, r0
- trapa r0
- .endm
-
- .macro fail
- movi 254, r0
- trapa r0
- .endm
-
- .macro _packb v1 v2 v3 v4 v5 v6 v7 v8 reg
- movi \v1, \reg
- shlli \reg, 8, \reg
- addi \reg, \v2, \reg
- shlli \reg, 8, \reg
- addi \reg, \v3, \reg
- shlli \reg, 8, \reg
- addi \reg, \v4, \reg
- shlli \reg, 8, \reg
- addi \reg, \v5, \reg
- shlli \reg, 8, \reg
- addi \reg, \v6, \reg
- shlli \reg, 8, \reg
- addi \reg, \v7, \reg
- shlli \reg, 8, \reg
- addi \reg, \v8, \reg
- .endm
-
- .macro _packw v1 v2 v3 v4 reg
- movi \v1, \reg
- shlli \reg, 16, \reg
- addi \reg, \v2, \reg
- shlli \reg, 16, \reg
- addi \reg, \v3, \reg
- shlli \reg, 16, \reg
- addi \reg, \v4, \reg
- .endm
-
- .macro _packl v1 v2 reg
- movi \v1, \reg
- shlli \reg, 32, \reg
- addi \reg, \v2, \reg
- .endm
diff --git a/sim/testsuite/sim/sh64/media/trapa.cgs b/sim/testsuite/sim/sh64/media/trapa.cgs
deleted file mode 100644
index c961bac73ba..00000000000
--- a/sim/testsuite/sim/sh64/media/trapa.cgs
+++ /dev/null
@@ -1,11 +0,0 @@
-# sh testcase for trapa $rm -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
- # This performs a trap to emit "pass".
- movi 253, r0
- trapa r0
diff --git a/sim/testsuite/sim/sh64/media/xor.cgs b/sim/testsuite/sim/sh64/media/xor.cgs
deleted file mode 100644
index 80278f0a3e0..00000000000
--- a/sim/testsuite/sim/sh64/media/xor.cgs
+++ /dev/null
@@ -1,54 +0,0 @@
-# sh testcase for xor $rm, $rn, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- pta wrong, tr0
-
-xor1:
- # 0 xor 0 = 0.
- movi 0, r0
- movi 0, r1
- xor r0, r1, r2
- bnei r2, 0, tr0
-
-xor2:
- # 0 xor 1 = 1.
- movi 0, r0
- movi 1, r1
- xor r0, r1, r2
- bnei r2, 1, tr0
-
-xor3:
- # 1 xor 0 = 1.
- movi 1, r0
- movi 0, r1
- xor r0, r1, r2
- bnei r2, 1, tr0
-
-xor4:
- # 1 xor 1 = 0.
- movi 1, r0
- movi 1, r1
- xor r0, r1, r2
- bnei r2, 0, tr0
-
-xor5:
- movi 1, r0
- shlli r0, 63, r0
- ori r0, 1, r0
- movi 3, r1
- xor r0, r1, r2
- andi r2, 255, r2
- bnei r2, 2, tr0
-
-okay:
- pass
-
-wrong:
- fail
-
diff --git a/sim/testsuite/sim/sh64/media/xori.cgs b/sim/testsuite/sim/sh64/media/xori.cgs
deleted file mode 100644
index 0d4d96a779d..00000000000
--- a/sim/testsuite/sim/sh64/media/xori.cgs
+++ /dev/null
@@ -1,48 +0,0 @@
-# sh testcase for xori $rm, $imm6, $rd -*- Asm -*-
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
- .include "media/testutils.inc"
-
- start
-init:
- pta wrong, tr0
-
-xori1:
- # 0 xor 0 = 0.
- movi 0, r0
- xori r0, 0, r2
- bnei r2, 0, tr0
-
-xori2:
- # 0 xor 1 = 1.
- movi 0, r0
- xori r0, 1, r2
- bnei r2, 1, tr0
-
-xori3:
- # 1 xor 0 = 1.
- movi 1, r0
- xori r0, 0, r2
- bnei r2, 1, tr0
-
-xori4:
- # 1 xor 1 = 0.
- movi 1, r0
- xori r0, 1, r2
- bnei r2, 0, tr0
-
-xori5:
- movi 1, r0
- shlli r0, 63, r0
- ori r0, 1, r0
- xori r0, 3, r2
- andi r2, 255, r2
- bnei r2, 2, tr0
-
-okay:
- pass
-
-wrong:
- fail
diff --git a/sim/testsuite/sim/sh64/misc/fr-dr.s b/sim/testsuite/sim/sh64/misc/fr-dr.s
deleted file mode 100644
index 52f0e136638..00000000000
--- a/sim/testsuite/sim/sh64/misc/fr-dr.s
+++ /dev/null
@@ -1,22 +0,0 @@
-# sh testcase for floating point register shared state (see below).
-# mach: all
-# as: -isa=shmedia
-# ld: -m shelf64
-
-# (fr, dr, fp, fv amd mtrx provide different views of the same architecrual state).
-# Hitachi SH-5 CPU volume 1, p. 15.
-
- .include "media/testutils.inc"
-
- start
-
- movi 42, r0
- fmov.ls r0, fr12
- # save this reg.
- fmov.s fr12, fr14
-
- movi 42, r0
- fmov.qd r0, dr12
-
-okay:
- pass