summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1994-09-27 03:34:58 +0000
committerphk <phk@FreeBSD.org>1994-09-27 03:34:58 +0000
commite3b14acab7e9a3aedcf6751cd26aed7450d1c6bf (patch)
treeb13b160261863493c90b5ffb69d4f2d9d57071f0 /sys
parent9a50506be21f7810ce5e0f5fbd506fe396ded066 (diff)
downloadFreeBSD-src-e3b14acab7e9a3aedcf6751cd26aed7450d1c6bf.zip
FreeBSD-src-e3b14acab7e9a3aedcf6751cd26aed7450d1c6bf.tar.gz
Makes gcc silent in sys/ddb.
Diffstat (limited to 'sys')
-rw-r--r--sys/ddb/db_aout.c17
-rw-r--r--sys/ddb/db_output.c17
-rw-r--r--sys/ddb/db_output.h3
-rw-r--r--sys/ddb/db_print.c3
-rw-r--r--sys/ddb/db_sym.c15
-rw-r--r--sys/ddb/db_sym.h4
-rw-r--r--sys/ddb/db_variables.c3
7 files changed, 30 insertions, 32 deletions
diff --git a/sys/ddb/db_aout.c b/sys/ddb/db_aout.c
index 7e146b4..b704ded 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.7 1994/08/13 03:49:14 wollman Exp $
+ * $Id: db_aout.c,v 1.8 1994/09/05 14:04:56 bde Exp $
*/
/*
@@ -172,12 +172,14 @@ X_db_search_symbol(symtab, off, strategy, diffp)
if (off - sp->n_value < diff) {
diff = off - sp->n_value;
symp = sp;
- if (diff == 0 &&
- (strategy == DB_STGY_PROC &&
- sp->n_type == (N_TEXT|N_EXT) ||
- strategy == DB_STGY_ANY &&
- (sp->n_type & N_EXT)))
- break;
+ if (diff == 0) {
+ if (strategy == DB_STGY_PROC &&
+ sp->n_type == (N_TEXT|N_EXT))
+ break;
+ if (strategy == DB_STGY_ANY &&
+ (sp->n_type & N_EXT))
+ break;
+ }
}
else if (off - sp->n_value == diff) {
if (symp == 0)
@@ -225,7 +227,6 @@ X_db_line_at_pc(symtab, cursym, filename, linenum, off)
db_expr_t off;
{
register struct nlist *sp, *ep;
- register struct nlist *sym = (struct nlist *)cursym;
unsigned long sodiff = -1UL, lndiff = -1UL, ln = 0;
char *fname = NULL;
diff --git a/sys/ddb/db_output.c b/sys/ddb/db_output.c
index f2b14e4..5fa5cb8 100644
--- a/sys/ddb/db_output.c
+++ b/sys/ddb/db_output.c
@@ -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.7 1994/08/13 03:49:21 wollman Exp $
+ * $Id: db_output.c,v 1.8 1994/08/27 16:14:09 davidg Exp $
*/
/*
@@ -251,13 +251,14 @@ reswitch: switch (ch = *(u_char *)fmt++) {
case 'b':
ul = va_arg(ap, int);
p = va_arg(ap, char *);
- for (p = db_ksprintn(ul, *p++, NULL); ch = *p--;)
- db_putchar(ch);
+ for (p = db_ksprintn(ul, *p++, NULL); *p;p--)
+ db_putchar(*p);
if (!ul)
break;
- for (tmp = 0; n = *p++;) {
+ for (tmp = 0; *p;) {
+ n = *p++;
if (ul & (1 << (n - 1))) {
db_putchar(tmp ? ',' : '<');
for (; (n = *p) > ' '; ++p)
@@ -285,8 +286,8 @@ reswitch: switch (ch = *(u_char *)fmt++) {
if (!ladjust && width > 0)
while (width--)
db_putchar (padc);
- while (ch = *p++)
- db_putchar(ch);
+ for (;*p;p++)
+ db_putchar(*p);
if (ladjust && width > 0)
while (width--)
db_putchar (padc);
@@ -361,8 +362,8 @@ number: p = (char *)db_ksprintn(ul, base, &tmp);
while (width--)
db_putchar(padc);
- while (ch = *p--)
- db_putchar(ch);
+ for (;*p;p--)
+ db_putchar(*p);
break;
default:
db_putchar('%');
diff --git a/sys/ddb/db_output.h b/sys/ddb/db_output.h
index 3969a34..2ce3a5e 100644
--- a/sys/ddb/db_output.h
+++ b/sys/ddb/db_output.h
@@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: db_output.h,v 1.3 1993/11/07 17:39:24 wollman Exp $
+ * $Id: db_output.h,v 1.4 1993/11/25 01:30:09 wollman Exp $
*/
#ifndef _DDB_DB_OUTPUT_H_
@@ -41,4 +41,5 @@
extern void db_force_whitespace();
extern int db_print_position();
extern void db_end_line();
+extern void db_printf(char *,...);
#endif /* _DDB_DB_OUTPUT_H_ */
diff --git a/sys/ddb/db_print.c b/sys/ddb/db_print.c
index a0694b0..e9a9fd3 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.4 1994/08/13 03:49:21 wollman Exp $
+ * $Id: db_print.c,v 1.5 1994/08/18 22:34:25 wollman Exp $
*/
/*
@@ -47,7 +47,6 @@
void
db_show_regs(db_expr_t dummy1, int dummy2, db_expr_t dummy3, char *dummy4)
{
- int (*func)();
register struct db_variable *regp;
db_expr_t value, offset;
char * name;
diff --git a/sys/ddb/db_sym.c b/sys/ddb/db_sym.c
index 5588c77..0fd37f4 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.5 1994/08/13 03:49:23 wollman Exp $
+ * $Id: db_sym.c,v 1.6 1994/08/20 03:48:26 davidg Exp $
*/
/*
@@ -93,15 +93,11 @@ db_qualify(sym, symtabname)
{
char *symname;
static char tmp[256];
- register char *s;
db_symbol_values(sym, &symname, 0);
- s = tmp;
- while (*s++ = *symtabname++) {
- }
- s[-1] = ':';
- while (*s++ = *symname++) {
- }
+ strcpy(tmp,symtabname);
+ strcat(tmp,":");
+ strcat(tmp,symname);
return tmp;
}
@@ -176,7 +172,8 @@ db_lookup(symstr)
* Return on first match.
*/
for (i = symtab_start; i < symtab_end; i++) {
- if (sp = X_db_lookup(&db_symtabs[i], symstr)) {
+ sp = X_db_lookup(&db_symtabs[i], symstr);
+ if (sp) {
db_last_symtab = &db_symtabs[i];
return sp;
}
diff --git a/sys/ddb/db_sym.h b/sys/ddb/db_sym.h
index 9b610c5..661f16b 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.4 1994/08/18 22:34:26 wollman Exp $
+ * $Id: db_sym.h,v 1.5 1994/08/20 03:48:27 davidg Exp $
*/
#ifndef _DDB_DB_SYM_H_
@@ -97,6 +97,6 @@ extern int db_eqname(/* char*, char*, char */);
extern void db_printsym(/* db_expr_t, db_strategy_t */);
/* print closest symbol to a value */
extern boolean_t db_line_at_pc(db_sym_t, char **, int *, db_expr_t);
-extern int X_db_sym_nymargs(db_symtab_t *, db_sym_t, int *, char **);
+extern int X_db_sym_numargs(db_symtab_t *, db_sym_t, int *, char **);
#endif /* _DDB_DB_SYM_H_ */
diff --git a/sys/ddb/db_variables.c b/sys/ddb/db_variables.c
index 4a6acf2..b803e5b 100644
--- a/sys/ddb/db_variables.c
+++ b/sys/ddb/db_variables.c
@@ -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.4 1994/08/13 03:49:25 wollman Exp $
+ * $Id: db_variables.c,v 1.5 1994/08/18 22:34:27 wollman Exp $
*/
/*
@@ -134,7 +134,6 @@ void
db_set_cmd(db_expr_t dummy1, int dummy2, db_expr_t dummy3, char *dummy4)
{
db_expr_t value;
- int (*func)();
struct db_variable *vp;
int t;
OpenPOWER on IntegriCloud