Re: [PATCH V6 1/3] gdb: support for eBPF

Jose E. Marchesi
2020-08-03T15:52:27Z

Hello.

> On Monday, August 3, 2020 4:03 PM, Jose E. Marchesi wrote:
>> This patch adds basic support for the eBPF target: tdep and build
>> machinery. The accompanying simulator is introduced in subsequent
>> patches.
>>
>> +/* Internal debugging facilities. */
>> +
>> +/* When this is set to non-zero debugging information will be
>> + printed. */
>> +
>> +static unsigned int bpf_debug_flag = 0;
>> +
>> +/* The show callback for 'show debug bpf'. */
>> +
>> +static void
>> +show_bpf_debug (struct ui_file *file, int from_tty,
>> + struct cmd_list_element *c, const char *value)
>
> Just my two cents. The 'struct' keyword can be removed in numerous places
> throughout the file. Also, NULL can be replaced with nullptr.

I prefer to write (and maintain) C.

>> +{
>> + fprintf_filtered (file, _("Debugging of BPF is %s.\n"), value);
>> +}
>> +
>> +
>>
>>
>> +/* BPF registers */
>
> Might look better with dot-space-space at the end.

Yeah, will add the missing dot-spacing in this and other instances you
identified.

Thanks for the feedback! :)