Re: [PATCH 16/16] move some static thread state into remote_state

Pedro Alves
2013-06-24T17:32:20Z

On 06/21/2013 06:25 PM, Tom Tromey wrote:
> This moves a few static variables from thread-info functions into
> remote_state. Pedro said on irc that these functions implement the
> ancient thread-discovery method and that he wouldn't be surprised if
> they had rotted; nevertheless it seems safer to me to make them
> explicitly per-remote.

Yeah.

> static int use_range_stepping = 1;
>
> +#define OPAQUETHREADBYTES 8
> +
> +/* a 64 bit opaque identifier */
> +typedef unsigned char threadref[OPAQUETHREADBYTES];
> +
> +#define MAXTHREADLISTRESULTS 32
> +

...

> {
> /* FIXME: This is a good reason to drop the packet. */
> /* Possably, there is a duplicate response. */
> @@ -2561,18 +2566,15 @@ remote_get_threadlist (int startflag, threadref *nextthread, int result_limit,
>
> /* About this many threadisds fit in a packet. */

This comment should be moved as well along with the macro.

>
> -#define MAXTHREADLISTRESULTS 32
> -

--
Pedro Alves