[MI non-stop 04/11] Implement --thread and --frame.
Marc Khouzam
marc.khouzam@ericsson.com
Sat Jun 28 18:26:00 GMT 2008
> >
> > sizeof? For all I know, sizeof("--thread") will be wrong here.
>
> Why would it be wrong?
sizeof("--thread") seems to count the \0, so you need to do subtract 1.
Another danger is that if someone decides to convert from sizeof("--thread")
to something like:
char* str="--thread";
int len=sizeof(str);
you are going to the size of a char* (4) inste of the string.
I think strlen() is better.
Marc
More information about the Gdb-patches
mailing list