Re: [PATCH 21/23] Add "info connections" command, "info inferiors" connection number/string

Pedro Alves
2019-10-17T02:21:09Z

On 9/9/19 9:18 PM, Tom Tromey wrote:
>>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
>
> Pedro> This commit extends the CLI a bit for multi-target, in three ways.
> Pedro> #1 - New "info connections" command.
>
> This looks good to me. Just one question below.
>
> FWIW I'm fine with the names you chose.
>
> Pedro> + uiout->table_header (name_len + 1, ui_left, "name", "Name");
>
> Why the "+ 1" here?

Without it, we get:

(gdb) info connections
Num What Description
* 1 remote :9999 Remote serial target in gdb-specific protocol

Since the "name" column can include spaces in the middle of its
string, it seemed to me that an extra space would make the separation
more obvious.

With the extra space we get:

(gdb) info connections
Num What Description
* 1 remote :9999 Remote serial target in gdb-specific protocol

We don't do that in "info threads", for example, so maybe
that was misguided.

WDYT? Keep the extra space or remove it?

I'll add a comment if we keep it.

Thanks,
Pedro Alves