|
From: Julian S. <js...@ac...> - 2002-11-22 07:51:04
|
On Friday 22 November 2002 7:08 am, Jeremy Fitzhardinge wrote: > On Thu, 2002-11-21 at 23:07, Julian Seward wrote: > > Um, I'm confused. I don't understand how to solve the following problem: > > memcheck calls a helper function to do a check, concludes there's an > > error and needs %EIP. How exactly do you propose to generate it if you > > don't know %eip at the point where the helper was called? > > Oh, sorry. I was assuming you'd store that in a baseblock field before > the call. Hm, I guess that would need a trampoline to do it properly: > > movl %ccall-func, %eax > call ccall-tramp > [...] > > > ccall-tramp: > movl (%esp), %ebx > movl %ebx, XX(%ebp) > jmp *%eax > > Or perhaps do it completely inline. Maybe it's all a bit clumsy. Sorry to be stupid. I'm still confused. In that case, wouldn't be simpler just to set %EIP to the correct value before the call, and completely avoid all the hassle of establishing %eip and converting it to %EIP ? I think I must be missing something. J |