Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Sergio Durigan Junior <sergiodj@redhat.com>
To: Stan Cox <scox@redhat.com>
Cc: Pedro Alves <palves@redhat.com>,  gdb-patches@sourceware.org
Subject: Re: [RFC][PATCH v3] Consolidate gdbserver global variables
Date: Tue, 10 Jul 2018 01:14:00 -0000	[thread overview]
Message-ID: <87wou3x56w.fsf@redhat.com> (raw)
In-Reply-To: <9e844707-a2f8-c969-4d09-7ee2fa3bd1ed@redhat.com> (Stan Cox's	message of "Tue, 8 May 2018 16:58:34 -0400")

On Tuesday, May 08 2018, Stan Cox wrote:

> (Addressed formatting and ChangeLog issues)
>
>> As mentioned, I'm skeptical of all client_state references
>> in the backends.
>>
>> How will this work with multiple clients?   What if one client
>> wants exec events, and the other one doesn't?  This seems to
>> suggest that the backends need to enable exec events if _any_
>> client wants them (or unconditionally), and then filter out exec
>> events at a higher level, before reporting the event to
>> each client?
>
> Perhaps filtering that is roughly analogous to the way
> gdb_catch_this_syscall_p filters for particular syscalls.
>
>> This "= 0" is a spurious change.  Remove it.
>
> Removed (it eliminated a compiler warning with gcc 7.3.1)
>
>> Give the global different name to avoid conflict with
>> the type name.  Maybe "g_client_state" or "the_client_state".
>
> Used g_client_state and also made it static instead of allocating it
> with new.
>
>> What's the plan for last_status/last_ptid?
>> Shouldn't those be per-client too?
>
> Added those.
>
>> Should these two be per client?  I'd think so off hand,
>> since they correspond to the Hc/Hg threads?
>
> Added cont_thread and general_thread
>
>> I suspect that it'd be better to make the server_waiting
>> global be per-process instead
>
> Returned to server_waiting being a global for now.
>
>
> Thanks Pedro!
>
>
> Tested on linux with native-gdbserver.

Hi Stan,

This patch introduced a regression on GDB when testing with
--target_board=native-gdbserver.  The failure is described here:

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

I've been trying to narrow down the cause, but so far have not been very
successful.  It seems that everything was covered by your patch, so I'm
guessing there must be some hidden spot where we're forgetting to update
some internal state and the failure ends up happening.

For the sake of comparison, here's the output that should have been
printed:

  Expecting: ^(-var-update L[
  ]+)?(\^done,changelist=\[{name="L",in_scope="true",type_changed="false",has_more="0"}\][
  ]+[(]gdb[)] 
  [ ]*)
  -var-update L
  ^done,changelist=[{name="L",in_scope="true",type_changed="false",has_more="0"}]
  (gdb) 
  PASS: gdb.mi/mi-var-cmd.exp: in-and-out-of-scope: in scope now

And this is what the failure looks like:

  Expecting: ^(-var-update L[
  ]+)?(\^done,changelist=\[{name="L",in_scope="true",type_changed="false",has_more="0"}\][
  ]+[(]gdb[)] 
  [ ]*)
  -var-update L
  ^done,changelist=[]
  (gdb) 
  FAIL: gdb.mi/mi-var-cmd.exp: in-and-out-of-scope: in scope now (unexpected output)

Something to take into consideration is that gdbserver is restarted
many times during the testcase.  I think this may have something to do
with it, because the test doesn't fail on native-extended-gdbserver.

Thanks,

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/


      parent reply	other threads:[~2018-07-10  1:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-07 22:03 [RFC][PATCH] " Stan Cox
2018-01-31  3:41 ` Stan Cox
2018-04-23 17:58   ` Pedro Alves
2018-05-03 15:06     ` [RFC][PATCH v2] " Stan Cox
2018-05-04 14:14       ` Pedro Alves
2018-05-07 19:17         ` Frank Ch. Eigler
2018-05-25 14:31           ` Pedro Alves
2018-05-08 20:58         ` [RFC][PATCH v3] " Stan Cox
2018-05-25 15:01           ` Pedro Alves
2018-05-29 20:46             ` Stan Cox
2018-05-30 14:30               ` Pedro Alves
2018-06-08 16:11           ` Tom Tromey
2018-06-08 16:46             ` Stan Cox
2018-06-08 16:52               ` Tom Tromey
2018-07-10  1:14           ` Sergio Durigan Junior [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=87wou3x56w.fsf@redhat.com \
    --to=sergiodj@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=scox@redhat.com \
    /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