Skip to content
Commit 43ca4ec2 authored by Pedro Alves's avatar Pedro Alves
Browse files

gdb/Cygwin: Fix attach pid error message



On Cygwin, with "attach PID":

 - GDB first tries to interpret PID as a Windows native PID, and tries
   to attach to that.

 - if the attach fails, GDB then tries to interpret the PID as a
   Cygwin PID, and attach to that.

If converting the user-provided PID from a Cygwin PID to a Windows PID
fails, you get this:

 (gdb) attach 12345
 Can't attach to process 0 (error 2: The system cannot find the file specified.)

Note "process 0".

With the fix in this commit, we'll now get:

 (gdb) attach 12345
 Can't attach to process 12345 (error 2: The system cannot find the file specified.)

I noticed this while looking at gdb.log after running
gdb.base/attach.exp on Cygwin.

Change-Id: I05b9dc1f3a634a822ea49bb5c61719f5e62c8514
Approved-By: default avatarLuis Machado <luis.machado@arm.com>
parent 2fb3ca4e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment