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: [RFA] Output the Ada task name in more messages.


>>>>> "Philippe" == Philippe Waroquiers <philippe.waroquiers@skynet.be> writes:

Philippe> With this patch, we e.g. get:
Philippe>       [Switching to task 2 task_list(1)]
Philippe>       [Current task is 2 task_list(1)]
Philippe>     instead of
Philippe>       [Switching to task 2]
Philippe>       [Current task is 2]

Thank you for the patch.

When printing the name of a thread, gdb surrounds it in quotes:

	  uiout->text (" \"");
	  uiout->field_string ("name", name);
	  uiout->text ("\"");

Would this also make sense for Ada task names?

Philippe> +/* Return a string with TASKNO followed by the task name if TASK_INFO
Philippe> +   contains a name.  */
Philippe> +
Philippe> +static std::string
Philippe> +task_to_str (int taskno, const ada_task_info *task_info)
Philippe> +{
Philippe> +    if (task_info->name[0] == '\0')
Philippe> +      return string_printf ("%d", taskno);
Philippe> +    else
Philippe> +      return string_printf ("%d %s", taskno, task_info->name);

Indentation looks off here.

Otherwise this patch looks good to me.

Tom


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