|
From: Nicholas N. <nj...@cs...> - 2005-03-27 02:51:40
|
Jeremy,
struct ThreadState includes the following fields:
UInt stack_size;
Addr stack_base;
Addr stack_highest_word;
struct os_state_t (for linux) includes the following fields:
UInt *stack; /* stack base */
UInt stacksize; /* stack size in UInts */
Is there some overlap here that could be removed? AFAICT,
ThreadState.stack_base is not used in any meaningful way and could be
removed. Is one of these stacks for Valgrind and the other for the
client? It's unclear from the field names.
Thanks.
N
|
|
From: Jeremy F. <je...@go...> - 2005-03-27 07:59:28
|
Nicholas Nethercote wrote:
> struct ThreadState includes the following fields:
>
> UInt stack_size;
> Addr stack_base;
> Addr stack_highest_word;
>
> struct os_state_t (for linux) includes the following fields:
>
> UInt *stack; /* stack base */
> UInt stacksize; /* stack size in UInts */
>
> Is there some overlap here that could be removed? AFAICT,
> ThreadState.stack_base is not used in any meaningful way and could be
> removed. Is one of these stacks for Valgrind and the other for the
> client? It's unclear from the field names.
Yeah, the os_state ones are the Valgrind internal stack, and the ones in
ThreadState are the client stack. ThreadState.stack_base probably isn't
meaningful because we don't allocate client stacks and the useful range
for a stack is between the stackpointer and the top.
So: both sets are needed, but their meanings clarified; stack_base can go.
J
|