Print this page
3544 save-args matcher could be considerably more robust
3545 save-args matcher should accept saves may be out-of-order
Reviewed by: Joshua M. Clulow <josh@sysmgr.org>
Reviewed by: Robert Mustacchi <rm@joyent.com>
*** 22,33 ****
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
- #pragma ident "%Z%%M% %I% %E% SMI"
-
#include <libdisasm.h>
#include <stdlib.h>
#include <stdio.h>
#include "dis_tables.h"
--- 22,31 ----
*** 243,247 ****
--- 241,254 ----
done:
dis_free(hist, sizeof (uint64_t) * n);
return (res);
}
+
+ int
+ dis_instrlen(dis_handle_t *dhp, uint64_t pc)
+ {
+ if (dis_disassemble(dhp, pc, NULL, 0) != 0)
+ return (-1);
+
+ return (dhp->dh_addr - pc);
+ }