This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix 'info os' crashes on sparc.


On 11/20/2012 06:13 AM, David Miller wrote:

> The thing is, this code still has a problem.  The number of cpus
> active doesn't tell us anything about what the largest cpu number
> might be.
> 
> The cpus numbers themselves can be arbitrarily sparse and beyond the
> number of cpus.
> 
> And it's the cpu numbers that are used to index these various tables.
> 

Indeed.

> gdb/
> 
> 2012-11-19  David S. Miller  <davem@davemloft.net>
> 
> 	* common/linux-osdata.c (get_number_of_cpu_cores): Delete.
> 	(linux_xfer_osdata_processes): Fetch _SC_NPROCESSORS_ONLN via
> 	sysconf.
> 	(get_cores_used_by_process): Update comment.

OK.  Thanks.

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]