diff options
author | Martin Hunt <hunt@redhat.com> | 1999-01-29 09:46:26 +0000 |
---|---|---|
committer | Martin Hunt <hunt@redhat.com> | 1999-01-29 09:46:26 +0000 |
commit | 7c5c8a5e46518c9cfe89038434824ff955f90e44 (patch) | |
tree | 3e541877c73d5d8c4a4f30987697a664465332d7 /gdb | |
parent | 6925baeaa6402a694a73802aa96d790396ca021e (diff) | |
download | gdb-7c5c8a5e46518c9cfe89038434824ff955f90e44.zip gdb-7c5c8a5e46518c9cfe89038434824ff955f90e44.tar.gz gdb-7c5c8a5e46518c9cfe89038434824ff955f90e44.tar.bz2 |
1999-01-29 Martin Hunt <hunt@cygnus.com>
* gdbtk-cmds.c (gdb_get_breakpoint_info): When printing addresses,
do not rely on the format string "%lx" -- it does not exist for all
hosts. Use paddr instead.
(gdb_loadfile): Increase maximum line size to pass testsuite cases.
* gdbtk-hooks.c (gdbtk_add_hooks): Remove pc_changed_hook and
add register_changed_hook and memory_changed_hook.
(gdbtk_register_changed): New function.
(gdbtk_memory_changed): New function.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog-gdbtk | 10 | ||||
-rw-r--r-- | gdb/gdbtk-cmds.c | 4 | ||||
-rw-r--r-- | gdb/gdbtk-hooks.c | 19 |
3 files changed, 27 insertions, 6 deletions
diff --git a/gdb/ChangeLog-gdbtk b/gdb/ChangeLog-gdbtk index 84ec468..9bfc149 100644 --- a/gdb/ChangeLog-gdbtk +++ b/gdb/ChangeLog-gdbtk @@ -1,5 +1,15 @@ 1999-01-29 Martin Hunt <hunt@cygnus.com> + * gdbtk-cmds.c (gdb_get_breakpoint_info): When printing addresses, + do not rely on the format string "%lx" -- it does not exist for all + hosts. Use paddr instead. + (gdb_loadfile): Increase maximum line size to pass testsuite cases. + + * gdbtk-hooks.c (gdbtk_add_hooks): Remove pc_changed_hook and + add register_changed_hook and memory_changed_hook. + (gdbtk_register_changed): New function. + (gdbtk_memory_changed): New function. + * gdbtk.c (gdbtk_init): Create tcl warp_pointer command for use with testing. diff --git a/gdb/gdbtk-cmds.c b/gdb/gdbtk-cmds.c index 19311c6..40fc50a 100644 --- a/gdb/gdbtk-cmds.c +++ b/gdb/gdbtk-cmds.c @@ -2789,7 +2789,7 @@ gdb_loadfile (clientData, interp, objc, objv) Tcl_DStringAppend (&text_cmd_2, " insert end { \t", -1); prefix_len_2 = Tcl_DStringLength(&text_cmd_2); - while (fgets (line + 1, 980, fp)) + while (fgets (line + 1, 9980, fp)) { sprintf (line_num_buf, "%d", ln); if (ltable[ln >> 3] & (1 << (ln % 8))) @@ -3229,7 +3229,7 @@ gdb_get_breakpoint_info (clientData, interp, objc, objv) Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr, new_obj); Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr, Tcl_NewIntObj (b->line_number)); - sprintf_append_element_to_obj (result_ptr->obj_ptr, "0x%lx", b->address); + sprintf_append_element_to_obj (result_ptr->obj_ptr, "0x%s", paddr_nz(b->address)); Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr, Tcl_NewStringObj (bptypes[b->type], -1)); Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr, Tcl_NewBooleanObj(b->enable == enabled)); diff --git a/gdb/gdbtk-hooks.c b/gdb/gdbtk-hooks.c index f92beb9..2a2ffa0 100644 --- a/gdb/gdbtk-hooks.c +++ b/gdb/gdbtk-hooks.c @@ -110,7 +110,8 @@ static void gdbtk_flush PARAMS ((GDB_FILE *)); static void gdbtk_pre_add_symbol PARAMS ((char *)); static void gdbtk_print_frame_info PARAMS ((struct symtab *, int, int, int)); static void gdbtk_post_add_symbol PARAMS ((void)); -static void pc_changed PARAMS ((void)); +static void gdbtk_register_changed PARAMS ((int regno)); +static void gdbtk_memory_changed PARAMS ((CORE_ADDR addr, int len)); static void tracepoint_notify PARAMS ((struct tracepoint *, const char *)); static void gdbtk_selected_frame_changed PARAMS ((int)); static void gdbtk_context_change PARAMS ((int)); @@ -166,7 +167,8 @@ gdbtk_add_hooks(void) trace_find_hook = gdbtk_trace_find; trace_start_stop_hook = gdbtk_trace_start_stop; - pc_changed_hook = pc_changed; + register_changed_hook = gdbtk_register_changed; + memory_changed_hook = gdbtk_memory_changed; selected_frame_level_changed_hook = gdbtk_selected_frame_changed; context_hook = gdbtk_context_change; @@ -320,9 +322,18 @@ gdbtk_ignorable_warning (warning) } static void -pc_changed() +gdbtk_register_changed(regno) + int regno; { - Tcl_Eval (gdbtk_interp, "gdbtk_pc_changed"); + Tcl_Eval (gdbtk_interp, "gdbtk_register_changed"); +} + +static void +gdbtk_memory_changed(addr, len) + CORE_ADDR addr; + int len; +{ + Tcl_Eval (gdbtk_interp, "gdbtk_memory_changed"); } |