import gdb-2000-02-02 snapshot
This commit is contained in:
parent
6bb9f1226a
commit
8b93c6380e
@ -1,3 +1,13 @@
|
||||
2000-02-02 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* arm-tdep.c (arm_push_arguments): Fix passing of floating point
|
||||
arguments on dummy frames.
|
||||
|
||||
2000-02-02 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* arm-tdep.c (arm_pc_is_thumb_dummy): Account for large dummy frames.
|
||||
(arm_pop_frame): Account fr dummy frames (as opposed to real ones).
|
||||
|
||||
2000-02-01 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* remote.c (getpkt_sane): New function. It is the old getpkt(),
|
||||
@ -5,6 +15,11 @@
|
||||
(getpkt): New function. Wrapper for getpkt_sane(), so that return
|
||||
value can still be ignored.
|
||||
|
||||
Tue Feb 1 18:47:31 2000 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* top.c (print_gdb_version): Print ``UI_OUT'' when configured with
|
||||
UI_OUT.
|
||||
|
||||
Tue Feb 1 00:17:12 2000 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* ui-file.c, ui-file.h: Rename gdb-file.h, gdb-file.c. Rename
|
||||
@ -29,6 +44,7 @@ Tue Feb 1 00:17:12 2000 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
target.c, target.h, top.c, top.h, typeprint.c, typeprint.h,
|
||||
utils.c, v850ice.c, valprint.c, valprint.h, value.h,
|
||||
config/pa/tm-hppa.h: Update.
|
||||
* cli-out.c, cli-out.h, ui-out.c, ui-out.h, varobj.c: Update.
|
||||
|
||||
2000-01-31 Jason Molenda (jsm@bugshack.cygnus.com)
|
||||
|
||||
@ -117,6 +133,10 @@ Mon Jan 31 17:14:52 2000 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
* remote-rdi.c (arm_rdi_mourn_inferior): Make sure breakpoints
|
||||
are reinserted for another run.
|
||||
|
||||
2000-01-27 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* cli-out.c (cli_filed_string): Test for NULL string.
|
||||
|
||||
2000-01-27 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* infcmd.c (run_stack_dummy): Account for a random signal stopping
|
||||
@ -274,6 +294,11 @@ Thu Jan 13 23:34:17 EST 2000 Nicholas Duffek <nsd@cygnus.com>
|
||||
current thread, safely from within catch_errors().
|
||||
(gdb_thread_select): New function. Switch threads safely.
|
||||
(thread_command): Use gdb_thread_select().
|
||||
Include ui-out.h.
|
||||
(do_captured_list_thread_ids): New function.
|
||||
(gdb_list_thread_ids): New function.
|
||||
|
||||
* defs.h (gdb_thread_select, gdb_list_thread_ids): Export.
|
||||
|
||||
2000-01-11 Christopher Faylor <cgf@cygnus.com>
|
||||
|
||||
@ -329,6 +354,10 @@ Thu Jan 13 23:34:17 EST 2000 Nicholas Duffek <nsd@cygnus.com>
|
||||
(proc_modify_flag): add support for PR_KLC (kill on last close).
|
||||
(proc_[un]set_kill_on_last_close): new functions.
|
||||
|
||||
2000-01-07 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* infrun.c (normal_stop): Print out thread id when we stop.
|
||||
|
||||
2000-01-06 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* remote.c (remote_open_1): Fix message so it does not imply a
|
||||
|
484
gdb/ChangeLog-99
484
gdb/ChangeLog-99
@ -1,3 +1,10 @@
|
||||
Sun Dec 19 18:56:38 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* breakpoint.c (mention): Delete ui-out breakpoint code. Mention
|
||||
calls breakpoint_create_event and that, eventually, calls
|
||||
gdb_breakpoint_query which displays the breakpoint details.
|
||||
(hbreak_command_wrapper, thbreak_command_wrapper): Delete.
|
||||
|
||||
Wed Dec 29 17:41:11 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* breakpoint.c (create_breakpoints, parse_breapoint_sals,
|
||||
@ -70,7 +77,6 @@ Wed Dec 29 17:41:11 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
(TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT) define always true.
|
||||
* config/mips/nm-irix4.h: ditto.
|
||||
|
||||
|
||||
1999-12-21 Jim Blandy <jimb@cygnus.com>
|
||||
|
||||
* Makefile.in (elf_bfd_h): Look for elf-bfd.h in BFD_SRC, not
|
||||
@ -458,6 +464,22 @@ Sat Dec 11 17:52:03 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
* breakpoint.c (print_one_breakpoint): New function. Move
|
||||
breakpoint print code to here.
|
||||
(breakpoint_1): From here.
|
||||
(print_one_breakpoint): Merge in ui-out code.
|
||||
(print_one_breakpoint): Add local variabls ``stb'' and
|
||||
``old_chain''.
|
||||
(breakpoint_1): Use print_one_breakpoint when UI.
|
||||
(print_one_breakpoint): Print breakpoint type when UI.
|
||||
(breakpoint_1): Merge UI out code into non UI function.
|
||||
|
||||
* ui-out.c (make_cleanup_ui_out_stream_delete): New function. Wrap
|
||||
make_cleanup.
|
||||
(do_stream_delete): New function. Wrap ui_out_stream_delete.
|
||||
* ui-out.h (make_cleanup_ui_out_stream_delete): Declare.
|
||||
|
||||
Sat Dec 11 00:12:41 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* breakpoint.c (breakpoint_1): Clone breakpoint_1 creating UI
|
||||
and non-UI versions.
|
||||
|
||||
Mon Dec 6 20:31:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
@ -616,6 +638,11 @@ Fri Dec 3 17:38:06 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
Return size of packet or -1.
|
||||
(getpkt): Update. Pass in PBUFSIZ.
|
||||
|
||||
1999-12-02 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* breakpoint.c (print_it_typical): Print reason for stopping in
|
||||
case of bp_until.
|
||||
|
||||
Thu Dec 2 17:14:53 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* ser-pipe.c: Include <string.h> for memset().
|
||||
@ -637,6 +664,11 @@ Thu Dec 2 17:14:53 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* valops.c (value_assign): Clarify error message.
|
||||
|
||||
1999-12-01 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* stack.c (return_command_wrapper): New function, to export
|
||||
return_command().
|
||||
|
||||
1999-12-01 Christopher Faylor <cgf@cygnus.com>
|
||||
|
||||
* config/i386/tm-cygwin.h: Change tm-i386.h include back to tm-i386v.h.
|
||||
@ -743,6 +775,10 @@ Thu Dec 2 17:14:53 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
1999-11-29 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* infrun.c (print_stop_reason): Don't print end of stepping reason
|
||||
if we are in the middle of a multistep command (same condition as
|
||||
in normal_stop).
|
||||
|
||||
* breakpoint.c (bpstat_stop_status): Don't decrease hit_count
|
||||
in case of a wp that has not changed.
|
||||
|
||||
@ -792,6 +828,14 @@ Wed Nov 24 17:07:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
* Makefile.in (init.c): Add SUBDIR_INIT_FILES so that sub
|
||||
directories can hook in extra init files.
|
||||
|
||||
Wed Nov 24 11:41:01 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* ui-out.h (field_string_ftype, ui_out_field_string): Make string
|
||||
parameter const.
|
||||
* cli-out.c (cli_field_string): Update.
|
||||
* ui-out.c (uo_field_string, ui_out_field_string,
|
||||
default_field_string): Update.
|
||||
|
||||
1999-11-23 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* defs.h (show_load_progress): Export.
|
||||
@ -799,6 +843,8 @@ Wed Nov 24 17:07:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
* symfile.c (show_load_progress): New hook for download.
|
||||
(generic_load): Collect total size of executable to load.
|
||||
Call progress hook when downloading.
|
||||
Add output for ui case.
|
||||
(print_transfer_performance): Add output for ui case.
|
||||
|
||||
Thu Nov 18 11:54:24 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
@ -813,6 +859,10 @@ Wed Nov 17 17:01:06 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* Makefile.in (i386-tdep.o): Update list of dependencies.
|
||||
|
||||
1999-11-22 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* stack.c (print_frame_info_base): Adjust output for stepi/nexti case.
|
||||
|
||||
1999-11-22 Jim Blandy <jimb@cygnus.com>
|
||||
|
||||
* config/i386/tm-i386v.h (NUM_REGS, REGISTER_NAMES,
|
||||
@ -848,6 +898,10 @@ Thu Nov 18 18:12:48 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
(exec_file_attach), corefile.c (core_file_command,
|
||||
reopen_exec_file): Replace strdup with xstrdup.
|
||||
|
||||
* varobj.c (varobj_gen_name, c_name_of_child, c_value_of_variable,
|
||||
cplus_value_of_variable): Replace strdup with xstrdup.
|
||||
* ui-out.c (ui_out_table_begin): Ditto.
|
||||
|
||||
Mon Nov 22 12:02:47 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* bcache.c (print_bcache_statistics): Fix printf_filtered
|
||||
@ -967,6 +1021,20 @@ Wed Nov 17 17:40:30 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* remote-rdi.c: Fix indentation accordingly to GNU standards.
|
||||
|
||||
1999-11-11 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* breakpoint.h: Export {watch, awatch, rwatch}_command_wrapper().
|
||||
|
||||
* breakpoint.c (print_it_typical): Add output for bp_watchpoint,
|
||||
bp_hardware_watchpoint, read_watchpoint, access_watchpoint cases.
|
||||
(watchpoint_check): Add output for when the watchpoint goes out of
|
||||
scope.
|
||||
(mention): Add output for bp_watchpoint, bp_hardware_watchpoint,
|
||||
read_watchpoint, access_watchpointcases. Move end of list to end
|
||||
of function.
|
||||
({watch, awatch, rwatch}_command_wrapper): New functions, to
|
||||
export {watch, awatch, rwatch}_command().
|
||||
|
||||
Thu Oct 28 00:28:51 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* d10v-tdep.c (d10v_gdbarch_init): Make the d10v:ts3 the default.
|
||||
@ -1058,6 +1126,8 @@ Wed Nov 10 16:47:06 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* corefile.c (memory_error): Use mem_fileopen instead of
|
||||
tui_sfileopen. Don't call error_begin.
|
||||
* varobj.c (c_value_of_variable): Use mem_fileopen () and
|
||||
gdb_file_xstrdup() instead of strdup and tui_sfileopen.
|
||||
* remote-sim.c (gdb_os_error): Rewrite using verror. Don't call
|
||||
error_begin.
|
||||
|
||||
@ -1065,6 +1135,8 @@ Wed Nov 10 14:21:43 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* defs.h (gdb_file_xstrdup): New function.
|
||||
* utils.c (gdb_file_xstrdup, do_gdb_file_xstrdup): Implement.
|
||||
* ui-out.c (ui_out_stream_new): Simplify, XMALLOC doesn't return
|
||||
if malloc failed. Use mem_fileopen and gdb_file_xstrdup.
|
||||
|
||||
1999-11-09 Stan Shebs <shebs@andros.cygnus.com>
|
||||
|
||||
@ -1117,6 +1189,18 @@ Tue Nov 9 15:33:43 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* utils.c (floatformat_to_doublest): Fix conversion of denormals.
|
||||
|
||||
1999-11-08 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* breakpoint.c (hbreak_command_wrapper): New function, to export
|
||||
hbreak_command.
|
||||
(thbreak_command_wrapper): New function, to export thbreak_command.
|
||||
|
||||
* symtab.c (rbreak_command_wrapper): New function, to export
|
||||
rbreak_command.
|
||||
|
||||
* breakpoint.h (hbreak_command_wrapper, thbreak_command_wrapper,
|
||||
rbreak_command_wrapper): Export.
|
||||
|
||||
Mon Nov 8 20:14:13 1999 Andrew Cagney <cagney@amy.cygnus.com>
|
||||
|
||||
* remote.c (get_memory_read_packet_size): For moment limit read
|
||||
@ -1131,6 +1215,9 @@ Mon Nov 8 20:14:13 1999 Andrew Cagney <cagney@amy.cygnus.com>
|
||||
Mon Nov 8 18:18:07 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* defs.h, utils.c (gdb_file_deallocate): Delete.
|
||||
* varobj.c (varobj_get_type, c_value_of_variable): Use
|
||||
make_cleanup_gdb_file_delete.
|
||||
* ui-out.c (ui_out_stream_delete): Use gdb_file_delete.
|
||||
* corefile.c (memory_error): Use make_cleanup_gdb_file_delete.
|
||||
|
||||
* defs.h, utils.c (gdb_file_init_astring): Delete.
|
||||
@ -1139,6 +1226,8 @@ Mon Nov 8 18:18:07 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
gdb_file_get_strbuf.
|
||||
(tui_file_adjust_strbuf): Rename gdb_file_adjust_strbuf.
|
||||
* utils.c (error_stream, error_last_message): Update.
|
||||
* varobj.c (varobj_get_type, c_value_of_variable): Update.
|
||||
* ui-out.c (ui_out_field_stream): Update.
|
||||
|
||||
Mon Nov 8 16:28:00 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
@ -1226,6 +1315,10 @@ Sun Nov 7 18:09:54 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
(procfs_thread_alive): Remove unused variables, conditionalize
|
||||
vars declarations to eliminate compiler warnings.
|
||||
|
||||
1999-11-05 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* infcmd.c (print_return_value): Add output for UI.
|
||||
|
||||
Fri Nov 5 16:32:04 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* inferior.h (CALL_DUMMY_ADDRESS, CALL_DUMMY_START_OFFSET,
|
||||
@ -1265,10 +1358,20 @@ Fri Nov 5 16:32:04 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
(finish_command_continuation): Call print_return_value().
|
||||
(finish_command): Ditto.
|
||||
|
||||
1999-11-04 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* breakpoint.c (print_it_typical): Print reason for stopping in
|
||||
case of bp_finish.
|
||||
|
||||
1999-11-04 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* infrun.c (handle_inferior_event): Add calls to print_stop_reason()
|
||||
for end of stepping range cases.
|
||||
(print_stop_reason): Add output for END_STEPPING_RANGE, EXITED,
|
||||
SIGNAL_EXITED, SIGNAL_RECEIVED cases.
|
||||
|
||||
* breakpoint.c (print_it_typical): Add printing of stop reason for
|
||||
bp_breakpoint case.
|
||||
|
||||
Thu Nov 4 17:46:36 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
@ -1466,6 +1569,11 @@ Thu Nov 4 17:36:27 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
be unreliable above 9600), and the EPI Jeeni seems to run at
|
||||
38.4K.
|
||||
|
||||
1999-11-01 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* stack.c (print_frame_info_base): Do not change printing of stack
|
||||
frame info if not running with our interpreter.
|
||||
|
||||
1999-11-01 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
From Grant Edwards <grante@visi.com>:
|
||||
@ -1533,6 +1641,16 @@ Thu Nov 4 17:36:27 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* infcmd.c: Fix typo.
|
||||
|
||||
1999-10-28 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* stack.c (select_frame_command_wrapper): Fix typo.
|
||||
|
||||
* infcmd.c (interrupt_target_command_wrapper): Wrapper to allow use of
|
||||
static interrupt_target_command outside of file.
|
||||
|
||||
* stack.c (select_frame_command_wrapper): Wrapper to allow use of
|
||||
static select_frame_command outside of file.
|
||||
|
||||
1999-10-28 Jim Blandy <jimb@cygnus.com>
|
||||
|
||||
* gdbtypes.c (init_simd_type): The upper bound to
|
||||
@ -1618,6 +1736,14 @@ Thu Nov 4 17:36:27 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
* arm-tdep.c (THUMB_BE_BREAKPOINT): Change to 0xbebe.
|
||||
(THUMB_LE_BREAKPOINT): Change to 0xbebe.
|
||||
|
||||
1999-10-25 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* stack.c (print_frame_info_base): Don't print the arguments
|
||||
during a backtrace.
|
||||
* stack.c (print_frame_info_base): When setting source to 0, save
|
||||
and restore old value. Do this only if source is greater than
|
||||
zero.
|
||||
|
||||
Mon Oct 25 18:22:06 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* remote.c: Document future of compare_sections_command.
|
||||
@ -1644,6 +1770,12 @@ Sat Oct 23 16:39:34 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
* gdbarch.h (initialize_current_architecture): Declare.
|
||||
* gdbarch.c (initialize_current_architecture): New function.
|
||||
|
||||
1999-10-22 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* stack.c (print_frame_info_base): Check for value of source
|
||||
parameter equal to 2, and print address anyway. Set source to 0
|
||||
later, to avoid printing file & line info again.
|
||||
|
||||
1999-10-21 Michael Snyder <msnyder@cleaver.cygnus.com>
|
||||
|
||||
* utils.c (chars_per_line): fix typo in comment.
|
||||
@ -1691,6 +1823,9 @@ Sat Oct 23 16:39:34 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
1999-10-18 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* stack.c (print_frame_info_base): Add printing of list
|
||||
begin and end.
|
||||
|
||||
* breakpoint.h: Change return type of field print_it of struct
|
||||
bpstats to enumeration print_stop_action.
|
||||
Define new enumeration print_stop_action.
|
||||
@ -2158,6 +2293,13 @@ Thu Oct 7 19:24:05 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
error_last_message().
|
||||
* main.c (main): Add call to error_init().
|
||||
|
||||
1999-10-04 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* varobj.c (varobj_get_type): Call tui_sfileopen() instead of
|
||||
deprecated gdb_file_init_astream().
|
||||
(c_value_of_variable): Ditto.
|
||||
* ui-out.c (ui_out_stream_new): Ditto.
|
||||
|
||||
1999-10-04 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* utils.c (tui_sfileopen): New function. Replaces
|
||||
@ -2402,6 +2544,7 @@ Wed Sep 29 21:27:16 1999 Jeffrey A Law (law@cygnus.com)
|
||||
* remote-sim.c (gdbsim_create_inferior): Ditto.
|
||||
* target.c (target_link): Ditto.
|
||||
* win32-nat.c (child_create_inferior): Ditto.
|
||||
* varobj.c (varobj_create, new_root_variable): Ditto.
|
||||
|
||||
Thu Sep 30 10:36:19 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
@ -2737,6 +2880,16 @@ Thu Sep 23 20:48:22 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
than stdout, so they don't get mixed into the result stream from
|
||||
commands.
|
||||
|
||||
1999-09-23 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* varobj.c (varobj_set_value): Fix handling of baseclasses and
|
||||
correct the behavior when it is not a baseclass (both cases were
|
||||
dumping core).
|
||||
|
||||
1999-09-23 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* varobj.c (varobj_update): Fix setting of child error field.
|
||||
|
||||
1999-09-23 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* event-loop.c (poll_timers): Use correct timeval field names,
|
||||
@ -2744,6 +2897,12 @@ Thu Sep 23 20:48:22 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
(gdb_wait_for_event): Pass a pointer to the timeout structure to
|
||||
select(), not the structure.
|
||||
|
||||
1999-09-23 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* varobj.c (varobj_gen_name): Dynamically allocate variable object
|
||||
name string.
|
||||
(varobj_update): Fix creation of result list.
|
||||
|
||||
Wed Sep 22 10:35:32 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* Makefile.in (init.c): Change generated file to include "defs.h"
|
||||
@ -2760,6 +2919,27 @@ Wed Sep 22 10:35:32 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
* procfs.c (init_procinfo): move fltset initialization to caller.
|
||||
(do_attach, create_procinfo): initialize fltset.
|
||||
|
||||
1999-09-22 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* varobj.c (_initialize_varobj): Rename varobjdebug to debugvarobj
|
||||
to avoid conflict with "set var".
|
||||
|
||||
1999-09-22 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* varobj.c (varobj_get_type, c_value_of_variable): Remove
|
||||
dependency on ui_out.[ch].
|
||||
|
||||
1999-09-22 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* varobj.c (varobj_update): Fix order in which changed variables
|
||||
are reported to match that of the old code.
|
||||
|
||||
1999-09-22 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* varobj.c (type_changeable): Fix for testsuite case 2.12. Do not
|
||||
report as changed a structure when one of it's children has changed.
|
||||
(get_type, get_type_deref): Remove uneeded initialization.
|
||||
|
||||
1999-09-22 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* event-loop.c, event-top.c, event-loop.h: Rerun indent.
|
||||
@ -2768,6 +2948,18 @@ Wed Sep 22 10:35:32 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* m32r-stub.c (handle_exception): Fix typo in patch of 1999-08-26.
|
||||
|
||||
1999-09-21 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* varobj.c (_initialize_varobj): Add set/show for varobjdebug.
|
||||
(uninstall_variable): Test for varobjdebug before printing trace
|
||||
and send it to gdb_stdlog.
|
||||
|
||||
1999-09-21 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* varobj.c (c_type_of_child): Fix missing break, improve comment
|
||||
and add warning.
|
||||
(c_number_of_children): Add comment.
|
||||
|
||||
Tue Sep 21 14:55:29 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
From 1999-08-20 J.T. Conklin <jtc@redback.com>:
|
||||
@ -2775,10 +2967,54 @@ Tue Sep 21 14:55:29 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
inline as is done for the standard encoding.
|
||||
(remote_cisco_expand): Removed.
|
||||
|
||||
1999-09-20 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* varobj.c (varobj_update): Test for illegal invocation for
|
||||
non-root variable object.
|
||||
|
||||
1999-09-20 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* varobj.c (my_value_equal): Style. Eliminate side-effects.
|
||||
(varobj_update): Adjust calls to reflect the above change.
|
||||
|
||||
1999-09-20 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* varobj.c (c_value_of_variable): Fix return value for struct
|
||||
members when parent is a invalid pointer.
|
||||
|
||||
1999-09-20 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* event-loop.c: Include <sys/time.h>.
|
||||
|
||||
1999-09-20 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* varobj.c (cplus_number_of_children): Coding style improvement.
|
||||
(cplus_value_of_child): Ditto.
|
||||
|
||||
1999-09-20 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* varobj.c (c_name_of_child): Add missing default clause in switch
|
||||
statement.
|
||||
(c_type_of_child): Ditto.
|
||||
(varobj_set_value): Test for NULL type.
|
||||
|
||||
1999-09-20 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* varobj.c (varobj_set_value): Wrap call to evaluate_expression.
|
||||
|
||||
1999-09-20 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* varobj.c (format_string[]): Remove unused variable(s).
|
||||
(varobj_set_value): Ditto.
|
||||
(c_value_of_root): Ditto.
|
||||
(cplus_value_of_child): Ditto.
|
||||
|
||||
1999-09-20 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* varobj.c: Add missing header file include.
|
||||
(new_variable, new_root_variable): Fix prototype and header.
|
||||
(_initialize_varobj): Add prototype.
|
||||
|
||||
1999-09-20 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* ser-ocd.c: (ser_ocd_open, ser_ocd_raw, ser_ocd_readchar,
|
||||
@ -2827,6 +3063,10 @@ Mon Sep 20 17:00:06 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
of ``cleanup_sigint_signal_handler''.
|
||||
* Makefile.in (infrun.o): Add dependency on remote.h.
|
||||
|
||||
Mon Sep 20 16:15:29 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* ui-out.h (ui_out_test_flags): Add missing declaration.
|
||||
|
||||
Mon Sep 20 13:41:04 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* kod.c (ecos_kod_open, ecos_kod_request, ecos_kod_close,
|
||||
@ -2850,6 +3090,11 @@ Mon Sep 20 12:13:27 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
declaration. Make static.
|
||||
* event-top.c (rl_callback_read_char_wrapper): Ditto.
|
||||
|
||||
Mon Sep 20 10:54:19 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* Makefile.in (varobj.o): Disable warnings. Currently
|
||||
work-in-progress.
|
||||
|
||||
Fri Sep 17 19:28:17 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* source.c: Include "source.h".
|
||||
@ -2935,6 +3180,10 @@ Sat Sep 18 07:13:03 1999 Jeffrey A Law (law@cygnus.com)
|
||||
* hppa-tdep.c (in_solib_call_trampoline): Handle PA64 shared library
|
||||
trampolines.
|
||||
|
||||
1999-09-17 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* wrapper.h: Add missing define brackets.
|
||||
|
||||
1999-09-17 Jim Blandy <jimb@zwingli.cygnus.com>
|
||||
|
||||
* breakpoint.c (permanent_breakpoint_here_p): Delete.
|
||||
@ -2957,6 +3206,24 @@ Sat Sep 18 07:13:03 1999 Jeffrey A Law (law@cygnus.com)
|
||||
register width; pad aggregates smaller than eight bytes on the
|
||||
right.
|
||||
|
||||
1999-09-17 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* Makefile.in: Add entries for varobj.[cho] and wrapper.[cho].
|
||||
|
||||
1999-09-17 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* varobj.h: New file. GDB variable objects API.
|
||||
* varobj.c: New file. Implementation of the GDB variable objects
|
||||
API.
|
||||
|
||||
1999-09-17 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* wrapper.h: New file. Longjump free calls to gdb internal
|
||||
routines.
|
||||
* wrapper.c (gdb_evaluate_expression, wrap_evaluate_expression,
|
||||
gdb_value_fetch_lazy, wrap_value_fetch_lazy, gdb_value_equal,
|
||||
wrap_value_equal, gdb_value_ind, wrap_value_ind): New functions.
|
||||
|
||||
Thu Sep 16 17:33:35 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* remote.c (remote_async_open_1): Use SERIAL_ASYNC to
|
||||
@ -3101,8 +3368,6 @@ Tue Sep 14 14:34:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* defs.h (continuation): Make this a typedef.
|
||||
|
||||
* Makefile.in (gdbtk.o, gdbtk-cmds.o): Depend on $(top_h).
|
||||
|
||||
* Makefile.in (i386-linux-nat.o): Depend on symfile.h, not
|
||||
$(symfile_h); the latter has no definition.
|
||||
|
||||
@ -3146,8 +3411,6 @@ Tue Sep 14 14:34:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
__dld_break, which contains the permanent breakpoint, when interesting
|
||||
things happen. Tell GDB that the breakpoint in __dld_break is
|
||||
permanent.
|
||||
* gdbtk-cmds.c (gdb_get_breakpoint_info): Report a permanent
|
||||
breakpoint as enabled.
|
||||
* infrun.c (SKIP_PERMANENT_BREAKPOINT): Provide default definition.
|
||||
(default_skip_permanent_breakpoint): New function.
|
||||
(resume): If we're trying to resume at a permanent breakpoint, use
|
||||
@ -3319,6 +3582,12 @@ Mon Sep 13 17:51:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
* remote.c (_initialize_remote): Fix the specification of the
|
||||
"remote" prefix to set and show commands.
|
||||
|
||||
1999-09-09 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* command.c (print_doc_line): Update to use ui_out.
|
||||
(do_setshow_command): Ditto.
|
||||
(cmd_show_list): Ditto.
|
||||
|
||||
1999-09-09 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* event-loop.c (create_file_event): New function. Creates a gdb
|
||||
@ -4564,6 +4833,14 @@ Sun Aug 8 12:06:47 1999 Fred Fish <fnf@cygnus.com>
|
||||
Also move Z packet support OUTSIDE of REMOTE_BREAKPOINT ifdef,
|
||||
since this is not set for all targets that support the Z packet.
|
||||
|
||||
Sun Aug 8 17:24:09 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* ui-out.c (ui_out_table_begin, ui_out_table_body,
|
||||
ui_out_table_end, ui_out_table_header, ui_out_list_begin,
|
||||
ui_out_list_end, ui_out_stream_new, verify_field_proper_position,
|
||||
verify_field_alignment): Replace incorrect calls to error with
|
||||
calls to internal_error.
|
||||
|
||||
Fri Aug 6 17:17:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* defs.h (fatal): Delete declaration.
|
||||
@ -4786,6 +5063,14 @@ Wed Aug 4 10:42:58 1999 Fred Fish <fnf@cygnus.com>
|
||||
an array of 5 internal_auxent to leave room for bfd to
|
||||
write n_numaux entries. Change code to use the first one.
|
||||
|
||||
Wed Aug 4 19:58:15 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* ui-out.h (cli_out_new): Move declaration from here.
|
||||
* cli-out.h: To here. New file.
|
||||
* Makefile.in (ui-out.o): Add missing dependencies.
|
||||
(cli-out.o): Ditto.
|
||||
* top.c, cli-out.c: #include "cli-out.h".
|
||||
|
||||
1999-08-02 Stan Shebs <shebs@andros.cygnus.com>
|
||||
|
||||
* c-valprint.c (c_val_print): When printing decimal equivalent
|
||||
@ -4979,6 +5264,10 @@ Mon Jul 26 17:13:39 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* NEWS: Mention the new configs.
|
||||
|
||||
1999-07-15 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* ui-out.c (struct ui_out): Remove deprecated fields.
|
||||
|
||||
1999-07-15 Fernando Nasser <fnasser@cygnus.com>
|
||||
|
||||
* target.c (target_preopen): Prevent query when not from_tty.
|
||||
@ -4988,6 +5277,16 @@ Mon Jul 26 17:13:39 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* event-loop.c: Fix typo in comment.
|
||||
|
||||
1999-07-15 Fernando Nasser <fnasser@cygnus.com>
|
||||
|
||||
* breakpoint.c (breakpoint_1): Fix output when no breakpoins are
|
||||
found.
|
||||
|
||||
1999-07-15 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* event-top.c (display_gdb_prompt): Don't do anything if we are
|
||||
running under the interpreter.
|
||||
|
||||
Wed Jul 14 17:29:31 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* ser-pipe.c (struct pipe_state): Define.
|
||||
@ -5416,6 +5715,11 @@ Wed Jun 30 15:45:48 1999 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* main.c: Turn on async by default by setting async_p to 1.
|
||||
|
||||
Wed Jun 23 20:39:24 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* main.c (main): Recognize --ui. Will eventually replace
|
||||
--interpreter.
|
||||
|
||||
Wed Jun 23 15:44:39 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
From Jimmy Guo <guo@cup.hp.com>:
|
||||
@ -5488,6 +5792,22 @@ Wed Jun 23 15:30:46 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
is NULL, call find_proc_desc so we know how to restore
|
||||
the registers.
|
||||
|
||||
1999-06-16 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* cli-out.c (cli_out_new): Add flags argument to ui-out-new call.
|
||||
* source.c (print_source_lines_base): Test for ui_source_list flag
|
||||
and use ui_out for file and line output.
|
||||
* ui-out.c (struct ui_out): Add flags field to struct and to default
|
||||
initialization.
|
||||
(ui_out_set_flags): New function. Handle flags.
|
||||
(ui_out_clear_flags): New function. Ditto.
|
||||
(ui_out_test_flags): New function. Ditto.
|
||||
(ui_out_new): Add flags parameter.
|
||||
* ui-out.h: Add flags argument to ui_out_new declaration.
|
||||
Add declarations for ui_out_*_flags functions.
|
||||
(enum ui_flags): New enum. Defines ui_out flags.
|
||||
* top.c (gdb_init): Fix misspelling typo.
|
||||
|
||||
1999-06-15 Michael Snyder <msnyder@cleaver.cygnus.com>
|
||||
|
||||
* event-top.c (start_event_loop): call get_prompt.
|
||||
@ -5514,6 +5834,7 @@ Wed Jun 23 15:30:46 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
(read_command_lines): rename "prompt" to prompt_arg for clarity.
|
||||
(stop_sig): call get_prompt instead of reading prompt string directly.
|
||||
(command_loop): ditto.
|
||||
(simplified_command_loop): ditto.
|
||||
(gdb_prompt_escape): New variable. Esc char for prompt parameters.
|
||||
(get_prompt_1): New function, workhorse for get_prompt.
|
||||
(get_prompt): Completely rewrite. Add functionality for a
|
||||
@ -5546,6 +5867,10 @@ Sun Jun 13 10:44:13 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
Please examine your test suite output carefully, and report any
|
||||
problems to me.
|
||||
|
||||
1999-06-11 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* top.c (gdb_init): Add pre-processor test for UI_OUT.
|
||||
|
||||
1999-06-11 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* event-top.c (setup_event_loop): Change name to start_event_loop.
|
||||
@ -5570,6 +5895,57 @@ Fri Jun 11 18:34:33 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
(tui_file_rewind, tui_file_put): New functions.
|
||||
(tui_file_new): Add rewind and put.
|
||||
|
||||
* cli-out.c (cli_spaces): Replace gdb_stdout with data->stream.
|
||||
(cli_text, cli_message, cli_flush, out_field_fmt,
|
||||
field_separator): Ditto.
|
||||
|
||||
Fri Jun 11 16:08:37 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* cli-out.c (cli_out_new): Replace init_cli_out,
|
||||
* top.c (gdb_init): Call cli_out_new.
|
||||
* main.c (main): Delete call to set_ui_out_impl.
|
||||
|
||||
* ui-out.h (set_ui_out_impl, cli_ui_out_impl), ui-out.c: Delete.
|
||||
(cli_out_new): Add declaration. Will move later.
|
||||
|
||||
* ui-out.c (ui_out_new, ui_out_data), ui-out.h: New functions.
|
||||
(struct ui_out): Add field data.
|
||||
(ui_out_new): Replace init_ui_out_state.
|
||||
|
||||
* ui-out.c (XMALLOC): Define.
|
||||
(ui_out_stream_new, append_header_to_list): Use XMALLOC instead of
|
||||
xmalloc.
|
||||
* cli-out.c (XMALLOC): Define.
|
||||
|
||||
Fri Jun 11 10:31:29 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* ui-out.c (ui_out_field_int, ui_out_field_skip,
|
||||
ui_out_field_fmt): Rewrite statements to remove infix operators.
|
||||
|
||||
* ui-out.c (get_curr_header, verify_field_proper_position,
|
||||
verify_field_alignment, init_ui_out_state, set_ui_out_impl,
|
||||
append_header_to_list): Add explicit ui_out parameter.
|
||||
(struct ui_out): Move the local variables ``table_flag'',
|
||||
``body_flag'', ``table_columns'', ``table_id'', ``list_flat'',
|
||||
``field_count'', ``headerfirst'', ``headerlast'', ``headercurr''
|
||||
into this struct.
|
||||
(typedef ui_out_hdr): Delete.
|
||||
(struct ui_out_hdr): Rename struct _ui_out_hdr.
|
||||
(ui_out_table_begin, ui_out_table_end, ui_out_table_body,
|
||||
ui_out_table_header, ui_out_field_int, ui_out_list_begin,
|
||||
ui_out_table_end, ui_out_list_end, ui_out_field_skip,
|
||||
ui_out_table_body, ui_out_list_begin, ui_out_list_end,
|
||||
ui_out_field_string, ui_out_field_fmt, init_ui_out_state,
|
||||
verify_field_proper_position, verify_field_alignment,
|
||||
clear_header_list, append_header_to_list, _initialize_ui_out):
|
||||
Update.
|
||||
|
||||
* ui-out.h (typedef streambuf): Delete.
|
||||
(struct _streambuf): Rename to struct ui_stream.
|
||||
* breakpoint.c (breakpoint_1), stack.c (print_frame_info_base),
|
||||
printcmd.c (print_frame_args): Rename streambuf to struct
|
||||
ui_stream.
|
||||
|
||||
Fri Jun 11 15:10:32 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* d10v-tdep.c (d10v_push_arguments): Fix order of arguments passed
|
||||
@ -5697,6 +6073,14 @@ Thu Jun 10 20:04:02 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
mn10300-tdep.c: New function.
|
||||
* config/mn10300/tm-mn10300.h (SAVED_PC_AFTER_CALL): Update.
|
||||
|
||||
Wed Jun 9 16:42:16 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* top.h, top.c (simplified_command_loop): Make global.
|
||||
|
||||
* main.c (main): Delete call to call_interp_loop. Interpreters
|
||||
hook in using command_loop_hook.
|
||||
* top.c (call_interp_loop): Delete function.
|
||||
|
||||
1999-06-10 Keith Seitz <keiths@cygnus.com>
|
||||
|
||||
* mcore-rom.c (picobug_dumpregs): Return a value. Any value, it
|
||||
@ -5868,6 +6252,13 @@ Fri Jun 4 17:10:36 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
FP_REGNUM, PC_REGNUM, NUM_REGS, REGISTER_NAME.
|
||||
* d10v-tdep.c, config/d10v/tm-d10v.h: Update.
|
||||
|
||||
1999-06-03 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* printcmd.c (print_frame_args): Convert some of the output to use
|
||||
ui_out.
|
||||
* stack.c (print_frame_info_base): Adjust the call to the above
|
||||
function.
|
||||
|
||||
1999-06-03 Michael Snyder <msnyder@cleaver.cygnus.com>
|
||||
|
||||
* thread.c: eliminate the target_thread_vector (functionality
|
||||
@ -6088,6 +6479,21 @@ Tue Jun 1 10:45:24 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
d10v_register_convert_to_virtual, d10v_register_convert_to_raw):
|
||||
The new functions.
|
||||
|
||||
1999-05-31 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* breakpoint.c (print_it_normal): Convertion of part of the output
|
||||
to use ui-out.
|
||||
(mention): Same as above.
|
||||
* infcmd.c (run_command): Same.
|
||||
* source.c (print_source_lines_base): Same.
|
||||
* stack.c (print_frame_info_base): Same.
|
||||
|
||||
1999-05-31 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* breakpoint.c (breakpoint_1): Fix names of fields on ui_out
|
||||
produced output.
|
||||
* ui-out.h: Cosmetic change.
|
||||
|
||||
1999-05-31 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* stack.c (print_args_stub): Add missing stream parameter.
|
||||
@ -6098,6 +6504,21 @@ Mon May 31 15:50:08 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
* valops.c, value.h (default_push_arguments): Fix order of
|
||||
parameters to match PUSH_ARGUMENTS arguments.
|
||||
|
||||
1999-05-28 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* top.c (print_command_lines): Simplified script format for
|
||||
non-console output.
|
||||
|
||||
1999-05-28 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* top.c (print_command_lines): Fixed printing of if clauses.
|
||||
* breakpoint.c (breakpoint_1): Adjust call to the above.
|
||||
* top.c (show_user_1): Same as above.
|
||||
|
||||
1999-05-27 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* top.c (call_interp_loop): Correct build problem with UI_OUT defined.
|
||||
|
||||
Thu May 27 11:42:55 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* gdbarch.h (EXTRACT_STRUCT_VALUE_ADDRESS): Return 0.
|
||||
@ -6167,6 +6588,14 @@ Wed May 26 13:51:25 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
gdb_file_get_strbuf, gdb_file_adjust_strbuf, tui_file_flush):
|
||||
Verify ts_magic.
|
||||
|
||||
1999-05-25 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* top.c (print_command_lines): New function, fix bug in printing
|
||||
while commands and uses ui_out.
|
||||
* gdbcmd.c: Add prototype for the above.
|
||||
* breakpoint.c (breakpoint_1): Fix breakpoint script printing.
|
||||
* command.c (show_user_1): Fix user command script printing.
|
||||
|
||||
1999-05-25 Jim Blandy <jimb@zwingli.cygnus.com>
|
||||
|
||||
* breakpoint.c (insert_breakpoints, remove_breakpoint,
|
||||
@ -6217,6 +6646,9 @@ Tue May 25 13:01:43 1999 Andrew Cagney <cagney@amy.cygnus.com>
|
||||
* main.c (gdb_init): Move declaration from here.
|
||||
* top.h: To here.
|
||||
|
||||
* main.c (call_interp_loop): Move declaration from here.
|
||||
* top.h: To here.
|
||||
|
||||
* defs.h (init_page_info): Add declaration.
|
||||
|
||||
* top.c (initialize_utils): Move declaration from here.
|
||||
@ -6293,6 +6725,8 @@ Mon May 24 16:16:29 1999 Andrew Cagney <cagney@amy.cygnus.com>
|
||||
demangle.c (_initialize_demangler), maint.c
|
||||
(_initialize_maint_cmds), language.c (_initialize_language): Add
|
||||
external declaration.
|
||||
* ui-out.c (_initialize_ui_out), cli-out.c (_initialize_cli_out):
|
||||
Ditto.
|
||||
|
||||
Mon May 24 10:04:56 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
@ -6406,6 +6840,34 @@ Fri May 21 11:23:54 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* rs6000-tdep.c (rs6000_push_arguments): Rename push_arguments.
|
||||
|
||||
1999-05-21 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* breakpoint.c (breakpoint_1): Added ui_out output code but still
|
||||
uses old code by default.
|
||||
|
||||
1999-05-21 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* Makefile.in: Added ui-ou files.
|
||||
* main.c (main): Install cli_out by default.
|
||||
* ui-out.c (ui_out_table_begin): Use saved table id.
|
||||
|
||||
1999-05-21 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* ui-out.h: Export implementation vectors so they can be
|
||||
installed in main.c and top.c.
|
||||
|
||||
1999-05-21 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* ui-out.h: New file. Defines the ui_out API.
|
||||
* ui-out.c: New file. Implements the ui_out API abstraction only.
|
||||
* cli-out.c: New file. Implements low-level ui-out primitives for
|
||||
CLI-based interaction.
|
||||
|
||||
1999-05-20 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* top.c (simplified_command_loop): Reformat using GNU style.
|
||||
(call_interp_loop): Ditto.
|
||||
|
||||
Thu May 20 12:18:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* blockframe.c (get_prev_frame): Remove #ifdef around test for
|
||||
@ -6437,6 +6899,18 @@ Thu May 20 12:18:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
* event-loop.c: Ditto.
|
||||
* main.c: Ditto.
|
||||
|
||||
1999-05-20 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* top.c (simplified_command_loop): New function. It is just a
|
||||
bare minimal command_loop.
|
||||
(call_interp_loop): New function. Call the correct version of the
|
||||
command loop, with the appropriate input reading function,
|
||||
depending on which interpreter gdb was invoked with.
|
||||
|
||||
* main.c (main): Recognize and handle the new command line option
|
||||
--interpreter. If an interpreter is specified, call the appropriate
|
||||
command handling function.
|
||||
|
||||
1999-05-19 Keith Seitz <keiths@cygnus.com>
|
||||
|
||||
* config/mcore/tm-mcore.h (BELIEVE_PCC_PROMOTION): Define. We
|
||||
|
@ -229,7 +229,7 @@ CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE) \
|
||||
ADD_FILES = $(REGEX) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
|
||||
ADD_DEPS = $(REGEX1) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
|
||||
|
||||
VERSION = 20000201
|
||||
VERSION = 20000202
|
||||
DIST=gdb
|
||||
|
||||
LINT=/usr/5bin/lint
|
||||
@ -388,6 +388,8 @@ SFILES = ax-general.c ax-gdb.c bcache.c blockframe.c breakpoint.c \
|
||||
findvar.c gdbarch.c gdbtypes.c \
|
||||
inf-loop.c infcmd.c inflow.c infrun.c language.c \
|
||||
kod.c kod-cisco.c \
|
||||
ui-out.c cli-out.c \
|
||||
varobj.c wrapper.c \
|
||||
jv-exp.y jv-lang.c jv-valprint.c jv-typeprint.c \
|
||||
m2-exp.y m2-lang.c m2-typeprint.c m2-valprint.c main.c maint.c \
|
||||
mem-break.c minsyms.c mipsread.c nlmread.c objfiles.c parse.c \
|
||||
@ -464,6 +466,8 @@ event_top_h = event-top.h
|
||||
inf_loop_h = inf-loop.h
|
||||
remote_h = remote.h
|
||||
version_h = version.h
|
||||
ui_out_h = ui-out.h
|
||||
cli_out_h = cli-out.h
|
||||
|
||||
# Header files that need to have srcdir added. Note that in the cases
|
||||
# where we use a macro like $(gdbcmd_h), things are carefully arranged
|
||||
@ -529,6 +533,8 @@ COMMON_OBS = version.o blockframe.o breakpoint.o findvar.o stack.o thread.o \
|
||||
dbxread.o coffread.o elfread.o \
|
||||
dwarfread.o dwarf2read.o mipsread.o stabsread.o corefile.o \
|
||||
c-lang.o ch-exp.o ch-lang.o f-lang.o \
|
||||
ui-out.o cli-out.o \
|
||||
varobj.o wrapper.o \
|
||||
jv-lang.o jv-valprint.o jv-typeprint.o \
|
||||
m2-lang.o \
|
||||
scm-exp.o scm-lang.o scm-valprint.o complaints.o typeprint.o \
|
||||
@ -1729,4 +1735,11 @@ m2-exp.tab.o: m2-exp.tab.c $(defs_h) $(expression_h) $(gdbtypes_h) \
|
||||
|
||||
gdb-events.o: gdb-events.c gdb-events.h $(defs_h) $(gdbcmd_h)
|
||||
|
||||
ui-out.o: ui-out.c $(defs_h) $(ui_out_h) expression.h language.h
|
||||
cli-out.o: cli-out.c $(defs_h) $(ui_out_h) $(cli_out_h)
|
||||
varobj.o: varobj.c $(defs_h) $(frame_h) $(value_h) \
|
||||
$(language_h) valprint.h varobj.h
|
||||
$(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $<
|
||||
wrapper.o: wrapper.c $(defs_h) $(frame_h) $(value_h) wrapper.h
|
||||
|
||||
### end of the gdb Makefile.in.
|
||||
|
@ -103,6 +103,24 @@ struct frame_extra_info
|
||||
int framereg;
|
||||
};
|
||||
|
||||
#define SWAP_TARGET_AND_HOST(buffer,len) \
|
||||
do \
|
||||
{ \
|
||||
if (TARGET_BYTE_ORDER != HOST_BYTE_ORDER) \
|
||||
{ \
|
||||
char tmp; \
|
||||
char *p = (char *)(buffer); \
|
||||
char *q = ((char *)(buffer)) + len - 1; \
|
||||
for (; p < q; p++, q--) \
|
||||
{ \
|
||||
tmp = *q; \
|
||||
*q = *p; \
|
||||
*p = tmp; \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
/* Will a function return an aggregate type in memory or in a
|
||||
register? Return 0 if an aggregate type can be returned in a
|
||||
register, 1 if it must be returned in memory. */
|
||||
@ -252,8 +270,9 @@ int
|
||||
arm_pc_is_thumb_dummy (bfd_vma memaddr)
|
||||
{
|
||||
CORE_ADDR sp = read_sp ();
|
||||
CORE_ADDR fp = read_fp ();
|
||||
|
||||
if (PC_IN_CALL_DUMMY (memaddr, sp, sp + 64))
|
||||
if (PC_IN_CALL_DUMMY (memaddr, sp, fp))
|
||||
return caller_is_thumb;
|
||||
else
|
||||
return 0;
|
||||
@ -1227,10 +1246,22 @@ arm_push_arguments (int nargs, value_ptr * args, CORE_ADDR sp,
|
||||
calling the function. */
|
||||
if (TYPE_CODE_FLT == typecode && REGISTER_SIZE == len)
|
||||
{
|
||||
float f = *(float *) val;
|
||||
dbl_arg = f;
|
||||
val = (char *) &dbl_arg;
|
||||
float f;
|
||||
double d;
|
||||
char * bufo = (char *) &d;
|
||||
char * bufd = (char *) &dbl_arg;
|
||||
|
||||
len = sizeof (double);
|
||||
f = *(float *) val;
|
||||
SWAP_TARGET_AND_HOST (&f, sizeof (float)); /* adjust endianess */
|
||||
d = f;
|
||||
/* We must revert the longwords so they get loaded into the
|
||||
the right registers. */
|
||||
memcpy (bufd, bufo + len / 2, len / 2);
|
||||
SWAP_TARGET_AND_HOST (bufd, len / 2); /* adjust endianess */
|
||||
memcpy (bufd + len / 2, bufo, len / 2);
|
||||
SWAP_TARGET_AND_HOST (bufd + len / 2, len / 2); /* adjust endianess */
|
||||
val = (char *) &dbl_arg;
|
||||
}
|
||||
#if 1
|
||||
/* I don't know why this code was disable. The only logical use
|
||||
@ -1279,18 +1310,42 @@ arm_push_arguments (int nargs, value_ptr * args, CORE_ADDR sp,
|
||||
void
|
||||
arm_pop_frame (void)
|
||||
{
|
||||
struct frame_info *frame = get_current_frame ();
|
||||
int regnum;
|
||||
CORE_ADDR old_SP;
|
||||
struct frame_info *frame = get_current_frame ();
|
||||
|
||||
old_SP = read_register (frame->framereg);
|
||||
for (regnum = 0; regnum < NUM_REGS; regnum++)
|
||||
if (frame->fsr.regs[regnum] != 0)
|
||||
write_register (regnum,
|
||||
if (!PC_IN_CALL_DUMMY(frame->pc, frame->frame, read_fp()))
|
||||
{
|
||||
CORE_ADDR old_SP;
|
||||
|
||||
old_SP = read_register (frame->framereg);
|
||||
for (regnum = 0; regnum < NUM_REGS; regnum++)
|
||||
if (frame->fsr.regs[regnum] != 0)
|
||||
write_register (regnum,
|
||||
read_memory_integer (frame->fsr.regs[regnum], 4));
|
||||
|
||||
write_register (PC_REGNUM, FRAME_SAVED_PC (frame));
|
||||
write_register (SP_REGNUM, old_SP);
|
||||
write_register (PC_REGNUM, FRAME_SAVED_PC (frame));
|
||||
write_register (SP_REGNUM, old_SP);
|
||||
}
|
||||
else
|
||||
{
|
||||
CORE_ADDR sp;
|
||||
|
||||
sp = read_register (FP_REGNUM);
|
||||
sp -= sizeof(CORE_ADDR); /* we don't care about this first word */
|
||||
|
||||
write_register (PC_REGNUM, read_memory_integer (sp, 4));
|
||||
sp -= sizeof(CORE_ADDR);
|
||||
write_register (SP_REGNUM, read_memory_integer (sp, 4));
|
||||
sp -= sizeof(CORE_ADDR);
|
||||
write_register (FP_REGNUM, read_memory_integer (sp, 4));
|
||||
sp -= sizeof(CORE_ADDR);
|
||||
|
||||
for (regnum = 10; regnum >= 0; regnum--)
|
||||
{
|
||||
write_register (regnum, read_memory_integer (sp, 4));
|
||||
sp -= sizeof(CORE_ADDR);
|
||||
}
|
||||
}
|
||||
|
||||
flush_cached_frames ();
|
||||
}
|
||||
|
373
gdb/breakpoint.c
373
gdb/breakpoint.c
@ -39,6 +39,9 @@
|
||||
#include "annotate.h"
|
||||
#include "symfile.h"
|
||||
#include "objfiles.h"
|
||||
#ifdef UI_OUT
|
||||
#include "ui-out.h"
|
||||
#endif
|
||||
|
||||
#include "gdb-events.h"
|
||||
|
||||
@ -1888,6 +1891,12 @@ static enum print_stop_action
|
||||
print_it_typical (bs)
|
||||
bpstat bs;
|
||||
{
|
||||
#ifdef UI_OUT
|
||||
struct cleanup *old_chain;
|
||||
struct ui_stream *stb;
|
||||
stb = ui_out_stream_new (uiout);
|
||||
old_chain = make_cleanup ((make_cleanup_func) ui_out_stream_delete, stb);
|
||||
#endif /* UI_OUT */
|
||||
/* bs->breakpoint_at can be NULL if it was a momentary breakpoint
|
||||
which has since been deleted. */
|
||||
if (bs->breakpoint_at == NULL)
|
||||
@ -1897,11 +1906,19 @@ print_it_typical (bs)
|
||||
{
|
||||
case bp_breakpoint:
|
||||
case bp_hardware_breakpoint:
|
||||
#ifdef UI_OUT
|
||||
annotate_breakpoint (bs->breakpoint_at->number);
|
||||
ui_out_text (uiout, "\nBreakpoint ");
|
||||
ui_out_field_int (uiout, "bkptno", bs->breakpoint_at->number);
|
||||
ui_out_text (uiout, ", ");
|
||||
return PRINT_SRC_AND_LOC;
|
||||
#else
|
||||
/* I think the user probably only wants to see one breakpoint
|
||||
number, not all of them. */
|
||||
annotate_breakpoint (bs->breakpoint_at->number);
|
||||
printf_filtered ("\nBreakpoint %d, ", bs->breakpoint_at->number);
|
||||
return PRINT_SRC_AND_LOC;
|
||||
#endif
|
||||
break;
|
||||
|
||||
case bp_shlib_event:
|
||||
@ -2034,6 +2051,18 @@ print_it_typical (bs)
|
||||
if (bs->old_val != NULL)
|
||||
{
|
||||
annotate_watchpoint (bs->breakpoint_at->number);
|
||||
#ifdef UI_OUT
|
||||
mention (bs->breakpoint_at);
|
||||
ui_out_list_begin (uiout, "value");
|
||||
ui_out_text (uiout, "\nOld value = ");
|
||||
value_print (bs->old_val, stb->stream, 0, Val_pretty_default);
|
||||
ui_out_field_stream (uiout, "old", stb);
|
||||
ui_out_text (uiout, "\nNew value = ");
|
||||
value_print (bs->breakpoint_at->val, stb->stream, 0, Val_pretty_default);
|
||||
ui_out_field_stream (uiout, "new", stb);
|
||||
ui_out_list_end (uiout);
|
||||
ui_out_text (uiout, "\n");
|
||||
#else
|
||||
mention (bs->breakpoint_at);
|
||||
printf_filtered ("\nOld value = ");
|
||||
value_print (bs->old_val, gdb_stdout, 0, Val_pretty_default);
|
||||
@ -2041,6 +2070,7 @@ print_it_typical (bs)
|
||||
value_print (bs->breakpoint_at->val, gdb_stdout, 0,
|
||||
Val_pretty_default);
|
||||
printf_filtered ("\n");
|
||||
#endif
|
||||
value_free (bs->old_val);
|
||||
bs->old_val = NULL;
|
||||
}
|
||||
@ -2049,15 +2079,49 @@ print_it_typical (bs)
|
||||
break;
|
||||
|
||||
case bp_read_watchpoint:
|
||||
#ifdef UI_OUT
|
||||
mention (bs->breakpoint_at);
|
||||
ui_out_list_begin (uiout, "value");
|
||||
ui_out_text (uiout, "\nValue = ");
|
||||
value_print (bs->breakpoint_at->val, stb->stream, 0, Val_pretty_default);
|
||||
ui_out_field_stream (uiout, "value", stb);
|
||||
ui_out_list_end (uiout);
|
||||
ui_out_text (uiout, "\n");
|
||||
#else
|
||||
mention (bs->breakpoint_at);
|
||||
printf_filtered ("\nValue = ");
|
||||
value_print (bs->breakpoint_at->val, gdb_stdout, 0,
|
||||
Val_pretty_default);
|
||||
printf_filtered ("\n");
|
||||
#endif
|
||||
return PRINT_UNKNOWN;
|
||||
break;
|
||||
|
||||
case bp_access_watchpoint:
|
||||
#ifdef UI_OUT
|
||||
if (bs->old_val != NULL)
|
||||
{
|
||||
annotate_watchpoint (bs->breakpoint_at->number);
|
||||
mention (bs->breakpoint_at);
|
||||
ui_out_list_begin (uiout, "value");
|
||||
ui_out_text (uiout, "\nOld value = ");
|
||||
value_print (bs->old_val, stb->stream, 0, Val_pretty_default);
|
||||
ui_out_field_stream (uiout, "old", stb);
|
||||
value_free (bs->old_val);
|
||||
bs->old_val = NULL;
|
||||
ui_out_text (uiout, "\nNew value = ");
|
||||
}
|
||||
else
|
||||
{
|
||||
mention (bs->breakpoint_at);
|
||||
ui_out_field_string (uiout, "reason", "access-watchpoint-trigger");
|
||||
ui_out_text (uiout, "\nValue = ");
|
||||
}
|
||||
value_print (bs->breakpoint_at->val, stb->stream, 0,Val_pretty_default);
|
||||
ui_out_field_stream (uiout, "new", stb);
|
||||
ui_out_list_end (uiout);
|
||||
ui_out_text (uiout, "\n");
|
||||
#else
|
||||
if (bs->old_val != NULL)
|
||||
{
|
||||
annotate_watchpoint (bs->breakpoint_at->number);
|
||||
@ -2076,6 +2140,7 @@ print_it_typical (bs)
|
||||
value_print (bs->breakpoint_at->val, gdb_stdout, 0,
|
||||
Val_pretty_default);
|
||||
printf_filtered ("\n");
|
||||
#endif
|
||||
return PRINT_UNKNOWN;
|
||||
break;
|
||||
|
||||
@ -2083,7 +2148,13 @@ print_it_typical (bs)
|
||||
here. */
|
||||
|
||||
case bp_finish:
|
||||
return PRINT_UNKNOWN;
|
||||
break;
|
||||
|
||||
case bp_until:
|
||||
return PRINT_UNKNOWN;
|
||||
break;
|
||||
|
||||
case bp_none:
|
||||
case bp_longjmp:
|
||||
case bp_longjmp_resume:
|
||||
@ -2288,9 +2359,16 @@ watchpoint_check (p)
|
||||
in this case, by the time we call print_it_typical() this bp
|
||||
will be deleted already. So we have no choice but print the
|
||||
information here. */
|
||||
#ifdef UI_OUT
|
||||
ui_out_text (uiout, "\nWatchpoint ");
|
||||
ui_out_field_int (uiout, "wpnum", bs->breakpoint_at->number);
|
||||
ui_out_text (uiout, " deleted because the program has left the block in\n\
|
||||
which its expression is valid.\n");
|
||||
#else
|
||||
printf_filtered ("\
|
||||
Watchpoint %d deleted because the program has left the block in\n\
|
||||
which its expression is valid.\n", bs->breakpoint_at->number);
|
||||
#endif
|
||||
|
||||
if (b->related_breakpoint)
|
||||
b->related_breakpoint->disposition = del_at_next_stop;
|
||||
@ -3033,12 +3111,23 @@ print_one_breakpoint (struct breakpoint *b,
|
||||
{"del", "dstp", "dis", "keep"};
|
||||
static char bpenables[] = "nynny";
|
||||
char wrap_indent[80];
|
||||
#ifdef UI_OUT
|
||||
struct ui_stream *stb = ui_out_stream_new (uiout);
|
||||
struct cleanup *old_chain = make_cleanup_ui_out_stream_delete (stb);
|
||||
#endif
|
||||
|
||||
annotate_record ();
|
||||
#ifdef UI_OUT
|
||||
ui_out_list_begin (uiout, "bkpt");
|
||||
#endif
|
||||
|
||||
/* 1 */
|
||||
annotate_field (0);
|
||||
#ifdef UI_OUT
|
||||
ui_out_field_int (uiout, "number", b->number);
|
||||
#else
|
||||
printf_filtered ("%-3d ", b->number);
|
||||
#endif
|
||||
|
||||
/* 2 */
|
||||
annotate_field (1);
|
||||
@ -3046,15 +3135,28 @@ print_one_breakpoint (struct breakpoint *b,
|
||||
|| ((int) b->type != bptypes[(int) b->type].type))
|
||||
internal_error ("bptypes table does not describe type #%d.",
|
||||
(int) b->type);
|
||||
#ifdef UI_OUT
|
||||
ui_out_field_string (uiout, "type", bptypes[(int) b->type].description);
|
||||
#else
|
||||
printf_filtered ("%-14s ", bptypes[(int) b->type].description);
|
||||
#endif
|
||||
|
||||
/* 3 */
|
||||
annotate_field (2);
|
||||
#ifdef UI_OUT
|
||||
ui_out_field_string (uiout, "disp", bpdisps[(int) b->disposition]);
|
||||
#else
|
||||
printf_filtered ("%-4s ", bpdisps[(int) b->disposition]);
|
||||
#endif
|
||||
|
||||
/* 4 */
|
||||
annotate_field (3);
|
||||
#ifdef UI_OUT
|
||||
ui_out_field_fmt (uiout, "enabled", "%c", bpenables[(int) b->enable]);
|
||||
ui_out_spaces (uiout, 2);
|
||||
#else
|
||||
printf_filtered ("%-3c ", bpenables[(int) b->enable]);
|
||||
#endif
|
||||
|
||||
/* 5 and 6 */
|
||||
strcpy (wrap_indent, " ");
|
||||
@ -3073,8 +3175,16 @@ print_one_breakpoint (struct breakpoint *b,
|
||||
/* Field 4, the address, is omitted (which makes the columns
|
||||
not line up too nicely with the headers, but the effect
|
||||
is relatively readable). */
|
||||
#ifdef UI_OUT
|
||||
if (addressprint)
|
||||
ui_out_field_skip (uiout, "addr");
|
||||
annotate_field (5);
|
||||
print_expression (b->exp, stb->stream);
|
||||
ui_out_field_stream (uiout, "what", stb);
|
||||
#else
|
||||
annotate_field (5);
|
||||
print_expression (b->exp, gdb_stdout);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case bp_catch_load:
|
||||
@ -3082,11 +3192,28 @@ print_one_breakpoint (struct breakpoint *b,
|
||||
/* Field 4, the address, is omitted (which makes the columns
|
||||
not line up too nicely with the headers, but the effect
|
||||
is relatively readable). */
|
||||
#ifdef UI_OUT
|
||||
if (addressprint)
|
||||
ui_out_field_skip (uiout, "addr");
|
||||
annotate_field (5);
|
||||
if (b->dll_pathname == NULL)
|
||||
{
|
||||
ui_out_field_string (uiout, "what", "<any library>");
|
||||
ui_out_spaces (uiout, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui_out_text (uiout, "library \"");
|
||||
ui_out_field_string (uiout, "what", b->dll_pathname);
|
||||
ui_out_text (uiout, "\" ");
|
||||
}
|
||||
#else
|
||||
annotate_field (5);
|
||||
if (b->dll_pathname == NULL)
|
||||
printf_filtered ("<any library> ");
|
||||
else
|
||||
printf_filtered ("library \"%s\" ", b->dll_pathname);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case bp_catch_fork:
|
||||
@ -3094,34 +3221,74 @@ print_one_breakpoint (struct breakpoint *b,
|
||||
/* Field 4, the address, is omitted (which makes the columns
|
||||
not line up too nicely with the headers, but the effect
|
||||
is relatively readable). */
|
||||
#ifdef UI_OUT
|
||||
if (addressprint)
|
||||
ui_out_field_skip (uiout, "addr");
|
||||
annotate_field (5);
|
||||
if (b->forked_inferior_pid != 0)
|
||||
{
|
||||
ui_out_text (uiout, "process ");
|
||||
ui_out_field_int (uiout, "what", b->forked_inferior_pid);
|
||||
ui_out_spaces (uiout, 1);
|
||||
}
|
||||
#else
|
||||
annotate_field (5);
|
||||
if (b->forked_inferior_pid != 0)
|
||||
printf_filtered ("process %d ", b->forked_inferior_pid);
|
||||
break;
|
||||
#endif
|
||||
|
||||
case bp_catch_exec:
|
||||
/* Field 4, the address, is omitted (which makes the columns
|
||||
not line up too nicely with the headers, but the effect
|
||||
is relatively readable). */
|
||||
#ifdef UI_OUT
|
||||
if (addressprint)
|
||||
ui_out_field_skip (uiout, "addr");
|
||||
annotate_field (5);
|
||||
if (b->exec_pathname != NULL)
|
||||
{
|
||||
ui_out_text (uiout, "program \"");
|
||||
ui_out_field_string (uiout, "what", b->exec_pathname);
|
||||
ui_out_text (uiout, "\" ");
|
||||
}
|
||||
#else
|
||||
annotate_field (5);
|
||||
if (b->exec_pathname != NULL)
|
||||
printf_filtered ("program \"%s\" ", b->exec_pathname);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case bp_catch_catch:
|
||||
/* Field 4, the address, is omitted (which makes the columns
|
||||
not line up too nicely with the headers, but the effect
|
||||
is relatively readable). */
|
||||
#ifdef UI_OUT
|
||||
if (addressprint)
|
||||
ui_out_field_skip (uiout, "addr");
|
||||
annotate_field (5);
|
||||
ui_out_field_string (uiout, "what", "exception catch");
|
||||
ui_out_spaces (uiout, 1);
|
||||
#else
|
||||
annotate_field (5);
|
||||
printf_filtered ("exception catch ");
|
||||
#endif
|
||||
break;
|
||||
|
||||
case bp_catch_throw:
|
||||
/* Field 4, the address, is omitted (which makes the columns
|
||||
not line up too nicely with the headers, but the effect
|
||||
is relatively readable). */
|
||||
#ifdef UI_OUT
|
||||
if (addressprint)
|
||||
ui_out_field_skip (uiout, "addr");
|
||||
annotate_field (5);
|
||||
ui_out_field_string (uiout, "what", "exception throw");
|
||||
ui_out_spaces (uiout, 1);
|
||||
#else
|
||||
annotate_field (5);
|
||||
printf_filtered ("exception throw ");
|
||||
#endif
|
||||
break;
|
||||
|
||||
case bp_breakpoint:
|
||||
@ -3136,6 +3303,35 @@ print_one_breakpoint (struct breakpoint *b,
|
||||
case bp_call_dummy:
|
||||
case bp_shlib_event:
|
||||
case bp_thread_event:
|
||||
#ifdef UI_OUT
|
||||
if (addressprint)
|
||||
{
|
||||
annotate_field (4);
|
||||
ui_out_field_core_addr (uiout, "addr", b->address);
|
||||
}
|
||||
annotate_field (5);
|
||||
*last_addr = b->address;
|
||||
if (b->source_file)
|
||||
{
|
||||
sym = find_pc_sect_function (b->address, b->section);
|
||||
if (sym)
|
||||
{
|
||||
ui_out_text (uiout, "in ");
|
||||
ui_out_field_string (uiout, "func",
|
||||
SYMBOL_SOURCE_NAME (sym));
|
||||
ui_out_wrap_hint (uiout, wrap_indent);
|
||||
ui_out_text (uiout, " at ");
|
||||
}
|
||||
ui_out_field_string (uiout, "file", b->source_file);
|
||||
ui_out_text (uiout, ":");
|
||||
ui_out_field_int (uiout, "line", b->line_number);
|
||||
}
|
||||
else
|
||||
{
|
||||
print_address_symbolic (b->address, stb->stream, demangle, "");
|
||||
ui_out_field_stream (uiout, "at", stb);
|
||||
}
|
||||
#else
|
||||
if (addressprint)
|
||||
{
|
||||
annotate_field (4);
|
||||
@ -3163,64 +3359,125 @@ print_one_breakpoint (struct breakpoint *b,
|
||||
}
|
||||
else
|
||||
print_address_symbolic (b->address, gdb_stdout, demangle, " ");
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
if (b->thread != -1)
|
||||
{
|
||||
#ifdef UI_OUT
|
||||
/* FIXME: This seems to be redundant and lost here; see the
|
||||
"stop only in" line a little further down. */
|
||||
ui_out_text (uiout, " thread ");
|
||||
ui_out_field_int (uiout, "thread", b->thread);
|
||||
#else
|
||||
printf_filtered (" thread %d", b->thread);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef UI_OUT
|
||||
ui_out_text (uiout, "\n");
|
||||
#else
|
||||
printf_filtered ("\n");
|
||||
#endif
|
||||
|
||||
if (b->frame)
|
||||
{
|
||||
annotate_field (6);
|
||||
#ifdef UI_OUT
|
||||
ui_out_text (uiout, "\tstop only in stack frame at ");
|
||||
ui_out_field_core_addr (uiout, "frame", b->frame);
|
||||
ui_out_text (uiout, "\n");
|
||||
#else
|
||||
printf_filtered ("\tstop only in stack frame at ");
|
||||
print_address_numeric (b->frame, 1, gdb_stdout);
|
||||
printf_filtered ("\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
if (b->cond)
|
||||
{
|
||||
annotate_field (7);
|
||||
#ifdef UI_OUT
|
||||
ui_out_text (uiout, "\tstop only if ");
|
||||
print_expression (b->cond, stb->stream);
|
||||
ui_out_field_stream (uiout, "cond", stb);
|
||||
ui_out_text (uiout, "\n");
|
||||
#else
|
||||
printf_filtered ("\tstop only if ");
|
||||
print_expression (b->cond, gdb_stdout);
|
||||
printf_filtered ("\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
if (b->thread != -1)
|
||||
{
|
||||
/* FIXME should make an annotation for this */
|
||||
#ifdef UI_OUT
|
||||
ui_out_text (uiout, "\tstop only in thread ");
|
||||
ui_out_field_int (uiout, "thread", b->thread);
|
||||
ui_out_text (uiout, "\n");
|
||||
#else
|
||||
printf_filtered ("\tstop only in thread %d\n", b->thread);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (show_breakpoint_hit_counts && b->hit_count)
|
||||
{
|
||||
/* FIXME should make an annotation for this */
|
||||
#ifdef UI_OUT
|
||||
if (ep_is_catchpoint (b))
|
||||
ui_out_text (uiout, "\tcatchpoint");
|
||||
else
|
||||
ui_out_text (uiout, "\tbreakpoint");
|
||||
ui_out_text (uiout, " already hit ");
|
||||
ui_out_field_int (uiout, "times", b->hit_count);
|
||||
if (b->hit_count == 1)
|
||||
ui_out_text (uiout, " time\n");
|
||||
else
|
||||
ui_out_text (uiout, " times\n");
|
||||
#else
|
||||
if (ep_is_catchpoint (b))
|
||||
printf_filtered ("\tcatchpoint");
|
||||
else
|
||||
printf_filtered ("\tbreakpoint");
|
||||
printf_filtered (" already hit %d time%s\n",
|
||||
b->hit_count, (b->hit_count == 1 ? "" : "s"));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
if (b->ignore_count)
|
||||
{
|
||||
annotate_field (8);
|
||||
#ifdef UI_OUT
|
||||
ui_out_text (uiout, "\tignore next ");
|
||||
ui_out_field_int (uiout, "ignore", b->ignore_count);
|
||||
ui_out_text (uiout, " hits\n");
|
||||
#else
|
||||
printf_filtered ("\tignore next %d hits\n", b->ignore_count);
|
||||
#endif
|
||||
}
|
||||
|
||||
if ((l = b->commands))
|
||||
{
|
||||
annotate_field (9);
|
||||
#ifdef UI_OUT
|
||||
ui_out_list_begin (uiout, "script");
|
||||
print_command_lines (uiout, l, 4);
|
||||
ui_out_list_end (uiout);
|
||||
#else
|
||||
while (l)
|
||||
{
|
||||
print_command_line (l, 4, gdb_stdout);
|
||||
l = l->next;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#ifdef UI_OUT
|
||||
ui_out_list_end (uiout);
|
||||
do_cleanups (old_chain);
|
||||
#endif
|
||||
}
|
||||
|
||||
struct captured_breakpoint_query_args
|
||||
@ -3269,6 +3526,13 @@ breakpoint_1 (bnum, allflag)
|
||||
CORE_ADDR last_addr = (CORE_ADDR) -1;
|
||||
int found_a_breakpoint = 0;
|
||||
|
||||
#ifdef UI_OUT
|
||||
if (addressprint)
|
||||
ui_out_table_begin (uiout, 6, "BreakpointTable");
|
||||
else
|
||||
ui_out_table_begin (uiout, 5, "BreakpointTable");
|
||||
#endif /* UI_OUT */
|
||||
|
||||
ALL_BREAKPOINTS (b)
|
||||
if (bnum == -1
|
||||
|| bnum == b->number)
|
||||
@ -3294,6 +3558,24 @@ breakpoint_1 (bnum, allflag)
|
||||
if (!found_a_breakpoint++)
|
||||
{
|
||||
annotate_breakpoints_headers ();
|
||||
#ifdef UI_OUT
|
||||
annotate_field (0);
|
||||
ui_out_table_header (uiout, 3, ui_left, "Num"); /* 1 */
|
||||
annotate_field (1);
|
||||
ui_out_table_header (uiout, 14, ui_left, "Type"); /* 2 */
|
||||
annotate_field (2);
|
||||
ui_out_table_header (uiout, 4, ui_left, "Disp"); /* 3 */
|
||||
annotate_field (3);
|
||||
ui_out_table_header (uiout, 3, ui_left, "Enb"); /* 4 */
|
||||
if (addressprint)
|
||||
{
|
||||
annotate_field (4);
|
||||
ui_out_table_header (uiout, 10, ui_left, "Address"); /* 5 */
|
||||
}
|
||||
annotate_field (5);
|
||||
ui_out_table_header (uiout, 40, ui_noalign, "What"); /* 6 */
|
||||
ui_out_table_body (uiout);
|
||||
#else
|
||||
annotate_field (0);
|
||||
printf_filtered ("Num ");
|
||||
annotate_field (1);
|
||||
@ -3309,6 +3591,7 @@ breakpoint_1 (bnum, allflag)
|
||||
}
|
||||
annotate_field (5);
|
||||
printf_filtered ("What\n");
|
||||
#endif /* UI_OUT */
|
||||
annotate_breakpoints_table ();
|
||||
}
|
||||
|
||||
@ -3317,10 +3600,18 @@ breakpoint_1 (bnum, allflag)
|
||||
|
||||
if (!found_a_breakpoint)
|
||||
{
|
||||
#ifdef UI_OUT
|
||||
if (bnum == -1)
|
||||
ui_out_message (uiout, 0, "No breakpoints or watchpoints.\n");
|
||||
else
|
||||
ui_out_message (uiout, 0, "No breakpoint or watchpoint number %d.\n",
|
||||
bnum);
|
||||
#else
|
||||
if (bnum == -1)
|
||||
printf_filtered ("No breakpoints or watchpoints.\n");
|
||||
else
|
||||
printf_filtered ("No breakpoint or watchpoint number %d.\n", bnum);
|
||||
#endif /* UI_OUT */
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -3330,6 +3621,9 @@ breakpoint_1 (bnum, allflag)
|
||||
set_next_address (last_addr);
|
||||
}
|
||||
|
||||
#ifdef UI_OUT
|
||||
ui_out_table_end (uiout);
|
||||
#endif /* UI_OUT */
|
||||
/* FIXME? Should this be moved up so that it is only called when
|
||||
there have been breakpoints? */
|
||||
annotate_breakpoints_table_end ();
|
||||
@ -4070,6 +4364,13 @@ mention (b)
|
||||
struct breakpoint *b;
|
||||
{
|
||||
int say_where = 0;
|
||||
#ifdef UI_OUT
|
||||
struct cleanup *old_chain;
|
||||
struct ui_stream *stb;
|
||||
|
||||
stb = ui_out_stream_new (uiout);
|
||||
old_chain = make_cleanup ((make_cleanup_func) ui_out_stream_delete, stb);
|
||||
#endif /* UI_OUT */
|
||||
|
||||
/* FIXME: This is misplaced; mention() is called by things (like hitting a
|
||||
watchpoint) other than breakpoint creation. It should be possible to
|
||||
@ -4085,6 +4386,26 @@ mention (b)
|
||||
case bp_none:
|
||||
printf_filtered ("(apparently deleted?) Eventpoint %d: ", b->number);
|
||||
break;
|
||||
#ifdef UI_OUT
|
||||
case bp_watchpoint:
|
||||
ui_out_text (uiout, "Watchpoint ");
|
||||
ui_out_list_begin (uiout, "wpt");
|
||||
ui_out_field_int (uiout, "number", b->number);
|
||||
ui_out_text (uiout, ": ");
|
||||
print_expression (b->exp, stb->stream);
|
||||
ui_out_field_stream (uiout, "exp", stb);
|
||||
ui_out_list_end (uiout);
|
||||
break;
|
||||
case bp_hardware_watchpoint:
|
||||
ui_out_text (uiout, "Hardware watchpoint ");
|
||||
ui_out_list_begin (uiout, "wpt");
|
||||
ui_out_field_int (uiout, "number", b->number);
|
||||
ui_out_text (uiout, ": ");
|
||||
print_expression (b->exp, stb->stream);
|
||||
ui_out_field_stream (uiout, "exp", stb);
|
||||
ui_out_list_end (uiout);
|
||||
break;
|
||||
#else
|
||||
case bp_watchpoint:
|
||||
printf_filtered ("Watchpoint %d: ", b->number);
|
||||
print_expression (b->exp, gdb_stdout);
|
||||
@ -4093,6 +4414,27 @@ mention (b)
|
||||
printf_filtered ("Hardware watchpoint %d: ", b->number);
|
||||
print_expression (b->exp, gdb_stdout);
|
||||
break;
|
||||
#endif
|
||||
#ifdef UI_OUT
|
||||
case bp_read_watchpoint:
|
||||
ui_out_text (uiout, "Hardware read watchpoint ");
|
||||
ui_out_list_begin (uiout, "hw-rwpt");
|
||||
ui_out_field_int (uiout, "number", b->number);
|
||||
ui_out_text (uiout, ": ");
|
||||
print_expression (b->exp, stb->stream);
|
||||
ui_out_field_stream (uiout, "exp", stb);
|
||||
ui_out_list_end (uiout);
|
||||
break;
|
||||
case bp_access_watchpoint:
|
||||
ui_out_text (uiout, "Hardware access (read/write) watchpoint ");
|
||||
ui_out_list_begin (uiout, "hw-awpt");
|
||||
ui_out_field_int (uiout, "number", b->number);
|
||||
ui_out_text (uiout, ": ");
|
||||
print_expression (b->exp, stb->stream);
|
||||
ui_out_field_stream (uiout, "exp", stb);
|
||||
ui_out_list_end (uiout);
|
||||
break;
|
||||
#else
|
||||
case bp_read_watchpoint:
|
||||
printf_filtered ("Hardware read watchpoint %d: ", b->number);
|
||||
print_expression (b->exp, gdb_stdout);
|
||||
@ -4102,6 +4444,7 @@ mention (b)
|
||||
b->number);
|
||||
print_expression (b->exp, gdb_stdout);
|
||||
break;
|
||||
#endif
|
||||
case bp_breakpoint:
|
||||
printf_filtered ("Breakpoint %d", b->number);
|
||||
say_where = 1;
|
||||
@ -4160,6 +4503,9 @@ mention (b)
|
||||
TUIDO (((TuiOpaqueFuncPtr) tui_vAllSetHasBreakAt, b, 1));
|
||||
TUIDO (((TuiOpaqueFuncPtr) tuiUpdateAllExecInfos));
|
||||
}
|
||||
#ifdef UI_OUT
|
||||
do_cleanups (old_chain);
|
||||
#endif
|
||||
printf_filtered ("\n");
|
||||
}
|
||||
|
||||
@ -5180,6 +5526,15 @@ can_use_hardware_watchpoint (v)
|
||||
return found_memory_cnt;
|
||||
}
|
||||
|
||||
#ifdef UI_OUT
|
||||
void
|
||||
watch_command_wrapper (arg, from_tty)
|
||||
char *arg;
|
||||
int from_tty;
|
||||
{
|
||||
watch_command (arg, from_tty);
|
||||
}
|
||||
#endif
|
||||
static void
|
||||
watch_command (arg, from_tty)
|
||||
char *arg;
|
||||
@ -5188,6 +5543,15 @@ watch_command (arg, from_tty)
|
||||
watch_command_1 (arg, hw_write, from_tty);
|
||||
}
|
||||
|
||||
#ifdef UI_OUT
|
||||
void
|
||||
rwatch_command_wrapper (arg, from_tty)
|
||||
char *arg;
|
||||
int from_tty;
|
||||
{
|
||||
rwatch_command (arg, from_tty);
|
||||
}
|
||||
#endif
|
||||
static void
|
||||
rwatch_command (arg, from_tty)
|
||||
char *arg;
|
||||
@ -5196,6 +5560,15 @@ rwatch_command (arg, from_tty)
|
||||
watch_command_1 (arg, hw_read, from_tty);
|
||||
}
|
||||
|
||||
#ifdef UI_OUT
|
||||
void
|
||||
awatch_command_wrapper (arg, from_tty)
|
||||
char *arg;
|
||||
int from_tty;
|
||||
{
|
||||
awatch_command (arg, from_tty);
|
||||
}
|
||||
#endif
|
||||
static void
|
||||
awatch_command (arg, from_tty)
|
||||
char *arg;
|
||||
|
@ -551,6 +551,12 @@ extern void breakpoint_clear_ignore_counts PARAMS ((void));
|
||||
|
||||
extern void break_command PARAMS ((char *, int));
|
||||
|
||||
extern void hbreak_command_wrapper PARAMS ((char *, int));
|
||||
extern void thbreak_command_wrapper PARAMS ((char *, int));
|
||||
extern void rbreak_command_wrapper PARAMS ((char *, int));
|
||||
extern void watch_command_wrapper PARAMS ((char *, int));
|
||||
extern void awatch_command_wrapper PARAMS ((char *, int));
|
||||
extern void rwatch_command_wrapper PARAMS ((char *, int));
|
||||
extern void tbreak_command PARAMS ((char *, int));
|
||||
|
||||
extern int insert_breakpoints PARAMS ((void));
|
||||
|
339
gdb/cli-out.c
Normal file
339
gdb/cli-out.c
Normal file
@ -0,0 +1,339 @@
|
||||
/* Output generating routines for GDB CLI.
|
||||
Copyright 1999-2000 Free Software Foundation, Inc.
|
||||
Contributed by Cygnus Solutions.
|
||||
Written by Fernando Nasser for Cygnus.
|
||||
|
||||
This file is part of GDB.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include "defs.h"
|
||||
#include "ui-out.h"
|
||||
#include "cli-out.h"
|
||||
|
||||
/* Convenience macro for allocting typesafe memory. */
|
||||
|
||||
#ifndef XMALLOC
|
||||
#define XMALLOC(TYPE) (TYPE*) xmalloc (sizeof (TYPE))
|
||||
#endif
|
||||
|
||||
struct ui_out_data
|
||||
{
|
||||
struct ui_file *stream;
|
||||
};
|
||||
|
||||
/* These are the CLI output functions */
|
||||
|
||||
static void cli_table_begin (struct ui_out *uiout, int nbrofcols, char *tblid);
|
||||
static void cli_table_body (struct ui_out *uiout);
|
||||
static void cli_table_end (struct ui_out *uiout);
|
||||
static void cli_table_header (struct ui_out *uiout, int width,
|
||||
enum ui_align alig, char *colhdr);
|
||||
static void cli_list_begin (struct ui_out *uiout, int list_flag, char *lstid);
|
||||
static void cli_list_end (struct ui_out *uiout, int list_flag);
|
||||
static void cli_field_int (struct ui_out *uiout, int fldno, int width,
|
||||
enum ui_align alig, char *fldname, int value);
|
||||
static void cli_field_skip (struct ui_out *uiout, int fldno, int width,
|
||||
enum ui_align alig, char *fldname);
|
||||
static void cli_field_string (struct ui_out *uiout, int fldno, int width,
|
||||
enum ui_align alig, char *fldname,
|
||||
const char *string);
|
||||
static void cli_field_fmt (struct ui_out *uiout, int fldno,
|
||||
int width, enum ui_align align,
|
||||
char *fldname, char *format, va_list args);
|
||||
static void cli_spaces (struct ui_out *uiout, int numspaces);
|
||||
static void cli_text (struct ui_out *uiout, char *string);
|
||||
static void cli_message (struct ui_out *uiout, int verbosity, char *format,
|
||||
va_list args);
|
||||
static void cli_wrap_hint (struct ui_out *uiout, char *identstring);
|
||||
static void cli_flush (struct ui_out *uiout);
|
||||
|
||||
/* This is the CLI ui-out implementation functions vector */
|
||||
|
||||
/* FIXME: This can be initialized dynamically after default is set to
|
||||
handle initial output in main.c */
|
||||
|
||||
static struct ui_out_impl cli_ui_out_impl =
|
||||
{
|
||||
cli_table_begin,
|
||||
cli_table_body,
|
||||
cli_table_end,
|
||||
cli_table_header,
|
||||
cli_list_begin,
|
||||
cli_list_end,
|
||||
cli_field_int,
|
||||
cli_field_skip,
|
||||
cli_field_string,
|
||||
cli_field_fmt,
|
||||
cli_spaces,
|
||||
cli_text,
|
||||
cli_message,
|
||||
cli_wrap_hint,
|
||||
cli_flush
|
||||
};
|
||||
|
||||
/* Prototypes for local functions */
|
||||
|
||||
extern void _initialize_cli_out PARAMS ((void));
|
||||
|
||||
static void field_separator (void);
|
||||
|
||||
static void out_field_fmt (struct ui_out *uiout, int fldno, char *fldname,
|
||||
char *format,...);
|
||||
|
||||
/* local variables */
|
||||
|
||||
/* (none yet) */
|
||||
|
||||
/* Mark beginning of a table */
|
||||
|
||||
void
|
||||
cli_table_begin (uiout, nbrofcols, tblid)
|
||||
struct ui_out *uiout;
|
||||
int nbrofcols;
|
||||
char *tblid;
|
||||
{
|
||||
}
|
||||
|
||||
/* Mark beginning of a table body */
|
||||
|
||||
void
|
||||
cli_table_body (uiout)
|
||||
struct ui_out *uiout;
|
||||
{
|
||||
/* first, close the table header line */
|
||||
cli_text (uiout, "\n");
|
||||
}
|
||||
|
||||
/* Mark end of a table */
|
||||
|
||||
void
|
||||
cli_table_end (uiout)
|
||||
struct ui_out *uiout;
|
||||
{
|
||||
}
|
||||
|
||||
/* Specify table header */
|
||||
|
||||
void
|
||||
cli_table_header (uiout, width, alignment, colhdr)
|
||||
struct ui_out *uiout;
|
||||
int width;
|
||||
int alignment;
|
||||
char *colhdr;
|
||||
{
|
||||
cli_field_string (uiout, 0, width, alignment, 0, colhdr);
|
||||
}
|
||||
|
||||
/* Mark beginning of a list */
|
||||
|
||||
void
|
||||
cli_list_begin (uiout, list_flag, lstid)
|
||||
struct ui_out *uiout;
|
||||
int list_flag;
|
||||
char *lstid;
|
||||
{
|
||||
}
|
||||
|
||||
/* Mark end of a list */
|
||||
|
||||
void
|
||||
cli_list_end (uiout, list_flag)
|
||||
struct ui_out *uiout;
|
||||
int list_flag;
|
||||
{
|
||||
}
|
||||
|
||||
/* output an int field */
|
||||
|
||||
void
|
||||
cli_field_int (uiout, fldno, width, alignment, fldname, value)
|
||||
struct ui_out *uiout;
|
||||
int fldno;
|
||||
int width;
|
||||
int alignment;
|
||||
char *fldname;
|
||||
int value;
|
||||
{
|
||||
char buffer[20]; /* FIXME: how many chars long a %d can become? */
|
||||
|
||||
sprintf (buffer, "%d", value);
|
||||
cli_field_string (uiout, fldno, width, alignment, fldname, buffer);
|
||||
}
|
||||
|
||||
/* used to ommit a field */
|
||||
|
||||
void
|
||||
cli_field_skip (uiout, fldno, width, alignment, fldname)
|
||||
struct ui_out *uiout;
|
||||
int fldno;
|
||||
int width;
|
||||
int alignment;
|
||||
char *fldname;
|
||||
{
|
||||
cli_field_string (uiout, fldno, width, alignment, fldname, "");
|
||||
}
|
||||
|
||||
/* other specific cli_field_* end up here so alignment and field
|
||||
separators are both handled by cli_field_string */
|
||||
|
||||
void
|
||||
cli_field_string (struct ui_out *uiout,
|
||||
int fldno,
|
||||
int width,
|
||||
int align,
|
||||
char *fldname,
|
||||
const char *string)
|
||||
{
|
||||
int before = 0;
|
||||
int after = 0;
|
||||
|
||||
if ((align != ui_noalign) && string)
|
||||
{
|
||||
before = width - strlen (string);
|
||||
if (before <= 0)
|
||||
before = 0;
|
||||
else
|
||||
{
|
||||
if (align == ui_right)
|
||||
after = 0;
|
||||
else if (align == ui_left)
|
||||
{
|
||||
after = before;
|
||||
before = 0;
|
||||
}
|
||||
else
|
||||
/* ui_center */
|
||||
{
|
||||
after = before / 2;
|
||||
before -= after;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (before)
|
||||
ui_out_spaces (uiout, before);
|
||||
if (string)
|
||||
out_field_fmt (uiout, fldno, fldname, "%s", string);
|
||||
if (after)
|
||||
ui_out_spaces (uiout, after);
|
||||
|
||||
if (align != ui_noalign)
|
||||
field_separator ();
|
||||
}
|
||||
|
||||
/* This is the only field function that does not align */
|
||||
|
||||
void
|
||||
cli_field_fmt (struct ui_out *uiout, int fldno,
|
||||
int width, enum ui_align align,
|
||||
char *fldname, char *format, va_list args)
|
||||
{
|
||||
struct ui_out_data *data = ui_out_data (uiout);
|
||||
vfprintf_filtered (data->stream, format, args);
|
||||
|
||||
if (align != ui_noalign)
|
||||
field_separator ();
|
||||
}
|
||||
|
||||
void
|
||||
cli_spaces (uiout, numspaces)
|
||||
struct ui_out *uiout;
|
||||
int numspaces;
|
||||
{
|
||||
struct ui_out_data *data = ui_out_data (uiout);
|
||||
print_spaces_filtered (numspaces, data->stream);
|
||||
}
|
||||
|
||||
void
|
||||
cli_text (uiout, string)
|
||||
struct ui_out *uiout;
|
||||
char *string;
|
||||
{
|
||||
struct ui_out_data *data = ui_out_data (uiout);
|
||||
fputs_filtered (string, data->stream);
|
||||
}
|
||||
|
||||
void
|
||||
cli_message (struct ui_out *uiout, int verbosity, char *format, va_list args)
|
||||
{
|
||||
struct ui_out_data *data = ui_out_data (uiout);
|
||||
if (ui_out_get_verblvl (uiout) >= verbosity)
|
||||
vfprintf_unfiltered (data->stream, format, args);
|
||||
}
|
||||
|
||||
void
|
||||
cli_wrap_hint (uiout, identstring)
|
||||
struct ui_out *uiout;
|
||||
char *identstring;
|
||||
{
|
||||
wrap_here (identstring);
|
||||
}
|
||||
|
||||
void
|
||||
cli_flush (uiout)
|
||||
struct ui_out *uiout;
|
||||
{
|
||||
struct ui_out_data *data = ui_out_data (uiout);
|
||||
gdb_flush (data->stream);
|
||||
}
|
||||
|
||||
/* local functions */
|
||||
|
||||
/* Like cli_field_fmt, but takes a variable number of args
|
||||
and makes a va_list and does not insert a separator */
|
||||
|
||||
/* VARARGS */
|
||||
static void
|
||||
out_field_fmt (struct ui_out *uiout, int fldno, char *fldname,
|
||||
char *format,...)
|
||||
{
|
||||
struct ui_out_data *data = ui_out_data (uiout);
|
||||
va_list args;
|
||||
|
||||
va_start (args, format);
|
||||
vfprintf_filtered (data->stream, format, args);
|
||||
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
/* access to ui_out format private members */
|
||||
|
||||
static void
|
||||
field_separator ()
|
||||
{
|
||||
struct ui_out_data *data = ui_out_data (uiout);
|
||||
fputc_filtered (' ', data->stream);
|
||||
}
|
||||
|
||||
/* initalize private members at startup */
|
||||
|
||||
struct ui_out *
|
||||
cli_out_new (struct ui_file *stream)
|
||||
{
|
||||
int flags = ui_source_list;
|
||||
|
||||
struct ui_out_data *data = XMALLOC (struct ui_out_data);
|
||||
data->stream = stream;
|
||||
return ui_out_new (&cli_ui_out_impl, data, flags);
|
||||
}
|
||||
|
||||
/* standard gdb initialization hook */
|
||||
void
|
||||
_initialize_cli_out ()
|
||||
{
|
||||
/* nothing needs to be done */
|
||||
}
|
27
gdb/cli-out.h
Normal file
27
gdb/cli-out.h
Normal file
@ -0,0 +1,27 @@
|
||||
/* Output generating routines for GDB CLI.
|
||||
Copyright 1999-2000 Free Software Foundation, Inc.
|
||||
Contributed by Cygnus Solutions.
|
||||
|
||||
This file is part of GDB.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef CLI_OUT_H
|
||||
#define CLI_OUT_H
|
||||
|
||||
extern struct ui_out *cli_out_new (struct ui_file *stream);
|
||||
|
||||
#endif
|
102
gdb/command.c
102
gdb/command.c
@ -22,6 +22,9 @@
|
||||
#include "value.h"
|
||||
#include <ctype.h>
|
||||
#include "gdb_string.h"
|
||||
#ifdef UI_OUT
|
||||
#include "ui-out.h"
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_WAIT_H
|
||||
#include <sys/wait.h>
|
||||
@ -520,7 +523,11 @@ print_doc_line (stream, str)
|
||||
line_buffer[p - str] = '\0';
|
||||
if (islower (line_buffer[0]))
|
||||
line_buffer[0] = toupper (line_buffer[0]);
|
||||
#ifdef UI_OUT
|
||||
ui_out_text (uiout, line_buffer);
|
||||
#else
|
||||
fputs_filtered (line_buffer, stream);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1363,9 +1370,73 @@ do_setshow_command (arg, from_tty, c)
|
||||
}
|
||||
else if (c->type == show_cmd)
|
||||
{
|
||||
#ifdef UI_OUT
|
||||
struct cleanup *old_chain;
|
||||
struct ui_stream *stb;
|
||||
int quote;
|
||||
|
||||
stb = ui_out_stream_new (uiout);
|
||||
old_chain = make_cleanup ((make_cleanup_func) ui_out_stream_delete, stb);
|
||||
#endif /* UI_OUT */
|
||||
|
||||
/* Print doc minus "show" at start. */
|
||||
print_doc_line (gdb_stdout, c->doc + 5);
|
||||
|
||||
#ifdef UI_OUT
|
||||
ui_out_text (uiout, " is ");
|
||||
ui_out_wrap_hint (uiout, " ");
|
||||
quote = 0;
|
||||
switch (c->var_type)
|
||||
{
|
||||
case var_string:
|
||||
{
|
||||
unsigned char *p;
|
||||
|
||||
if (*(unsigned char **) c->var)
|
||||
fputstr_filtered (*(unsigned char **) c->var, '"', stb->stream);
|
||||
quote = 1;
|
||||
}
|
||||
break;
|
||||
case var_string_noescape:
|
||||
case var_filename:
|
||||
case var_enum:
|
||||
if (*(char **) c->var)
|
||||
fputs_filtered (*(char **) c->var, stb->stream);
|
||||
quote = 1;
|
||||
break;
|
||||
case var_boolean:
|
||||
fputs_filtered (*(int *) c->var ? "on" : "off", stb->stream);
|
||||
break;
|
||||
case var_uinteger:
|
||||
if (*(unsigned int *) c->var == UINT_MAX)
|
||||
{
|
||||
fputs_filtered ("unlimited", stb->stream);
|
||||
break;
|
||||
}
|
||||
/* else fall through */
|
||||
case var_zinteger:
|
||||
fprintf_filtered (stb->stream, "%u", *(unsigned int *) c->var);
|
||||
break;
|
||||
case var_integer:
|
||||
if (*(int *) c->var == INT_MAX)
|
||||
{
|
||||
fputs_filtered ("unlimited", stb->stream);
|
||||
}
|
||||
else
|
||||
fprintf_filtered (stb->stream, "%d", *(int *) c->var);
|
||||
break;
|
||||
|
||||
default:
|
||||
error ("gdb internal error: bad var_type in do_setshow_command");
|
||||
}
|
||||
if (quote)
|
||||
ui_out_text (uiout, "\"");
|
||||
ui_out_field_stream (uiout, "value", stb);
|
||||
if (quote)
|
||||
ui_out_text (uiout, "\"");
|
||||
ui_out_text (uiout, ".\n");
|
||||
do_cleanups (old_chain);
|
||||
#else
|
||||
fputs_filtered (" is ", gdb_stdout);
|
||||
wrap_here (" ");
|
||||
switch (c->var_type)
|
||||
@ -1412,6 +1483,7 @@ do_setshow_command (arg, from_tty, c)
|
||||
error ("gdb internal error: bad var_type in do_setshow_command");
|
||||
}
|
||||
fputs_filtered (".\n", gdb_stdout);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
error ("gdb internal error: bad cmd_type in do_setshow_command");
|
||||
@ -1428,10 +1500,31 @@ cmd_show_list (list, from_tty, prefix)
|
||||
int from_tty;
|
||||
char *prefix;
|
||||
{
|
||||
#ifdef UI_OUT
|
||||
ui_out_list_begin (uiout, "showlist");
|
||||
#endif
|
||||
for (; list != NULL; list = list->next)
|
||||
{
|
||||
/* If we find a prefix, run its list, prefixing our output by its
|
||||
prefix (with "show " skipped). */
|
||||
#ifdef UI_OUT
|
||||
if (list->prefixlist && !list->abbrev_flag)
|
||||
{
|
||||
ui_out_list_begin (uiout, "optionlist");
|
||||
ui_out_field_string (uiout, "prefix", list->prefixname + 5);
|
||||
cmd_show_list (*list->prefixlist, from_tty, list->prefixname + 5);
|
||||
ui_out_list_end (uiout);
|
||||
}
|
||||
if (list->type == show_cmd)
|
||||
{
|
||||
ui_out_list_begin (uiout, "option");
|
||||
ui_out_text (uiout, prefix);
|
||||
ui_out_field_string (uiout, "name", list->name);
|
||||
ui_out_text (uiout, ": ");
|
||||
do_setshow_command ((char *) NULL, from_tty, list);
|
||||
ui_out_list_end (uiout);
|
||||
}
|
||||
#else
|
||||
if (list->prefixlist && !list->abbrev_flag)
|
||||
cmd_show_list (*list->prefixlist, from_tty, list->prefixname + 5);
|
||||
if (list->type == show_cmd)
|
||||
@ -1441,7 +1534,11 @@ cmd_show_list (list, from_tty, prefix)
|
||||
fputs_filtered (": ", gdb_stdout);
|
||||
do_setshow_command ((char *) NULL, from_tty, list);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#ifdef UI_OUT
|
||||
ui_out_list_end (uiout);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* ARGSUSED */
|
||||
@ -1541,12 +1638,17 @@ show_user_1 (c, stream)
|
||||
fputs_filtered (c->name, stream);
|
||||
fputs_filtered (":\n", stream);
|
||||
|
||||
#ifdef UI_OUT
|
||||
print_command_lines (uiout, cmdlines, 1);
|
||||
fputs_filtered ("\n", stream);
|
||||
#else
|
||||
while (cmdlines)
|
||||
{
|
||||
print_command_line (cmdlines, 4, stream);
|
||||
cmdlines = cmdlines->next;
|
||||
}
|
||||
fputs_filtered ("\n", stream);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* ARGSUSED */
|
||||
|
597
gdb/configure
vendored
597
gdb/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -497,6 +497,42 @@ fi
|
||||
AC_SUBST(WIN32LIBS)
|
||||
|
||||
|
||||
AC_ARG_WITH(cpu,
|
||||
[ --with-cpu=CPU Set the default CPU variant to debug],
|
||||
[case "${target}" in
|
||||
powerpc-* | powerpcle-* )
|
||||
## It would be nice to keep this table in sync with the one in
|
||||
## gcc/configure.
|
||||
case "${with_cpu}" in
|
||||
ppc-uisa | rs6000 | 403 | 403GC | 505 | 860 | 601 | 602 | 603 \
|
||||
| 604 | 750 )
|
||||
## Those are all handled in variants in rs6000-tdep.c, so they're fine.
|
||||
;;
|
||||
common | power | power2 | rios | rios1 | rios2 | rsc | rsc1 )
|
||||
## These are all RS6000 variants, as far as GDB is concerned.
|
||||
with_cpu=rs6000
|
||||
;;
|
||||
603e | ec603e )
|
||||
with_cpu=603
|
||||
;;
|
||||
604e )
|
||||
with_cpu=604
|
||||
;;
|
||||
* )
|
||||
AC_MSG_WARN(GDB: unknown --with-cpu value: \`${with_cpu}'; using \`ppc-uisa'.)
|
||||
with_cpu=ppc-uisa
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
* )
|
||||
AC_MSG_WARN(GDB may ignore the --with-cpu flag for ${target} targets)
|
||||
;;
|
||||
esac
|
||||
AC_DEFINE_UNQUOTED(TARGET_CPU_DEFAULT, "${with_cpu}")
|
||||
],)
|
||||
|
||||
|
||||
|
||||
AC_PATH_X
|
||||
|
||||
|
||||
|
@ -1113,6 +1113,7 @@ extern CORE_ADDR push_word (CORE_ADDR, ULONGEST);
|
||||
extern int watchdog;
|
||||
|
||||
/* Hooks for alternate command interfaces. */
|
||||
|
||||
struct target_waitstatus;
|
||||
struct cmd_list_element;
|
||||
|
||||
@ -1270,4 +1271,10 @@ enum gdb_rc gdb_breakpoint (char *address, char *condition,
|
||||
int thread, int ignore_count);
|
||||
enum gdb_rc gdb_thread_select (/* output object */ char *tidstr);
|
||||
|
||||
#ifdef UI_OUT
|
||||
/* Print a list of known thread ids. */
|
||||
enum gdb_rc gdb_list_thread_ids (/* output object */);
|
||||
|
||||
/* Switch thread and print notification. */
|
||||
#endif
|
||||
#endif /* #ifndef DEFS_H */
|
||||
|
@ -246,7 +246,6 @@ display_gdb_prompt (char *new_prompt)
|
||||
int prompt_length = 0;
|
||||
char *gdb_prompt = get_prompt ();
|
||||
|
||||
|
||||
if (target_executing && sync_execution)
|
||||
{
|
||||
/* This is to trick readline into not trying to display the
|
||||
|
@ -20,6 +20,9 @@
|
||||
#define GDBCMD_H 1
|
||||
|
||||
#include "command.h"
|
||||
#ifdef UI_OUT
|
||||
#include "ui-out.h"
|
||||
#endif
|
||||
|
||||
/* Chain containing all defined commands. */
|
||||
|
||||
@ -108,6 +111,10 @@ execute_control_command PARAMS ((struct command_line *));
|
||||
|
||||
extern void print_command_line (struct command_line *, unsigned int,
|
||||
struct ui_file *);
|
||||
#ifdef UI_OUT
|
||||
extern void print_command_lines PARAMS ((struct ui_out *,
|
||||
struct command_line *, unsigned int));
|
||||
#endif
|
||||
|
||||
extern char **noop_completer PARAMS ((char *, char *));
|
||||
|
||||
|
53
gdb/infcmd.c
53
gdb/infcmd.c
@ -34,6 +34,9 @@
|
||||
#include "language.h"
|
||||
#include "symfile.h"
|
||||
#include "objfiles.h"
|
||||
#ifdef UI_OUT
|
||||
#include "ui-out.h"
|
||||
#endif
|
||||
#include "event-top.h"
|
||||
#include "parser-defs.h"
|
||||
|
||||
@ -317,6 +320,16 @@ Start it from the beginning? "))
|
||||
|
||||
if (from_tty)
|
||||
{
|
||||
#ifdef UI_OUT
|
||||
ui_out_field_string (uiout, NULL, "Starting program");
|
||||
ui_out_text (uiout, ": ");
|
||||
if (exec_file)
|
||||
ui_out_field_string (uiout, "execfile", exec_file);
|
||||
ui_out_spaces (uiout, 1);
|
||||
ui_out_field_string (uiout, "infargs", inferior_args);
|
||||
ui_out_text (uiout, "\n");
|
||||
ui_out_flush (uiout);
|
||||
#else
|
||||
puts_filtered ("Starting program: ");
|
||||
if (exec_file)
|
||||
puts_filtered (exec_file);
|
||||
@ -324,6 +337,7 @@ Start it from the beginning? "))
|
||||
puts_filtered (inferior_args);
|
||||
puts_filtered ("\n");
|
||||
gdb_flush (gdb_stdout);
|
||||
#endif
|
||||
}
|
||||
|
||||
target_create_inferior (exec_file, inferior_args,
|
||||
@ -1030,13 +1044,26 @@ static void
|
||||
print_return_value (int structure_return, struct type *value_type)
|
||||
{
|
||||
register value_ptr value;
|
||||
#ifdef UI_OUT
|
||||
static struct ui_stream *stb = NULL;
|
||||
#endif /* UI_OUT */
|
||||
|
||||
if (!structure_return)
|
||||
{
|
||||
value = value_being_returned (value_type, stop_registers, structure_return);
|
||||
#ifdef UI_OUT
|
||||
stb = ui_out_stream_new (uiout);
|
||||
ui_out_text (uiout, "Value returned is ");
|
||||
ui_out_field_fmt (uiout, "gdb-result-var", "$%d", record_latest_value (value));
|
||||
ui_out_text (uiout, "= ");
|
||||
value_print (value, stb->stream, 0, Val_no_prettyprint);
|
||||
ui_out_field_stream (uiout, "return-value", stb);
|
||||
ui_out_text (uiout, "\n");
|
||||
#else /* UI_OUT */
|
||||
printf_filtered ("Value returned is $%d = ", record_latest_value (value));
|
||||
value_print (value, gdb_stdout, 0, Val_no_prettyprint);
|
||||
printf_filtered ("\n");
|
||||
#endif /* UI_OUT */
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1045,13 +1072,30 @@ print_return_value (int structure_return, struct type *value_type)
|
||||
initiate the call, as opposed to the call_function_by_hand case */
|
||||
#ifdef VALUE_RETURNED_FROM_STACK
|
||||
value = 0;
|
||||
#ifdef UI_OUT
|
||||
ui_out_text (uiout, "Value returned has type: ");
|
||||
ui_out_field_string (uiout, "return-type", TYPE_NAME (value_type));
|
||||
ui_out_text (uiout, ".");
|
||||
ui_out_text (uiout, " Cannot determine contents\n");
|
||||
#else /* UI_OUT */
|
||||
printf_filtered ("Value returned has type: %s.", TYPE_NAME (value_type));
|
||||
printf_filtered (" Cannot determine contents\n");
|
||||
#endif /* UI_OUT */
|
||||
#else
|
||||
value = value_being_returned (value_type, stop_registers, structure_return);
|
||||
#ifdef UI_OUT
|
||||
stb = ui_out_stream_new (uiout);
|
||||
ui_out_text (uiout, "Value returned is ");
|
||||
ui_out_field_fmt (uiout, "gdb-result-var", "$%d", record_latest_value (value));
|
||||
ui_out_text (uiout, "= ");
|
||||
value_print (value, stb->stream, 0, Val_no_prettyprint);
|
||||
ui_out_field_stream (uiout, "return-value", stb);
|
||||
ui_out_text (uiout, "\n");
|
||||
#else
|
||||
printf_filtered ("Value returned is $%d = ", record_latest_value (value));
|
||||
value_print (value, gdb_stdout, 0, Val_no_prettyprint);
|
||||
printf_filtered ("\n");
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@ -1760,6 +1804,15 @@ detach_command (args, from_tty)
|
||||
|
||||
/* Stop the execution of the target while running in async mode, in
|
||||
the backgound. */
|
||||
#ifdef UI_OUT
|
||||
void
|
||||
interrupt_target_command_wrapper (args, from_tty)
|
||||
char *args;
|
||||
int from_tty;
|
||||
{
|
||||
interrupt_target_command (args, from_tty);
|
||||
}
|
||||
#endif
|
||||
static void
|
||||
interrupt_target_command (args, from_tty)
|
||||
char *args;
|
||||
|
47
gdb/infrun.c
47
gdb/infrun.c
@ -1441,7 +1441,13 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||
{
|
||||
add_thread (ecs->pid);
|
||||
|
||||
#ifdef UI_OUT
|
||||
ui_out_text (uiout, "[New ");
|
||||
ui_out_text (uiout, target_pid_or_tid_to_str (ecs->pid));
|
||||
ui_out_text (uiout, "]\n");
|
||||
#else
|
||||
printf_filtered ("[New %s]\n", target_pid_or_tid_to_str (ecs->pid));
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
/* NOTE: This block is ONLY meant to be invoked in case of a
|
||||
@ -3223,6 +3229,19 @@ print_stop_reason (enum inferior_stop_reason stop_reason, int stop_info)
|
||||
break;
|
||||
case SIGNAL_EXITED:
|
||||
/* The inferior was terminated by a signal. */
|
||||
#ifdef UI_OUT
|
||||
annotate_signalled ();
|
||||
ui_out_text (uiout, "\nProgram terminated with signal ");
|
||||
annotate_signal_name ();
|
||||
ui_out_field_string (uiout, "signal-name", target_signal_to_name (stop_info));
|
||||
annotate_signal_name_end ();
|
||||
ui_out_text (uiout, ", ");
|
||||
annotate_signal_string ();
|
||||
ui_out_field_string (uiout, "signal-meaning", target_signal_to_string (stop_info));
|
||||
annotate_signal_string_end ();
|
||||
ui_out_text (uiout, ".\n");
|
||||
ui_out_text (uiout, "The program no longer exists.\n");
|
||||
#else
|
||||
annotate_signalled ();
|
||||
printf_filtered ("\nProgram terminated with signal ");
|
||||
annotate_signal_name ();
|
||||
@ -3236,19 +3255,46 @@ print_stop_reason (enum inferior_stop_reason stop_reason, int stop_info)
|
||||
|
||||
printf_filtered ("The program no longer exists.\n");
|
||||
gdb_flush (gdb_stdout);
|
||||
#endif
|
||||
break;
|
||||
case EXITED:
|
||||
/* The inferior program is finished. */
|
||||
#ifdef UI_OUT
|
||||
annotate_exited (stop_info);
|
||||
if (stop_info)
|
||||
{
|
||||
ui_out_text (uiout, "\nProgram exited with code ");
|
||||
ui_out_field_fmt (uiout, "exit-code", "0%o", (unsigned int) stop_info);
|
||||
ui_out_text (uiout, ".\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
ui_out_text (uiout, "\nProgram exited normally.\n");
|
||||
}
|
||||
#else
|
||||
annotate_exited (stop_info);
|
||||
if (stop_info)
|
||||
printf_filtered ("\nProgram exited with code 0%o.\n",
|
||||
(unsigned int) stop_info);
|
||||
else
|
||||
printf_filtered ("\nProgram exited normally.\n");
|
||||
#endif
|
||||
break;
|
||||
case SIGNAL_RECEIVED:
|
||||
/* Signal received. The signal table tells us to print about
|
||||
it. */
|
||||
#ifdef UI_OUT
|
||||
annotate_signal ();
|
||||
ui_out_text (uiout, "\nProgram received signal ");
|
||||
annotate_signal_name ();
|
||||
ui_out_field_string (uiout, "signal-name", target_signal_to_name (stop_info));
|
||||
annotate_signal_name_end ();
|
||||
ui_out_text (uiout, ", ");
|
||||
annotate_signal_string ();
|
||||
ui_out_field_string (uiout, "signal-meaning", target_signal_to_string (stop_info));
|
||||
annotate_signal_string_end ();
|
||||
ui_out_text (uiout, ".\n");
|
||||
#else
|
||||
annotate_signal ();
|
||||
printf_filtered ("\nProgram received signal ");
|
||||
annotate_signal_name ();
|
||||
@ -3260,6 +3306,7 @@ print_stop_reason (enum inferior_stop_reason stop_reason, int stop_info)
|
||||
annotate_signal_string_end ();
|
||||
printf_filtered (".\n");
|
||||
gdb_flush (gdb_stdout);
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
internal_error ("print_stop_reason: unrecognized enum value");
|
||||
|
@ -32,6 +32,7 @@
|
||||
|
||||
#include "gdb_string.h"
|
||||
#include "event-loop.h"
|
||||
#include "ui-out.h"
|
||||
#if defined (TUI) || defined (GDBTK)
|
||||
/* FIXME: cagney/2000-01-31: This #include is to allow older code such
|
||||
as that found in the TUI to continue to build. */
|
||||
@ -254,6 +255,9 @@ captured_main (void *data)
|
||||
{"command", required_argument, 0, 'x'},
|
||||
{"version", no_argument, &print_version, 1},
|
||||
{"x", required_argument, 0, 'x'},
|
||||
{"ui", required_argument, 0, 'i'},
|
||||
{"interpreter", required_argument, 0, 'i'},
|
||||
{"i", required_argument, 0, 'i'},
|
||||
{"directory", required_argument, 0, 'd'},
|
||||
{"d", required_argument, 0, 'd'},
|
||||
{"cd", required_argument, 0, 11},
|
||||
@ -737,6 +741,10 @@ Options:\n\n\
|
||||
--exec=EXECFILE Use EXECFILE as the executable.\n\
|
||||
--fullname Output information used by emacs-GDB interface.\n\
|
||||
--help Print this message.\n\
|
||||
", stream);
|
||||
fputs_unfiltered ("\
|
||||
--interpreter=INTERP\n\
|
||||
Select a specific interpreter / user interface\n\
|
||||
", stream);
|
||||
fputs_unfiltered ("\
|
||||
--mapped Use mapped symbol files if supported on this system.\n\
|
||||
|
@ -35,6 +35,9 @@
|
||||
#include "annotate.h"
|
||||
#include "symfile.h" /* for overlay functions */
|
||||
#include "objfiles.h" /* ditto */
|
||||
#ifdef UI_OUT
|
||||
#include "ui-out.h"
|
||||
#endif
|
||||
|
||||
extern int asm_demangle; /* Whether to demangle syms in asm printouts */
|
||||
extern int addressprint; /* Whether to print hex addresses in HLL " */
|
||||
@ -1777,6 +1780,13 @@ print_frame_args (func, fi, num, stream)
|
||||
int arg_size;
|
||||
/* Number of ints of arguments that we have printed so far. */
|
||||
int args_printed = 0;
|
||||
#ifdef UI_OUT
|
||||
struct cleanup *old_chain;
|
||||
struct ui_stream *stb;
|
||||
|
||||
stb = ui_out_stream_new (uiout);
|
||||
old_chain = make_cleanup ((make_cleanup_func) ui_out_stream_delete, stb);
|
||||
#endif /* UI_OUT */
|
||||
|
||||
if (func)
|
||||
{
|
||||
@ -1881,6 +1891,21 @@ print_frame_args (func, fi, num, stream)
|
||||
sym = nsym;
|
||||
}
|
||||
|
||||
#ifdef UI_OUT
|
||||
/* Print the current arg. */
|
||||
if (!first)
|
||||
ui_out_text (uiout, ", ");
|
||||
ui_out_wrap_hint (uiout, " ");
|
||||
|
||||
annotate_arg_begin ();
|
||||
|
||||
ui_out_list_begin (uiout, NULL);
|
||||
fprintf_symbol_filtered (stb->stream, SYMBOL_SOURCE_NAME (sym),
|
||||
SYMBOL_LANGUAGE (sym), DMGL_PARAMS | DMGL_ANSI);
|
||||
ui_out_field_stream (uiout, "name", stb);
|
||||
annotate_arg_name_end ();
|
||||
ui_out_text (uiout, "=");
|
||||
#else
|
||||
/* Print the current arg. */
|
||||
if (!first)
|
||||
fprintf_filtered (stream, ", ");
|
||||
@ -1892,6 +1917,7 @@ print_frame_args (func, fi, num, stream)
|
||||
SYMBOL_LANGUAGE (sym), DMGL_PARAMS | DMGL_ANSI);
|
||||
annotate_arg_name_end ();
|
||||
fputs_filtered ("=", stream);
|
||||
#endif
|
||||
|
||||
/* Avoid value_print because it will deref ref parameters. We just
|
||||
want to print their addresses. Print ??? for args whose address
|
||||
@ -1907,12 +1933,24 @@ print_frame_args (func, fi, num, stream)
|
||||
if (GDB_TARGET_IS_D10V
|
||||
&& SYMBOL_CLASS (sym) == LOC_REGPARM && TYPE_CODE (VALUE_TYPE (val)) == TYPE_CODE_PTR)
|
||||
TYPE_LENGTH (VALUE_TYPE (val)) = 2;
|
||||
#ifdef UI_OUT
|
||||
val_print (VALUE_TYPE (val), VALUE_CONTENTS (val), 0,
|
||||
VALUE_ADDRESS (val),
|
||||
stb->stream, 0, 0, 2, Val_no_prettyprint);
|
||||
ui_out_field_stream (uiout, "value", stb);
|
||||
}
|
||||
else
|
||||
ui_out_text (uiout, "???");
|
||||
|
||||
ui_out_list_end (uiout);
|
||||
#else
|
||||
val_print (VALUE_TYPE (val), VALUE_CONTENTS (val), 0,
|
||||
VALUE_ADDRESS (val),
|
||||
stream, 0, 0, 2, Val_no_prettyprint);
|
||||
}
|
||||
else
|
||||
fputs_filtered ("???", stream);
|
||||
#endif
|
||||
|
||||
annotate_arg_end ();
|
||||
|
||||
@ -1933,6 +1971,9 @@ print_frame_args (func, fi, num, stream)
|
||||
print_frame_nameless_args (fi, start, num - args_printed,
|
||||
first, stream);
|
||||
}
|
||||
#ifdef UI_OUT
|
||||
do_cleanups (old_chain);
|
||||
#endif /* no UI_OUT */
|
||||
}
|
||||
|
||||
/* Print nameless args on STREAM.
|
||||
|
@ -758,7 +758,13 @@ record_currthread (currthread)
|
||||
if (!in_thread_list (currthread))
|
||||
{
|
||||
add_thread (currthread);
|
||||
#ifdef UI_OUT
|
||||
ui_out_text (uiout, "[New ");
|
||||
ui_out_text (uiout, target_pid_to_str (currthread));
|
||||
ui_out_text (uiout, "]\n");
|
||||
#else
|
||||
printf_filtered ("[New %s]\n", target_pid_to_str (currthread));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
62
gdb/source.c
62
gdb/source.c
@ -38,6 +38,9 @@
|
||||
#include "objfiles.h"
|
||||
#include "annotate.h"
|
||||
#include "gdbtypes.h"
|
||||
#ifdef UI_OUT
|
||||
#include "ui-out.h"
|
||||
#endif
|
||||
|
||||
#ifdef CRLF_SOURCE_FILES
|
||||
|
||||
@ -1011,6 +1014,11 @@ print_source_lines_base (s, line, stopline, noerror)
|
||||
current_source_line = line;
|
||||
first_line_listed = line;
|
||||
|
||||
#ifdef UI_OUT
|
||||
/* If printing of source lines is disabled, just print file and line number */
|
||||
if (ui_out_test_flags (uiout, ui_source_list))
|
||||
{
|
||||
#endif
|
||||
/* Only prints "No such file or directory" once */
|
||||
if ((s != last_source_visited) || (!last_source_error))
|
||||
{
|
||||
@ -1022,6 +1030,14 @@ print_source_lines_base (s, line, stopline, noerror)
|
||||
desc = last_source_error;
|
||||
noerror = 1;
|
||||
}
|
||||
#ifdef UI_OUT
|
||||
}
|
||||
else
|
||||
{
|
||||
desc = -1;
|
||||
noerror = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (desc < 0)
|
||||
{
|
||||
@ -1034,7 +1050,14 @@ print_source_lines_base (s, line, stopline, noerror)
|
||||
print_sys_errmsg (name, errno);
|
||||
}
|
||||
else
|
||||
#ifdef UI_OUT
|
||||
ui_out_field_int (uiout, "line", line);
|
||||
ui_out_text (uiout, "\tin ");
|
||||
ui_out_field_string (uiout, "file", s->filename);
|
||||
ui_out_text (uiout, "\n");
|
||||
#else
|
||||
printf_filtered ("%d\tin %s\n", line, s->filename);
|
||||
#endif
|
||||
|
||||
return;
|
||||
}
|
||||
@ -1062,6 +1085,44 @@ print_source_lines_base (s, line, stopline, noerror)
|
||||
|
||||
while (nlines-- > 0)
|
||||
{
|
||||
#ifdef UI_OUT
|
||||
char buf[20];
|
||||
|
||||
c = fgetc (stream);
|
||||
if (c == EOF)
|
||||
break;
|
||||
last_line_listed = current_source_line;
|
||||
sprintf (buf, "%d\t", current_source_line++);
|
||||
ui_out_text (uiout, buf);
|
||||
do
|
||||
{
|
||||
if (c < 040 && c != '\t' && c != '\n' && c != '\r')
|
||||
{
|
||||
sprintf (buf, "^%c", c + 0100);
|
||||
ui_out_text (uiout, buf);
|
||||
}
|
||||
else if (c == 0177)
|
||||
ui_out_text (uiout, "^?");
|
||||
#ifdef CRLF_SOURCE_FILES
|
||||
else if (c == '\r')
|
||||
{
|
||||
/* Skip a \r character, but only before a \n. */
|
||||
int c1 = fgetc (stream);
|
||||
|
||||
if (c1 != '\n')
|
||||
printf_filtered ("^%c", c + 0100);
|
||||
if (c1 != EOF)
|
||||
ungetc (c1, stream);
|
||||
}
|
||||
#endif
|
||||
else
|
||||
{
|
||||
sprintf (buf, "%c", c);
|
||||
ui_out_text (uiout, buf);
|
||||
}
|
||||
}
|
||||
while (c != '\n' && (c = fgetc (stream)) >= 0);
|
||||
#else
|
||||
c = fgetc (stream);
|
||||
if (c == EOF)
|
||||
break;
|
||||
@ -1083,6 +1144,7 @@ print_source_lines_base (s, line, stopline, noerror)
|
||||
printf_filtered ("%c", c);
|
||||
}
|
||||
while (c != '\n' && (c = fgetc (stream)) >= 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
fclose (stream);
|
||||
|
104
gdb/stack.c
104
gdb/stack.c
@ -36,6 +36,9 @@
|
||||
#include "annotate.h"
|
||||
#include "symfile.h"
|
||||
#include "objfiles.h"
|
||||
#ifdef UI_OUT
|
||||
#include "ui-out.h"
|
||||
#endif
|
||||
|
||||
/* Prototypes for exported functions. */
|
||||
|
||||
@ -429,8 +432,13 @@ print_frame_info_base (fi, level, source, args)
|
||||
{
|
||||
if (addressprint && mid_statement && !tui_version)
|
||||
{
|
||||
#ifdef UI_OUT
|
||||
ui_out_field_core_addr (uiout, "addr", fi->pc);
|
||||
ui_out_text (uiout, "\t");
|
||||
#else
|
||||
print_address_numeric (fi->pc, 1, gdb_stdout);
|
||||
printf_filtered ("\t");
|
||||
#endif
|
||||
}
|
||||
if (print_frame_info_listing_hook)
|
||||
print_frame_info_listing_hook (sal.symtab, sal.line, sal.line + 1, 0);
|
||||
@ -458,6 +466,13 @@ print_frame (struct frame_info *fi,
|
||||
struct symbol *func;
|
||||
register char *funname = 0;
|
||||
enum language funlang = language_unknown;
|
||||
#ifdef UI_OUT
|
||||
struct ui_stream *stb;
|
||||
struct cleanup *old_chain;
|
||||
|
||||
stb = ui_out_stream_new (uiout);
|
||||
old_chain = make_cleanup ((make_cleanup_func) ui_out_stream_delete, stb);
|
||||
#endif /* UI_OUT */
|
||||
|
||||
func = find_pc_function (fi->pc);
|
||||
if (func)
|
||||
@ -536,37 +551,87 @@ print_frame (struct frame_info *fi,
|
||||
|
||||
annotate_frame_begin (level == -1 ? 0 : level, fi->pc);
|
||||
|
||||
#ifdef UI_OUT
|
||||
ui_out_list_begin (uiout, "frame");
|
||||
#endif
|
||||
|
||||
if (level >= 0)
|
||||
printf_filtered ("#%-2d ", level);
|
||||
{
|
||||
#ifdef UI_OUT
|
||||
ui_out_text (uiout, "#");
|
||||
ui_out_field_fmt (uiout, "level", "%-2d", level);
|
||||
ui_out_spaces (uiout, 1);
|
||||
#else
|
||||
printf_filtered ("#%-2d ", level);
|
||||
#endif
|
||||
}
|
||||
if (addressprint)
|
||||
if (fi->pc != sal.pc || !sal.symtab || source == LOC_AND_ADDRESS)
|
||||
{
|
||||
annotate_frame_address ();
|
||||
#ifdef UI_OUT
|
||||
ui_out_field_core_addr (uiout, "addr", fi->pc);
|
||||
annotate_frame_address_end ();
|
||||
ui_out_text (uiout, " in ");
|
||||
#else
|
||||
print_address_numeric (fi->pc, 1, gdb_stdout);
|
||||
annotate_frame_address_end ();
|
||||
printf_filtered (" in ");
|
||||
#endif
|
||||
}
|
||||
annotate_frame_function_name ();
|
||||
#ifdef UI_OUT
|
||||
fprintf_symbol_filtered (stb->stream, funname ? funname : "??", funlang,
|
||||
DMGL_ANSI);
|
||||
ui_out_field_stream (uiout, "func", stb);
|
||||
ui_out_wrap_hint (uiout, " ");
|
||||
#else
|
||||
fprintf_symbol_filtered (gdb_stdout, funname ? funname : "??", funlang,
|
||||
DMGL_ANSI);
|
||||
wrap_here (" ");
|
||||
#endif
|
||||
annotate_frame_args ();
|
||||
|
||||
#ifdef UI_OUT
|
||||
ui_out_text (uiout, " (");
|
||||
#else
|
||||
fputs_filtered (" (", gdb_stdout);
|
||||
#endif
|
||||
if (args)
|
||||
{
|
||||
struct print_args_args args;
|
||||
args.fi = fi;
|
||||
args.func = func;
|
||||
args.stream = gdb_stdout;
|
||||
#ifdef UI_OUT
|
||||
ui_out_list_begin (uiout, "args");
|
||||
catch_errors (print_args_stub, &args, "", RETURN_MASK_ALL);
|
||||
/* FIXME: args must be a list. If one argument is a string it will
|
||||
have " that will not be properly escaped. */
|
||||
ui_out_list_end (uiout);
|
||||
#else
|
||||
catch_errors (print_args_stub, &args, "", RETURN_MASK_ALL);
|
||||
#endif
|
||||
QUIT;
|
||||
}
|
||||
#ifdef UI_OUT
|
||||
ui_out_text (uiout, ")");
|
||||
#else
|
||||
printf_filtered (")");
|
||||
#endif
|
||||
if (sal.symtab && sal.symtab->filename)
|
||||
{
|
||||
annotate_frame_source_begin ();
|
||||
#ifdef UI_OUT
|
||||
ui_out_wrap_hint (uiout, " ");
|
||||
ui_out_text (uiout, " at ");
|
||||
annotate_frame_source_file ();
|
||||
ui_out_field_string (uiout, "file", sal.symtab->filename);
|
||||
annotate_frame_source_file_end ();
|
||||
ui_out_text (uiout, ":");
|
||||
annotate_frame_source_line ();
|
||||
ui_out_field_int (uiout, "line", sal.line);
|
||||
#else
|
||||
wrap_here (" ");
|
||||
printf_filtered (" at ");
|
||||
annotate_frame_source_file ();
|
||||
@ -575,6 +640,7 @@ print_frame (struct frame_info *fi,
|
||||
printf_filtered (":");
|
||||
annotate_frame_source_line ();
|
||||
printf_filtered ("%d", sal.line);
|
||||
#endif
|
||||
annotate_frame_source_end ();
|
||||
}
|
||||
|
||||
@ -585,8 +651,14 @@ print_frame (struct frame_info *fi,
|
||||
if (!funname)
|
||||
{
|
||||
annotate_frame_where ();
|
||||
#ifdef UI_OUT
|
||||
ui_out_wrap_hint (uiout, " ");
|
||||
ui_out_text (uiout, " from ");
|
||||
ui_out_field_string (uiout, "from", PC_LOAD_SEGMENT (fi->pc));
|
||||
#else
|
||||
wrap_here (" ");
|
||||
printf_filtered (" from %s", PC_LOAD_SEGMENT (fi->pc));
|
||||
#endif
|
||||
}
|
||||
#endif /* PC_LOAD_SEGMENT */
|
||||
|
||||
@ -597,13 +669,25 @@ print_frame (struct frame_info *fi,
|
||||
if (lib)
|
||||
{
|
||||
annotate_frame_where ();
|
||||
#ifdef UI_OUT
|
||||
ui_out_wrap_hint (uiout, " ");
|
||||
ui_out_text (uiout, " from ");
|
||||
ui_out_field_string (uiout, "from", lib);
|
||||
#else
|
||||
wrap_here (" ");
|
||||
printf_filtered (" from %s", lib);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif /* PC_SOLIB */
|
||||
|
||||
#ifdef UI_OUT
|
||||
ui_out_list_end (uiout);
|
||||
ui_out_text (uiout, "\n");
|
||||
do_cleanups (old_chain);
|
||||
#else
|
||||
printf_filtered ("\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -1649,6 +1733,15 @@ find_relative_frame (frame, level_offset_ptr)
|
||||
frame expressions. */
|
||||
|
||||
/* ARGSUSED */
|
||||
#ifdef UI_OUT
|
||||
void
|
||||
select_frame_command_wrapper (level_exp, from_tty)
|
||||
char *level_exp;
|
||||
int from_tty;
|
||||
{
|
||||
select_frame_command (level_exp, from_tty);
|
||||
}
|
||||
#endif
|
||||
static void
|
||||
select_frame_command (level_exp, from_tty)
|
||||
char *level_exp;
|
||||
@ -1798,6 +1891,15 @@ down_command (count_exp, from_tty)
|
||||
show_and_print_stack_frame (selected_frame, selected_frame_level, 1);
|
||||
}
|
||||
|
||||
#ifdef UI_OUT
|
||||
void
|
||||
return_command_wrapper (retval_exp, from_tty)
|
||||
char *retval_exp;
|
||||
int from_tty;
|
||||
{
|
||||
return_command (retval_exp, from_tty);
|
||||
}
|
||||
#endif
|
||||
static void
|
||||
return_command (retval_exp, from_tty)
|
||||
char *retval_exp;
|
||||
|
@ -1299,9 +1299,14 @@ generic_load (char *args, int from_tty)
|
||||
|
||||
/* Is this really necessary? I guess it gives the user something
|
||||
to look at during a long download. */
|
||||
#ifdef UI_OUT
|
||||
ui_out_message (uiout, 0, "Loading section %s, size 0x%s lma 0x%s\n",
|
||||
sect_name, paddr_nz (size), paddr_nz (lma));
|
||||
#else
|
||||
fprintf_unfiltered (gdb_stdout,
|
||||
"Loading section %s, size 0x%s lma 0x%s\n",
|
||||
sect_name, paddr_nz (size), paddr_nz (lma));
|
||||
#endif
|
||||
|
||||
bfd_get_section_contents (loadfile_bfd, s, buffer, 0, size);
|
||||
|
||||
@ -1364,9 +1369,18 @@ generic_load (char *args, int from_tty)
|
||||
{
|
||||
CORE_ADDR entry;
|
||||
entry = bfd_get_start_address (loadfile_bfd);
|
||||
#ifdef UI_OUT
|
||||
ui_out_text (uiout, "Start address ");
|
||||
ui_out_field_fmt (uiout, "address", "0x%s" , paddr_nz (entry));
|
||||
ui_out_text (uiout, ", load size ");
|
||||
ui_out_field_fmt (uiout, "load-size", "%ld" , data_count);
|
||||
ui_out_text (uiout, "\n");
|
||||
|
||||
#else
|
||||
fprintf_unfiltered (gdb_stdout,
|
||||
"Start address 0x%s , load size %ld\n",
|
||||
paddr_nz (entry), data_count);
|
||||
#endif
|
||||
/* We were doing this in remote-mips.c, I suspect it is right
|
||||
for other targets too. */
|
||||
write_pc (entry);
|
||||
@ -1404,6 +1418,27 @@ print_transfer_performance (struct ui_file *stream,
|
||||
unsigned long write_count,
|
||||
unsigned long time_count)
|
||||
{
|
||||
#ifdef UI_OUT
|
||||
ui_out_text (uiout, "Transfer rate: ");
|
||||
if (time_count > 0)
|
||||
{
|
||||
ui_out_field_fmt (uiout, "transfer-rate", "%ld",
|
||||
(data_count * 8) / time_count);
|
||||
ui_out_text (uiout, " bits/sec");
|
||||
}
|
||||
else
|
||||
{
|
||||
ui_out_field_fmt (uiout, "transferred-bits", "%ld", (data_count * 8));
|
||||
ui_out_text (uiout, " bits in <1 sec");
|
||||
}
|
||||
if (write_count > 0)
|
||||
{
|
||||
ui_out_text (uiout, ", ");
|
||||
ui_out_field_fmt (uiout, "write-rate", "%ld", data_count / write_count);
|
||||
ui_out_text (uiout, " bytes/write");
|
||||
}
|
||||
ui_out_text (uiout, ".\n");
|
||||
#else
|
||||
fprintf_unfiltered (stream, "Transfer rate: ");
|
||||
if (time_count > 0)
|
||||
fprintf_unfiltered (stream, "%ld bits/sec", (data_count * 8) / time_count);
|
||||
@ -1412,6 +1447,7 @@ print_transfer_performance (struct ui_file *stream,
|
||||
if (write_count > 0)
|
||||
fprintf_unfiltered (stream, ", %ld bytes/write", data_count / write_count);
|
||||
fprintf_unfiltered (stream, ".\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
/* This function allows the addition of incrementally linked object files.
|
||||
|
@ -4031,6 +4031,15 @@ methods_info (regexp)
|
||||
#endif /* 0 */
|
||||
|
||||
/* Breakpoint all functions matching regular expression. */
|
||||
#ifdef UI_OUT
|
||||
void
|
||||
rbreak_command_wrapper (regexp, from_tty)
|
||||
char *regexp;
|
||||
int from_tty;
|
||||
{
|
||||
rbreak_command (regexp, from_tty);
|
||||
}
|
||||
#endif
|
||||
static void
|
||||
rbreak_command (regexp, from_tty)
|
||||
char *regexp;
|
||||
|
@ -1,3 +1,14 @@
|
||||
2000-02-02 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* gdb.base/step-test.exp: Fix the steps to enter a callee by means
|
||||
of successive stepi commands -- while in the prologue we should see
|
||||
the function entry bracket.
|
||||
|
||||
2000-02-02 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* gdb.base/ending-run.exp: Add ARM in thumb mode case, where we
|
||||
reach __change_mode() when stepping through the end of main().
|
||||
|
||||
2000-01-17 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* gdb.base/default.exp: Fix expected pattern.
|
||||
|
27
gdb/testsuite/configure
vendored
27
gdb/testsuite/configure
vendored
@ -32,6 +32,7 @@ program_suffix=NONE
|
||||
program_transform_name=s,x,x,
|
||||
silent=
|
||||
site=
|
||||
sitefile=
|
||||
srcdir=
|
||||
target=NONE
|
||||
verbose=
|
||||
@ -146,6 +147,7 @@ Configuration:
|
||||
--help print this message
|
||||
--no-create do not create output files
|
||||
--quiet, --silent do not print \`checking...' messages
|
||||
--site-file=FILE use FILE as the site file
|
||||
--version print the version of autoconf that created configure
|
||||
Directory and file names:
|
||||
--prefix=PREFIX install architecture-independent files in PREFIX
|
||||
@ -316,6 +318,11 @@ EOF
|
||||
-site=* | --site=* | --sit=*)
|
||||
site="$ac_optarg" ;;
|
||||
|
||||
-site-file | --site-file | --site-fil | --site-fi | --site-f)
|
||||
ac_prev=sitefile ;;
|
||||
-site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
|
||||
sitefile="$ac_optarg" ;;
|
||||
|
||||
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
|
||||
ac_prev=srcdir ;;
|
||||
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
|
||||
@ -481,12 +488,16 @@ fi
|
||||
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
|
||||
|
||||
# Prefer explicitly selected file to automatically selected ones.
|
||||
if test -z "$CONFIG_SITE"; then
|
||||
if test "x$prefix" != xNONE; then
|
||||
CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
|
||||
else
|
||||
CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
|
||||
if test -z "$sitefile"; then
|
||||
if test -z "$CONFIG_SITE"; then
|
||||
if test "x$prefix" != xNONE; then
|
||||
CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
|
||||
else
|
||||
CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
CONFIG_SITE="$sitefile"
|
||||
fi
|
||||
for ac_site_file in $CONFIG_SITE; do
|
||||
if test -r "$ac_site_file"; then
|
||||
@ -575,7 +586,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
|
||||
fi
|
||||
|
||||
echo $ac_n "checking host system type""... $ac_c" 1>&6
|
||||
echo "configure:579: checking host system type" >&5
|
||||
echo "configure:590: checking host system type" >&5
|
||||
|
||||
host_alias=$host
|
||||
case "$host_alias" in
|
||||
@ -596,7 +607,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
||||
echo "$ac_t""$host" 1>&6
|
||||
|
||||
echo $ac_n "checking target system type""... $ac_c" 1>&6
|
||||
echo "configure:600: checking target system type" >&5
|
||||
echo "configure:611: checking target system type" >&5
|
||||
|
||||
target_alias=$target
|
||||
case "$target_alias" in
|
||||
@ -614,7 +625,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
||||
echo "$ac_t""$target" 1>&6
|
||||
|
||||
echo $ac_n "checking build system type""... $ac_c" 1>&6
|
||||
echo "configure:618: checking build system type" >&5
|
||||
echo "configure:629: checking build system type" >&5
|
||||
|
||||
build_alias=$build
|
||||
case "$build_alias" in
|
||||
|
@ -145,6 +145,10 @@ gdb_expect {
|
||||
# This is what happens on Solaris currently -sts 1999-08-25
|
||||
pass "step out of main on Solaris"
|
||||
}
|
||||
-re ".*in ..change.mode ().*$gdb_prompt $" {
|
||||
# This is what happens on ARM in thumb mode -fn 2000-02-01
|
||||
pass "step out of main on ARM thumb"
|
||||
}
|
||||
-re ".*in.*\\\$START\\\$.*from.*dld.sl.*$gdb_prompt $" {
|
||||
pass "step out of main"
|
||||
}
|
||||
|
@ -142,6 +142,9 @@ test_i "stepi to next line" "stepi" \
|
||||
test_i "stepi into function" "stepi" \
|
||||
".*${decimal}.*callee.*STEPI" \
|
||||
".*callee \\(\\) at .*step-test\\.c"
|
||||
test_i "stepi to function first line" "stepi" \
|
||||
".*int callee\\(\\) .*\\{" \
|
||||
".*myglob.*"
|
||||
# Have to be careful here, if the finish does not work,
|
||||
# then we may run to the end of the program, which
|
||||
# will cause erroneous failures in the rest of the tests
|
||||
@ -178,7 +181,7 @@ gdb_expect {
|
||||
return
|
||||
}
|
||||
timeout {
|
||||
fail "stepi: finish call"
|
||||
fail "stepi: finish call (timeout)"
|
||||
return
|
||||
}
|
||||
}
|
||||
|
51
gdb/thread.c
51
gdb/thread.c
@ -35,6 +35,9 @@
|
||||
#include <ctype.h>
|
||||
#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
#ifdef UI_OUT
|
||||
#include "ui-out.h"
|
||||
#endif
|
||||
|
||||
/*#include "lynxos-core.h" */
|
||||
|
||||
@ -250,6 +253,37 @@ in_thread_list (pid)
|
||||
|
||||
return 0; /* Never heard of 'im */
|
||||
}
|
||||
#ifdef UI_OUT
|
||||
/* Print a list of thread ids currently known, and the total number of
|
||||
threads. To be used from within catch_errors. */
|
||||
static int
|
||||
do_captured_list_thread_ids (void *arg)
|
||||
{
|
||||
struct thread_info *tp;
|
||||
int num = 0;
|
||||
|
||||
ui_out_list_begin (uiout, "thread-ids");
|
||||
|
||||
for (tp = thread_list; tp; tp = tp->next)
|
||||
{
|
||||
num++;
|
||||
ui_out_field_int (uiout, "thread-id", tp->num);
|
||||
}
|
||||
|
||||
ui_out_list_end (uiout);
|
||||
ui_out_field_int (uiout, "number-of-threads", num);
|
||||
return GDB_RC_OK;
|
||||
}
|
||||
|
||||
/* Official gdblib interface function to get a list of thread ids and
|
||||
the total number. */
|
||||
enum gdb_rc
|
||||
gdb_list_thread_ids (/* output object */)
|
||||
{
|
||||
return catch_errors (do_captured_list_thread_ids, NULL,
|
||||
NULL, RETURN_MASK_ALL);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Load infrun state for the thread PID. */
|
||||
|
||||
@ -633,15 +667,31 @@ do_captured_thread_select (void *tidstr)
|
||||
|
||||
tp = find_thread_id (num);
|
||||
|
||||
#ifdef UI_OUT
|
||||
if (!tp)
|
||||
error ("Thread ID %d not known.", num);
|
||||
#else
|
||||
if (!tp)
|
||||
error ("Thread ID %d not known. Use the \"info threads\" command to\n\
|
||||
see the IDs of currently known threads.", num);
|
||||
#endif
|
||||
|
||||
if (!thread_alive (tp))
|
||||
error ("Thread ID %d has terminated.\n", num);
|
||||
|
||||
switch_to_thread (tp->pid);
|
||||
|
||||
#ifdef UI_OUT
|
||||
ui_out_text (uiout, "[Switching to thread ");
|
||||
ui_out_field_int (uiout, "new-thread-id", pid_to_thread_id (inferior_pid));
|
||||
ui_out_text (uiout, " (");
|
||||
#if defined(HPUXHPPA)
|
||||
ui_out_text (uiout, target_tid_to_str (inferior_pid));
|
||||
#else
|
||||
ui_out_text (uiout, target_pid_to_str (inferior_pid));
|
||||
#endif
|
||||
ui_out_text (uiout, ")]");
|
||||
#else /* UI_OUT */
|
||||
printf_filtered ("[Switching to thread %d (%s)]\n",
|
||||
pid_to_thread_id (inferior_pid),
|
||||
#if defined(HPUXHPPA)
|
||||
@ -650,6 +700,7 @@ see the IDs of currently known threads.", num);
|
||||
target_pid_to_str (inferior_pid)
|
||||
#endif
|
||||
);
|
||||
#endif /* UI_OUT */
|
||||
|
||||
print_stack_frame (selected_frame, selected_frame_level, 1);
|
||||
return GDB_RC_OK;
|
||||
|
143
gdb/top.c
143
gdb/top.c
@ -50,6 +50,10 @@
|
||||
#include "gdb_string.h"
|
||||
#include "gdb_stat.h"
|
||||
#include <ctype.h>
|
||||
#ifdef UI_OUT
|
||||
#include "ui-out.h"
|
||||
#include "cli-out.h"
|
||||
#endif
|
||||
|
||||
/* Prototypes for local functions */
|
||||
|
||||
@ -774,8 +778,11 @@ gdb_init (argv0)
|
||||
set_language (language_c);
|
||||
expected_language = current_language; /* don't warn about the change. */
|
||||
|
||||
/* All the interpreters should have had a look at things by now.
|
||||
Initialize the selected interpreter. */
|
||||
#ifdef UI_OUT
|
||||
/* Install the default UI */
|
||||
uiout = cli_out_new (gdb_stdout);
|
||||
#endif
|
||||
|
||||
if (init_ui_hook)
|
||||
init_ui_hook (argv0);
|
||||
}
|
||||
@ -835,6 +842,97 @@ get_command_line (type, arg)
|
||||
}
|
||||
|
||||
/* Recursively print a command (including full control structures). */
|
||||
#ifdef UI_OUT
|
||||
void
|
||||
print_command_lines (uiout, cmd, depth)
|
||||
struct ui_out *uiout;
|
||||
struct command_line *cmd;
|
||||
unsigned int depth;
|
||||
{
|
||||
struct command_line *list;
|
||||
|
||||
list = cmd;
|
||||
while (list)
|
||||
{
|
||||
|
||||
if (depth)
|
||||
ui_out_spaces (uiout, 2 * depth);
|
||||
|
||||
/* A simple command, print it and continue. */
|
||||
if (list->control_type == simple_control)
|
||||
{
|
||||
ui_out_field_string (uiout, NULL, list->line);
|
||||
ui_out_text (uiout, "\n");
|
||||
list = list->next;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* loop_continue to jump to the start of a while loop, print it
|
||||
and continue. */
|
||||
if (list->control_type == continue_control)
|
||||
{
|
||||
ui_out_field_string (uiout, NULL, "loop_continue");
|
||||
ui_out_text (uiout, "\n");
|
||||
list = list->next;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* loop_break to break out of a while loop, print it and continue. */
|
||||
if (list->control_type == break_control)
|
||||
{
|
||||
ui_out_field_string (uiout, NULL, "loop_break");
|
||||
ui_out_text (uiout, "\n");
|
||||
list = list->next;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* A while command. Recursively print its subcommands and continue. */
|
||||
if (list->control_type == while_control)
|
||||
{
|
||||
ui_out_text (uiout, "while ");
|
||||
ui_out_field_fmt (uiout, NULL, "while %s", list->line);
|
||||
ui_out_text (uiout, "\n");
|
||||
print_command_lines (uiout, *list->body_list, depth + 1);
|
||||
ui_out_field_string (uiout, NULL, "end");
|
||||
if (depth)
|
||||
ui_out_spaces (uiout, 2 * depth);
|
||||
ui_out_text (uiout, "end\n");
|
||||
list = list->next;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* An if command. Recursively print both arms before continueing. */
|
||||
if (list->control_type == if_control)
|
||||
{
|
||||
ui_out_text (uiout, "if ");
|
||||
ui_out_field_fmt (uiout, NULL, "if %s", list->line);
|
||||
ui_out_text (uiout, "\n");
|
||||
/* The true arm. */
|
||||
print_command_lines (uiout, list->body_list[0], depth + 1);
|
||||
|
||||
/* Show the false arm if it exists. */
|
||||
if (list->body_count == 2)
|
||||
{
|
||||
if (depth)
|
||||
ui_out_spaces (uiout, 2 * depth);
|
||||
ui_out_field_string (uiout, NULL, "else");
|
||||
ui_out_text (uiout, "else\n");
|
||||
print_command_lines (uiout, list->body_list[1], depth + 1);
|
||||
}
|
||||
|
||||
ui_out_field_string (uiout, NULL, "end");
|
||||
if (depth)
|
||||
ui_out_spaces (uiout, 2 * depth);
|
||||
ui_out_text (uiout, "end\n");
|
||||
list = list->next;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* ignore illegal command type and try next */
|
||||
list = list->next;
|
||||
} /* while (list) */
|
||||
}
|
||||
#else
|
||||
void
|
||||
print_command_line (cmd, depth, stream)
|
||||
struct command_line *cmd;
|
||||
@ -915,6 +1013,7 @@ print_command_line (cmd, depth, stream)
|
||||
fputs_filtered ("end\n", stream);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Execute the command in CMD. */
|
||||
|
||||
@ -1514,6 +1613,41 @@ command_loop ()
|
||||
}
|
||||
}
|
||||
|
||||
/* Read commands from `instream' and execute them until end of file or
|
||||
error reading instream. This command loop doesnt care about any
|
||||
such things as displaying time and space usage. If the user asks
|
||||
for those, they won't work. */
|
||||
void
|
||||
simplified_command_loop (read_input_func, execute_command_func)
|
||||
char *(*read_input_func) (char *);
|
||||
void (*execute_command_func) (char *, int);
|
||||
{
|
||||
struct cleanup *old_chain;
|
||||
char *command;
|
||||
int stdin_is_tty = ISATTY (stdin);
|
||||
|
||||
while (instream && !feof (instream))
|
||||
{
|
||||
quit_flag = 0;
|
||||
if (instream == stdin && stdin_is_tty)
|
||||
reinitialize_more_filter ();
|
||||
old_chain = make_cleanup ((make_cleanup_func) command_loop_marker, 0);
|
||||
|
||||
/* Get a command-line. */
|
||||
command = (*read_input_func) (instream == stdin ?
|
||||
get_prompt () : (char *) NULL);
|
||||
|
||||
if (command == 0)
|
||||
return;
|
||||
|
||||
(*execute_command_func) (command, instream == stdin);
|
||||
|
||||
/* Do any commands attached to breakpoint we stopped at. */
|
||||
bpstat_do_actions (&stop_bpstat);
|
||||
|
||||
do_cleanups (old_chain);
|
||||
}
|
||||
}
|
||||
|
||||
/* Commands call this if they do not want to be repeated by null lines. */
|
||||
|
||||
@ -2975,7 +3109,12 @@ print_gdb_version (stream)
|
||||
program to parse, and is just canonical program name and version
|
||||
number, which starts after last space. */
|
||||
|
||||
#ifdef UI_OUT
|
||||
/* Print it console style until a format is defined */
|
||||
fprintf_filtered (stream, "GNU gdb %s (UI_OUT)\n", version);
|
||||
#else
|
||||
fprintf_filtered (stream, "GNU gdb %s\n", version);
|
||||
#endif
|
||||
|
||||
/* Second line is a copyright notice. */
|
||||
|
||||
|
@ -34,6 +34,8 @@ extern void cd_command PARAMS ((char *, int));
|
||||
extern void read_command_file PARAMS ((FILE *));
|
||||
extern void init_history PARAMS ((void));
|
||||
extern void command_loop PARAMS ((void));
|
||||
extern void simplified_command_loop PARAMS ((char *(*read_input_func) (char *),
|
||||
void (*execute_command_func) (char *, int)));
|
||||
extern int quit_confirm PARAMS ((void));
|
||||
extern void quit_force PARAMS ((char *, int));
|
||||
extern void quit_command PARAMS ((char *, int));
|
||||
|
1007
gdb/ui-out.c
Normal file
1007
gdb/ui-out.c
Normal file
File diff suppressed because it is too large
Load Diff
221
gdb/ui-out.h
Normal file
221
gdb/ui-out.h
Normal file
@ -0,0 +1,221 @@
|
||||
/* Output generating routines for GDB.
|
||||
Copyright 1999, 2000 Free Software Foundation, Inc.
|
||||
Contributed by Cygnus Solutions.
|
||||
Written by Fernando Nasser for Cygnus.
|
||||
|
||||
This file is part of GDB.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef UI_OUT_H
|
||||
#define UI_OUT_H 1
|
||||
|
||||
/* The ui_out structure */
|
||||
|
||||
#if __STDC__
|
||||
struct ui_out;
|
||||
struct ui_out_data;
|
||||
#endif
|
||||
|
||||
|
||||
/* the current ui_out */
|
||||
|
||||
/* FIXME: This should not be a global but something passed down from main.c
|
||||
or top.c */
|
||||
extern struct ui_out *uiout;
|
||||
|
||||
/* alignment enum */
|
||||
enum ui_align
|
||||
{
|
||||
ui_left = -1,
|
||||
ui_center,
|
||||
ui_right,
|
||||
ui_noalign
|
||||
};
|
||||
|
||||
/* flags enum */
|
||||
enum ui_flags
|
||||
{
|
||||
ui_from_tty = 1,
|
||||
ui_source_list = 2
|
||||
};
|
||||
|
||||
|
||||
/* The ui_out stream structure. */
|
||||
/* NOTE: cagney/2000-02-01: The ui_stream object can be subsumed by
|
||||
the more generic ui_file object. */
|
||||
|
||||
struct ui_stream
|
||||
{
|
||||
struct ui_out *uiout;
|
||||
struct ui_file *stream;
|
||||
};
|
||||
|
||||
|
||||
/* Prototypes for ui-out API. */
|
||||
|
||||
extern void ui_out_table_begin PARAMS ((struct ui_out * uiout, int nbrofcols,
|
||||
char *tblid));
|
||||
|
||||
extern void ui_out_table_header PARAMS ((struct ui_out * uiout, int width,
|
||||
enum ui_align align, char *colhdr));
|
||||
|
||||
extern void ui_out_table_body PARAMS ((struct ui_out * uiout));
|
||||
|
||||
extern void ui_out_table_end PARAMS ((struct ui_out * uiout));
|
||||
|
||||
extern void ui_out_list_begin PARAMS ((struct ui_out * uiout, char *lstid));
|
||||
|
||||
extern void ui_out_list_end PARAMS ((struct ui_out * uiout));
|
||||
|
||||
extern void ui_out_field_int PARAMS ((struct ui_out * uiout, char *fldname,
|
||||
int value));
|
||||
|
||||
extern void ui_out_field_core_addr PARAMS ((struct ui_out * uiout, char *fldname,
|
||||
CORE_ADDR address));
|
||||
|
||||
extern void ui_out_field_string (struct ui_out * uiout, char *fldname,
|
||||
const char *string);
|
||||
|
||||
extern void ui_out_field_stream PARAMS ((struct ui_out * uiout, char *fldname,
|
||||
struct ui_stream * buf));
|
||||
|
||||
extern void ui_out_field_fmt PARAMS ((struct ui_out * uiout, char *fldname,
|
||||
char *format,...));
|
||||
|
||||
extern void ui_out_field_skip PARAMS ((struct ui_out * uiout, char *fldname));
|
||||
|
||||
extern void ui_out_spaces PARAMS ((struct ui_out * uiout, int numspaces));
|
||||
|
||||
extern void ui_out_text PARAMS ((struct ui_out * uiout, char *string));
|
||||
|
||||
extern void ui_out_message PARAMS ((struct ui_out * uiout, int verbosity,
|
||||
char *format,...));
|
||||
|
||||
extern struct ui_stream *ui_out_stream_new PARAMS ((struct ui_out * uiout));
|
||||
|
||||
extern void ui_out_stream_delete PARAMS ((struct ui_stream * buf));
|
||||
|
||||
struct cleanup *make_cleanup_ui_out_stream_delete (struct ui_stream *buf);
|
||||
|
||||
extern void ui_out_wrap_hint PARAMS ((struct ui_out * uiout, char *identstring));
|
||||
|
||||
extern void ui_out_flush PARAMS ((struct ui_out * uiout));
|
||||
|
||||
extern void ui_out_get_field_separator PARAMS ((struct ui_out * uiout));
|
||||
|
||||
extern int ui_out_set_flags PARAMS ((struct ui_out * uiout, int mask));
|
||||
|
||||
extern int ui_out_clear_flags PARAMS ((struct ui_out * uiout, int mask));
|
||||
|
||||
extern int ui_out_get_verblvl PARAMS ((struct ui_out * uiout));
|
||||
|
||||
extern int ui_out_test_flags (struct ui_out *uiout, int mask);
|
||||
|
||||
#if 0
|
||||
extern void ui_out_result_begin PARAMS ((struct ui_out * uiout, char *class));
|
||||
|
||||
extern void ui_out_result_end PARAMS ((struct ui_out * uiout));
|
||||
|
||||
extern void ui_out_info_begin PARAMS ((struct ui_out * uiout, char *class));
|
||||
|
||||
extern void ui_out_info_end PARAMS ((struct ui_out * uiout));
|
||||
|
||||
extern void ui_out_notify_begin PARAMS ((struct ui_out * uiout, char *class));
|
||||
|
||||
extern void ui_out_notify_end PARAMS ((struct ui_out * uiout));
|
||||
|
||||
extern void ui_out_error_begin PARAMS ((struct ui_out * uiout, char *class));
|
||||
|
||||
extern void ui_out_error_end PARAMS ((struct ui_out * uiout));
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
extern void gdb_error PARAMS ((struct ui_out * uiout, int severity,
|
||||
char *format,...));
|
||||
|
||||
extern void gdb_query PARAMS ((struct ui_out * uiout,
|
||||
int qflags, char *qprompt));
|
||||
#endif
|
||||
|
||||
/* From here on we have things that are only needed by implementation
|
||||
routines and main.c. We should pehaps have a separate file for that,
|
||||
like a ui-out-impl.h file */
|
||||
|
||||
/* User Interface Output Implementation Function Table */
|
||||
|
||||
/* Type definition of all implementation functions. */
|
||||
|
||||
typedef void (table_begin_ftype) (struct ui_out * uiout,
|
||||
int nbrofcols, char *tblid);
|
||||
typedef void (table_body_ftype) (struct ui_out * uiout);
|
||||
typedef void (table_end_ftype) (struct ui_out * uiout);
|
||||
typedef void (table_header_ftype) (struct ui_out * uiout, int width,
|
||||
enum ui_align align, char *colhdr);
|
||||
typedef void (list_begin_ftype) (struct ui_out * uiout,
|
||||
int list_flag, char *lstid);
|
||||
typedef void (list_end_ftype) (struct ui_out * uiout, int list_flag);
|
||||
typedef void (field_int_ftype) (struct ui_out * uiout, int fldno, int width,
|
||||
enum ui_align align, char *fldname, int value);
|
||||
typedef void (field_skip_ftype) (struct ui_out * uiout, int fldno, int width,
|
||||
enum ui_align align, char *fldname);
|
||||
typedef void (field_string_ftype) (struct ui_out * uiout, int fldno, int width,
|
||||
enum ui_align align, char *fldname,
|
||||
const char *string);
|
||||
typedef void (field_fmt_ftype) (struct ui_out * uiout, int fldno, int width,
|
||||
enum ui_align align, char *fldname,
|
||||
char *format, va_list args);
|
||||
typedef void (spaces_ftype) (struct ui_out * uiout, int numspaces);
|
||||
typedef void (text_ftype) (struct ui_out * uiout, char *string);
|
||||
typedef void (message_ftype) (struct ui_out * uiout, int verbosity,
|
||||
char *format, va_list args);
|
||||
typedef void (wrap_hint_ftype) (struct ui_out * uiout, char *identstring);
|
||||
typedef void (flush_ftype) (struct ui_out * uiout);
|
||||
|
||||
/* ui-out-impl */
|
||||
|
||||
/* IMPORTANT: If you change this structure, make sure to change the default
|
||||
initialization in ui-out.c */
|
||||
|
||||
struct ui_out_impl
|
||||
{
|
||||
table_begin_ftype *table_begin;
|
||||
table_body_ftype *table_body;
|
||||
table_end_ftype *table_end;
|
||||
table_header_ftype *table_header;
|
||||
list_begin_ftype *list_begin;
|
||||
list_end_ftype *list_end;
|
||||
field_int_ftype *field_int;
|
||||
field_skip_ftype *field_skip;
|
||||
field_string_ftype *field_string;
|
||||
field_fmt_ftype *field_fmt;
|
||||
spaces_ftype *spaces;
|
||||
text_ftype *text;
|
||||
message_ftype *message;
|
||||
wrap_hint_ftype *wrap_hint;
|
||||
flush_ftype *flush;
|
||||
};
|
||||
|
||||
extern struct ui_out_data *ui_out_data (struct ui_out *uiout);
|
||||
|
||||
|
||||
/* Create a ui_out object */
|
||||
|
||||
extern struct ui_out *ui_out_new (struct ui_out_impl *impl,
|
||||
struct ui_out_data *data,
|
||||
int flags);
|
||||
|
||||
#endif /* UI_OUT_H */
|
2421
gdb/varobj.c
Normal file
2421
gdb/varobj.c
Normal file
File diff suppressed because it is too large
Load Diff
92
gdb/varobj.h
Normal file
92
gdb/varobj.h
Normal file
@ -0,0 +1,92 @@
|
||||
/* GDB variable objects API.
|
||||
Copyright 1999 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef VAROBJ_H
|
||||
#define VAROBJ_H 1
|
||||
|
||||
#include "symtab.h"
|
||||
#include "gdbtypes.h"
|
||||
|
||||
/* Enumeration for the format types */
|
||||
enum varobj_display_formats
|
||||
{
|
||||
FORMAT_NATURAL, /* What gdb actually calls 'natural' */
|
||||
FORMAT_BINARY, /* Binary display */
|
||||
FORMAT_DECIMAL, /* Decimal display */
|
||||
FORMAT_HEXADECIMAL, /* Hex display */
|
||||
FORMAT_OCTAL /* Octal display */
|
||||
};
|
||||
|
||||
/* String representations of gdb's format codes (defined in varobj.c) */
|
||||
extern char *varobj_format_string[];
|
||||
|
||||
/* Languages supported by this variable objects system. */
|
||||
enum varobj_languages
|
||||
{
|
||||
vlang_unknown = 0, vlang_c, vlang_cplus, vlang_java, vlang_end
|
||||
};
|
||||
|
||||
/* String representations of gdb's known languages (defined in varobj.c) */
|
||||
extern char *varobj_language_string[];
|
||||
|
||||
/* Struct thar describes a variable object instance */
|
||||
struct varobj;
|
||||
|
||||
/* API functions */
|
||||
|
||||
extern struct varobj *varobj_create (char *objname,
|
||||
char *expression, CORE_ADDR frame);
|
||||
|
||||
extern char *varobj_gen_name (void);
|
||||
|
||||
extern struct varobj *varobj_get_handle (char *name);
|
||||
|
||||
extern char *varobj_get_objname (struct varobj *var);
|
||||
|
||||
extern char *varobj_get_expression (struct varobj *var);
|
||||
|
||||
extern int varobj_delete (struct varobj *var, char ***dellist,
|
||||
int only_children);
|
||||
|
||||
extern enum varobj_display_formats varobj_set_display_format (
|
||||
struct varobj *var,
|
||||
enum varobj_display_formats format);
|
||||
|
||||
extern enum varobj_display_formats varobj_get_display_format (
|
||||
struct varobj *var);
|
||||
|
||||
extern int varobj_get_num_children (struct varobj *var);
|
||||
|
||||
extern int varobj_list_children (struct varobj *var,
|
||||
struct varobj ***childlist);
|
||||
|
||||
extern char *varobj_get_type (struct varobj *var);
|
||||
|
||||
extern enum varobj_languages varobj_get_language (struct varobj *var);
|
||||
|
||||
extern int varobj_get_attributes (struct varobj *var);
|
||||
|
||||
extern char *varobj_get_value (struct varobj *var);
|
||||
|
||||
extern int varobj_set_value (struct varobj *var, char *expression);
|
||||
|
||||
extern int varobj_list (struct varobj ***rootlist);
|
||||
|
||||
extern int varobj_update (struct varobj *var, struct varobj ***changelist);
|
||||
|
||||
#endif /* VAROBJ_H */
|
165
gdb/wrapper.c
Normal file
165
gdb/wrapper.c
Normal file
@ -0,0 +1,165 @@
|
||||
/* Longjump free calls to gdb internal routines.
|
||||
Copyright 1999 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include "defs.h"
|
||||
#include "value.h"
|
||||
#include "frame.h"
|
||||
#include "wrapper.h"
|
||||
|
||||
/* Use this struct used to pass arguments to wrapper routines. We assume
|
||||
(arbitrarily) that no gdb function takes more than ten arguments. */
|
||||
struct gdb_wrapper_arguments
|
||||
{
|
||||
|
||||
/* Pointer to some result from the gdb function call, if any */
|
||||
char *result;
|
||||
|
||||
/* The list of arguments. */
|
||||
char *args[10];
|
||||
};
|
||||
|
||||
int gdb_evaluate_expression PARAMS ((struct expression *, value_ptr *));
|
||||
int wrap_evaluate_expression PARAMS ((char *));
|
||||
|
||||
int gdb_value_fetch_lazy PARAMS ((value_ptr));
|
||||
int wrap_value_fetch_lazy PARAMS ((char *));
|
||||
|
||||
int gdb_value_equal PARAMS ((value_ptr, value_ptr, int *));
|
||||
int wrap_value_equal PARAMS ((char *));
|
||||
|
||||
int gdb_value_ind PARAMS ((value_ptr val, value_ptr * rval));
|
||||
int wrap_value_ind PARAMS ((char *opaque_arg));
|
||||
|
||||
int
|
||||
gdb_evaluate_expression (exp, value)
|
||||
struct expression *exp;
|
||||
value_ptr *value;
|
||||
{
|
||||
struct gdb_wrapper_arguments args;
|
||||
args.args[0] = (char *) exp;
|
||||
|
||||
if (!catch_errors ((catch_errors_ftype *) wrap_evaluate_expression, &args,
|
||||
"", RETURN_MASK_ERROR))
|
||||
{
|
||||
/* An error occurred */
|
||||
return 0;
|
||||
}
|
||||
|
||||
*value = (value_ptr) args.result;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
wrap_evaluate_expression (a)
|
||||
char *a;
|
||||
{
|
||||
struct gdb_wrapper_arguments *args = (struct gdb_wrapper_arguments *) a;
|
||||
|
||||
(args)->result =
|
||||
(char *) evaluate_expression ((struct expression *) (args)->args[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
gdb_value_fetch_lazy (value)
|
||||
value_ptr value;
|
||||
{
|
||||
struct gdb_wrapper_arguments args;
|
||||
|
||||
args.args[0] = (char *) value;
|
||||
return catch_errors ((catch_errors_ftype *) wrap_value_fetch_lazy, &args,
|
||||
"", RETURN_MASK_ERROR);
|
||||
}
|
||||
|
||||
int
|
||||
wrap_value_fetch_lazy (a)
|
||||
char *a;
|
||||
{
|
||||
struct gdb_wrapper_arguments *args = (struct gdb_wrapper_arguments *) a;
|
||||
|
||||
value_fetch_lazy ((value_ptr) (args)->args[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
gdb_value_equal (val1, val2, result)
|
||||
value_ptr val1;
|
||||
value_ptr val2;
|
||||
int *result;
|
||||
{
|
||||
struct gdb_wrapper_arguments args;
|
||||
|
||||
args.args[0] = (char *) val1;
|
||||
args.args[1] = (char *) val2;
|
||||
|
||||
if (!catch_errors ((catch_errors_ftype *) wrap_value_equal, &args,
|
||||
"", RETURN_MASK_ERROR))
|
||||
{
|
||||
/* An error occurred */
|
||||
return 0;
|
||||
}
|
||||
|
||||
*result = (int) args.result;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
wrap_value_equal (a)
|
||||
char *a;
|
||||
{
|
||||
struct gdb_wrapper_arguments *args = (struct gdb_wrapper_arguments *) a;
|
||||
value_ptr val1, val2;
|
||||
|
||||
val1 = (value_ptr) (args)->args[0];
|
||||
val2 = (value_ptr) (args)->args[1];
|
||||
|
||||
(args)->result = (char *) value_equal (val1, val2);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
gdb_value_ind (val, rval)
|
||||
value_ptr val;
|
||||
value_ptr *rval;
|
||||
{
|
||||
struct gdb_wrapper_arguments args;
|
||||
|
||||
args.args[0] = (char *) val;
|
||||
|
||||
if (!catch_errors ((catch_errors_ftype *) wrap_value_ind, &args,
|
||||
"", RETURN_MASK_ERROR))
|
||||
{
|
||||
/* An error occurred */
|
||||
return 0;
|
||||
}
|
||||
|
||||
*rval = (value_ptr) args.result;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
wrap_value_ind (opaque_arg)
|
||||
char *opaque_arg;
|
||||
{
|
||||
struct gdb_wrapper_arguments *args = (struct gdb_wrapper_arguments *) opaque_arg;
|
||||
value_ptr val;
|
||||
|
||||
val = (value_ptr) (args)->args[0];
|
||||
(args)->result = (char *) value_ind (val);
|
||||
return 1;
|
||||
}
|
37
gdb/wrapper.h
Normal file
37
gdb/wrapper.h
Normal file
@ -0,0 +1,37 @@
|
||||
/* Longjump free calls to gdb internal routines.
|
||||
Copyright 1999 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef WRAPPER_H
|
||||
#define WRAPPER_H 1
|
||||
|
||||
/* Use this struct used to pass arguments to wrapper routines. */
|
||||
struct gdb_wrapper_arguments;
|
||||
|
||||
extern int gdb_evaluate_expression PARAMS ((struct expression *, value_ptr *));
|
||||
extern int wrap_evaluate_expression PARAMS ((char *));
|
||||
|
||||
extern int gdb_value_fetch_lazy PARAMS ((value_ptr));
|
||||
extern int wrap_value_fetch_lazy PARAMS ((char *));
|
||||
|
||||
extern int gdb_value_equal PARAMS ((value_ptr, value_ptr, int *));
|
||||
extern int wrap_value_equal PARAMS ((char *));
|
||||
|
||||
extern int gdb_value_ind PARAMS ((value_ptr val, value_ptr * rval));
|
||||
extern int wrap_value_ind PARAMS ((char *opaque_arg));
|
||||
|
||||
#endif /* WRAPPER_H */
|
Loading…
x
Reference in New Issue
Block a user