Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Jan Vrany <jan.vrany@fit.cvut.cz>, gdb@sourceware.org
Subject: Re: MI commands with --thread (--frame?) do not preserve user selected thread / frame
Date: Wed, 19 Jun 2019 17:14:00 -0000	[thread overview]
Message-ID: <edf987ed-e094-8198-7c75-e301a53bbb6e@simark.ca> (raw)
In-Reply-To: <d04a2b20eaecb6dfe62c65c8a7aaa9a61a5dbe56.camel@fit.cvut.cz>

On 2019-06-19 12:04 p.m., Jan Vrany wrote:
> On Wed, 2019-06-19 at 11:54 -0400, Simon Marchi wrote:
>> On 2019-06-19 11:10 a.m., Jan Vrany wrote:
>>> On Wed, 2019-06-19 at 11:53 +0100, Jan Vrany wrote:
>>>> Hi, 
>>>>
>>>> I was debugging a multithreaded program and realized that using --thread option to
>>>> verious MI command silently changes user selected thread - here's an example using
>>>> separate UI and CLI chahhel (tested on commit 6f5601c4d0)
>>>>
>>>>
>>> ...
>>>>
>>>> As you can see, there was no `frame`, `thread`, `-select-frame` or `-thread-select` command between
>>>> first and second info thread / frame commands on CLI, yet the selected thread / frame changed (silently).
>>>>
>>>> Is this intended behavior? If so what's the rationale?
>>
>> No, this is indeed a known bug:
>>
>> https://sourceware.org/bugzilla/show_bug.cgi?id=20684
>>
> 
> Ah, I see. 
> 
>>>
>> So it seems to work (at least for a simple case, there might be some edge cases I don't recall).  I
>> think that the CLI and MI events about the thread change should not appear though, since the goal is
>> to make it appear as if there is no user selection changes.
> 
> I agree, the event should not be emitted. This was just a quick hack whether 
> it'd help in my case. If you think this is an acceptable way of "fixing" it,
> I'm happy to improve this patch and submit. 
> 
> Jan

Note to gdb@, the conversion continues here:

https://sourceware.org/ml/gdb-patches/2019-06/msg00392.html

Simon


      reply	other threads:[~2019-06-19 17:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5df1c9d79778a5d6703bba442031b5a1bbeda141.camel@fit.cvut.cz>
2019-06-19 15:10 ` Jan Vrany
2019-06-19 15:54   ` Simon Marchi
2019-06-19 16:04     ` Jan Vrany
2019-06-19 17:14       ` Simon Marchi [this message]

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=edf987ed-e094-8198-7c75-e301a53bbb6e@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb@sourceware.org \
    --cc=jan.vrany@fit.cvut.cz \
    /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