public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: hilbert  <swdtian@163.com>
To: "Simon Marchi" <simark@simark.ca>
Cc: gdb@sourceware.org
Subject: Re:Re: [question] If the code format is wrong, the _initialize_xxx functions cannot be generated?
Date: Mon, 30 Jan 2023 16:30:54 +0800 (CST)	[thread overview]
Message-ID: <2c53edf.89cc.18601ccf519.Coremail.swdtian@163.com> (raw)
In-Reply-To: <b8473aa5-a20a-737c-dfe4-34beccecde69@simark.ca>

[-- Attachment #1: Type: text/plain, Size: 932 bytes --]



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" <simark@simark.ca> 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

  reply	other threads:[~2023-01-30  8:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-30  2:15 hilbert
2023-01-30  3:03 ` Simon Marchi
2023-01-30  8:30   ` hilbert [this message]
2023-01-31  1:28     ` Simon Marchi
2023-01-31  1:58       ` hilbert
2023-01-31  2:01         ` Simon Marchi
2023-01-31  2:10           ` Joel Sherrill
2023-01-31  3:31             ` hilbert
2023-02-08 19:58             ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2c53edf.89cc.18601ccf519.Coremail.swdtian@163.com \
    --to=swdtian@163.com \
    --cc=gdb@sourceware.org \
    --cc=simark@simark.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).