This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug mi/23464] New: Attaching on FreeBSD using MI works, but yields a error


https://sourceware.org/bugzilla/show_bug.cgi?id=23464

            Bug ID: 23464
           Summary: Attaching on FreeBSD using MI works, but yields a
                    error
           Product: gdb
           Version: 8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: mi
          Assignee: unassigned at sourceware dot org
          Reporter: arrowd at freebsd dot org
  Target Milestone: ---

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?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]