aboutsummaryrefslogtreecommitdiff
path: root/gdb/common/agent.h
AgeCommit message (Collapse)AuthorFilesLines
2018-01-02Update copyright year range in all GDB filesJoel Brobecker1-1/+1
gdb/ChangeLog: Update copyright year range in all GDB files
2017-06-22Add STRINGIFY to gdb/common/preprocessor.hPedro Alves1-3/+3
We have several copies of this common idiom under gdb/ currently. This commit moves them / factors them out to gdb/common/preprocessor.h. gdb/ChangeLog: 2017-06-22 Pedro Alves <palves@redhat.com> * common/agent.h: Include "common/preprocessor.h". (STRINGIZE_1, STRINGIZE): Delete. (IPA_SYM): Use STRINGIFY instead. * common/preprocessor.h (STRINGIFY_1, STRINGIFY): New. * compile/compile-c-support.c: Include "common/preprocessor.h". (STR, STRINGIFY): Delete. * ia64-libunwind-tdep.c: Include "common/preprocessor.h". (STRINGIFY2, STRINGIFY): Delete.
2017-06-22common/agent.h: Add missing include guardsPedro Alves1-0/+5
gdb/ChangeLog: 2017-06-22 Pedro Alves <palves@redhat.com> * common/agent.h: Add include guards.
2017-01-01update copyright year range in GDB filesJoel Brobecker1-1/+1
This applies the second part of GDB's End of Year Procedure, which updates the copyright year range in all of GDB's files. gdb/ChangeLog: Update copyright year range in all GDB files.
2016-01-01GDB copyright headers update after running GDB's copyright.py script.Joel Brobecker1-1/+1
gdb/ChangeLog: Update year range in copyright notice of all files.
2015-02-27Make functions and variables exported by the IPA be extern "C"Pedro Alves1-1/+2
Functions and variables that are exported by the IPA DSO (that GDBserver needs to look up) should have "C" mangling, thus be declared with extern "C". Function and variable declarations need the extern "C" marker, but variable definitions can't be marked extern, so the patch splits IP_AGENT_EXPORT into three. Building in C++ mode revealed that a few variables were missing IP_AGENT_EXPORT, thus the IPA has been broken when stripped, even in C mode... So this ends being a bug fix as well. gdb/ChangeLog: 2015-02-27 Pedro Alves <palves@redhat.com> * common/agent.h (IPA_SYM_EXPORTED_NAME): New. (IPA_SYM): Use it. * common/common-defs.h (EXTERN_C_PUSH, EXTERN_C_POP): New macros. gdb/gdbserver/ChangeLog: 2015-02-27 Pedro Alves <palves@redhat.com> * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use IP_AGENT_EXPORT_FUNC. * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use IP_AGENT_EXPORT_FUNC. * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR) (IP_AGENT_EXPORT): Delete. (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end) (gdb_trampoline_buffer, gdb_trampoline_buffer_end) (gdb_trampoline_buffer_error, collecting, gdb_collect) (stop_tracing, flush_trace_buffer, about_to_request_buffer_space) (trace_buffer_is_full, stopping_tracepoint, expr_eval_result) (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl) (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi) (traceframe_read_count, traceframe_write_count) (traceframes_created, trace_state_variables, get_raw_reg) (get_trace_state_variable_value, set_trace_state_variable_value) (ust_loaded, helper_thread_id, cmd_buf): Use IPA_SYM_EXPORTED_NAME. (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC. (tracepoints) Use IP_AGENT_EXPORT_VAR. (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP. (last_tracepoint): Move into !IN_PROCESS_AGENT block. (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP. (trace_state_variables): Use IP_AGENT_EXPORT_VAR. (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP. (trace_buffer_ctrl, trace_buffer_ctrl_curr) (traceframe_write_count, traceframe_read_count) (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR. (about_to_request_buffer_space, get_trace_state_variable_value) (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC. (collecting): Use IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP. (gdb_collect): Use IP_AGENT_EXPORT_FUNC. (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR. (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP. (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end) (gdb_trampoline_buffer, gdb_trampoline_buffer_end) (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR. * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL): Define. (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR) (IP_AGENT_EXPORT_VAR_DECL): Define. (tracing): Declare. (gdb_agent_get_raw_reg): Declare.
2015-01-01Update year range in copyright notice of all files owned by the GDB project.Joel Brobecker1-1/+1
gdb/ChangeLog: Update year range in copyright notice of all files.
2014-01-01Update Copyright year range in all files maintained by GDB.Joel Brobecker1-1/+1
2013-01-01Update years in copyright notice for the GDB files.Joel Brobecker1-1/+1
Two modifications: 1. The addition of 2013 to the copyright year range for every file; 2. The use of a single year range, instead of potentially multiple year ranges, as approved by the FSF.
2012-04-16gdb/Yao Qi1-1/+1
* common/agent.c (agent_run_command): Add one more parameter `len'. Update callers. * common/agent.h: Update declaration. * linux-nat.c (linux_child_static_tracepoint_markers_by_strid): Update. (linux_child_static_tracepoint_markers_by_strid): Ditto. gdb/gdbserver/ * tracepoint.c (COPY_FIELD_TO_BUF): New macro. (struct tracepoint_action_ops) <send>: New field. (m_tracepoint_action_send, r_tracepoint_action_send): New. (agent_expr_send, x_tracepoint_action_send): New. (l_tracepoint_action_send): New. (cmd_qtdp): Download and install tracepoint according to `use_agent'. (run_inferior_command): Add one more parameter `len'. Update callers. (tracepoint_send_agent): New. (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
2012-03-03gdb:Yao Qi1-1/+1
* common/agent.c (agent_look_up_symbols): Add one parameter 'arg'. * common/agent.h: Update declaration. * inf-child.c (inf_child_use_agent): New. (inf_child_can_use_agent): New. (inf_child_target): Initialize fields `to_use_agent' and `to_can_use_agent'. * agent.c (agent_new_objfile): New. (_initialize_agent): Add agent_new_objfile to new_objfile observer. * linux-nat.c (linux_child_static_tracepoint_markers_by_strid): New. (linux_target_install_ops): Initialize field `to_static_tracepoint_markers_by_strid'. * remote.c (free_current_marker): Move it to ... * tracepoint.c (free_current_marker): ... here. New. (cleanup_target_stop): New. * tracepoint.h: Declare free_current_marker. * NEWS: Add one entry about `info static-tracepoint-marker'. gdb/gdbserver: * tracepoint.c (tracepoint_look_up_symbols): Update call to agent_look_up_symbols. gdb/testsuite: * gdb.trace/strace.exp: run strace_info_marker in linux native gdb.
2012-03-03gdb:Yao Qi1-0/+2
* common/agent.c (agent_loaded_p): New. (agent_look_up_symbols): New global. * common/agent.h: Declare agent_loaded_p. gdb/gdbserver: * Makefile.in (linux-low.o): Keep dependence on agent.h. (linux-x86-low.o): Likewise. * server.h: Remove in_process_agent_loaded. * tracepoint.c (in_process_agent_loaded): Removed. Moved it common/agent.c. Update callers.
2012-03-03gdb:Yao Qi1-0/+17
* common/agent.c (struct ipa_sym_addresses) <addr_capability>: New. (agent_capability_check, agent_capability_invalidate): New. (symbol_list): New array element. * common/agent.h (enum agent_capa): New. * target.c (target_pre_inferior): Call agent_capability_invalidate. gdb/gdbserver: * tracepoint.c (gdb_agent_capability): New global. (in_process_agent_loaded_ust): Renamed to `in_process_agent_supports_ust'. Update callers. (in_process_agent_supports_ust): Call agent_capability_check. (clear_installed_tracepoints): Assert that agent supports agent.
2012-03-03gdb:Yao Qi1-0/+1
* target.h (struct target_ops) <to_use_agent>: New field. (struct target_ops) <to_can_use_agent>: New field. (target_use_agent, target_can_use_agent): New macro. * target.c (update_current_target): Update. * remote.c: New enum `PACKET_QAgent'. (remote_protocol_features): Add a new element. (remote_use_agent, remote_can_use_agent): New. (init_remote_ops): Initialize field `can_use_agent' with remote_can_use_agent. Intiailize field `use_agent' with remote_use_agent. * common/agent.c (use_agent): New global. * common/agent.h: Declare it. * tracepoint.c (info_static_tracepoint_markers_command): Add comment. * Makefile.in (SFILES): Add common/agent.c and agent.c. (COMMON_OBS): Add common/agent.o and agent.o (common-agent.o): New rule. * agent.c: New. gdb/doc: * gdb.texinfo (In-Process Agent): New node. Document new commands. (General Query Packets): Add packet `QAgent'. gdb/gdbserver: * linux-low.c (linux_supports_agent): New. (linux_target_ops): Initialize field `supports_agent' with linux_supports_agent. * target.h (struct target_ops) <supports_agent>: New. (target_supports_agent): New macro. * server.c (handle_general_set): Handle packet 'QAgent'. (handle_query): Send `QAgent+'. * Makefile.in (server.o): Depends on agent.h.
2012-03-03gdb:Yao Qi1-0/+37
* common/agent.c: New. * common/agent.h: New. * configure.ac: Add `sys/socket.h' and `sys/un.h' to AC_CHECK_HEADERS. * configure, configh.in: Regenerated. gdb/gdbserver: * Makefile.in (OBS): Add agent.o. Add new rule for agent.o. Track dependence of tracepoint.c on agent.h. * tracepoint.c (run_inferior_command_1): (run_inferior_command): Call agent_run_command. (gdb_ust_connect_sync_socket): Deleted. Move it to common/agent.c. (resume_thread, stop_thread): Likewise. (gdb_ust_socket_init): Renamed to ... (gdb_agent_socket_init): ... New. (gdb_ust_thread): Renamed to ... (gdb_agent_helper_thread): ... New. (gdb_ust_init): Move some code to ... (gdb_agent_init): ... here. New. [HAVE_UST]: Call gdb_ust_init. (initialize_tracepoint_ftlib): Call gdb_agent_init. * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS. * config.in, configure: Regenerated.