Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Introduce DDB_EXPR_FMT and replace the logic around DB_E...
details: https://anonhg.NetBSD.org/src/rev/6761a4428a45
branches: trunk
changeset: 765427:6761a4428a45
user: joerg <joerg%NetBSD.org@localhost>
date: Thu May 26 15:34:12 2011 +0000
description:
Introduce DDB_EXPR_FMT and replace the logic around DB_EXPR_T_IS_QUAD.
diffstat:
sys/arch/alpha/include/db_machdep.h | 3 ++-
sys/arch/amd64/include/db_machdep.h | 3 ++-
sys/arch/arm/include/db_machdep.h | 3 ++-
sys/arch/hppa/include/db_machdep.h | 3 ++-
sys/arch/i386/include/db_machdep.h | 3 ++-
sys/arch/ia64/include/db_machdep.h | 3 ++-
sys/arch/m68k/include/db_machdep.h | 3 ++-
sys/arch/mips/include/db_machdep.h | 3 ++-
sys/arch/powerpc/include/db_machdep.h | 3 ++-
sys/arch/sh3/include/db_machdep.h | 3 ++-
sys/arch/sparc/include/db_machdep.h | 3 ++-
sys/arch/sparc64/include/db_machdep.h | 3 ++-
sys/arch/vax/include/db_machdep.h | 3 ++-
sys/ddb/db_examine.c | 28 ++++++++++++----------------
sys/ddb/db_interface.h | 8 +-------
sys/ddb/db_lex.c | 13 +++++--------
16 files changed, 44 insertions(+), 44 deletions(-)
diffs (truncated from 367 to 300 lines):
diff -r 0de74f8b693f -r 6761a4428a45 sys/arch/alpha/include/db_machdep.h
--- a/sys/arch/alpha/include/db_machdep.h Thu May 26 14:20:22 2011 +0000
+++ b/sys/arch/alpha/include/db_machdep.h Thu May 26 15:34:12 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_machdep.h,v 1.17 2007/02/21 22:59:37 thorpej Exp $ */
+/* $NetBSD: db_machdep.h,v 1.18 2011/05/26 15:34:12 joerg Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
@@ -39,6 +39,7 @@
#include <machine/frame.h>
typedef vaddr_t db_addr_t; /* address - unsigned */
+#define DDB_EXPR_FMT "l" /* expression is long */
typedef long db_expr_t; /* expression - signed */
typedef struct trapframe db_regs_t;
diff -r 0de74f8b693f -r 6761a4428a45 sys/arch/amd64/include/db_machdep.h
--- a/sys/arch/amd64/include/db_machdep.h Thu May 26 14:20:22 2011 +0000
+++ b/sys/arch/amd64/include/db_machdep.h Thu May 26 15:34:12 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_machdep.h,v 1.10 2011/04/10 20:36:49 christos Exp $ */
+/* $NetBSD: db_machdep.h,v 1.11 2011/05/26 15:34:12 joerg Exp $ */
/*
* Mach Operating System
@@ -41,6 +41,7 @@
#include <machine/trap.h>
typedef vaddr_t db_addr_t; /* address - unsigned */
+#define DDB_EXPR_FMT "l" /* expression is long */
typedef long db_expr_t; /* expression - signed */
typedef struct trapframe db_regs_t;
diff -r 0de74f8b693f -r 6761a4428a45 sys/arch/arm/include/db_machdep.h
--- a/sys/arch/arm/include/db_machdep.h Thu May 26 14:20:22 2011 +0000
+++ b/sys/arch/arm/include/db_machdep.h Thu May 26 15:34:12 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_machdep.h,v 1.16 2009/03/14 14:45:55 dsl Exp $ */
+/* $NetBSD: db_machdep.h,v 1.17 2011/05/26 15:34:12 joerg Exp $ */
/*
* Copyright (c) 1996 Scott K Stevens
@@ -43,6 +43,7 @@
/* end of mangling */
typedef vaddr_t db_addr_t; /* address - unsigned */
+#define DDB_EXPR_FMT "l" /* expression is long */
typedef long db_expr_t; /* expression - signed */
typedef trapframe_t db_regs_t;
diff -r 0de74f8b693f -r 6761a4428a45 sys/arch/hppa/include/db_machdep.h
--- a/sys/arch/hppa/include/db_machdep.h Thu May 26 14:20:22 2011 +0000
+++ b/sys/arch/hppa/include/db_machdep.h Thu May 26 15:34:12 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_machdep.h,v 1.10 2011/01/14 02:06:26 rmind Exp $ */
+/* $NetBSD: db_machdep.h,v 1.11 2011/05/26 15:34:12 joerg Exp $ */
/* $OpenBSD: db_machdep.h,v 1.5 2001/02/16 19:20:13 mickey Exp $ */
@@ -39,6 +39,7 @@
/* types the generic ddb module needs */
typedef vaddr_t db_addr_t;
+#define DDB_EXPR_FMT "l" /* expression is long */
typedef long db_expr_t;
typedef struct trapframe db_regs_t;
diff -r 0de74f8b693f -r 6761a4428a45 sys/arch/i386/include/db_machdep.h
--- a/sys/arch/i386/include/db_machdep.h Thu May 26 14:20:22 2011 +0000
+++ b/sys/arch/i386/include/db_machdep.h Thu May 26 15:34:12 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_machdep.h,v 1.29 2011/04/11 04:22:30 mrg Exp $ */
+/* $NetBSD: db_machdep.h,v 1.30 2011/05/26 15:34:13 joerg Exp $ */
/*
* Mach Operating System
@@ -41,6 +41,7 @@
#include <machine/trap.h>
typedef vaddr_t db_addr_t; /* address - unsigned */
+#define DDB_EXPR_FMT "l" /* expression is long */
typedef long db_expr_t; /* expression - signed */
typedef struct trapframe db_regs_t;
diff -r 0de74f8b693f -r 6761a4428a45 sys/arch/ia64/include/db_machdep.h
--- a/sys/arch/ia64/include/db_machdep.h Thu May 26 14:20:22 2011 +0000
+++ b/sys/arch/ia64/include/db_machdep.h Thu May 26 15:34:12 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_machdep.h,v 1.2 2006/08/30 11:12:04 cherry Exp $ */
+/* $NetBSD: db_machdep.h,v 1.3 2011/05/26 15:34:13 joerg Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
@@ -41,6 +41,7 @@
#include <machine/ia64_cpu.h>
typedef vaddr_t db_addr_t; /* address - unsigned */
+#define DDB_EXPR_FMT "l" /* expression is long */
typedef long db_expr_t; /* expression - signed */
typedef struct trapframe db_regs_t;
diff -r 0de74f8b693f -r 6761a4428a45 sys/arch/m68k/include/db_machdep.h
--- a/sys/arch/m68k/include/db_machdep.h Thu May 26 14:20:22 2011 +0000
+++ b/sys/arch/m68k/include/db_machdep.h Thu May 26 15:34:12 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_machdep.h,v 1.29 2011/04/11 04:22:30 mrg Exp $ */
+/* $NetBSD: db_machdep.h,v 1.30 2011/05/26 15:34:13 joerg Exp $ */
/*
* Mach Operating System
@@ -46,6 +46,7 @@
#include <machine/trap.h>
typedef vaddr_t db_addr_t; /* address - unsigned */
+#define DDB_EXPR_FMT "l" /* expression is long */
typedef long db_expr_t; /* expression - signed */
typedef struct trapframe db_regs_t;
diff -r 0de74f8b693f -r 6761a4428a45 sys/arch/mips/include/db_machdep.h
--- a/sys/arch/mips/include/db_machdep.h Thu May 26 14:20:22 2011 +0000
+++ b/sys/arch/mips/include/db_machdep.h Thu May 26 15:34:12 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_machdep.h,v 1.26 2011/04/14 05:07:56 cliff Exp $ */
+/* $NetBSD: db_machdep.h,v 1.27 2011/05/26 15:34:13 joerg Exp $ */
/*
* Copyright (c) 1997 Jonathan Stone (hereinafter referred to as the author)
@@ -42,6 +42,7 @@
typedef vaddr_t db_addr_t; /* address - unsigned */
+#define DDB_EXPR_FMT "l" /* expression is long */
typedef long db_expr_t; /* expression - signed */
typedef struct reg db_regs_t;
diff -r 0de74f8b693f -r 6761a4428a45 sys/arch/powerpc/include/db_machdep.h
--- a/sys/arch/powerpc/include/db_machdep.h Thu May 26 14:20:22 2011 +0000
+++ b/sys/arch/powerpc/include/db_machdep.h Thu May 26 15:34:12 2011 +0000
@@ -1,5 +1,5 @@
/* $OpenBSD: db_machdep.h,v 1.2 1997/03/21 00:48:48 niklas Exp $ */
-/* $NetBSD: db_machdep.h,v 1.22 2011/01/18 01:02:54 matt Exp $ */
+/* $NetBSD: db_machdep.h,v 1.23 2011/05/26 15:34:13 joerg Exp $ */
/*
* Mach Operating System
@@ -45,6 +45,7 @@
#define DB_ELFSIZE 32
typedef vaddr_t db_addr_t; /* address - unsigned */
+#define DDB_EXPR_FMT "l" /* expression is long */
typedef long db_expr_t; /* expression - signed */
struct powerpc_saved_state {
u_int32_t r[32]; /* data registers */
diff -r 0de74f8b693f -r 6761a4428a45 sys/arch/sh3/include/db_machdep.h
--- a/sys/arch/sh3/include/db_machdep.h Thu May 26 14:20:22 2011 +0000
+++ b/sys/arch/sh3/include/db_machdep.h Thu May 26 15:34:12 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_machdep.h,v 1.15 2011/01/14 02:06:30 rmind Exp $ */
+/* $NetBSD: db_machdep.h,v 1.16 2011/05/26 15:34:13 joerg Exp $ */
/*
* Mach Operating System
@@ -39,6 +39,7 @@
#include <sh3/pcb.h>
typedef vaddr_t db_addr_t; /* address - unsigned */
+#define DDB_EXPR_FMT "l" /* expression is long */
typedef long db_expr_t; /* expression - signed */
typedef struct trapframe db_regs_t;
diff -r 0de74f8b693f -r 6761a4428a45 sys/arch/sparc/include/db_machdep.h
--- a/sys/arch/sparc/include/db_machdep.h Thu May 26 14:20:22 2011 +0000
+++ b/sys/arch/sparc/include/db_machdep.h Thu May 26 15:34:12 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_machdep.h,v 1.25 2011/04/11 04:22:31 mrg Exp $ */
+/* $NetBSD: db_machdep.h,v 1.26 2011/05/26 15:34:13 joerg Exp $ */
/*
* Mach Operating System
@@ -40,6 +40,7 @@
#include <machine/reg.h>
typedef vaddr_t db_addr_t; /* address - unsigned */
+#define DDB_EXPR_FMT "l" /* expression is long */
typedef long db_expr_t; /* expression - signed */
typedef struct {
diff -r 0de74f8b693f -r 6761a4428a45 sys/arch/sparc64/include/db_machdep.h
--- a/sys/arch/sparc64/include/db_machdep.h Thu May 26 14:20:22 2011 +0000
+++ b/sys/arch/sparc64/include/db_machdep.h Thu May 26 15:34:12 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_machdep.h,v 1.29 2011/04/13 03:22:49 mrg Exp $ */
+/* $NetBSD: db_machdep.h,v 1.30 2011/05/26 15:34:13 joerg Exp $ */
/*
* Mach Operating System
@@ -46,6 +46,7 @@
/* use 64-bit types explicitly for 32-bit kernels */
typedef vaddr_t db_addr_t; /* address - unsigned */
+#define DDB_EXPR_FMT "l" /* expression is int64_t (long) */
typedef int64_t db_expr_t; /* expression - signed */
struct trapstate {
diff -r 0de74f8b693f -r 6761a4428a45 sys/arch/vax/include/db_machdep.h
--- a/sys/arch/vax/include/db_machdep.h Thu May 26 14:20:22 2011 +0000
+++ b/sys/arch/vax/include/db_machdep.h Thu May 26 15:34:12 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_machdep.h,v 1.17 2010/11/06 11:46:03 uebayasi Exp $ */
+/* $NetBSD: db_machdep.h,v 1.18 2011/05/26 15:34:14 joerg Exp $ */
/*
* Mach Operating System
@@ -40,6 +40,7 @@
#include <machine/psl.h>
typedef vaddr_t db_addr_t; /* address - unsigned */
+#define DDB_EXPR_FMT "l" /* expression is long */
typedef long db_expr_t; /* expression - signed */
typedef struct trapframe db_regs_t;
diff -r 0de74f8b693f -r 6761a4428a45 sys/ddb/db_examine.c
--- a/sys/ddb/db_examine.c Thu May 26 14:20:22 2011 +0000
+++ b/sys/ddb/db_examine.c Thu May 26 15:34:12 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_examine.c,v 1.34 2009/03/07 22:02:17 ad Exp $ */
+/* $NetBSD: db_examine.c,v 1.35 2011/05/26 15:34:14 joerg Exp $ */
/*
* Mach Operating System
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_examine.c,v 1.34 2009/03/07 22:02:17 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_examine.c,v 1.35 2011/05/26 15:34:14 joerg Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -117,8 +117,7 @@
case 'x': /* unsigned hex */
value = db_get_value(addr, size, false);
addr += size;
- db_printf(DB_EXPR_T_IS_QUAD ? "%-*qx" : "%-*lx",
- width, value);
+ db_printf("%-*" DDB_EXPR_FMT "x", width, value);
break;
case 'm': /* hex dump */
/*
@@ -135,8 +134,8 @@
db_get_value(addr+bytes, 1,
false);
db_printf(
- DB_EXPR_T_IS_QUAD ? "%02qx":
- "%02lx", value);
+ "%02" DDB_EXPR_FMT "x",
+ value);
bytes++;
if (!(bytes % 4))
db_printf(" ");
@@ -165,20 +164,17 @@
case 'd': /* signed decimal */
value = db_get_value(addr, size, true);
addr += size;
- db_printf(DB_EXPR_T_IS_QUAD ? "%-*qd" : "%-*ld",
- width, value);
+ db_printf("%-*" DDB_EXPR_FMT "d", width, value);
break;
case 'u': /* unsigned decimal */
value = db_get_value(addr, size, false);
addr += size;
- db_printf(DB_EXPR_T_IS_QUAD ? "%-*qu" : "%-*lu",
- width, value);
+ db_printf("%-*" DDB_EXPR_FMT "u", width, value);
break;
case 'o': /* unsigned octal */
value = db_get_value(addr, size, false);
addr += size;
- db_printf(DB_EXPR_T_IS_QUAD ? "%-*qo" : "%-*lo",
- width, value);
+ db_printf("%-*" DDB_EXPR_FMT "o", width, value);
break;
case 'c': /* character */
value = db_get_value(addr, 1, false);
@@ -244,7 +240,7 @@
break;
}
case 'x':
- db_printf(DB_EXPR_T_IS_QUAD ? "%16qx" : "%8lx", addr);
+ db_printf("%16" DDB_EXPR_FMT "x", addr);
break;
case 'z':
{
@@ -255,13 +251,13 @@
break;
}
case 'd':
- db_printf(DB_EXPR_T_IS_QUAD ? "%11qd" : "%11ld", addr);
+ db_printf("%11" DDB_EXPR_FMT "d", addr);
Home |
Main Index |
Thread Index |
Old Index