diff options
author | Pedro Alves <palves@redhat.com> | 2010-07-01 10:36:12 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2010-07-01 10:36:12 +0000 |
commit | 0fb4aa4bfcc2aa61c27132f94cf1656dca137dc9 (patch) | |
tree | c431424ed51b11bebcff4bc2409f79f9e802edcb /gdb/NEWS | |
parent | 76fa04a48e54c68fa6f16db02634b86ff340b98e (diff) | |
download | gdb-0fb4aa4bfcc2aa61c27132f94cf1656dca137dc9.zip gdb-0fb4aa4bfcc2aa61c27132f94cf1656dca137dc9.tar.gz gdb-0fb4aa4bfcc2aa61c27132f94cf1656dca137dc9.tar.bz2 |
Static tracepoints support, and UST integration.
gdb/gdbserver/
* configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
* mem-break.c (uninsert_all_breakpoints)
(reinsert_all_breakpoints): New.
* mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
* tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
(gdb_agent_ust_loaded, helper_thread_id)
(gdb_agent_helper_thread_id): New macros.
(struct ipa_sym_addresses): Add addr_ust_loaded,
addr_helper_thread_id, addr_cmd_buf.
(symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
(in_process_agent_loaded_ust): New.
(write_e_ust_not_loaded): New.
(maybe_write_ipa_ust_not_loaded): New.
(struct collect_static_trace_data_action): New.
(enum tracepoint_type) <static_tracepoint>: New.
(struct tracepoint) <handle>: Mention static tracepoints.
(struct static_tracepoint_ctx): New.
(CMD_BUF_SIZE): New.
(add_tracepoint_action): Handle static tracepoint actions.
(unprobe_marker_at): New.
(clear_installed_tracepoints): Handle static tracepoints.
(cmd_qtdp): Handle static tracepoints.
(probe_marker_at): New.
(cmd_qtstart): Handle static tracepoints.
(response_tracepoint): Handle static tracepoints.
(cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
(handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
(get_context_regcache): Handle static tracepoints.
(do_action_at_tracepoint): Handle static tracepoint actions.
(traceframe_find_block_type): Handle static trace data blocks.
(traceframe_read_sdata): New.
(download_tracepoints): Download static tracepoint actions.
[HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
(GDB_PROBE_NAME): New.
(ust_ops): New.
(GET_UST_SYM): New.
(USTF): New.
(dlsym_ust): New.
(ust_marker_to_static_tracepoint): New.
(gdb_probe): New.
(collect_ust_data_at_tracepoint): New.
(gdb_ust_probe): New.
(UNIX_PATH_MAX, SOCK_DIR): New.
(gdb_ust_connect_sync_socket): New.
(resume_thread, stop_thread): New.
(run_inferior_command): New.
(init_named_socket): New.
(gdb_ust_socket_init): New.
(cstr_to_hexstr): New.
(next_st): New.
(first_marker, next_marker): New.
(response_ust_marker): New.
(cmd_qtfstm, cmd_qtsstm): New.
(unprobe_marker_at, probe_marker_at): New.
(cmd_qtstmat, gdb_ust_thread): New.
(gdb_ust_init): New.
(initialize_tracepoint_ftlib): Call gdb_ust_init.
* linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
(ST_REGENTRY): New.
(x86_64_st_collect_regmap): New.
(X86_64_NUM_ST_COLLECT_GREGS): New.
(AMD64_RIP_REGNUM): New.
(supply_static_tracepoint_registers): New.
* linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
(ST_REGENTRY): New.
(i386_st_collect_regmap): New.
(i386_NUM_ST_COLLECT_GREGS): New.
(supply_static_tracepoint_registers): New.
* server.c (handle_query): Handle qXfer:statictrace:read.
<qSupported>: Report support for StaticTracepoints, and
qXfer:statictrace:read features.
* server.h (traceframe_read_sdata)
(supply_static_tracepoint_registers): Declare.
* remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
(unpack_varlen_hex): Include in IPA build.
* Makefile.in (ustlibs, ustinc): New.
(IPA_OBJS): Add remote-utils-ipa.o.
($(IPA_LIB)): Link -ldl and -lpthread.
(UST_CFLAGS): New.
(IPAGENT_CFLAGS): Add UST_CFLAGS.
* config.in, configure: Regenerate.
gdb/
* NEWS: Mention new support for static tracepoints.
(New packets): Mention qTfSTM, qTsSTM, qTSTMat and
qXfer:statictrace:read.
(New features in the GDB remote stub, GDBserver): Mention static
tracepoints support using an UST based backend.
(New commands): Mention "info static-tracepoint-markers" and
"strace".
* breakpoint.c (is_marker_spec): New.
(is_tracepoint): Handle static tracepoints.
(validate_commands_for_breakpoint): Static tracepoints can't do
while-stepping.
(static_tracepoints_here): New.
(bpstat_what): Handle static tracepoints.
(print_one_breakpoint_location, allocate_bp_location, mention):
Ditto.
(create_breakpoint_sal): Ditto.
(decode_static_tracepoint_spec): New.
(create_breakpoint): Replace `hardwareflag', and `traceflag' with
`type_wanted'. Adjust. Handle static tracepoint marker
locations.
(break_command_1): Adjust.
(update_static_tracepoint): New.
(update_breakpoint_locations): Handle static tracepoints.
(breakpoint_re_set_one): Handle static tracepoint marker
locations.
(disable_command, enable_command): Handle static tracepoints.
(trace_command, ftrace_command): Adjust.
(strace_command): New.
(create_tracepoint_from_upload): Adjust.
(save_breakpoints): Handle static tracepoints.
(_initialize_breakpoint): Install the "strace" command.
* breakpoint.h (enum bptype): New bp_static_tracepoint type.
(struct breakpoint): New fields static_trace_marker_id and
static_trace_marker_id_idx.
(breakpoints_here_p): Declare.
(create_breakpoint): Adjust.
(static_tracepoints_here): Declare.
* remote.c (struct remote_state) <static_tracepoints>: New field.
(PACKET_qXfer_statictrace_read, PACKET_StaticTracepoints): New.
(remote_static_tracepoint_marker_at): New.
(remote_static_tracepoint_markers_by_strid): New.
(remote_static_tracepoint_feature): New.
(remote_disconnected_tracing_feature): Handle "StaticTracepoints".
(remote_xfer_partial): Handle TARGET_OBJECT_STATIC_TRACE_DATA.
(remote_supports_static_tracepoints): New.
(remote_download_tracepoint): Download static tracepoints.
(init_remote_ops): Install remote_static_tracepoint_marker_at and
remote_static_tracepoint_markers_by_strid.
(_initialize_remote): Install set|show remote static-tracepoints,
and set|show remote read-sdata-object commands.
* target.c (update_current_target): Inherit and default
to_static_tracepoint_marker_at, and
to_static_tracepoint_markers_by_strid.
* target.h (static_tracepoint_marker): Forward declare.
(enum target_object): New object TARGET_OBJECT_STATIC_TRACE_DATA.
(static_tracepoint_marker_p): New typedef.
(DEF_VEC_P(static_tracepoint_marker_p)): New VEC type.
(struct target_ops): New fields to_static_tracepoint_marker_at and
to_static_tracepoint_markers_by_strid.
(target_static_tracepoint_marker_at)
(target_static_tracepoint_markers_by_strid): New.
* tracepoint.c: Include source.h.
(validate_actionline): Handle $_sdata.
(struct collection_list): New field strace_data.
(add_static_trace_data): New.
(clear_collection_list): Clear strace_data.
(stringify_collection_list): Account for a possible static trace
data collection.
(encode_actions_1): Encode an $_sdata collection.
(parse_tracepoint_definition): Handle static tracepoints.
(parse_static_tracepoint_marker_definition): New.
(release_static_tracepoint_marker): New.
(print_one_static_tracepoint_marker): New.
(info_static_tracepoint_markers_command): New.
(sdata_make_value): New.
(_initialize_tracepoint): Create the $_sdata convenience variable.
Add the "info static-tracepoint-markers" command.
Mention $_sdata in the "collect" command's help output.
* tracepoint.h (struct static_tracepoint_marker): New.
(parse_static_tracepoint_marker_definition)
(release_static_tracepoint_marker): Declare.
* mi/mi-cmd-break.c (mi_cmd_break_insert): Adjust.
* python/py-breakpoint.c (bppy_new): Adjust.
doc/
* gdb.texinfo (Convenience Variables): Document $_sdata.
(Commands to Set Tracepoints): Describe static tracepoints. Add
`Listing Static Tracepoint Markers' menu entry. Document
"strace".
(Tracepoint Action Lists): Document collecting $_sdata.
(Listing Static Tracepoint Markers): New subsection.
(Tracepoints support in gdbserver): Mention static tracepoints.
(remote packets, enabling and disabling): Mention
read-sdata-object.
(General Query Packets) <qSupported>: Document qXfer:sdata:read
and StaticTracepoint.
Mention qTfSTM, qTsSTM and qTSTMat as tracepoint packets.
Document qXfer:sdata:read.
(Tracepoint packets): Document qTfSTM, qTsSTM and qTSTMat.
Diffstat (limited to 'gdb/NEWS')
-rw-r--r-- | gdb/NEWS | 69 |
1 files changed, 58 insertions, 11 deletions
@@ -46,6 +46,27 @@ thread-specific pointer to the TIB. This feature is also supported when remote debugging using GDBserver. +* Static tracepoints + + Static tracepoints are calls in the user program into a tracing + library. One such library is a port of the LTTng kernel tracer to + userspace --- UST (LTTng Userspace Tracer, http://lttng.org/ust). + When debugging with GDBserver, GDB now supports combining the GDB + tracepoint machinery with such libraries. For example: the user can + use GDB to probe a static tracepoint marker (a call from the user + program into the tracing library) with the new "strace" command (see + "New commands" below). This creates a "static tracepoint" in the + breakpoint list, that can be manipulated with the same feature set + as fast and regular tracepoints. E.g., collect registers, local and + global variables, collect trace state variables, and define + tracepoint conditions. In addition, the user can collect extra + static tracepoint marker specific data, by collecting the new + $_sdata internal variable. When analyzing the trace buffer, you can + inspect $_sdata like any other variable available to GDB. For more + information, see the "Tracepoints" chapter in GDB user manual. New + remote packets have been defined to support static tracepoints, see + the "New remote packets" section below. + * New remote packets qGetTIBAddr @@ -61,23 +82,42 @@ qRelocInsn is particularly useful for stubs that support fast tracepoints. GDB reports support for this feature in the qSupported packet. +qTfSTM, qTsSTM + + List static tracepoint markers in the target program. + +qTSTMat + + List static tracepoint markers at a given address in the target + program. + +qXfer:statictrace:read + + Read the static trace data collected (by a `collect $_sdata' + tracepoint action). The remote stub reports support for this packet + to gdb's qSupported query. + * The source command now accepts a -s option to force searching for the script in the source search path even if the script name specifies a directory. * New features in the GDB remote stub, GDBserver - - GDBserver now support tracepoints (including fast tracepoints). - The feature is currently supported by the i386-linux and - amd64-linux builds. See the "Tracepoints support in gdbserver" - section in the manual for more information. GDBserver JIT - compiles the tracepoint's conditional agent expression bytecode - into native code whenever possible for low overhead dynamic - tracepoints conditionals. For such tracepoints, an expression - that examines program state is evaluated when the tracepoint is - reached, in order to determine whether to capture trace data. If - the condition is simple and false, processing the tracepoint - finishes very quickly and no data is gathered. + - GDBserver now support tracepoints (including fast tracepoints, and + static tracepoints). The feature is currently supported by the + i386-linux and amd64-linux builds. See the "Tracepoints support + in gdbserver" section in the manual for more information. + + GDBserver JIT compiles the tracepoint's conditional agent + expression bytecode into native code whenever possible for low + overhead dynamic tracepoints conditionals. For such tracepoints, + an expression that examines program state is evaluated when the + tracepoint is reached, in order to determine whether to capture + trace data. If the condition is simple and false, processing the + tracepoint finishes very quickly and no data is gathered. + + GDBserver interfaces with the UST (LTTng Userspace Tracer) library + for static tracepoints support. - GDBserver now supports x86_64 Windows 64-bit debugging. @@ -135,6 +175,13 @@ save breakpoints <filename> `save tracepoints' is a new alias for `save-tracepoints'. The latter is now deprecated. +info static-tracepoint-markers + Display information about static tracepoint markers in the target. + +strace FN | FILE:LINE | *ADDR | -m MARKER_ID + Define a static tracepoint by probing a marker at the given + function, line, address, or marker ID. + * Python scripting ** GDB now provides a new directory location, called the python directory, |