Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Vladimir Prus <vladimir@codesourcery.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFC] Implement -list-thread-groups.
Date: Fri, 14 Nov 2008 11:46:00 -0000	[thread overview]
Message-ID: <20081114015217.GD12802@adacore.com> (raw)
In-Reply-To: <200811122333.29218.vladimir@codesourcery.com>

> I'll commit in a few days if there are no objections.

If others are fine with this too, then so am I. But I don't think
this is the normal procedure: For non-MI changes, my understanding
is that you're supposed to wait for approval unless the changes
are obvious (particularly for patches labeled RFC). I don't blame
you for doing this, given the poor track record we're having in
terms of speed of review - I guess we need more help.

Anyway, onto the patch...

> 	* thread.c (print_thread_info): New parameter pid, to print
> 	threads of specific process.
> 	* gdbthread.h (print_thread_info): New parameter pid.
> 	* mi/mi-cmds.c (mi_cmds): Register -list-thread-groups.
> 	* mi/mi-cmds.h (mi_cmd_list_thread_groups): New.
> 	* mi/mi-main.c (mi_cmd_thread_info): Adjust.
> 	(print_one_process, mi_cmd_list_thread_groups): New.

Overall, looks good to me. Just a couple of minor nits and a question.

>  void
> -print_thread_info (struct ui_out *uiout, int requested_thread)
> +print_thread_info (struct ui_out *uiout, int requested_thread, int pid)

Can you add a comment for the new parameter in the function documentation,
please?

> -
> +	

You're adding some spaces in what would otherwise be an empty line.
Can you get rid of that change?

> +  if (pid == -1 && requested_thread == -1 )
>      {
>        gdb_assert (current_thread != -1
>  		  || !thread_list);

This has little to do with your change, but I'm curious. What does
this code do? It seems to be adding a current-thread-id field in
the output, but why only doing it when requested_thread (and pid)
is -1?

-- 
Joel


  reply	other threads:[~2008-11-14  1:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-12 21:01 Vladimir Prus
2008-11-14 11:46 ` Joel Brobecker [this message]
2008-11-14 11:58   ` Michael Snyder
2008-11-14 19:43   ` Vladimir Prus
2008-11-14 19:44     ` Michael Snyder
2008-11-14 21:45       ` Vladimir Prus
2008-11-15  4:58         ` Michael Snyder
2008-11-15  9:00           ` Vladimir Prus
2008-11-15 16:10             ` Michael Snyder
2008-11-15 19:06               ` Vladimir Prus
2008-11-16  8:22                 ` Michael Snyder
2008-11-16  8:22                   ` Vladimir Prus
     [not found]                     ` <29E9E827072C404C88A05DDC42B45997199E0503FF@PA-EXMBX14.vmware.com>
2008-11-17  9:42                       ` Vladimir Prus
2008-11-17 19:48                         ` Michael Snyder
2008-11-17 22:02                           ` Vladimir Prus
2008-11-14 20:46     ` Pedro Alves
2008-11-16  1:14     ` Joel Brobecker
2008-11-16  8:20       ` Joel Brobecker

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=20081114015217.GD12802@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=vladimir@codesourcery.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