public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "simon.marchi at ericsson dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug mi/15564] New: MI thread-exited event inconsistency when detaching
Date: Mon, 03 Jun 2013 16:05:00 -0000	[thread overview]
Message-ID: <bug-15564-4717@http.sourceware.org/bugzilla/> (raw)

http://sourceware.org/bugzilla/show_bug.cgi?id=15564

            Bug ID: 15564
           Summary: MI thread-exited event inconsistency when detaching
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mi
          Assignee: unassigned at sourceware dot org
          Reporter: simon.marchi at ericsson dot com

When attaching and detaching a process, we see two different behavior depending
on if we pass through a gdbserver or if we do it natively. The difference is
whether the thread-exited event is emitted or not.


Attaching and detaching a process without directly (no gdbserver)
$ gdb -i mi
=thread-group-added,id="i1"
(gdb)
-target-attach 5422
=thread-group-started,id="i1",pid="5422"
=thread-created,id="1",group-id="i1"
=library-loaded,id="/lib/x86_64-linux-gnu/libc.so.6",target-name="/lib/x86_64-linux-gnu/libc.so.6",host-name="/lib/x86_64-linux-gnu/libc.so.6",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib64/ld-linux-x86-64.so.2",target-name="/lib64/ld-linux-x86-64.so.2",host-name="/lib64/ld-linux-x86-64.so.2",symbols-loaded="0",thread-group="i1"
*stopped,frame={addr="0x00007fe48e131d20",func="nanosleep",args=[],from="/lib/x86_64-linux-gnu/libc.so.6"},thread-id="1",stopped-threads="all",core="1"
^done
(gdb)
-target-detach
=thread-group-exited,id="i1"
=library-unloaded,id="/lib/x86_64-linux-gnu/libc.so.6",target-name="/lib/x86_64-linux-gnu/libc.so.6",host-name="/lib/x86_64-linux-gnu/libc.so.6",thread-group="i1"
=library-unloaded,id="/lib64/ld-linux-x86-64.so.2",target-name="/lib64/ld-linux-x86-64.so.2",host-name="/lib64/ld-linux-x86-64.so.2",thread-group="i1"
^done
(gdb)


Attaching and detaching a process through gdbserver
(start gdbserver and attach the process)
$ gdbserver --attach :1234 5422

$ gdb -i mi
=thread-group-added,id="i1"
(gdb)
-target-select extended-remote :1234
=thread-group-started,id="i1",pid="5422"
=thread-created,id="1",group-id="i1"

&"warning: Could not load vsyscall page because no executable was
specified\ntry using the \"file\" command first."

&"\n"
*stopped,frame={addr="0x00007fe48e131d20",func="??",args=[]},thread-id="1",stopped-threads="all",core="3"
=tsv-created,name="trace_timestamp",initial="0"\n
^connected
(gdb)
-target-detach
=thread-exited,id="1",group-id="i1"
=thread-group-exited,id="i1"
^done
(gdb)

Reference: http://sourceware.org/ml/gdb/2013-05/msg00149.html

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


             reply	other threads:[~2013-06-03 16:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-03 16:05 simon.marchi at ericsson dot com [this message]
2015-06-02 19:34 ` [Bug mi/15564] " cvs-commit at gcc dot gnu.org
2015-06-03 14:18 ` simon.marchi at ericsson dot com
2015-10-27 17:26 ` qiyao at gcc dot gnu.org
2015-10-27 17:29 ` simon.marchi at ericsson dot com
2024-01-13 20:04 ` ssbssa at sourceware dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-15564-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).