This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] gdbserver/win32-low.c: Fix printf-like formatting (was Re: [patch]: Replace stryoul call to fetch address)
> Date: Wed, 27 Feb 2013 21:29:02 +0100
> From: Corinna Vinschen <vinschen@redhat.com>
>
> If you look closely, I didn't add the unsigned casts.
Not in the part I cited (sorry), but elsewhere you did:
> @@ -1317,10 +1317,10 @@ handle_exception (struct target_waitstat
> ourstatus->kind = TARGET_WAITKIND_SPURIOUS;
> return;
> }
> - OUTMSG2 (("gdbserver: unknown target exception 0x%08lx at 0x%s",
> - current_event.u.Exception.ExceptionRecord.ExceptionCode,
> - phex_nz ((uintptr_t) current_event.u.Exception.ExceptionRecord.
> - ExceptionAddress, sizeof (uintptr_t))));
> + OUTMSG2 (("gdbserver: unknown target exception 0x%08x at 0x%s",
> + (unsigned) current_event.u.Exception.ExceptionRecord.ExceptionCode,
> + phex_nz ((uintptr_t) current_event.u.Exception.ExceptionRecord.
> + ExceptionAddress, sizeof (uintptr_t))));
[...]
> @@ -1561,10 +1561,10 @@ get_child_debug_event (struct target_wai
>
> default:
> OUTMSG2 (("gdbserver: kernel event unknown "
> - "for pid=%d tid=%x code=%ld\n",
> + "for pid=%u tid=%x code=%x\n",
> (unsigned) current_event.dwProcessId,
> (unsigned) current_event.dwThreadId,
> - current_event.dwDebugEventCode));
> + (unsigned) current_event.dwDebugEventCode));
> break;
> }
Are those mistakes?
> The unsigned casts are already widely used throughout the file.
So why are they there?