https://bugs.kde.org/show_bug.cgi?id=486180

--- Comment #8 from Andreas Arnez <ar...@linux.ibm.com> ---
(In reply to Mark Wielaard from comment #7)
> The current use only really is known to work for s390x.
The use for the extension mechanism, yes.  But I was under the impression that
this field is required for all architectures that use Ijk_Sys_syscall and
friends (which I thought included all arches). Consider the comment in
libvex_ir.h:

   Re Ijk_Sys_ (syscall jumps): the guest state must have a
   pseudo-register guest_IP_AT_SYSCALL, which is the size of a guest
   word.  ...

However, now I'm not sure where the field is actually used, apart from the new
usage in handle_extension().  Does anybody know more about this?

> So I would propose something like:
> [...]

That's an option, although I prefer to get rid of this altogether and just use
VG_(get_IP), like below.  Now I'm wondering why I haven't done
that before.  Is this OK?

diff --git a/coregrind/m_scheduler/scheduler.c
b/coregrind/m_scheduler/scheduler.c
index 29751bb28..cc8d070b7 100644
--- a/coregrind/m_scheduler/scheduler.c
+++ b/coregrind/m_scheduler/scheduler.c
@@ -1237,8 +1237,7 @@ static void handle_extension(ThreadId tid)
       block_signals();
       VG_(poll_signals)(tid);
    } else if (err != ExtErr_OK) {
-      ThreadState* tst = VG_(get_ThreadState)(tid);
-      Addr addr = tst->arch.vex.guest_IP_AT_SYSCALL;
+      Addr addr = VG_(get_IP)(tid);
       switch (err) {
       case ExtErr_Illop:
          VG_(synth_sigill)(tid, addr);

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to