[RFC] Make static tracepoint with markers more OO
Tom Tromey
tromey@redhat.com
Mon Jan 16 17:03:00 GMT 2012
>>>>> "Sergio" == Sergio Durigan Junior <sergiodj@redhat.com> writes:
Sergio> + if (arg && strncmp (arg, "-m", 2) == 0 && isblank (arg[2]))
Tom> I am not sure that isblank is ok to use. gdb doesn't use it anywhere
Tom> else. I suggest just using the original check.
Sergio> Yeah, well, the original check is for space and tab, and isblank does
Sergio> exactly that. I am not sure what is the deal about using it, but I
Sergio> removed as suggested.
I believe isblank was added in C99, but gdb generally uses C90.
These days, you can pretty much search for "gnulib $FUNCTION" and find
all the information you need:
http://www.gnu.org/software/gnulib/manual/html_node/isblank.html
I wouldn't mind us upgrading, or using more of gnulib, or both.
Sergio> The attached patch fixes all the issues pointed out by you and Pedro. I
Sergio> have also tested this on my machine using UST probes, and on testfarm.
Sergio> No regressions were found. Is it OK to apply?
Sergio> + if (arg && strncmp (arg, "-m", 2) == 0 && (isspace (arg[2])
Sergio> + || arg[2] == '\t'))
isspace also looks for \t, so please remove the || clause.
I have no further comments, but I would rather Pedro give the final OK
on this.
Tom
More information about the Gdb-patches
mailing list