summaryrefslogtreecommitdiff
path: root/gdb/gdbtk/generic/gdbtk-cmds.c
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/generic/gdbtk-cmds.c
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/generic/gdbtk-cmds.c')
-rw-r--r--gdb/gdbtk/generic/gdbtk-cmds.c11
1 files changed, 8 insertions, 3 deletions
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;
}