diff options
author | Andrew Cagney <cagney@redhat.com> | 2001-10-24 02:53:48 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2001-10-24 02:53:48 +0000 |
commit | ce4148445e05aaf721403c78d72df187a11c4461 (patch) | |
tree | 6814566c503fce2351fb93d6e05f72c32687f441 /gdb | |
parent | 8f236061d95d934a70b505449f6235bbfaa90270 (diff) | |
download | gdb-ce4148445e05aaf721403c78d72df187a11c4461.zip gdb-ce4148445e05aaf721403c78d72df187a11c4461.tar.gz gdb-ce4148445e05aaf721403c78d72df187a11c4461.tar.bz2 |
Fix -Wformat for hpux.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/hp-psymtab-read.c | 4 | ||||
-rw-r--r-- | gdb/hppa-tdep.c | 35 | ||||
-rw-r--r-- | gdb/hppah-nat.c | 6 |
4 files changed, 29 insertions, 21 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7d2ee0a..1a57cca 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +Tue Oct 23 18:59:42 2001 Andrew Cagney <cagney@redhat.com> + + * hp-psymtab-read.c, hppah-nat.c, hppa-tdep.c: Fix -Wformat + problems. + Tue Oct 23 14:16:10 2001 Andrew Cagney <cagney@redhat.com> * somsolib.c (som_solib_add): Use core_addr_to_host_pointer. diff --git a/gdb/hp-psymtab-read.c b/gdb/hp-psymtab-read.c index 4ffc0b3..349ab18 100644 --- a/gdb/hp-psymtab-read.c +++ b/gdb/hp-psymtab-read.c @@ -865,8 +865,8 @@ hpread_quick_traverse (struct objfile *objfile, char *gntt_bits, (CURR_MODULE_END == 0) || (CURR_MODULE_END == -1))) { TELL_OBJFILE; - warning ("Module \"%s\" [0x%x] has non-standard addresses. It starts at 0x%x, ends at 0x%x, and will be skipped.", - mod_name_string, curr_md, start_adr, end_adr); + warning ("Module \"%s\" [0x%s] has non-standard addresses. It starts at 0x%s, ends at 0x%s, and will be skipped.", + mod_name_string, paddr_nz (curr_md), paddr_nz (start_adr), paddr_nz (end_adr)); /* On to next module */ curr_md++; } diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index 8c89007..3806be2 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -2498,15 +2498,15 @@ pa_do_registers_info (int regnum, int fpregs) if (!is_pa_2) { - printf_unfiltered ("%s %x\n", REGISTER_NAME (regnum), reg_val[1]); + printf_unfiltered ("%s %lx\n", REGISTER_NAME (regnum), reg_val[1]); } else { /* Fancy % formats to prevent leading zeros. */ if (reg_val[0] == 0) - printf_unfiltered ("%s %x\n", REGISTER_NAME (regnum), reg_val[1]); + printf_unfiltered ("%s %lx\n", REGISTER_NAME (regnum), reg_val[1]); else - printf_unfiltered ("%s %x%8.8x\n", REGISTER_NAME (regnum), + printf_unfiltered ("%s %lx%8.8lx\n", REGISTER_NAME (regnum), reg_val[0], reg_val[1]); } } @@ -2543,16 +2543,16 @@ pa_do_strcat_registers_info (int regnum, int fpregs, struct ui_file *stream, if (!is_pa_2) { - fprintf_unfiltered (stream, "%s %x", REGISTER_NAME (regnum), reg_val[1]); + fprintf_unfiltered (stream, "%s %lx", REGISTER_NAME (regnum), reg_val[1]); } else { /* Fancy % formats to prevent leading zeros. */ if (reg_val[0] == 0) - fprintf_unfiltered (stream, "%s %x", REGISTER_NAME (regnum), + fprintf_unfiltered (stream, "%s %lx", REGISTER_NAME (regnum), reg_val[1]); else - fprintf_unfiltered (stream, "%s %x%8.8x", REGISTER_NAME (regnum), + fprintf_unfiltered (stream, "%s %lx%8.8lx", REGISTER_NAME (regnum), reg_val[0], reg_val[1]); } } @@ -2699,17 +2699,17 @@ pa_print_registers (char *raw_regs, int regnum, int fpregs) /* Being big-endian, on this machine the low bits (the ones we want to look at) are in the second longword. */ long_val = extract_signed_integer (&raw_val[1], 4); - printf_filtered ("%10.10s: %8x ", + printf_filtered ("%10.10s: %8lx ", REGISTER_NAME (regnum), long_val); } else { /* raw_val = extract_signed_integer(&raw_val, 8); */ if (raw_val[0] == 0) - printf_filtered ("%10.10s: %8x ", + printf_filtered ("%10.10s: %8lx ", REGISTER_NAME (regnum), raw_val[1]); else - printf_filtered ("%10.10s: %8x%8.8x ", + printf_filtered ("%10.10s: %8lx%8.8lx ", REGISTER_NAME (regnum), raw_val[0], raw_val[1]); } @@ -2750,17 +2750,19 @@ pa_strcat_registers (char *raw_regs, int regnum, int fpregs, /* Being big-endian, on this machine the low bits (the ones we want to look at) are in the second longword. */ long_val = extract_signed_integer (&raw_val[1], 4); - fprintf_filtered (stream, "%8.8s: %8x ", REGISTER_NAME (i + (j * 18)), long_val); + fprintf_filtered (stream, "%8.8s: %8lx ", + REGISTER_NAME (i + (j * 18)), long_val); } else { /* raw_val = extract_signed_integer(&raw_val, 8); */ if (raw_val[0] == 0) - fprintf_filtered (stream, "%8.8s: %8x ", REGISTER_NAME (i + (j * 18)), - raw_val[1]); + fprintf_filtered (stream, "%8.8s: %8lx ", + REGISTER_NAME (i + (j * 18)), raw_val[1]); else - fprintf_filtered (stream, "%8.8s: %8x%8.8x ", REGISTER_NAME (i + (j * 18)), - raw_val[0], raw_val[1]); + fprintf_filtered (stream, "%8.8s: %8lx%8.8lx ", + REGISTER_NAME (i + (j * 18)), raw_val[0], + raw_val[1]); } } fprintf_unfiltered (stream, "\n"); @@ -3290,7 +3292,7 @@ skip_trampoline_code (CORE_ADDR pc, char *name) stubsym = lookup_minimal_symbol_by_pc (loc); if (stubsym == NULL) { - warning ("Unable to find symbol for 0x%x", loc); + warning ("Unable to find symbol for 0x%lx", loc); return orig_pc == pc ? 0 : pc & ~0x3; } @@ -4517,7 +4519,8 @@ unwind_command (char *exp, int from_tty) return; } - printf_unfiltered ("unwind_table_entry (0x%x):\n", u); + printf_unfiltered ("unwind_table_entry (0x%s):\n", + paddr_nz (host_pointer_to_address (u))); printf_unfiltered ("\tregion_start = "); print_address (u->region_start, gdb_stdout); diff --git a/gdb/hppah-nat.c b/gdb/hppah-nat.c index c5c431d..aab5e96 100644 --- a/gdb/hppah-nat.c +++ b/gdb/hppah-nat.c @@ -443,8 +443,8 @@ child_pid_to_str (ptid_t ptid) static char buf[30]; pid_t pid = PIDGET (ptid); - /* Extra NULLs for paranoia's sake */ - sprintf (buf, "process %d\0\0\0\0", pid); + /* Extra NUL for paranoia's sake */ + sprintf (buf, "process %d%c", pid, '\0'); return buf; } @@ -464,7 +464,7 @@ hppa_tid_to_str (ptid_t ptid) pid_t tid = PIDGET (ptid); /* Extra NULLs for paranoia's sake */ - sprintf (buf, "system thread %d\0\0\0\0", tid); + sprintf (buf, "system thread %d%c", tid, '\0'); return buf; } |