[question] If the code format is wrong, the _initialize_xxx functions cannot be generated?

Simon Marchi simark@simark.ca
Mon Jan 30 03:03:07 GMT 2023



On 1/29/23 21:15, hilbert via Gdb wrote:
> Hi,
> 
> 
> Does newly added code need a fixed code format. I registered a new target.
> But if I use the command "clang-format -style=LLVM -i newtarget.c" to reformat the code, and then compile it, the _initialize_new_target() function will not be generated in init.c;
>  if I use the original code format, gdb The _initialize_new_target() function is generated. 
> Is this understanding correct?
> Thank you very much.

Yes, the function name in the definition needs to be at column 0 (like
the GNU coding style prescribes).  Otherwise, the script
(gdb/make-init-c) will not find it.

Simon


More information about the Gdb mailing list