summaryrefslogtreecommitdiffstats
path: root/sys/ddb
diff options
context:
space:
mode:
Diffstat (limited to 'sys/ddb')
-rw-r--r--sys/ddb/db_aout.c4
-rw-r--r--sys/ddb/db_elf.c4
-rw-r--r--sys/ddb/db_kld.c24
-rw-r--r--sys/ddb/db_print.c6
-rw-r--r--sys/ddb/db_sym.c34
-rw-r--r--sys/ddb/db_sym.h20
6 files changed, 47 insertions, 45 deletions
diff --git a/sys/ddb/db_aout.c b/sys/ddb/db_aout.c
index 41b3779..8d9b121 100644
--- a/sys/ddb/db_aout.c
+++ b/sys/ddb/db_aout.c
@@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: db_aout.c,v 1.22 1998/10/09 23:29:44 peter Exp $
+ * $Id: db_aout.c,v 1.23 1999/01/27 19:00:49 dillon Exp $
*/
/*
@@ -283,7 +283,7 @@ X_db_line_at_pc(symtab, cursym, filename, linenum, off)
boolean_t
X_db_sym_numargs(symtab, cursym, nargp, argnamep)
db_symtab_t * symtab;
- db_sym_t cursym;
+ c_db_sym_t cursym;
int *nargp;
char **argnamep;
{
diff --git a/sys/ddb/db_elf.c b/sys/ddb/db_elf.c
index f5b4f4f..1eb9fa5 100644
--- a/sys/ddb/db_elf.c
+++ b/sys/ddb/db_elf.c
@@ -1,4 +1,4 @@
-/* $Id: db_elf.c,v 1.4 1998/10/09 23:32:03 peter Exp $ */
+/* $Id: db_elf.c,v 1.5 1999/01/27 19:00:49 dillon Exp $ */
/* $NetBSD: db_elf.c,v 1.4 1998/05/03 18:49:54 thorpej Exp $ */
/*-
@@ -354,7 +354,7 @@ X_db_line_at_pc(symtab, cursym, filename, linenum, off)
boolean_t
X_db_sym_numargs(symtab, cursym, nargp, argnamep)
db_symtab_t *symtab;
- db_sym_t cursym;
+ c_db_sym_t cursym;
int *nargp;
char **argnamep;
{
diff --git a/sys/ddb/db_kld.c b/sys/ddb/db_kld.c
index ec36a68..09246c7 100644
--- a/sys/ddb/db_kld.c
+++ b/sys/ddb/db_kld.c
@@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: db_kld.c,v 1.4 1998/10/15 02:01:50 peter Exp $
+ * $Id: db_kld.c,v 1.5 1999/01/27 19:00:49 dillon Exp $
* from db_aout.c,v 1.20 1998/06/07 17:09:36 dfr Exp
*/
@@ -46,20 +46,20 @@
#include <ddb/ddb.h>
#include <ddb/db_sym.h>
-db_sym_t
+c_db_sym_t
X_db_lookup(stab, symstr)
db_symtab_t *stab;
const char * symstr;
{
- linker_sym_t sym;
+ c_linker_sym_t sym;
if (linker_ddb_lookup(symstr, &sym) == 0)
- return (db_sym_t) sym;
+ return (c_db_sym_t) sym;
else
- return (db_sym_t) 0;
+ return (c_db_sym_t) 0;
}
-db_sym_t
+c_db_sym_t
X_db_search_symbol(symtab, off, strategy, diffp)
db_symtab_t * symtab;
register
@@ -67,12 +67,12 @@ X_db_search_symbol(symtab, off, strategy, diffp)
db_strategy_t strategy;
db_expr_t *diffp; /* in/out */
{
- linker_sym_t sym;
+ c_linker_sym_t sym;
long diff;
if (linker_ddb_search_symbol((caddr_t) off, &sym, &diff) == 0) {
*diffp = (db_expr_t) diff;
- return (db_sym_t) sym;
+ return (c_db_sym_t) sym;
}
return 0;
@@ -84,11 +84,11 @@ X_db_search_symbol(symtab, off, strategy, diffp)
void
X_db_symbol_values(symtab, dbsym, namep, valuep)
db_symtab_t *symtab;
- db_sym_t dbsym;
+ c_db_sym_t dbsym;
const char **namep;
db_expr_t *valuep;
{
- linker_sym_t sym = (linker_sym_t) dbsym;
+ c_linker_sym_t sym = (c_linker_sym_t) dbsym;
linker_symval_t symval;
linker_ddb_symbol_values(sym, &symval);
@@ -102,7 +102,7 @@ X_db_symbol_values(symtab, dbsym, namep, valuep)
boolean_t
X_db_line_at_pc(symtab, cursym, filename, linenum, off)
db_symtab_t * symtab;
- db_sym_t cursym;
+ c_db_sym_t cursym;
char **filename;
int *linenum;
db_expr_t off;
@@ -113,7 +113,7 @@ X_db_line_at_pc(symtab, cursym, filename, linenum, off)
boolean_t
X_db_sym_numargs(symtab, cursym, nargp, argnamep)
db_symtab_t * symtab;
- db_sym_t cursym;
+ c_db_sym_t cursym;
int *nargp;
char **argnamep;
{
diff --git a/sys/ddb/db_print.c b/sys/ddb/db_print.c
index 5fe4b53..218be1e 100644
--- a/sys/ddb/db_print.c
+++ b/sys/ddb/db_print.c
@@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: db_print.c,v 1.22 1998/07/08 09:11:37 bde Exp $
+ * $Id: db_print.c,v 1.23 1998/07/08 10:53:49 bde Exp $
*/
/*
@@ -49,13 +49,13 @@ db_show_regs(dummy1, dummy2, dummy3, dummy4)
{
register struct db_variable *regp;
db_expr_t value, offset;
- char * name;
+ const char * name;
for (regp = db_regs; regp < db_eregs; regp++) {
db_read_variable(regp, &value);
db_printf("%-12s%#10lr", regp->name, (unsigned long)value);
db_find_xtrn_sym_and_offset((db_addr_t)value, &name, &offset);
- if (name != 0 && offset <= (unsigned long)db_maxoff &&
+ if (name != NULL && offset <= (unsigned long)db_maxoff &&
offset != value) {
db_printf("\t%s", name);
if (offset != 0)
diff --git a/sys/ddb/db_sym.c b/sys/ddb/db_sym.c
index 55db7be..847a9c7 100644
--- a/sys/ddb/db_sym.c
+++ b/sys/ddb/db_sym.c
@@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: db_sym.c,v 1.27 1998/12/04 22:54:43 archie Exp $
+ * $Id: db_sym.c,v 1.28 1999/01/27 19:00:49 dillon Exp $
*/
/*
@@ -48,10 +48,10 @@ static int db_nsymtab = 0;
static db_symtab_t *db_last_symtab; /* where last symbol was found */
-static db_sym_t db_lookup __P(( const char *symstr));
-static char *db_qualify __P((db_sym_t sym, char *symtabname));
-static boolean_t db_symbol_is_ambiguous __P((db_sym_t sym));
-static boolean_t db_line_at_pc __P((db_sym_t, char **, int *,
+static c_db_sym_t db_lookup __P(( const char *symstr));
+static char *db_qualify __P((c_db_sym_t sym, char *symtabname));
+static boolean_t db_symbol_is_ambiguous __P((c_db_sym_t sym));
+static boolean_t db_line_at_pc __P((c_db_sym_t, char **, int *,
db_expr_t));
/*
@@ -84,7 +84,7 @@ db_add_symbol_table(start, end, name, ref)
*/
static char *
db_qualify(sym, symtabname)
- db_sym_t sym;
+ c_db_sym_t sym;
register char *symtabname;
{
const char *symname;
@@ -114,10 +114,10 @@ db_value_of_name(name, valuep)
const char *name;
db_expr_t *valuep;
{
- db_sym_t sym;
+ c_db_sym_t sym;
sym = db_lookup(name);
- if (sym == DB_SYM_NULL)
+ if (sym == C_DB_SYM_NULL)
return (FALSE);
db_symbol_values(sym, &name, valuep);
return (TRUE);
@@ -130,11 +130,11 @@ db_value_of_name(name, valuep)
* then only the specified symbol table will be searched;
* otherwise, all symbol tables will be searched.
*/
-static db_sym_t
+static c_db_sym_t
db_lookup(symstr)
const char *symstr;
{
- db_sym_t sp;
+ c_db_sym_t sp;
register int i;
int symtab_start = 0;
int symtab_end = db_nsymtab;
@@ -190,7 +190,7 @@ static volatile boolean_t db_qualify_ambiguous_names = FALSE;
*/
static boolean_t
db_symbol_is_ambiguous(sym)
- db_sym_t sym;
+ c_db_sym_t sym;
{
const char *sym_name;
register int i;
@@ -215,7 +215,7 @@ db_symbol_is_ambiguous(sym)
* Find the closest symbol to val, and return its name
* and the difference between val and the symbol found.
*/
-db_sym_t
+c_db_sym_t
db_search_symbol( val, strategy, offp)
register db_addr_t val;
db_strategy_t strategy;
@@ -225,7 +225,7 @@ db_search_symbol( val, strategy, offp)
unsigned int diff;
size_t newdiff;
register int i;
- db_sym_t ret = DB_SYM_NULL, sym;
+ c_db_sym_t ret = C_DB_SYM_NULL, sym;
newdiff = diff = ~0;
db_last_symtab = 0;
@@ -246,7 +246,7 @@ db_search_symbol( val, strategy, offp)
*/
void
db_symbol_values(sym, namep, valuep)
- db_sym_t sym;
+ c_db_sym_t sym;
const char **namep;
db_expr_t *valuep;
{
@@ -294,7 +294,7 @@ db_printsym(off, strategy)
const char *name;
db_expr_t value;
int linenum;
- db_sym_t cursym;
+ c_db_sym_t cursym;
cursym = db_search_symbol(off, strategy, &d);
db_symbol_values(cursym, &name, &value);
@@ -319,7 +319,7 @@ db_printsym(off, strategy)
static boolean_t
db_line_at_pc( sym, filename, linenum, pc)
- db_sym_t sym;
+ c_db_sym_t sym;
char **filename;
int *linenum;
db_expr_t pc;
@@ -329,7 +329,7 @@ db_line_at_pc( sym, filename, linenum, pc)
int
db_sym_numargs(sym, nargp, argnames)
- db_sym_t sym;
+ c_db_sym_t sym;
int *nargp;
char **argnames;
{
diff --git a/sys/ddb/db_sym.h b/sys/ddb/db_sym.h
index c501738..611bd28 100644
--- a/sys/ddb/db_sym.h
+++ b/sys/ddb/db_sym.h
@@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: db_sym.h,v 1.15 1998/06/28 00:55:01 dfr Exp $
+ * $Id: db_sym.h,v 1.16 1999/01/27 19:00:49 dillon Exp $
*/
#ifndef _DDB_DB_SYM_H_
@@ -50,7 +50,9 @@ typedef struct {
* a different one
*/
typedef char * db_sym_t; /* opaque handle on symbols */
+typedef const char * c_db_sym_t; /* opaque handle on symbols */
#define DB_SYM_NULL ((db_sym_t)0)
+#define C_DB_SYM_NULL ((c_db_sym_t)0)
/*
* Non-stripped symbol tables will have duplicates, for instance
@@ -70,10 +72,10 @@ typedef int db_strategy_t; /* search strategy */
void db_add_symbol_table __P((char *, char *, char *, char *));
/* extend the list of symbol tables */
-db_sym_t db_search_symbol __P((db_addr_t, db_strategy_t, db_expr_t *));
+c_db_sym_t db_search_symbol __P((db_addr_t, db_strategy_t, db_expr_t *));
/* find symbol given value */
-void db_symbol_values __P((db_sym_t, const char **, db_expr_t *));
+void db_symbol_values __P((c_db_sym_t, const char **, db_expr_t *));
/* return name and value of symbol */
#define db_find_sym_and_offset(val,namep,offp) \
@@ -90,19 +92,19 @@ int db_eqname __P((char *, char *, int));
void db_printsym __P((db_expr_t, db_strategy_t));
/* print closest symbol to a value */
-int db_sym_numargs __P((db_sym_t, int *, char **));
+int db_sym_numargs __P((c_db_sym_t, int *, char **));
-boolean_t X_db_line_at_pc __P((db_symtab_t *symtab, db_sym_t cursym,
+boolean_t X_db_line_at_pc __P((db_symtab_t *symtab, c_db_sym_t cursym,
char **filename, int *linenum,
db_expr_t off));
-db_sym_t X_db_lookup __P((db_symtab_t *stab, const char *symstr));
-db_sym_t X_db_search_symbol __P((db_symtab_t *symtab, db_addr_t off,
+c_db_sym_t X_db_lookup __P((db_symtab_t *stab, const char *symstr));
+c_db_sym_t X_db_search_symbol __P((db_symtab_t *symtab, db_addr_t off,
db_strategy_t strategy,
db_expr_t *diffp));
-int X_db_sym_numargs __P((db_symtab_t *, db_sym_t, int *,
+int X_db_sym_numargs __P((db_symtab_t *, c_db_sym_t, int *,
char **));
void X_db_symbol_values __P((db_symtab_t *symtab,
- db_sym_t sym, const char **namep,
+ c_db_sym_t sym, const char **namep,
db_expr_t *valuep));
#endif /* !_DDB_DB_SYM_H_ */
OpenPOWER on IntegriCloud