Beispiel #1
0
#endif
    }
    return 0;
}

/*
 * Machine register set.
 */
#define dbreg(xx) (long *)offsetof(db_regs_t, db_tf.tf_ ## xx)
#define dbregfr(xx) (long *)offsetof(db_regs_t, db_fr.fr_ ## xx)
#define dbregfp(xx) (long *)offsetof(db_regs_t, db_fpstate.fs_ ## xx)

static int db_sparc_regop(const struct db_variable *, db_expr_t *, int);

const struct db_variable db_regs[] = {
    { "tstate",	dbreg(tstate),		db_sparc_regop, 0 },
    { "pc",		dbreg(pc),		db_sparc_regop, 0 },
    { "npc",	dbreg(npc),		db_sparc_regop, 0 },
    { "ipl",	dbreg(oldpil),		db_sparc_charop, 0 },
    { "y",		dbreg(y),		db_sparc_intop, 0 },
    { "g0",		(void *)&nil,		FCN_NULL, 0 },
    { "g1",		dbreg(global[1]),	db_sparc_regop, 0 },
    { "g2",		dbreg(global[2]),	db_sparc_regop, 0 },
    { "g3",		dbreg(global[3]),	db_sparc_regop, 0 },
    { "g4",		dbreg(global[4]),	db_sparc_regop, 0 },
    { "g5",		dbreg(global[5]),	db_sparc_regop, 0 },
    { "g6",		dbreg(global[6]),	db_sparc_regop, 0 },
    { "g7",		dbreg(global[7]),	db_sparc_regop, 0 },
    { "o0",		dbreg(out[0]),		db_sparc_regop, 0 },
    { "o1",		dbreg(out[1]),		db_sparc_regop, 0 },
    { "o2",		dbreg(out[2]),		db_sparc_regop, 0 },
	__asm("ta 0x81");
	sparc_noop();	/* Force this function to allocate a stack frame */
}

static long nil;

/*
 * Machine register set.
 */
#define dbreg(xx) (long *)offsetof(db_regs_t, db_tf.tf_ ## xx)
#define dbregfr(xx) (long *)offsetof(db_regs_t, db_fr.fr_ ## xx)

static int db_sparc_regop(const struct db_variable *, db_expr_t *, int);

const struct db_variable db_regs[] = {
	{ "psr",	dbreg(psr),		db_sparc_regop, },
	{ "pc",		dbreg(pc),		db_sparc_regop, },
	{ "npc",	dbreg(npc),		db_sparc_regop, },
	{ "y",		dbreg(y),		db_sparc_regop, },
	{ "wim",	dbreg(global[0]),	db_sparc_regop, }, /* see reg.h */
	{ "g0",		&nil,			FCN_NULL, 	},
	{ "g1",		dbreg(global[1]),	db_sparc_regop, },
	{ "g2",		dbreg(global[2]),	db_sparc_regop, },
	{ "g3",		dbreg(global[3]),	db_sparc_regop, },
	{ "g4",		dbreg(global[4]),	db_sparc_regop, },
	{ "g5",		dbreg(global[5]),	db_sparc_regop, },
	{ "g6",		dbreg(global[6]),	db_sparc_regop, },
	{ "g7",		dbreg(global[7]),	db_sparc_regop, },
	{ "o0",		dbreg(out[0]),		db_sparc_regop, },
	{ "o1",		dbreg(out[1]),		db_sparc_regop, },
	{ "o2",		dbreg(out[2]),		db_sparc_regop, },
Beispiel #3
0
#include <ddb/db_output.h>
#include <ddb/db_interface.h>

#if 1
#define dbreg(xx) (long *)offsetof(db_regs_t, tf_ ## xx)
#else
#define dbreg(xx) (long *)&ddb_regs.tf_ ## xx
#endif

static int db_x86_64_regop(struct db_variable *, db_expr_t *, int);

/*
 * Machine register set.
 */
struct db_variable db_regs[] = {
	{ "ds",		dbreg(ds),     db_x86_64_regop },
	{ "es",		dbreg(es),     db_x86_64_regop },
	{ "fs",		dbreg(fs),     db_x86_64_regop },
	{ "gs",		dbreg(gs),     db_x86_64_regop },
	{ "rdi",	dbreg(rdi),    db_x86_64_regop },
	{ "rsi",	dbreg(rsi),    db_x86_64_regop },
	{ "rbp",	dbreg(rbp),    db_x86_64_regop },
	{ "rbx",	dbreg(rbx),    db_x86_64_regop },
	{ "rdx",	dbreg(rdx),    db_x86_64_regop },
	{ "rcx",	dbreg(rcx),    db_x86_64_regop },
	{ "rax",	dbreg(rax),    db_x86_64_regop },
	{ "r8",		dbreg(r8),     db_x86_64_regop },
	{ "r9",		dbreg(r9),     db_x86_64_regop },
	{ "r10",	dbreg(r10),    db_x86_64_regop },
	{ "r11",	dbreg(r11),    db_x86_64_regop },
	{ "r12",	dbreg(r12),    db_x86_64_regop },
Beispiel #4
0
void	db_mach_cpu __P((db_expr_t, bool, db_expr_t, const char *));
#endif

const struct db_command db_machine_command_table[] = {
#if defined(MULTIPROCESSOR)
	{ DDB_ADD_CMD("cpu",	db_mach_cpu,	0,NULL,NULL,NULL) },
#endif
	{ DDB_ADD_CMD(NULL,     NULL,           0,NULL,NULL,NULL) },
};

static int db_alpha_regop __P((const struct db_variable *, db_expr_t *, int));

#define	dbreg(xx)	((long *)(xx))

const struct db_variable db_regs[] = {
	{	"v0",	dbreg(FRAME_V0),	db_alpha_regop	},
	{	"t0",	dbreg(FRAME_T0),	db_alpha_regop	},
	{	"t1",	dbreg(FRAME_T1),	db_alpha_regop	},
	{	"t2",	dbreg(FRAME_T2),	db_alpha_regop	},
	{	"t3",	dbreg(FRAME_T3),	db_alpha_regop	},
	{	"t4",	dbreg(FRAME_T4),	db_alpha_regop	},
	{	"t5",	dbreg(FRAME_T5),	db_alpha_regop	},
	{	"t6",	dbreg(FRAME_T6),	db_alpha_regop	},
	{	"t7",	dbreg(FRAME_T7),	db_alpha_regop	},
	{	"s0",	dbreg(FRAME_S0),	db_alpha_regop	},
	{	"s1",	dbreg(FRAME_S1),	db_alpha_regop	},
	{	"s2",	dbreg(FRAME_S2),	db_alpha_regop	},
	{	"s3",	dbreg(FRAME_S3),	db_alpha_regop	},
	{	"s4",	dbreg(FRAME_S4),	db_alpha_regop	},
	{	"s5",	dbreg(FRAME_S5),	db_alpha_regop	},
	{	"s6",	dbreg(FRAME_S6),	db_alpha_regop	},