This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH] PR13475: Fix ARM SDT_V3 operand parsing
- From: Josh Stone <jistone at redhat dot com>
- To: Wade Farnsworth <wade_farnsworth at mentor dot com>
- Cc: systemtap at sourceware dot org, Mark Wielaard <mjw at redhat dot com>
- Date: Thu, 08 Mar 2012 23:15:53 -0800
- Subject: Re: [PATCH] PR13475: Fix ARM SDT_V3 operand parsing
- References: <4F58C7E0.70008@mentor.com>
On 03/08/2012 06:53 AM, Wade Farnsworth wrote:
> * Allow for whitespace in ARM operands containing []'s
IIRC, this is sort of a latent issue on all archs. While the compiler
tends not to add spaces on e.g. x86, SDT probes in hand-written asm
could very well have spaces in the arguments. The only real separator
we have is the '@' in each SIZE@LOCATION. I think Roland chose '@'
specifically for the belief that it wouldn't ever appear in the actual
location asm string.
I'm not sure if regex matching would make this easier or not, but it's
something like: ([+-]?\d+@[^@]+?)(\s+[+-]?\d+@[^@]+?)*
Or just iteratively, find('@'), rfind(' '), split, repeat.
The actual handling for the location will always be arch specific, of
course, like dealing with ARM's [].
Josh