diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1999-11-02 05:50:38 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1999-11-02 05:50:38 +0000 |
commit | 001b1fb41ca4af4c0c0099980096d058631edcfb (patch) | |
tree | 48d70089c3e9235dd6875cb3582f92d9d3aa0781 | |
parent | adec442e3fab678d8f4ada00a485c58a6010d0bd (diff) |
support usermode disasm
-rw-r--r-- | sys/arch/hppa/hppa/db_disasm.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/arch/hppa/hppa/db_disasm.c b/sys/arch/hppa/hppa/db_disasm.c index 83c3e464f38..e37073132c0 100644 --- a/sys/arch/hppa/hppa/db_disasm.c +++ b/sys/arch/hppa/hppa/db_disasm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_disasm.c,v 1.4 1999/09/10 19:55:15 mickey Exp $ */ +/* $OpenBSD: db_disasm.c,v 1.5 1999/11/02 05:50:37 mickey Exp $ */ /* * Copyright (c) 1999 Michael Shalayeff @@ -2317,11 +2317,17 @@ db_disasm(loc, flag) register const struct inst *i; register const struct majoropcode *m; register u_int ext; - int instruct = *(int *)loc; + int instruct; OFS ofs = 0; iExInit(); + if (USERMODE(loc)) + copyin((caddr_t)(loc &~ HPPA_PC_PRIV_MASK), + &instruct, sizeof(instruct)); + else + instruct = *(int *)loc; + m = &majopcs[Opcode(instruct)]; ext = OpExt(instruct, m); if (ext <= m->maxsubop) { |