aboutsummaryrefslogtreecommitdiff
path: root/gdb/tracepoint.h
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2013-06-26 08:17:27 +0000
committerYao Qi <yao@codesourcery.com>2013-06-26 08:17:27 +0000
commitdc673c81ae099d18e348ef2a7b93794cc9f8e33b (patch)
tree24e8dd7a0661b55651ced17b9254782f005ead77 /gdb/tracepoint.h
parente335d9cbd89a0a80bd2b0cbdcf60061d3ec75902 (diff)
downloadgdb-dc673c81ae099d18e348ef2a7b93794cc9f8e33b.zip
gdb-dc673c81ae099d18e348ef2a7b93794cc9f8e33b.tar.gz
gdb-dc673c81ae099d18e348ef2a7b93794cc9f8e33b.tar.bz2
gdb/
2013-06-26 Pedro Alves <pedro@codesourcery.com> Yao Qi <yao@codesourcery.com> * gdb.texinfo (GDB/MI Tracepoint Commands): Document -trace-frame-collected. gdb: 2013-06-26 Pedro Alves <pedro@codesourcery.com> Yao Qi <yao@codesourcery.com> * mi/mi-cmds.c (mi_cmds): Register -trace-frame-collected. * mi/mi-cmds.h (mi_cmd_trace_frame_collected): Declare. * mi/mi-main.c (print_variable_or_computed): New function. (mi_cmd_trace_frame_collected): New function. * tracepoint.c (find_trace_state_variable_by_number): New. (struct traceframe_info): Move to tracepoint.h (struct collection_list): Likewise. (do_collect_symbol): Include locals and arguments in the wholly collected variables list. (clear_collection_list): Clear wholly collected variables list and computed variables list. (append_exp): New function. (encode_actions_1): Include variables in the wholly collected variables list. Include memory ranges and full-fledged expressions in the computed expressions list. (encode_actions): Move some code to ... Return the cleanup chain. (encode_actions_rsp): ... here. New function. (get_traceframe_location, get_traceframe_info): Remove static. * tracepoint.h (struct memrange): Moved from tracepoint.c. (struct collection_list): Moved from tracepoint.c. Add two new fields 'wholly_collected' and 'computed'. (find_trace_state_variable_by_number): Declare. (encode_actions): Adjust declaration. (encode_actions_rsp): Declare. (get_traceframe_info, get_traceframe_location): Declare. * NEWS: Mention new MI command -trace-frame-collected.
Diffstat (limited to 'gdb/tracepoint.h')
-rw-r--r--gdb/tracepoint.h48
1 files changed, 46 insertions, 2 deletions
diff --git a/gdb/tracepoint.h b/gdb/tracepoint.h
index 350ab5e..9a874eb 100644
--- a/gdb/tracepoint.h
+++ b/gdb/tracepoint.h
@@ -323,6 +323,38 @@ struct trace_file_writer
const struct trace_file_write_ops *ops;
};
+struct memrange
+{
+ /* memrange_absolute for absolute memory range, else basereg
+ number. */
+ int type;
+ bfd_signed_vma start;
+ bfd_signed_vma end;
+};
+
+struct collection_list
+{
+ /* room for up to 256 regs */
+ unsigned char regs_mask[32];
+ long listsize;
+ long next_memrange;
+ struct memrange *list;
+
+ /* size of array pointed to by expr_list elt. */
+ long aexpr_listsize;
+ long next_aexpr_elt;
+ struct agent_expr **aexpr_list;
+
+ /* True is the user requested a collection of "$_sdata", "static
+ tracepoint data". */
+ int strace_data;
+
+ /* A set of names of wholly collected objects. */
+ VEC(char_ptr) *wholly_collected;
+ /* A set of computed expressions. */
+ VEC(char_ptr) *computed;
+};
+
extern void parse_static_tracepoint_marker_definition
(char *line, char **pp,
struct static_tracepoint_marker *marker);
@@ -360,13 +392,21 @@ void free_actions (struct breakpoint *);
extern const char *decode_agent_options (const char *exp, int *trace_string);
-extern void encode_actions (struct bp_location *tloc,
- char ***tdp_actions, char ***stepping_actions);
+extern struct cleanup *
+ encode_actions_and_make_cleanup (struct bp_location *tloc,
+ struct collection_list *tracepoint_list,
+ struct collection_list *stepping_list);
+
+extern void encode_actions_rsp (struct bp_location *tloc,
+ char ***tdp_actions, char ***stepping_actions);
extern void validate_actionline (const char *, struct breakpoint *);
extern void validate_trace_state_variable_name (const char *name);
extern struct trace_state_variable *find_trace_state_variable (const char *name);
+extern struct trace_state_variable *
+ find_trace_state_variable_by_number (int number);
+
extern struct trace_state_variable *create_trace_state_variable (const char *name);
extern int encode_source_string (int num, ULONGEST addr,
@@ -416,4 +456,8 @@ extern struct traceframe_info *parse_traceframe_info (const char *tframe_info);
extern int traceframe_available_memory (VEC(mem_range_s) **result,
CORE_ADDR memaddr, ULONGEST len);
+extern struct traceframe_info *get_traceframe_info (void);
+
+extern struct bp_location *get_traceframe_location (int *stepping_frame_p);
+
#endif /* TRACEPOINT_H */