Re: [patch] [i386] Put hlt at the ON_STACK breakpoint [Re: GDB 7.4.91 available for testing]

Pedro Alves
2012-07-25T14:59:31Z

On 07/23/2012 09:36 PM, Philippe Waroquiers wrote:

>> So the GDB patch is no longer needed when you have fixed valgrind to put 0xcc
>> during Z0? Why valgrind cannot write 0xcc into stack memory when it already
>> has to write there to create the stack frame / parameters passed by stack?
> Effectively, I have a patch which fixes the problem.
> But the patch is a kludge which heuristically guesses that GDB is
> pushing an infcall.

Why do you have to guess that, rather than just detecting a breakpoint is
being set on a stack (or non text) address? If something sets a breakpoint
in a data address, it is basically telling valgrind "this is actually code".

--
Pedro Alves