From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11710 invoked by alias); 29 Jul 2010 20:27:25 -0000 Received: (qmail 11700 invoked by uid 22791); 29 Jul 2010 20:27:25 -0000 X-SWARE-Spam-Status: No, hits=-0.1 required=5.0 tests=AWL,BAYES_00,RCVD_ILLEGAL_IP X-Spam-Check-By: sourceware.org Received: from imr3.ericy.com (HELO imr3.ericy.com) (198.24.6.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 29 Jul 2010 20:27:19 +0000 Received: from eusaamw0707.eamcs.ericsson.se ([147.117.20.32]) by imr3.ericy.com (8.13.8/8.13.8) with ESMTP id o6TKREYp017458 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Thu, 29 Jul 2010 15:27:15 -0500 Received: from EUSAACMS0703.eamcs.ericsson.se ([169.254.1.134]) by eusaamw0707.eamcs.ericsson.se ([147.117.20.32]) with mapi; Thu, 29 Jul 2010 16:27:14 -0400 From: Marc Khouzam To: "'Doug Evans'" CC: "'gdb@sourceware.org'" Date: Thu, 29 Jul 2010 20:27:00 -0000 Subject: RE: Command for number of cores Message-ID: References: In-Reply-To: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes 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 X-SW-Source: 2010-07/txt/msg00120.txt.bz2 =20 > -----Original Message----- > From: Doug Evans [mailto:dje@google.com]=20 > Sent: Wednesday, July 28, 2010 3:50 PM > To: Marc Khouzam > Cc: gdb@sourceware.org > Subject: Re: Command for number of cores >=20 > On Tue, Jul 27, 2010 at 12:55 PM, Marc Khouzam > wrote: > > Hi, > > > > I need a way to know how many cores are on my target (where=20 > gdbserver is running). > > I'm wondering if GDB already has this information? > > > > If not, I was thinking of adding 'info cores' or 'show cores'. > > Or maybe a convenience variable '$numcores'? > > > > I'm thinking 'info cores'. > > > > If this makes sense, I'll give it a try. > > > > Thanks > > > > Marc >=20 > If this is on linux, the following should work: >=20 > (gdb) remote get /proc/cpuinfo foo > (gdb) shell cat foo >=20 > Alas it gives: >=20 > Remote I/O error: Invalid argument I see that too. Note that it only fails for /proc/cpuinfo, not for a 'regular' file. > [lseek on /proc/cpuinfo failing?] > I think that's a bug though (not the lseek failing, but that "remote > get /proc/cpuinfo foo" fails). > If this is linux, and this is indeed a bug and it were fixed, would > that suffice? Yes, it is for linux. And I think that would be enough. This is needed by eclipse, but I can have it give this series of commands. Thanks for the suggestion > I hesitate to add "info cores" because it seems a bit esoteric, and > you'd have to hack gdb, gdbserver, and document it all when "remote > get" could suffice. >=20