aboutsummaryrefslogtreecommitdiff
path: root/gdb/tracepoint.c
AgeCommit message (Collapse)AuthorFilesLines
2010-05-27 * remote.c (unpack_varlen_hex): Remove forward declaration.Pedro Alves1-2/+1
(remote_console_output): Make static, and add forward declaration. * remote.h: Drop FIXME comment. (unpack_varlen_hex): Declare. (remote_console_output, remote_cisco_objfile_relocate) (deprecated_target_resume_hook, deprecated_target_wait_loop_hook): Delete declarations. * tracepoint.c: Include "remote.h". (unpack_varlen_hex): Delete declaration.
2010-05-172010-05-16 Michael Snyder <msnyder@vmware.com>Michael Snyder1-1/+2
* target.c: White space. * target-descriptions.c: White space. * target-memory.c: White space. * thread.c: White space. * top.c: White space. * tracepoint.c: White space. * trad-frame.c: White space. * tramp-frame.c: White space. * ui-file.c: White space. * ui-out.c: White space. * user-regs.c: White space. * utils.c: White space.
2010-05-062010-05-05 Michael Snyder <msnyder@vmware.com>Michael Snyder1-20/+10
* ax-gdb.c (gen_struct_elt_for_reference): Delete unused variables. * tracepoint.c (delete_trace_variable_command): Delete unused variables. (encode_actions_1): Delete unused variables. (start_tracing): Delete unused variable. (trace_status_mi): Delete unused variable. (tfind_1): Delete unused variable. (trace_find_pc_command): Delete unused variable. (trace_find_line_command): Delete unused variables. (trace_find_range_command): Delete unused variables. (trace_find_outside_command): Delete unused variables. (parse_tracepoint_definition): Delete unused variables. (tfile_fetch_registers): Delete unused variable.
2010-05-04* remote.c (register_remote_support_xml)Mark Kettenis1-2/+2
(remote_query_supported_append, remote_query_supported): Add cast to NULL used as sentinel. * tracepoint.c (tvariables_info_1): Likewise. * utils.c (add_internal_problem_command): Likewise.
2010-04-232010-04-23 Stan Shebs <stan@codesourcery.com>Stan Shebs1-30/+22
* ax.h (struct agent_expr): Merge in agent_reqs fields, add some comments. (struct agent_reqs): Remove. (ax_reg_mask): Declare. * ax-general.c (new_agent_expr): Add gdbarch argument, set new fields. (free_agent_expr): Free reg_mask. (ax_print): Add scope and register mask info. (ax_reqs): Remove agent_reqs argument, use agent expression fields, and move part of register mask computation to... (ax_reg_mask): New function. * ax-gdb.c (gen_trace_static_fields): Call it. (gen_traced_pop): Ditto. (is_nontrivial_conversion): Add dummy gdbarch to new_agent_expr. (gen_trace_for_var): Pass gdbarch to new_agent_expr. (gen_trace_for_expr): Ditto, and clear optimized_out flag. (gen_eval_for_expr): Ditto, and require an rvalue. (agent_command): Call ax_reqs. (agent_eval_command): Ditto. * tracepoint.c (report_agent_reqs_errors): Use agent expression fields. (validate_action_line): Ditto. (collect_symbol): Ditto. (encode_actions_1): Ditto.
2010-04-222010-04-21 Stan Shebs <stan@codesourcery.com>Stan Shebs1-1/+1
Nathan Sidwell <nathan@codesourcery.com> * tracepoint.c (trace_save): Open in binary mode.
2010-04-202010-04-20 Stan Shebs <stan@codesourcery.com>Stan Shebs1-1/+3
Nathan Sidwell <nathan@codesourcery.com> * dwarf2loc.c (struct axs_var_loc): New struct. (dwarf2_tracepoint_var_loc): New function. (dwarf2_tracepoint_var_access): New function. (dwarf2_tracepoint_var_ref): Use dwarf2_tracepoint_var_loc, deal with DW_OP_piece. (locexpr_describe_location_piece): New function. (locexpr_describe_location_1): New function. (locexpr_describe_location): Call it, update signature. (loclist_describe_location): Rewrite to loop over locations, update signature. * symtab.h (struct symbol_computed_ops): Add address to describe_location arguments, return void. * printcmd.c (address_info): Get context PC, pass to computed location description. * tracepoint.c (scope_info): Ditto. * ax-gdb.c (trace_kludge): Export.
2010-04-192010-04-19 Stan Shebs <stan@codesourcery.com>Stan Shebs1-2/+4
Vladimir Prus <vladimir@codesourcery.com> * tracepoint.c (tfind_1): Add missing newline, report exit from tfind mode as such. * target.c (update_current_target): Make default to_trace_find return -1.
2010-04-162010-04-16 Stan Shebs <stan@codesourcery.com>Stan Shebs1-0/+1
* tracepoint.c (trace_variable_command): Run a cleanup.
2010-04-162010-04-15 Stan Shebs <stan@codesourcery.com>Stan Shebs1-4/+12
* frame.c: Include tracepoint.h. (get_current_frame): Allow a trace frame to be an alternate source of stack frame data. * tracepoint.c (tfind_1): Don't try to get current stack frame if it won't succeed.
2010-04-132010-04-12 Stan Shebs <stan@codesourcery.com>Stan Shebs1-1/+8
* tracepoint.c (tfile_xfer_partial): Check read result.
2010-04-092010-04-09 Stan Shebs <stan@codesourcery.com>Stan Shebs1-0/+2
* tracepoint.c (trace_status_mi): Report frames created. * gdb.texinfo (gdb/mi Tracepoint Commands) <-trace-status>: Describe the `frames-created' field, tweak grammar.
2010-04-092010-04-09 Stan Shebs <stan@codesourcery.com>Stan Shebs1-1/+26
* tracepoint.c (trace_dump_command): Include default-collect expressions.
2010-04-09 gdb/Pedro Alves1-6/+8
* tracepoint.c (trace_status_mi): Report disconnected tracing and circular trace buffer statuses. gdb/doc/ * gdb.texinfo (gdb/mi Tracepoint Commands) <-trace-status>: Describe the `circular' and `disconnected' fields.
2010-04-092010-04-08 Stan Shebs <stan@codesourcery.com>Stan Shebs1-16/+50
Pedro Alves <pedro@codesourcery.com> * tracepoint.h (struct trace_status): New fields disconnected_tracing and circular_buffer. (disconnect_tracing): Rename from disconnect_or_stop_tracing. * tracepoint.c (trace_status_command): Display target's status for disconnected tracing and circular buffer. (disconnect_tracing): Rename from disconnect_or_stop_tracing, add query for non-disconnected-tracing case, remove the stop_tracing call. (tfile_open): Clear disconnected and circular buffer status. (trace_save): Save disconnected and circular buffer status. (parse_trace_status): Parse disconnected and circular buffer status, also recognize disconnected as a stop reason. * remote.c (remote_set_disconnected_tracing): Only set QTDisconnected if the remote end supports disconnected tracing. Warn otherwise, if trying to enable disconnected tracing. * infcmd.c (detach_command): Update disconnect_tracing call. * cli/cli-cmds.c (quit_command): Ditto. * gdb.texinfo (Tracepoint Packets): Describe disconn and circular trace status fields.
2010-04-062010-04-06 Stan Shebs <stan@codesourcery.com>Stan Shebs1-26/+13
* defs.h (char_ptr): Move typedef here from... * ada-lang.c (char_ptr): Remove. * charset.c (char_ptr): Remove. * tracepoint.h (struct uploaded_string): Remove. (struct uploaded_tp): Use vectors for string arrays. * tracepoint.c (trace_save): Use vectors of actions. (parse_tracepoint_definition): Ditto. (get_uploaded_tp): Clear vectors. * breakpoint.c (create_tracepoint_from_upload): Use vectors. (next_cmd): Change to an int. (read_next_cmd): Use vector of command strings.
2010-04-052010-04-05 Stan Shebs <stan@codesourcery.com>Stan Shebs1-11/+54
* tracepoint.c: Include gdbcore.h. (tfile_xfer_partial): Return partial results, also try reading from executable. (tfile_has_all_memory): New function. (init_tfile_ops): Use it. * gdb.trace/tfile.c: Add a variable split across two blocks, and a constant global. * gdb.trace/tfile.exp: Try to print them.
2010-04-042010-04-04 Stan Shebs <stan@codesourcery.com>Stan Shebs1-1/+39
* tracepoint.c (tfile_fetch_registers): Add fallback case. * gdb.texinfo (Tracepoint Restrictions): Document PC inference. (tdump): Explain how tdump works. * gdb.trace/tfile.exp: Sharpen tfind test.
2010-04-02 * tracepoint.c (trace_dump_actions): New, factored out fromPedro Alves1-48/+61
trace_dump_command, and adjusted to recurse into while-stepping's action list. (trace_dump_command): Use it.
2010-04-02 * breakpoint.h (struct counted_command_line): Moved definition toPedro Alves1-3/+3
breakpoint.c, and forward declare. (breakpoint_commands): Declare. * breakpoint.c (struct counted_command_line): Moved here. (breakpoint_commands): New. * tracepoint.c (encode_actions): Use breakpoint_commands. * remote.c (remote_download_tracepoint): Ditto.
2010-04-012010-04-01 Stan Shebs <stan@codesourcery.com>Stan Shebs1-72/+66
Nathan Sidwell <nathan@codesourcery.com> * tracepoint.h (enum actionline_type): Remove. (validate_actionline): Change return to void. * tracepoint.c (report_agent_reqs_errors): New function. (validate_actionline): Call it, change return to void, report errors more consistently. (collect_symbol): Call report_agent_reqs_errors. (encode_actions_1): Ditto. (encode_actions): Don't expect a result from validate_actionline. * gdb.trace/actions.exp: Tweak expected output. * gdb.trace/while-stepping.exp: Tweak expected output.
2010-04-012010-04-01 Stan Shebs <stan@codesourcery.com>Stan Shebs1-0/+10
* tracepoint.c (trace_start_command): Confirm if trace is running. (trace_stop_command): Error if trace not running.
2010-04-01 gdb/Pedro Alves1-22/+60
* tracepoint.c: Include stack.h. (struct add_local_symbols_data): New. (do_collect_symbol): New. (add_local_symbols): Rewrite using iterate_over_block_arg_vars and iterate_over_block_local_vars. * stack.c (print_block_frame_locals): Rewrite as ... (iterate_over_block_locals): ... this. Take a callback function pointer and generic data pointer, and call that instead of print_variable_and_value. (struct print_variable_and_value_data): New. (do_print_variable_and_value): New. (iterate_over_block_local_vars): New, abstracted out from print_frame_local_vars. (print_frame_local_vars): Rewrite using iterate_over_block_local_vars. (iterate_over_block_arg_vars): New, abstracted out from print_frame_arg_vars. (print_frame_arg_vars): Rewrite using iterate_over_block_arg_vars. * stack.h (iterate_over_block_arg_local_vars_cb): New typedef. (iterate_over_block_arg_vars, iterate_over_block_local_vars): Declare. gdb/testsuite/ * gdb.trace/collection.c (local_test_func): Define a local struct, and instanciate it.
2010-03-312010-03-31 Stan Shebs <stan@codesourcery.com>Stan Shebs1-0/+17
* breakpoint.c (tracepoint_save_command): Include variables, conditionals, tracepoint types, and default-collect. * tracepoint.c (save_trace_state_variables): New function. * tracepoint.h (save_trace_state_variables): Declare it. * gdb.trace/save-trace.exp: Test save/restore of default-collect and tracepoint conditionals. (gdb_verify_tracepoints): Delete unused return.
2010-03-302010-03-29 Stan Shebs <stan@codesourcery.com>Stan Shebs1-21/+4
* tracepoint.c (trace_find_line_command): Remove dead code.
2010-03-292010-03-29 Stan Shebs <stan@codesourcery.com>Stan Shebs1-11/+89
* tracepoint.h (struct uploaded_string): New struct. (struct uploaded_tp): New fields for source strings. * breakpoint.c (this_utp, next_cmd): New globals. (read_uploaded_action): New function. (create_tracepoint_from_upload): Fill in more parts of a tracepoint. * tracepoint.c (encode_source_string): New function. (trace_save): Write out source strings, fix error checks. (parse_tracepoint_definition): Add source string parsing. * remote.c (PACKET_TracepointSource): New packet type. (remote_download_command_source): New function. (remote_download_tracepoint): Download source pieces also. (_initialize_remote): Add packet config command. * gdb.texinfo (Tracepoint Packets): Describe QTDPsrc. (General Query Packets): Describe TracepointSource.
2010-03-292010-03-29 Stan Shebs <stan@codesourcery.com>Stan Shebs1-2/+3
* tracepoint.c (collect_symbol): Send LOC_UNRESOLVED symbols to expression handler.
2010-03-292010-03-29 Stan Shebs <stan@codesourcery.com>Stan Shebs1-9/+28
* tracepoint.c (start_tracing): Check tracepoints before sending commands to target, don't start if all tracepoints disabled.
2010-03-272010-03-26 Stan Shebs <stan@codesourcery.com>Stan Shebs1-0/+7
* tracepoint.c (disconnect_or_stop_tracing): Get out of tfind mode.
2010-03-26 * tracepoint.c (current_trace_status): Don't make sure error_descPedro Alves1-4/+5
is non-NULL here. (parse_trace_status): Release a previous error_desc string, and set it to NULL by default. If stop reason is tracepoint_error, make sure error_desc is not left NULL.
2010-03-26 gdb/Pedro Alves1-2/+1
* tracepoint.c (trace_save): Remove X from tracepoint error description. gdb/testsuite/ * gdb.trace/tfile.c (tohex, bin2hex): New. (write_error_trace_file): Hexify error description.
2010-03-26 gdb/Pedro Alves1-12/+3
* tracepoint.c (parse_trace_status): Don't allow plain strings in the terror description. Don't expect an X prefix. gdb/doc/ * gdb.texinfo (Tracepoint Packets): Remove mention that terror:string may be plain text, and drop mention of X prefix.
2010-03-262010-03-25 Stan Shebs <stan@codesourcery.com>Stan Shebs1-5/+56
* tracepoint.h (trace_stop_reason): Add tracepoint_error. (struct trace_status): New field error_desc. * tracepoint.c (stop_reason_names): Add terror. (current_trace_status): Ensure non-NULL error description. (trace_status_command): Add error report. (trace_status_mi): Ditto. (trace_save): Add special case for error description. (parse_trace_status): Add case for errors. * gdb.texinfo (Tracepoint Packets): Document trace error status. * gdb.trace/tfile.c: Generate an additional trace file, improve portability. * gdb.trace/tfile.exp: Test trace file with an error stop, delete files in a better way.
2010-03-24 * breakpoint.h (struct counted_command_line): New struct.Tom Tromey1-3/+3
(struct breakpoint) <commands>: Change type. (struct bpstats) <commands>: Change type. <commands_left>: New field. * breakpoint.c (alloc_counted_command_line): New function. (incref_counted_command_line): Likewise. (decref_counted_command_line): Likewise. (do_cleanup_counted_command_line): Likewise. (make_cleanup_decref_counted_command_line): Likewise. (breakpoint_set_commands): Use decref_counted_command_line and alloc_counted_command_line. (commands_command): Don't error if breakpoint commands are executing. (commands_from_control_command): Likewise. (bpstat_free): Update. (bpstat_copy): Likewise. (bpstat_clear_actions): Likewise. (bpstat_do_actions_1): Likewise. (bpstat_stop_status): Likewise. (print_one_breakpoint_location): Likewise. (delete_breakpoint): Likewise. (bpstat_alloc): Initialize new field. (tracepoint_save_command): Update. * tracepoint.c (encode_actions): Update. (trace_dump_command): Update.
2010-03-24 * tracepoint.c (tvariables_info_1): Actually computeVladimir Prus1-1/+1
the number of rows in the result.
2010-03-23 Implement -trace-save.Vladimir Prus1-27/+42
* mi-cmds.h (mi_cmds_trace_save): Declare. * mi-cmds.c (mi_cmds): Register -trace-save. * mi/mi-main.c (mi_cmd_trace_save): New. * remote.c (remote_save_trace_data): Take const parameter. * target.h (struct target_ops::to_save_trace_data): Take const parameter. * target.c (update_current_target): Adjust to the above. * tracepoint.c (trave_save): New, extracted from (trace_save_command): ...this. (tfile_trace_find): Remove message that is unnecessary now that 'tfind' reports found frame. * tracepoint.h (trace_save): Declare.
2010-03-23 Implement -trace-find.Vladimir Prus1-11/+35
* mi/mi-cmds.c (mi_cmds): Register -trace-find. * mi/mi-cmds.h (mi_cmd_trace_find): Declare. * mi/mi-main.c (mi_cmd_trace_find): New. * target.h (struct target_ops): Document to_trace_find. * tracepoint.h (tfind_1): Declare. * tracepoint.c (finish_tfind_command): Rename to... (tfind_1): ...this. * remote.c (remote_trace_find): Return -1 if target say there's no frame. Improve error diagnostics.
2010-03-23 -trace-define-variable and -trace-list-variables.Vladimir Prus1-17/+48
* tracepoint.c (create_trace_state_variable): Make private copy of name, as opposed to assuming the pointer lives forever. (tvariables_info_1): New. (tvariables_info): Use the above. * tracepoint.h (create_trace_state_variable, tvariables_info_1): Declare. * mi/mi-cmds.c (mi_cmds): Register -trace-define-variable and -trace-list-variables. * mi/mi-cmds.h (mi_cmd_trace_define_variable) (mi_cmd_trace_list_variables): New. * mi/mi-main.c (mi_cmd_trace_define_variable) (mi_cmd_trace_list_variables): New.
2010-03-23 -trace-start/-trace-end/-trace-status.Vladimir Prus1-12/+106
* mi/mi-cmds.c (mi_cmds): Register -trace-start, -trace-status and -trace-stop. * mi/mi-cmds.h (mi_cmd_trace_start, mi_cmd_trace_status) (mi_cmd_trace_stop): Declare. * mi/mi-main.c (mi_cmd_trace_start, mi_cmd_trace_status) (mi_cmd_trace_stop): New. * tracepoint.c (start_tracing): New, extracted from... (trace_start_command): ...this. (trace_status_mi): New. * tracepoint.h (struct trace_status): Document stopping_tracepoint. (start_tracing, stop_tracing, trace_status_mi): Declare.
2010-03-23 Unify actions and commandsVladimir Prus1-223/+90
* defs.h (read_command_lines, read_command_lines_1): New parameters validator and closure. * tracepoint.h (struct action_line): Remove. * breakpoint.h (struct breakpoint): Remove the 'actions' field. * defs.h (enum command_control_type): New value while_stepping_control. (struct command_line): Add comments. * breakpoint.c (breakoint_is_tracepoint): New. (breakpoint_set_commands): For tracepoints, verify the commands are permissible. (check_tracepoint_commands): New. (commands_command): Require that each new line is validated using check_tracepoint_command, if we set commands for a tracepoint. (create_tracepoint_from_upload): Likewise. (print_one_breakpoint_location): Remove the code to print actions specifically. (tracepoint_save_command): Relay to print_command_lines. * cli/cli-script.c (process_next_line): New parameters validator and closure. Handle 'while-stepping'. Call validator if not null. (read_command_lines, read_command_lines1): Likewise. (recurse_read_control_structure): New parameters validator and closure. Handle while_stepping_control. (print_command_lines): Handle while-stepping. (get_command_line, define_command, document_command): Adjust. * remote.c (remote_download_tracepoint): Adjust. * tracepoint.c (make_cleanup_free_actions, read_actions) (free_actions, do_free_actions_cleanup): Remove. (trace_actions_command): Use read_command_lines. (validate_actionline): Use error in one place. (encode_actions_1): New, extracted from... (encode_actions): ...this. Also use cleanups for exception safety. (trace_dump_command): Adjust. * mi/mi-cmd-break (mi_cmd_break_commands): Validate commands if it's tracepoint.
2010-03-182010-03-18 Stan Shebs <stan@codesourcery.com>Stan Shebs1-9/+77
Pedro Alves <pedro@codesourcery.com> * target.h (struct target_ops): New method to_set_circular_trace_buffer. (target_set_circular_trace_buffer): New macro. * target.c (update_current_target): Add to_set_circular_trace_buffer, fix to_set_disconnected_tracing default behavior. * remote.c (remote_set_circular_trace_buffer): New function. (init_remote_ops): Add it to vector. * tracepoint.h (struct trace_status): New field traceframes_created, change buffer_size and buffer_free to int. * tracepoint.c (circular_trace_buffer): New global. (start_tracing): Send values of disconnected tracing and circular trace buffer settings. (set_circular_trace_buffer): New function. (parse_trace_state): Handle total space and frames created. (trace_status_command): Display total space and total frames created. (trace_save): Write out new status values. (parse_trace_status): Set traceframe_count, traceframes_created, buffer_free and buffer_size to -1 by default. (_initialize_tracepoint): New setshow for circular-trace-buffer. * NEWS: Mention the circular trace buffer option. * gdb.texinfo (Starting and Stopping Trace Experiments): Describe circular-trace-buffer. (Tracepoint Packets): Describe QTBuffer, and details of the qTStatus reply. * gdb.trace/circ.exp: Test circular-trace-buffer. * gdb.trace/tfile.exp: Update tstatus test.
2010-03-172010-03-17 Stan Shebs <stan@codesourcery.com>Stan Shebs1-42/+61
* ax-gdb.h (struct axs_value): New field optimized_out. (gen_trace_for_var): Add gdbarch argument. * ax-gdb.c (gen_trace_static_fields): New function. (gen_traced_pop): Call it, add gdbarch argument. (gen_trace_for_expr): Update call to it. (gen_trace_for_var): Ditto, and report optimized-out variables. (gen_struct_ref_recursive): Check for optimized-out value. (gen_struct_elt_for_reference): Ditto. (gen_static_field): Pass gdbarch instead of expression, assume optimization if field not found. (gen_var_ref): Set the optimized_out flag. (gen_expr): Error on optimized-out variable. * tracepoint.c (collect_symbol): Handle struct-valued vars as expressions, skip optimized-out variables with computed locations. * dwarf2loc.c (dwarf2_tracepoint_var_ref): Flag instead of erroring out if location expression missing. (loclist_tracepoint_var_ref): Don't error out here.
2010-03-12 * target.c (memory_xfer_partial): Don't use the stack cache ifPedro Alves1-0/+1
inspecting trace frames. * tracepoint.c (finish_tfind_command): Invalidate the target dcache.
2010-03-042010-03-03 Stan Shebs <stan@codesourcery.com>Stan Shebs1-55/+75
* remote.c (remote_download_tracepoint): Iterate over locations. * tracepoint.c (validate_actionline): Ditto. (encode_actions): Add location argument. (trace_dump_command): Check all locations to see if stepping frame.
2010-02-24 * tracepoint.h (set_traceframe_number)Pedro Alves1-0/+61
(cleanup_restore_current_traceframe): Declare. * tracepoint.c (set_traceframe_number): New. (struct current_traceframe_cleanup): New. (do_restore_current_traceframe_cleanup) (restore_current_traceframe_cleanup_dtor) (make_cleanup_restore_current_traceframe): New. * infrun.c: Include tracepoint.h. (fetch_inferior_event): Switch out and in of tfind mode.
2010-02-12 gdb/doc/Pedro Alves1-2/+2
* gdb.texinfo (Using the Collected Data): Specify that the address range of `tfind outsize' is exclusive, and that the address range of `tfind range' is inclusive. (Tracepoint Packets): Specify that the address range of `QTFrame:range' is inclusive, and that the address range of `QTFrame:outside' is exclusive gdb/ * tracepoint.c (_initialize_tracepoint): Specify that the address range of `tfind outsize' is exclusive, and that the address range of `tfind range' is inclusive, in the commands' help strings.
2010-02-11 * tracepoint.c (tfile_open): Remove spurious discard_cleanups.Pedro Alves1-3/+4
Merge uploaded TSVs before merging uploaded tracepoints.
2010-01-19Delete unused or undefined functions.Joel Brobecker1-1/+0
* breakpoint.c (ep_parse_optional_filename): Delete. * dcache.c (dcache_write_line): Remove declaration. * infrun.c (build_infrun): Remove declaration. * tracepoint.c (tracepoint_save_command): Remove declaration. * linux-nat.c (init_lwp_list): Delete. No longer used. * event-loop.c (check_async_signal_handlers): Delete declaration. * infrun.c (init_execution_control_state): Delete. (proceed): Update comment to avoid mentioning init_execution_control_state. * target.c (kill_or_be_killed, nosupport_runtime): Delete. * ada-lang.c (ada_to_static_fixed_value): Delete. * scm-lang.c (evaluate_subexp_scm): Delete declaration. * cp-namespace.c (cp_copy_usings): Delete. * xml-syscall.c (xml_number_of_syscalls): Delete. * progspace.c (find_program_space_by_num): Delete. * inflow.c (handle_sigio): Delete declaration. * hppa-tdep.c (hppa_alignof): Delete. * mipsnbsd-tdep.c (mipsnbsd_sigtramp_offset) (mipsnbsd_core_osabi_sniffer): Delete.
2010-01-162010-01-16 Stan Shebs <stan@codesourcery.com>Stan Shebs1-27/+110
* tracepoint.h (struct trace_status): Use unsigned long long instead of size_t. * tracepoint.c (trace_status_command): Fix printf directive. (trace_save_command): Check fwrite returns, fix printf directive. (trace_filename): New global. (tfile_open): Set it, check read returns. (tfile_close): Free trace_filename. (tfile_get_traceframe_address): Check read returns. (tfile_trace_find): Ditto. (tfile_fetch_registers): Ditto. (tfile_xfer_partial): Ditto. (tfile_get_trace_state_variable_value): Ditto.
2010-01-15 Add trace file support.Stan Shebs1-32/+1208
* tracepoint.h (enum trace_stop_reason): New enum. (struct trace_status): New struct. (parse_trace_status): Declare. (struct uploaded_tp): Move here from remote.c, add fields for actions. (struct uploaded_tsv): New struct. * tracepoint.c (tfile_ops): New target vector. (trace_fd): New global. (tfile_open): New function. (tfile_close): New function. (tfile_files_info): New function. (tfile_get_trace_status): New function. (tfile_get_traceframe_address): New function. (tfile_trace_find): New function. (tfile_fetch_registers): New function. (tfile_xfer_partial): New function. (tfile_get_trace_state_variable_value): New function. (init_tfile_ops): New function. (_initialize_tracepoint): Call it, add tfile target. (trace_status): New global. (current_trace_status): New function. (trace_running_p): Remove, change all users to get from current_trace_status()->running. (get_trace_status): Remove. (trace_status_command): Call target_get_trace_status directly, report more detail including tracing stop reasons. (trace_find_command): Always allow tfind on a file. (trace_find_pc_command): Ditto. (trace_find_tracepoint_command): Ditto. (trace_find_line_command): Ditto. (trace_find_range_command): Ditto. (trace_find_outside_command): Ditto. (trace_frames_offset, cur_offset): Declare as off_t. (trace_regblock_size): Rename from reg_size, update users. (parse_trace_status): New function. (tfile_interp_line): New function. (disconnect_or_stop_tracing): Ensure current trace status before asking what to do. (stop_reason_names): New global. (trace_save_command): New command. (get_uploaded_tp): Move here from remote.c. (find_matching_tracepoint): Ditto. (merge_uploaded_tracepoints): New function. (parse_trace_status): Use stop_reason_names. (_initialize_tracepoint): Define tsave command. * target.h (target_ops): New fields to_save_trace_data, to_upload_tracepoints, to_upload_trace_state_variables, to_get_raw_trace_data, change to_get_trace_status to take a pointer to a status struct. (target_save_trace_data): New macro. (target_upload_tracepoints): New macro. (target_upload_trace_state_variables): New macro. (target_get_raw_trace_data): New macro. * target.c (update_current_target): Add new methods, change signature of to_get_trace_status. * remote.c (hex2bin): Make globally visible. (bin2hex): Ditto. (remote_download_trace_state_variable): Download name also. (remote_get_trace_status): Update parameter, use parse_trace_status. (remote_save_trace_data): New function. (remote_upload_tracepoints): New function. (remote_upload_trace_state_variables): New function. (remote_get_raw_trace_data): New function. (remote_start_remote): Use them. (_initialize_remote_ops): Add operations. * ax-gdb.c: Include breakpoint.h. * breakpoint.c (create_tracepoint_from_upload): Use break_command_really, return tracepoint, warn about unimplemented parts. * NEWS: Mention trace file addition. * gdb.texinfo (Trace Files): New section. (Tracepoint Packets): Document QTSave and qTBuffer. (Trace File Format): New appendix. * generic/gdbtk-bp.c (gdb_trace_status): Use current_trace_status. * gdb.trace/tfile.c: New file. * gdb.trace/tfile.exp: New file.