diff options
author | Michael Snyder <msnyder@specifix.com> | 2008-06-10 00:13:15 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@specifix.com> | 2008-06-10 00:13:15 +0000 |
commit | ce119b4142eb7b70f580c8830fa2a1832b2de019 (patch) | |
tree | 9b8363b2417351934cd03581624454c5b122e1e4 /gdb/gdbtk/library/editor.tcl | |
parent | ea9e838749c0f6f20a7a12423efb0ef2a422e487 (diff) | |
download | gdb-drow-reverse-20070409-branch.tar.gz |
Daniel Jacobowitz' update to Michael Snyder's reverse debugging patchesdrow-reverse-20070409-branchcvs/drow-reverse-20070409-branch
Diffstat (limited to 'gdb/gdbtk/library/editor.tcl')
-rw-r--r-- | gdb/gdbtk/library/editor.tcl | 47 |
1 files changed, 0 insertions, 47 deletions
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 - } - } -} |