From: Yao Qi <yao@codesourcery.com>
To: Mohsan Saleem <mohsansaleem_ms@yahoo.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] gdb bug 12417
Date: Wed, 19 Sep 2012 13:22:00 -0000 [thread overview]
Message-ID: <5059C6C7.90100@codesourcery.com> (raw)
In-Reply-To: <1348052394.61813.YahooMailNeo@web114408.mail.gq1.yahoo.com>
On 09/19/2012 06:59 PM, Mohsan Saleem wrote:
> --- /root/Desktop/gdb/thread.c 2012-09-03 00:53:02.620254912 -0700
> +++ ./gdb/thread.c 2012-09-03 00:58:04.399469614 -0700
> @@ -243,12 +243,14 @@
> struct thread_info *
> add_thread_with_info (ptid_t ptid, struct private_thread_info *private)
> {
> + char *name;
> struct thread_info *result = add_thread_silent (ptid);
>
> + name = result->name ? result->name : target_thread_name (result);
This pattern is used five times in your patch, and why don't we move it
to a function? like,
const char *
thread_info_name (struct thread_info *ti)
{
return ti->name ? ti->name : target_thread_name (ti);
}
and call this function when needed.
--
Yao
next prev parent reply other threads:[~2012-09-19 13:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <A62F3BCAE6F6B540A2F2C0E7E4387B9505B5AA72@EU-MBX-01.mgc.mentorg.com>
2012-09-18 13:17 ` Mohsan Saleem
2012-09-19 11:00 ` [PATCH] " Mohsan Saleem
2012-09-19 13:09 ` Jan Kratochvil
2012-09-19 13:22 ` Yao Qi [this message]
2012-09-19 13:44 ` Keith Seitz
2012-09-19 16:07 ` Mohsan Saleem
2012-09-19 16:16 ` Sergio Durigan Junior
2012-09-22 13:15 ` Jan Kratochvil
2012-09-24 17:37 [PATCH] " Mohsan Saleem
2012-09-24 22:19 ` Sergio Durigan Junior
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=5059C6C7.90100@codesourcery.com \
--to=yao@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=mohsansaleem_ms@yahoo.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