+Wed Nov 4 12:41:42 1998 Jim Ingham <jingham@cygnus.com>
+
+ * gdbtk-cmds.c (gdb_set_bp_addr): Pass the type, enable & thread
+ to gdbtk_tcl_breakpoint.
+ * gdbtk-hooks.c (gdbtk_trace_find): Added this function. It is
+ the hook function for tfind commands.
+ * tracepoint.c (trace_find_command): Added the trace_find_hook,
+ run when you do trace_find_command.
+ * tracepoint.h: Define the trace_find_hook.
+
1998-11-03 Keith Seitz <keiths@cygnus.com>
* v850ice.c (do_gdb): New function.
(ice_nexti): Use do_gdb to step properly.
(view_source): Correct call to src window's location for new version.
+Mon Nov 2 11:16:10 1998 Jim Ingham <jingham@cygnus.com>
+
+ * gdbtk-cmds (gdb_get_tracepoint_info): Demangle C++ function names.
+
+Fri Oct 30 11:22:23 1998 Jim Ingham <jingham@cygnus.com>
+
+ * gdbtk-cmds (gdb_get_tracepoint_info): Fixed typo.
+
Wed Oct 28 16:19:02 1998 Martin M. Hunt <hunt@cygnus.com>
* gdbtk-cmds.c (gdb_set_bp_addr): For callback, send full
pathname instead of just basename.
+Wed Oct 28 10:14:33 1998 Jim Ingham <jingham@cygnus.com>
+
+ * gdbtk-cmds.c: Made the bdtypes & bpdisp arrays shared so they
+ could be used in gdbtk-hooks.c (breakpoint_notify).
+ Also fixed a few error messages to actually print the bp number
+ rather that #%d...
+ * gdbtk-hooks.c (breakpoint_notify): pass more of the information
+ about the breakpoint into the Tcl command, so it does not have to
+ try and guess about information we have on the C side.
+ * gdbtk.h: Export the bptypes & pbdisp arrays.
+
1998-10-08 Keith Seitz <keiths@cygnus.com>
* gdbtk-hooks.c (gdbtk_add_hooks): Install a hook for
static char old_regs[REGISTER_BYTES];
+/* These two lookup tables are used to translate the type & disposition fields
+ of the breakpoint structure (respectively) into something gdbtk understands.
+ They are also used in gdbtk-hooks.c */
+
+char *bptypes[] = {"breakpoint", "hardware breakpoint", "until",
+ "finish", "watchpoint", "hardware watchpoint",
+ "read watchpoint", "access watchpoint",
+ "longjmp", "longjmp resume", "step resume",
+ "through sigtramp", "watchpoint scope",
+ "call dummy" };
+char *bpdisp[] = {"delete", "delstop", "disable", "donttouch"};
+
/*
* These are routines we need from breakpoint.c.
* at some point make these static in breakpoint.c and move GUI code there
struct tracepoint *tp;
struct action_line *al;
Tcl_Obj *action_list;
- char *filename, *funcname;
+ char *filename, *funcname, *fname;
char tmp[19];
if (objc != 2)
if (tp == NULL)
{
- Tcl_SetStringObj (result_ptr->obj_ptr, "Tracepoint #%d does not exist", -1);
+ char buff[64];
+ sprintf (buff, "Tracepoint #%d does not exist", tpnum);
+ Tcl_SetStringObj (result_ptr->obj_ptr, buff, -1);
return TCL_ERROR;
}
filename = "N/A";
Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr,
Tcl_NewStringObj (filename, -1));
+
find_pc_partial_function (tp->address, &funcname, NULL, NULL);
- Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr, Tcl_NewStringObj (funcname, -1));
+ fname = cplus_demangle (funcname, 0);
+ if (fname)
+ {
+ Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr, Tcl_NewStringObj
+ (fname, -1));
+ free (fname);
+ }
+ else
+ Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr, Tcl_NewStringObj
+ (funcname, -1));
+
Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr, Tcl_NewIntObj (sal.line));
sprintf (tmp, "0x%lx", tp->address);
Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr, Tcl_NewStringObj (tmp, -1));
cur_cmd = &text_cmd_1;
cur_prefix_len = prefix_len_1;
Tcl_DStringAppend (cur_cmd, line_num_buf, -1);
- Tcl_DStringAppend (cur_cmd, "} break_tag", 11);
+ Tcl_DStringAppend (cur_cmd, "} break_rgn_tag", 15);
}
else
{
}
else
{
- Tcl_DStringAppend (&text_cmd_1, " insert end {- } break_tag", -1);
+ Tcl_DStringAppend (&text_cmd_1, " insert end {- } break_rgn_tag", -1);
prefix_len_1 = Tcl_DStringLength(&text_cmd_1);
Tcl_DStringAppend (&text_cmd_2, " insert end { } \"\"", -1);
prefix_len_2 = Tcl_DStringLength(&text_cmd_2);
Tcl_DStringAppendElement (&cmd, buf);
Tcl_DStringAppendElement (&cmd, Tcl_GetStringFromObj (objv[2], NULL));
Tcl_DStringAppendElement (&cmd, Tcl_GetStringFromObj (objv[1], NULL));
+ Tcl_DStringAppendElement (&cmd, bpdisp[b->disposition]);
+ sprintf (buf, "%d", b->enable);
+ Tcl_DStringAppendElement (&cmd, buf);
+ sprintf (buf, "%d", b->thread);
+ Tcl_DStringAppendElement (&cmd, buf);
+
ret = Tcl_Eval (interp, Tcl_DStringValue (&cmd));
Tcl_DStringFree (&cmd);
if (objc != 4 && objc != 3)
{
- Tcl_WrongNumArgs(interp, 1, objv, "addr type [thread]");
+ Tcl_WrongNumArgs(interp, 1, objv, "addr type ?thread?");
return TCL_ERROR;
}
if (filename == NULL)
filename = "";
Tcl_DStringAppendElement (&cmd, filename);
+ Tcl_DStringAppendElement (&cmd, bpdisp[b->disposition]);
+ sprintf (buf, "%d", b->enable);
+ Tcl_DStringAppendElement (&cmd, buf);
+ sprintf (buf, "%d", b->thread);
+ Tcl_DStringAppendElement (&cmd, buf);
ret = Tcl_Eval (interp, Tcl_DStringValue (&cmd));
Tcl_DStringFree (&cmd);
Tcl_Obj *CONST objv[];
{
struct symtab_and_line sal;
- static char *bptypes[] = {"breakpoint", "hardware breakpoint", "until",
- "finish", "watchpoint", "hardware watchpoint",
- "read watchpoint", "access watchpoint",
- "longjmp", "longjmp resume", "step resume",
- "through sigtramp", "watchpoint scope",
- "call dummy" };
- static char *bpdisp[] = {"delete", "delstop", "disable", "donttouch"};
struct command_line *cmd;
int bpnum;
struct breakpoint *b;
if (!b || b->type != bp_breakpoint)
{
- Tcl_SetStringObj (result_ptr->obj_ptr, "Breakpoint #%d does not exist", -1);
+ char err_buf[64];
+ sprintf(err_buf, "Breakpoint #%d does not exist.", bpnum);
+ Tcl_SetStringObj (result_ptr->obj_ptr, err_buf, -1);
return TCL_ERROR;
}
static void gdbtk_create_tracepoint PARAMS ((struct tracepoint *));
static void gdbtk_delete_tracepoint PARAMS ((struct tracepoint *));
static void gdbtk_modify_tracepoint PARAMS ((struct tracepoint *));
+static void gdbtk_trace_find PARAMS ((char *arg, int from_tty));
static void gdbtk_create_breakpoint PARAMS ((struct breakpoint *));
static void gdbtk_delete_breakpoint PARAMS ((struct breakpoint *));
static void gdbtk_modify_breakpoint PARAMS ((struct breakpoint *));
create_tracepoint_hook = gdbtk_create_tracepoint;
delete_tracepoint_hook = gdbtk_delete_tracepoint;
modify_tracepoint_hook = gdbtk_modify_tracepoint;
+ trace_find_hook = gdbtk_trace_find;
pc_changed_hook = pc_changed;
selected_frame_level_changed_hook = gdbtk_selected_frame_changed;
if (filename == NULL)
filename = "";
- sprintf (buf, "gdbtk_tcl_breakpoint %s %d 0x%lx %d {%s}", action, b->number,
- (long)b->address, b->line_number, filename);
+ sprintf (buf, "gdbtk_tcl_breakpoint %s %d 0x%lx %d {%s} {%s} %d %d",
+ action, b->number, (long)b->address, b->line_number, filename,
+ bpdisp[b->disposition], b->enable, b->thread);
v = Tcl_Eval (gdbtk_interp, buf);
}
}
+/*
+ * gdbtk_trace_find
+ *
+ * This is run by the trace_find_command. arg is the argument that was passed
+ * to that command, from_tty is 1 if the command was run from a tty, 0 if it
+ * was run from a script. It runs gdbtk_tcl_tfind_hook passing on these two
+ * arguments.
+ *
+ */
+
+static void
+gdbtk_trace_find (arg, from_tty)
+ char *arg;
+ int from_tty;
+{
+ Tcl_Obj *cmdObj;
+
+ Tcl_GlobalEval (gdbtk_interp, "debug {***In gdbtk_trace_find...}");
+ cmdObj = Tcl_NewListObj (0, NULL);
+ Tcl_ListObjAppendElement (gdbtk_interp, cmdObj,
+ Tcl_NewStringObj ("gdbtk_tcl_trace_find_hook", -1));
+ Tcl_ListObjAppendElement (gdbtk_interp, cmdObj, Tcl_NewStringObj (arg, -1));
+ Tcl_ListObjAppendElement (gdbtk_interp, cmdObj, Tcl_NewIntObj(from_tty));
+ Tcl_GlobalEvalObj (gdbtk_interp, cmdObj);
+
+}
+
static void
gdbtk_selected_frame_changed (level)
int level;