mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-17 15:27:36 +00:00
Staticized and '#ifdef notused' stuff we don't use.
This commit is contained in:
parent
ad46e209d2
commit
f73a856d23
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=12515
@ -23,7 +23,7 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_access.c,v 1.7 1995/05/30 07:56:46 rgrimes Exp $
|
||||
* $Id: db_access.c,v 1.8 1995/11/24 14:13:29 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -41,7 +41,7 @@
|
||||
* boundaries.
|
||||
*/
|
||||
|
||||
unsigned db_extend[] = { /* table for sign-extending */
|
||||
static unsigned db_extend[] = { /* table for sign-extending */
|
||||
0,
|
||||
0xFFFFFF80U,
|
||||
0xFFFF8000U,
|
||||
|
@ -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.11 1995/05/30 07:56:49 rgrimes Exp $
|
||||
* $Id: db_aout.c,v 1.12 1995/11/24 14:13:30 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -62,6 +62,7 @@
|
||||
* -> strings
|
||||
*/
|
||||
|
||||
static void X_db_sym_init __P((int *symtab, char *esymtab, char *name));
|
||||
/*
|
||||
* Find pointers to the start and end of the symbol entries,
|
||||
* given a pointer to the start of the symbol table.
|
||||
@ -70,7 +71,7 @@
|
||||
(sp = (struct nlist *)((symtab) + 1), \
|
||||
ep = (struct nlist *)((char *)sp + *(symtab)))
|
||||
|
||||
void
|
||||
static void
|
||||
X_db_sym_init(symtab, esymtab, name)
|
||||
int * symtab; /* pointer to start of symbol table */
|
||||
char * esymtab; /* pointer to end of string table,
|
||||
|
@ -23,7 +23,7 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_break.c,v 1.6 1995/05/30 07:56:50 rgrimes Exp $
|
||||
* $Id: db_break.c,v 1.7 1995/11/24 14:13:31 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -45,11 +45,23 @@
|
||||
|
||||
#define NBREAKPOINTS 100
|
||||
struct db_breakpoint db_break_table[NBREAKPOINTS];
|
||||
db_breakpoint_t db_next_free_breakpoint = &db_break_table[0];
|
||||
db_breakpoint_t db_free_breakpoints = 0;
|
||||
db_breakpoint_t db_breakpoint_list = 0;
|
||||
static db_breakpoint_t db_next_free_breakpoint = &db_break_table[0];
|
||||
static db_breakpoint_t db_free_breakpoints = 0;
|
||||
static db_breakpoint_t db_breakpoint_list = 0;
|
||||
|
||||
db_breakpoint_t
|
||||
static db_breakpoint_t db_breakpoint_alloc __P((void));
|
||||
static void db_breakpoint_free __P((db_breakpoint_t bkpt));
|
||||
static void db_delete_breakpoint __P((vm_map_t map, db_addr_t addr));
|
||||
static db_breakpoint_t db_find_breakpoint __P((vm_map_t map, db_addr_t addr));
|
||||
static void db_list_breakpoints __P((void));
|
||||
static void db_set_breakpoint __P((vm_map_t map, db_addr_t addr,
|
||||
int count));
|
||||
#ifdef notused
|
||||
static db_breakpoint_t db_set_temp_breakpoint __P((db_addr_t addr));
|
||||
static void db_delete_temp_breakpoint __P((db_breakpoint_t bkpt));
|
||||
#endif
|
||||
|
||||
static db_breakpoint_t
|
||||
db_breakpoint_alloc()
|
||||
{
|
||||
register db_breakpoint_t bkpt;
|
||||
@ -68,7 +80,7 @@ db_breakpoint_alloc()
|
||||
return (bkpt);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
db_breakpoint_free(bkpt)
|
||||
register db_breakpoint_t bkpt;
|
||||
{
|
||||
@ -76,7 +88,7 @@ db_breakpoint_free(bkpt)
|
||||
db_free_breakpoints = bkpt;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
db_set_breakpoint(map, addr, count)
|
||||
vm_map_t map;
|
||||
db_addr_t addr;
|
||||
@ -105,7 +117,7 @@ db_set_breakpoint(map, addr, count)
|
||||
db_breakpoint_list = bkpt;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
db_delete_breakpoint(map, addr)
|
||||
vm_map_t map;
|
||||
db_addr_t addr;
|
||||
@ -130,7 +142,7 @@ db_delete_breakpoint(map, addr)
|
||||
db_breakpoint_free(bkpt);
|
||||
}
|
||||
|
||||
db_breakpoint_t
|
||||
static db_breakpoint_t
|
||||
db_find_breakpoint(map, addr)
|
||||
vm_map_t map;
|
||||
db_addr_t addr;
|
||||
@ -155,7 +167,7 @@ db_find_breakpoint_here(addr)
|
||||
return db_find_breakpoint(db_map_addr(addr), addr);
|
||||
}
|
||||
|
||||
boolean_t db_breakpoints_inserted = TRUE;
|
||||
static boolean_t db_breakpoints_inserted = TRUE;
|
||||
|
||||
void
|
||||
db_set_breakpoints()
|
||||
@ -196,12 +208,13 @@ db_clear_breakpoints()
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef notused
|
||||
/*
|
||||
* Set a temporary breakpoint.
|
||||
* The instruction is changed immediately,
|
||||
* so the breakpoint does not have to be on the breakpoint list.
|
||||
*/
|
||||
db_breakpoint_t
|
||||
static db_breakpoint_t
|
||||
db_set_temp_breakpoint(addr)
|
||||
db_addr_t addr;
|
||||
{
|
||||
@ -224,18 +237,19 @@ db_set_temp_breakpoint(addr)
|
||||
return bkpt;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
db_delete_temp_breakpoint(bkpt)
|
||||
db_breakpoint_t bkpt;
|
||||
{
|
||||
db_put_value(bkpt->address, BKPT_SIZE, bkpt->bkpt_inst);
|
||||
db_breakpoint_free(bkpt);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* List breakpoints.
|
||||
*/
|
||||
void
|
||||
static void
|
||||
db_list_breakpoints()
|
||||
{
|
||||
register db_breakpoint_t bkpt;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_break.h,v 1.3 1995/05/30 07:56:51 rgrimes Exp $
|
||||
* $Id: db_break.h,v 1.4 1995/11/24 13:52:57 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -53,17 +53,8 @@ struct db_breakpoint {
|
||||
};
|
||||
typedef struct db_breakpoint *db_breakpoint_t;
|
||||
|
||||
db_breakpoint_t db_breakpoint_alloc __P((void));
|
||||
void db_breakpoint_free __P((db_breakpoint_t bkpt));
|
||||
void db_clear_breakpoints __P((void));
|
||||
void db_delete_breakpoint __P((vm_map_t map, db_addr_t addr));
|
||||
void db_delete_temp_breakpoint __P((db_breakpoint_t bkpt));
|
||||
db_breakpoint_t db_find_breakpoint __P((vm_map_t map, db_addr_t addr));
|
||||
db_breakpoint_t db_find_breakpoint_here __P((db_addr_t addr));
|
||||
void db_list_breakpoints __P((void));
|
||||
void db_set_breakpoint __P((vm_map_t map, db_addr_t addr,
|
||||
int count));
|
||||
void db_set_breakpoints __P((void));
|
||||
db_breakpoint_t db_set_temp_breakpoint __P((db_addr_t addr));
|
||||
|
||||
#endif /* !_DDB_DB_BREAK_H_ */
|
||||
|
@ -23,7 +23,7 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_command.c,v 1.14 1995/08/27 02:39:39 bde Exp $
|
||||
* $Id: db_command.c,v 1.15 1995/11/24 14:13:32 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -55,12 +55,14 @@ db_addr_t db_last_addr;
|
||||
db_addr_t db_prev;
|
||||
db_addr_t db_next;
|
||||
|
||||
static db_cmdfcn_t db_fncall;
|
||||
static db_cmdfcn_t db_panic;
|
||||
/*
|
||||
* if 'ed' style: 'dot' is set at start of last item printed,
|
||||
* and '+' points to next line.
|
||||
* Otherwise: 'dot' points to next item, '..' points to last.
|
||||
*/
|
||||
boolean_t db_ed_style = TRUE;
|
||||
static boolean_t db_ed_style = TRUE;
|
||||
|
||||
/*
|
||||
* Utility routine - discard tokens through end-of-line.
|
||||
@ -97,16 +99,16 @@ struct command {
|
||||
#define CMD_AMBIGUOUS 3
|
||||
#define CMD_HELP 4
|
||||
|
||||
extern void db_cmd_list __P((struct command *table));
|
||||
extern int db_cmd_search __P((char *name, struct command *table,
|
||||
static void db_cmd_list __P((struct command *table));
|
||||
static int db_cmd_search __P((char *name, struct command *table,
|
||||
struct command **cmdp));
|
||||
extern void db_command __P((struct command **last_cmdp,
|
||||
static void db_command __P((struct command **last_cmdp,
|
||||
struct command *cmd_table));
|
||||
|
||||
/*
|
||||
* Search for command prefix.
|
||||
*/
|
||||
int
|
||||
static int
|
||||
db_cmd_search(name, table, cmdp)
|
||||
char * name;
|
||||
struct command *table;
|
||||
@ -154,7 +156,7 @@ db_cmd_search(name, table, cmdp)
|
||||
return (result);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
db_cmd_list(table)
|
||||
struct command *table;
|
||||
{
|
||||
@ -166,7 +168,7 @@ db_cmd_list(table)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
db_command(last_cmdp, cmd_table)
|
||||
struct command **last_cmdp; /* IN_OUT */
|
||||
struct command *cmd_table;
|
||||
@ -309,7 +311,7 @@ db_command(last_cmdp, cmd_table)
|
||||
* 'show' commands
|
||||
*/
|
||||
|
||||
struct command db_show_all_cmds[] = {
|
||||
static struct command db_show_all_cmds[] = {
|
||||
#if 0
|
||||
{ "threads", db_show_all_threads, 0, 0 },
|
||||
#endif
|
||||
@ -317,7 +319,7 @@ struct command db_show_all_cmds[] = {
|
||||
{ (char *)0 }
|
||||
};
|
||||
|
||||
struct command db_show_cmds[] = {
|
||||
static struct command db_show_cmds[] = {
|
||||
{ "all", 0, 0, db_show_all_cmds },
|
||||
{ "registers", db_show_regs, 0, 0 },
|
||||
{ "breaks", db_listbreak_cmd, 0, 0 },
|
||||
@ -336,7 +338,7 @@ struct command db_show_cmds[] = {
|
||||
{ (char *)0, }
|
||||
};
|
||||
|
||||
struct command db_command_table[] = {
|
||||
static struct command db_command_table[] = {
|
||||
{ "print", db_print_cmd, 0, 0 },
|
||||
{ "p", db_print_cmd, 0, 0 },
|
||||
{ "examine", db_examine_cmd, CS_SET_DOT, 0 },
|
||||
@ -365,7 +367,7 @@ struct command db_command_table[] = {
|
||||
{ (char *)0, }
|
||||
};
|
||||
|
||||
struct command *db_last_command = 0;
|
||||
static struct command *db_last_command = 0;
|
||||
|
||||
#if 0
|
||||
void
|
||||
@ -381,7 +383,7 @@ db_help_cmd()
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
static void
|
||||
db_panic(dummy1, dummy2, dummy3, dummy4)
|
||||
db_expr_t dummy1;
|
||||
boolean_t dummy2;
|
||||
@ -429,7 +431,7 @@ db_error(s)
|
||||
* Call random function:
|
||||
* !expr(arg,arg,arg)
|
||||
*/
|
||||
void
|
||||
static void
|
||||
db_fncall(dummy1, dummy2, dummy3, dummy4)
|
||||
db_expr_t dummy1;
|
||||
boolean_t dummy2;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_examine.c,v 1.8 1995/05/30 07:56:55 rgrimes Exp $
|
||||
* $Id: db_examine.c,v 1.9 1995/11/24 14:13:33 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -42,7 +42,7 @@
|
||||
#include <ddb/db_sym.h>
|
||||
#include <ddb/db_access.h>
|
||||
|
||||
char db_examine_format[TOK_STRING_SIZE] = "x";
|
||||
static char db_examine_format[TOK_STRING_SIZE] = "x";
|
||||
|
||||
static void db_examine(db_addr_t, char *, int);
|
||||
static void db_search(db_addr_t, int, db_expr_t, db_expr_t, u_int);
|
||||
@ -186,7 +186,7 @@ db_examine(addr, fmt, count)
|
||||
/*
|
||||
* Print value.
|
||||
*/
|
||||
char db_print_format = 'x';
|
||||
static char db_print_format = 'x';
|
||||
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
|
@ -23,7 +23,7 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_expr.c,v 1.5 1995/05/30 07:56:56 rgrimes Exp $
|
||||
* $Id: db_expr.c,v 1.6 1995/11/24 14:13:34 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -38,13 +38,13 @@
|
||||
#include <ddb/db_access.h>
|
||||
#include <ddb/db_command.h>
|
||||
|
||||
extern boolean_t db_add_expr __P((db_expr_t *valuep));
|
||||
extern boolean_t db_mult_expr __P((db_expr_t *valuep));
|
||||
extern boolean_t db_shift_expr __P((db_expr_t *valuep));
|
||||
extern boolean_t db_term __P((db_expr_t *valuep));
|
||||
extern boolean_t db_unary __P((db_expr_t *valuep));
|
||||
static boolean_t db_add_expr __P((db_expr_t *valuep));
|
||||
static boolean_t db_mult_expr __P((db_expr_t *valuep));
|
||||
static boolean_t db_shift_expr __P((db_expr_t *valuep));
|
||||
static boolean_t db_term __P((db_expr_t *valuep));
|
||||
static boolean_t db_unary __P((db_expr_t *valuep));
|
||||
|
||||
boolean_t
|
||||
static boolean_t
|
||||
db_term(valuep)
|
||||
db_expr_t *valuep;
|
||||
{
|
||||
@ -99,7 +99,7 @@ db_term(valuep)
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
boolean_t
|
||||
static boolean_t
|
||||
db_unary(valuep)
|
||||
db_expr_t *valuep;
|
||||
{
|
||||
@ -127,7 +127,7 @@ db_unary(valuep)
|
||||
return (db_term(valuep));
|
||||
}
|
||||
|
||||
boolean_t
|
||||
static boolean_t
|
||||
db_mult_expr(valuep)
|
||||
db_expr_t *valuep;
|
||||
{
|
||||
@ -164,7 +164,7 @@ db_mult_expr(valuep)
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
boolean_t
|
||||
static boolean_t
|
||||
db_add_expr(valuep)
|
||||
db_expr_t *valuep;
|
||||
{
|
||||
@ -191,7 +191,7 @@ db_add_expr(valuep)
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
boolean_t
|
||||
static boolean_t
|
||||
db_shift_expr(valuep)
|
||||
db_expr_t *valuep;
|
||||
{
|
||||
|
@ -23,7 +23,7 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_input.c,v 1.7 1995/05/30 07:56:58 rgrimes Exp $
|
||||
* $Id: db_input.c,v 1.8 1995/11/24 14:13:36 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -57,11 +57,11 @@ char * db_le; /* one past last character */
|
||||
#define BLANK ' '
|
||||
#define BACKUP '\b'
|
||||
|
||||
extern int cnmaygetc __P((void));
|
||||
extern void db_delete __P((int n, int bwd));
|
||||
extern int db_inputchar __P((int c));
|
||||
extern void db_putnchars __P((int c, int count));
|
||||
extern void db_putstring __P((char *s, int count));
|
||||
static int cnmaygetc __P((void));
|
||||
static void db_delete __P((int n, int bwd));
|
||||
static int db_inputchar __P((int c));
|
||||
static void db_putnchars __P((int c, int count));
|
||||
static void db_putstring __P((char *s, int count));
|
||||
|
||||
void
|
||||
db_putstring(s, count)
|
||||
|
@ -23,7 +23,7 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_lex.c,v 1.6 1995/05/30 07:57:00 rgrimes Exp $
|
||||
* $Id: db_lex.c,v 1.7 1995/11/24 14:13:37 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -42,6 +42,9 @@ char db_line[120];
|
||||
char * db_lp, *db_endlp;
|
||||
|
||||
static int db_lex __P((void));
|
||||
static void db_flush_line __P((void));
|
||||
static int db_read_char __P((void));
|
||||
static void db_unread_char __P((int));
|
||||
|
||||
int
|
||||
db_read_line()
|
||||
@ -56,16 +59,16 @@ db_read_line()
|
||||
return (i);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
db_flush_line()
|
||||
{
|
||||
db_lp = db_line;
|
||||
db_endlp = db_line;
|
||||
}
|
||||
|
||||
int db_look_char = 0;
|
||||
static int db_look_char = 0;
|
||||
|
||||
int
|
||||
static int
|
||||
db_read_char()
|
||||
{
|
||||
int c;
|
||||
@ -81,14 +84,14 @@ db_read_char()
|
||||
return (c);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
db_unread_char(c)
|
||||
int c;
|
||||
{
|
||||
db_look_char = c;
|
||||
}
|
||||
|
||||
int db_look_token = 0;
|
||||
static int db_look_token = 0;
|
||||
|
||||
void
|
||||
db_unread_token(t)
|
||||
|
@ -23,7 +23,7 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_lex.h,v 1.5 1995/05/30 07:57:01 rgrimes Exp $
|
||||
* $Id: db_lex.h,v 1.6 1995/11/24 13:52:59 bde Exp $
|
||||
*/
|
||||
|
||||
#ifndef _DDB_DB_LEX_H_
|
||||
@ -37,11 +37,8 @@
|
||||
* Lexical analyzer.
|
||||
*/
|
||||
void db_flush_lex __P((void));
|
||||
void db_flush_line __P((void));
|
||||
int db_read_char __P((void));
|
||||
int db_read_line __P((void));
|
||||
int db_read_token __P((void));
|
||||
void db_unread_char __P((int c));
|
||||
void db_unread_token __P((int t));
|
||||
|
||||
extern int db_tok_number;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_output.c,v 1.11 1995/05/30 07:57:02 rgrimes Exp $
|
||||
* $Id: db_output.c,v 1.12 1995/11/24 14:13:38 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -54,8 +54,8 @@
|
||||
* don't print trailing spaces. This avoids most
|
||||
* of the wraparounds.
|
||||
*/
|
||||
int db_output_position = 0; /* output column */
|
||||
int db_last_non_space = 0; /* last non-space character */
|
||||
static int db_output_position = 0; /* output column */
|
||||
static int db_last_non_space = 0; /* last non-space character */
|
||||
int db_tab_stop_width = 8; /* how wide are tab stops? */
|
||||
#define NEXT_TAB(i) \
|
||||
((((i) + db_tab_stop_width) / db_tab_stop_width) * db_tab_stop_width)
|
||||
@ -157,18 +157,6 @@ db_printf(const char *fmt, ...)
|
||||
va_end(listp);
|
||||
}
|
||||
|
||||
/* alternate name */
|
||||
|
||||
/*VARARGS1*/
|
||||
void
|
||||
kdbprintf(const char *fmt, ...)
|
||||
{
|
||||
va_list listp;
|
||||
va_start(listp, fmt);
|
||||
db_printf_guts (fmt, listp);
|
||||
va_end(listp);
|
||||
}
|
||||
|
||||
/*
|
||||
* End line if too long.
|
||||
*/
|
||||
|
@ -23,7 +23,7 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_run.c,v 1.5 1995/05/30 07:57:08 rgrimes Exp $
|
||||
* $Id: db_run.c,v 1.6 1995/11/24 14:13:40 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -67,6 +67,10 @@ extern void db_set_single_step __P((db_regs_t *regs);
|
||||
extern void db_clear_single_step __P((db_regs_t *regs));
|
||||
#endif
|
||||
|
||||
#ifdef notused
|
||||
static void db_single_step __P((db_regs_t *regs));
|
||||
#endif
|
||||
|
||||
boolean_t
|
||||
db_stop_at_pc(is_breakpoint)
|
||||
boolean_t *is_breakpoint;
|
||||
@ -209,7 +213,8 @@ db_restart_at_pc(watchpt)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
#ifdef notused
|
||||
static void
|
||||
db_single_step(regs)
|
||||
db_regs_t *regs;
|
||||
{
|
||||
@ -218,6 +223,7 @@ db_single_step(regs)
|
||||
db_set_single_step(regs);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SOFTWARE_SSTEP
|
||||
/*
|
||||
|
@ -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.9 1995/05/30 07:57:10 rgrimes Exp $
|
||||
* $Id: db_sym.c,v 1.10 1995/11/24 14:13:41 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -43,14 +43,16 @@
|
||||
#define MAXNOSYMTABS 3 /* mach, ux, emulator */
|
||||
#endif
|
||||
|
||||
db_symtab_t db_symtabs[MAXNOSYMTABS] = {{0,},};
|
||||
int db_nsymtab = 0;
|
||||
static db_symtab_t db_symtabs[MAXNOSYMTABS] = {{0,},};
|
||||
static int db_nsymtab = 0;
|
||||
|
||||
db_symtab_t *db_last_symtab;
|
||||
|
||||
extern db_sym_t db_lookup __P(( char *symstr));
|
||||
static db_sym_t db_lookup __P(( char *symstr));
|
||||
static char *db_qualify __P((db_sym_t sym, char *symtabname));
|
||||
extern boolean_t db_symbol_is_ambiguous __P((db_sym_t sym));
|
||||
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 *,
|
||||
db_expr_t));
|
||||
|
||||
/*
|
||||
* Add symbol table, with given name, to list of symbol tables.
|
||||
@ -130,7 +132,7 @@ db_value_of_name(name, valuep)
|
||||
* then only the specified symbol table will be searched;
|
||||
* otherwise, all symbol tables will be searched.
|
||||
*/
|
||||
db_sym_t
|
||||
static db_sym_t
|
||||
db_lookup(symstr)
|
||||
char *symstr;
|
||||
{
|
||||
@ -179,9 +181,9 @@ db_lookup(symstr)
|
||||
* Does this symbol name appear in more than one symbol table?
|
||||
* Used by db_symbol_values to decide whether to qualify a symbol.
|
||||
*/
|
||||
boolean_t db_qualify_ambiguous_names = FALSE;
|
||||
static boolean_t db_qualify_ambiguous_names = FALSE;
|
||||
|
||||
boolean_t
|
||||
static boolean_t
|
||||
db_symbol_is_ambiguous(sym)
|
||||
db_sym_t sym;
|
||||
{
|
||||
@ -304,7 +306,7 @@ db_printsym(off, strategy)
|
||||
}
|
||||
}
|
||||
|
||||
boolean_t
|
||||
static boolean_t
|
||||
db_line_at_pc( sym, filename, linenum, pc)
|
||||
db_sym_t sym;
|
||||
char **filename;
|
||||
|
@ -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.8 1995/05/30 07:57:11 rgrimes Exp $
|
||||
* $Id: db_sym.h,v 1.9 1995/11/24 13:53:01 bde Exp $
|
||||
*/
|
||||
|
||||
#ifndef _DDB_DB_SYM_H_
|
||||
@ -97,7 +97,6 @@ int db_eqname __P((char *, char *, char));
|
||||
void db_printsym __P((db_expr_t, db_strategy_t));
|
||||
/* print closest symbol to a value */
|
||||
|
||||
boolean_t db_line_at_pc __P((db_sym_t, char **, int *, db_expr_t));
|
||||
int db_sym_numargs __P((db_sym_t, int *, char **));
|
||||
|
||||
boolean_t X_db_line_at_pc __P((db_symtab_t *symtab, db_sym_t cursym,
|
||||
@ -107,7 +106,6 @@ db_sym_t X_db_lookup __P((db_symtab_t *stab, char *symstr));
|
||||
db_sym_t X_db_search_symbol __P((db_symtab_t *symtab, db_addr_t off,
|
||||
db_strategy_t strategy,
|
||||
db_expr_t *diffp));
|
||||
void X_db_sym_init __P((int *symtab, char *esymtab, char *name));
|
||||
int X_db_sym_numargs __P((db_symtab_t *, db_sym_t, int *,
|
||||
char **));
|
||||
void X_db_symbol_values __P((db_sym_t sym, char **namep,
|
||||
|
@ -23,7 +23,7 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_variables.c,v 1.7 1995/05/30 07:57:17 rgrimes Exp $
|
||||
* $Id: db_variables.c,v 1.8 1995/11/24 14:13:41 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -39,19 +39,23 @@
|
||||
#include <ddb/db_lex.h>
|
||||
#include <ddb/db_variables.h>
|
||||
|
||||
extern int db_find_variable __P((struct db_variable **varp));
|
||||
extern int db_set_variable __P((db_expr_t value));
|
||||
static int db_find_variable __P((struct db_variable **varp));
|
||||
static void db_write_variable __P((struct db_variable *, db_expr_t *));
|
||||
|
||||
struct db_variable db_vars[] = {
|
||||
#ifdef notused
|
||||
static int db_set_variable __P((db_expr_t value));
|
||||
#endif
|
||||
|
||||
static struct db_variable db_vars[] = {
|
||||
{ "radix", &db_radix, FCN_NULL },
|
||||
{ "maxoff", (int *)&db_maxoff, FCN_NULL },
|
||||
{ "maxwidth", &db_max_width, FCN_NULL },
|
||||
{ "tabstops", &db_tab_stop_width, FCN_NULL },
|
||||
};
|
||||
struct db_variable *db_evars = db_vars + sizeof(db_vars)/sizeof(db_vars[0]);
|
||||
static struct db_variable *db_evars =
|
||||
db_vars + sizeof(db_vars)/sizeof(db_vars[0]);
|
||||
|
||||
int
|
||||
static int
|
||||
db_find_variable(varp)
|
||||
struct db_variable **varp;
|
||||
{
|
||||
@ -91,7 +95,8 @@ db_get_variable(valuep)
|
||||
return (1);
|
||||
}
|
||||
|
||||
int
|
||||
#ifdef notused
|
||||
static int
|
||||
db_set_variable(value)
|
||||
db_expr_t value;
|
||||
{
|
||||
@ -104,7 +109,7 @@ db_set_variable(value)
|
||||
|
||||
return (1);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void
|
||||
db_read_variable(vp, valuep)
|
||||
|
@ -23,7 +23,7 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_watch.c,v 1.6 1995/05/30 07:57:20 rgrimes Exp $
|
||||
* $Id: db_watch.c,v 1.7 1995/11/24 14:13:42 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -46,16 +46,26 @@
|
||||
* Watchpoints.
|
||||
*/
|
||||
|
||||
boolean_t db_watchpoints_inserted = TRUE;
|
||||
static boolean_t db_watchpoints_inserted = TRUE;
|
||||
|
||||
#define NWATCHPOINTS 100
|
||||
struct db_watchpoint db_watch_table[NWATCHPOINTS];
|
||||
db_watchpoint_t db_next_free_watchpoint = &db_watch_table[0];
|
||||
db_watchpoint_t db_free_watchpoints = 0;
|
||||
db_watchpoint_t db_watchpoint_list = 0;
|
||||
static db_watchpoint_t db_next_free_watchpoint = &db_watch_table[0];
|
||||
static db_watchpoint_t db_free_watchpoints = 0;
|
||||
static db_watchpoint_t db_watchpoint_list = 0;
|
||||
|
||||
static db_watchpoint_t db_watchpoint_alloc __P((void));
|
||||
static void db_watchpoint_free __P((db_watchpoint_t watch));
|
||||
static void db_delete_watchpoint __P((vm_map_t map,
|
||||
db_addr_t addr));
|
||||
#ifdef notused
|
||||
static boolean_t db_find_watchpoint __P((vm_map_t map, db_addr_t addr,
|
||||
db_regs_t *regs));
|
||||
#endif
|
||||
static void db_list_watchpoints __P((void));
|
||||
static void db_set_watchpoint __P((vm_map_t map, db_addr_t addr,
|
||||
vm_size_t size));
|
||||
|
||||
extern db_watchpoint_t db_watchpoint_alloc __P((void));
|
||||
extern void db_watchpoint_free __P((db_watchpoint_t watch));
|
||||
|
||||
db_watchpoint_t
|
||||
db_watchpoint_alloc()
|
||||
@ -84,7 +94,7 @@ db_watchpoint_free(watch)
|
||||
db_free_watchpoints = watch;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
db_set_watchpoint(map, addr, size)
|
||||
vm_map_t map;
|
||||
db_addr_t addr;
|
||||
@ -127,7 +137,7 @@ db_set_watchpoint(map, addr, size)
|
||||
db_watchpoints_inserted = FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
db_delete_watchpoint(map, addr)
|
||||
vm_map_t map;
|
||||
db_addr_t addr;
|
||||
@ -149,7 +159,7 @@ db_delete_watchpoint(map, addr)
|
||||
db_printf("Not set.\n");
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
db_list_watchpoints()
|
||||
{
|
||||
register db_watchpoint_t watch;
|
||||
@ -237,7 +247,8 @@ db_clear_watchpoints()
|
||||
db_watchpoints_inserted = FALSE;
|
||||
}
|
||||
|
||||
boolean_t
|
||||
#ifdef notused
|
||||
static boolean_t
|
||||
db_find_watchpoint(map, addr, regs)
|
||||
vm_map_t map;
|
||||
db_addr_t addr;
|
||||
@ -271,3 +282,4 @@ db_find_watchpoint(map, addr, regs)
|
||||
|
||||
return (FALSE);
|
||||
}
|
||||
#endif
|
||||
|
@ -23,7 +23,7 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_watch.h,v 1.4 1995/05/30 07:57:21 rgrimes Exp $
|
||||
* $Id: db_watch.h,v 1.5 1995/11/24 13:53:03 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -48,11 +48,4 @@ typedef struct db_watchpoint {
|
||||
struct db_watchpoint *link; /* link in in-use or free chain */
|
||||
} *db_watchpoint_t;
|
||||
|
||||
void db_delete_watchpoint __P((vm_map_t map, db_addr_t addr));
|
||||
boolean_t db_find_watchpoint __P((vm_map_t map, db_addr_t addr,
|
||||
db_regs_t *regs));
|
||||
void db_list_watchpoints __P((void));
|
||||
void db_set_watchpoint __P((vm_map_t map, db_addr_t addr,
|
||||
vm_size_t size));
|
||||
|
||||
#endif /* !_DDB_DB_WATCH_H_ */
|
||||
|
@ -27,7 +27,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: ddb.h,v 1.6 1995/05/30 07:57:24 rgrimes Exp $
|
||||
* $Id: ddb.h,v 1.7 1995/11/24 13:53:05 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -80,7 +80,6 @@ void db_read_bytes __P((vm_offset_t addr, int size, char *data));
|
||||
int db_readline __P((char *lstart, int lsize));
|
||||
void db_restart_at_pc __P((boolean_t watchpt));
|
||||
void db_set_watchpoints __P((void));
|
||||
void db_single_step __P((db_regs_t *regs));
|
||||
void db_skip_to_eol __P((void));
|
||||
boolean_t db_stop_at_pc __P((boolean_t *is_breakpoint));
|
||||
#define db_strcpy strcpy
|
||||
@ -97,10 +96,8 @@ db_cmdfcn_t db_continue_cmd;
|
||||
db_cmdfcn_t db_delete_cmd;
|
||||
db_cmdfcn_t db_deletewatch_cmd;
|
||||
db_cmdfcn_t db_examine_cmd;
|
||||
db_cmdfcn_t db_fncall;
|
||||
db_cmdfcn_t db_listbreak_cmd;
|
||||
db_cmdfcn_t db_listwatch_cmd;
|
||||
db_cmdfcn_t db_panic;
|
||||
db_cmdfcn_t db_print_cmd;
|
||||
db_cmdfcn_t db_ps;
|
||||
db_cmdfcn_t db_search_cmd;
|
||||
|
Loading…
Reference in New Issue
Block a user