summaryrefslogtreecommitdiff
path: root/ddb
diff options
context:
space:
mode:
Diffstat (limited to 'ddb')
-rw-r--r--ddb/db_aout.c34
-rw-r--r--ddb/db_break.c20
-rw-r--r--ddb/db_break.h12
-rw-r--r--ddb/db_command.c22
-rw-r--r--ddb/db_command.h4
-rw-r--r--ddb/db_cond.c2
-rw-r--r--ddb/db_cond.h2
-rw-r--r--ddb/db_examine.c12
-rw-r--r--ddb/db_examine.h10
-rw-r--r--ddb/db_expr.c6
-rw-r--r--ddb/db_expr.h2
-rw-r--r--ddb/db_input.c4
-rw-r--r--ddb/db_lex.c4
-rw-r--r--ddb/db_lex.h4
-rw-r--r--ddb/db_macro.c4
-rw-r--r--ddb/db_macro.h2
-rw-r--r--ddb/db_print.c18
-rw-r--r--ddb/db_print.h8
-rw-r--r--ddb/db_run.c20
-rw-r--r--ddb/db_run.h12
-rw-r--r--ddb/db_sym.c6
-rw-r--r--ddb/db_sym.h2
-rw-r--r--ddb/db_task_thread.c18
-rw-r--r--ddb/db_task_thread.h8
-rw-r--r--ddb/db_variables.c9
-rw-r--r--ddb/db_watch.c10
-rw-r--r--ddb/db_watch.h10
-rw-r--r--ddb/db_write_cmd.c2
-rw-r--r--ddb/db_write_cmd.h2
29 files changed, 135 insertions, 134 deletions
diff --git a/ddb/db_aout.c b/ddb/db_aout.c
index 8ef7efb..57c680a 100644
--- a/ddb/db_aout.c
+++ b/ddb/db_aout.c
@@ -134,7 +134,7 @@ aout_db_sym_init(symtab, esymtab, name, task_addr)
*/
private boolean_t
aout_db_is_filename(name)
- char *name;
+ const char *name;
{
while (*name) {
if (*name == '.') {
@@ -151,10 +151,10 @@ aout_db_is_filename(name)
*/
private boolean_t
aout_db_eq_name(sp, name)
- struct nlist *sp;
- char *name;
+ const struct nlist *sp;
+ const char *name;
{
- char *s1, *s2;
+ const char *s1, *s2;
s1 = sp->n_un.n_name;
s2 = name;
@@ -186,11 +186,11 @@ aout_db_eq_name(sp, name)
*/
private struct nlist *
aout_db_search_name(sp, ep, name, type, fp)
- struct nlist *sp;
- struct nlist *ep;
- char *name;
- int type;
- struct nlist **fp;
+ struct nlist *sp;
+ const struct nlist *ep;
+ const char *name;
+ int type;
+ struct nlist **fp;
{
struct nlist *file_sp = *fp;
struct nlist *found_sp = 0;
@@ -233,8 +233,8 @@ aout_db_search_name(sp, ep, name, type, fp)
private db_sym_t
aout_db_qualified_search(stab, file, sym, line)
db_symtab_t *stab;
- char *file;
- char *sym;
+ const char *file;
+ const char *sym;
int line;
{
struct nlist *sp = (struct nlist *)stab->start;
@@ -396,12 +396,12 @@ aout_db_symbol_values(stab, sym, namep, valuep)
*/
private boolean_t
aout_db_search_by_addr(stab, addr, file, func, line, diff)
- db_symtab_t *stab;
- vm_offset_t addr;
- char **file;
- char **func;
- int *line;
- unsigned long *diff;
+ const db_symtab_t *stab;
+ vm_offset_t addr;
+ char **file;
+ char **func;
+ int *line;
+ unsigned long *diff;
{
struct nlist *sp;
struct nlist *line_sp, *func_sp, *file_sp, *line_func;
diff --git a/ddb/db_break.c b/ddb/db_break.c
index d8273ea..e41834d 100644
--- a/ddb/db_break.c
+++ b/ddb/db_break.c
@@ -90,7 +90,7 @@ db_breakpoint_free(bkpt)
static int
db_add_thread_breakpoint(bkpt, task_thd, count, task_bpt)
- db_breakpoint_t bkpt;
+ const db_breakpoint_t bkpt;
vm_offset_t task_thd;
int count;
boolean_t task_bpt;
@@ -156,8 +156,8 @@ db_delete_thread_breakpoint(bkpt, task_thd)
static db_thread_breakpoint_t
db_find_thread_breakpoint(bkpt, thread)
- db_breakpoint_t bkpt;
- thread_t thread;
+ const db_breakpoint_t bkpt;
+ const thread_t thread;
{
db_thread_breakpoint_t tp;
task_t task = (thread == THREAD_NULL)? TASK_NULL: thread->task;
@@ -176,7 +176,7 @@ db_find_thread_breakpoint(bkpt, thread)
db_thread_breakpoint_t
db_find_thread_breakpoint_here(task, addr)
- task_t task;
+ const task_t task;
db_addr_t addr;
{
db_breakpoint_t bkpt;
@@ -268,10 +268,10 @@ db_check_breakpoint_valid(void)
db_breakpoint_t
db_set_breakpoint(task, addr, count, thread, task_bpt)
- task_t task;
+ const task_t task;
db_addr_t addr;
int count;
- thread_t thread;
+ const thread_t thread;
boolean_t task_bpt;
{
db_breakpoint_t bkpt;
@@ -321,7 +321,7 @@ db_set_breakpoint(task, addr, count, thread, task_bpt)
void
db_delete_breakpoint(task, addr, task_thd)
- task_t task;
+ const task_t task;
db_addr_t addr;
vm_offset_t task_thd;
{
@@ -352,7 +352,7 @@ db_delete_breakpoint(task, addr, task_thd)
db_breakpoint_t
db_find_breakpoint(task, addr)
- task_t task;
+ const task_t task;
db_addr_t addr;
{
db_breakpoint_t bkpt;
@@ -368,7 +368,7 @@ db_find_breakpoint(task, addr)
boolean_t
db_find_breakpoint_here(task, addr)
- task_t task;
+ const task_t task;
db_addr_t addr;
{
db_breakpoint_t bkpt;
@@ -681,7 +681,7 @@ db_breakpoint_cmd(addr, have_addr, count, modif)
db_expr_t addr;
int have_addr;
db_expr_t count;
- char * modif;
+ const char * modif;
{
int n;
thread_t thread;
diff --git a/ddb/db_break.h b/ddb/db_break.h
index e323a5f..ad86119 100644
--- a/ddb/db_break.h
+++ b/ddb/db_break.h
@@ -71,12 +71,12 @@ struct db_breakpoint {
typedef struct db_breakpoint *db_breakpoint_t;
-extern db_breakpoint_t db_find_breakpoint( task_t task, db_addr_t addr);
-extern boolean_t db_find_breakpoint_here( task_t task, db_addr_t addr);
+extern db_breakpoint_t db_find_breakpoint( const task_t task, db_addr_t addr);
+extern boolean_t db_find_breakpoint_here( const task_t task, db_addr_t addr);
extern void db_set_breakpoints(void);
extern void db_clear_breakpoints(void);
extern db_thread_breakpoint_t db_find_thread_breakpoint_here
- ( task_t task, db_addr_t addr );
+ ( const task_t task, db_addr_t addr );
extern db_thread_breakpoint_t db_find_breakpoint_number
( int num, db_breakpoint_t *bkptp);
@@ -84,8 +84,8 @@ extern db_breakpoint_t db_set_temp_breakpoint( task_t task, db_addr_t addr);
extern void db_delete_temp_breakpoint
( task_t task, db_breakpoint_t bkpt);
-extern db_breakpoint_t db_set_breakpoint(task_t task, db_addr_t addr,
- int count, thread_t thread,
+extern db_breakpoint_t db_set_breakpoint(const task_t task, db_addr_t addr,
+ int count, const thread_t thread,
boolean_t task_bpt);
void db_listbreak_cmd();
@@ -96,7 +96,7 @@ void db_breakpoint_cmd(
db_expr_t addr,
int have_addr,
db_expr_t count,
- char * modif);
+ const char * modif);
extern void db_check_breakpoint_valid(void);
diff --git a/ddb/db_command.c b/ddb/db_command.c
index 85cbf81..3257e07 100644
--- a/ddb/db_command.c
+++ b/ddb/db_command.c
@@ -95,15 +95,15 @@ boolean_t db_ed_style = TRUE;
*/
int
db_cmd_search(name, table, cmdp)
- char * name;
- struct db_command *table;
- struct db_command **cmdp; /* out */
+ const char * name;
+ const struct db_command *table;
+ const struct db_command **cmdp; /* out */
{
- struct db_command *cmd;
+ const struct db_command *cmd;
int result = CMD_NONE;
for (cmd = table; cmd->name != 0; cmd++) {
- char *lp;
+ const char *lp;
char *rp;
int c;
@@ -142,9 +142,9 @@ db_cmd_search(name, table, cmdp)
void
db_cmd_list(table)
- struct db_command *table;
+ const struct db_command *table;
{
- struct db_command *cmd;
+ const struct db_command *cmd;
for (cmd = table; cmd->name != 0; cmd++) {
db_printf("%-12s", cmd->name);
@@ -447,7 +447,7 @@ db_exec_cmd_nest(cmd, size)
}
void db_error(s)
- char *s;
+ const char *s;
{
extern int db_macro_level;
@@ -524,10 +524,10 @@ db_fncall(void)
boolean_t
db_option(modif, option)
- char *modif;
- int option;
+ const char *modif;
+ int option;
{
- char *p;
+ const char *p;
for (p = modif; *p; p++)
if (*p == option)
diff --git a/ddb/db_command.h b/ddb/db_command.h
index 30e1f21..5f0236a 100644
--- a/ddb/db_command.h
+++ b/ddb/db_command.h
@@ -41,9 +41,9 @@
#include <machine/setjmp.h>
extern void db_command_loop(void);
-extern boolean_t db_option(char *, int);
+extern boolean_t db_option(const char *, int);
-extern void db_error(char *); /* report error */
+extern void db_error(const char *); /* report error */
extern db_addr_t db_dot; /* current location */
extern db_addr_t db_last_addr; /* last explicit address typed */
diff --git a/ddb/db_cond.c b/ddb/db_cond.c
index ae52bef..2c923b4 100644
--- a/ddb/db_cond.c
+++ b/ddb/db_cond.c
@@ -105,7 +105,7 @@ db_cond_check(bkpt)
void
db_cond_print(bkpt)
- db_thread_breakpoint_t bkpt;
+ const db_thread_breakpoint_t bkpt;
{
char *p, *ep;
struct db_cond *cp;
diff --git a/ddb/db_cond.h b/ddb/db_cond.h
index dec4967..6b9c3a5 100644
--- a/ddb/db_cond.h
+++ b/ddb/db_cond.h
@@ -24,7 +24,7 @@
#include <sys/types.h>
#include <machine/db_machdep.h>
-extern void db_cond_free (db_thread_breakpoint_t bkpt);
+extern void db_cond_free (const db_thread_breakpoint_t bkpt);
extern boolean_t db_cond_check (db_thread_breakpoint_t bkpt);
diff --git a/ddb/db_examine.c b/ddb/db_examine.c
index 6e7f89c..cb103ae 100644
--- a/ddb/db_examine.c
+++ b/ddb/db_examine.c
@@ -62,7 +62,7 @@ db_examine_cmd(addr, have_addr, count, modif)
db_expr_t addr;
int have_addr;
db_expr_t count;
- char * modif;
+ const char * modif;
{
thread_t thread;
@@ -94,7 +94,7 @@ db_examine_forward(addr, have_addr, count, modif)
db_expr_t addr;
int have_addr;
db_expr_t count;
- char * modif;
+ const char * modif;
{
db_examine(db_next, db_examine_format, db_examine_count,
db_thread_to_task(db_examine_thread));
@@ -106,7 +106,7 @@ db_examine_backward(addr, have_addr, count, modif)
db_expr_t addr;
int have_addr;
db_expr_t count;
- char * modif;
+ const char * modif;
{
db_examine(db_examine_prev_addr - (db_next - db_examine_prev_addr),
@@ -117,7 +117,7 @@ db_examine_backward(addr, have_addr, count, modif)
void
db_examine(addr, fmt, count, task)
db_addr_t addr;
- char * fmt; /* format string */
+ const char * fmt; /* format string */
int count; /* repeat count */
task_t task;
{
@@ -125,7 +125,7 @@ db_examine(addr, fmt, count, task)
db_expr_t value;
int size; /* in bytes */
int width;
- char * fp;
+ const char * fp;
db_examine_prev_addr = addr;
while (--count >= 0) {
@@ -333,7 +333,7 @@ db_print_loc_and_inst(loc, task)
void
db_strcpy(dst, src)
char *dst;
- char *src;
+ const char *src;
{
while ((*dst++ = *src++))
;
diff --git a/ddb/db_examine.h b/ddb/db_examine.h
index e4f3415..df578a0 100644
--- a/ddb/db_examine.h
+++ b/ddb/db_examine.h
@@ -29,13 +29,13 @@ extern void db_examine_cmd (
db_expr_t addr,
int have_addr,
db_expr_t count,
- char *modif);
+ const char *modif);
-extern void db_strcpy (char *dst, char *src);
+extern void db_strcpy (char *dst, const char *src);
extern void db_examine (
db_addr_t addr,
- char *fmt,
+ const char *fmt,
int count,
task_t task);
@@ -43,13 +43,13 @@ void db_examine_forward(
db_expr_t addr,
int have_addr,
db_expr_t count,
- char * modif);
+ const char * modif);
void db_examine_backward(
db_expr_t addr,
int have_addr,
db_expr_t count,
- char * modif);
+ const char * modif);
extern void db_print_loc_and_inst (
db_addr_t loc,
diff --git a/ddb/db_expr.c b/ddb/db_expr.c
index 82ada58..dad09e5 100644
--- a/ddb/db_expr.c
+++ b/ddb/db_expr.c
@@ -95,12 +95,12 @@ db_term(valuep)
int
db_size_option(modif, u_option, t_option)
- char *modif;
+ const char *modif;
boolean_t *u_option;
boolean_t *t_option;
{
- char *p;
- int size = sizeof(int);
+ const char *p;
+ int size = sizeof(int);
*u_option = FALSE;
*t_option = FALSE;
diff --git a/ddb/db_expr.h b/ddb/db_expr.h
index 989b66b..9c304e6 100644
--- a/ddb/db_expr.h
+++ b/ddb/db_expr.h
@@ -17,7 +17,7 @@
*/
int db_size_option(
- char *modif,
+ const char *modif,
boolean_t *u_option,
boolean_t *t_option);
diff --git a/ddb/db_input.c b/ddb/db_input.c
index 5be3a8a..f908705 100644
--- a/ddb/db_input.c
+++ b/ddb/db_input.c
@@ -69,8 +69,8 @@ char * db_history_prev = (char *) 0; /* start of previous line */
void
db_putstring(s, count)
- char *s;
- int count;
+ const char *s;
+ int count;
{
while (--count >= 0)
cnputc(*s++);
diff --git a/ddb/db_lex.c b/ddb/db_lex.c
index 203472d..e7f67d2 100644
--- a/ddb/db_lex.c
+++ b/ddb/db_lex.c
@@ -50,7 +50,7 @@ db_expr_t db_look_token = 0;
int
db_read_line(repeat_last)
- char *repeat_last;
+ const char *repeat_last;
{
int i;
@@ -105,7 +105,7 @@ db_save_lex_context(lp)
void
db_restore_lex_context(lp)
- struct db_lex_context *lp;
+ const struct db_lex_context *lp;
{
db_lp = lp->l_ptr;
db_last_lp = db_lp;
diff --git a/ddb/db_lex.h b/ddb/db_lex.h
index 5900122..f7677df 100644
--- a/ddb/db_lex.h
+++ b/ddb/db_lex.h
@@ -45,7 +45,7 @@ struct db_lex_context {
};
extern int db_lex(void);
-extern int db_read_line(char *rep_str);
+extern int db_read_line(const char *rep_str);
extern void db_flush_line(void);
extern int db_read_char(void);
extern void db_unread_char(int c);
@@ -54,7 +54,7 @@ extern void db_unread_token(int t);
extern void db_flush_lex(void);
extern void db_switch_input(char *, int);
extern void db_save_lex_context(struct db_lex_context *);
-extern void db_restore_lex_context(struct db_lex_context *);
+extern void db_restore_lex_context(const struct db_lex_context *);
extern void db_skip_to_eol(void);
extern db_expr_t db_tok_number;
diff --git a/ddb/db_macro.c b/ddb/db_macro.c
index f985679..e22f6bf 100644
--- a/ddb/db_macro.c
+++ b/ddb/db_macro.c
@@ -59,7 +59,7 @@ db_expr_t db_macro_args[DB_MACRO_LEVEL][DB_NARGS];
static struct db_user_macro *
db_lookup_macro(name)
- char *name;
+ const char *name;
{
struct db_user_macro *mp;
@@ -141,7 +141,7 @@ db_show_macro(void)
int
db_exec_macro(name)
- char *name;
+ const char *name;
{
struct db_user_macro *mp;
int n;
diff --git a/ddb/db_macro.h b/ddb/db_macro.h
index 525eead..2c0a599 100644
--- a/ddb/db_macro.h
+++ b/ddb/db_macro.h
@@ -30,7 +30,7 @@ extern void db_del_macro_cmd (void);
extern void db_show_macro (void);
-extern int db_exec_macro (char *name);
+extern int db_exec_macro (const char *name);
extern void db_arg_variable (
struct db_variable *vp,
diff --git a/ddb/db_print.c b/ddb/db_print.c
index fbc0960..17ca2cc 100644
--- a/ddb/db_print.c
+++ b/ddb/db_print.c
@@ -127,8 +127,8 @@ db_show_regs(addr, have_addr, count, modif)
char *
db_thread_stat(thread, status)
- thread_t thread;
- char *status;
+ const thread_t thread;
+ char *status;
{
char *p = status;
@@ -281,7 +281,7 @@ db_show_all_threads(addr, have_addr, count, modif)
db_expr_t addr;
boolean_t have_addr;
db_expr_t count;
- char * modif;
+ const char * modif;
{
task_t task;
int task_id;
@@ -332,7 +332,7 @@ db_show_one_thread(addr, have_addr, count, modif)
db_expr_t addr;
boolean_t have_addr;
db_expr_t count;
- char * modif;
+ const char * modif;
{
int flag;
int thread_id;
@@ -378,7 +378,7 @@ db_show_one_task(addr, have_addr, count, modif)
db_expr_t addr;
boolean_t have_addr;
db_expr_t count;
- char * modif;
+ const char * modif;
{
int flag;
int task_id;
@@ -410,7 +410,7 @@ db_show_one_task(addr, have_addr, count, modif)
int
db_port_iterate(thread, func)
- thread_t thread;
+ const thread_t thread;
void (*func)();
{
ipc_entry_t entry;
@@ -452,7 +452,7 @@ db_lookup_port(thread, id)
static void
db_print_port_id(id, port, bits, n)
int id;
- ipc_port_t port;
+ const ipc_port_t port;
unsigned bits;
int n;
{
@@ -466,7 +466,7 @@ db_print_port_id(id, port, bits, n)
static void
db_print_port_id_long(
int id,
- ipc_port_t port,
+ const ipc_port_t port,
unsigned bits,
int n)
{
@@ -484,7 +484,7 @@ db_show_port_id(addr, have_addr, count, modif)
db_expr_t addr;
boolean_t have_addr;
db_expr_t count;
- char * modif;
+ const char * modif;
{
thread_t thread;
diff --git a/ddb/db_print.h b/ddb/db_print.h
index 898014e..dacb47b 100644
--- a/ddb/db_print.h
+++ b/ddb/db_print.h
@@ -24,25 +24,25 @@ void db_show_one_task(
db_expr_t addr,
boolean_t have_addr,
db_expr_t count,
- char * modif);
+ const char * modif);
void db_show_port_id(
db_expr_t addr,
boolean_t have_addr,
db_expr_t count,
- char * modif);
+ const char * modif);
void db_show_one_thread(
db_expr_t addr,
int have_addr,
db_expr_t count,
- char * modif);
+ const char * modif);
void db_show_all_threads(
db_expr_t addr,
int have_addr,
db_expr_t count,
- char * modif);
+ const char * modif);
db_addr_t db_task_from_space(
ipc_space_t space,
diff --git a/ddb/db_run.c b/ddb/db_run.c
index 0978667..945d097 100644
--- a/ddb/db_run.c
+++ b/ddb/db_run.c
@@ -251,8 +251,8 @@ db_breakpoint_t db_taken_bkpt = 0;
db_breakpoint_t
db_find_temp_breakpoint(task, addr)
- task_t task;
- db_addr_t addr;
+ const task_t task;
+ db_addr_t addr;
{
if (db_taken_bkpt && (db_taken_bkpt->address == addr) &&
db_taken_bkpt->task == task)
@@ -265,8 +265,8 @@ db_find_temp_breakpoint(task, addr)
void
db_set_task_single_step(regs, task)
- db_regs_t *regs;
- task_t task;
+ db_regs_t *regs;
+ task_t task;
{
db_addr_t pc = PC_REGS(regs), brpc;
unsigned int inst;
@@ -310,8 +310,8 @@ db_set_task_single_step(regs, task)
void
db_clear_task_single_step(regs, task)
- db_regs_t *regs;
- task_t task;
+ const db_regs_t *regs;
+ task_t task;
{
if (db_taken_bkpt != 0) {
db_delete_temp_breakpoint(task, db_taken_bkpt);
@@ -335,7 +335,7 @@ db_single_step_cmd(addr, have_addr, count, modif)
db_expr_t addr;
int have_addr;
db_expr_t count;
- char * modif;
+ const char * modif;
{
boolean_t print = FALSE;
@@ -363,7 +363,7 @@ db_trace_until_call_cmd(addr, have_addr, count, modif)
db_expr_t addr;
int have_addr;
db_expr_t count;
- char * modif;
+ const char * modif;
{
boolean_t print = FALSE;
@@ -386,7 +386,7 @@ db_trace_until_matching_cmd(addr, have_addr, count, modif)
db_expr_t addr;
int have_addr;
db_expr_t count;
- char * modif;
+ const char * modif;
{
boolean_t print = FALSE;
@@ -411,7 +411,7 @@ db_continue_cmd(addr, have_addr, count, modif)
db_expr_t addr;
int have_addr;
db_expr_t count;
- char * modif;
+ const char * modif;
{
if (modif[0] == 'c')
db_run_mode = STEP_COUNT;
diff --git a/ddb/db_run.h b/ddb/db_run.h
index 0c55279..c042d4c 100644
--- a/ddb/db_run.h
+++ b/ddb/db_run.h
@@ -46,27 +46,27 @@ extern void db_single_step(db_regs_t *regs, task_t task);
extern void db_single_step_cmd(
db_expr_t addr,
- int have_addr,
+ int have_addr,
db_expr_t count,
- char *modif);
+ const char *modif);
void db_trace_until_call_cmd(
db_expr_t addr,
int have_addr,
db_expr_t count,
- char * modif);
+ const char * modif);
void db_trace_until_matching_cmd(
db_expr_t addr,
int have_addr,
db_expr_t count,
- char * modif);
+ const char * modif);
void db_continue_cmd(
db_expr_t addr,
int have_addr,
db_expr_t count,
- char * modif);
+ const char * modif);
#ifndef db_set_single_step
void db_set_task_single_step(db_regs_t *, task_t);
@@ -74,7 +74,7 @@ void db_set_task_single_step(db_regs_t *, task_t);
#define db_set_task_single_step(regs, task) db_set_single_step(regs)
#endif
#ifndef db_clear_single_step
-void db_clear_task_single_step(db_regs_t *, task_t);
+void db_clear_task_single_step(const db_regs_t *, task_t);
#else
#define db_clear_task_single_step(regs, task) db_clear_single_step(regs)
#endif
diff --git a/ddb/db_sym.c b/ddb/db_sym.c
index e801e62..bbf14bd 100644
--- a/ddb/db_sym.c
+++ b/ddb/db_sym.c
@@ -90,8 +90,8 @@ db_add_symbol_table(type, start, end, name, ref, map_pointer)
*/
static char *
db_qualify(symname, symtabname)
- char *symname;
- char *symtabname;
+ const char *symname;
+ const char *symtabname;
{
static char tmp[256];
char *s;
@@ -108,7 +108,7 @@ db_qualify(symname, symtabname)
boolean_t
-db_eqname( char* src, char* dst, char c )
+db_eqname( const char* src, const char* dst, char c )
{
if (!strcmp(src, dst))
return (TRUE);
diff --git a/ddb/db_sym.h b/ddb/db_sym.h
index cb574dd..2c3e10a 100644
--- a/ddb/db_sym.h
+++ b/ddb/db_sym.h
@@ -161,7 +161,7 @@ extern void db_symbol_values( db_symtab_t *stab,
db_search_task_symbol(val,strgy,offp,0)
/* strcmp, modulo leading char */
-extern boolean_t db_eqname( char* src, char* dst, char c );
+extern boolean_t db_eqname( const char* src, const char* dst, char c );
/* print closest symbol to a value */
extern void db_task_printsym( db_addr_t off,
diff --git a/ddb/db_task_thread.c b/ddb/db_task_thread.c
index f420b8d..266b1ea 100644
--- a/ddb/db_task_thread.c
+++ b/ddb/db_task_thread.c
@@ -52,7 +52,7 @@ thread_t db_default_thread; /* default target thread */
*/
int
db_lookup_task(target_task)
- task_t target_task;
+ const task_t target_task;
{
task_t task;
int task_id;
@@ -82,8 +82,8 @@ db_lookup_task(target_task)
*/
int
db_lookup_task_thread(task, target_thread)
- task_t task;
- thread_t target_thread;
+ const task_t task;
+ const thread_t target_thread;
{
thread_t thread;
int thread_id;
@@ -106,7 +106,7 @@ db_lookup_task_thread(task, target_thread)
*/
int
db_lookup_thread(target_thread)
- thread_t target_thread;
+ const thread_t target_thread;
{
int thread_id;
task_t task;
@@ -139,7 +139,7 @@ db_lookup_thread(target_thread)
*/
boolean_t
db_check_thread_address_valid(thread)
- thread_t thread;
+ const thread_t thread;
{
if (db_lookup_thread(thread) < 0) {
db_printf("Bad thread address 0x%x\n", thread);
@@ -247,10 +247,10 @@ db_init_default_thread(void)
/* ARGSUSED */
void
db_set_default_thread(vp, valuep, flag, ap)
- struct db_variable *vp;
- db_expr_t *valuep;
- int flag;
- db_var_aux_param_t ap;
+ struct db_variable *vp;
+ db_expr_t *valuep;
+ int flag;
+ db_var_aux_param_t ap;
{
thread_t thread;
diff --git a/ddb/db_task_thread.h b/ddb/db_task_thread.h
index e6ae114..cbb3680 100644
--- a/ddb/db_task_thread.h
+++ b/ddb/db_task_thread.h
@@ -43,10 +43,10 @@
extern task_t db_default_task; /* default target task */
extern thread_t db_default_thread; /* default target thread */
-extern int db_lookup_task(task_t);
-extern int db_lookup_thread(thread_t);
-extern int db_lookup_task_thread(task_t, thread_t);
-extern boolean_t db_check_thread_address_valid(thread_t);
+extern int db_lookup_task(const task_t);
+extern int db_lookup_thread(const thread_t);
+extern int db_lookup_task_thread(const task_t, const thread_t);
+extern boolean_t db_check_thread_address_valid(const thread_t);
extern boolean_t db_get_next_thread(thread_t *, int);
extern void db_init_default_thread(void);
diff --git a/ddb/db_variables.c b/ddb/db_variables.c
index 9d77c0a..7f5a2c9 100644
--- a/ddb/db_variables.c
+++ b/ddb/db_variables.c
@@ -68,9 +68,9 @@ struct db_variable db_vars[] = {
};
struct db_variable *db_evars = db_vars + sizeof(db_vars)/sizeof(db_vars[0]);
-char *
+const char *
db_get_suffix(suffix, suffix_value)
- char *suffix;
+ const char *suffix;
short *suffix_value;
{
int value;
@@ -90,9 +90,10 @@ static boolean_t
db_cmp_variable_name(vp, name, ap)
struct db_variable *vp;
char *name;
- db_var_aux_param_t ap;
+ const db_var_aux_param_t ap;
{
- char *var_np, *np;
+ char *var_np;
+ const char *np;
int level;
for (np = name, var_np = vp->name; *var_np; ) {
diff --git a/ddb/db_watch.c b/ddb/db_watch.c
index 567040c..c8a4286 100644
--- a/ddb/db_watch.c
+++ b/ddb/db_watch.c
@@ -93,7 +93,7 @@ db_watchpoint_free(watch)
void
db_set_watchpoint(task, addr, size)
- task_t task;
+ const task_t task;
db_addr_t addr;
vm_size_t size;
{
@@ -130,7 +130,7 @@ db_set_watchpoint(task, addr, size)
void
db_delete_watchpoint(task, addr)
- task_t task;
+ const task_t task;
db_addr_t addr;
{
db_watchpoint_t watch;
@@ -179,7 +179,7 @@ db_list_watchpoints(void)
static int
db_get_task(modif, taskp, addr)
- char *modif;
+ const char *modif;
task_t *taskp;
db_addr_t addr;
{
@@ -221,7 +221,7 @@ db_deletewatch_cmd(addr, have_addr, count, modif)
db_expr_t addr;
int have_addr;
db_expr_t count;
- char * modif;
+ const char * modif;
{
task_t task;
@@ -237,7 +237,7 @@ db_watchpoint_cmd(addr, have_addr, count, modif)
db_expr_t addr;
int have_addr;
db_expr_t count;
- char * modif;
+ const char * modif;
{
vm_size_t size;
db_expr_t value;
diff --git a/ddb/db_watch.h b/ddb/db_watch.h
index 8e0f32f..7ef1a20 100644
--- a/ddb/db_watch.h
+++ b/ddb/db_watch.h
@@ -49,12 +49,12 @@ typedef struct db_watchpoint {
} *db_watchpoint_t;
extern boolean_t db_find_watchpoint(vm_map_t map, db_addr_t addr,
- db_regs_t *regs);
+ db_regs_t *regs);
extern void db_set_watchpoints(void);
extern void db_clear_watchpoints(void);
-extern void db_set_watchpoint(task_t task, db_addr_t addr, vm_size_t size);
-extern void db_delete_watchpoint(task_t task, db_addr_t addr);
+extern void db_set_watchpoint(const task_t task, db_addr_t addr, vm_size_t size);
+extern void db_delete_watchpoint(const task_t task, db_addr_t addr);
extern void db_list_watchpoints(void);
void db_listwatch_cmd(void);
@@ -63,13 +63,13 @@ void db_deletewatch_cmd(
db_expr_t addr,
int have_addr,
db_expr_t count,
- char * modif);
+ const char * modif);
void db_watchpoint_cmd(
db_expr_t addr,
int have_addr,
db_expr_t count,
- char * modif);
+ const char * modif);
#endif /* _DDB_DB_WATCH_ */
diff --git a/ddb/db_write_cmd.c b/ddb/db_write_cmd.c
index 1908005..46a2ee3 100644
--- a/ddb/db_write_cmd.c
+++ b/ddb/db_write_cmd.c
@@ -55,7 +55,7 @@ db_write_cmd(address, have_addr, count, modif)
db_expr_t address;
boolean_t have_addr;
db_expr_t count;
- char * modif;
+ const char * modif;
{
db_addr_t addr;
db_expr_t old_value;
diff --git a/ddb/db_write_cmd.h b/ddb/db_write_cmd.h
index 056be47..3a1d057 100644
--- a/ddb/db_write_cmd.h
+++ b/ddb/db_write_cmd.h
@@ -29,6 +29,6 @@ void db_write_cmd(
db_expr_t address,
boolean_t have_addr,
db_expr_t count,
- char * modif);
+ const char * modif);
#endif /* !_DDB_DB_WRITE_CMD_H_ */