From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10802 invoked by alias); 28 Jul 2010 02:05:30 -0000 Received: (qmail 10724 invoked by uid 22791); 28 Jul 2010 02:05:29 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-px0-f169.google.com (HELO mail-px0-f169.google.com) (209.85.212.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 28 Jul 2010 02:05:23 +0000 Received: by pxi7 with SMTP id 7so1401709pxi.0 for ; Tue, 27 Jul 2010 19:05:22 -0700 (PDT) Received: by 10.142.201.5 with SMTP id y5mr5649916wff.130.1280282722196; Tue, 27 Jul 2010 19:05:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.221.12 with HTTP; Tue, 27 Jul 2010 19:05:02 -0700 (PDT) In-Reply-To: References: From: Hui Zhu Date: Wed, 28 Jul 2010 02:05:00 -0000 Message-ID: Subject: Re: Command for number of cores To: Marc Khouzam Cc: "gdb@sourceware.org" Content-Type: text/plain; charset=ISO-8859-1 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/msg00105.txt.bz2 p sysconf(_SC_NPROCESSORS_CONF) On Wed, Jul 28, 2010 at 03:55, Marc Khouzam wrote: > Hi, > > I need a way to know how many cores are on my target (where 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 >