This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR13475: Fix ARM SDT_V3 operand parsing


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]