summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2016-03-01 21:35:14 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2016-03-01 21:35:14 +0000
commit1a0c960e776d83db52c30947c56330b135e24592 (patch)
tree957799e9e89c1855c21206567518b5d2fb3f41fd
parent0bc30e444dd5187ce747d9153b82bde34150043f (diff)
db_sym_numargs() has always been defined to FALSE so nuke it with all
its associated dead code. ok mikeb@
-rw-r--r--sys/arch/amd64/amd64/db_trace.c12
-rw-r--r--sys/arch/hppa/hppa/db_interface.c12
-rw-r--r--sys/arch/hppa64/hppa64/db_interface.c10
-rw-r--r--sys/arch/i386/i386/db_trace.c12
-rw-r--r--sys/ddb/db_sym.h2
5 files changed, 7 insertions, 41 deletions
diff --git a/sys/arch/amd64/amd64/db_trace.c b/sys/arch/amd64/amd64/db_trace.c
index 928f3681453..0b50df5d7bd 100644
--- a/sys/arch/amd64/amd64/db_trace.c
+++ b/sys/arch/amd64/amd64/db_trace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_trace.c,v 1.15 2016/03/01 21:28:24 mpi Exp $ */
+/* $OpenBSD: db_trace.c,v 1.16 2016/03/01 21:35:13 mpi Exp $ */
/* $NetBSD: db_trace.c,v 1.1 2003/04/26 18:39:27 fvdl Exp $ */
/*
@@ -219,8 +219,6 @@ db_stack_trace_print(db_expr_t addr, boolean_t have_addr, db_expr_t count,
char * name;
db_expr_t offset;
db_sym_t sym;
-#define MAXNARG 16
- char *argnames[MAXNARG], **argnp = NULL;
sym = db_search_symbol(callpc, DB_STGY_ANY, &offset);
db_symbol_values(sym, &name, NULL);
@@ -259,11 +257,7 @@ db_stack_trace_print(db_expr_t addr, boolean_t have_addr, db_expr_t count,
} else {
normal:
is_trap = NONE;
- narg = MAXNARG;
- if (db_sym_numargs(sym, &narg, argnames))
- argnp = argnames;
- else
- narg = db_numargs(frame);
+ narg = db_numargs(frame);
}
(*pr)("%s(", name);
@@ -279,8 +273,6 @@ db_stack_trace_print(db_expr_t addr, boolean_t have_addr, db_expr_t count,
}
while (narg) {
- if (argnp)
- (*pr)("%s=", *argnp++);
(*pr)("%lx", db_get_value((db_addr_t)argp, 8, FALSE));
argp++;
if (--narg != 0)
diff --git a/sys/arch/hppa/hppa/db_interface.c b/sys/arch/hppa/hppa/db_interface.c
index 8270fe61c1b..f4c88ce43f3 100644
--- a/sys/arch/hppa/hppa/db_interface.c
+++ b/sys/arch/hppa/hppa/db_interface.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_interface.c,v 1.36 2016/02/27 13:08:06 mpi Exp $ */
+/* $OpenBSD: db_interface.c,v 1.37 2016/03/01 21:35:13 mpi Exp $ */
/*
* Copyright (c) 1999-2003 Michael Shalayeff
@@ -244,7 +244,6 @@ db_stack_trace_print(addr, have_addr, count, modif, pr)
db_sym_t sym;
db_expr_t off;
char *name;
- char **argnp, *argnames[HPPA_FRAME_NARGS];
int nargs;
if (count < 0)
@@ -274,19 +273,12 @@ db_stack_trace_print(addr, have_addr, count, modif, pr)
(*pr)("%s(", name);
/* args */
- nargs = HPPA_FRAME_NARGS;
- argnp = NULL;
- if (db_sym_numargs(sym, &nargs, argnames))
- argnp = argnames;
- else
- nargs = 4;
+ nargs = 4;
/*
* XXX first four args are passed on registers, and may not
* be stored on stack, dunno how to recover their values yet
*/
for (argp = &fp[-9]; nargs--; argp--) {
- if (argnp)
- (*pr)("%s=", *argnp++);
(*pr)("%x%s", db_get_value((int)argp, 4, FALSE),
nargs? ",":"");
}
diff --git a/sys/arch/hppa64/hppa64/db_interface.c b/sys/arch/hppa64/hppa64/db_interface.c
index e5be7659710..54bb46a9f7c 100644
--- a/sys/arch/hppa64/hppa64/db_interface.c
+++ b/sys/arch/hppa64/hppa64/db_interface.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_interface.c,v 1.5 2016/02/27 13:08:07 mpi Exp $ */
+/* $OpenBSD: db_interface.c,v 1.6 2016/03/01 21:35:13 mpi Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
@@ -213,7 +213,6 @@ db_stack_trace_print(db_expr_t addr, int have_addr, db_expr_t count,
db_sym_t sym;
db_expr_t off;
char *name;
- char **argnp, *argnames[8];
int nargs;
if (count < 0)
@@ -244,18 +243,11 @@ db_stack_trace_print(db_expr_t addr, int have_addr, db_expr_t count,
/* args */
nargs = 8;
- argnp = NULL;
- if (db_sym_numargs(sym, &nargs, argnames))
- argnp = argnames;
- else
- nargs = 4;
/*
* XXX first eight args are passed on registers, and may not
* be stored on stack, dunno how to recover their values yet
*/
for (argp = &fp[-9]; nargs--; argp--) {
- if (argnp)
- (*pr)("%s=", *argnp++);
(*pr)("%x%s", db_get_value((long)argp, 8, FALSE),
nargs? ",":"");
}
diff --git a/sys/arch/i386/i386/db_trace.c b/sys/arch/i386/i386/db_trace.c
index 9b7352b1d8c..920a38364dd 100644
--- a/sys/arch/i386/i386/db_trace.c
+++ b/sys/arch/i386/i386/db_trace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_trace.c,v 1.17 2016/03/01 21:28:24 mpi Exp $ */
+/* $OpenBSD: db_trace.c,v 1.18 2016/03/01 21:35:13 mpi Exp $ */
/* $NetBSD: db_trace.c,v 1.18 1996/05/03 19:42:01 christos Exp $ */
/*
@@ -208,8 +208,6 @@ db_stack_trace_print(db_expr_t addr, boolean_t have_addr, db_expr_t count,
char * name;
db_expr_t offset;
db_sym_t sym;
-#define MAXNARG 16
- char *argnames[MAXNARG], **argnp = NULL;
sym = db_search_symbol(callpc, DB_STGY_ANY, &offset);
db_symbol_values(sym, &name, NULL);
@@ -247,11 +245,7 @@ db_stack_trace_print(db_expr_t addr, boolean_t have_addr, db_expr_t count,
} else {
normal:
is_trap = NONE;
- narg = MAXNARG;
- if (db_sym_numargs(sym, &narg, argnames))
- argnp = argnames;
- else
- narg = db_numargs(frame);
+ narg = db_numargs(frame);
}
(*pr)("%s(", name);
@@ -267,8 +261,6 @@ db_stack_trace_print(db_expr_t addr, boolean_t have_addr, db_expr_t count,
}
while (narg) {
- if (argnp)
- (*pr)("%s=", *argnp++);
(*pr)("%x", db_get_value((int)argp, 4, FALSE));
argp++;
if (--narg != 0)
diff --git a/sys/ddb/db_sym.h b/sys/ddb/db_sym.h
index dffb94ad621..a1edc94a782 100644
--- a/sys/ddb/db_sym.h
+++ b/sys/ddb/db_sym.h
@@ -86,8 +86,6 @@ void db_symbol_values(db_sym_t, char **, db_expr_t *);
void db_printsym(db_expr_t, db_strategy_t, int (*)(const char *, ...));
/* print closest symbol to a value */
-#define db_sym_numargs(sym, nargp, argnames) (FALSE)
-
boolean_t db_elf_sym_init(int, void *, void *, const char *);
void db_elf_sym_values(db_sym_t, char **, db_expr_t *);
db_sym_t db_elf_sym_search(db_addr_t, db_strategy_t, db_expr_t *);