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

hilbert via Gdb <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>

Sorry, I have another question;
Mt clang-format tool version does not seem to match, it does not recognize the .clang-fromat script;
 where can I find the clang-format version required by gdb?


Thanks.







At 2023-01-30 11:03:07, "Simon Marchi" <[email protected]> wrote:
>
>
>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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.