Wed Mar 8 16:12:21 1995 Stu Grossman (grossman@cygnus.com)
+ * gdbtk.c (gdb_get_breakpoint_info): Return error if breakpoint
+ type is not bp_breakpoint.
+
* source.c (forward_search_command reverse_search_command): Set
convenience variable $_ to be the line # of the match.
* symtab.c (decode_line_1): Allow convenience variables to be
if (b->number == bpnum)
break;
- if (!b)
+ if (!b || b->type != bp_breakpoint)
error ("Breakpoint #%d does not exist", bpnum);
- if (b->type != bp_breakpoint)
- return;
-
sal = find_pc_line (b->address, 0);
Tcl_DStringAppendElement (result_ptr, symtab_to_filename (sal.symtab));
char *argv[];
{
char *filename;
- char buf[100];
struct symtab_and_line sal;
char *funcname;
CORE_ADDR pc;
filename = symtab_to_filename (sal.symtab);
Tcl_DStringAppendElement (result_ptr, filename);
- sprintf (buf, "%d", sal.line);
- Tcl_DStringAppendElement (result_ptr, buf); /* line number */
+ dsprintf_append_element (result_ptr, "%d", sal.line); /* line number */
- sprintf (buf, "0x%lx", pc);
- Tcl_DStringAppendElement (result_ptr, buf); /* PC */
+ dsprintf_append_element (result_ptr, "0x%lx", pc); /* PC */
return TCL_OK;
}
struct symtab *symtab;
struct linetable_entry *le;
int nlines;
- char buf[100];
if (argc != 2)
error ("wrong # args");
&& le->pc == (le + 1)->pc)
continue;
- sprintf (buf, "%d", le->line);
- Tcl_DStringAppendElement (result_ptr, buf);
+ dsprintf_append_element (result_ptr, "%d", le->line);
}
return TCL_OK;
memcpy (&old_regs[REGISTER_BYTE (regnum)], raw_buffer,
REGISTER_RAW_SIZE (regnum));
- sprintf (buf, "%d", regnum);
- Tcl_DStringAppendElement (result_ptr, buf);
+ dsprintf_append_element (result_ptr, "%d", regnum);
}
static int