This is the mail archive of the 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: [RFA] Give thread names in thread events, give Ada task names in more output.

>>>>> "Philippe" == Philippe Waroquiers <> writes:

>> Are there spots calling target_pid_to_str that do not want to call the
>> new function?

Philippe> We have different "spot kinds" calling target_pid_to_str.
Philippe> Some spots have a thread_info*, they get the ptid from this thread_info
Philippe> to call target_pid_to_str.  These are trivial to convert.

Philippe> Some spots have just a ptid.  Calling thread_target_id_str implies to
Philippe> convert the ptid to a thread_info*.  This can return a null ptr, and so
Philippe> could lead to a problem.
Philippe> Maybe we could define a new function such as:
Philippe>     target_pid_to_thr_id_str (ptid)
Philippe> that tries to convert ptid to a thread_info*.
Philippe> If it finds one, then it returns thread_target_id_str (th)
Philippe> otherwise it returns target_pid_to_str (ptid).

Philippe> This should be a relatively mechanical and not risky change, but we
Philippe> have about 200 calls to target_pid_to_str in various user messages
Philippe> and (mostly) debug info.

Philippe> What do you think ?

I think when I wrote that line, I hadn't yet appreciated that the patch
was just exposing a previously private function.  So, while it may still
make sense to switch other calls to use it, I don't think it is a
requirement for this patch.


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