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

 

> -----Original Message-----
> From: Doug Evans [mailto:dje@google.com] 
> Sent: Wednesday, July 28, 2010 3:50 PM
> To: Marc Khouzam
> Cc: gdb@sourceware.org
> Subject: Re: Command for number of cores
> 
> 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

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.
> 


  reply	other threads:[~2010-07-29 20:27 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
2010-07-29 20:27   ` Marc Khouzam [this message]
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=F7CE05678329534C957159168FA70DEC5716C1E484@EUSAACMS0703.eamcs.ericsson.se \
    --to=marc.khouzam@ericsson.com \
    --cc=dje@google.com \
    --cc=gdb@sourceware.org \
    /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