X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Fltt%2Fparser.c;h=28ebaeea9dba2e5a99eac16c404be0f62d81d000;hb=54be3e479151d0279429f7fbecd111431650c58f;hp=2d8c9c4ae2f992d4f4252181caeb11747b140bd9;hpb=f0b795e0b579719a95fee5f84d4dcb893044d926;p=lttv.git diff --git a/ltt/branches/poly/ltt/parser.c b/ltt/branches/poly/ltt/parser.c index 2d8c9c4a..28ebaeea 100644 --- a/ltt/branches/poly/ltt/parser.c +++ b/ltt/branches/poly/ltt/parser.c @@ -97,11 +97,26 @@ int getSizeindex(unsigned int value) unsigned long long int getSize(parse_file_t *in) { char *token; + int has_quotes = 0; + unsigned long long int ret; token = getToken(in); + if(token[0] == '"') { + has_quotes = 1; + token = getToken(in); + } if(in->type == NUMBER) { - return strtoull(token, NULL, 0); - } + ret = strtoull(token, NULL, 0); + } else { + goto error; + } + if(has_quotes) { + token = getToken(in); + if(token[0] != '"') goto error; + } + + return ret; +error: in->error(in,"incorrect size specification"); return -1; } @@ -232,6 +247,8 @@ void getEventAttributes(parse_file_t *in, event_t *ev) ev->name = NULL; ev->per_trace = 0; ev->per_tracefile = 0; + ev->param_buffer = 0; + ev->no_instrument_function = 0; while(1) { token = getToken(in); @@ -250,7 +267,11 @@ void getEventAttributes(parse_file_t *in, event_t *ev) ev->per_trace = 1; } else if(!strcmp("per_tracefile", token)) { ev->per_tracefile = 1; - } + } else if(!strcmp("param_buffer", token)) { + ev->param_buffer = 1; + } else if(!strcmp("no_instrument_function", token)) { + ev->no_instrument_function = 1; + } } } @@ -274,6 +295,7 @@ void getFacilityAttributes(parse_file_t *in, facility_t *fac) fac->name = NULL; fac->arch = NULL; + fac->user = 0; while(1) { token = getToken(in); @@ -288,6 +310,8 @@ void getFacilityAttributes(parse_file_t *in, facility_t *fac) if(car == EOF) in->error(in,"name was expected"); else if(car == '\"') fac->name = allocAndCopy(getQuotedString(in)); else fac->name = allocAndCopy(getName(in)); + if(!strncmp(fac->name, "user_", sizeof("user_")) == 0) + fac->user = 1; } else if(!strcmp("arch", token)) { getEqual(in); car = seekNextChar(in); @@ -360,21 +384,40 @@ char *getNameAttribute(parse_file_t *in) //for