diff options
author | Jim Ingham <jingham@apple.com> | 1998-06-16 19:36:47 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 1998-06-16 19:36:47 +0000 |
commit | 0436459d40b0b38114623e99ecb55b4428e2eee0 (patch) | |
tree | 0a9623c894dab6753f86989050f49c32aa7f08ae /gdb | |
parent | 702968c54b22f3d8df61f5a559d8c02f69d8e396 (diff) | |
download | gdb-0436459d40b0b38114623e99ecb55b4428e2eee0.zip gdb-0436459d40b0b38114623e99ecb55b4428e2eee0.tar.gz gdb-0436459d40b0b38114623e99ecb55b4428e2eee0.tar.bz2 |
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.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog-gdbtk | 7 | ||||
-rw-r--r-- | gdb/gdbtk.c | 12 |
2 files changed, 17 insertions, 2 deletions
diff --git a/gdb/ChangeLog-gdbtk b/gdb/ChangeLog-gdbtk index c4da2fb..ce9903f 100644 --- a/gdb/ChangeLog-gdbtk +++ b/gdb/ChangeLog-gdbtk @@ -1,3 +1,10 @@ +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 diff --git a/gdb/gdbtk.c b/gdb/gdbtk.c index 15e5ed1..b1da0ee 100644 --- a/gdb/gdbtk.c +++ b/gdb/gdbtk.c @@ -2127,6 +2127,7 @@ gdbtk_init ( argv0 ) struct cleanup *old_chain; char *lib, *gdbtk_lib, *gdbtk_lib_tmp, *gdbtk_file; int i, found_main; + Tcl_Obj *auto_path_elem, *auto_path_name; #ifndef WINNT struct sigaction action; static sigset_t nullsigmask = {0}; @@ -2379,9 +2380,14 @@ gdbtk_init ( argv0 ) found_main = 0; /* see if GDBTK_LIBRARY is a path list */ lib = strtok (gdbtk_lib_tmp, GDBTK_PATH_SEP); + auto_path_elem = Tcl_NewObj (); + auto_path_name = Tcl_NewStringObj ("auto_path", -1); + do { - if (Tcl_VarEval (interp, "lappend auto_path ", lib, NULL) != TCL_OK) + Tcl_SetStringObj (auto_path_elem, lib, -1); + if (Tcl_ObjSetVar2 (interp, auto_path_name, NULL, auto_path_elem, + TCL_GLOBAL_ONLY | TCL_LIST_ELEMENT ) == NULL) { fputs_unfiltered (Tcl_GetVar (interp, "errorInfo", 0), gdb_stderr); error (""); @@ -2399,7 +2405,9 @@ gdbtk_init ( argv0 ) while ((lib = strtok (NULL, ":")) != NULL); free (gdbtk_lib_tmp); - + Tcl_DecrRefCount(auto_path_elem); + Tcl_DecrRefCount(auto_path_name); + if (!found_main) { /* Try finding it with the auto path. */ |