From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 668 invoked by alias); 28 Jul 2010 19:02:37 -0000 Received: (qmail 530 invoked by uid 22791); 28 Jul 2010 19:02:36 -0000 X-SWARE-Spam-Status: No, hits=0.7 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN,RCVD_ILLEGAL_IP X-Spam-Check-By: sourceware.org Received: from imr1.ericy.com (HELO imr1.ericy.com) (198.24.6.9) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 28 Jul 2010 19:02:29 +0000 Received: from eusaamw0711.eamcs.ericsson.se ([147.117.20.178]) by imr1.ericy.com (8.13.1/8.13.1) with ESMTP id o6SJBVWP002085; Wed, 28 Jul 2010 14:11:31 -0500 Received: from EUSAACMS0703.eamcs.ericsson.se ([169.254.1.134]) by eusaamw0711.eamcs.ericsson.se ([147.117.20.178]) with mapi; Wed, 28 Jul 2010 15:02:26 -0400 From: Marc Khouzam To: "'Hui Zhu'" CC: "'gdb@sourceware.org'" Date: Wed, 28 Jul 2010 19:02: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/msg00111.txt.bz2 > -----Original Message----- > From: Hui Zhu [mailto:teawater@gmail.com]=20 > Sent: Tuesday, July 27, 2010 10:05 PM > To: Marc Khouzam > Cc: gdb@sourceware.org > Subject: Re: Command for number of cores >=20 > p sysconf(_SC_NPROCESSORS_CONF) How do I get GDB to know about the symbol _SC_NPROCESSORS_CONF? And when I call sysconf() does it execute on the host or the target? Thanks > On Wed, Jul 28, 2010 at 03:55, Marc Khouzam=20 > 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