diff options
author | Stan Shebs <shebs@codesourcery.com> | 2011-11-14 20:07:25 +0000 |
---|---|---|
committer | Stan Shebs <shebs@codesourcery.com> | 2011-11-14 20:07:25 +0000 |
commit | 405f8e949968faadc137cf5d4244fc68a7f6c586 (patch) | |
tree | 523b73e190feb6d047e882474ccfa133457fc37f /gdb/target.h | |
parent | 3e05895e9e59ad84a047a73cd70b6b70c26bac9e (diff) | |
download | gdb-405f8e949968faadc137cf5d4244fc68a7f6c586.zip gdb-405f8e949968faadc137cf5d4244fc68a7f6c586.tar.gz gdb-405f8e949968faadc137cf5d4244fc68a7f6c586.tar.bz2 |
2011-11-14 Stan Shebs <stan@codesourcery.com>
Kwok Cheung Yeung <kcy@codesourcery.com>
* NEWS: Document shorter fast tracepoints and qTMinFTPILen packet.
* i386-tdep.c (i386_fast_tracepoint_valid_at): Query target for
the minimum instruction size for fast tracepoints.
* target.h (struct target_ops): Add new method
to_get_min_fast_tracepoint_insn_len.
(target_get_min_fast_tracepoint_insn_len): New.
* target.c (update_current_target): Set up new target operation.
* remote.c (remote_write_bytes_aux): Fix typo.
(remote_get_min_fast_tracepoint_insn_len): New.
(init_remote_ops): Initialize new field.
* gdb.texinfo (Create and Delete Tracepoints): Describe what is
needed to get shorter fast tracepoints.
(Tracepoint Packets): Document new qTMinFTPILen packet.
* linux-x86-low.c (small_jump_insn): New.
(i386_install_fast_tracepoint_jump_pad): Add arguments for
trampoline and error message, build a trampoline and issue a small
jump instruction to it.
(x86_install_fast_tracepoint_jump_pad): Add arguments for
trampoline and error message.
(x86_get_min_fast_tracepoint_insn_len): New.
(the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
* linux-low.h (struct linux_target_ops): Add arguments to
install_fast_tracepoint_jump_pad operation, add new operation.
* linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
arguments.
(linux_get_min_fast_tracepoint_insn_len): New function.
(linux_target_op): Add new operation.
* tracepoint.c (gdb_trampoline_buffer): New IPA variable.
(gdb_trampoline_buffer_end): Ditto.
(gdb_trampoline_buffer_error): Ditto.
(struct ipa_sym_addresses): Add fields for new IPA variables.
(symbol_list): Add entries for new IPA variables.
(struct tracepoint): Add fields to hold the address range of the
trampoline used by the tracepoint.
(trampoline_buffer_head): New static variable.
(trampoline_buffer_tail): Ditto.
(claim_trampoline_space): New function.
(have_fast_tracepoint_trampoline_buffer): New function.
(clone_fast_tracepoint): Fill in trampoline fields of tracepoint
structure.
(install_fast_tracepoint): Ditto, also add error buffer argument.
(cmd_qtminftpilen): New function.
(handle_tracepoint_query): Add response to qTMinFTPILen packet.
(fast_tracepoint_from_trampoline_address): New function.
(fast_tracepoint_collecting): Handle trampoline as part of jump
pad space.
(set_trampoline_buffer_space): New function.
(initialize_tracepoint): Initialize new IPA variables.
* target.h (struct target_ops): Add arguments to
install_fast_tracepoint_jump_pad operation, add new
get_min_fast_tracepoint_insn_len operation.
(target_get_min_fast_tracepoint_insn_len): New.
(install_fast_tracepoint_jump_pad): Add arguments.
* server.h (IPA_BUFSIZ): Define.
* linux-i386-ipa.c: Include extra header files.
(initialize_fast_tracepoint_trampoline_buffer): New function.
(initialize_low_tracepoint): Call it.
* server.h (set_trampoline_buffer_space): Declare.
(claim_trampoline_space): Ditto.
(have_fast_tracepoint_trampoline_buffer): Ditto.
* gdb.trace/ftrace.c: New.
* gdb.trace/ftrace.exp: New.
Diffstat (limited to 'gdb/target.h')
-rw-r--r-- | gdb/target.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/target.h b/gdb/target.h index c8941a4..87f0bb9 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -738,6 +738,12 @@ struct target_ops LONGEST (*to_get_raw_trace_data) (gdb_byte *buf, ULONGEST offset, LONGEST len); + /* Get the minimum length of instruction on which a fast tracepoint + may be set on the target. If this operation is unsupported, + return -1. If for some reason the minimum length cannot be + determined, return 0. */ + int (*to_get_min_fast_tracepoint_insn_len) (void); + /* Set the target's tracing behavior in response to unexpected disconnection - set VAL to 1 to keep tracing, 0 to stop. */ void (*to_set_disconnected_tracing) (int val); @@ -1523,6 +1529,9 @@ extern int target_search_memory (CORE_ADDR start_addr, #define target_get_raw_trace_data(buf,offset,len) \ (*current_target.to_get_raw_trace_data) ((buf), (offset), (len)) +#define target_get_min_fast_tracepoint_insn_len() \ + (*current_target.to_get_min_fast_tracepoint_insn_len) () + #define target_set_disconnected_tracing(val) \ (*current_target.to_set_disconnected_tracing) (val) |