From: "Agovic, Sanimir" <sanimir.agovic@intel.com>
To: 'Mohsan Saleem' <mohsansaleem_ms@yahoo.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: RE: [PATCH] fix PR-12417
Date: Wed, 04 Sep 2013 12:24:00 -0000 [thread overview]
Message-ID: <0377C58828D86C4588AEEC42FC3B85A71766C3B0@IRSMSX105.ger.corp.intel.com> (raw)
In-Reply-To: <1378293943.43616.YahooMailNeo@web142603.mail.bf1.yahoo.com>
Thanks for taking care of my comments.
+const char *
+thread_name (struct thread_info *ti)
+{
+ const char *name;
+
+ name = ti->name != NULL ? ti->name : target_thread_name (ti);
+ return name != NULL ? name : "";
+}
Imho, we must always call target_thread_name to get the latest thread name.
> -----Original Message-----
> From: Mohsan Saleem [mailto:mohsansaleem_ms@yahoo.com]
> Sent: Wednesday, September 04, 2013 01:26 PM
> To: Agovic, Sanimir
> Cc: gdb-patches@sourceware.org
> Subject: Re: [PATCH] fix PR-12417
>
> >> if (print_thread_events)
> >> - printf_unfiltered (_("[New %s]\n"), target_pid_to_str (ptid));
> >> + printf_unfiltered (_("[New %s \"%s\"]\n"), target_pid_to_str (ptid), thread_name
> >>
>
> >This will print [New 1234 ""] in case a thread name is not available, not sure if we
> >should omit thread name instead.
>
> As when a new thread is created then by default program name is assigned to it. So it will
> print [New 1234 "a.out"], if program is named as "a.out"
>
I see, just was curious if one might see an empty quoted string.
-Sanimir
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052
next prev parent reply other threads:[~2013-09-04 12:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <D5A5FA7510B2BE4089BC6266520C345F9D995C@EU-MBX-02.mgc.mentorg.com>
2013-08-28 16:24 ` Mohsan Saleem
2013-09-03 2:39 ` Mohsan Saleem
2013-09-04 8:19 ` Mohsan Saleem
2013-09-04 8:58 ` Agovic, Sanimir
2013-09-04 11:25 ` Mohsan Saleem
2013-09-04 12:24 ` Agovic, Sanimir [this message]
2013-09-17 4:18 ` Mohsan Saleem
2013-11-06 22:23 ` Tom Tromey
2014-02-14 10:41 ` Saleem, Mohsan
2014-05-15 19:03 ` Tom Tromey
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=0377C58828D86C4588AEEC42FC3B85A71766C3B0@IRSMSX105.ger.corp.intel.com \
--to=sanimir.agovic@intel.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