public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Add cpu information to the info os command on linux.
@ 2015-03-25 17:50 Antoine Tremblay
  2015-03-27 11:38 ` Pedro Alves
  0 siblings, 1 reply; 5+ messages in thread
From: Antoine Tremblay @ 2015-03-25 17:50 UTC (permalink / raw)
  To: gdb-patches; +Cc: Antoine Tremblay

This patch adds cpu information on linux based on /proc/cpuinfo as :
cpus       Listing of all cpus/cores on the system

This patch also reorders the info os commands so that they are listed
in alphabetical order.

gdb/ChangeLog:
	* gdb/nat/linux-osdata.c (linux_xfer_osdata_cpus): New function.
	(struct osdata_type): Add cpus entry.
---
 gdb/nat/linux-osdata.c | 132 ++++++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 120 insertions(+), 12 deletions(-)

diff --git a/gdb/nat/linux-osdata.c b/gdb/nat/linux-osdata.c
index 0ed5d34..ba281cc 100644
--- a/gdb/nat/linux-osdata.c
+++ b/gdb/nat/linux-osdata.c
@@ -662,6 +662,112 @@ linux_xfer_osdata_threads (gdb_byte *readbuf,
   return len;
 }
 
+/* Collect data about the cpus/cores on the system */
+
+static LONGEST
+linux_xfer_osdata_cpus (gdb_byte *readbuf,
+			   ULONGEST offset, ULONGEST len)
+{
+  static const char *buf;
+  static LONGEST len_avail = -1;
+  static struct buffer buffer;
+
+  if (offset == 0)
+    {
+      FILE *fp;
+      int first_item = 1;
+
+      if (len_avail != -1 && len_avail != 0)
+	buffer_free (&buffer);
+      len_avail = 0;
+      buf = NULL;
+      buffer_init (&buffer);
+      buffer_grow_str (&buffer, "<osdata type=\"cpus\">\n");
+
+      fp = gdb_fopen_cloexec ("/proc/cpuinfo", "r");
+      if (fp)
+	{
+	  char buf[8192];
+
+	  do
+	    {
+	      if (fgets (buf, sizeof (buf), fp))
+		{
+		  char *key, *value;
+		  int i = 0;
+
+		  key = strtok (buf, ":");
+		  if (key == NULL)
+		    continue;
+
+		  value = strtok (NULL, ":");
+		  if (value == NULL)
+		    continue;
+
+		  while (key[i] != '\t' && key [i] != '\0')
+		    {
+		      i++;
+		    }
+		  key[i] = '\0';
+
+		  i = 0;
+		  while (value[i] != '\t' && value [i] != '\0')
+		    {
+		      i++;
+		    }
+		  value[i] = '\0';
+
+		  if (strcmp (key, "processor") == 0)
+		    {
+		      if (first_item == 1)
+			{
+			  buffer_grow_str (&buffer, "<item>");
+			}
+		      else
+			{
+			  buffer_grow_str (&buffer, "</item><item>");
+			}
+		      first_item = 0;
+		    }
+
+		  buffer_xml_printf (
+				     &buffer,
+				     "<column name=\"%s\">%s</column>",
+				     key,
+				     value);
+		}
+	    }
+	  while (!feof (fp));
+
+	  if (first_item == 0)
+	    {
+	      buffer_grow_str (&buffer, "</item>");
+	    }
+
+	  fclose (fp);
+	}
+
+      buffer_grow_str0 (&buffer, "</osdata>\n");
+      buf = buffer_finish (&buffer);
+      len_avail = strlen (buf);
+    }
+
+  if (offset >= len_avail)
+    {
+      /* Done.  Get rid of the buffer.  */
+      buffer_free (&buffer);
+      buf = NULL;
+      len_avail = 0;
+      return 0;
+    }
+
+  if (len > len_avail - offset)
+    len = len_avail - offset;
+  memcpy (readbuf, buf + offset, len);
+
+  return len;
+}
+
 /* Collect all the open file descriptors found in /proc and put the details
    found about them into READBUF.  */
 
@@ -1532,24 +1638,26 @@ struct osdata_type {
   char *description;
   LONGEST (*getter) (gdb_byte *readbuf, ULONGEST offset, ULONGEST len);
 } osdata_table[] = {
+  { "cpus", "CPUs", "Listing of all cpus/cores on the system",
+    linux_xfer_osdata_cpus },
+  { "files", "File descriptors", "Listing of all file descriptors",
+    linux_xfer_osdata_fds },
+  { "modules", "Kernel modules", "Listing of all loaded kernel modules",
+    linux_xfer_osdata_modules },
+  { "msg", "Message queues", "Listing of all message queues",
+    linux_xfer_osdata_msg },
   { "processes", "Processes", "Listing of all processes",
     linux_xfer_osdata_processes },
   { "procgroups", "Process groups", "Listing of all process groups",
     linux_xfer_osdata_processgroups },
-  { "threads", "Threads", "Listing of all threads",
-    linux_xfer_osdata_threads },
-  { "files", "File descriptors", "Listing of all file descriptors",
-    linux_xfer_osdata_fds },
-  { "sockets", "Sockets", "Listing of all internet-domain sockets",
-    linux_xfer_osdata_isockets },
-  { "shm", "Shared-memory regions", "Listing of all shared-memory regions",
-    linux_xfer_osdata_shm },
   { "semaphores", "Semaphores", "Listing of all semaphores",
     linux_xfer_osdata_sem },
-  { "msg", "Message queues", "Listing of all message queues",
-    linux_xfer_osdata_msg },
-  { "modules", "Kernel modules", "Listing of all loaded kernel modules",
-    linux_xfer_osdata_modules },
+  { "shm", "Shared-memory regions", "Listing of all shared-memory regions",
+    linux_xfer_osdata_shm },
+  { "sockets", "Sockets", "Listing of all internet-domain sockets",
+    linux_xfer_osdata_isockets },
+  { "threads", "Threads", "Listing of all threads",
+    linux_xfer_osdata_threads },
   { NULL, NULL, NULL }
 };
 
-- 
1.9.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Add cpu information to the info os command on linux.
  2015-03-25 17:50 [PATCH] Add cpu information to the info os command on linux Antoine Tremblay
@ 2015-03-27 11:38 ` Pedro Alves
  2015-03-27 13:42   ` [PATCH v2] " Antoine Tremblay
  0 siblings, 1 reply; 5+ messages in thread
From: Pedro Alves @ 2015-03-27 11:38 UTC (permalink / raw)
  To: Antoine Tremblay, gdb-patches

On 03/25/2015 05:50 PM, Antoine Tremblay wrote:
> This patch adds cpu information on linux based on /proc/cpuinfo as :
> cpus       Listing of all cpus/cores on the system
> 
> This patch also reorders the info os commands so that they are listed
> in alphabetical order.

Please mention this new field in NEWS, and update the manual as well,
where it reads:

"On @sc{gnu}/Linux, the following values of @var{infotype} are valid:"

and also the example given in the "-info-os" section.

> 
> gdb/ChangeLog:
> 	* gdb/nat/linux-osdata.c (linux_xfer_osdata_cpus): New function.
> 	(struct osdata_type): Add cpus entry.

Mention the resorting too.

> +/* Collect data about the cpus/cores on the system */
> +
> +static LONGEST
> +linux_xfer_osdata_cpus (gdb_byte *readbuf,
> +			   ULONGEST offset, ULONGEST len)
> +{
> +  static const char *buf;
> +  static LONGEST len_avail = -1;
> +  static struct buffer buffer;
> +
> +  if (offset == 0)
> +    {
> +      FILE *fp;
> +      int first_item = 1;
> +
> +      if (len_avail != -1 && len_avail != 0)
> +	buffer_free (&buffer);
> +      len_avail = 0;
> +      buf = NULL;
> +      buffer_init (&buffer);
> +      buffer_grow_str (&buffer, "<osdata type=\"cpus\">\n");
> +
> +      fp = gdb_fopen_cloexec ("/proc/cpuinfo", "r");
> +      if (fp)

     if (fp != NULL)


> +	{
> +	  char buf[8192];
> +
> +	  do
> +	    {
> +	      if (fgets (buf, sizeof (buf), fp))
> +		{
> +		  char *key, *value;
> +		  int i = 0;
> +
> +		  key = strtok (buf, ":");
> +		  if (key == NULL)
> +		    continue;
> +
> +		  value = strtok (NULL, ":");
> +		  if (value == NULL)
> +		    continue;
> +
> +		  while (key[i] != '\t' && key [i] != '\0')

Spurious space in "key [".

> +		    {
> +		      i++;
> +		    }

Unneeded braces.  Many cases in the patch.

> +		  key[i] = '\0';
> +
> +		  i = 0;
> +		  while (value[i] != '\t' && value [i] != '\0')

Ditto.

> +		    {
> +		      i++;
> +		    }
> +		  value[i] = '\0';
> +
> +		  if (strcmp (key, "processor") == 0)
> +		    {
> +		      if (first_item == 1)
> +			{
> +			  buffer_grow_str (&buffer, "<item>");
> +			}
> +		      else
> +			{
> +			  buffer_grow_str (&buffer, "</item><item>");
> +			}

Unneeded braces.  No need to explicitly compare to 1, AFAICS, this
is treated as boolean:

		      if (first_item)
		        buffer_grow_str (&buffer, "<item>");
		      else
                        buffer_grow_str (&buffer, "</item><item>");
		      first_item = 0;


> +		      first_item = 0;
> +		    }
> +
> +		  buffer_xml_printf (
> +				     &buffer,

Merge these two lines into one.

> +				     "<column name=\"%s\">%s</column>",
> +				     key,
> +				     value);
> +		}
> +	    }
> +	  while (!feof (fp));
> +
> +	  if (first_item == 0)
> +	    {
> +	      buffer_grow_str (&buffer, "</item>");
> +	    }

Drop braces.

Thanks,
Pedro Alves

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2] Add cpu information to the info os command on linux.
  2015-03-27 11:38 ` Pedro Alves
@ 2015-03-27 13:42   ` Antoine Tremblay
  2015-03-27 14:15     ` Eli Zaretskii
  2015-03-31 11:31     ` Pedro Alves
  0 siblings, 2 replies; 5+ messages in thread
From: Antoine Tremblay @ 2015-03-27 13:42 UTC (permalink / raw)
  To: palves, gdb-patches; +Cc: Antoine Tremblay

/* Not part of the commit 
In this patch v2 :

 - NEWs section update
 - GDB manual update and reorder of the entries
 - ChangeLog fix
 - Various styles problems in .c fixes sorry about that
seems like it takes time to get this style in my head..
*/

This patch adds cpu information on linux based on /proc/cpuinfo as :
cpus       Listing of all cpus/cores on the system

This patch also reorders the info os commands so that they are listed
in alphabetical order.

gdb/ChangeLog:
	* gdb/nat/linux-osdata.c (linux_xfer_osdata_cpus): New function.
	(struct osdata_type): Add cpus entry, reorder the entries in
        alphabethical order.
---
 gdb/NEWS               |   4 ++
 gdb/doc/gdb.texinfo    | 132 ++++++++++++++++++++++++++-----------------------
 gdb/nat/linux-osdata.c | 124 +++++++++++++++++++++++++++++++++++++++++-----
 3 files changed, 187 insertions(+), 73 deletions(-)

diff --git a/gdb/NEWS b/gdb/NEWS
index 3fa33c9..4d8619d 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -3,6 +3,10 @@
 
 *** Changes since GDB 7.9
 
+* The "info os" command on GNU/Linux can now display information on
+  cpu information :
+    "info os cpus" Listing of all cpus/cores on the system
+
 * GDB has two new commands: "set serial parity odd|even|none" and
   "show serial parity".  These allows to set or show parity for the
   remote serial I/O.
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 7117e42..288f021 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -10607,6 +10607,40 @@ On @sc{gnu}/Linux, the following values of @var{infotype} are valid:
 
 @anchor{linux info os infotypes}
 @table @code
+@kindex info os cpus
+@item cpus
+Display the list of all CPUs/cores. For each CPU/core, @value{GDBN} prints
+the available fields from /proc/cpuinfo. For each supported architecture
+different fields are available. Two common entries are processor which gives
+CPU number and bogomips; a system constant that is calculated during
+kernel initialization.
+
+@kindex info os files
+@item files
+Display the list of open file descriptors on the target.  For each
+file descriptor, @value{GDBN} prints the identifier of the process
+owning the descriptor, the command of the owning process, the value
+of the descriptor, and the target of the descriptor.
+
+@kindex info os modules
+@item modules
+Display the list of all loaded kernel modules on the target.  For each
+module, @value{GDBN} prints the module name, the size of the module in
+bytes, the number of times the module is used, the dependencies of the
+module, the status of the module, and the address of the loaded module
+in memory.
+
+@kindex info os msg
+@item msg
+Display the list of all System V message queues on the target.  For each
+message queue, @value{GDBN} prints the message queue key, the message
+queue identifier, the access permissions, the current number of bytes
+on the queue, the current number of messages on the queue, the processes
+that last sent and received a message on the queue, the user and group
+of the owner and creator of the message queue, the times at which a
+message was last sent and received on the queue, and the time at which
+the message queue was last changed.
+
 @kindex info os processes
 @item processes
 Display the list of processes on the target.  For each process,
@@ -10626,28 +10660,13 @@ first by the process group identifier, then by the process identifier,
 so that processes belonging to the same process group are grouped together
 and the process group leader is listed first.
 
-@kindex info os threads
-@item threads
-Display the list of threads running on the target.  For each thread,
-@value{GDBN} prints the identifier of the process that the thread
-belongs to, the command of the process, the thread identifier, and the
-processor core that it is currently running on.  The main thread of a
-process is not listed.
-
-@kindex info os files
-@item files
-Display the list of open file descriptors on the target.  For each
-file descriptor, @value{GDBN} prints the identifier of the process
-owning the descriptor, the command of the owning process, the value
-of the descriptor, and the target of the descriptor.
-
-@kindex info os sockets
-@item sockets
-Display the list of Internet-domain sockets on the target.  For each
-socket, @value{GDBN} prints the address and port of the local and
-remote endpoints, the current state of the connection, the creator of
-the socket, the IP address family of the socket, and the type of the
-connection.
+@kindex info os semaphores
+@item semaphores
+Display the list of all System V semaphore sets on the target.  For each
+semaphore set, @value{GDBN} prints the semaphore set key, the semaphore
+set identifier, the access permissions, the number of semaphores in the
+set, the user and group of the owner and creator of the semaphore set,
+and the times at which the semaphore set was operated upon and changed.
 
 @kindex info os shm
 @item shm
@@ -10659,32 +10678,21 @@ attached to or detached from the region, the current number of live
 attaches to the region, and the times at which the region was last
 attached to, detach from, and changed.
 
-@kindex info os semaphores
-@item semaphores
-Display the list of all System V semaphore sets on the target.  For each
-semaphore set, @value{GDBN} prints the semaphore set key, the semaphore
-set identifier, the access permissions, the number of semaphores in the
-set, the user and group of the owner and creator of the semaphore set,
-and the times at which the semaphore set was operated upon and changed.
-
-@kindex info os msg
-@item msg
-Display the list of all System V message queues on the target.  For each
-message queue, @value{GDBN} prints the message queue key, the message
-queue identifier, the access permissions, the current number of bytes
-on the queue, the current number of messages on the queue, the processes
-that last sent and received a message on the queue, the user and group
-of the owner and creator of the message queue, the times at which a
-message was last sent and received on the queue, and the time at which
-the message queue was last changed.
+@kindex info os sockets
+@item sockets
+Display the list of Internet-domain sockets on the target.  For each
+socket, @value{GDBN} prints the address and port of the local and
+remote endpoints, the current state of the connection, the creator of
+the socket, the IP address family of the socket, and the type of the
+connection.
 
-@kindex info os modules
-@item modules
-Display the list of all loaded kernel modules on the target.  For each
-module, @value{GDBN} prints the module name, the size of the module in
-bytes, the number of times the module is used, the dependencies of the
-module, the status of the module, and the address of the loaded module
-in memory.
+@kindex info os threads
+@item threads
+Display the list of threads running on the target.  For each thread,
+@value{GDBN} prints the identifier of the process that the thread
+belongs to, the command of the process, the thread identifier, and the
+processor core that it is currently running on.  The main thread of a
+process is not listed.
 @end table
 
 @item info os
@@ -31786,28 +31794,30 @@ like this:
 @smallexample
 @value{GDBP}
 -info-os
-^done,OSDataTable=@{nr_rows="9",nr_cols="3",
+^done,OSDataTable=@{nr_rows="10",nr_cols="3",
 hdr=[@{width="10",alignment="-1",col_name="col0",colhdr="Type"@},
      @{width="10",alignment="-1",col_name="col1",colhdr="Description"@},
      @{width="10",alignment="-1",col_name="col2",colhdr="Title"@}],
-body=[item=@{col0="processes",col1="Listing of all processes",
+body=[item=@{col0="cpus",col1="Listing of all cpus/cores on the system",
+            col2="CPUs"@},
+      item=@{col0="files",col1="Listing of all file descriptors",
+            col2="File descriptors"@},
+      item=@{col0="modules",col1="Listing of all loaded kernel modules",
+            col2="Kernel modules"@},
+      item=@{col0="msg",col1="Listing of all message queues",
+            col2="Message queues"@},
+      item=@{col0="processes",col1="Listing of all processes",
             col2="Processes"@},
       item=@{col0="procgroups",col1="Listing of all process groups",
             col2="Process groups"@},
-      item=@{col0="threads",col1="Listing of all threads",
-            col2="Threads"@},
-      item=@{col0="files",col1="Listing of all file descriptors",
-            col2="File descriptors"@},
-      item=@{col0="sockets",col1="Listing of all internet-domain sockets",
-            col2="Sockets"@},
-      item=@{col0="shm",col1="Listing of all shared-memory regions",
-            col2="Shared-memory regions"@},
       item=@{col0="semaphores",col1="Listing of all semaphores",
             col2="Semaphores"@},
-      item=@{col0="msg",col1="Listing of all message queues",
-            col2="Message queues"@},
-      item=@{col0="modules",col1="Listing of all loaded kernel modules",
-            col2="Kernel modules"@}]@}
+      item=@{col0="shm",col1="Listing of all shared-memory regions",
+            col2="Shared-memory regions"@},
+      item=@{col0="sockets",col1="Listing of all internet-domain sockets",
+            col2="Sockets"@},
+      item=@{col0="threads",col1="Listing of all threads",
+            col2="Threads"@}]
 @value{GDBP}
 -info-os processes
 ^done,OSDataTable=@{nr_rows="190",nr_cols="4",
diff --git a/gdb/nat/linux-osdata.c b/gdb/nat/linux-osdata.c
index 0ed5d34..502356f 100644
--- a/gdb/nat/linux-osdata.c
+++ b/gdb/nat/linux-osdata.c
@@ -662,6 +662,104 @@ linux_xfer_osdata_threads (gdb_byte *readbuf,
   return len;
 }
 
+/* Collect data about the cpus/cores on the system */
+
+static LONGEST
+linux_xfer_osdata_cpus (gdb_byte *readbuf,
+			   ULONGEST offset, ULONGEST len)
+{
+  static const char *buf;
+  static LONGEST len_avail = -1;
+  static struct buffer buffer;
+
+  if (offset == 0)
+    {
+      FILE *fp;
+      int first_item = 1;
+
+      if (len_avail != -1 && len_avail != 0)
+	buffer_free (&buffer);
+      len_avail = 0;
+      buf = NULL;
+      buffer_init (&buffer);
+      buffer_grow_str (&buffer, "<osdata type=\"cpus\">\n");
+
+      fp = gdb_fopen_cloexec ("/proc/cpuinfo", "r");
+      if (fp != NULL)
+	{
+	  char buf[8192];
+
+	  do
+	    {
+	      if (fgets (buf, sizeof (buf), fp))
+		{
+		  char *key, *value;
+		  int i = 0;
+
+		  key = strtok (buf, ":");
+		  if (key == NULL)
+		    continue;
+
+		  value = strtok (NULL, ":");
+		  if (value == NULL)
+		    continue;
+
+		  while (key[i] != '\t' && key[i] != '\0')
+		    i++;
+
+		  key[i] = '\0';
+
+		  i = 0;
+		  while (value[i] != '\t' && value[i] != '\0')
+		    i++;
+
+		  value[i] = '\0';
+
+		  if (strcmp (key, "processor") == 0)
+		    {
+		      if (first_item)
+			buffer_grow_str (&buffer, "<item>");
+		      else
+			buffer_grow_str (&buffer, "</item><item>");
+
+		      first_item = 0;
+		    }
+
+		  buffer_xml_printf (&buffer,
+				     "<column name=\"%s\">%s</column>",
+				     key,
+				     value);
+		}
+	    }
+	  while (!feof (fp));
+
+	  if (first_item == 0)
+	    buffer_grow_str (&buffer, "</item>");
+
+	  fclose (fp);
+	}
+
+      buffer_grow_str0 (&buffer, "</osdata>\n");
+      buf = buffer_finish (&buffer);
+      len_avail = strlen (buf);
+    }
+
+  if (offset >= len_avail)
+    {
+      /* Done.  Get rid of the buffer.  */
+      buffer_free (&buffer);
+      buf = NULL;
+      len_avail = 0;
+      return 0;
+    }
+
+  if (len > len_avail - offset)
+    len = len_avail - offset;
+  memcpy (readbuf, buf + offset, len);
+
+  return len;
+}
+
 /* Collect all the open file descriptors found in /proc and put the details
    found about them into READBUF.  */
 
@@ -1532,24 +1630,26 @@ struct osdata_type {
   char *description;
   LONGEST (*getter) (gdb_byte *readbuf, ULONGEST offset, ULONGEST len);
 } osdata_table[] = {
+  { "cpus", "CPUs", "Listing of all cpus/cores on the system",
+    linux_xfer_osdata_cpus },
+  { "files", "File descriptors", "Listing of all file descriptors",
+    linux_xfer_osdata_fds },
+  { "modules", "Kernel modules", "Listing of all loaded kernel modules",
+    linux_xfer_osdata_modules },
+  { "msg", "Message queues", "Listing of all message queues",
+    linux_xfer_osdata_msg },
   { "processes", "Processes", "Listing of all processes",
     linux_xfer_osdata_processes },
   { "procgroups", "Process groups", "Listing of all process groups",
     linux_xfer_osdata_processgroups },
-  { "threads", "Threads", "Listing of all threads",
-    linux_xfer_osdata_threads },
-  { "files", "File descriptors", "Listing of all file descriptors",
-    linux_xfer_osdata_fds },
-  { "sockets", "Sockets", "Listing of all internet-domain sockets",
-    linux_xfer_osdata_isockets },
-  { "shm", "Shared-memory regions", "Listing of all shared-memory regions",
-    linux_xfer_osdata_shm },
   { "semaphores", "Semaphores", "Listing of all semaphores",
     linux_xfer_osdata_sem },
-  { "msg", "Message queues", "Listing of all message queues",
-    linux_xfer_osdata_msg },
-  { "modules", "Kernel modules", "Listing of all loaded kernel modules",
-    linux_xfer_osdata_modules },
+  { "shm", "Shared-memory regions", "Listing of all shared-memory regions",
+    linux_xfer_osdata_shm },
+  { "sockets", "Sockets", "Listing of all internet-domain sockets",
+    linux_xfer_osdata_isockets },
+  { "threads", "Threads", "Listing of all threads",
+    linux_xfer_osdata_threads },
   { NULL, NULL, NULL }
 };
 
-- 
1.9.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] Add cpu information to the info os command on linux.
  2015-03-27 13:42   ` [PATCH v2] " Antoine Tremblay
@ 2015-03-27 14:15     ` Eli Zaretskii
  2015-03-31 11:31     ` Pedro Alves
  1 sibling, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2015-03-27 14:15 UTC (permalink / raw)
  To: Antoine Tremblay; +Cc: palves, gdb-patches, antoine.tremblay

> From: Antoine Tremblay <antoine.tremblay@ericsson.com>
> CC: Antoine Tremblay <antoine.tremblay@ericsson.com>
> Date: Fri, 27 Mar 2015 09:41:46 -0400
> 
> In this patch v2 :
> 
>  - NEWs section update
>  - GDB manual update and reorder of the entries
>  - ChangeLog fix
>  - Various styles problems in .c fixes sorry about that
> seems like it takes time to get this style in my head..
> */

The documentation parts are OK.

Thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] Add cpu information to the info os command on linux.
  2015-03-27 13:42   ` [PATCH v2] " Antoine Tremblay
  2015-03-27 14:15     ` Eli Zaretskii
@ 2015-03-31 11:31     ` Pedro Alves
  1 sibling, 0 replies; 5+ messages in thread
From: Pedro Alves @ 2015-03-31 11:31 UTC (permalink / raw)
  To: Antoine Tremblay, gdb-patches

On 03/27/2015 01:41 PM, Antoine Tremblay wrote:
> /* Not part of the commit 
> In this patch v2 :
> 
>  - NEWs section update
>  - GDB manual update and reorder of the entries
>  - ChangeLog fix
>  - Various styles problems in .c fixes sorry about that
> seems like it takes time to get this style in my head..
> */

Thanks!

> This patch adds cpu information on linux based on /proc/cpuinfo as :
> cpus       Listing of all cpus/cores on the system
> 
> This patch also reorders the info os commands so that they are listed
> in alphabetical order.
> 
> gdb/ChangeLog:
> 	* gdb/nat/linux-osdata.c (linux_xfer_osdata_cpus): New function.
> 	(struct osdata_type): Add cpus entry, reorder the entries in
>         alphabethical order.

This is OK.  Typo "alphabethical".  Seems like there's a spaces/tabs
mixup in that line too.  Please also recall to mention the NEWS and
gdb.texinfo changes in the corresponding ChangeLogs.

Thanks,
Pedro Alves

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-03-31 11:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-25 17:50 [PATCH] Add cpu information to the info os command on linux Antoine Tremblay
2015-03-27 11:38 ` Pedro Alves
2015-03-27 13:42   ` [PATCH v2] " Antoine Tremblay
2015-03-27 14:15     ` Eli Zaretskii
2015-03-31 11:31     ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).