qemu-s390x
[Top][All Lists]
Advanced

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

Re: [PATCH 0/2] linux-user/s390x: Fix single-stepping SVC


From: Thomas Huth
Subject: Re: [PATCH 0/2] linux-user/s390x: Fix single-stepping SVC
Date: Wed, 31 May 2023 16:37:41 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0

On 11/05/2023 01.02, Ilya Leoshkevich wrote:
Hi,

I noticed that single-stepping SVC runs two instructions instead of
one. The reason is that EXCP_SVC masks EXCP_DEBUG.
Patch 1 fixes this problem, patch 2 adds a test.

Btw, there is at least one more problem in that area, namely
single-stepping instructions that cause e.g. SIGILL. Using the
existing signals-s390x test as an example:

     (gdb) x/i $pc
     => 0x1001740 <illegal_op>:      .long   0x000007fe

     (gdb) si
     Program received signal SIGILL, Illegal instruction.
     (gdb) x/i $pc
     => 0x1001742 <after_illegal_op>:        br      %r14
     # So far so good.

     (gdb) si
     (gdb) x/i $pc
     => 0x10017b6 <handle_signal+6>: lay     %r15,-344(%r15)
     # Missed the first signal handler instruction!

I'm not sure what to do about it - the trivial fix to add
gdb_handlesig(cpu, 0) to the end of handle_pending_signal() caused GDB
to hang, and I haven't looked further yet.

Best regards,
Ilya

Ilya Leoshkevich (2):
   linux-user/s390x: Fix single-stepping SVC
   tests/tcg/s390x: Test single-stepping SVC

If there are no disagreements, I can take this through my s390x tree. Queued it for my next pull request now.

 Thomas





reply via email to

[Prev in Thread] Current Thread [Next in Thread]