dtrace: get rid of uchar_t types
Callers are specifying uint8_t anyway and this slightly reduces dependencies on compatibility typedefs. No functional change intended. Reviewed by: markj, mhorne MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39490
This commit is contained in:
parent
bb8e8e230d
commit
1a149d65ba
@ -2399,8 +2399,8 @@ extern void dtrace_safe_synchronous_signal(void);
|
||||
extern int dtrace_mach_aframes(void);
|
||||
|
||||
#if defined(__i386) || defined(__amd64)
|
||||
extern int dtrace_instr_size(uchar_t *instr);
|
||||
extern int dtrace_instr_size_isa(uchar_t *, model_t, int *);
|
||||
extern int dtrace_instr_size(uint8_t *instr);
|
||||
extern int dtrace_instr_size_isa(uint8_t *, model_t, int *);
|
||||
extern void dtrace_invop_callsite(void);
|
||||
#endif
|
||||
extern void dtrace_invop_add(int (*)(uintptr_t, struct trapframe *, uintptr_t));
|
||||
|
@ -449,7 +449,7 @@ dtrace_trap(struct trapframe *frame, u_int type)
|
||||
* Offset the instruction pointer to the instruction
|
||||
* following the one causing the fault.
|
||||
*/
|
||||
frame->tf_rip += dtrace_instr_size((u_char *) frame->tf_rip);
|
||||
frame->tf_rip += dtrace_instr_size((uint8_t *) frame->tf_rip);
|
||||
return (1);
|
||||
/* Page fault. */
|
||||
case T_PAGEFLT:
|
||||
@ -461,7 +461,7 @@ dtrace_trap(struct trapframe *frame, u_int type)
|
||||
* Offset the instruction pointer to the instruction
|
||||
* following the one causing the fault.
|
||||
*/
|
||||
frame->tf_rip += dtrace_instr_size((u_char *) frame->tf_rip);
|
||||
frame->tf_rip += dtrace_instr_size((uint8_t *) frame->tf_rip);
|
||||
return (1);
|
||||
default:
|
||||
/* Handle all other traps in the usual way. */
|
||||
|
@ -449,7 +449,7 @@ dtrace_trap(struct trapframe *frame, u_int type)
|
||||
* Offset the instruction pointer to the instruction
|
||||
* following the one causing the fault.
|
||||
*/
|
||||
frame->tf_eip += dtrace_instr_size((u_char *) frame->tf_eip);
|
||||
frame->tf_eip += dtrace_instr_size((uint8_t *) frame->tf_eip);
|
||||
return (1);
|
||||
/* Page fault. */
|
||||
case T_PAGEFLT:
|
||||
@ -461,7 +461,7 @@ dtrace_trap(struct trapframe *frame, u_int type)
|
||||
* Offset the instruction pointer to the instruction
|
||||
* following the one causing the fault.
|
||||
*/
|
||||
frame->tf_eip += dtrace_instr_size((u_char *) frame->tf_eip);
|
||||
frame->tf_eip += dtrace_instr_size((uint8_t *) frame->tf_eip);
|
||||
return (1);
|
||||
default:
|
||||
/* Handle all other traps in the usual way. */
|
||||
|
@ -49,8 +49,8 @@
|
||||
|
||||
typedef u_int model_t;
|
||||
#define DATAMODEL_NATIVE 0
|
||||
int dtrace_instr_size(uchar_t *);
|
||||
int dtrace_instr_size_isa(uchar_t *, model_t, int *);
|
||||
int dtrace_instr_size(uint8_t *);
|
||||
int dtrace_instr_size_isa(uint8_t *, model_t, int *);
|
||||
#endif
|
||||
|
||||
#include <dis_tables.h>
|
||||
@ -83,7 +83,7 @@ static int
|
||||
dtrace_dis_get_byte(void *p)
|
||||
{
|
||||
int ret;
|
||||
uchar_t **instr = p;
|
||||
uint8_t **instr = p;
|
||||
|
||||
ret = **instr;
|
||||
*instr += 1;
|
||||
@ -101,7 +101,7 @@ dtrace_dis_get_byte(void *p)
|
||||
*/
|
||||
/* ARGSUSED2 */
|
||||
static int
|
||||
dtrace_dis_isize(uchar_t *instr, dis_isize_t which, model_t model, int *rmindex)
|
||||
dtrace_dis_isize(uint8_t *instr, dis_isize_t which, model_t model, int *rmindex)
|
||||
{
|
||||
int sz;
|
||||
dis86_t x;
|
||||
@ -127,13 +127,13 @@ dtrace_dis_isize(uchar_t *instr, dis_isize_t which, model_t model, int *rmindex)
|
||||
}
|
||||
|
||||
int
|
||||
dtrace_instr_size_isa(uchar_t *instr, model_t model, int *rmindex)
|
||||
dtrace_instr_size_isa(uint8_t *instr, model_t model, int *rmindex)
|
||||
{
|
||||
return (dtrace_dis_isize(instr, DIS_ISIZE_INSTR, model, rmindex));
|
||||
}
|
||||
|
||||
int
|
||||
dtrace_instr_size(uchar_t *instr)
|
||||
dtrace_instr_size(uint8_t *instr)
|
||||
{
|
||||
return (dtrace_dis_isize(instr, DIS_ISIZE_INSTR, DATAMODEL_NATIVE,
|
||||
NULL));
|
||||
|
Loading…
Reference in New Issue
Block a user