tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: GDB single-step fails on alpha (Re: CVS commit: src/share/mk)



Thank you very much for your kind explanation.

On 2016/12/07 13:26, Kamil Rytarowski wrote:
On 07.12.2016 04:27, Rin Okuyama wrote:
However, before proceeding further, we need to discuss undocumented
details related to PT_STEP; What should we do when a process steps into
a RAS? How about the case where PT_STEP is used against a process which
is already in single stepping? And so on...


According to my understanding RAS is intended to be atomic sequence of
operations and tracer mustn't interrupt or preempt it.

process_sstep(9) should fail and return EFAULT in such a case?

There might exist only single tracer attached to a process.

I don't think PT_STEP called twice for the same process makes sense in
real life, it might be undefined behavior on port-specific basis and/or
return error (in other words just prevent panic(9) and vulnerabilities).
If I remember correctly process sets MD-style PSL_T variable to indicate
trap after at least single instruction - if so, we cannot set this bit
twice.

Yes, it makes no sense. In my patch for powerpc/ibm4xx, process_sstep(9)
just returns 0 in that case. But I come to feel EFAULT more preferable.

rin


Home | Main Index | Thread Index | Old Index