Fixed bogus type of valuep in struct db_variable. It was `int *' and

became `long *' for alpha, but should always have been `db_expr_t *'.
Fixed variable types to match.
This commit is contained in:
Bruce Evans 1998-07-08 09:11:43 +00:00
parent e809645c27
commit 3da6ef3c3a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=37504
10 changed files with 57 additions and 56 deletions

View File

@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
* $Id: db_trace.c,v 1.27 1997/11/20 18:24:52 bde Exp $
* $Id: db_trace.c,v 1.28 1998/06/07 17:09:59 dfr Exp $
*/
#include <sys/param.h>
@ -44,24 +44,24 @@
* Machine register set.
*/
struct db_variable db_regs[] = {
"cs", (long *)&ddb_regs.tf_cs, FCN_NULL,
"ds", (long *)&ddb_regs.tf_ds, FCN_NULL,
"es", (long *)&ddb_regs.tf_es, FCN_NULL,
"cs", &ddb_regs.tf_cs, FCN_NULL,
"ds", &ddb_regs.tf_ds, FCN_NULL,
"es", &ddb_regs.tf_es, FCN_NULL,
#if 0
"fs", (long *)&ddb_regs.tf_fs, FCN_NULL,
"gs", (long *)&ddb_regs.tf_gs, FCN_NULL,
"fs", &ddb_regs.tf_fs, FCN_NULL,
"gs", &ddb_regs.tf_gs, FCN_NULL,
#endif
"ss", (long *)&ddb_regs.tf_ss, FCN_NULL,
"eax", (long *)&ddb_regs.tf_eax, FCN_NULL,
"ecx", (long *)&ddb_regs.tf_ecx, FCN_NULL,
"edx", (long *)&ddb_regs.tf_edx, FCN_NULL,
"ebx", (long *)&ddb_regs.tf_ebx, FCN_NULL,
"esp", (long *)&ddb_regs.tf_esp,FCN_NULL,
"ebp", (long *)&ddb_regs.tf_ebp, FCN_NULL,
"esi", (long *)&ddb_regs.tf_esi, FCN_NULL,
"edi", (long *)&ddb_regs.tf_edi, FCN_NULL,
"eip", (long *)&ddb_regs.tf_eip, FCN_NULL,
"efl", (long *)&ddb_regs.tf_eflags, FCN_NULL,
"ss", &ddb_regs.tf_ss, FCN_NULL,
"eax", &ddb_regs.tf_eax, FCN_NULL,
"ecx", &ddb_regs.tf_ecx, FCN_NULL,
"edx", &ddb_regs.tf_edx, FCN_NULL,
"ebx", &ddb_regs.tf_ebx, FCN_NULL,
"esp", &ddb_regs.tf_esp, FCN_NULL,
"ebp", &ddb_regs.tf_ebp, FCN_NULL,
"esi", &ddb_regs.tf_esi, FCN_NULL,
"edi", &ddb_regs.tf_edi, FCN_NULL,
"eip", &ddb_regs.tf_eip, FCN_NULL,
"efl", &ddb_regs.tf_eflags, FCN_NULL,
};
struct db_variable *db_eregs = db_regs + sizeof(db_regs)/sizeof(db_regs[0]);

View File

@ -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.15 1998/06/07 17:09:37 dfr Exp $
* $Id: db_lex.c,v 1.16 1998/06/27 15:40:56 dfr Exp $
*/
/*
@ -114,10 +114,10 @@ db_read_token()
return (t);
}
long db_tok_number;
db_expr_t db_tok_number;
char db_tok_string[TOK_STRING_SIZE];
long db_radix = 16;
db_expr_t db_radix = 16;
void
db_flush_lex()

View File

@ -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.9 1997/02/22 09:28:25 peter Exp $
* $Id: db_lex.h,v 1.10 1998/06/27 15:40:56 dfr Exp $
*/
#ifndef _DDB_DB_LEX_H_
@ -41,7 +41,7 @@ int db_read_line __P((void));
int db_read_token __P((void));
void db_unread_token __P((int t));
extern long db_tok_number;
extern db_expr_t db_tok_number;
#define TOK_STRING_SIZE 120
extern char db_tok_string[TOK_STRING_SIZE];

View File

@ -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.22 1997/04/01 14:31:06 bde Exp $
* $Id: db_output.c,v 1.23 1998/06/07 17:09:37 dfr Exp $
*/
/*
@ -58,10 +58,10 @@
*/
static int db_output_position = 0; /* output column */
static int db_last_non_space = 0; /* last non-space character */
long db_tab_stop_width = 8; /* how wide are tab stops? */
db_expr_t 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)
long db_max_width = 79; /* output line width */
db_expr_t db_max_width = 79; /* output line width */
static void db_putchar __P((int c, void *arg));

View File

@ -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.20 1998/06/10 10:56:11 dfr Exp $
* $Id: db_print.c,v 1.21 1998/07/08 06:43:54 bde Exp $
*/
/*
@ -55,7 +55,8 @@ db_show_regs(dummy1, dummy2, dummy3, dummy4)
db_read_variable(regp, &value);
db_printf("%-12s%#10ln", regp->name, (unsigned long)value);
db_find_xtrn_sym_and_offset((db_addr_t)value, &name, &offset);
if (name != 0 && offset <= db_maxoff && offset != value) {
if (name != 0 && offset <= (unsigned long)db_maxoff &&
offset != value) {
db_printf("\t%s", name);
if (offset != 0)
db_printf("+%+#n", offset);

View File

@ -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.23 1998/06/28 00:55:00 dfr Exp $
* $Id: db_sym.c,v 1.24 1998/07/08 06:43:56 bde Exp $
*/
/*
@ -281,7 +281,7 @@ db_symbol_values(sym, namep, valuep)
* not accept symbols whose value is "small" (and use plain hex).
*/
unsigned long db_maxoff = 0x10000;
db_expr_t db_maxoff = 0x10000;
void
db_printsym(off, strategy)
@ -303,7 +303,7 @@ db_printsym(off, strategy)
db_printf("%+#ln", (long)off);
return;
}
if (name == 0 || d >= db_maxoff) {
if (name == 0 || d >= (unsigned long)db_maxoff) {
db_printf("%#ln", (unsigned long)off);
return;
}

View File

@ -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.14 1997/06/14 11:52:37 bde Exp $
* $Id: db_variables.c,v 1.15 1998/06/07 17:09:38 dfr Exp $
*/
/*
@ -46,7 +46,7 @@ static int db_set_variable __P((db_expr_t value));
static struct db_variable db_vars[] = {
{ "radix", &db_radix, FCN_NULL },
{ "maxoff", (long *)&db_maxoff, FCN_NULL },
{ "maxoff", &db_maxoff, FCN_NULL },
{ "maxwidth", &db_max_width, FCN_NULL },
{ "tabstops", &db_tab_stop_width, FCN_NULL },
};

View File

@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
* $Id: db_variables.h,v 1.8 1997/06/30 23:54:50 bde Exp $
* $Id: db_variables.h,v 1.9 1998/06/07 17:09:38 dfr Exp $
*/
/*
@ -42,7 +42,7 @@ typedef int db_varfcn_t __P((struct db_variable *vp, db_expr_t *valuep,
int op));
struct db_variable {
char *name; /* Name of variable */
long *valuep; /* value of variable */
db_expr_t *valuep; /* value of variable */
/* function to call when reading/writing */
db_varfcn_t *fcn;
#define DB_VAR_GET 0

View File

@ -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.17 1998/05/19 18:42:09 phk Exp $
* $Id: ddb.h,v 1.18 1998/06/07 17:09:38 dfr Exp $
*/
/*
@ -66,14 +66,14 @@ func_name(addr, have_addr, count, modif) \
char *modif;
extern char *esym;
extern unsigned long db_maxoff;
extern db_expr_t db_maxoff;
extern int db_indent;
extern int db_inst_count;
extern int db_load_count;
extern int db_store_count;
extern long db_radix;
extern long db_max_width;
extern long db_tab_stop_width;
extern db_expr_t db_radix;
extern db_expr_t db_max_width;
extern db_expr_t db_tab_stop_width;
struct vm_map;

View File

@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
* $Id: db_trace.c,v 1.27 1997/11/20 18:24:52 bde Exp $
* $Id: db_trace.c,v 1.28 1998/06/07 17:09:59 dfr Exp $
*/
#include <sys/param.h>
@ -44,24 +44,24 @@
* Machine register set.
*/
struct db_variable db_regs[] = {
"cs", (long *)&ddb_regs.tf_cs, FCN_NULL,
"ds", (long *)&ddb_regs.tf_ds, FCN_NULL,
"es", (long *)&ddb_regs.tf_es, FCN_NULL,
"cs", &ddb_regs.tf_cs, FCN_NULL,
"ds", &ddb_regs.tf_ds, FCN_NULL,
"es", &ddb_regs.tf_es, FCN_NULL,
#if 0
"fs", (long *)&ddb_regs.tf_fs, FCN_NULL,
"gs", (long *)&ddb_regs.tf_gs, FCN_NULL,
"fs", &ddb_regs.tf_fs, FCN_NULL,
"gs", &ddb_regs.tf_gs, FCN_NULL,
#endif
"ss", (long *)&ddb_regs.tf_ss, FCN_NULL,
"eax", (long *)&ddb_regs.tf_eax, FCN_NULL,
"ecx", (long *)&ddb_regs.tf_ecx, FCN_NULL,
"edx", (long *)&ddb_regs.tf_edx, FCN_NULL,
"ebx", (long *)&ddb_regs.tf_ebx, FCN_NULL,
"esp", (long *)&ddb_regs.tf_esp,FCN_NULL,
"ebp", (long *)&ddb_regs.tf_ebp, FCN_NULL,
"esi", (long *)&ddb_regs.tf_esi, FCN_NULL,
"edi", (long *)&ddb_regs.tf_edi, FCN_NULL,
"eip", (long *)&ddb_regs.tf_eip, FCN_NULL,
"efl", (long *)&ddb_regs.tf_eflags, FCN_NULL,
"ss", &ddb_regs.tf_ss, FCN_NULL,
"eax", &ddb_regs.tf_eax, FCN_NULL,
"ecx", &ddb_regs.tf_ecx, FCN_NULL,
"edx", &ddb_regs.tf_edx, FCN_NULL,
"ebx", &ddb_regs.tf_ebx, FCN_NULL,
"esp", &ddb_regs.tf_esp, FCN_NULL,
"ebp", &ddb_regs.tf_ebp, FCN_NULL,
"esi", &ddb_regs.tf_esi, FCN_NULL,
"edi", &ddb_regs.tf_edi, FCN_NULL,
"eip", &ddb_regs.tf_eip, FCN_NULL,
"efl", &ddb_regs.tf_eflags, FCN_NULL,
};
struct db_variable *db_eregs = db_regs + sizeof(db_regs)/sizeof(db_regs[0]);