summaryrefslogtreecommitdiff
path: root/gdb/gdbtk
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2002-01-08 20:21:44 +0000
committerKeith Seitz <keiths@redhat.com>2002-01-08 20:21:44 +0000
commit2c70c832278c536aabf6b42a4b6c179e268c89cd (patch)
tree0fbc180670d6dfc4aa79e282a001f89d4626cc9d /gdb/gdbtk
parent88c791960933f8e5538950150b83dab89aac3fe5 (diff)
downloadgdb-2c70c832278c536aabf6b42a4b6c179e268c89cd.tar.gz
* 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.
Diffstat (limited to 'gdb/gdbtk')
-rw-r--r--gdb/gdbtk/ChangeLog6
-rw-r--r--gdb/gdbtk/generic/gdbtk-cmds.c11
2 files changed, 14 insertions, 3 deletions
diff --git a/gdb/gdbtk/ChangeLog b/gdb/gdbtk/ChangeLog
index b96af3aa42c..d42ed0296b8 100644
--- a/gdb/gdbtk/ChangeLog
+++ b/gdb/gdbtk/ChangeLog
@@ -1,5 +1,11 @@
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".
diff --git a/gdb/gdbtk/generic/gdbtk-cmds.c b/gdb/gdbtk/generic/gdbtk-cmds.c
index 68badf5ad75..7cfd2177e57 100644
--- a/gdb/gdbtk/generic/gdbtk-cmds.c
+++ b/gdb/gdbtk/generic/gdbtk-cmds.c
@@ -1102,7 +1102,7 @@ gdb_find_file_command (clientData, interp, objc, objv)
Tcl_Obj *CONST objv[];
{
struct symtab *st;
- char *filename;
+ char *filename, *fullname;
if (objc != 2)
{
@@ -1120,14 +1120,19 @@ gdb_find_file_command (clientData, interp, objc, objv)
return TCL_ERROR;
}
+ if (st->fullname == NULL)
+ fullname = symtab_to_filename (st);
+ else
+ fullname = st->fullname;
+
/* We may not be able to open the file (not available). */
- if (!st->fullname)
+ if (fullname == NULL)
{
Tcl_SetStringObj (result_ptr->obj_ptr, "", -1);
return TCL_OK;
}
- Tcl_SetStringObj (result_ptr->obj_ptr, st->fullname, -1);
+ Tcl_SetStringObj (result_ptr->obj_ptr, fullname, -1);
return TCL_OK;
}