Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Marc Khouzam <marc.khouzam@ericsson.com>
Cc: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: Command for number of cores
Date: Wed, 28 Jul 2010 19:50:00 -0000	[thread overview]
Message-ID: <AANLkTi=O8vbh1+2LDPvb7PO=MLxWPg2ondc179OESA7u@mail.gmail.com> (raw)
In-Reply-To: <F7CE05678329534C957159168FA70DEC5716B5EE01@EUSAACMS0703.eamcs.ericsson.se>

On Tue, Jul 27, 2010 at 12:55 PM, Marc Khouzam
<marc.khouzam@ericsson.com> 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

If this is on linux, the following should work:

(gdb) remote get /proc/cpuinfo foo
(gdb) shell cat foo

Alas it gives:

Remote I/O error: Invalid argument

[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?

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.


  parent reply	other threads:[~2010-07-28 19:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-27 19:55 Marc Khouzam
2010-07-28  2:05 ` Hui Zhu
2010-07-28 19:02   ` Marc Khouzam
2010-07-29  2:21     ` Hui Zhu
2010-08-02  0:38       ` Marc Khouzam
2010-07-28 19:50 ` Doug Evans [this message]
2010-07-29 20:27   ` Marc Khouzam
2010-08-02 15:17   ` Stan Shebs

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='AANLkTi=O8vbh1+2LDPvb7PO=MLxWPg2ondc179OESA7u@mail.gmail.com' \
    --to=dje@google.com \
    --cc=gdb@sourceware.org \
    --cc=marc.khouzam@ericsson.com \
    /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