On 11/14/2017 09:52 AM, Peter Maydell wrote:
> On 13 November 2017 at 23:31, Richard Henderson <[email protected]> wrote:
>> On 11/13/2017 08:59 PM, Peter Maydell wrote:
>>> Am I misreading my debugger entrails (entirely possible)? How is this
>>> code intended to get the right guest PC for segfaults in these helpers?
>>
>> It looks like we can't.
>>
>> We get it right for system mode, but not linux-user.
> 
> How does it work for system mode?

We have retaddr from GETPC which we pass down through tlb_fill and friends,
which means the correct pc is used for restore state.

What's different about user-mode is that we don't have tlb_fill or equivalent,
and we rely on the pc from the signal handler.  Which leads to the bogusness
that you see.

I've just about got a patch together that uses a TLS variable for retaddr.  It
is the smaller change than setjmp for soft freeze.


r~

Reply via email to