aboutsummaryrefslogtreecommitdiff
path: root/gdb/tracepoint.h
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>2010-03-29 23:45:06 +0000
committerStan Shebs <shebs@codesourcery.com>2010-03-29 23:45:06 +0000
commit409873ef5c8a7aefdf9fe2fbb83e87ade071be27 (patch)
treee888cd070ef3be76fddeeba7fa0cdf3dba847d0a /gdb/tracepoint.h
parent2aab228b95db7a8ae3864297c9596a359893f1ec (diff)
downloadgdb-409873ef5c8a7aefdf9fe2fbb83e87ade071be27.zip
gdb-409873ef5c8a7aefdf9fe2fbb83e87ade071be27.tar.gz
gdb-409873ef5c8a7aefdf9fe2fbb83e87ade071be27.tar.bz2
2010-03-29 Stan Shebs <stan@codesourcery.com>
* 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.
Diffstat (limited to 'gdb/tracepoint.h')
-rw-r--r--gdb/tracepoint.h26
1 files changed, 24 insertions, 2 deletions
diff --git a/gdb/tracepoint.h b/gdb/tracepoint.h
index 1da7d26..578ae6b7 100644
--- a/gdb/tracepoint.h
+++ b/gdb/tracepoint.h
@@ -122,7 +122,14 @@ extern char *default_collect;
/* Struct to collect random info about tracepoints on the target. */
-struct uploaded_tp {
+struct uploaded_string
+{
+ char *str;
+ struct uploaded_string *next;
+};
+
+struct uploaded_tp
+{
int number;
enum bptype type;
ULONGEST addr;
@@ -135,12 +142,23 @@ struct uploaded_tp {
char *actions[100];
int num_step_actions;
char *step_actions[100];
+
+ /* The original string defining the location of the tracepoint. */
+ char *at_string;
+
+ /* The original string defining the tracepoint's condition. */
+ char *cond_string;
+
+ /* List of original strings defining the tracepoint's actions. */
+ struct uploaded_string *cmd_strings;
+
struct uploaded_tp *next;
};
/* Struct recording info about trace state variables on the target. */
-struct uploaded_tsv {
+struct uploaded_tsv
+{
const char *name;
int number;
LONGEST initial_value;
@@ -166,6 +184,10 @@ extern void while_stepping_pseudocommand (char *args, int from_tty);
extern struct trace_state_variable *find_trace_state_variable (const char *name);
extern struct trace_state_variable *create_trace_state_variable (const char *name);
+extern int encode_source_string (int num, ULONGEST addr,
+ char *srctype, char *src,
+ char *buf, int buf_size);
+
extern void parse_trace_status (char *line, struct trace_status *ts);
extern void parse_tracepoint_definition (char *line, struct uploaded_tp **utpp);