+2001-04-12 Nicholas Duffek <nsd@redhat.com>
+
+ * generic/gdbtk-cmds.c (gdb_entry_point): New TCL command.
+ * library/interface.tcl (gdbtk_locate_main): Try the program's
+ entry point if no main function is found.
+
2001-04-10 Keith Seitz <keiths@cygnus.com>
From Tom Tromey (tromey@redhat.com):
static int gdb_confirm_quit (ClientData, Tcl_Interp *, int,
Tcl_Obj * CONST[]);
static int gdb_disassemble (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]);
+static int gdb_entry_point (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]);
static int gdb_eval (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]);
static int gdb_fetch_registers (ClientData, Tcl_Interp *, int,
Tcl_Obj * CONST[]);
NULL);
Tcl_CreateObjCommand (interp, "gdb_listfuncs", call_wrapper, gdb_listfuncs,
NULL);
+ Tcl_CreateObjCommand (interp, "gdb_entry_point", call_wrapper,
+ gdb_entry_point, NULL);
Tcl_CreateObjCommand (interp, "gdb_get_mem", call_wrapper, gdb_get_mem,
NULL);
Tcl_CreateObjCommand (interp, "gdb_stop", call_wrapper, gdb_stop, NULL);
return TCL_OK;
}
+/* This implements the TCL command gdb_entry_point. It returns the current
+ entry point address. */
+
+static int
+gdb_entry_point (clientData, interp, objc, objv)
+ ClientData clientData;
+ Tcl_Interp *interp;
+ int objc;
+ Tcl_Obj *CONST objv[];
+{
+ char *addrstr;
+
+ addrstr = paddr_nz (entry_point_address ());
+ Tcl_SetStringObj (result_ptr->obj_ptr, addrstr, -1);
+ return TCL_OK;
+}
+
/* This implements the Tcl command 'gdb_get_mem', which
* dumps a block of memory
* Arguments: