ChangeLog-Apple   [plain text]

2008-02-21  Jim Ingham  <>

	* mi-interp.c (mi_cmd_interpreter_exec): set 
	mi_interp_exec_cmd_did_run to 0 before executing the command.
	(mi_insert_notify_hooks): Use the sync stepping notify
	hooks if the target is synchronous.
	(mi_remove_notify_hooks): Turn off the annotation printer.
	* mi-main.c (captured_mi_execute_command): Another place
	where we initialize mi_interp_exec_cmd_did_run.
	Also, if after running the command we notice that the target
	did run, then print out the prompt & *stopped so we duplicate
	the async result.
	(route_output_through_mi): Const-ify input strings.
	(route_output_to_mi_result): New function.
	(mi_interp_fake_sync_running): New function.
	(mi_interp_sync_stepping_command_hook): New function.
	(mi_interp_sync_continue_command_hook): New function.
	* mi-main.h: Declare the latter two hooks.
2008-02-08  Jason Molenda  (

	* mi-main.c (do_timings): Enable mi-timings by default.

2008-01-30  Jason Molenda  (

	* mi-main.c (start_remote_counts): Take an additional argument, the
	current MI token (sequence # in the form of an ascii string).
	(mi_interpreter_exec_continuation): Updated call.
	(mi_execute_command): Same.
	(mi_exec_async_cli_cmd_continuation): Same.
	(timestamp): Initialize mi_token field.

2008-01-18  Greg Clayton  <>

        * mi-cmd-stack.c (mi_print_frame_info_lite_base): Return wether file 
		has debug info in it in the mi response.

2008-01-18  Jim Ingham  <>

	* mi-main.c (mi_cmd_data_read_memory): Replace the loop over 
	target_read_memory_partial with target_read.

2008-01-14  Jason Molenda  (

        * mi-main.c (print_diff): Include the total number of remote protocol
        packets sent/received in the remotestats= info.

2008-01-11  Jason Molenda  (

        * mi-main.c (start_remote_counts, end_remote_counts): New functions
        to start/stop recording of remote protocol packets used for MI 
        (mi_cmd_thread_set_pc): Fix compiler warning.
        (get_register): Ditto.
        (mi_cmd_data_read_memory, mi_cmd_data_write_memory): Ditto.
        (captured_mi_execute_command): Avoid printing timing info twice.
        (mi_execute_async_cli_command): Free/NULL the current_command_ts to
        indicate that the timing info has already been printed.
        (mi_interpreter_exec_continuation): Updated to start/stop recording
        protocol packets for mi commands.
        (mi_execute_command): Ditto.
        (mi_exec_error_cleanup): Ditto.
        (mi_exec_async_cli_cmd_continuation): Ditto.
        (free_continuation_arg): Ditto.
        (print_diff): Print remote protocol packet info, if recorded.
        (wallclock_diff, user_diff, system_diff): Use timersub for time math.
        * mi-parse.h: Add remote stats to struct mi_timestamp.

2008-01-10  Jason Molenda  (

        * mi-main.c (mi_cmd_exec_interrupt): Call interrupt_target_command
        directly so we call the target vector's to_stop method instead of 
        sending a SIGINT via kill.

2007-08-21  Jason Molenda  (

	* mi-main.c (mi_cmd_file_fix_file): Ignore -o (object filename)
	option to file-fix-file.

2007-06-21  Jim Ingham  <>

	* mi-main.c (mi_execute_async_cli_command): Use -1 to
	indicate "no cleanup registered", not NULL.
	(mi_exec_async_cli_cmd_continuation): Ditto.
	(mi_setup_continuation_arg): Ditto.
2007-06-18  Jim Ingham  <>

	* mi-cmds.c: Add file-add-dsym.
2007-06-04  Jim Ingham  <>

	* mi-main.c (mi_exec_error_cleanup): New function.
	(mi_execute_async_cli_command): Register an exec_error_cleanup.
	(mi_exec_async_cli_cmd_continuation): Discard the exec_error
	cleanup if all went well.
	(mi_setup_continuation_arg): Initialize the pointer to the 
2007-05-07  Jim Ingham  <>

	* mi-interp.c (mi_insert_notify_hooks): Add the hand_call_function
	(mi_remove_notify_hooks): Remove it.
	* mi-main.c (mi_interp_hand_call_function_hook): New function.
	* mi-main.h: Declare mi_interp_hand_call_function_hook.
2007-04-30  Jim Ingham  <>

	* mi-cmd-stack.c (print_syms_for_block): Print LOC_CONST if we
	are printing consts.
	(mi_cmd_stack_check_threads): New function.
	* mi-cmds.c: Add stack-check-threads.
	* mi-cmds.h: Declare mi_cmd_stack_check_threads.
2007-04-05  Jason Molenda  (

	* mi-cmd-stack.c (list_args_or_locals): Don't print an error
	message when no blockvector is found (no source for this frame).

2007-03-15  Jim Ingham  <>

	* mi-cmd-break.c (mi_cmd_break_watch): Parse out the "-l" flag.
2007-03-08  Jim Ingham  <>

	* mi-cmds.c: Add "gc-roots" and "gc-references".
2007-02-01  Caroline Tice  <>

	* mi-cmd-var.c (mi_cmd_var_create): Add new argument to call to
2007-01-25  Jim Ingham  <>

	* mi-cmds.c: Add malloc-history command.
2006-11-02  Caroline Tice <>

        * mi-cmd-stack.c (list_args_or_locals): Replace testing endaddr
	vs. BLOCK_END with call to contained_in.
	* mi-main.c (mi_cmd_thread_set_pc): Replace BLOCK_START with

2006-10-31  Jim Ingham  <>

	* mi-cmd-stack.c (mi_print_frame_info_lite_base): New function.
	* (mi_print_frame_info_with_names_lite): New function.
	* (mi_print_frame_info_lite): Use mi_print_frame_info_lite_base.
	* (mi_cmd_stack_list_frames_lite): Take -names (0|1), and print
	function names if this is on.
2006-09-21  Jim Ingham  <>

	* mi-cmd-break.c (mi_async_breakpoint_resolve_event): Add a field to 
	tell whether the condition was successfully parsed or not.
2006-08-04  Caroline Tice  (

	* mi-interp.c (mi_cmd_interpreter_exec): Output the appropriate mi
	messages if stepping into an inlined subroutine via a "console-quoted"

2006-08-01  Caroline Tice  (

	* mi-main.c (mi-common.h):  Add new include statement.
	(mi_execute_async_cli_command):  Output the appropriate messages if
	stepping into an inlined subroutine (Code moved from execute_command
	and step_once to here).

2006-07-17  Jason Molenda  (

	* mi-main.c (print_diff): Cast new tv_sec and tv_usec types to
	int for printing.

2006-07-12  Caroline Tice  <>

	* mi-cmd-stack.c (inlining.h): New include statement.
	(mi_cmd_stack_list_frames): Add call to 
	* mi-main.c (inlining.h): New include statement.
	(mi_cmd_thread_set_pc):  Check to see if the stop_pc has changed since
	the last time global_inlined_call_stack was updated, and if so
	re-update global_inlined_call_stack.
	(mi_execute_async_cli_command): Don't make it an error for the target 
	not to have executed, if the user requested to 'step' at an inlined
	subroutine call site.

2006-03-31  Jason Molenda  (

	* mi-cmd-stack.c (mi_cmd_file_list_statics): Raise the load level of
	the specifed objfile before looking at its statics.
        (mi_cmd_file_list_globals): Raise the load level of the specifed 
	objfile before looking at its globals.

2006-01-23  Stan Shebs  <>

	* mi-cmd-var.c (mi_cmd_var_update): Initialize print_values.

2006-01-18  Jim Ingham  <>

	* mi-main.c (captured_mi_execute_command): Print "^error"
	on error, even if there's no error message.
	(mi_execute_async_cli_command) fetch the last error message
	from the exception that was returned (this is where this went
	to in the latest merge...)
2006-01-11  Jim Ingham  <>

	* mi-cmd-var.c (_initialize_mi_cmd_var): Fix typo in
	name of mi-show-protections command.
2005-12-29  Stan Shebs  <>

	* mi-cmds.c (mi_cmds): Add undo command.

2005-12-16  Jim Ingham  <>

	* mi-cmds.c: Add mi_cmd_show_version.
	* mi-main.c (mi_cmd_show_version): New function.
2005-12-15  Greg Clayton  (

        * mi-cmd-var.c (mi_cmd_var_create): Allow for creation
        of varobj by using file:line to specify the block it is
        to be created in.
        (_initialize_mi_cmd_var): Removed unused variable.

2005-10-13  Jason Molenda  (

        * mi-cmds.c (mi_cmds): New command, 
        file-sharedlibrary-apply-load-rules-all, mapped to the
        "sharedlibrary apply-load-rules all" console.

2005-09-12  Klee Dienes  <>

        * mi-cmd-disas.c (mi_cmd_disassemble): Update usage strings.  Add
        support for -n and -p arguments when specifying a file and line
        number.  Update to new interface to find_pc_offset.

2005-06-21  Jim Ingham  <>

        * mi-cmd-file.c (mi_cmd_file_core_file): New function.
        * mi-main.c (mi_cmd_target_attach): New function.
        * mi-cmds.{c,h}: Add these two commands.
 2005-09-01  Klee Dienes  <>
 	* mi-cmd-disas.c (mi_cmd_disassemble_usage): New function.
 	(mi_cmd_disassemble): Add new options "-p" and "-P".  Update
 	command parser; use mi_cmd_disassemble_usage.  Use the new syntax
 	to gdb_disassembly.  Implement the "-p" (show instructions before
 	the address) feature.

2005-08-08  Klee Dienes  <>

	* mi-main.c (captured_mi_execute_command): Revert the change
	made to TOT to use interpreter-exec to execute the command.

2005-08-08  Klee Dienes  <>

	* mi-cmd-file.c (mi_cmd_file_list_exec_source_file): Use
	symtab_to_fullname to expand the symtab.

2005-08-08  Klee Dienes  <>

	* mi-cmd-var.c (mi_cmd_var_list_children): Apply the previous
	patch from Jim Ingham from the branch.  Clean up merge lossage.

2005-08-08  Jim Ingham  <>
	* mi-cmd-var.c (mi_cmd_var_list_children): Add the
	--show-protection flag.  When this is on, we don't show the
	fake children.  Even when it's not we don't show the fake
	children if there is ONLY a public child.
	(_initialize_mi_cmd_var): Add a "set" variable to control
	the default for showing protections.

2005-07-07  Klee Dienes  <>

	* mi-main.c (mi_error_last_message): Remove.
	(mi_cmd_thread_select): Update call to gdb_thread_select.  Clean
	up merge lossage.
	(mi_cmd_data_write_register_values): Clean up merge lossage.
	(captured_mi_execute_command): Update comment.  Clean up merge
	lossage, mostly by re-porting from the new code to include the
	Apple-local changes.
	(mi_interpreter_exec_continuation): Clean up merge.
	(mi_execute_command): Convert to the new exception-handling
	(mi_execute_async_cli_command): Ditto.

2005-05-16  Jason Molenda  (

	* mi-main.c (mi_cmd_thread_set_pc): Lift old_fun initialization
	out of conditionalized block; we need to use it later on in this

2005-04-26  Jim Ingham  <>

	* mi-cmd-break.c (mi_async_breakpoint_resolve_event): Report the
	addr_string as well.
2005-04-26  Jason Molenda  (

	* mi-cmd-var.c (mi_cmd_var_set_format): Recognize OSType formatting.

2005-04-21  Jim Ingham  <>

        * mi-cmd-break.c (mi_async_breakpoint_resolve_event):
	Reverse the parameters to match the way it was actually
	being called.  Also print the breakpoint info for the
	resolved breakpoint.

	* mi-cmd-stack.c (print_syms_for_block): Use SYMBOL_NATURAL_NAME
	so we get the demangled names for C++ variables.  Also single quote
	protect names with "::" so the parser won't choke on them.
2005-02-21  Jason Molenda  (

	* mi-main.c (mi_cmd_file_fix_file_is_grooved): New MI command to
	show whether Fix and Continue is supported with the current
	executable or not.
	* mi-cmds.h: Prototype for above.
	* mi-cmds.c (mi_cmds): Add an entry for the new MI cmd.

2005-02-17  Jim Ingham <>

	* mi-out.c (mi_notify_begin): Store away the whole uiout data,
	not just the buffer.  This way we will start with a clean state
	for any lists we make in the notify.
	(mi_notify_end): restore the state.
2005-02-10  Jason Molenda  (

        * mi-main.c (mi_cmd_thread_set_pc): New thread-set-pc behavior:
        if setting the PC to a function prologue, advance it out of the
        prologue.  Can be defeated with the new "-n" command option.

2005-01-28  Jim Ingham  <>

	* mi-cmd-stack.c (mi_cmd_file_list_globals): Use the
	enum return value from objfile_matches_name.
2005-01-13  Jim Ingham  <>

	* mi-interp.c (mi_command_loop): Prime the uiout with the
	mi interpreter's uiout.
2004-10-28  Jim Ingham  <>

	* mi-cmd-break.c (mi_cmd_break_insert): Added the "-l"
	option, and process it.
2004-10-08  Jim Ingham  <>

	* mi-cmds-file.c (print_syms_for_block): New consts argument.
	Change all uses of print_syms_for_block to pass this.
	(parse_statics_globals_args): New function.
	(mi_cmd_file_list_statics, mi_cmd_file_list_globals): Change to
	use parse_statics_globals_args.
2004-09-28  Jim Ingham  <>

        * mi-cmds.c: Add mi_cmd_pid_info so we can add it to the
	list of commands that can be run while the target is 
	* mi-main.c: (mi_cmd_pid_info): New function.
	* (mi_command_completes_while_target_executing): Add 
	pid-info to the list of commands that can be run while the
	target is running.

2004-09-29  Jason Molenda  (

	* mi-cmd-break.c (mi_cmd_break_insert): realpath() the shlib
	argument so it matches what we get (& realpath) from dyld if
        the argument looks like an absolute pathname.

2004-09-28  Jim Ingham  <>

	* mi-main.c (mi_execute_async_cli_command): Don't use the
	exec_cleanup_chain for freeing the command string.  That can
	be done right after the safe_execute_command, do a normal
	cleanup is just fine.  And the exec_cleanup_chain is pretty
2004-09-23  Jason Molenda  (

	* mi-cmds.h: Prototype for file-fix-file MI func.
	* mi-cmds.c (mi_cmds): Use MI function for file-fix-file instead
	of console command.
	* mi-main.c (mi_cmd_file_fix_file): New function.

2004-09-07  Jim Ingham  <>

	* mi-interp.c (_initialize_mi_interp): Set the "mi" interpreter
	back to mi0.  CodeWarrior 9 requires mi0, but asks for just "mi".
	* (mi_interpreter_resume): Reset the default to mi0 here as well.
2004-09-07  Jason Molenda  (

	* mi-cmd-break.c (mi_cmd_break_insert): If 'ignore' argument
	is less than 0, set to 0 -- same behavior as 

2004-09-02  Jason Molenda  (

	* mi-main.h (mi_interp_query_hook): This func is now static; do not
	list a prototype in the header file.

2004-07-15  Jason Molenda  (

	* mi-main.c (mi_cmd_thread_set_pc): Use new_pc instead of the
	sal.pc when setting the default breakpoint..

2004-07-15  Jason Molenda  (

	* mi-main.c (mi_cmd_thread_set_pc): Add FIXME comment about
	my weak-ass parser.

2004-07-14  Jason Molenda  (

	* mi-main.c (mi_cmd_thread_set_pc): Split apart filename and line
	number manually instead of using decode_line_1.  Add appropriate
        error checking to catch bad filenames/line #'s.  Correct CORE_ADDR
        printing to work for both 32 and 64 bit addrs.

2004-06-14  Jason Molenda  (

	* mi-main.c (mi_cmd_thread_set_pc): Restore call to 

2004-05-27  Jim Ingham  <>

	* mi-cmd-stack.c (mi_cmd_file_list_statics): Not being able to
	find a symtab for the CURRENT_FRAME_COOKIE, or for a "" filename
	should just return an empty list, not an error.
2004-05-25  Jim Ingham  <>

        * mi-cmd-break.c (mi_cmd_break_catch): Return from unsetting
        the catchpoints rather than continuing on to set new ones (doh!)

2004-05-18  Jim Ingham  <>

        * mi-cmd-stack.c (mi_cmd_file_list_statics): Added the
        "*CURRENT FRAME*" cookie.

2004-05-17  Jason Molenda  (

	* mi-cmd-stack.c (mi_cmd_stack_list_frames_lite): Don't try to use
	struct frame_info's members directly; use accessor function.

2004-05-15  Jim Ingham  <>

        * gdbmi.texinfo: Document new -file-list-statics and -file-list-globals
        * mi-cmd-stack.c (mi_cmd_file_list_statics): New function.
        * (print_globals_for_symtab): New function.
        * (mi_cmd_file_list_globals): New function.
        * (print_syms_for_block): Handle static block as well.
        * (mi_decode_print_values): New function.
        * (list_args_or_locals, print_syms_for_block): Combine the function
        of values and create_varobj, and use enum print_frame.
        * (mi_cmd_stack_list_locals): Use mi_decode_print_values instead
        of decoding by hand.
        * (mi_cmd_stack_list_args): ditto.
        * mi-cmds.h: Add the ftype's for the new commands.
        * mi-cmds.c: And add them to the command array.

2004-05-05  Jason Molenda  (

        * mi-cmds.c (mi_cmds): Route -exec-abort MI command to CLI's "kill".

2004-04-29  Jason Molenda  (

	* mi-cmd-var.c (mi_cmd_var_list_children): Rework to integrate
	our expected var-list-children command behavior with the new
	FSF command behavior, where we have multiple potential ways to
	express "show me the values of the child".

2004-04-28  Jason Molenda  (

	* mi-cmd-stack.c (mi_print_frame_info_lite): Each frame is a 
	tuple, not a list.

2004-04-28  Jason Molenda  (

	* mi-cmds.c (mi_cmds): Re-add stack-list-frames-lite command.

2004-04-15  Jim Ingham  <>

	* mi-cmd-break.c: Switch from a breakpoint_create event
	to a breakpoint_resolve event.
2004-04-14  Jim Ingham <>
	* mi-cmd-break.c (breakpoint_notify): This now gets the
	parent pended breakpoint if there was one.  Print it...
	* (mi_async_breakpoint_create_event): Report pending 
	breakpoint resolution here.
	* mi-interps.c: Add event hook.
2004-03-26  Jim Ingham (

	* mi-interp.c (mi_interpreter_resume): Set the 
	(mi_command_loop) ditto.
2004-03-17  Jason Molenda  (

	* mi-cmds.c (mi_cmds): Correct gdb-unset so args are
	expected & passed.

2004-02-27  Jim Ingham  <>

	* mi-cmd-break.c (mi_cmd_break_commands): New function.
        * (mi_read_next_line): New function.
	* mi-cmds.c: mi_cmd_break_commands implements break-commands
	* mi-cmds.h: declare ftype for mi_cmd_break_commands.
2004-02-09  Jim Ingham  <>

	* mi-cmd-break.c (mi_interp_create_breakpoint_hook): Don't
	report internal breakpoints.
	(mi_interp_modify_breakpoint_hook): ditto
	(mi_interp_delete_breakpoint_hook): ditto
	* mi-cmd-stack.c (mi_interp_frame_changed_hook): Don't
	report frame resetting events.
	* mi-interp.c (mi_cmd_interpreter_exec): Merge fallout -
	remember to set mi_interp.
2004-02-03  Jim Ingham  <>

	* mi-cmds.c: Add exec-safe-call.
	* mi-main.c (mi_cmd_exec_safe_call): New function.
2003-10-30  Jim Ingham  <>

	* mi-main.c (mi_insert_notify_hooks): Add the "stack_changed"
	hooks to the hooks we use.  This way we get notified if the
	return command changes the stack.
	(mi_remove_notify_hooks): Remove "stack_changed.

2003-10-22  Jason Molenda  (

	* mi-cmds.c (mi_cmds): Add "-pid-info" MI command.

2003-10-20  Jim Ingham  <>

	* mi-cmd-disas.c (mi_cmd_disassemble): Allow the data-disassemble
	command to that "-s -n" as a pair, and throttle the disassembly
	to the number of lines specified in by the -n argument.

2003-10-15  Jim Ingham  <>
	* mi-cmd-break.c: (mi_cmd_break_insert): Handle the "-s" option
	for shared-library specific breakpoints.

2003-10-08  James Ingham  <>

	* mi-cmd-disas.c (mi_cmd_disassemble): Change the data-disassemble 
	command so if you only provide -s, we disassemble the function
	around the start address.

2003-09-26  Jim Ingham  <>

	* mi-cmds.c: Add interpreter-complete.
	* mi-cmds.h: ditto
	* mi-main.c (mi_create_interpreter): pass a NULL complete_proc.
	(mi_cmd_interpreter_complete): New function.

2003-08-26  Jason Molenda  (

        * mi-main.c (mi_cmd_thread_set_pc): Update current source line
        and current default breakpoint location after moving the pc.

2003-08-08  Jim Ingham (

	* mi-main.c (mi_execute_async_cli_command): Use 
	safe_execute_command not execute_command so we can discard
	the async callbacks if we get an error.

2003-06-10  Jim Ingham (

	* mi-main.c (mi_cmd_thread_set_pc): Check both old_fun and
	new_fun to make sure they aren't null before testing to see
	whether they are the same.

2003-06-01  Jim Ingham (

	* mi-main.c (mi_cmd_data_assign): Lock the scheduler when we 
	run evaluate expression in case the evaluation calls functions.
	(data_evaluate_expression): ditto.
2003-05-13  Jim Ingham (

	* mi-main.c (mi_cmd_thread_set_pc): Set stop_pc to the new value of
	the pc so we will continue over breakpoints properly.

2003-05-06  Jim Ingham (

	* mi-cmd-var.c (prepare_tmp_mi_out): Set up the tmp_mi_out if that
	hasn't been done already (or if someone has switched the mi interpreter).
	(mi_cmd_var_create): Use the tmp_miout to suppress output from varobj_create
	in case the creation calls crash.

2003-05-02  Jason Molenda  (

	* mi-main.c (mi_cmd_thread_set_pc): When -thread-set-pc is being
	used to jump from an obsolete function to a new function, update
	the pic base register with a correct value.

2003-05-01  Jim Ingham (

	* mi-cmd-var.c (mi_cmd_var_create): Make the "+" style variable
	actually work.
	(mi_report_var_creation): Report the block start & block end.
	(mi_cmd_var_info_block): Report both line number & address, and use
	ui_out_field_core_addr for the addresses.
	(mi_cmd_var_update): Initialize the tmp_miout if needed.
	(varobj_update_one): Swap in the tmp_miout before running
	varobj_update so we don't dump "reason" messages into the changelist
	if the varobj has a function & the call crashes.

	* mi-main.c (mi_cmd_thread_set_pc): Return the new FP and PC.

2003-04-30  Jim Ingham (

	* mi-main.c (mi_cmd_thread_set_pc): Have to reselect the current
	frame, since flush_cached_frame leaves it NULL, but the register
	printing code throws an internal_error if this is not set.

2003-04-24  Jim Ingham (

	* mi-main.c (mi_cmd_thread_set_pc): Just test that the function name
	matches, not full function symbol, for "moving to another function".
	Fix & Continue moves to a different function with the same name, and we
	don't want an error in that case.

2003-04-23  Jim Ingham (

	* mi-cmd-stack.c (mi_interp_stack_changed_hook): Use
	gdb_interpreter_ui_out instead of grubbing around in
	the interpreter structure directly.
	(mi_interp_frame_changed_hook): Ditto.
	(mi_interp_context_hook): Ditto.

	* mi-main.c (mi_cmd_thread_set_pc): New function, sets the
	pc for a given thread.
	(mi_cmd_thread_select): Pass print arguent to gdb_thread_select.
	* mi-cmds.{c,h}: Add -thread-set-pc.

2003-04-22  Jim Ingham (

	* mi-main.c (route_output_through_mi): New function.
	(output_async_notification): New function.
	(output_control_change_notification): Route these notifications
	through the mi (since the console-quoted may be in force and we don't
	want to end up quoting the notifications.
	(mi_interp_read_one_line_hook): Use output_async_notification.
	(mi_interp_run_command_hook): Ditto.
	(mi_cmd_interpreter_exec): Treat console & console-quoted as the
	same for running the target.

2003-04-17  Jason Molenda  (

	* mi-cmd-var.c (mi_cmd_var_evaluate_expression): Only change
	unwindonsignal setting if -u parameter is passed.
	* mi-main.c (mi_cmd_data_evaluate_expression): Ditto.

2003-03-25  Jim Ingham  (

	A final detail from the 2003-03-18 changes. We need to make
	sure that the mi async continuation doesn't blow away - or
	get out of order with - an exec continuation registered by
	another function. The finish continuation is a prime example.
	* mi-main.c (captured_mi_execute_command): Changed context to
	parse, since we should call the same variable the same thing if
	(mi_execute_async_cli_command): The continuation has to be
	registered BEFORE the command is executed to keep the order right.
	If the command doesn't run, then discard it.  Also store the head
	of the cleanup chain so that our continuation will only clean up
	back to there.
	(mi_exec_async_cli_cmd_continuation): ditto.
	(mi_interpreter_exec_continuation): ditto.
	(setup_continuation_arg): manage the cleanup as well.
2003-03-18  Jason Molenda  (

	* mi-cmds.c (mi_cmds): Add entry for "file-fix-file".

2003-03-18  Jim Ingham  <>

	This set of changes adds a feature - mi command timings, and
	reworks how the command token is stored away for asynchronous
	commands - by storing it in the continuation argument rather
	than trying to pass it around in globals behind the command's

	* mi-cmds.{c,h}: add administrative bits for mi-enable-timings.
	* mi-main.c (mi_cmd_enable_timings): New function .
	* (mi_command_completes_while_target_executing): New function.
	* (mi_interpreter_exec_bp_cmd): New function.
	* (setup_continuation_arg): New function.
	* (free_continuation_arg): New function.
	* (timestamp): New function.
	* (print_diff_now): New function.
	* (copy_timestamp): New function.
	* (print_diff): New function.
	* (wallclock_diff): New function.
	* (user_diff): New function.
	* (system_diff): New function.
	* (mi_cmd_exec_interrupt): Don't fiddle with the command tokens,
	just print your completion message.
	* (mi_cmd_exec_status): ditto.
	* (mi_cmd_target_select): The rewind & "\n" are taken care of by
	captured_mi_execute_command now.
	* (captured_mi_execute_command): print timing differences.  Also
	handle the rewind & "\n" for MI_CMD_QUIET commands to reduce code
	* (mi_execute_command): remove redundant gdb_flush.
	* (mi_cmd_execute): Handle passing the token & timestamp to the lower
	layers through current_command_ts & current_command_token.
	* (mi_execute_async_cli_command): If the command set the target running
	pass the token and timestamp to the continuation.  Also segregate the
	asyn & non-async cases totally.  They only shared one line - execute_command
	and splitting on that made the code hard to read.
	* (mi_cmd_interpreter_exec): ditto.  Also don't reschedule continuation
	if run from mi_interpreter_exec_bp_cmd.
	* (mi_execute_async_cli_command_continuation): Handle printing the timestamp, also
	if the target is again set running, make a new timestamp and forward
	it to the new continuation.
	* (mi_interpreter_exec_continuation): ditto.
	* (_mi_initialize): Add a gdb "set" variable controling the timing
	so people can turn it on and off in their .gdbinit.
	* mi-parse.h: Define struct mi_timestamp, add it to mi_parse.
	* mi-parse.c(mi_parse_free): Cleanup cmd_timestamp from mi_parse.
2003-03-03  Jim Ingham  <>

	* mi-cmd-break.c (mi_cmd_break_catch): Implement the -break-catch
	* mi-cmds.c: Add mi_cmd_break_catch to the commands table.
	* mi-cmds.h: And define the ftype for mi_cmd_break_catch.

2003-02-03  Jim Ingham  <>

	* mi-cmd-var.c (mi_report_var_creation): add another argument,
	is_root, and subsume all variable reporting into this function.
	That way we can preserve the old reporting order (and not give
	the testsuite heartburn).

2003-01-23  Jim Ingham   <>

	* mi-cmds.c: Add record for exec-status command.
	* mi-cmds.h: Add declaration for mi_cmd_exec_status.
	* mi-main.c (mi_cmd_exec_status): New function, return
	the current state of the inferior.
	(mi_execute_command): Use the return code that the
	command actually returned (args.rc).
	(mi_cmd_execute): Allow exec-status while the inferior
	is running.

2003-01-21  Jim Ingham   <>

        * mi-cmd-var.c (mi_report_var_creation): Take out the in_scope
        part, so this will work for both parent & child variables.
        (mi_cmd_var_create): Add back in the in_scope.
        (mi_cmd_var_list_children): Use mi_report_var_creation rather
        than replicating most of the code here.

2002-12-16  Jason Molenda  (

	* mi-main.c (mi_command_loop): Take MI version arg, as per the
	current FSF sources.
	(mi0_command_loop, mi1_command_loop, mi2_command_loop): Call
	mi_command_loop() with the correct MI version, as per the FSF srcs.
	(mi_interpreter_resume): Assign the correct MI version command
	loop based on DATA, the stored cookie containing mi_version.

2002-12-12  Klee Dienes  <>

	* mi-cmd-stack.c (mi_cmd_stack_list_frames_lite): Fix typo.

2002-12-11  Klee Dienes  <>

	* mi-cmd-stack.c (mi_cmd_stack_list_frames_lite): Update argument
	parsing.  Pass 'unlimited' for the COUNT_LIMIT to
	(mi_cmd_stack_info_depth): Update to the new call for

2002-12-07  Klee Dienes  <>

	* mi-cmd-stack.c (mi_cmd_stack_list_frames_lite): Replace
	FRAME_FP with get_frame_base.

2002-11-21  Klee Dienes  <>

	* mi-main.c (miunspec_interp): Contains what used to be mi_interp.
	(mi_interp) Renamed to miunspec_interp.  mi_interp is now a
	generic pointer that points to the MI interpreter being used
	during an MI context callback.
	(_initialize_main): Create miunspec_interp.  Set the MI value for
	mi2_interp to '2'.
	(mi_cmd_interpreter_exec): Set mi_interp to the current MI
	interpreter for the duration of the inferior-exec call.

2002-10-30  Jim Ingham   <>

	Changes to allow varobjs to follow the C++ dynamic type.
	* mi-cmd-var.c (mi_report_var_creation, mi_var_list_children):
	report dynamic_type.
	* (varobj_update_one): Handle the case where a child changes its
	dynamic type.  Report this, and delete the children.  Also use the
	new varobj_update interface.

	Other little cleanups:
	* mi-cmd-var.c (mi_report_var_creation, mi_var_list_children,
	mi_var_info_type): free the type strings, these are malloc'ed
	copies that we are handed, these are ui_file_xstrdup'ed, and must
	be freed.
	* (mi_cmd_var_list_children): Handle the case of no arguments (used
	to crash).
2002-10-30  Klee Dienes <>

	* mi-main.c (mi_cmd_exec_interrupt): Replace call to
	interrupt_target_command with an explicit SIGINT to the inferior
	(this seems a bit hackish, but just code that was accidentally
	misplaced in a source merge, so for now I'm just re-adding it

2002-10-25  Jason Molenda  (

	* mi-cmd-var.c (mi_cmd_var_list_children): CHILDREN is a list,
	not a tuple.
	(mi_cmd_var_update): CHANGELIST is a list, not a tuple (this is a
	mi2 vs mi1 difference at the FSF, but I don't want to waste time
	supporting the broken mi1 behavior locally).
	(varobj_update_one): VAROBJ is a named tuple, not an anonymous one
	like the FSF.

	* mi-cmd-stack.c (print_syms_for_block): Each
	variable/varobj/variable+value are printed in their own
	anonymous tuples (not a list).

	* mi-cmd-disas.c (mi_cmd_disassemble): Hack around broken find_line_pc
2002-10-24  Jason Molenda  (

	* mi-cmd-stack.c (mi_cmd_stack_info_depth): Pass non-zero limit to
	FAST_COUNT_STACK_DEPTH to indicate a specified limit, or 0 for 

2002-10-17  Jason Molenda  (

	* mi-cmd-var.c (mi_cmd_var_update): Remove duplicated "changelist"

2002-10-14  Klee Dienes <>

	* mi-out.c (mi_table_begin): Re-add support for mi0.
	(mi_table_body): Ditto.
	(mi_table_end): Ditto.
	(mi_table_header): Ditto.
	(mi_open): Ditto.
	(mi_close): Ditto.
2002-07-16  Jim Ingham <>

	* mi-cmd-stack.c (mi_cmd_stack_list_frames): Convert to use the
	new version of the FAST_COUNT_STACK_DEPTH, and unify frame
	printing in mi_print_frame_info_lite.
	(mi_cmd_stack_info_depth): Convert to use new version of
	(mi_print_frame_info_lite): New function, standard printer for the
	list frames & list frames lite commands.
2002-06-10  Jim Ingham <>

	* mi-cmd-stack.c (list_args_or_locals): endaddr should be a
2002-06-07  Jim Ingham <>

	* mi-out.c: Add the mi versions of notify_begin and notify_end.

2002-05-30  Rab Hagy <>

	* mi-main.c (mi_verify_command): clean up output * mi-cmd-var.c:
	added "unsigned" format specification
2002-04-24  James Ingham <>

	* mi-cmd-var.c (mi_report_var_creation): Use varobj_in_scope_p to
	figure out whether a variable is in scope.

2002-04-17  James Ingham <>

	* mi-cmd-var.c: Mutatis mutandi for new block parameter to
	* mi_cmd_stack.c: ditto.

2002-04-17  James Ingham <>

	* mi-var-cmd.c (mi_cmd_var_update): use
	make_cleanup_ui_out_tuple_begin_end to start the list, so we can
	clean up on error.

	* mi-cmd-stack.c (print_syms_for_block): Move the start of the
	list for the create_varobj case till after we have created the
	varobj, so we can handle errors in the creation better.
2002-04-15  James Ingham <>

	mi-cmd-var.c (print_typecode): The type might be null.  Return UNDEF
	in this case.

2002-04-11  James Ingham <>

	mi-cmds.c: Add exec-metrowerk-step command
	mi-cmds.h: Add the declaration of mi_cmd_exec_metrowerks_next.
	mi-main.c (mi_cmd_exec_metrowerks_next): New function, routes
	through to metrowerks_next...

2002-03-28  James Ingham <>

	* mi-cmds.h: Added def'n of mi_cmd_var_info_path_expression.
	* mi-cmds.c: Added var-info-path-expression to command list.
	* mi-cmd-var.c (mi_cmd_var_info_path_expression) New function,
	the MI interface to varobj_get_path_expression.

2002-03-05  James Ingham <>
	* mi-main.c (mi_cmd_data_evaluate_expression): Add "-u" flag to this
	command - sets unwindonsignal for the evaluation.

2002-01-31 James Ingham <>
	* mi-main.c (mi_create_interpreter): Dopey bug, actually return
	the new interpreter!

2001-01-29  James Ingham <>
	* mi-main.c (mi_create_interpreter): Added function to clean up
	creating mi0 & mi1 interpreters.  Also stick the mi_version in
	the client data field in case we need it.
	* mi_command_loop: get the ui_out from the interpreter, rather
	than making a new one.

2001-12-03  James Ingham <>

	* mi-main.c (mi_exec_async_cli_cmd_continuation): rearrange
	how we output status & run the breakpoint commands so the
	output makes more sense if the breakpoint command continues
	the inferior.
	(mi_interpreter_exec_continuation): ditto

	* mi-cmd-stack.c (mi_cmd_stack_info_depth): use the
        FAST_COUNT_STACK_DEPTH function if it is defined.

2001-11-01  James Ingham  <>

	* mi-cmd-stack.c (mi_cmd_stack_info_depth): if the architecture
	has a FAST_COUNT_STACK_DEPTH macro defined, use it.  This counts
	the stack without building up the frame caches.

2001-08-14  James Ingham  <>

	* mi-main.c (mi_exec_async_cli_cmd_continuation): Need to call
	bpstat_do_actions in the async_cli_cmd continuation, so that
	breakpoint commands will get tripped if the mi commands are used
	to start the inferior.

2001-07-06  James Ingham  <>

	* mi-cmd-stack.c (print_syms_for_block): use safe varobj_get_value
	so you don't mess up the stack printing if there is an error in
	the printing the value of the varobj.

2001-01-25  James Ingham  <>

	FIXME: This is a hack for PB.  Change this back when we
	get PB to run the target asynchronously.
	* mi-main.c (mi_interpreter_resume): Set the default execution
	mode to async for the mi.

2001-01-17  James Ingham  <>

	* mi-cmd-var.c (varobj_update_one): Handle the out of scope
	return from varobj_update.

2001-01-10  James Ingham  <>

	* mi-cmd-stack.c (mi_print_frame_more_info): New function - adds
	the directory in which the file is found to the stack output.
	* mi-main.c (mi_interpreter_resume): initialize the
	print_frame_more_info hook.

2000-12-15  James Ingham  <>

	* mi-cmd-var.c (mi_cmd_var_info_block): New function, implements
	the new mi command var-info-block - reporting the valid block for
	a varobj.
	(mi_report_var_creation): New function, standardize the mi output 
	for varobj creation.  Add the in_scope field to the output.
	(mi_cmd_var_list_children): Added a SHOW_VALUE argument to add the
	variable value to the output of var-list-children.
	* mi-cmds.c, mi-cmds.h: add the new command var-info-block.

	* mi-cmd-stack.c (list_args_or_locals): extend to create the
	varobj's for the args or locals and return those as part of the
	result.  Also add a flag to list locals for ALL blocks in the
	current function.
	(print_syms_for_block): This is where the work to implement the 
	varobj creation is done.
	(mi_cmd_stack_list_args): Change the argument parsing to accept the
	SHOW_VALUE argument = 2, which means create the varobj as well.
	(mi_cmd_stack_list_locals): Add the ALL_BLOCKS parameter, and 
	give the same meaning to SHOW_VALUE as for stack_list_args.
2000-11-22  James Ingham  <>

	* mi-cmd-var.c (varobj_update_one): print out the stringified typecode
	if the type has changed.

	* mi-main.c (mi_exec_async_cli_cmd_continuation): Do a gdb_flush
	after continuation output, otherwise this won't show up when
	you are not using a line-buffered device.

	* mi-cmd-var.c (mi_cmd_var_create): print out a stringified
	version of the typecode as well.
	(print_typecode): New function - stringifies the enum typecode.
	(mi_cmd_var_update): Allow this to take a list of varobj's to update.
	(varobj_update_one): Output the varobj's as a list of lists, where 
	each varobj gets its own label.  This makes the output easier to 
	* mi-cmd-stack.c (mi_cmd_stack_list_locals): Allow ALL_BLOCKS flag,
	and change use of list_args_or_locals accordingly.
	(mi_cmd_stack_list_args): Add new argument for 
	(list_args_or_locals): Add a mode which searches all lexical blocks
	in the current function for locals and lists them all.

2000-11-09  James Ingham  <>

	* mi-cmd-break.c (mi_cmd_break_insert): Add a "-f" flag to set a
	future breakpoint.

2000-11-08  James Ingham  <>

	* mi-cmds.c, mi-cmds.h: Add "interpreter-exec" to the command set.
	* mi-main.c (mi_cmd_interpreter_exec): execute a command in a given