diff -Naur gdb-6.3/gdb/gdbtk/generic/gdbtk-cmds.c gdb-6.3-modified/gdb/gdbtk/generic/gdbtk-cmds.c --- gdb-6.3/gdb/gdbtk/generic/gdbtk-cmds.c 2005-05-15 21:49:09.000000000 -1100 +++ gdb-6.3-modified/gdb/gdbtk/generic/gdbtk-cmds.c 2005-05-16 23:20:03.338797451 -1100 @@ -2114,6 +2114,15 @@ if (objc == 1) { + /* This function can be called, before the target is properly + set-up, the following prevents an error, by trying to + read_pc when there is no pc to read. */ + if (!target_has_registers) + { + gdbtk_set_result (interp, "Target has no PC", -1); + return TCL_ERROR; + } + if (deprecated_selected_frame && (get_frame_pc (deprecated_selected_frame) != read_pc ())) {