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" 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