[review] Report GetLastError value when DebugActiveProcess fails
Eli Zaretskii
eliz@gnu.org
Thu Nov 14 16:54:00 GMT 2019
> Date: Thu, 14 Nov 2019 11:40:58 -0500
> From: "Tom Tromey (Code Review)" <gerrit@gnutoolchain-gerrit.osci.io>
>
> --- a/gdb/windows-nat.c
> +++ b/gdb/windows-nat.c
> @@ -1983,7 +1983,8 @@
> #endif
>
> if (!ok)
> - error (_("Can't attach to process."));
> + error (_("Can't attach to process %u (error %u)"),
> + (unsigned) pid, (unsigned) GetLastError ());
Why not show the text that corresponds to the error code? A lone code
is not very descriptive, IME.
More information about the Gdb-patches
mailing list