This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

> The translated block is then continued <<< This is the critical info !!!

I am having trouble understanding why the translated block would
be continued in the case of an inferior function call, since
the code is not to be executed (thanks to resetting the PC to its
original value prior to the inferior function call when reaching
the Z0 breakpoint we inserted). But...

> So, if it is easy to change GDB to insert 0xcc (for x86 and amd84)
> and the equivalent breakpoint instr for mips32, then that avoids
> the kludgy patch in Valgrind, which is for sure fragile.

... if I still understand correctly, as long as we write a valid
instruction at the point where we place the infcall breakpoint,
we should be fine, right? Jan selected the hlt instruction, but
we could go with the breakpoint trap instruction as well (0xcc),
which I think should be simpler to generalize in the future.
It should not matter which instruction is chosen as long as it
fits the available space, since that instruction will never be
executed (thanks to the Z0 packet introducing an official breakpoint


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]