diff options
author | bde <bde@FreeBSD.org> | 1998-07-08 10:53:58 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1998-07-08 10:53:58 +0000 |
commit | c9efed72bc8dec26d2f4b9e8e0f798fd6c0b09a4 (patch) | |
tree | 80c572fd7be896b8222146b062af0b33e4651633 /sys | |
parent | b5d9d2e7066642affdab55e8415242ac5619218d (diff) | |
download | FreeBSD-src-c9efed72bc8dec26d2f4b9e8e0f798fd6c0b09a4.zip FreeBSD-src-c9efed72bc8dec26d2f4b9e8e0f798fd6c0b09a4.tar.gz |
Use not-so-new printf formats %r and/or %z instead of %n and/or %+x.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/amd64/db_disasm.c | 18 | ||||
-rw-r--r-- | sys/amd64/amd64/db_trace.c | 10 | ||||
-rw-r--r-- | sys/ddb/db_command.c | 4 | ||||
-rw-r--r-- | sys/ddb/db_examine.c | 10 | ||||
-rw-r--r-- | sys/ddb/db_print.c | 6 | ||||
-rw-r--r-- | sys/ddb/db_sym.c | 8 | ||||
-rw-r--r-- | sys/ddb/db_write_cmd.c | 4 | ||||
-rw-r--r-- | sys/i386/i386/db_disasm.c | 18 | ||||
-rw-r--r-- | sys/i386/i386/db_trace.c | 10 |
9 files changed, 44 insertions, 44 deletions
diff --git a/sys/amd64/amd64/db_disasm.c b/sys/amd64/amd64/db_disasm.c index 2599b30..0917ba0 100644 --- a/sys/amd64/amd64/db_disasm.c +++ b/sys/amd64/amd64/db_disasm.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_disasm.c,v 1.19 1997/02/22 09:32:12 peter Exp $ + * $Id: db_disasm.c,v 1.20 1997/04/01 16:22:31 bde Exp $ */ /* @@ -1327,43 +1327,43 @@ db_disasm(loc, altfmt) case I: len = db_lengths[size]; get_value_inc(imm, loc, len, FALSE); - db_printf("$%#n", imm); + db_printf("$%#r", imm); break; case Is: len = db_lengths[size]; get_value_inc(imm, loc, len, FALSE); - db_printf("$%+#n", imm); + db_printf("$%+#r", imm); break; case Ib: get_value_inc(imm, loc, 1, FALSE); - db_printf("$%#n", imm); + db_printf("$%#r", imm); break; case Iba: get_value_inc(imm, loc, 1, FALSE); if (imm != 0x0a) - db_printf("$%#n", imm); + db_printf("$%#r", imm); break; case Ibs: get_value_inc(imm, loc, 1, TRUE); if (size == WORD) imm &= 0xFFFF; - db_printf("$%+#n", imm); + db_printf("$%+#r", imm); break; case Iw: get_value_inc(imm, loc, 2, FALSE); - db_printf("$%#n", imm); + db_printf("$%#r", imm); break; case O: len = (short_addr ? 2 : 4); get_value_inc(displ, loc, len, FALSE); if (seg) - db_printf("%s:%+#n",seg, displ); + db_printf("%s:%+#r",seg, displ); else db_printsym((db_addr_t)displ, DB_STGY_ANY); break; @@ -1397,7 +1397,7 @@ db_disasm(loc, altfmt) len = db_lengths[size]; get_value_inc(imm, loc, len, FALSE); /* offset */ get_value_inc(imm2, loc, 2, FALSE); /* segment */ - db_printf("$%#n,%#n", imm2, imm); + db_printf("$%#r,%#r", imm2, imm); break; } } diff --git a/sys/amd64/amd64/db_trace.c b/sys/amd64/amd64/db_trace.c index 74417df..c5af5bf 100644 --- a/sys/amd64/amd64/db_trace.c +++ b/sys/amd64/amd64/db_trace.c @@ -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.28 1998/06/07 17:09:59 dfr Exp $ + * $Id: db_trace.c,v 1.29 1998/07/08 09:11:43 bde Exp $ */ #include <sys/param.h> @@ -128,7 +128,7 @@ db_print_stack_entry(name, narg, argnp, argp, callpc) while (narg) { if (argnp) db_printf("%s=", *argnp++); - db_printf("%n", db_get_value((int)argp, 4, FALSE)); + db_printf("%r", db_get_value((int)argp, 4, FALSE)); argp++; if (--narg != 0) db_printf(","); @@ -197,7 +197,7 @@ db_nextframe(fp, ip) eip = tf->tf_eip; ebp = tf->tf_ebp; db_printf( - "--- trap %#n, eip = %#n, esp = %#n, ebp = %#n ---\n", + "--- trap %#r, eip = %#r, esp = %#r, ebp = %#r ---\n", tf->tf_trapno, eip, esp, ebp); } break; @@ -206,7 +206,7 @@ db_nextframe(fp, ip) eip = tf->tf_eip; ebp = tf->tf_ebp; db_printf( - "--- syscall %#n, eip = %#n, esp = %#n, ebp = %#n ---\n", + "--- syscall %#r, eip = %#r, esp = %#r, ebp = %#r ---\n", tf->tf_eax, eip, esp, ebp); } break; @@ -216,7 +216,7 @@ db_nextframe(fp, ip) eip = tf->tf_eip; ebp = tf->tf_ebp; db_printf( - "--- interrupt, eip = %#n, esp = %#n, ebp = %#n ---\n", + "--- interrupt, eip = %#r, esp = %#r, ebp = %#r ---\n", eip, esp, ebp); } break; diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c index 9b84481..1a44450 100644 --- a/sys/ddb/db_command.c +++ b/sys/ddb/db_command.c @@ -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.26 1998/05/19 11:02:22 phk Exp $ + * $Id: db_command.c,v 1.27 1998/05/19 18:42:03 phk Exp $ */ /* @@ -530,7 +530,7 @@ db_fncall(dummy1, dummy2, dummy3, dummy4) retval = (*func)(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7], args[8], args[9] ); - db_printf("%#n\n", retval); + db_printf("%#r\n", retval); } /* Enter GDB remote protocol debugger on the next trap. */ diff --git a/sys/ddb/db_examine.c b/sys/ddb/db_examine.c index 9dd9d09..464197d 100644 --- a/sys/ddb/db_examine.c +++ b/sys/ddb/db_examine.c @@ -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.22 1998/07/05 10:10:33 dfr Exp $ + * $Id: db_examine.c,v 1.23 1998/07/08 06:27:22 bde Exp $ */ /* @@ -120,7 +120,7 @@ db_examine(addr, fmt, count) case 'r': /* signed, current radix */ value = db_get_value(addr, size, TRUE); addr += size; - db_printf("%+-*n", width, value); + db_printf("%+-*r", width, value); break; case 'x': /* unsigned hex */ value = db_get_value(addr, size, FALSE); @@ -130,7 +130,7 @@ db_examine(addr, fmt, count) case 'z': /* signed hex */ value = db_get_value(addr, size, TRUE); addr += size; - db_printf("%+-*x", width, value); + db_printf("%-*z", width, value); break; case 'd': /* signed decimal */ value = db_get_value(addr, size, TRUE); @@ -208,13 +208,13 @@ db_print_cmd(addr, have_addr, count, modif) db_printsym((db_addr_t)addr, DB_STGY_ANY); break; case 'r': - db_printf("%+11ln", (long)addr); + db_printf("%+11lr", (long)addr); break; case 'x': db_printf("%8lx", (unsigned long)addr); break; case 'z': - db_printf("%+8lx", (long)addr); + db_printf("%8lz", (long)addr); break; case 'd': db_printf("%11ld", (long)addr); diff --git a/sys/ddb/db_print.c b/sys/ddb/db_print.c index 86e95b6..5fe4b53 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.21 1998/07/08 06:43:54 bde Exp $ + * $Id: db_print.c,v 1.22 1998/07/08 09:11:37 bde Exp $ */ /* @@ -53,13 +53,13 @@ db_show_regs(dummy1, dummy2, dummy3, dummy4) for (regp = db_regs; regp < db_eregs; regp++) { db_read_variable(regp, &value); - db_printf("%-12s%#10ln", regp->name, (unsigned long)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 && offset != value) { db_printf("\t%s", name); if (offset != 0) - db_printf("+%+#n", offset); + db_printf("+%+#r", offset); } db_printf("\n"); } diff --git a/sys/ddb/db_sym.c b/sys/ddb/db_sym.c index 3b1dd2e..60d48ec 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.24 1998/07/08 06:43:56 bde Exp $ + * $Id: db_sym.c,v 1.25 1998/07/08 09:11:38 bde Exp $ */ /* @@ -300,16 +300,16 @@ db_printsym(off, strategy) if (name == 0) value = off; if (value >= DB_SMALL_VALUE_MIN && value <= DB_SMALL_VALUE_MAX) { - db_printf("%+#ln", (long)off); + db_printf("%+#lr", (long)off); return; } if (name == 0 || d >= (unsigned long)db_maxoff) { - db_printf("%#ln", (unsigned long)off); + db_printf("%#lr", (unsigned long)off); return; } db_printf("%s", name); if (d) - db_printf("+%+#n", d); + db_printf("+%+#r", d); if (strategy == DB_STGY_PROC) { if (db_line_at_pc(cursym, &filename, &linenum, off)) db_printf(" [%s:%d]", filename, linenum); diff --git a/sys/ddb/db_write_cmd.c b/sys/ddb/db_write_cmd.c index 9881234..26ae37b 100644 --- a/sys/ddb/db_write_cmd.c +++ b/sys/ddb/db_write_cmd.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_write_cmd.c,v 1.9 1997/02/22 09:28:34 peter Exp $ + * $Id: db_write_cmd.c,v 1.10 1997/06/14 11:52:37 bde Exp $ */ /* @@ -78,7 +78,7 @@ db_write_cmd(address, have_addr, count, modif) while (db_expression(&new_value)) { old_value = db_get_value(addr, size, FALSE); db_printsym(addr, DB_STGY_ANY); - db_printf("\t\t%#8n\t=\t%#8n\n", old_value, new_value); + db_printf("\t\t%#8r\t=\t%#8r\n", old_value, new_value); db_put_value(addr, size, new_value); addr += size; diff --git a/sys/i386/i386/db_disasm.c b/sys/i386/i386/db_disasm.c index 2599b30..0917ba0 100644 --- a/sys/i386/i386/db_disasm.c +++ b/sys/i386/i386/db_disasm.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_disasm.c,v 1.19 1997/02/22 09:32:12 peter Exp $ + * $Id: db_disasm.c,v 1.20 1997/04/01 16:22:31 bde Exp $ */ /* @@ -1327,43 +1327,43 @@ db_disasm(loc, altfmt) case I: len = db_lengths[size]; get_value_inc(imm, loc, len, FALSE); - db_printf("$%#n", imm); + db_printf("$%#r", imm); break; case Is: len = db_lengths[size]; get_value_inc(imm, loc, len, FALSE); - db_printf("$%+#n", imm); + db_printf("$%+#r", imm); break; case Ib: get_value_inc(imm, loc, 1, FALSE); - db_printf("$%#n", imm); + db_printf("$%#r", imm); break; case Iba: get_value_inc(imm, loc, 1, FALSE); if (imm != 0x0a) - db_printf("$%#n", imm); + db_printf("$%#r", imm); break; case Ibs: get_value_inc(imm, loc, 1, TRUE); if (size == WORD) imm &= 0xFFFF; - db_printf("$%+#n", imm); + db_printf("$%+#r", imm); break; case Iw: get_value_inc(imm, loc, 2, FALSE); - db_printf("$%#n", imm); + db_printf("$%#r", imm); break; case O: len = (short_addr ? 2 : 4); get_value_inc(displ, loc, len, FALSE); if (seg) - db_printf("%s:%+#n",seg, displ); + db_printf("%s:%+#r",seg, displ); else db_printsym((db_addr_t)displ, DB_STGY_ANY); break; @@ -1397,7 +1397,7 @@ db_disasm(loc, altfmt) len = db_lengths[size]; get_value_inc(imm, loc, len, FALSE); /* offset */ get_value_inc(imm2, loc, 2, FALSE); /* segment */ - db_printf("$%#n,%#n", imm2, imm); + db_printf("$%#r,%#r", imm2, imm); break; } } diff --git a/sys/i386/i386/db_trace.c b/sys/i386/i386/db_trace.c index 74417df..c5af5bf 100644 --- a/sys/i386/i386/db_trace.c +++ b/sys/i386/i386/db_trace.c @@ -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.28 1998/06/07 17:09:59 dfr Exp $ + * $Id: db_trace.c,v 1.29 1998/07/08 09:11:43 bde Exp $ */ #include <sys/param.h> @@ -128,7 +128,7 @@ db_print_stack_entry(name, narg, argnp, argp, callpc) while (narg) { if (argnp) db_printf("%s=", *argnp++); - db_printf("%n", db_get_value((int)argp, 4, FALSE)); + db_printf("%r", db_get_value((int)argp, 4, FALSE)); argp++; if (--narg != 0) db_printf(","); @@ -197,7 +197,7 @@ db_nextframe(fp, ip) eip = tf->tf_eip; ebp = tf->tf_ebp; db_printf( - "--- trap %#n, eip = %#n, esp = %#n, ebp = %#n ---\n", + "--- trap %#r, eip = %#r, esp = %#r, ebp = %#r ---\n", tf->tf_trapno, eip, esp, ebp); } break; @@ -206,7 +206,7 @@ db_nextframe(fp, ip) eip = tf->tf_eip; ebp = tf->tf_ebp; db_printf( - "--- syscall %#n, eip = %#n, esp = %#n, ebp = %#n ---\n", + "--- syscall %#r, eip = %#r, esp = %#r, ebp = %#r ---\n", tf->tf_eax, eip, esp, ebp); } break; @@ -216,7 +216,7 @@ db_nextframe(fp, ip) eip = tf->tf_eip; ebp = tf->tf_ebp; db_printf( - "--- interrupt, eip = %#n, esp = %#n, ebp = %#n ---\n", + "--- interrupt, eip = %#r, esp = %#r, ebp = %#r ---\n", eip, esp, ebp); } break; |