From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id g82TAIcz12MS3yQAWB0awg (envelope-from ) for ; Sun, 29 Jan 2023 22:03:35 -0500 Received: by simark.ca (Postfix, from userid 112) id EA2641E128; Sun, 29 Jan 2023 22:03:34 -0500 (EST) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=tz3qCLUK; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_HI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 883D01E0D3 for ; Sun, 29 Jan 2023 22:03:34 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D58CA3858404 for ; Mon, 30 Jan 2023 03:03:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D58CA3858404 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1675047813; bh=VY1KOYsXes56e3eL/tdE+e7HNS5vqmDGp1FQTXeLUbc=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=tz3qCLUK+Hm82UUn7S4q6l9MGtFc2xle+WjLZrxt9PdTuitNcveUJYVPcU+awQarw K2ve/3LFtX4EyMtouhzbuJRBtzEEW8T73/+I1swgvkam+m7vTQOqbiimTKDh2ZdmhE lQdz8jHHZoG8GMeWnGj/GDrDyYSSliK/zDW06tGk= Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 348DB3858D32 for ; Mon, 30 Jan 2023 03:03:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 348DB3858D32 Received: from [10.0.0.11] (unknown [217.28.27.60]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 9B2081E0D3; Sun, 29 Jan 2023 22:03:07 -0500 (EST) Message-ID: Date: Sun, 29 Jan 2023 22:03:07 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [question] If the code format is wrong, the _initialize_xxx functions cannot be generated? Content-Language: en-US To: hilbert , gdb@sourceware.org References: <6a6c1e38.1ced.1860075978e.Coremail.swdtian@163.com> In-Reply-To: <6a6c1e38.1ced.1860075978e.Coremail.swdtian@163.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Simon Marchi via Gdb Reply-To: Simon Marchi Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" 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