From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 83736 invoked by alias); 17 Jun 2015 21:27:00 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 83724 invoked by uid 89); 17 Jun 2015 21:26:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ob0-f180.google.com Received: from mail-ob0-f180.google.com (HELO mail-ob0-f180.google.com) (209.85.214.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 17 Jun 2015 21:26:58 +0000 Received: by obctg8 with SMTP id tg8so41960854obc.3 for ; Wed, 17 Jun 2015 14:26:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=SywkCdH8G9DyxxZSE4lAePLw9MpzXEg2oBihyL0HBXQ=; b=KTVEEuF7YWJ9eGyEvToxCZj3UeMK5/d7zB2fYFfnwE5D8RC+v0Up68oohX81gd3tOg xrrbkPlKUYX3QfLl4RdWIE6r6qO/ivdBTO5huTFB1nJ4j3SNStb62nYFBTSJoeM81X6n Tu8arWXF9W3qtHEpxYCWESxfR6jOa+5TkVs2McN72OKySas8y+kgPWotDs+wKXwWnvmJ T0sJ3iLpDEB9nPkhIiGxCZd/lRFlvSJPYSRzKl2JcPSsBcDjnHDhYbfcGxSGods3BaHz ko+9xXyuEos23nJaM2iVL0x4jTqDl/TBAEkKNJ+7WvQ46AQaiYeshPFhoy3TlE9fop0n 8H5Q== X-Gm-Message-State: ALoCoQlhnG3Kvsk3A7XuBjl649cy+z7cLpaVZUBkN1gRY/y1q6mbQ9p2EPMYNP6VwBXInlI5/P9+ MIME-Version: 1.0 X-Received: by 10.182.153.197 with SMTP id vi5mr6359469obb.28.1434576416836; Wed, 17 Jun 2015 14:26:56 -0700 (PDT) Received: by 10.182.89.99 with HTTP; Wed, 17 Jun 2015 14:26:56 -0700 (PDT) In-Reply-To: <57BF10A2-F13E-4399-8D18-A662681F5384@comcast.net> References: <57BF10A2-F13E-4399-8D18-A662681F5384@comcast.net> Date: Wed, 17 Jun 2015 21:27:00 -0000 Message-ID: Subject: Re: Crazy? From: Doug Evans To: Mike Stump Cc: "gdb@sourceware.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-06/txt/msg00042.txt.bz2 On Wed, Jun 17, 2015 at 12:26 PM, Mike Stump 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=E2=80=99ll I=E2=80=99d let someone pick a q spelling for it = and I could try my hand at implementing it. Another solution is to just tr= ust the target and remove the limit altogether. I kinda like the last opti= on. I can=E2=80=99t 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 gd= b, 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 ol= d: /* 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]