This is the mail archive of the
mailing list for the GDB project.
RE: [MI non-stop 04/11] Implement --thread and --frame.
> > 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:
you are going to the size of a char* (4) inste of the string.
I think strlen() is better.