* gdbtk.c (gdb_get_breakpoint_info): Return error if breakpoint
type is not bp_breakpoint.
This commit is contained in:
parent
34c40fd7e8
commit
9468f8aa3e
2 changed files with 8 additions and 14 deletions
|
@ -1,5 +1,8 @@
|
||||||
Wed Mar 8 16:12:21 1995 Stu Grossman (grossman@cygnus.com)
|
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
|
* source.c (forward_search_command reverse_search_command): Set
|
||||||
convenience variable $_ to be the line # of the match.
|
convenience variable $_ to be the line # of the match.
|
||||||
* symtab.c (decode_line_1): Allow convenience variables to be
|
* symtab.c (decode_line_1): Allow convenience variables to be
|
||||||
|
|
19
gdb/gdbtk.c
19
gdb/gdbtk.c
|
@ -205,12 +205,9 @@ gdb_get_breakpoint_info (clientData, interp, argc, argv)
|
||||||
if (b->number == bpnum)
|
if (b->number == bpnum)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (!b)
|
if (!b || b->type != bp_breakpoint)
|
||||||
error ("Breakpoint #%d does not exist", bpnum);
|
error ("Breakpoint #%d does not exist", bpnum);
|
||||||
|
|
||||||
if (b->type != bp_breakpoint)
|
|
||||||
return;
|
|
||||||
|
|
||||||
sal = find_pc_line (b->address, 0);
|
sal = find_pc_line (b->address, 0);
|
||||||
|
|
||||||
Tcl_DStringAppendElement (result_ptr, symtab_to_filename (sal.symtab));
|
Tcl_DStringAppendElement (result_ptr, symtab_to_filename (sal.symtab));
|
||||||
|
@ -289,7 +286,6 @@ gdb_loc (clientData, interp, argc, argv)
|
||||||
char *argv[];
|
char *argv[];
|
||||||
{
|
{
|
||||||
char *filename;
|
char *filename;
|
||||||
char buf[100];
|
|
||||||
struct symtab_and_line sal;
|
struct symtab_and_line sal;
|
||||||
char *funcname;
|
char *funcname;
|
||||||
CORE_ADDR pc;
|
CORE_ADDR pc;
|
||||||
|
@ -329,11 +325,9 @@ gdb_loc (clientData, interp, argc, argv)
|
||||||
filename = symtab_to_filename (sal.symtab);
|
filename = symtab_to_filename (sal.symtab);
|
||||||
Tcl_DStringAppendElement (result_ptr, filename);
|
Tcl_DStringAppendElement (result_ptr, filename);
|
||||||
|
|
||||||
sprintf (buf, "%d", sal.line);
|
dsprintf_append_element (result_ptr, "%d", sal.line); /* line number */
|
||||||
Tcl_DStringAppendElement (result_ptr, buf); /* line number */
|
|
||||||
|
|
||||||
sprintf (buf, "0x%lx", pc);
|
dsprintf_append_element (result_ptr, "0x%lx", pc); /* PC */
|
||||||
Tcl_DStringAppendElement (result_ptr, buf); /* PC */
|
|
||||||
|
|
||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
}
|
}
|
||||||
|
@ -382,7 +376,6 @@ gdb_sourcelines (clientData, interp, argc, argv)
|
||||||
struct symtab *symtab;
|
struct symtab *symtab;
|
||||||
struct linetable_entry *le;
|
struct linetable_entry *le;
|
||||||
int nlines;
|
int nlines;
|
||||||
char buf[100];
|
|
||||||
|
|
||||||
if (argc != 2)
|
if (argc != 2)
|
||||||
error ("wrong # args");
|
error ("wrong # args");
|
||||||
|
@ -412,8 +405,7 @@ gdb_sourcelines (clientData, interp, argc, argv)
|
||||||
&& le->pc == (le + 1)->pc)
|
&& le->pc == (le + 1)->pc)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
sprintf (buf, "%d", le->line);
|
dsprintf_append_element (result_ptr, "%d", le->line);
|
||||||
Tcl_DStringAppendElement (result_ptr, buf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
|
@ -576,8 +568,7 @@ register_changed_p (regnum, argp)
|
||||||
memcpy (&old_regs[REGISTER_BYTE (regnum)], raw_buffer,
|
memcpy (&old_regs[REGISTER_BYTE (regnum)], raw_buffer,
|
||||||
REGISTER_RAW_SIZE (regnum));
|
REGISTER_RAW_SIZE (regnum));
|
||||||
|
|
||||||
sprintf (buf, "%d", regnum);
|
dsprintf_append_element (result_ptr, "%d", regnum);
|
||||||
Tcl_DStringAppendElement (result_ptr, buf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
Loading…
Reference in a new issue