Age | Commit message (Collapse) | Author | Files | Lines |
|
Add per-operation permission flags.
* target.h (struct target_ops): New method to_set_permissions.
(target_set_permissions): New macro.
(target_insert_breakpoint): Change macro to function.
(target_remove_breakpoint): Ditto.
(target_stop): Ditto.
(may_write_registers): Declare.
(may_write_memory): Declare.
(may_insert_breakpoints): Declare.
(may_insert_tracepoints): Declare.
(may_insert_fast_tracepoints): Declare.
(may_stop): Declare.
* target.c (may_write_registers, may_write_registers_1): New globals.
(may_write_memory, may_write_memory_1): New globals.
(may_insert_breakpoints, may_insert_breakpoints_1): New globals.
(may_insert_tracepoints, may_insert_tracepoints_1): New globals.
(may_insert_fast_tracepoints, may_insert_fast_tracepoints_1): New
globals.
(may_stop, may_stop_1): New global.
(target_xfer_partial): Test for write permission.
(target_store_registers): Ditto.
(target_insert_breakpoint): New function.
(target_remove_breakpoint): New function.
(target_stop): New function.
(_initialize_targets): Add new set/show variables.
(set_write_memory_permission): New function.
(update_target_permissions): New function.
(set_target_permissions): New function.
(update_current_target): Default to_set_permissions.
(_initialize_targets): Use new globals and setter function.
* tracepoint.c (start_tracing): Test for permission.
* inferior.h (update_observer_mode): Declare.
* infrun.c (non_stop_1): Define earlier.
(observer_mode, observer_mode_1): New globals.
(set_observer_mode, show_observer_mode): New functions.
(update_observer_mode): New function.
(_initialize_infrun): Define "set observer" command.
* remote.c (PACKET_QAllow): New optional packet.
(remote_protocol_features): Add QAllow.
(remote_set_permissions): New function.
(remote_start_remote): Call it.
(init_remote_ops): Add it to target vector.
(_initialize_remote): Add config command for QAllow.
* gdb.texinfo (Observer Mode): New section.
(General Query Packets): Document QAllow.
* gdb.base/permissions.exp: New file.
|
|
(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.
|
|
* 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.
|
|
* 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.
|
|
(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.
|
|
* 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.
|
|
Nathan Sidwell <nathan@codesourcery.com>
* tracepoint.c (trace_save): Open in binary mode.
|
|
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.
|
|
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.
|
|
* tracepoint.c (trace_variable_command): Run a cleanup.
|
|
* 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.
|
|
* tracepoint.c (tfile_xfer_partial): Check read result.
|
|
* tracepoint.c (trace_status_mi): Report frames created.
* gdb.texinfo (gdb/mi Tracepoint Commands) <-trace-status>:
Describe the `frames-created' field, tweak grammar.
|
|
* tracepoint.c (trace_dump_command): Include default-collect
expressions.
|
|
* 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.
|
|
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.
|
|
* 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.
|
|
* 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.
|
|
* 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.
|
|
trace_dump_command, and adjusted to recurse into while-stepping's
action list.
(trace_dump_command): Use it.
|
|
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.
|
|
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.
|
|
* tracepoint.c (trace_start_command): Confirm if trace is running.
(trace_stop_command): Error if trace not running.
|
|
* 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.
|
|
* 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.
|
|
* tracepoint.c (trace_find_line_command): Remove dead code.
|
|
* 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.
|
|
* tracepoint.c (collect_symbol): Send LOC_UNRESOLVED symbols to
expression handler.
|
|
* tracepoint.c (start_tracing): Check tracepoints before sending
commands to target, don't start if all tracepoints disabled.
|
|
* tracepoint.c (disconnect_or_stop_tracing): Get out of tfind mode.
|
|
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.
|
|
* 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.
|
|
* 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.
|
|
* 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.
|
|
(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.
|
|
the number of rows in the result.
|
|
* 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.
|
|
* 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.
|
|
* 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.
|
|
* 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.
|
|
* 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.
|
|
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.
|
|
* 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.
|
|
inspecting trace frames.
* tracepoint.c (finish_tfind_command): Invalidate the target
dcache.
|
|
* 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.
|
|
(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.
|
|
* 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.
|
|
Merge uploaded TSVs before merging uploaded tracepoints.
|
|
* 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.
|
|
* 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.
|