A simple way to reproduce the problem: 1. Start a long-running process: # yes > /dev/null 2. Find out the PID: # ps 3. Start gdb in MI mode: # /usr/local/bin/gdb --nx --interpreter=mi2 -quiet 4. Try attaching: -target-attach <pid> This produces =thread-group-started,id="i1",pid="2510" =thread-created,id="1",group-id="i1" ^error,msg="Couldn't get registers: Device busy." (gdb) =library-loaded,id="/lib/libc.so.7",target-name="/lib/libc.so.7",host-name="/lib/libc.so.7",symbols-loaded="0",thread-group="i1",ranges=[{from="0x00000008002c3000",to="0x0000000800419f68"}] =library-loaded,id="/libexec/ld-elf.so.1",target-name="/libexec/ld-elf.so.1",host-name="/libexec/ld-elf.so.1",symbols-loaded="0",thread-group="i1",ranges=[{from="0x000000080020a000",to="0x000000080022253e"}] ~"[Switching to LWP 100938 of process 2510]\n" ~"_write () at _write.S:3\n" ~"3\tPSEUDO(write)\n" *stopped,frame={addr="0x000000080041878a",func="_write",args=[],file="_write.S",fullname="/usr/obj/usr/src/amd64.amd64/lib/libc/_write.S",line="3"},thread-id="1",stopped-threads="all" So, it attaches fine, but produces error message: ^error,msg="Couldn't get registers: Device busy." Any way to fix/workaround this?
This seems to be fixed in 8.2. Feel free to close this.
(In reply to Gleb Popov from comment #1) > This seems to be fixed in 8.2. Feel free to close this. Thanks!