From: Doug Evans <dje@google.com>
To: Mike Stump <mikestump@comcast.net>
Cc: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: Crazy?
Date: Wed, 17 Jun 2015 21:27:00 -0000 [thread overview]
Message-ID: <CADPb22Q6HDzra-EPPXCUHOn-T1snsc14-oOH13crZZqfdUi7Gg@mail.gmail.com> (raw)
In-Reply-To: <57BF10A2-F13E-4399-8D18-A662681F5384@comcast.net>
On Wed, Jun 17, 2015 at 12:26 PM, Mike Stump <mikestump@comcast.net> wrote:
> In remote.c we have:
>
> #define CRAZY_MAX_THREADS 1000
>
> We need something that is either bigger, or obtainable from the target. If bigger, I can just hack my sources to be different. If obtainable from the target, we’ll I’d let someone pick a q spelling for it and I could try my hand at implementing it. Another solution is to just trust the target and remove the limit altogether. I kinda like the last option. I can’t imagine a developer would ever be saved by the limit.
>
> So, would removal of the limit be reasonable?
Hi.
By "bigger" do you mean more threads?
The value isn't so much a maximum number of threads but the number of
times gdb requests a thread list from the target.
If the target returned one thread per iteration then, yeah, that's the
max number of threads.
But I also see this:
/* About this many threadisds fit in a packet. */
#define MAXTHREADLISTRESULTS 32
So if the target returned 32 threads per request then the max is
32000, which is more useful
(1000 threads is not unheard of).
Presumably the max is there so that bugs in the remote server don't hang gdb,
which is reasonable, so we don't want to remove the limit.
We could increase the limit though without much harm I think.
From reading the source I gather this way of getting the thread list is old:
/* We have a few different mechanisms to fetch the thread list. Try
them all, starting with the most preferred one first, falling
back to older methods. */
if (remote_get_threads_with_qxfer (ops, &context)
|| remote_get_threads_with_qthreadinfo (ops, &context)
|| remote_get_threads_with_ql (ops, &context))
Can you try using one of the newer methods?
[it's the with_ql version that uses CRAZY_MAX_THREADS]
next prev parent reply other threads:[~2015-06-17 21:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-17 17:27 Crazy? Mike Stump
2015-06-17 21:27 ` Doug Evans [this message]
2015-06-18 1:21 ` Crazy? Mike Stump
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=CADPb22Q6HDzra-EPPXCUHOn-T1snsc14-oOH13crZZqfdUi7Gg@mail.gmail.com \
--to=dje@google.com \
--cc=gdb@sourceware.org \
--cc=mikestump@comcast.net \
/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