Commit Graph

210 Commits

Author SHA1 Message Date
Joel Brobecker 0fb0cc7590 Updated copyright notices for most files. 2009-01-03 05:58:08 +00:00
Doug Evans 2e74121d77 * infcall.c (call_function_by_hand): Fix punctuation and capitalization
on error messages.

	* gdb.mi/mi-syn-frame.exp: Update expected output.
	* gdb.mi/mi2-syn-frame.exp: Update expected output.
2008-11-18 00:13:04 +00:00
Vladimir Prus 66bb093b5f Implement =thread-selected notification.
* mi/mi-common.h (struct mi_interp): New, moved from ...
        * mi/mi-interp.c: ...here.
        * mi/mi-main.c (mi_execute_command): If the thread changed
        as result of command, report that.
2008-11-17 16:43:34 +00:00
Vladimir Prus 3d043ef6a3 Include group-id in thread-created notification.
* mi/mi-interp.c (mi_new_thread, mi_thread_exit): Include
        group id in the output.
2008-11-17 12:34:19 +00:00
Tom Tromey 5966943567 gdb
PR mi/2549:
	* mi/mi-main.c (get_register): Use get_formatted_print_options.

gdb/testsuite

2008-11-14  Nick Roberts  <nickrob@snap.net.nz>

	* gdb.mi/gdb2549.exp: New file.
2008-11-14 18:38:32 +00:00
Pedro Alves 1c5cfe8615 gdb/
*	breakpoint.c (breakpoint_init_inferior): Clean up the moribund
	locations list.
	(moribund_breakpoint_here_p): Record the moribund
	location in the moribund_locations vector.
	* breakpoint.h (moribund_breakpoint_here_p): Declare.
	(displaced_step_fixup): Check if the breakpoint the thread was
	trying to step over has been removed since having been placed in
	the displaced stepping queue.
	(adjust_pc_after_break): In non-stop mode, check for a moribund
	breakpoint at the stop pc.
	(handle_inferior_event): Don't retire moribund breakpoints on
	TARGET_WAITKIND_IGNORE.

gdb/testsuite/
	* gdb.mi/mi-nsmoribund.exp, gdb.mi/nsmoribund.c: New test.
2008-10-15 19:15:34 +00:00
Pedro Alves 1ad15515cd gdb/
* linux-nat.c (linux_nat_wait): Only use set_ignore_sigint in
	all-stop mode.

gdb/testsuite/
	* lib/mi-support.exp (mi_expect_interrupt): New.
	(mi_reverse_list, mi_check_thread_states): New, moved and renamed
	from gdb.mi/mi-nonstop.exp.
	* gdb.mi/mi-nsintrall.exp, gdb.mi/nsintrall.c: New.
	* gdb.mi/mi-nonstop.exp (myreverse, check_thread_states): Moved to
	lib/mi-support.exp.
	Use mi_check_thread_states throughout.  Avoid ".*" and do not
	require an anchor after -exec-run.
2008-09-22 11:00:41 +00:00
Daniel Jacobowitz d0b76dc6df * gdb.mi/mi-nonstop.exp: Do not check thread state while a
stop is pending.  Avoid ".*" when two stops are pending.
	* lib/gdb.exp (fullname_syntax_POSIX, fullname_syntax_UNC)
	(fullname_syntax_DOS_CASE, fullname_syntax_DOS): Do not match
	newlines in fullnames.
	* lib/mi-support.exp (mi_run_cmd): Do not require an anchor.
	(mi_expect_stop): Update comments.  Only anchor in sync mode.
	Do not match newlines.
	(mi_send_resuming_command_raw): Always return status.
	(mi_get_stop_line): Do not match more than one line by accident.
	Only anchor in sync mode.
	(mi_run_inline_test): If -exec-next fails, give up.
2008-09-13 17:54:06 +00:00
Vladimir Prus 80f73d716b * gdb.mi/mi-nonstop.exp: Fix the check for non-stop
support.  Adjust the order of "*running" notifications.
	* gdb.mi/non-stop.c: Don't cast from int to void* and
	back.
2008-08-21 15:09:42 +00:00
Vladimir Prus 8cf6e61a08 * lib/mi-support.exp (mi_expect_stop): Produce
more details on failures.
	* gdb.mi/mi-nonstop.exp: New.
	* gdb.mi/non-stop.c: New.
2008-08-19 14:13:29 +00:00
Vladimir Prus c6ebd6cf99 * target.c (target_async_permitted, target_async_permitted_1)
(set_maintenance_target_async_permitted)
        (show_maintenance_target_async_permitted): New.
        (initialize_targets): Register 'set target-async'.
        * target.h (target_async_permitted): Declare.
        * linux-nat.c (linux_nat_async_enabled)
        (linux_nat_async_permitted, set_maintenance_linux_async_permitted)
        (show_maintenance_linux_async_permitted): Remove.
        (sigchld_handler, linux_nat_is_async_p, linux_nat_can_async_p)
        (get_pending_events, linux_nat_async): Use target_async_permitted.
        (linux_nat_set_async_mode): Remove, moving the only used bits
        into...
        (linux_nat_setup_async): This.
        (_initialize_linux_nat): Do not register 'maint set linux-async'.
        Use linux_nat_setup_async.
        * remote.c (remote_async_permitted, remote_async_permitted_set)
        (set_maintenance_remote_async_permitted)
        (show_maintenance_remote_async_permitted): Remove.
        (remote_open_1, remote_terminal_inferior, remote_can_async_p)
        (remote_is_async_p): Use target_async_permitted.
        (_initialize_remote): Don't register 'main set remote-async'.
        * mi/mi-cmds.c (mi_cmds): Register -list-target-features.
        * mi/mi-cmds.h (mi_cmd_list_target_features): New.
        * mi/mi-main.c (mi_cmd_list_target_features): New.
2008-08-19 13:05:02 +00:00
Jan Kratochvil c7b778ff85 Fix for PR gdb/1543.
* gdb.base/sep.exp: `sep-proc.c' absolute line numbers replaced with
	$LOCATION.
	(location): New variable.
	* config/cfdbug.exp, config/d10v.exp, config/dve.exp, config/i960.exp,
	config/m32r.exp, config/mn10300-eval.exp, config/proelf.exp,
	config/rom68k.exp, config/sh.exp, config/unix.exp, config/vr4300.exp,
	config/vr5000.exp, config/vxworks.exp, gdb.arch/altivec-regs.exp,
	gdb.arch/e500-abi.exp, gdb.arch/e500-regs.exp, gdb.asm/asm-source.exp,
	gdb.base/a2-run.exp, gdb.base/advance.exp, gdb.base/all-bin.exp,
	gdb.base/args.exp, gdb.base/arithmet.exp, gdb.base/assign.exp,
	gdb.base/async.exp, gdb.base/auxv.exp, gdb.base/bigcore.c,
	gdb.base/bigcore.exp, gdb.base/bitfields.exp, gdb.base/bitops.exp,
	gdb.base/break.c, gdb.base/break.exp, gdb.base/break1.c,
	gdb.base/call-ar-st.exp, gdb.base/call-rt-st.exp,
	gdb.base/call-strs.exp, gdb.base/callfuncs.c, gdb.base/callfuncs.exp,
	gdb.base/checkpoint.exp, gdb.base/chng-syms.exp,
	gdb.base/code-expr.exp, gdb.base/commands.exp, gdb.base/completion.exp,
	gdb.base/complex.exp, gdb.base/cond-expr.exp, gdb.base/condbreak.exp,
	gdb.base/consecutive.exp, gdb.base/corefile.exp, gdb.base/cvexpr.c,
	gdb.base/cvexpr.exp, gdb.base/dbx.exp, gdb.base/default.exp,
	gdb.base/define.exp, gdb.base/del.c, gdb.base/detach.exp,
	gdb.base/display.exp, gdb.base/dump.exp, gdb.base/echo.exp,
	gdb.base/environ.exp, gdb.base/eval-skip.exp, gdb.base/exprs.exp,
	gdb.base/fileio.exp, gdb.base/find.exp, gdb.base/finish.exp,
	gdb.base/funcargs.exp, gdb.base/gcore-buffer-overflow.exp,
	gdb.base/gcore.exp, gdb.base/gdb1555.exp, gdb.base/gdbvars.exp,
	gdb.base/help.exp, gdb.base/huge.exp, gdb.base/info-proc.exp,
	gdb.base/interrupt.exp, gdb.base/jump.exp, gdb.base/langs.exp,
	gdb.base/lineinc.exp, gdb.base/list.exp, gdb.base/macscp.exp,
	gdb.base/maint.exp, gdb.base/mips_pro.exp, gdb.base/miscexprs.exp,
	gdb.base/nodebug.exp, gdb.base/nofield.c, gdb.base/opaque.exp,
	gdb.base/overlays.exp, gdb.base/page.exp, gdb.base/pc-fp.exp,
	gdb.base/pending.c, gdb.base/pendshr.c, gdb.base/pointers.exp,
	gdb.base/psymtab.exp, gdb.base/ptype.exp, gdb.base/randomize.c,
	gdb.base/readline.exp, gdb.base/recurse.exp, gdb.base/regs.exp,
	gdb.base/relational.exp, gdb.base/relocate.exp, gdb.base/remote.exp,
	gdb.base/reread.exp, gdb.base/return.exp, gdb.base/return2.exp,
	gdb.base/scope.exp, gdb.base/sect-cmd.exp, gdb.base/sep-proc.c,
	gdb.base/sep.c, gdb.base/sep.exp, gdb.base/sepdebug.c,
	gdb.base/sepdebug.exp, gdb.base/setshow.exp, gdb.base/shlib-call.exp,
	gdb.base/sigaltstack.c, gdb.base/so-indr-cl.exp, gdb.base/solib.exp,
	gdb.base/source.exp, gdb.base/start.c, gdb.base/step-bt.c,
	gdb.base/step-line.exp, gdb.base/structs.c, gdb.base/structs.exp,
	gdb.base/structs2.exp, gdb.base/term.exp, gdb.base/twice.exp,
	gdb.base/type-opaque.exp, gdb.base/until.exp,
	gdb.base/value-double-free.c, gdb.base/varargs.exp,
	gdb.base/watchpoint.exp, gdb.base/whatis-exp.exp, gdb.disasm/am33.exp,
	gdb.disasm/h8300s.exp, gdb.disasm/hppa.exp, gdb.disasm/mn10300.exp,
	gdb.disasm/sh3.exp, gdb.disasm/t01_mov.exp, gdb.disasm/t02_mova.exp,
	gdb.disasm/t03_add.exp, gdb.disasm/t04_sub.exp, gdb.disasm/t05_cmp.exp,
	gdb.disasm/t06_ari2.exp, gdb.disasm/t07_ari3.exp,
	gdb.disasm/t08_or.exp, gdb.disasm/t09_xor.exp, gdb.disasm/t10_and.exp,
	gdb.disasm/t11_logs.exp, gdb.disasm/t12_bit.exp,
	gdb.disasm/t13_otr.exp, gdb.fortran/exprs.exp, gdb.fortran/types.exp,
	gdb.hp/gdb.aCC/exception.exp, gdb.hp/gdb.aCC/optimize.exp,
	gdb.hp/gdb.aCC/watch-cmd.exp, gdb.hp/gdb.base-hp/callfwmall.exp,
	gdb.hp/gdb.base-hp/dollar.exp, gdb.hp/gdb.base-hp/hwwatchbus.exp,
	gdb.hp/gdb.base-hp/pxdb.exp, gdb.hp/gdb.base-hp/reg-pa64.exp,
	gdb.hp/gdb.base-hp/reg.exp, gdb.hp/gdb.base-hp/sized-enum.exp,
	gdb.hp/gdb.base-hp/so-thresh.exp, gdb.hp/gdb.compat/xdb1.exp,
	gdb.hp/gdb.compat/xdb2.exp, gdb.hp/gdb.compat/xdb3.exp,
	gdb.java/jmisc.exp, gdb.java/jv-exp.exp, gdb.java/jv-print.exp,
	gdb.mi/gdb669.exp, gdb.mi/gdb680.exp, gdb.mi/gdb701.exp,
	gdb.mi/gdb792.exp, gdb.mi/mi-basics.exp, gdb.mi/mi-console.exp,
	gdb.mi/mi-hack-cli.exp, gdb.mi/mi-pending.c, gdb.mi/mi-pendshr.c,
	gdb.mi/mi-pthreads.exp, gdb.mi/mi-read-memory.exp, gdb.mi/mi-regs.exp,
	gdb.mi/mi-syn-frame.exp, gdb.mi/mi-until.exp, gdb.mi/mi2-basics.exp,
	gdb.mi/mi2-console.exp, gdb.mi/mi2-hack-cli.exp,
	gdb.mi/mi2-pthreads.exp, gdb.mi/mi2-read-memory.exp,
	gdb.mi/mi2-regs.exp, gdb.mi/mi2-syn-frame.exp, gdb.mi/mi2-until.exp,
	gdb.pascal/types.exp, gdb.stabs/weird.exp,
	gdb.threads/gcore-thread.exp, gdb.threads/manythreads.exp,
	gdb.threads/print-threads.exp, gdb.threads/pthreads.exp,
	gdb.threads/schedlock.exp, gdb.threads/step.exp, gdb.threads/step2.exp,
	gdb.threads/switch-threads.exp, gdb.threads/thread-specific.exp,
	gdb.threads/thread_check.exp, gdb.threads/thread_events.exp,
	gdb.threads/tls-nodebug.exp, gdb.threads/tls-shared.exp,
	gdb.threads/tls.exp, gdb.trace/actions.exp, gdb.trace/backtrace.exp,
	gdb.trace/circ.exp, gdb.trace/collection.exp, gdb.trace/deltrace.exp,
	gdb.trace/infotrace.exp, gdb.trace/limits.exp, gdb.trace/packetlen.exp,
	gdb.trace/passc-dyn.exp, gdb.trace/passcount.exp, gdb.trace/report.exp,
	gdb.trace/save-trace.exp, gdb.trace/tfind.exp, gdb.trace/tracecmd.exp,
	gdb.trace/while-dyn.exp, gdb.trace/while-stepping.exp,
	lib/mi-support.exp, lib/trace-support.exp: Remove reference
	to bug-gdb@prep.ai.mit.edu .
2008-08-06 12:52:08 +00:00
Vladimir Prus 5e06a3d1d5 * lib/mi-support.exp (mi_load_shlibs): New.
* gdb.mi/mi-pending.exp: Use mi_load_shlibs, not gdb_load_shlibs.
2008-07-31 07:38:51 +00:00
Vladimir Prus 9d81d21bde * lib/mi-support.exp (get_mi_thread_list)
(check_mi_and_console_threads): New, moved from ...
	* gdb.mi/mi-pthread.exp: ...here.
	* gdb.mi/gdb669.exp (get_mi_thread_list)
	(check_mi_and_console_threads): Delete.
	* gdb.mi/mi2-pthread.exp: Likewise.
2008-07-30 17:08:45 +00:00
Vladimir Prus 53c2f6a972 Revert accidental commit 2008-06-28 10:03:42 +00:00
Vladimir Prus d50867903f * target.c (target_read_until_error): New.
* target.h (target_read_until_error): Declare.
        * mi/mi-main.c (mi_cmd_data_read_memory): Use
        target_read_until_error.
2008-06-26 15:10:48 +00:00
Vladimir Prus a2840c3559 Emit ^running via observer.
* mi/mi-interp.c (mi_cmd_interpreter_exec): Do no print
        ^running here.
        (mi_on_resume): Print ^running if not previously output.
        * mi/mi-main.c (running_result_record_printed): New.
        (captured_mi_execute_command): Reset
        running_result_record_printed.  Use running_result_record_printed
        to decide if we should skip ^done.
        (mi_execute_async_cli_command): Don't print ^running here.
        * mi/mi-main.h (current_token, running_result_record_printed):
        Declare.
2008-06-25 14:32:34 +00:00
Vladimir Prus 6ae37fefeb Robustify mi-simplerun.
* gdb.mi/basics.c (main): Add a call to sleep.
        * gdb.mi/mi-cli.exp: Adjust for change in line numbers.
        * gdb.mi/mi2-cli.exp: Likewise.
        * gdb.mi/mi-break.exp: Likewise.
2008-06-13 19:53:42 +00:00
Vladimir Prus 83408de733 * gdb.mi/mi-break.exp (test_ignore_count): Use mi_expect_stop. 2008-06-11 13:35:58 +00:00
Vladimir Prus e1ac332873 Implement *running.
* Makefile.in: Update dependencies.
        * gdbthread.h (struct thread_info): New field
        running_.
        (set_running, is_running): New.
        * thread.c (set_running, is_running): New.
        * inferior.h (suppress_normal_stop_observer): Rename to...
        (suppress_run_stop_observers): ..this.
        * infcmd.c (suppress_normal_stop_observer): Rename to...
        (suppress_run_stop_observers): ..this.
        (finish_command_continuation, finish_command): Adjust.
        * infcall.c (call_function_by_hand): Adjust.
        * infrun.c (normal_stop): Call set_running.
        * target.c (target_resume): New.  Call set_running.
        * target.h (target_resume): Convert from macro to
        a function.

        * mi/mi-interp.c (mi_on_resume): New.
        (mi_interpreter_init): Register mi_on_resume.
2008-06-10 10:23:54 +00:00
Vladimir Prus f7f9a841a3 Use observers to report stop events in MI.
* mi/mi-interp.c (mi_on_normal_stop): New.
        (mi_interpreter_init): Register mi_on_normal_stop.
        (mi_interpreter_exec_continuation): Remove.
        (mi_cmd_interpreter_exec): Don't register the above.
        * mi/mi-main.c (captured_mi_execute_command): Don't care
        about sync_execution.
        (mi_execute_async_cli_command): Don't install continuation.  Don't
        print *stopped.
        (mi_exec_async_cli_cmd_continuation): Remove.
2008-06-10 09:35:09 +00:00
Vladimir Prus f7f9ae2c16 Refactor varobj_update interface.
* varobj.c (varobj_update): Report changes as vector.  Also
        return not just a list of varobj, but a list of special structures
        that tell what exactly has changed.
        * varobj.h (enum varobj_update_error): Rename to
        varobj_scope_status.
        (struct varobj_update_result_t): New.
        (varobj_update): Adjust prototype.
        * mi/mi-cmd-var.c: Adjust for changes.
2008-05-28 12:06:36 +00:00
Vladimir Prus 721c02def4 * mi/mi-main.c (last_async_command): Rename to current_token.
(previous_async_command): Remove.
        (mi_cmd_gdb_exit): Adjust.
        (mi_cmd_exec_interrupt): Don't dance with previous_async_command.
        (mi_cmd_target_select): Adjust.
        (mi_cmd_execute): Don't set previous_async_command.  Free token
        here even in async mode.
        (mi_execute_async_cli_command): Adjust.
        (mi_exec_async_cli_cmd_continuation): Adjust.  Do not free the
        token.
        (mi_load_progress): Adjust.
2008-04-24 12:09:49 +00:00
Vladimir Prus d24317b480 * breakpoint.c (print_one_breakpoint_location): In MI
mode, report the location string the breakpoint was
	originally created with.
2008-04-24 08:46:19 +00:00
Vladimir Prus 8e91f0232c * mi/mi-cmd-var.c (varobj_update_one): Print new
value for variable objects that changed type.
2008-04-19 17:03:20 +00:00
Aleksandar Ristovski 18ac113bcc * gdb.base/attach.exp (do_attach_tests): Matching pattern for
temporary breakpoint to match "Temporary breakpoint".
	* gdb.base/break.exp (delete_breakpoints): Likewise.
	* gdb.base/call-ar-st.exp (get_debug_format): Likewise.
	* gdb.base/commands.exp (temporary_breakpoint_commands): Likewise.
	* gdb.base/display.exp: Likewise.
	* gdb.base/foll-exec.exp (do_exec_tests): Likewise.
	* gdb.base/foll-fork.exp (catch_fork_child_follow): Likewise.
	* gdb.base/restore.exp (restore_tests): Likewise.
	* gdb.base/sepdebug.exp: Likewise.
	* gdb.base/watchpoint.exp: Likewise.
	* gdb.mi/mi-cli.exp: Added argument for new "disp" field.
	* gdb.mi/mi-pending.exp: Likewise.
	* gdb.mi/mi-simplerun.exp (test_running_the_program): Likewise.
	* gdb.mi/mi-until.exp (test_runnint_to_foo): Likewise.
	* gdb.mi/mi-var-cmd.exp: Likewise.
	* gdb.mi/mi-var-display.exp: Likewise.
	* gdb.mi/mi2-cli.exp: Likewise.
	* gdb.mi/mi2-simplerun.exp (test_running_the_program): Likewise.
	* gdb.mi/mi2-until.exp (test_running_to_foo): Likewise.
	* gdb.mi/mi2-var-display.exp: Likewise.
	* lib/gdb.exp (gdb_breakpoint): Pattern for temporary breakpoint.
	* lib/mi-support.exp (mi_runto_helper): Use "after_reason" argument for
	new "disp" field.
	(mi_expect_stop): Move after_reason argument to be really after
	reason. This is to support fix for PR2424.
2008-04-15 14:33:55 +00:00
Vladimir Prus fcacd99f87 Fix @-varobjs.
* varobj.c (value_of_root): Update the expression for
        floating varobjs.
        * mi/mi-cmd-var.c (varobj_update_one): If type has changed,
        report that.
2008-04-13 09:33:49 +00:00
Marc Khouzam de051565df gdb/ChangeLog
2008-04-09  Marc Khouzam  <marc.khouzam@ericsson.com>

        * mi/mi-cmd-var.c: Include "mi-getopt.h".
        (mi_parse_format): New.  Factored out from mi_cmd_var_set_format.
        (mi_cmd_var_set_format): Use new mi_parse_format.
        (mi_cmd_var_evaluate_expression): Support for -f option to specify
        format.
        * Makefile.in (mi-cmd-var.o): Update dependencies.

        * varobj.h (varobj_get_formatted_value): Declare.
        * varobj.c (my_value_of_variable): Added format parameter.
        (cplus_value_of_variable): Likewise.
        (java_value_of_variable): Likewise.
        (c_value_of_variable): Likewise.  Evaluate expression based
        on format parameter.
        (struct language_specific): Add format parameter to function member
        *value_of_variable.
        (varobj_get_formatted_value): New.
        (varobj_get_value): Added format parameter to method call.

gdb/doc/ChangeLog
2008-04-09  Marc Khouzam  <marc.khouzam@ericsson.com>

        * gdb.texinfo (GDB/MI Variable Objects): Add anchor to
        -var-set-format.  Add -f option to -var-evaluate-expression.

gdb/testsuite/ChangeLog
2008-04-09  Marc Khouzam  <marc.khouzam@ericsson.com>

        * gdb.mi/mi2-var-display.exp: Added tests for the new -f
        option of -var-evaluate-expression.
        * gdb.mi/mi2-var-display.exp: Likewise.
2008-04-09 13:29:55 +00:00
Nick Roberts fd0e64da87 New test for asynchronous Machine Interface (MI) responses. 2008-04-06 22:41:19 +00:00
Vladimir Prus bb3784283e * lib/mi-support.exp (mi_expect_stop): New.
(mi_run_cmd): Change the
	token.  Use mi_send_resuming_command, use
	mi_expect_stop.
	(mi_execute_to_helper): Rename to mi_execute_to.
	(mi_send_resuming_command): Add more error patterns.
	(mi_wait_for_stop): Renamed to...
	(mi_get_stop_line): ...this.
	(mi_run_inline_test): Adjust.

	* gdb.mi/mi-cli.exp: Use mi_execute_to/mi_expect_stop.
	* gdb.mi/mi-console.exp: Likewise.
	* gdb.mi/mi-pending.exp: Likewise.
	* gdb.mi/mi-simplerun.exp: Likewise.
	* gdb.mi/mi-stack.exp: Likewise.
	* gdb.mi/mi-stepi.exp: Likewise.
	* gdb.mi/mi-syn-frame.exp: Add comment.
	* gdb.mi/mi-until.exp: Likewise.
	* gdb.mi/mi-var-display.exp: Likewise.
	* gdb.mi/mi-watch.exp: Likewise.
	* gdb.mi/mi2-cli.exp: Likewise.
	* gdb.mi/mi2-console.exp: Likewise.
	* gdb.mi/mi2-simplerun.exp: Likewise.
	* gdb.mi/mi2-stack.exp: Likewise.
	* gdb.mi/mi2-stepi.exp: Likewise.
	* gdb.mi/mi2-until.exp: Likewise.
	* gdb.mi/mi2-var-display.exp: Likewise.
	* gdb.mi/mi2-watch.exp: Likewise.
2008-04-05 17:12:46 +00:00
Pedro Alves a13e061a1b gdb/
2008-04-04  Pedro Alves  <pedro@codesourcery.com>

	* mi/mi-cmds.h (enum mi_cmd_result): Delete MI_CMD_ERROR.
	(mi_error_message): Delete declaration.
	* mi/mi-interp.c (mi_cmd_interpreter_exec): Call error instead of
	returning MI_CMD_ERROR.
	* mi/mi-main.c (mi_error_message): Delete.
	(mi_cmd_exec_interrupt):
	(mi_cmd_thread_select, mi_cmd_thread_list_ids)
	(mi_cmd_thread_info): Call error instead of returning
	MI_CMD_ERROR.
	(mi_cmd_data_list_register_values): Call error instead of
	returning MI_CMD_ERROR.  Adapt to new get_register interface.
	(get_register): Change return typo to void.  Call error instead of
	returning MI_CMD_ERROR.
	(mi_cmd_data_write_register_values): Call error instead of
	returning MI_CMD_ERROR.
	(mi_cmd_list_features): Return MI_CMD_DONE.
	(captured_mi_execute_command): Remove MI_CMD_ERROR handling.
	(mi_execute_command): Always print exceptions with -error.

gdb/testsuite/
2008-04-04  Pedro Alves  <pedro@codesourcery.com>

	* gdb.mi/mi-disassemble.exp, gdb.mi/mi-stack.exp,
	gdb.mi/mi-syn-frame.exp, gdb.mi/mi-var-block.exp,
	gdb.mi/mi-var-cmd.exp, gdb.mi/mi-var-display.exp,
	gdb.mi/mi2-disassemble.exp, gdb.mi/mi2-stack.exp,
	gdb.mi/mi2-syn-frame.exp, gdb.mi/mi2-var-block.exp,
	gdb.mi/mi2-var-cmd.exp, gdb.mi/mi2-var-display.exp: Update to not
	expect an mi error duplicated in stderr.
2008-04-04 21:59:25 +00:00
Marc Khouzam 6c2d1a6bc9 2008-04-01 Marc Khouzam <marc.khouzam@ericsson.com>
* gdb.mi/mi-var-display.exp: Stop at end of do_special_tests
	instead of beginning to make an extra test pass.
	* gdb.mi/mi2-var-display.exp: Likewise.
2008-04-01 15:18:30 +00:00
Maciej W. Rozycki 33c3676e65 * gdb.mi/mi-var-cmd.exp: Fix a typo. 2008-03-28 14:01:36 +00:00
Vladimir Prus 92e28119da * gdb.mi/mi-var-display.exp: Remove obsolete xfail.
* gdb.mi/mi2-var-display.exp: Likewise.
2008-03-26 13:36:51 +00:00
Vladimir Prus 9e8e3afe37 * lib/mi-support.exp (mi_create_varobj_checked): New.
(mi_list_varobj_children): Allow to check for a
	value.
	(mi_list_array_varobj_children): New.

	* gdb.mi/mi-var-child.exp: Use mi_create_varobj
	and mi_list_varobj_children, as opposed to hardcoding
	expected strings.
	* gdb.mi/gdb701.exp: Likewise.
	* gdb.mi/gdb792.exp: Likewise.
	* gdb.mi/mi-var-block.exp: Likewise.
	* gdb.mi/mi-var-cmd.exp: Likewise.
	* gdb.mi/mi-var-invalidate.exp: Likewise.
	* gdb.mi/mi2-var-block.exp: Likewise.
	* gdb.mi/mi2-var-child.exp: Likewise.
	* gdb.mi/mi2-var-cmd.exp: Likewise.
	* gdb.mi/mi2-var-display.exp: Likewise.
2008-03-26 13:24:22 +00:00
Joel Brobecker b40e7bf371 * gdb.base/ending-run.exp: Use the first line of code inside
function body to test breakpoints.
        * gdb.mi/mi-break.exp, gdb.mi/mi2-break.exp: Adjust the actual
        location where the breakpoint is inserted when using the line
        where a function is declared. Fix typo in the description of
        one of the tests.
        * gdb.mi/mi-simplerun.exp, gdb.mi/mi2-simplerun.exp: Likewise.
2008-02-27 20:29:31 +00:00
Vladimir Prus 54e52265e2 * breakpoint.c (print_one_breakpoint_location): Revert Enb field
to old format.  Discard breakpoint address if shared library is
	unloaded.
	(breakpoint_1): Adjust formatting of table header accordingly.
2008-02-26 08:14:11 +00:00
Vladimir Prus 98deb0daae * breakpoint.c (break_command_1): Return void.
(break_command_really): Return void.  Rethrow
        exceptions instead of returning.
        (gdb_breakpoint): Remove the error_message parameter.
        Return void.  Rename to set_breakpoint.
        * gdb.h (gdb_breakpoint): Rename and move to...
	* breakpoint.h (set_breakpoint): ...here.
        * mi/mi-cmb-break.c (mi_cmd_break_insert): Restore
        event hooks even if exception is thrown.  Adjust to
        gdb_breakpoint interface changes.
2008-02-01 16:24:47 +00:00
Vladimir Prus 723a227560 Properly rethrow exception. This fixes errors
about non-existent functions for -break-insert.
        * breakpoint.c (break_command_really): Use throw_exception
        for rethrowing.  If rethrowing, don't print the exception.
2008-02-01 06:47:20 +00:00
Nick Roberts f43691e395 (test_file_list_exec_source_file): Update to new macro-info field. 2008-01-30 08:50:10 +00:00
Nick Roberts 8a578dd762 Add value field to tests for output of -var-set-format. 2008-01-23 21:05:16 +00:00
Nick Roberts 7bf81d6302 Add value field to tests for output of -var-set-format. 2008-01-23 06:20:57 +00:00
Vladimir Prus 60c4664782 * breakpoint.c (break_command_really): New parameter
ignore_count.
	(break_command_1): Pass 0 as
	ignore_count to break_command_really.
	(gdb_breakpoint): Pass ignore_count to
	break_command_really.
2008-01-22 19:43:10 +00:00
Pedro Alves c7dd36a172 * gdb.mi/mi-var-child.c (do_children_tests): Add 'dummy' integer
and 'dummy_ptr' integer pointer.  Initialize struct_declarations
	with dummy_ptr's address.
	* gdb.mi/var-cmd.c (do_children_tests): Likewise.
	* gdb.mi/mi-var-child.exp: int_ptr_ptr is now always "editable" on
	all targets.
	* gdb.mi/mi2-var-child.exp: Likewise.
2008-01-17 14:34:22 +00:00
Daniel Jacobowitz 9b254dd1ce Updated copyright notices for most files. 2008-01-01 22:53:26 +00:00
Vladimir Prus afe8ab2206 Add support for pending breakpoints in MI.
* gdb.h (gdb_breakpoint): Add parameter pending.
	* breakpoint.c (gdb_breakpoint): Add parameter pending.
	* mi/mi-cmd-break.c (mi_break_insert): Change
	comment to refer to manual.  Add support for
	the -f flag, for pending breakpoint.
2007-12-14 18:15:47 +00:00
Daniel Jacobowitz a6b151f187 * remote.c (remote_cmdlist): New variable.
(PACKET_vFile_open, PACKET_vFile_pread, PACKET_vFile_pwrite)
	(PACKET_vFile_close, PACKET_vFile_unlink): New constants.
	(remote_buffer_add_string, remote_buffer_add_bytes)
	(remote_buffer_add_int, remote_hostio_parse_result)
	(remote_hostio_send_command, remote_hostio_open, remote_hostio_pwrite)
	(remote_hostio_pread, remote_hostio_close, remote_hostio_unlink)
	(remote_fileio_errno_to_host, remote_hostio_error, fclose_cleanup)
	(remote_hostio_close_cleanup, remote_file_put, remote_file_get)
	(remote_file_delete, remote_put_command, remote_get_command)
	(remote_delete_command, remote_command): New functions.
	(_initialize_remote): Register new packets and commands.
	* Makefile.in (gdb_fileio_h): New variable.
	(remote.o): Update.
	(SUBDIR_MI_OBS): Add mi-cmd-target.o.
	(SUBDIR_MI_SRCS): Add mi/mi-cmd-target.c.
	(mi-cmd-target.o): New rule.
	* mi/mi-cmd-target.c: New file.
	* mi/mi-cmds.c (mi_cmds): Add target-file-delete, target-file-get,
	and target-file-put.
	* mi/mi-cmds.h (mi_cmd_target_file_get, mi_cmd_target_file_put)
	(mi_cmd_target_file_delete): Declare.
	* remote.h (remote_file_put, remote_file_get, remote_file_delete):
	Declare.
	* NEWS: Describe new file transfer support.

	* gdb.texinfo (Debugging Programs with Multiple Processes): Correct
	formatting.
	(Remote Debugging): Add File Transfer section.
	(Remote Configuration): Document Host I/O packets.
	(GDB/MI): Add GDB/MI File Transfer Commands section.
	(Remote Protocol): Add Host I/O Packets section.
	(Packets): Add vFile.

	* Makefile.in (OBS): Add hostio.o.
	(hostio.o): New rule.
	* server.h (handle_vFile): Declare.
	* hostio.c: New file.
	* server.c (handle_v_requests): Take packet_len and new_packet_len
	for binary packets.  Call handle_vFile.
	(main): Update call to handle_v_requests.

	* gdb.server/file-transfer.exp, gdb.server/transfer.txt,
	gdb.mi/mi-file-transfer.exp: New.
2007-11-30 21:50:19 +00:00
Nick Roberts 15820a9f75 Variables objects of pointers that can't be dereferenced are now
"noneditable".
2007-11-20 20:01:35 +00:00
Vladimir Prus 214270abf3 Fix crash when a variable object being deleted
has any of its children deleted previously.

	* varobj.c (delete_variable_1): Don't recurse
	into deleted children.
2007-11-07 20:06:29 +00:00
Daniel Jacobowitz 471ba8c90c * gdb.cp/classes.exp (do_tests): Always step to the line after the
call.
	* gdb.mi/mi-simplerun.exp (test_controlled_execution): Allow finish
	to return to the call.
	* gdb.mi/mi2-simplerun.exp (test_controlled_execution): Likewise.
	* gdb.mi/mi-return.exp (test_return_simple): Likewise.
	* gdb.mi/mi2-return.exp (test_return_simple): Likewise.
	* gdb.mi/mi-until.exp (test_until): Likewise.
	* gdb.mi/mi2-until.exp (test_until): Likewise.
2007-10-02 14:57:46 +00:00