diff options
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/windows-nat.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 80ec8f35228..0305d67bd65 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2019-11-19 Tom Tromey <tromey@adacore.com> + + * windows-nat.c (windows_nat_target::attach): Include GetLastError + result in error when DebugActiveProcess fails. + 2019-11-18 Sergio Durigan Junior <sergiodj@redhat.com> Pedro Alves <palves@redhat.com> diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 5901f63b28a..fdc21f38bfa 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -1983,7 +1983,8 @@ windows_nat_target::attach (const char *args, int from_tty) #endif if (!ok) - error (_("Can't attach to process.")); + error (_("Can't attach to process %u (error %u)"), + (unsigned) pid, (unsigned) GetLastError ()); DebugSetProcessKillOnExit (FALSE); |