~ chicken-core (chicken-5) 239cec609e63172ac9fd0a72cf70357433a0bbf8
commit 239cec609e63172ac9fd0a72cf70357433a0bbf8
Author: felix <felix@call-with-current-continuation.org>
AuthorDate: Sun Apr 22 16:00:08 2018 +0200
Commit: Kooda <kooda@upyum.com>
CommitDate: Tue May 1 19:31:29 2018 +0200
Lookup the argument for the executable in feathers.
Also enable text widget in case error message is printed on startup.
Signed-off-by: felix <felix@call-with-current-continuation.org>
Signed-off-by: Kooda <kooda@upyum.com>
diff --git a/feathers.mdoc b/feathers.mdoc
index ccfd9efa..01f8169b 100644
--- a/feathers.mdoc
+++ b/feathers.mdoc
@@ -48,6 +48,11 @@ environment variable
which holds a connection address of the form
.Ao ADDRESS Ac : Ns Ao PORT Ac .
.Pp
+.Ar PROGRAM
+must give the path to the executable that is to be run,
+.Ev PATH
+is not searched.
+.Pp
The program accepts following arguments:
.Bl -tag -width Ds
.It Fl help
diff --git a/feathers.tcl b/feathers.tcl
old mode 100644
new mode 100755
index 1d896daa..0ad41c40
--- a/feathers.tcl
+++ b/feathers.tcl
@@ -700,7 +700,17 @@ proc RunProcess {{prg ""}} {
if {$program_name == ""} return
- lappend search_path [file dirname [lindex $program_name 0]]
+ set args [lassign $program_name prgfname]
+ set prgfname [file normalize $prgfname]
+
+ if {![file exists $prgfname]} {
+ .t configure -state normal
+ .t insert end "Could not start program:\n\nfile `$prgfname' does not exist"
+ .t see end
+ .t configure -state disabled
+ }
+
+ lappend search_path [file dirname $prgfname]
set reply_queue {}
set data_queue {}
set bp_queue {}
@@ -728,8 +738,11 @@ proc RunProcess {{prg ""}} {
.data.t delete [.data.t children $arguments_item_id]
}
- if {[catch {eval exec $program_name <@ stdin >@ stdout 2>@ stderr &} result]} {
+ if {[catch {eval exec $prgfname {*}$args <@ stdin >@ stdout 2>@ stderr &} result]} {
+ .t configure -state normal
.t insert end "Could not start program:\n\n$result"
+ .t see end
+ .t configure -state disabled
} else {
set process_id $result
}
@@ -1886,8 +1899,6 @@ if {$program_name != ""} {
# - setting breakpoints on yet unregistered (i.e. dynamically loaded) files
# is not possible - a file must be registered first
# - check whether "listening" check works
-# - backport to chicken4
-# - feature ("dbg-client")
# - when retrieved data is wrong, clear queues
# - must watched globals be mangled, when qualified? (GET_GLOBAL)
# - dview: monospace font (needs tags, it seems)
Trap