This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH] systemtap: Fix parsing of literals in SDT_V3 operand for s390x and ia64
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: Athira Rajeev <atrajeev at in dot ibm dot com>
- Cc: systemtap at sourceware dot org, suzuki at in dot ibm dot com, srikar at linux dot vnet dot ibm dot com
- Date: Tue, 09 Oct 2012 11:34:28 -0400
- Subject: Re: [PATCH] systemtap: Fix parsing of literals in SDT_V3 operand for s390x and ia64
- References: <20121003071222.1901.62858.stgit@localhost.localdomain>
atrajeev wrote:
> systemtap fails to parse literal arguments of the format 'N' ( for
> example in s390x and ia64 ) The regular expression to match literals
> is defined in function "visit_target_symbol_arg" as below:
>
> ^[i\\$#][-]?[0-9][0-9]*$
> [...]
> This fails in s390x where literal is of the form 'N' which doesnt
> have leading $ or i.
Can the s390 do the same hack done for powerpc and add the 'i' prefix in
sys/sdt.h?
#if defined __powerpc__ || defined __powerpc64__
# define _SDT_ARGTMPL(id) %I[id]%[id]
#else
# define _SDT_ARGTMPL(id) %[id]
#endif
> [...]
> - rc = regexp_match (asmarg, "^[i\\$#][-]?[0-9][0-9]*$", matches);
> + rc = regexp_match (asmarg, "^[i\\$#]?[-]?[0-9][0-9]*$", matches);
I would be worried about this change because of possible conflicts
with the other operand addressing-mode combinations. (Recall that 'i'
is added for ppc in order to separate register-number and
literal-number cases.)
- FChE