|
From: Nicholas N. <nj...@cs...> - 2005-05-30 22:10:55
|
On Mon, 30 May 2005, Robert Walsh wrote:
>> Another comment: you've introduced new VG_USERREQ__* constants. These
>> could be avoided by using the VG_USERREQ__CLIENT_CALL* constants to call
>> VG_(handle_stack_new)() and the other functions.
>
> That would be nice. How does one use these, exactly? I can't find
> anything that currently uses them to use as an example. It looks like
> it should be something like this:
>
> #define VALGRIND_STACK_REGISTER(start, end) \
> VALGRIND_NON_SIMD_CALL2(VG_(handle_stack_new), start, end)
>
> But wouldn't that mean having to expose the VG_(...) stuff into user
> land, or something? I'm a little confused by these, I guess.
Oh, yes, you'd have to expose VG_(handle_stack_new) to the client.
Scratch that, then.
>> The functions would have
>> to take a ThreadId as their first arg, but that's not difficult.
>
> Really? I don't see that in the code anywhere:
>
> case VG_USERREQ__CLIENT_CALL2: {
> UWord (*f)(UWord, UWord) = (void*)arg[1];
> if (f == NULL)
> VG_(message)(Vg_DebugMsg, "VG_USERREQ__CLIENT_CALL2: func=%p\n", f);
> else
> SET_CLCALL_RETVAL(tid, f ( arg[2], arg[3] ), (Addr)f );
> break;
> }
>
> The function is invoked only with the args passed into the client
> request.
It's a 2.4 --> 3.0 change.
Nick
|