Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Stan Shebs <stanshebs@earthlink.net>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Add extra 'info os' information types for Linux (trunk and 7.4)
Date: Thu, 29 Dec 2011 20:34:00 -0000	[thread overview]
Message-ID: <CADPb22SYktDThkdyAcvbN_6U=7mDNJq+cpXW5p9_MpZg-YV3YQ@mail.gmail.com> (raw)
In-Reply-To: <4EF9497B.9020501@earthlink.net>

On Mon, Dec 26, 2011 at 8:28 PM, Stan Shebs <stanshebs@earthlink.net> wrote:
> Here is a third revision of the 'info os' additions for Linux; it rolls up
> Kwok's original patch plus requested edits, plus a few more comments and
> tweaks.  I plan to commit this in a day or so, if there are no objections.
>
> I'd also like to get this pushed into 7.4; although it's getting late in the
> release cycle, this code is purely Linux-native and does not have any effect
> outside of 'info os'.  The urgency is partly due to snafu on my part - Kwok
> originally posted this patch in October - and partly due to interdependency
> with Eclipse, who is doing GUI for these commands.  (And yes, there is an
> approved-but-uncommitted MI patch connected with this, that I'll be pushing
> soon.)
>
> Stan
>
> 2011-12-26  Stan Shebs <stan@codesourcery.com>
>        Kwok Cheung Yeung <kcy@codesourcery.com>
>
>    * NEWS: Describe new info os commands.
>    * common/linux-osdata.c (PID_T, TIME_T): Define.
>    (MAX_PID_T_STRLEN): New.
>    (linux_common_core_of_thread): Add comment.  Change to use PID_T and
>    MAX_PID_T_STRLEN.
>    (command_from_pid): Add comment.  Change to use PID_T.
>    (commandline_from_pid):  Change to use PID_T.
>    (user_from_pid): Add comment.
>    (get_process_owner): Add comment. Change to use PID_T and
>    MAX_PID_T_STRLEN.
>    (get_number_of_cpu_cores): Add comment.
>    (get_cores_used_by_process): Add comment.  Change to use PID_T and
>    MAX_PID_T_STRLEN.
>    (linux_xfer_osdata_processes): Change to use PID_T and
>    MAX_PID_T_STRLEN.
>    (compare_processes): New function.
>    (linux_xfer_osdata_processgroups): New function.
>    (linux_xfer_osdata_threads): Change to use PID_T.
>    (linux_xfer_osdata_fds): New function.
>    (format_socket_state, print_sockets): New functions.
>    (union socket_addr): New union.
>    (linux_xfer_osdata_isockets): New function.
>    (time_from_time_t, group_from_gid): New functions.
>    (linux_xfer_osdata_shm): New function.
>    (linux_xfer_osdata_sem): New function.
>    (linux_xfer_osdata_msg): New function.
>    (linux_xfer_osdata_modules): New function.
>    (osdata_table): Add new entries.
>    * common/buffer.c (buffer_xml_printf): Add support for long and
>    long long format specifiers.
>
>    * gdb.texinfo (Operating System Auxiliary Information): Document new
>    'info os' subcommands.
>
>    * gdb.base/info-os.exp: New file.
>    * gdb.base/info-os.c: New file.

One nit:

In info-os.exp, at the end:

+# The SysV IPC primitives linger on after the creating process is killed
+# unless they are destroyed explicitly, so allow the test program to tidy
+# up after itself.  Note that the test program attempts to delete and
+# recreate the shared-memory region if it already exists, in case a
+# previous run failed before having a chance to clean up.  The tests for
+# semaphores and message queues should still work with primitives from
+# previous runs.
+send_gdb "continue\n"

Is that robust enough?
Seems like you should also wait for the program to exit.


      parent reply	other threads:[~2011-12-29 20:32 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-12 18:29 [PATCH] Add extra 'info os' information types for Linux Kwok Cheung Yeung
2011-10-21 23:38 ` Tom Tromey
2011-11-23 18:00   ` Kwok Cheung Yeung
2011-12-27  4:56     ` [PATCH] Add extra 'info os' information types for Linux (trunk and 7.4) Stan Shebs
2011-12-27  9:32       ` Eli Zaretskii
2011-12-27 21:30         ` Mark Kettenis
2011-12-27 23:23           ` Eli Zaretskii
2011-12-28 20:48             ` Mark Kettenis
2011-12-28  0:05         ` Stan Shebs
2011-12-28  3:51           ` Joel Brobecker
2011-12-28  6:02           ` Eli Zaretskii
2012-01-02 12:08           ` Pedro Alves
2012-01-02 12:35             ` Eli Zaretskii
2012-01-02 19:31               ` Pedro Alves
2012-01-03  3:05               ` Joel Brobecker
2012-01-02 18:15             ` Doug Evans
2012-01-02 19:19               ` Pedro Alves
2012-01-02 19:41                 ` Tom Tromey
2011-12-29 20:34       ` Doug Evans [this message]

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='CADPb22SYktDThkdyAcvbN_6U=7mDNJq+cpXW5p9_MpZg-YV3YQ@mail.gmail.com' \
    --to=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=stanshebs@earthlink.net \
    /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