This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [PATCH] fix PR-12417


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]